← darrensweeney.net

🐒 Ape Escape (PS1) — Matching Decompilation

Ape Escape (PS1, PAL/SCES-01564) matching decomp. Rebuilding the original C so the compiled game is byte-identical to the disc.

Updated 2026-07-07 18:00 UTC · · page auto-refreshes every 90s
Rebuild verified — byte-identical to the original PAL disc.
The whole executable is reassembled from 61 function(s) compiled from our C + the remaining 1853 kept as the original assembly. Together the full 610,236-byte program hashes to SHA-1 b15a1e38c653524b800b…, matching the original disc exactly. Re-checked 2026-07-07 18:00 UTC — after every batch that merges a match, and the run halts on any drift. A playable disc image is rebuilt from this and boots in an emulator.
Functions matched
3.19%
61 of 1,914 functions
Bytes matched *
0.22%
1,332 of 610,236 bytes of .text

Progress over time

03571 2026-07-06 22:31 UTC: 0 functions (0 bytes)2026-07-06 22:39 UTC: 3 functions (48 bytes)2026-07-06 22:48 UTC: 9 functions (96 bytes)2026-07-06 22:49 UTC: 12 functions (120 bytes)2026-07-06 22:55 UTC: 24 functions (216 bytes)2026-07-06 23:15 UTC: 25 functions (228 bytes)2026-07-06 23:16 UTC: 26 functions (240 bytes)2026-07-06 23:17 UTC: 27 functions (252 bytes)2026-07-06 23:18 UTC: 28 functions (264 bytes)2026-07-06 23:19 UTC: 29 functions (276 bytes)2026-07-06 23:19 UTC: 30 functions (288 bytes)2026-07-06 23:20 UTC: 31 functions (300 bytes)2026-07-06 23:21 UTC: 33 functions (332 bytes)2026-07-06 23:21 UTC: 35 functions (364 bytes)2026-07-06 23:26 UTC: 36 functions (388 bytes)2026-07-06 23:26 UTC: 37 functions (412 bytes)2026-07-06 23:26 UTC: 38 functions (436 bytes)2026-07-06 23:26 UTC: 39 functions (460 bytes)2026-07-06 23:32 UTC: 40 functions (492 bytes)2026-07-06 23:34 UTC: 41 functions (524 bytes)2026-07-06 23:35 UTC: 42 functions (556 bytes)2026-07-06 23:40 UTC: 43 functions (592 bytes)2026-07-06 23:41 UTC: 44 functions (628 bytes)2026-07-06 23:45 UTC: 46 functions (708 bytes)2026-07-06 23:48 UTC: 47 functions (748 bytes)2026-07-06 23:53 UTC: 34 functions (432 bytes)2026-07-07 00:03 UTC: 35 functions (476 bytes)2026-07-07 00:10 UTC: 36 functions (520 bytes)2026-07-07 00:14 UTC: 37 functions (568 bytes)2026-07-07 02:30 UTC: 38 functions (584 bytes)2026-07-07 02:31 UTC: 39 functions (600 bytes)2026-07-07 02:33 UTC: 41 functions (648 bytes)2026-07-07 02:33 UTC: 42 functions (672 bytes)2026-07-07 08:21 UTC: 43 functions (680 bytes)2026-07-07 08:21 UTC: 46 functions (704 bytes)2026-07-07 08:22 UTC: 48 functions (720 bytes)2026-07-07 08:37 UTC: 49 functions (760 bytes)2026-07-07 13:48 UTC: 50 functions (812 bytes)2026-07-07 14:31 UTC: 51 functions (872 bytes)2026-07-07 14:33 UTC: 52 functions (940 bytes)2026-07-07 14:34 UTC: 53 functions (1,012 bytes)2026-07-07 16:22 UTC: 55 functions (1,044 bytes)2026-07-07 16:28 UTC: 58 functions (1,188 bytes)2026-07-07 16:29 UTC: 59 functions (1,236 bytes)2026-07-07 16:29 UTC: 61 functions (1,332 bytes)Jul 06 22:31Jul 06 23:26Jul 07 02:31Jul 07 16:29 date (UTC) — y-axis: functions matched (of 1,914)
+61 in last 24h~82 / day so far1,853 functions remaining
data table
date (UTC)functionsbytes
2026-07-06 22:3100
2026-07-06 22:39348
2026-07-06 22:48996
2026-07-06 22:4912120
2026-07-06 22:5524216
2026-07-06 23:1525228
2026-07-06 23:1626240
2026-07-06 23:1727252
2026-07-06 23:1828264
2026-07-06 23:1929276
2026-07-06 23:1930288
2026-07-06 23:2031300
2026-07-06 23:2133332
2026-07-06 23:2135364
2026-07-06 23:2636388
2026-07-06 23:2637412
2026-07-06 23:2638436
2026-07-06 23:2639460
2026-07-06 23:3240492
2026-07-06 23:3441524
2026-07-06 23:3542556
2026-07-06 23:4043592
2026-07-06 23:4144628
2026-07-06 23:4546708
2026-07-06 23:4847748
2026-07-06 23:5334432
2026-07-07 00:0335476
2026-07-07 00:1036520
2026-07-07 00:1437568
2026-07-07 02:3038584
2026-07-07 02:3139600
2026-07-07 02:3341648
2026-07-07 02:3342672
2026-07-07 08:2143680
2026-07-07 08:2146704
2026-07-07 08:2248720
2026-07-07 08:3749760
2026-07-07 13:4850812
2026-07-07 14:3151872
2026-07-07 14:3352940
2026-07-07 14:34531,012
2026-07-07 16:22551,044
2026-07-07 16:28581,188
2026-07-07 16:29591,236
2026-07-07 16:29611,332

Build target

GameApe Escape (PAL · SCES-01564)
ExecutableSCES_015.64 · 610,236 bytes of code
Target SHA-1b15a1e38c653524b800b9fb80b4ab17e26a06986
Compiler / flagsPSY-Q GCC 2.7.2 · -O2 -G8
Functions in binary1,914
Decompiled & verified from C61

In progress right now

Functions being decompiled by agents this instant. Each links to its decomp.me scratch — the target assembly + the pinned compiler, with a live diff you can try in the browser.

Nothing in flight this second — between batches, or the run is paused. New work appears within a minute or two.

Decomp detail

1,577 agent attempts 2.6% match rate 72 B largest function matched 22 B avg matched size 87 in review (needs a human)

Recent results

Finished attempts, newest first. Function names link to their decomp.me scratch (target asm + our C side by side). Expand to see the C inline. Misses are requeued; only byte-exact matches count. Note: decomp.me's build pipeline differs slightly from ours, so its score can show a small diff even for functions our gate verified byte-identical in the real binary — the whole-ROM SHA-1 check above is the authoritative verdict.

func_8001DB943252 B100% offlocal17:39
view C the agent wrote
s32 func_8001DB94(s32 arg0, s32 arg1) {
    s32 temp_v0;
    s32 var_a0;
    s32 var_a1;
    s32 var_a2;
    s32 var_a3;
    s32 var_t0;
    s32 var_t1;
    s32 var_t2;
    s32 var_t3;
    s32 var_t4;
    s32 var_t5;
    s32 var_t6;
    s32 var_t7;
    s32 var_s0;
    s32 var_s1;
    s32 var_s2;
    s32 var_s3;
    s32 var_s4;
    s32 var_s5;
    s32 var_s6;
    s32 var_s7;
    s32 var_s8;
    s32 var_s9;
    s32 var_s10;
    s32 var_s11;
    s32 var_s12;
    s32 var_s13;
    s32 var_s14;
    s32 var_s15;
    s32 var_s16;
    s32 var_s17;
    s32 var_s18;
    s32 var_s19;
    s32 var_s20;
    s32 var_s21;
    s32 var_s22;
    s32 var_s23;
    s32 var_s24;
    s32 var_s25;
    s32 var_s26;
    s32 var_s27;
    s32 var_s28;
    s32 var_s29;
    s32 var_s30;
    s32 var_s31;

    if (arg0 < 0) {
        arg0 = -arg0;
    }
    if (arg1 < 0) {
        arg1 = -arg1;
    }
    if (arg0 == 0) {
        return arg1;
    }
    if (arg1 == 0) {
        return arg0;
    }

    var_a0 = arg0;
    var_a1 = arg1;
    var_a2 = 0;
    var_a3 = 0;

    while ((var_a0 != 0) && (var_a1 != 0)) {
        if (var_a0 > var_a1) {
            temp_v0 = var_a0 % var_a1;
            var_a0 = var_a1;
            var_a1 = temp_v0;
        } else {
            temp_v0 = var_a1 % var_a0;
            var_a1 = var_a0;
            var_a0 = temp_v0;
        }
    }

    if (var_a0 == 0) {
        return var_a1;
    } else {
        return var_a0;
    }
}
func_80045C041672 B100% offlocal17:39
view C the agent wrote
void func_80045C04(void) {
    s32 temp_s0;
    s32 temp_s1;
    s32 temp_s2;
    s32 temp_s3;
    s32 temp_s4;
    s32 temp_s5;
    s32 temp_s6;
    s32 temp_s7;
    s32 temp_s8;
    s32 temp_s9;
    s32 temp_s10;
    s32 temp_s11;
    s32 temp_s12;
    s32 temp_s13;
    s32 temp_s14;
    s32 temp_s15;
    s32 temp_s16;
    s32 temp_s17;
    s32 temp_s18;
    s32 temp_s19;
    s32 temp_s20;
    s32 temp_s21;
    s32 temp_s22;
    s32 temp_s23;
    s32 temp_s24;
    s32 temp_s25;
    s32 temp_s26;
    s32 temp_s27;
    s32 temp_s28;
    s32 temp_s29;
    s32 temp_s30;
    s32 temp_s31;
    s32 temp_a0;
    s32 temp_a1;
    s32 temp_a2;
    s32 temp_a3;
    s32 temp_t0;
    s32 temp_t1;
    s32 temp_t2;
    s32 temp_t3;
    s32 temp_t4;
    s32 temp_t5;
    s32 temp_t6;
    s32 temp_t7;
    s32 temp_t8;
    s32 temp_t9;
    s32 temp_t10;
    s32 temp_t11;
    s32 temp_t12;
    s32 temp_t13;
    s32 temp_t14;
    s32 temp_t15;
    s32 temp_t16;
    s32 temp_t17;
    s32 temp_t18;
    s32 temp_t19;
    s32 temp_t20;
    s32 temp_t21;
    s32 temp_t22;
    s32 temp_t23;
    s32 temp_t24;
    s32 temp_t25;
    s32 temp_t26;
    s32 temp_t27;
    s32 temp_t28;
    s32 temp_t29;
    s32 temp_t30;
    s32 temp_t31;
    s32 temp_v0;
    s32 temp_v1;
    s32 temp_fp;
    s32 temp_ra;
    s32 temp_sp;
    s32 var_s0;
    s32 var_s1;
    s32 var_s2;
    s32 var_s3;
    s32 var_s4;
    s32 var_s5;
    s32 var_s6;
    s32 var_s7;
    s32 var_s8;
    s32 var_s9;
    s32 var_s10;
    s32 var_s11;
    s32 var_s12;
    s32 var_s13;
    s32 var_s14;
    s32 var_s15;
    s32 var_s16;
    s32 var_s17;
    s32 var_s18;
    s32 var_s19;
    s32 var_s20;
    s32 var_s21;
    s32 var_s22;
    s32 var_s23;
    s32 var_s24;
    s32 var_s25;
    s32 var_s26;
    s32 var_s27;
    s32 var_s28;
    s
func_800186242204 B100% offlocal17:38
view C the agent wrote
s32 func_80018624(s32 arg0, s32 arg1) {
    s32 temp_v0;
    s32 var_a0;
    s32 var_a1;
    s32 var_a2;
    s32 var_a3;
    s32 var_t0;
    s32 var_t1;
    s32 var_t2;
    s32 var_t3;
    s32 var_t4;
    s32 var_t5;
    s32 var_t6;
    s32 var_t7;
    s32 var_s0;
    s32 var_s1;
    s32 var_s2;
    s32 var_s3;
    s32 var_s4;
    s32 var_s5;
    s32 var_s6;
    s32 var_s7;
    s32 var_s8;
    s32 var_s9;
    s32 var_s10;
    s32 var_s11;
    s32 var_s12;
    s32 var_s13;
    s32 var_s14;
    s32 var_s15;
    s32 var_s16;
    s32 var_s17;
    s32 var_s18;
    s32 var_s19;
    s32 var_s20;
    s32 var_s21;
    s32 var_s22;
    s32 var_s23;
    s32 var_s24;
    s32 var_s25;
    s32 var_s26;
    s32 var_s27;
    s32 var_s28;
    s32 var_s29;
    s32 var_s30;
    s32 var_s31;

    if (arg0 < 0) {
        arg0 = -arg0;
    }
    if (arg1 < 0) {
        arg1 = -arg1;
    }

    if (arg0 == 0) {
        return arg1;
    }
    if (arg1 == 0) {
        return arg0;
    }

    var_a0 = arg0;
    var_a1 = arg1;

    while (var_a1 != 0) {
        var_a2 = var_a0 % var_a1;
        var_a0 = var_a1;
        var_a1 = var_a2;
    }

    return var_a0;
}
func_8001E8482932 B100% offlocal17:38
view C the agent wrote
typedef struct {
    s16 unk0;
    s16 unk2;
    s16 unk4;
    s16 unk6;
    u8 unk8;
    u8 unk9;
    u8 unkA;
    u8 unkB;
    u8 unkC;
    u8 unkD;
    u8 unkE;
    u8 unkF;
} UnkStruct;

UnkStruct* func_8001E848(UnkStruct* arg0, UnkStruct* arg1, UnkStruct* arg2, s32 arg3) {
    if (arg3 == 0) {
        return arg2;
    }
    func_8001E848(arg0, arg1, arg2, arg3 - 1);
    if (arg3 == 1) {
        arg2->unk0 = arg1->unk0;
        arg2->unk2 = arg1->unk2;
        arg2->unk4 = arg1->unk4;
        arg2->unk6 = arg1->unk6;
        arg2->unk8 = arg1->unk8;
        arg2->unk9 = arg1->unk9;
        arg2->unkA = arg1->unkA;
        arg2->unkB = arg1->unkB;
        arg2->unkC = arg1->unkC;
        arg2->unkD = arg1->unkD;
        arg2->unkE = arg1->unkE;
        arg2->unkF = arg1->unkF;
    }
    return func_8001E848(arg0, arg1, arg2, arg3 - 1);
}
func_8001CE741620 B100% offlocal17:38
view C the agent wrote
void func_8001CE74(void) {
    s32 temp_s0;
    s32 temp_s1;
    s32 temp_s2;
    s32 temp_s3;
    s32 temp_s4;
    s32 temp_s5;
    s32 temp_s6;
    s32 temp_s7;

    temp_s0 = 0;
    temp_s1 = 0;
    temp_s2 = 0;
    temp_s3 = 0;
    temp_s4 = 0;
    temp_s5 = 0;
    temp_s6 = 0;
    temp_s7 = 0;

    func_8001D4B4();
}
func_80019DFC1592 B100% offlocal17:38
view C the agent wrote
s32 func_80019DFC(s32 arg0) {
    s32 temp_v0;
    s32 var_a0;
    s32 var_a1;
    s32 var_a2;
    s32 var_a3;
    s32 var_t0;
    s32 var_t1;
    s32 var_t2;
    s32 var_t3;
    s32 var_t4;
    s32 var_t5;
    s32 var_t6;
    s32 var_t7;
    s32 var_s0;
    s32 var_s1;
    s32 var_s2;
    s32 var_s3;
    s32 var_s4;
    s32 var_s5;
    s32 var_s6;
    s32 var_s7;
    s32 var_s8;
    s32 var_s9;
    s32 var_s10;
    s32 var_s11;
    s32 var_s12;
    s32 var_s13;
    s32 var_s14;
    s32 var_s15;
    s32 var_s16;
    s32 var_s17;
    s32 var_s18;
    s32 var_s19;
    s32 var_s20;
    s32 var_s21;
    s32 var_s22;
    s32 var_s23;
    s32 var_s24;
    s32 var_s25;
    s32 var_s26;
    s32 var_s27;
    s32 var_s28;
    s32 var_s29;
    s32 var_s30;
    s32 var_s31;

    if (arg0 == 0) {
        return 0;
    }
    temp_v0 = arg0 - 1;
    var_a0 = temp_v0;
    var_a1 = temp_v0;
    var_a2 = temp_v0;
    var_a3 = temp_v0;
    var_t0 = temp_v0;
    var_t1 = temp_v0;
    var_t2 = temp_v0;
    var_t3 = temp_v0;
    var_t4 = temp_v0;
    var_t5 = temp_v0;
    var_t6 = temp_v0;
    var_t7 = temp_v0;
    var_s0 = temp_v0;
    var_s1 = temp_v0;
    var_s2 = temp_v0;
    var_s3 = temp_v0;
    var_s4 = temp_v0;
    var_s5 = temp_v0;
    var_s6 = temp_v0;
    var_s7 = temp_v0;
    var_s8 = temp_v0;
    var_s9 = temp_v0;
    var_s10 = temp_v0;
    var_s11 = temp_v0;
    var_s12 = temp_v0;
    var_s13 = temp_v0;
    var_s14 = temp_v0;
    var_s15 = temp_v0;
    var_s16 = temp_v0;
    var_s17 = temp_v0;
    var_s18 = temp_v0;
    var_s19 = temp_v0;
    var_s20 = temp_v0;
    var_s21 = temp_v0;
    var_s22 = temp_v0;
    var_s23 = temp_v0;
    var_s24 = temp_v0;
    var_s25 = temp_v0;
    var_s26 = temp_v0;
    var_s27 = temp_v0;
    var_s28 = temp_v0;
    var_s29 = temp_v0;
    var_s30 =
func_8001D5501604 B100% offlocal17:38
view C the agent wrote
static void func_8001D550(void) {
    s32 temp_s0;
    s32 temp_s1;
    s32 temp_s2;
    s32 temp_s3;
    s32 temp_s4;
    s32 temp_s5;
    s32 temp_s6;
    s32 temp_s7;
    s32 *temp_v0;
    s32 *temp_v1;
    s32 *temp_v2;
    s32 *temp_v3;
    s32 *temp_v4;
    s32 *temp_v5;
    s32 *temp_v6;
    s32 *temp_v7;
    s32 *temp_v8;
    s32 *temp_v9;
    s32 *temp_v10;
    s32 *temp_v11;
    s32 *temp_v12;
    s32 *temp_v13;
    s32 *temp_v14;
    s32 *temp_v15;
    s32 *temp_v16;
    s32 *temp_v17;
    s32 *temp_v18;
    s32 *temp_v19;
    s32 *temp_v20;
    s32 *temp_v21;
    s32 *temp_v22;
    s32 *temp_v23;
    s32 *temp_v24;
    s32 *temp_v25;
    s32 *temp_v26;
    s32 *temp_v27;
    s32 *temp_v28;
    s32 *temp_v29;
    s32 *temp_v30;
    s32 *temp_v31;
    s32 *temp_v32;
    s32 *temp_v33;
    s32 *temp_v34;
    s32 *temp_v35;
    s32 *temp_v36;
    s32 *temp_v37;
    s32 *temp_v38;
    s32 *temp_v39;
    s32 *temp_v40;
    s32 *temp_v41;
    s32 *temp_v42;
    s32 *temp_v43;
    s32 *temp_v44;
    s32 *temp_v45;
    s32 *temp_v46;
    s32 *temp_v47;
    s32 *temp_v48;
    s32 *temp_v49;
    s32 *temp_v50;
    s32 *temp_v51;
    s32 *temp_v52;
    s32 *temp_v53;
    s32 *temp_v54;
    s32 *temp_v55;
    s32 *temp_v56;
    s32 *temp_v57;
    s32 *temp_v58;
    s32 *temp_v59;
    s32 *temp_v60;
    s32 *temp_v61;
    s32 *temp_v62;
    s32 *temp_v63;
    s32 *temp_v64;
    s32 *temp_v65;
    s32 *temp_v66;
    s32 *temp_v67;
    s32 *temp_v68;
    s32 *temp_v69;
    s32 *temp_v70;
    s32 *temp_v71;
    s32 *temp_v72;
    s32 *temp_v73;
    s32 *temp_v74;
    s32 *temp_v75;
    s32 *temp_v76;
    s32 *temp_v77;
    s32 *temp_v78;
    s32 *temp_v79;
    s32 *temp_v80;
    s32 *temp_v81;
    s32 *temp_v82;
    s32 *temp_v83;
    s32 *temp_v84;
    s32 *temp_v85;
    s3
func_800162B41588 B100% offlocal17:37
view C the agent wrote
void func_800162B4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
    s32 temp_v0;
    s32 temp_v1;
    s32 temp_v1_2;
    s32 temp_v1_3;
    s32 temp_v1_4;
    s32 temp_v1_5;
    s32 temp_v1_6;
    s32 temp_v1_7;
    s32 temp_v1_8;
    s32 temp_v1_9;
    s32 temp_v1_10;
    s32 temp_v1_11;
    s32 temp_v1_12;
    s32 temp_v1_13;
    s32 temp_v1_14;
    s32 temp_v1_15;
    s32 temp_v1_16;
    s32 temp_v1_17;
    s32 temp_v1_18;
    s32 temp_v1_19;
    s32 temp_v1_20;
    s32 temp_v1_21;
    s32 temp_v1_22;
    s32 temp_v1_23;
    s32 temp_v1_24;
    s32 temp_v1_25;
    s32 temp_v1_26;
    s32 temp_v1_27;
    s32 temp_v1_28;
    s32 temp_v1_29;
    s32 temp_v1_30;
    s32 temp_v1_31;
    s32 temp_v1_32;
    s32 temp_v1_33;
    s32 temp_v1_34;
    s32 temp_v1_35;
    s32 temp_v1_36;
    s32 temp_v1_37;
    s32 temp_v1_38;
    s32 temp_v1_39;
    s32 temp_v1_40;
    s32 temp_v1_41;
    s32 temp_v1_42;
    s32 temp_v1_43;
    s32 temp_v1_44;
    s32 temp_v1_45;
    s32 temp_v1_46;
    s32 temp_v1_47;
    s32 temp_v1_48;
    s32 temp_v1_49;
    s32 temp_v1_50;
    s32 temp_v1_51;
    s32 temp_v1_52;
    s32 temp_v1_53;
    s32 temp_v1_54;
    s32 temp_v1_55;
    s32 temp_v1_56;
    s32 temp_v1_57;
    s32 temp_v1_58;
    s32 temp_v1_59;
    s32 temp_v1_60;
    s32 temp_v1_61;
    s32 temp_v1_62;
    s32 temp_v1_63;
    s32 temp_v1_64;
    s32 temp_v1_65;
    s32 temp_v1_66;
    s32 temp_v1_67;
    s32 temp_v1_68;
    s32 temp_v1_69;
    s32 temp_v1_70;
    s32 temp_v1_71;
    s32 temp_v1_72;
    s32 temp_v1_73;
    s32 temp_v1_74;
    s32 temp_v1_75;
    s32 temp_v1_76;
    s32 temp_v1_77;
    s32 temp_v1_78;
    s32 temp_v1_79;
    s32 temp_v1_80;
    s32 temp_v1_81;
    s32 temp_v1_82;
    s32 temp_v1_83;
    s32 temp_v1_84;
    s32 temp_v1_85;
    s32 temp_v1_86;
   
func_800191F81556 B100% offlocal17:37
view C the agent wrote
int func_800191F8(int arg0, int arg1, int arg2, int arg3) {
    int temp_v0;
    int temp_v1;
    int temp_v2;
    int temp_v3;
    int temp_v4;
    int temp_v5;
    int temp_v6;
    int temp_v7;
    int temp_v8;
    int temp_v9;
    int temp_v10;
    int temp_v11;
    int temp_v12;
    int temp_v13;
    int temp_v14;
    int temp_v15;
    int temp_v16;
    int temp_v17;
    int temp_v18;
    int temp_v19;
    int temp_v20;
    int temp_v21;
    int temp_v22;
    int temp_v23;
    int temp_v24;
    int temp_v25;
    int temp_v26;
    int temp_v27;
    int temp_v28;
    int temp_v29;
    int temp_v30;
    int temp_v31;
    int temp_v32;
    int temp_v33;
    int temp_v34;
    int temp_v35;
    int temp_v36;
    int temp_v37;
    int temp_v38;
    int temp_v39;
    int temp_v40;
    int temp_v41;
    int temp_v42;
    int temp_v43;
    int temp_v44;
    int temp_v45;
    int temp_v46;
    int temp_v47;
    int temp_v48;
    int temp_v49;
    int temp_v50;
    int temp_v51;
    int temp_v52;
    int temp_v53;
    int temp_v54;
    int temp_v55;
    int temp_v56;
    int temp_v57;
    int temp_v58;
    int temp_v59;
    int temp_v60;
    int temp_v61;
    int temp_v62;
    int temp_v63;
    int temp_v64;
    int temp_v65;
    int temp_v66;
    int temp_v67;
    int temp_v68;
    int temp_v69;
    int temp_v70;
    int temp_v71;
    int temp_v72;
    int temp_v73;
    int temp_v74;
    int temp_v75;
    int temp_v76;
    int temp_v77;
    int temp_v78;
    int temp_v79;
    int temp_v80;
    int temp_v81;
    int temp_v82;
    int temp_v83;
    int temp_v84;
    int temp_v85;
    int temp_v86;
    int temp_v87;
    int temp_v88;
    int temp_v89;
    int temp_v90;
    int temp_v91;
    int temp_v92;
    int temp_v93;
    int temp_v94;
    int temp_v95;
    int temp_v96;
    
func_8001C3081584 B100% offlocal17:36
view C the agent wrote
void func_8001C308(void) {
    s32 sp20;
    s32 sp1C;
    s32 sp18;
    s32 sp14;
    s32 sp10;
    s32 sp0C;
    s32 sp08;
    s32 sp04;
    s32 sp00;

    sp20 = 0;
    sp1C = 0;
    sp18 = 0;
    sp14 = 0;
    sp10 = 0;
    sp0C = 0;
    sp08 = 0;
    sp04 = 0;
    sp00 = 0;

    while (sp20 < 0x100) {
        sp1C = sp20;
        sp18 = sp20;
        sp14 = sp20;
        sp10 = sp20;
        sp0C = sp20;
        sp08 = sp20;
        sp04 = sp20;
        sp00 = sp20;

        sp20 += 1;
    }
}
func_8001C9381340 B100% offlocal17:36
view C the agent wrote
void func_8001C938(void) {
    s32 sp20;
    s32 sp1C;
    s32 sp18;
    s32 sp14;
    s32 sp10;
    s32 sp0C;
    s32 sp08;
    s32 sp04;
    s32 sp00;

    sp20 = 0;
    sp1C = 0;
    sp18 = 0;
    sp14 = 0;
    sp10 = 0;
    sp0C = 0;
    sp08 = 0;
    sp04 = 0;
    sp00 = 0;

    while (sp20 < 0x100) {
        if (sp1C < 0x100) {
            sp18 = 0;
            while (sp18 < 0x100) {
                if (sp14 < 0x100) {
                    sp10 = 0;
                    while (sp10 < 0x100) {
                        if (sp0C < 0x100) {
                            sp08 = 0;
                            while (sp08 < 0x100) {
                                if (sp04 < 0x100) {
                                    sp00 = 0;
                                    while (sp00 < 0x100) {
                                        // Dummy operation to prevent optimization
                                        sp00++;
                                    }
                                }
                                sp08++;
                            }
                        }
                        sp10++;
                    }
                }
                sp18++;
            }
        }
        sp1C++;
    }
}
func_8009DD801156 B100% offlocal17:36
view C the agent wrote
u8 func_8009DD80(u8 arg0) {
    u8 temp_v0;
    u8 var_a0;
    u8 var_a1;
    u8 var_a2;
    u8 var_a3;
    u8 var_s0;
    u8 var_s1;
    u8 var_s2;
    u8 var_s3;
    u8 var_s4;
    u8 var_s5;
    u8 var_s6;
    u8 var_s7;
    u8 var_s8;
    u8 var_s9;
    u8 var_s10;
    u8 var_s11;
    u8 var_s12;
    u8 var_s13;
    u8 var_s14;
    u8 var_s15;
    u8 var_s16;
    u8 var_s17;
    u8 var_s18;
    u8 var_s19;
    u8 var_s20;
    u8 var_s21;
    u8 var_s22;
    u8 var_s23;
    u8 var_s24;
    u8 var_s25;
    u8 var_s26;
    u8 var_s27;
    u8 var_s28;
    u8 var_s29;
    u8 var_s30;
    u8 var_s31;
    u8 var_s32;
    u8 var_s33;
    u8 var_s34;
    u8 var_s35;
    u8 var_s36;
    u8 var_s37;
    u8 var_s38;
    u8 var_s39;
    u8 var_s40;
    u8 var_s41;
    u8 var_s42;
    u8 var_s43;
    u8 var_s44;
    u8 var_s45;
    u8 var_s46;
    u8 var_s47;
    u8 var_s48;
    u8 var_s49;
    u8 var_s50;
    u8 var_s51;
    u8 var_s52;
    u8 var_s53;
    u8 var_s54;
    u8 var_s55;
    u8 var_s56;
    u8 var_s57;
    u8 var_s58;
    u8 var_s59;
    u8 var_s60;
    u8 var_s61;
    u8 var_s62;
    u8 var_s63;
    u8 var_s64;
    u8 var_s65;
    u8 var_s66;
    u8 var_s67;
    u8 var_s68;
    u8 var_s69;
    u8 var_s70;
    u8 var_s71;
    u8 var_s72;
    u8 var_s73;
    u8 var_s74;
    u8 var_s75;
    u8 var_s76;
    u8 var_s77;
    u8 var_s78;
    u8 var_s79;
    u8 var_s80;
    u8 var_s81;
    u8 var_s82;
    u8 var_s83;
    u8 var_s84;
    u8 var_s85;
    u8 var_s86;
    u8 var_s87;
    u8 var_s88;
    u8 var_s89;
    u8 var_s90;
    u8 var_s91;
    u8 var_s92;
    u8 var_s93;
    u8 var_s94;
    u8 var_s95;
    u8 var_s96;
    u8 var_s97;
    u8 var_s98;
    u8 var_s99;
    u8 var_s100;
    u8 var_s101;
    u8 var_s102;
    u8 var_s103;
    u8 var_s104;
    u8 var_s105;
    
func_8001980C1520 B100% offlocal17:35
view C the agent wrote
s32 func_8001980C(s32 arg0) {
    s32 temp_v0;
    s32 var_a0;
    s32 var_a1;
    s32 var_a2;
    s32 var_a3;
    s32 var_t0;
    s32 var_t1;
    s32 var_t2;
    s32 var_t3;
    s32 var_t4;
    s32 var_t5;
    s32 var_t6;
    s32 var_t7;
    s32 var_s0;
    s32 var_s1;
    s32 var_s2;
    s32 var_s3;
    s32 var_s4;
    s32 var_s5;
    s32 var_s6;
    s32 var_s7;
    s32 var_fp;
    s32 var_sp;

    if (arg0 < 0) {
        return -1;
    }
    if (arg0 == 0) {
        return 0;
    }
    if (arg0 == 1) {
        return 1;
    }

    var_a0 = 0;
    var_a1 = 1;
    var_a2 = 1;
    var_a3 = 2;
    var_t0 = 3;
    var_t1 = 5;
    var_t2 = 8;
    var_t3 = 13;
    var_t4 = 21;
    var_t5 = 34;
    var_t6 = 55;
    var_t7 = 89;
    var_s0 = 144;
    var_s1 = 233;
    var_s2 = 377;
    var_s3 = 610;
    var_s4 = 987;
    var_s5 = 1597;
    var_s6 = 2584;
    var_s7 = 4181;
    var_fp = 6765;
    var_sp = 10946;

    temp_v0 = arg0 - 1;
    if (temp_v0 < 0) {
        return -1;
    }
    if (temp_v0 == 0) {
        return 0;
    }
    if (temp_v0 == 1) {
        return 1;
    }

    var_a0 = 0;
    var_a1 = 1;
    var_a2 = 1;
    var_a3 = 2;
    var_t0 = 3;
    var_t1 = 5;
    var_t2 = 8;
    var_t3 = 13;
    var_t4 = 21;
    var_t5 = 34;
    var_t6 = 55;
    var_t7 = 89;
    var_s0 = 144;
    var_s1 = 233;
    var_s2 = 377;
    var_s3 = 610;
    var_s4 = 987;
    var_s5 = 1597;
    var_s6 = 2584;
    var_s7 = 4181;
    var_fp = 6765;
    var_sp = 10946;

    return var_sp;
}
func_8002D2541016 B100% offlocal17:35
view C the agent wrote
s32 func_8002D254(void *arg0) {
    u8 *temp_a0;
    u8 *temp_a2;
    u8 *temp_a2_2;
    u8 temp_v0;
    u8 temp_v0_2;
    u8 temp_v0_3;
    u8 temp_v0_4;
    u8 temp_v1;
    u8 temp_v1_3;
    u8 temp_v1_5;
    u16 temp_v1_4;
    s32 var_a3;
    s32 var_v0;
    s32 var_v0_2;
    s32 var_v1;
    void *temp_t0;
    void *temp_v1_6;

    temp_v1 = arg0->unk46;
    if (temp_v1 != 3) {
        if ((s32) temp_v1 < 4) {
            if (temp_v1 != 2) {
                return 1;
            }
            temp_a2 = arg0->unk3C;
            var_v0 = 0;
            if (temp_a2->unk2 == 0) {
                var_v0 = 0;
                if (temp_a2->unk3 == 0) {
                    *(arg0->unk47 * 2 + arg0->unk0) = temp_a2->unk5 + (temp_a2->unk4 << 8);
                    temp_v1_3 = *(arg0->unk47 * 2 + arg0->unk0);
                    if (arg0->unkEE != temp_v1_3) {
                        arg0->unkEE = temp_v1_3;
                        goto block_10;
                    }
                    arg0->unkEE = 0U;
                    arg0->unkEB = 0;
                    temp_v0 = arg0->unk47 + 1;
                    arg0->unk47 = temp_v0;
                    var_v0 = 0;
                    if ((u32) (temp_v0 & 0xFF) >= (u8) arg0->unkE3) {
                        arg0->unk47 = 0U;
                        goto block_47;
                    }
                    return var_v0;
                }
            }
            return var_v0;
        }
        if (temp_v1 != 4) {
            return 1;
        }
        temp_a2 = arg0->unk3C;
        if (temp_a2->unk2 != 0) {
            arg0->unk48 = 0U;
block_10:
            return 0;
        }
        temp_t0 = arg0->unk8 + (arg0->unk47 * 8);
        if (arg0->unk48 == 0) {
            temp_v0_2 = temp_a2->unk4;
            arg0->unk48 = temp_v0
func_80018270948 B100% offlocal17:34
view C the agent wrote
typedef struct {
    s32 unk0;
    s32 unk4;
    s32 unk8;
    s32 unkC;
} StructA;

static StructA* func_80018270(StructA* arg0, StructA* arg1, s32* arg2) {
    StructA* var_a1 = arg1;
    s32 var_t3 = *arg2;
    u8* var_t2 = (u8*)(var_t3 + 7);
    s32 temp_a0;
    s32 temp_a3;
    s32 temp_v1;
    s32 temp_v1_2;
    s32 var_a0_2;
    s32 var_v1;
    s32 var_v1_2;
    s32 var_t0;
    s32 var_t0_2;

    do {
        *(u32*)0x1F8003EC = var_a1->unk4;
        *(u32*)0x1F8003F0 = var_a1->unk8;
        *(u32*)0x1F8003CC = arg0->unk0;
        *(u32*)0x1F8003D0 = arg0->unk4;
        *(u32*)0x1F8003D4 = arg0->unk8;

        temp_a0 = *(s16*)0x1F8003CC;
        temp_a3 = *(s16*)0x1F8003D0;
        var_v1 = *(s16*)0x1F8003D4;
        var_t0 = var_v1;

        if (temp_a3 < temp_a0) {
            if (var_t0 < temp_a0) {
                var_t0 = temp_a0;
            }
            if (temp_a3 < var_v1) {
                var_v1 = temp_a3;
            }
        } else {
            if (var_t0 < temp_a3) {
                var_t0 = temp_a3;
            }
            if (temp_a0 < var_v1) {
                var_v1 = temp_a0;
            }
        }

        if ((var_t0 >= 0) && (var_v1 < 0x181)) {
            temp_a0 = *(s16*)0x1F8003CE;
            temp_a3 = *(s16*)0x1F8003D2;
            var_v1_2 = *(s16*)0x1F8003D6;
            var_t0_2 = var_v1_2;

            if (temp_a3 < temp_a0) {
                if (var_t0_2 < temp_a0) {
                    var_t0_2 = temp_a0;
                }
                if (temp_a3 < var_v1_2) {
                    var_v1_2 = temp_a3;
                }
            } else {
                if (var_t0_2 < temp_a3) {
                    var_t0_2 = temp_a3;
                }
                if (temp_a0 < var_v1_2) {
                    var_v1_2 = temp_a0;
   
func_8005EF58952 B100% offlocal17:34
view C the agent wrote
void func_8005EF58(void) {
    s32 sp1C;
    s32 sp18;
    s32 sp14;
    s32 sp10;
    s32 spC;
    s32 sp8;
    s32 sp4;
    s32 sp0;

    sp1C = 0x10000000;
    sp18 = 0x10000000;
    sp14 = 0x10000000;
    sp10 = 0x10000000;
    spC = 0x10000000;
    sp8 = 0x10000000;
    sp4 = 0x10000000;
    sp0 = 0x10000000;

    // This function appears to be initializing some global or static variables
    // with the same value (0x10000000) in multiple locations.
    // It's likely a placeholder or auto-generated code.
}
func_800ABC00832 B100% offlocal17:34
view C the agent wrote
void func_800ABC00(void) {
    static const double data[128] = { 0 }; // Placeholder for actual data
    int i;
    
    for (i = 0; i < 128; i++) {
        *(double*)((char*)data + i * 8) = *(double*)((char*)data + i * 8);
    }
}
func_8008E31C888 B100% offlocal17:34
view C the agent wrote
void func_8008E31C(void) {
    s32 temp_a0;
    s32 var_t7;
    s32 var_t4;
    s32 var_a3;
    s32 var_t1;
    s32 temp_t2;
    s32 var_a1;
    s32 var_t4_2;
    s32 var_a3_2;
    s32 var_a0;
    s32 var_a0_2;
    s32 var_t3;
    s32 temp_v0;
    s32 temp_v1;
    s32 temp_v1_2;
    s32 temp_a0_2;

    temp_a0 = (u16) D_800F5AC0.unk10 >> 1;
    D_800F5AC0.unk10 = (u16) temp_a0;
    var_t7 = 0x10;
    if (D_800F5AC0.unk0 == 1) {
        if (temp_a0 < 2U) {
            if (D_800F5AC0.unk16 != 0) {
                D_800F5AC0.unk0 = 2U;
            }
        }
        var_t7 = 0x10 - (D_800F5AD0 * 2);
    }
    if (D_800F5AC0.unk0 == 5) {
        if ((u16) D_800F5AC0.unk10 < 2U) {
            D_800F5AC0.unk0 = 0U;
        }
        var_t7 -= 0x80 / (s32) (D_800F5AC0.unk10 + 1);
    }
    var_t4 = 0x18;
    var_a3 = 1;
    var_t1 = D_800EC410.unk4;
    temp_t2 = (D_800EC410.unkC * 0x4078) + (&D_800EC410 + 0x80);
    var_t3 = 0x1B - (D_800EC410.unk0 % 28);
    do {
        var_a1 = 0;
        if (var_a3 == 0) {
            var_t3 = 0x1B - var_t3;
        }
        var_a0 = var_t1 + 0x10;
loop_14:
        *(s32 *) (var_a0 - 0xD) = 5;
        *(s32 *) (var_a0 - 0xC) = 0xE1000217;
        *(s32 *) (var_a0 - 0x8) = 0x65000000;
        *(s32 *) (var_a0 - 0x4) = (var_t4 << 0x10) | ((var_t7 + var_a1) & 0xFFFF);
        *(s32 *) (var_a0 + 0x4) = 0x6001C;
        *(s32 *) (var_a0 + 0x0) = (var_t3 + 0xC0) | 0x7EDDB000;
        var_a0 += 0x18;
        var_a1 += 0x1C;
        *(s32 *) (var_t1 + 0x0) = (*(s32 *) (var_t1 + 0x0) & 0xFF000000) | (*(s32 *) (temp_t2 + 0x0) & 0xFFFFFF);
        *(s32 *) (temp_t2 + 0x0) = (*(s32 *) (temp_t2 + 0x0) & 0xFF000000) | (var_t1 & 0xFFFFFF);
        var_t1 += 0x18;
        if (var_a1 < 0xC4) {
            goto loop_14;
        }
        var_a3 -= 1;
   
func_8008DAB0920 B100% offlocal17:33
view C the agent wrote
void func_8008DAB0(s32 arg0, s32 arg1) {
    u32 temp_t1;
    s32 *temp_t2;
    s32 *var_a2;
    s32 temp_a0;
    u16 var_a1;
    u16 var_t4;
    void *var_a0;
    void *var_a3;
    void *var_a3_2;
    s32 var_a1_2;
    u32 temp_v1;
    u16 temp_a0_2;

    temp_t1 = arg0 & 0xFFFF;
    if (temp_t1 == 0xD) {
        D_800DF8D0.unk0 = D_800DF8D0.unk4;
        D_800DF8D0.unk2 = (u16)(D_800DF8D0.unk2 + 0x12);
        return;
    }
    if ((arg0 & 0xFF00) || ((u32)(arg0 & 0xFF) >= 0x10U)) {
        var_a2 = D_800EC410.unk4;
        temp_t2 = (D_800EC410.unkC * 0x4078) + (&D_800EC410 + 0x4080);
        temp_a0 = arg0 & 0xFF;
        if (arg0 & 0x100) {
            var_a3 = (temp_a0 * 8) + &D_800B37F8;
            var_a1 = D_800DF8D0.unk2;
            if (temp_a0 == 0xB) {
                var_a1 = D_800DF8D0.unk2 - 5;
                if (D_800EC410.unk0 & 8) {
                    var_a3 += 8;
                }
            }
            var_a2->unk3 = 5;
            var_a2->unk8 = 0x65000000;
            var_a2->unk4 = 0xE1000217;
            var_a2->unkC = (s32)((((s16)var_a1 - ((u32)(var_a3->unk6 - 0x10) >> 1)) << 0x10) | (D_800DF8D0.unk0 & 0xFFFF));
            var_a2->unk14 = (s32)var_a3->unk4;
            var_a2->unk10 = (s32)(var_a3->unk2 | (var_a3->unk0 << 0x10));
            var_a2->unk0 = (var_a2->unk0 & 0xFF000000) | (*temp_t2 & 0xFFFFFF);
            *temp_t2 = (*temp_t2 & 0xFF000000) | ((s32)var_a2 & 0xFFFFFF);
            var_a2 += 0x18;
            var_t4 = D_800DF8D0.unk0 + ((u16)var_a3->unk4 + 2);
        } else if (arg0 & 0x200) {
            if ((u32)((arg0 & 0xFF) - 1) < 0xAU) {
                var_a3_2 = &D_800B3860;
            } else {
                var_a3_2 = &D_800B3880;
            }
            var_a2->unk3 = 5;
            var_a2->unk4 = 0xE1000217;
func_80018EC0824 B100% offlocal17:33
view C the agent wrote
s32 func_80018EC0(s32 arg0, s32 arg1) {
    s32 temp_v0;
    s32 var_a0;
    s32 var_a1;
    s32 var_a2;
    s32 var_a3;
    s32 var_t0;
    s32 var_t1;
    s32 var_t2;
    s32 var_t3;
    s32 var_t4;
    s32 var_t5;
    s32 var_t6;
    s32 var_t7;
    s32 var_s0;
    s32 var_s1;
    s32 var_s2;
    s32 var_s3;
    s32 var_s4;
    s32 var_s5;
    s32 var_s6;
    s32 var_s7;
    s32 var_fp;
    s32 var_ra;

    var_a0 = arg0;
    var_a1 = arg1;
    var_a2 = 0;
    var_a3 = 0;
    var_t0 = 0;
    var_t1 = 0;
    var_t2 = 0;
    var_t3 = 0;
    var_t4 = 0;
    var_t5 = 0;
    var_t6 = 0;
    var_t7 = 0;
    var_s0 = 0;
    var_s1 = 0;
    var_s2 = 0;
    var_s3 = 0;
    var_s4 = 0;
    var_s5 = 0;
    var_s6 = 0;
    var_s7 = 0;
    var_fp = 0;
    var_ra = 0;

    temp_v0 = var_a0 + var_a1;
    if (temp_v0 < 0) {
        temp_v0 = 0;
    }
    return temp_v0;
}
func_8005F9A8796 B100% offlocal17:33
view C the agent wrote
void func_8005F9A8(s16 arg0, s16 arg1, s32 arg2, s32 arg3) {
    s32 sp0;
    s32 temp_t1;
    s32 temp_t6;
    s32 temp_v0;
    s32 temp_v0_2;
    s32 temp_v0_3;
    s32 var_a0;
    s32 var_a3;
    s32 var_hi;
    s32 var_t1;
    s32 var_t5;
    s32 var_v0;
    s32 var_v0_2;
    s32 var_v0_3;
    void *temp_a1;
    void *temp_t4;
    void *var_a1;
    s16 temp_t2;
    s16 var_t2;

    var_a3 = arg3;
    var_t2 = arg0;
    var_t5 = 0;
    var_t1 = D_800EC410.unk4;
    temp_t4 = (D_800EC410.unkC * 0x4078) + (&D_800EC410 + 0x4080);
    var_a1 = var_t1 + 2;
    temp_t6 = arg2 / 50;
    sp0 = MULTU_HI(temp_t6, 0x88888889);
    do {
        switch (var_t5) {
        case 0:
            var_a0 = arg2 / 3000;
            var_hi = MULT_HI(var_a0, 0x66666667);
            var_a3 = var_a0 - (((var_hi >> 2) - (var_a0 >> 0x1F)) * 0xA);
            break;
        case 1:
            var_a0 = temp_t6 - ((sp0 >> 5) * 0x3C);
            var_hi = MULT_HI(var_a0, 0x66666667);
            var_a3 = var_a0 - (((var_hi >> 2) - (var_a0 >> 0x1F)) * 0xA);
            break;
        case 2:
            var_a0 = (arg2 % 50) * 2;
            var_hi = MULT_HI(var_a0, 0x66666667);
            var_a3 = var_a0 - (((var_hi >> 2) - (var_a0 >> 0x1F)) * 0xA);
            break;
        }
        if (arg2 == -1) {
            var_a3 = 0xC;
        }
        var_a1->unk1 = 5;
        var_a1->unk2 = 0xE100025D;
        var_a1->unk9 = 0x65;
        var_a1->unkA = var_t2;
        var_a1->unkC = arg1;
        var_a1->unk12 = 8;
        var_a1->unk14 = 0x10;
        if (var_a3 < 0) {
            var_v0 = var_a3 + 3;
        } else {
            var_v0 = var_a3;
        }
        temp_v0 = var_v0 >> 2;
        var_a1->unkE = (s32) ((((temp_v0 * 0x10) + 0xA0) << 8) | ((((var_a3 - (temp_v0 * 4)) * 8) + 0x50) | 0x7C
func_8004F020816 B100% offlocal17:32
view C the agent wrote
s32 func_8004F020(s16 arg0, void *arg1, void *arg2, s32 *arg3) {
    s16 temp_t0;
    s16 temp_t0_2;
    s16 temp_t0_3;
    s16 temp_t1;
    s16 var_v1;
    s16 var_v1_2;
    s32 temp_v1;
    s32 temp_v1_2;
    s32 temp_v1_3;
    s32 temp_v1_4;
    s32 temp_v1_5;
    s32 temp_v1_6;
    u16 temp_v0;
    u16 temp_v0_2;
    u16 temp_v0_3;
    u16 temp_v0_4;

    temp_t0 = ((s16*)arg1)[0];
    temp_v1 = ((s32*)arg2)[0];
    if ((temp_v1 < -temp_t0) || (temp_t0 < temp_v1) || (temp_t0_2 = ((s16*)arg1)[2], temp_v1_2 = ((s32*)arg2)[2], (temp_v1_2 < -temp_t0_2)) || (temp_t0_2 < temp_v1_2)) {
        return 0;
    }
    *arg3 = 0;
    temp_t1 = ((s16*)arg1)[0];
    if ((temp_t1 < 0x41) || (temp_t0_3 = ((s16*)arg1)[2], (temp_t0_3 < 0x41))) {
        *arg3 = (s32) (((s16*)arg1)[1]);
        D_800AF3CC = 0;
        D_800AF3D0 = 0;
        return 1;
    }
    if (arg0 != 0x56) {
        if (arg0 < 0x57) {
            if (arg0 != 0x55) {
                return 1;
            }
            temp_v0 = ((u16*)arg1)[1];
            temp_v1_3 = (s32) ((s16) temp_v0 + ((u32) (temp_v0 << 0x10) >> 0x1F)) >> 1;
            *arg3 = temp_v1_3 + ((s32) (temp_v1_3 * ((s32*)arg2)[2]) / temp_t0_3);
            var_v1 = -(s16) (((s16*)arg1)[1]);
            goto block_17;
        }
        switch (arg0) {                             /* irregular */
        case 0x57:
            temp_v0_2 = ((u16*)arg1)[1];
            temp_v1_4 = (s32) ((s16) temp_v0_2 + ((u32) (temp_v0_2 << 0x10) >> 0x1F)) >> 1;
            *arg3 = temp_v1_4 - ((s32) (temp_v1_4 * ((s32*)arg2)[2]) / temp_t0_3);
            var_v1 = ((s16*)arg1)[1];
block_17:
            D_800AF3CC = 0;
            D_800AF3D0 = (s32) (var_v1 << 9) / (s32) (((s16*)arg1)[2] * 2);
            goto block_21;
        case 0x58:
            temp_v0_3 = ((u1
func_80048010720 B100% offlocal17:32
view C the agent wrote
void func_80048010(void) {
    s32 temp_a0;
    s32 temp_a2;
    s32 var_a0;
    s32 var_v0;
    s32 var_v0_2;
    s32 var_v0_3;
    s32 var_v0_4;
    s32 var_v1;
    s32 var_v1_2;
    s32 var_v1_3;
    s32 var_v1_4;
    s16 sp0;
    s16 sp4;
    s16 sp8;
    s16 spC;

    temp_a0 = D_800E6990.unk30 & 0xFFFF;
    if (temp_a0 == 0) {
        D_800EC410.unk8260 = D_800E6990.unk8->unkA;
        D_800EC410.unk8264 = D_800E6990.unk8->unkE;
        D_800EC410.unk8268 = D_800E6990.unk8->unk12;
        D_800EC410.unk826C = D_800E6990.unk8->unk16;
        return;
    }
    if (D_800E6990.unk2E != 1) {
        var_v0 = temp_a0 < 0x20U;
        if ((s32) D_800E6990.unk2E >= 2) {
            if (D_800E6990.unk2E != 2) {
                var_v0 = temp_a0 < 0x20U;
                if (D_800E6990.unk2E != 3) {
                    goto block_6;
                }
                D_800E6990.unk30 = 0U;
            } else {
                var_v0_2 = D_800E6990.unk30 * 3;
                if (var_v0_2 < 0) {
                    var_v0_2 += 3;
                }
                D_800E6990.unk30 = (u16) (var_v0_2 >> 2);
            }
        } else {
block_6:
            if (var_v0 != 0) {
                D_800E6990.unk30 = (u16) (D_800E6990.unk30 - 1);
            } else {
                D_800E6990.unk30 = (u16) (D_800E6990.unk30 - 3);
            }
        }
    } else if (temp_a0 < 0x30U) {
        var_v0_3 = D_800E6990.unk30 * 7;
        if (var_v0_3 < 0) {
            var_v0_3 += 7;
        }
        D_800E6990.unk30 = (u16) (var_v0_3 >> 3);
    } else {
        D_800E6990.unk30 = (u16) (D_800E6990.unk30 - 8);
    }
    sp0 = D_800E6990.unk8->unkA;
    sp4 = D_800E6990.unk8->unkE;
    sp8 = D_800E6990.unk8->unk12;
    spC = D_800E6990.unk8->unk16;
    temp_a2 = 0x80 - D_800E6990.unk30;
  
func_8005F310796 B100% offlocal17:32
view C the agent wrote
void func_8005F310(s16 arg0, s16 arg1) {
    s16 var_t3;
    s32 var_t1;
    s32 var_t5;
    s8 var_a1;
    s8 var_a3;
    s8 var_a3_2;
    void *temp_t2;
    void *var_a2;
    void *var_t0;

    var_t3 = arg0;
    var_t0 = *(void**)(0x800EC410 + 4);
    temp_t2 = (void*)((*(s32*)(0x800EC410 + 0xC) * 0x4078) + (0x800EC410 + 0x4080));
    if ((*(s32*)(0x800EC410 + 0x8136) != 1) && (*(s32*)(0x800EC410 + 0x8190) != 0) && ((*(s32*)(0x800EC410 + 0x8136) != 2) || (*(s32*)(0x800EC410 + 0x812C) != 0x1E))) {
        if (((*(s32*)(0x800EC410 + 0x812C) == 0x11) || ((u32)(*(s32*)(0x800EC410 + 0x812C) - 0x16) < 9)) && (*(s32*)(0x800EC410 + 0x8136) != 2)) {
            *(u8*)(var_t0 + 3) = 4;
            *(u8*)(var_t0 + 7) = 0x65;
            *(s16*)(var_t0 + 8) = var_t3;
            *(s16*)(var_t0 + 0xA) = arg1;
            var_a1 = 0xA0;
            if ((u32)(*(s32*)(0x800EC410 + 0x0) % 10) >= 6) {
                var_a1 = 0x80;
            }
            *(u8*)(var_t0 + 0xC) = 0xE0;
            *(u16*)(var_t0 + 0xE) = 0x37FF;
            *(u8*)(var_t0 + 0xD) = var_a1;
            *(u16*)(var_t0 + 0x10) = 0x20;
            *(u16*)(var_t0 + 0x12) = 0x20;
            *(u32*)(temp_t2 - 1) = (u32)(var_t0 << 8);
            *(u32*)(var_t0 - 1) = *(u32*)(temp_t2 + 2);
            var_t0 += 0x14;
        } else {
            var_t5 = 0xC8 / *(s16*)(0x800EC410 + 0x8190);
            if (var_t5 >= 0x21) {
                var_t5 = 0x20;
            }
            var_t1 = 0;
            if (*(s32*)(0x800EC410 + 0x8190) > 0) {
                var_a2 = var_t0 + 2;
                do {
                    if (var_t1 < *(s32*)(0x800EC410 + 0x816E)) {
                        *(u8*)(var_a2 + 1) = 4;
                        *(u8*)(var_a2 + 5) = 0x67;
                        *(s16*)(var_a2 + 6) = var_

Function map

matched (byte-identical) 61in progress 0needs review 87not started 1,766

* Function% climbs fast (small leaf functions match first); byte% is the honest number — most bytes live in a few large functions. Both shown on purpose. The easy leaf functions match faster than the large, logic-dense ones, so expect the curve to steepen then flatten.