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…
once · revrsly
Functions
Other functions 354
+ 294 more · type to filter
reclaim_try_accounts ▾
pseudocode.c fn reclaim_try_accounts · .text+0x369e8 · 1,426 ins · 298 blocks · 1,590 lines · structured where the control flow allows copy ↓ .c download pseudocode.c 1 // reclaim_try_accounts · 1426 instructions · 1 caller · 57 gotos
2 // panic locations in this function: src/syscalls.rs:279, /home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449
3 u64 reclaim_try_accounts ( u64 r1, u64
Evidence why revrsly believes it ×
Function ◇ Inferred
reclaim_try_accounts
◇ Anchor's account loader for reclaim: the first call after its "Instruction: Reclaim" that can raise AccountNotEnoughKeys (3005).
● .text+0x369e8 · 1,426 instructions · 298 blocks
● 1 caller
◇ takes 5 arguments (from register use)
r2,
u64
r3,
u64
r4,
u64
r5) {
216 r0 = fn_a368(&local_300, r2, r3);
217 local_618 = local_2f8;
221 r2 = *( u64 *)( 0x300000000 );
232 if (r1 <= 0x300000007 ) {
233 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
234 r0 = fn_67b18( 1 , 6 , r3);
236 *( u64 *)( 0x300000000 ) = r1;
237 *( u16 *)(r1 + 4 ) = 0x7265 ;
238 *( u32 *)(r1) = 0x74697277 ;
240 *( u64 *)(r5 + 0x10 ) = r1;
241 *( u64 *)(r5 + 0x18 ) = 6 ;
242 *( u64 *)(r5 + 8 ) = 6 ;
244 *( u64 *)(r9 + 0x10 ) = r5;
245 *( u64 *)(r9 + 8 ) = r6;
251 if (r1 <= 0x300000007 ) {
252 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
253 r0 = fn_67b18( 1 , 6 , r3);
255 *( u64 *)( 0x300000000 ) = r1;
256 *( u16 *)(r1 + 4 ) = 0x7265 ;
257 *( u32 *)(r1) = 0x74697277 ;
259 *( u64 *)(r5 + 0x10 ) = r1;
260 *( u64 *)(r5 + 0x18 ) = 6 ;
261 *( u64 *)(r5 + 8 ) = 6 ;
263 *( u64 *)(r9 + 0x10 ) = r5;
264 *( u64 *)(r9 + 8 ) = r6;
274 if (r1 > 0x300000007 ) {
275 *( u64 *)( 0x300000000 ) = r1;
276 *( u16 *)(r1 + 4 ) = 0x7265 ;
277 *( u32 *)(r1) = 0x74697277 ;
279 *( u64 *)(r5 + 0x10 ) = r1;
280 *( u64 *)(r5 + 0x18 ) = 6 ;
281 *( u64 *)(r5 + 8 ) = 6 ;
283 *( u64 *)(r9 + 0x10 ) = r5;
284 *( u64 *)(r9 + 8 ) = r6;
288 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
289 r0 = fn_67b18( 1 , 6 , r3);
293 if (r1 <= 0x300000007 ) {
294 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
295 r0 = fn_67b18( 1 , 6 , r3);
297 *( u64 *)( 0x300000000 ) = r1;
298 *( u16 *)(r1 + 4 ) = 0x7265 ;
299 *( u32 *)(r1) = 0x74697277 ;
301 *( u64 *)(r5 + 0x10 ) = r1;
302 *( u64 *)(r5 + 0x18 ) = 6 ;
303 *( u64 *)(r5 + 8 ) = 6 ;
305 *( u64 *)(r9 + 0x10 ) = r5;
306 *( u64 *)(r9 + 8 ) = r6;
313 goto L_36c60; ● kept as goto
315 goto L_36be0; ● kept as goto
317 r7 = *( u64 *)(r7 - 0xff8 );
319 r0 = fn_a6c8(&pda_2, r2, r8);
324 r2 = *( u64 *)( 0x300000000 );
341 if (r1 <= 0x300000007 ) {
342 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
343 r0 = fn_67b18( 1 , 4 , r3);
345 *( u64 *)( 0x300000000 ) = r1;
346 *( u32 *)(r1) = 0x6c6c6163 ;
348 *( u64 *)(r7 + 0x10 ) = r1;
349 *( u64 *)(r7 + 0x18 ) = 4 ;
350 *( u64 *)(r7 + 8 ) = 4 ;
352 *( u64 *)(r9 + 0x10 ) = r7;
353 *( u64 *)(r9 + 8 ) = r6;
361 goto L_36dc8; ● kept as goto
363 goto L_36af0; ● kept as goto
366 if (r1 <= 0x300000007 ) {
367 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
368 r0 = fn_67b18( 1 , 4 , r3);
370 *( u64 *)( 0x300000000 ) = r1;
371 *( u32 *)(r1) = 0x6c6c6163 ;
373 *( u64 *)(r7 + 0x10 ) = r1;
374 *( u64 *)(r7 + 0x18 ) = 4 ;
375 *( u64 *)(r7 + 8 ) = 4 ;
377 *( u64 *)(r9 + 0x10 ) = r7;
378 *( u64 *)(r9 + 8 ) = r6;
383 r1 = *( u64 *)( 0x300000000 );
394 if (r6 > 0x300000007 ) {
398 r0 = memcpy (r6, &pda_2, 0xd8 );
399 r0 = fn_628(&pda_2, r2, r8, r4, fp);
418 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
419 r0 = fn_67b18( 1 , 5 , r3);
421 *( u64 *)( 0x300000000 ) = r1;
422 *( u8 *)(r1 + 4 ) = 0x74 ;
423 *( u32 *)(r1) = 0x6c756176 ;
425 *( u64 *)(r7 + 0x10 ) = r1;
426 *( u64 *)(r7 + 0x18 ) = 5 ;
427 *( u64 *)(r7 + 8 ) = 5 ;
429 *( u64 *)(r5 + 0x10 ) = r7;
430 *( u64 *)(r5 + 8 ) = r6;
435 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
436 r0 = fn_67b18( 1 , 5 , r3);
438 *( u64 *)( 0x300000000 ) = r1;
439 *( u8 *)(r1 + 4 ) = 0x74 ;
440 *( u32 *)(r1) = 0x6c756176 ;
442 *( u64 *)(r7 + 0x10 ) = r1;
443 *( u64 *)(r7 + 0x18 ) = 5 ;
444 *( u64 *)(r7 + 8 ) = 5 ;
446 *( u64 *)(r5 + 0x10 ) = r7;
447 *( u64 *)(r5 + 8 ) = r6;
456 *( u64 *)( 0x300000000 ) = r1;
457 *( u8 *)(r1 + 4 ) = 0x74 ;
458 *( u32 *)(r1) = 0x6c756176 ;
460 *( u64 *)(r7 + 0x10 ) = r1;
461 *( u64 *)(r7 + 0x18 ) = 5 ;
462 *( u64 *)(r7 + 8 ) = 5 ;
464 *( u64 *)(r5 + 0x10 ) = r7;
465 *( u64 *)(r5 + 8 ) = r6;
469 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
470 r0 = fn_67b18( 1 , 5 , r3);
474 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
475 r0 = fn_67b18( 1 , 5 , r3);
477 *( u64 *)( 0x300000000 ) = r1;
478 *( u8 *)(r1 + 4 ) = 0x74 ;
479 *( u32 *)(r1) = 0x6c756176 ;
481 *( u64 *)(r7 + 0x10 ) = r1;
482 *( u64 *)(r7 + 0x18 ) = 5 ;
483 *( u64 *)(r7 + 8 ) = 5 ;
485 *( u64 *)(r5 + 0x10 ) = r7;
486 *( u64 *)(r5 + 8 ) = r6;
495 goto L_36f28; ● kept as goto
497 goto L_37068; ● kept as goto
501 goto L_37048; ● kept as goto
503 goto L_36f10; ● kept as goto
517 if (r7 > 0x300000007 ) {
520 r0 = memcpy (r7, &pda_2, 0xd8 );
522 r0 = fn_578(&pda_2, r2, r8);
537 if (r1 <= 0x300000007 ) {
538 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
539 r0 = fn_67b18( 1 , 4 , r3);
541 *( u64 *)( 0x300000000 ) = r1;
542 *( u32 *)(r1) = 0x746e696d ;
544 *( u64 *)(r7 + 0x10 ) = r1;
545 *( u64 *)(r7 + 0x18 ) = 4 ;
546 *( u64 *)(r7 + 8 ) = 4 ;
548 *( u64 *)(r5 + 0x10 ) = r7;
549 *( u64 *)(r5 + 8 ) = r6;
554 if (r1 <= 0x300000007 ) {
555 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
556 r0 = fn_67b18( 1 , 4 , r3);
558 *( u64 *)( 0x300000000 ) = r1;
559 *( u32 *)(r1) = 0x746e696d ;
561 *( u64 *)(r7 + 0x10 ) = r1;
562 *( u64 *)(r7 + 0x18 ) = 4 ;
563 *( u64 *)(r7 + 8 ) = 4 ;
565 *( u64 *)(r5 + 0x10 ) = r7;
566 *( u64 *)(r5 + 8 ) = r6;
575 if (r1 > 0x300000007 ) {
576 *( u64 *)( 0x300000000 ) = r1;
577 *( u32 *)(r1) = 0x746e696d ;
579 *( u64 *)(r7 + 0x10 ) = r1;
580 *( u64 *)(r7 + 0x18 ) = 4 ;
581 *( u64 *)(r7 + 8 ) = 4 ;
583 *( u64 *)(r5 + 0x10 ) = r7;
584 *( u64 *)(r5 + 8 ) = r6;
588 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
589 r0 = fn_67b18( 1 , 4 , r3);
592 if (r1 <= 0x300000007 ) {
593 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
594 r0 = fn_67b18( 1 , 4 , r3);
596 *( u64 *)( 0x300000000 ) = r1;
597 *( u32 *)(r1) = 0x746e696d ;
599 *( u64 *)(r7 + 0x10 ) = r1;
600 *( u64 *)(r7 + 0x18 ) = 4 ;
601 *( u64 *)(r7 + 8 ) = 4 ;
603 *( u64 *)(r5 + 0x10 ) = r7;
604 *( u64 *)(r5 + 8 ) = r6;
611 goto L_372e8; ● kept as goto
613 goto L_371c0; ● kept as goto
629 if (r1 <= 0x300000007 ) {
630 r0 = fn_67b38( 8 , 0x80 );
636 r0 = memcpy (r1, &pda_2, 0x80 );
638 r0 = fn_0(&local_2f0, r2, r8);
639 local_648 = local_2e8;
662 if (r1 <= 0x300000007 ) {
663 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
664 r0 = fn_67b18( 1 , 0xd , r3);
666 *( u64 *)( 0x300000000 ) = r1;
667 *( u64 *)(r1 + 5 ) = 0x6d6172676f72705f ; // text "_program"
668 *( u64 *)(r1) = 0x72705f6e656b6f74 ; // text "token_pr"
670 *( u64 *)(r3 + 0x10 ) = r1;
671 *( u64 *)(r3 + 0x18 ) = 0xd ;
672 *( u64 *)(r3 + 8 ) = 0xd ;
674 *( u64 *)(r9 + 0x10 ) = r3;
675 *( u64 *)(r9 + 8 ) = r7;
684 goto L_37640; ● kept as goto
686 goto L_37560; ● kept as goto
691 if (r1 <= 0x300000007 ) {
692 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/slice.rs:449:29" ); ■ string · 90 B
693 r0 = fn_67b18( 1 , 0xd , r3);
695 *( u64 *)( 0x300000000 ) = r1;
696 *( u64 *)(r1 + 5 ) = 0x6d6172676f72705f ; // text "_program"
697 *( u64 *)(r1) = 0x72705f6e656b6f74 ; // text "token_pr"
699 *( u64 *)(r3 + 0x10 ) = r1;
700 *( u64 *)(r3 + 0x18 ) = 0xd ;
701 *( u64 *)(r3 + 8 ) = 0xd ;
703 *( u64 *)(r9 + 0x10 ) = r3;
704 *( u64 *)(r9 + 8 ) = r7;
708 r0 = fn_628(&pda_2, r2, r8, r4, fp);
710 r0 = fn_5598(&local_310, pda_2, local_d0, "destination" , 0xb ); ■ string · 11 B
718 r1 = *( u64 *)(r8 + 8 );
721 *( u64 *)(r8) = r3 + 0x30 ;
723 *( u64 *)(r8 + 8 ) = r1;
727 *( u64 *)(r8 + 8 ) = r1 + - 1 ;
730 *( u64 *)(r8) = r1 + 0x30 ;
732 r1 = 0x7e148 ; // .data.rel.ro+0x248
733 local_c0 = *( u64 *)(r1 + 0x18 );
734 local_c8 = *( u64 *)(r1 + 0x10 );
735 local_d0 = *( u64 *)(r1 + 8 );
736 pda_2 = *( u64 *)(r1);
740 r0 = memcpy (r8, &pda_2, 0x30 );
741 r1 = *( u64 *)(*( u64 *)(r6));
742 local_298 = *( u64 *)(r1 + 0x18 );
743 local_2a0 = *( u64 *)(r1 + 0x10 );
744 local_2a8 = *( u64 *)(r1 + 8 );
745 local_2b0 = *( u64 *)(r1);
746 r0 = fn_b2c8(r8, &local_2b0);
748 r0 = anchor_error_new (&local_600, 0x7f8 ); // Anchor error 2040 ConstraintDuplicateMutableAccount?
749 r0 = fn_5598(&local_610, local_600, local_5f8, "call" , 4 ); ■ string · 4 B
752 *( u64 *)(r9 + 8 ) = r2;
753 *( u64 *)(r9 + 0x10 ) = r1;
757 r1 = *( u64 *)(*( u64 *)(r7 + 0x20 ));
758 local_278 = *( u64 *)(r1 + 0x18 );
759 local_280 = *( u64 *)(r1 + 0x10 );
760 local_288 = *( u64 *)(r1 + 8 );
761 local_290 = *( u64 *)(r1);
762 r0 = fn_b2c8(&pda, &local_290);
764 r0 = anchor_error_new (&local_5e0, 0x7f8 ); // Anchor error 2040 ConstraintDuplicateMutableAccount?
765 r0 = fn_5598(&local_5f0, local_5e0, local_5d8, "vault" , 5 ); ■ string · 5 B
768 *( u64 *)(r9 + 8 ) = r2;
769 *( u64 *)(r9 + 0x10 ) = r1;
773 r1 = *( u64 *)(*( u64 *)(local_658 + 0x20 ));
774 local_258 = *( u64 *)(r1 + 0x18 );
775 local_260 = *( u64 *)(r1 + 0x10 );
776 local_268 = *( u64 *)(r1 + 8 );
777 local_270 = *( u64 *)(r1);
778 r0 = fn_b2c8(&pda, &local_270);
780 r0 = anchor_error_new (&local_5c0, 0x7f8 ); // Anchor error 2040 ConstraintDuplicateMutableAccount?
781 r0 = fn_5598(&local_5d0, local_5c0, local_5b8, "destination" , 0xb ); ■ string · 11 B
784 *( u64 *)(r9 + 0x10 ) = r2;
785 *( u64 *)(r9 + 8 ) = r1;
789 if (*( u8 *)(local_618 + 0x29 ) == 0 ) {
790 r0 = anchor_error_new (&local_360, 0x7d0 ); // Anchor error 2000 ConstraintMut?
791 r0 = fn_5598(&local_370, local_360, local_358, "writer" , 6 ); ■ string · 6 B
794 *( u64 *)(r9 + 0x10 ) = r2;
795 *( u64 *)(r9 + 8 ) = r1;
799 local_220 = *( u64 *)(r6 + 0x68 );
800 r1 = *( u8 *)(r6 + 0xb0 );
801 local_b8_u64 = &local_211;
802 local_c8 = &local_220;
803 pda_2 = 0x79e08 ; // .rodata+0xa08
808 r0 = sol_create_program_address (&pda_2, 3 , local_620, &pda); // derive a PDA ■ syscall
811 r0 = anchor_error_new (&local_380, 0x7d6 ); // Anchor error 2006 ConstraintSeeds?
812 r0 = fn_5598(&local_390, local_380, local_378, "call" , 4 ); ■ string · 4 B
815 *( u64 *)(r9 + 0x10 ) = r2;
816 *( u64 *)(r9 + 8 ) = r1;
839 local_231 = local_228;
840 local_239 = pda_bump;
843 local_c0 = *( u64 *)(r1 + 0x18 );
844 local_c8 = *( u64 *)(r1 + 0x10 );
845 local_d0 = *( u64 *)(r1 + 8 );
848 if (r3 == local_250_u64) {
849 if (local_d0 == local_248) {
850 if (local_c8 == local_240) {
852 if (local_c0 != local_238) {
857 r0 = anchor_error_new (&local_3a0, 0x7d6 ); // Anchor error 2006 ConstraintSeeds?
858 r0 = fn_5598(&local_3b0, local_3a0, local_398, "call" , 4 ); ■ string · 4 B
861 r1 = *( u64 *)(*( u64 *)(local_638));
863 r5 = *( u64 *)(r1 + 8 );
864 r0 = *( u64 *)(r1 + 0x10 );
865 r1 = *( u64 *)(r1 + 0x18 );
867 local_b7 = local_200;
868 local_b3 = local_1fc;
875 local_a1 = local_210;
876 local_99 = local_208;
877 r0 = fn_5fca0(&local_3c0, r2, r3, &pda_2);
880 *( u64 *)(r9 + 0x10 ) = r2;
881 *( u64 *)(r9 + 8 ) = r1;
885 if (*( u8 *)(r2 + 0x29 ) == 0 ) {
886 r0 = anchor_error_new (&local_3d0, 0x7d0 ); // Anchor error 2000 ConstraintMut?
887 r0 = fn_5598(&local_3e0, local_3d0, local_3c8, "call" , 4 ); ■ string · 4 B
890 *( u64 *)(r9 + 0x10 ) = r2;
891 *( u64 *)(r9 + 8 ) = r1;
896 local_1e0 = *( u64 *)(r3 + 0x20 );
897 local_1e8 = *( u64 *)(r3 + 0x18 );
898 local_1f0 = *( u64 *)(r3 + 0x10 );
899 r2 = *( u64 *)(r3 + 8 );
901 r3 = *( u64 *)(local_618);
902 local_1d0 = *( u64 *)(r3 + 8 );
903 local_1c8 = *( u64 *)(r3 + 0x10 );
904 local_1c0 = *( u64 *)(r3 + 0x18 );
908 if (local_1f0 == local_1d0) {
909 if (local_1e8 == local_1c8) {
911 if (local_1e0 != local_1c0) {
916 r0 = custom_error_new (&local_3f0, 0x13 ); // raises error 6019 NotWriter: "Signer is not the writer"
917 r0 = fn_5598(&local_400, local_3f0, local_3e8, "call" , 4 ); ■ string · 4 B
920 local_c0 = local_1e0;
921 local_c8 = local_1e8;
922 local_d0 = local_1f0;
924 local_b8_u64 = local_1d8;
925 local_b0 = local_1d0;
926 local_a8 = local_1c8;
927 local_a0 = local_1c0;
928 r0 = fn_5fca0(&local_410, r2, r3, &pda_2);
932 *( u64 *)(r3 + 0x10 ) = r2;
933 *( u64 *)(r3 + 8 ) = r1;
937 if (*( u8 *)(local_638 + 0xb1 ) >= 2 ) {
938 r0 = custom_error_new (&local_420, 0xe ); // raises error 6014 AlreadySettled: "Call has already settled"
939 r0 = fn_5598(&local_430, local_420, local_418, "call" , 4 ); ■ string · 4 B
943 *( u64 *)(r3 + 0x10 ) = r2;
944 *( u64 *)(r3 + 8 ) = r1;
948 local_2c8 = *( u64 *)(r1 + 0x18 );
949 local_2d0 = *( u64 *)(r1 + 0x10 );
950 local_2d8 = *( u64 *)(r1 + 8 );
953 local_198 = 0x79f02 ; // .rodata+0xb02
957 r0 = sol_try_find_program_address (&local_198, 2 , local_620, &pda_2, &pda_bump); // find a PDA and its bump ■ syscall
959 pda_2 = 0x7df28 ; // &"Unable to find a viable program address bump seed"
964 r0 = fn_6f4b0(&pda_2, & Location ( "src/syscalls.rs:279:32" )); ■ string · 22 B
966 local_1a0 = local_c0;
967 local_1a8 = local_c8;
968 local_1b0 = local_d0;
970 *( u8 *)(local_630) = pda_bump;
971 r1 = *( u64 *)(local_640 + 0x20 );
973 local_c0 = *( u64 *)(r2 + 0x18 );
974 local_c8 = *( u64 *)(r2 + 0x10 );
975 local_d0 = *( u64 *)(r2 + 8 );
978 if (r2 == local_1b8) {
979 if (local_d0 == local_1b0) {
980 if (local_c8 == local_1a8) {
982 if (local_c0 != local_1a0) {
987 if (*( u8 *)(r1 + 0x29 ) == 0 ) {
988 r0 = anchor_error_new (&local_470, 0x7d0 ); // Anchor error 2000 ConstraintMut?
989 r0 = fn_5598(&local_480, local_470, local_468, "vault" , 5 ); ■ string · 5 B
993 *( u64 *)(r3 + 0x10 ) = r2;
994 *( u64 *)(r3 + 8 ) = r1;
998 r2 = *( u64 *)(*( u64 *)(local_638));
999 local_c0 = *( u64 *)(r2 + 0x18 );
1000 local_c8 = *( u64 *)(r2 + 0x10 );
⋯ ⋯ 590 more lines in this function. Download pseudocode.c for all of it.