once ❝ published name Reconstructed 91.5% of control flow structured Anchor ◇ GRzKU9i3Cs7A5Euf9gGZjbRnpypw7DzaU3hWRfUgpYTa copy decompiled 22 Oct 2026
Identity · published metadata ▾
Loader ■ v3 · upgradeable
sBPF ■ v0
Size ■ 556,728 bytes
Instructions ● 58,814
Functions ● 412
SHA-256 ● 23200e76…1d4a7b42
Upgrade authority ■ 8gop…M677
Last deploy slot ■ 459,519,774 ❝ Published by the authors · their claims, not revrsly output Verified build github.com/call-once/once-program @ 1ee2ebf · ✓ hash matches this bytecode IDL · none publishedsecurity.txt · embedded ■ read from the bytes view Loading the reconstruction…
Functions
Other functions 354
+ 294 more · type to filter
set_once ▾
pseudocode.c fn set_once · .text+0x45670 · 388 ins · 75 blocks · 397 lines · structured where the control flow allows copy ↓ .c download pseudocode.c 1 // set_once · 388 instructions · 1 caller · 14 gotos
2 // panic locations in this function: /home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/string.rs:2830, programs/once/src/events.rs:10, /home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027
3 u64 set_once ( u64 r1, u64
Evidence why revrsly believes it ×
Function ◇ Inferred
set_once
◇ The program's own handler for set_once: the function Anchor's wrapper calls once the accounts are loaded.
● .text+0x45670 · 388 instructions · 75 blocks
● 1 caller
◇ takes 2 arguments (from register use)
r2) {
65 r7 = *( u64 *)(r2 + 8 );
66 r4 = *( u64 *)(*( u64 *)(r7 + 0x10 ) + 0x58 );
68 local_130 = *( u64 *)(r2 + 0x18 );
69 local_138 = *( u64 *)(r2 + 0x10 );
70 local_140 = *( u64 *)(r2 + 8 );
71 local_148 = *( u64 *)(r2);
72 r1 = *( u64 *)(r4 + 8 );
73 r3 = *( u64 *)(r1) + 1 ;
80 r3 = *( u64 *)(r4 + 0x10 );
81 r5 = *( u64 *)(r3) + 1 ;
88 r5 = *( u64 *)(r4 + 0x18 );
89 r0 = *( u64 *)(r4 + 0x20 );
90 r8 = *( u8 *)(r4 + 0x28 );
91 r9 = *( u8 *)(r4 + 0x29 );
92 local_a6 = *( u8 *)(r4 + 0x2a );
100 local_128 = *( u64 *)(r5);
101 local_120 = *( u64 *)(r5 + 8 );
102 local_118 = *( u64 *)(r5 + 0x10 );
103 local_110 = *( u64 *)(r5 + 0x18 );
104 r2 = *( u64 *)(r1) + - 1 ;
107 r0 = fn_63ad8(&local_c8_u64);
109 r1 = *( u64 *)(r3) + - 1 ;
113 r0 = fn_63b28(&local_c0);
116 r1 = *( u64 *)(r3) + - 1 ;
119 goto L_45ab8; ● kept as goto
122 r0 = clock_get (&local_d0_u64);
123 if (local_d0_u32 == 1 ) {
124 r0 = fn_5fbd0(&local_180, local_cc, local_c8_u32);
128 *( u64 *)(r6 + 8 ) = r7;
132 r2 = *( u64 *)(r7 + 8 );
133 r3 = *( u64 *)(r2 + 0x48 );
135 if ((r1 + r3) >= r1) {
141 r0 = custom_error_name (&local_30, r7);
145 local_100 = 0x7dfc8 ; // .data.rel.ro+0xc8
146 local_108 = &local_18;
147 local_f8 = 0xe0000020 ;
148 r0 = custom_error_fmt (r7, &local_108, r3, r4, r5);
150 r5 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/string.rs:2830:14" ); ■ string · 92 B
151 r0 = fn_6f930( "a Display implementation returned an error unexpectedly" , 0x37 , &local_d0_u64, 0x7dff8 , r5); // .data.rel.ro+0xf8 ■ string · 55 B
157 local_a8_u64 = local_28;
159 local_38 = 0x1789 ; // error 6025 Overflow: "Checked arithmetic overflow"
162 r0 = fn_5fb40(&local_170, &local_d0_u64);
166 *( u64 *)(r6 + 8 ) = r7;
169 *( u64 *)(r2 + 0x60 ) = r3 + r1;
170 r1 = *( u64 *)(r7 + 8 );
171 *( u8 *)(r1 + 0x69 ) = 1 ;
172 *( u64 *)(r1 + 0x6a ) = local_148;
173 *( u64 *)(r1 + 0x72 ) = local_140;
174 *( u64 *)(r1 + 0x7a ) = local_138;
175 *( u64 *)(r1 + 0x82 ) = local_130;
176 r1 = *( u64 *)(r7 + 8 );
177 *( u8 *)(r1 + 0x8a ) = 1 ;
178 *( u64 *)(r1 + 0xa3 ) = local_110;
179 *( u64 *)(r1 + 0x9b ) = local_118;
180 *( u64 *)(r1 + 0x93 ) = local_120;
181 *( u64 *)(r1 + 0x8b ) = local_128;
182 r1 = *( u64 *)(r7 + 0x20 );
183 r7 = *( u64 *)(r1 + 8 );
184 r2 = *( u64 *)(r7) + 1 ;
192 r4 = *( u64 *)(r1 + 0x10 );
193 r2 = *( u64 *)(r4) + 1 ;
200 abort (); // abort the program ■ syscall
203 local_1c0 = *( u8 *)(r1 + 0x2a );
204 local_1b8 = *( u8 *)(r1 + 0x29 );
205 local_1b0 = *( u8 *)(r1 + 0x28 );
206 local_1a8 = *( u64 *)(r1 + 0x20 );
207 local_1a0 = *( u64 *)(r1 + 0x18 );
209 r1 = *( u64 *)( 0x300000000 );
222 if (r9 <= 0x300000007 ) {
223 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:10:1" )); ■ string · 32 B
228 *( u64 *)(r9) = 0x3e5c34fa631f06ff ; // discriminator of event `OnceSet`
229 *( u64 *)(r9 + 8 ) = local_148;
230 *( u64 *)(r9 + 0x10 ) = local_140;
231 *( u64 *)(r9 + 0x18 ) = local_138;
232 *( u64 *)(r9 + 0x20 ) = local_130;
233 *( u64 *)(r9 + 0x28 ) = local_128;
234 *( u64 *)(r9 + 0x30 ) = local_120;
235 *( u64 *)(r9 + 0x38 ) = local_118;
236 *( u64 *)(r9 + 0x40 ) = local_110;
254 if (r7 <= 0x300000007 ) {
255 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
256 r0 = fn_67b18(r1, 0x50 , r3);
259 *( u64 *)( 0x300000000 ) = r7;
260 *( u64 *)(r7) = 0x1d9acb512ea545e4 ; // Anchor emit_cpi! event tag
263 *( u8 *)(r7 + r1 + 8 ) = *( u8 *)(r9 + r1);
271 r2 = *( u64 *)( 0x300000000 );
283 if (r1 < 0x300000008 ) {
284 r0 = fn_67b38( 1 , 0x22 );
287 *( u64 *)( 0x300000000 ) = r1;
290 r3 = *( u64 *)(r8 + 8 );
291 r4 = *( u64 *)(r8 + 0x10 );
292 *( u64 *)(r1 + 0x18 ) = *( u64 *)(r8 + 0x18 );
293 *( u64 *)(r1 + 0x10 ) = r4;
294 *( u64 *)(r1 + 8 ) = r3;
296 *( u16 *)(r1 + 0x20 ) = 1 ;
302 r0 = fn_64088(r1, 0x7a3d5 , r7, 0x50 , &local_108); // .rodata+0xfd5
303 local_de = local_1c0;
304 local_df = local_1b8;
305 local_e0 = local_1b0;
306 local_e8 = local_1a8;
307 local_f0 = local_1a0;
308 local_f8 = local_198;
311 local_1000 = 0x7e370 ; // .data.rel.ro+0x470
313 r0 = invoke_signed (&local_150, local_1c8, &local_108, 1 , fp);
316 r0 = fn_5fbd0(&local_160, r2, local_14c);
323 r1 = *( u64 *)(r9) + - 1 ;
326 r0 = fn_63ad8(&local_100);
329 r2 = *( u64 *)(r1) + - 1 ;
332 r0 = fn_63b28(&local_f8);
335 *( u64 *)(r6 + 8 ) = r7;
339 if (r1 < 0x300000008 ) {
340 r0 = fn_67b38( 1 , 0x22 );
342 goto L_46028; ● kept as goto
348 goto L_46010; ● kept as goto
350 goto L_46220; ● kept as goto
354 goto L_46200; ● kept as goto
356 goto L_45ff8; ● kept as goto
359 if (r7 <= 0x300000007 ) {
360 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
361 r0 = fn_67b18(r1, 0x50 , r3);
363 goto L_45f28; ● kept as goto
366 goto L_45f08; ● kept as goto
368 goto L_45ed8; ● kept as goto
370 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
371 r0 = fn_67b18(r1, 0x50 , r3);
374 if (r9 <= 0x300000007 ) {
375 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:10:1" )); ■ string · 32 B
377 goto L_45d00; ● kept as goto
383 goto L_45ce8; ● kept as goto
385 goto L_45e28; ● kept as goto
390 goto L_45e08; ● kept as goto
392 goto L_45cd0; ● kept as goto
396 abort (); // abort the program ■ syscall