diff --git a/asm/non_matchings/audio/effects/func_800BE5E0.s b/asm/non_matchings/audio/effects/func_800BE5E0.s index 46af5dfef..3a7995fc7 100644 --- a/asm/non_matchings/audio/effects/func_800BE5E0.s +++ b/asm/non_matchings/audio/effects/func_800BE5E0.s @@ -5,9 +5,9 @@ glabel func_800BE5E0 /* 0BF1EC 800BE5EC 1020009D */ beqz $at, .L800BE864 /* 0BF1F0 800BE5F0 00602825 */ move $a1, $v1 /* 0BF1F4 800BE5F4 00037080 */ sll $t6, $v1, 2 -/* 0BF1F8 800BE5F8 3C01800F */ lui $at, %hi(D_800F2EE0) +/* 0BF1F8 800BE5F8 3C01800F */ lui $at, %hi(jpt_800F2EE0) /* 0BF1FC 800BE5FC 002E0821 */ addu $at, $at, $t6 -/* 0BF200 800BE600 8C2E2EE0 */ lw $t6, %lo(D_800F2EE0)($at) +/* 0BF200 800BE600 8C2E2EE0 */ lw $t6, %lo(jpt_800F2EE0)($at) /* 0BF204 800BE604 01C00008 */ jr $t6 /* 0BF208 800BE608 00000000 */ nop glabel L800BE60C diff --git a/asm/non_matchings/audio/external/func_800C19D0.s b/asm/non_matchings/audio/external/func_800C19D0.s index 09cfd53d7..8d56ee743 100644 --- a/asm/non_matchings/audio/external/func_800C19D0.s +++ b/asm/non_matchings/audio/external/func_800C19D0.s @@ -19,9 +19,9 @@ glabel func_800C19D0 /* 0C2614 800C1A14 10200035 */ beqz $at, .L800C1AEC /* 0C2618 800C1A18 E7A00034 */ swc1 $f0, 0x34($sp) /* 0C261C 800C1A1C 000EC080 */ sll $t8, $t6, 2 -/* 0C2620 800C1A20 3C01800F */ lui $at, %hi(D_800F35C4) +/* 0C2620 800C1A20 3C01800F */ lui $at, %hi(jpt_800F35C4) /* 0C2624 800C1A24 00380821 */ addu $at, $at, $t8 -/* 0C2628 800C1A28 8C3835C4 */ lw $t8, %lo(D_800F35C4)($at) +/* 0C2628 800C1A28 8C3835C4 */ lw $t8, %lo(jpt_800F35C4)($at) /* 0C262C 800C1A2C 03000008 */ jr $t8 /* 0C2630 800C1A30 00000000 */ nop glabel L800C1A34 diff --git a/asm/non_matchings/audio/external/func_800C2A2C.s b/asm/non_matchings/audio/external/func_800C2A2C.s index 24d9974a3..51bcdd389 100644 --- a/asm/non_matchings/audio/external/func_800C2A2C.s +++ b/asm/non_matchings/audio/external/func_800C2A2C.s @@ -15,9 +15,9 @@ glabel func_800C2A2C /* 0C3660 800C2A60 10200273 */ beqz $at, .L800C3430 /* 0C3664 800C2A64 31C500FF */ andi $a1, $t6, 0xff /* 0C3668 800C2A68 0018C080 */ sll $t8, $t8, 2 -/* 0C366C 800C2A6C 3C01800F */ lui $at, %hi(D_800F35EC) +/* 0C366C 800C2A6C 3C01800F */ lui $at, %hi(jpt_800F35EC) /* 0C3670 800C2A70 00380821 */ addu $at, $at, $t8 -/* 0C3674 800C2A74 8C3835EC */ lw $t8, %lo(D_800F35EC)($at) +/* 0C3674 800C2A74 8C3835EC */ lw $t8, %lo(jpt_800F35EC)($at) /* 0C3678 800C2A78 03000008 */ jr $t8 /* 0C367C 800C2A7C 00000000 */ nop glabel L800C2A80 diff --git a/asm/non_matchings/audio/external/func_800C3724.s b/asm/non_matchings/audio/external/func_800C3724.s index 0d5ce4ab6..9e2029142 100644 --- a/asm/non_matchings/audio/external/func_800C3724.s +++ b/asm/non_matchings/audio/external/func_800C3724.s @@ -470,9 +470,9 @@ glabel func_800C3724 /* 0C49CC 800C3DCC 1020004F */ beqz $at, .L800C3F0C /* 0C49D0 800C3DD0 01403025 */ move $a2, $t2 /* 0C49D4 800C3DD4 000D5880 */ sll $t3, $t5, 2 -/* 0C49D8 800C3DD8 3C01800F */ lui $at, %hi(D_800F362C) +/* 0C49D8 800C3DD8 3C01800F */ lui $at, %hi(jpt_800F362C) /* 0C49DC 800C3DDC 002B0821 */ addu $at, $at, $t3 -/* 0C49E0 800C3DE0 8C2B362C */ lw $t3, %lo(D_800F362C)($at) +/* 0C49E0 800C3DE0 8C2B362C */ lw $t3, %lo(jpt_800F362C)($at) /* 0C49E4 800C3DE4 01600008 */ jr $t3 /* 0C49E8 800C3DE8 00000000 */ nop glabel L800C3DEC diff --git a/asm/non_matchings/audio/external/func_800C41CC.s b/asm/non_matchings/audio/external/func_800C41CC.s index 3d8d9b05a..036f82d28 100644 --- a/asm/non_matchings/audio/external/func_800C41CC.s +++ b/asm/non_matchings/audio/external/func_800C41CC.s @@ -23,9 +23,9 @@ glabel func_800C41CC /* 0C4E1C 800C421C 1020004C */ beqz $at, .L800C4350 /* 0C4E20 800C4220 00001825 */ move $v1, $zero /* 0C4E24 800C4224 0005C080 */ sll $t8, $a1, 2 -/* 0C4E28 800C4228 3C01800F */ lui $at, %hi(D_800F364C) +/* 0C4E28 800C4228 3C01800F */ lui $at, %hi(jpt_800F364C) /* 0C4E2C 800C422C 00380821 */ addu $at, $at, $t8 -/* 0C4E30 800C4230 8C38364C */ lw $t8, %lo(D_800F364C)($at) +/* 0C4E30 800C4230 8C38364C */ lw $t8, %lo(jpt_800F364C)($at) /* 0C4E34 800C4234 03000008 */ jr $t8 /* 0C4E38 800C4238 00000000 */ nop glabel L800C423C diff --git a/asm/non_matchings/audio/external/func_800C64A0.s b/asm/non_matchings/audio/external/func_800C64A0.s index b5bf8184e..e75dcd1c8 100644 --- a/asm/non_matchings/audio/external/func_800C64A0.s +++ b/asm/non_matchings/audio/external/func_800C64A0.s @@ -11,9 +11,9 @@ glabel func_800C64A0 /* 0C70C4 800C64C4 2F01001F */ sltiu $at, $t8, 0x1f /* 0C70C8 800C64C8 10200053 */ beqz $at, .L800C6618 /* 0C70CC 800C64CC 0018C080 */ sll $t8, $t8, 2 -/* 0C70D0 800C64D0 3C01800F */ lui $at, %hi(D_800F3694) +/* 0C70D0 800C64D0 3C01800F */ lui $at, %hi(jpt_800F3694) /* 0C70D4 800C64D4 00380821 */ addu $at, $at, $t8 -/* 0C70D8 800C64D8 8C383694 */ lw $t8, %lo(D_800F3694)($at) +/* 0C70D8 800C64D8 8C383694 */ lw $t8, %lo(jpt_800F3694)($at) /* 0C70DC 800C64DC 03000008 */ jr $t8 /* 0C70E0 800C64E0 00000000 */ nop glabel L800C64E4 diff --git a/asm/non_matchings/audio/external/func_800C683C.s b/asm/non_matchings/audio/external/func_800C683C.s index c45bd0f77..a5f5cc375 100644 --- a/asm/non_matchings/audio/external/func_800C683C.s +++ b/asm/non_matchings/audio/external/func_800C683C.s @@ -47,9 +47,9 @@ glabel func_800C683C /* 0C74F0 800C68F0 2DE1001F */ sltiu $at, $t7, 0x1f /* 0C74F4 800C68F4 102001DE */ beqz $at, .L800C7070 /* 0C74F8 800C68F8 000F7880 */ sll $t7, $t7, 2 -/* 0C74FC 800C68FC 3C01800F */ lui $at, %hi(D_800F373C) +/* 0C74FC 800C68FC 3C01800F */ lui $at, %hi(jpt_800F373C) /* 0C7500 800C6900 002F0821 */ addu $at, $at, $t7 -/* 0C7504 800C6904 8C2F373C */ lw $t7, %lo(D_800F373C)($at) +/* 0C7504 800C6904 8C2F373C */ lw $t7, %lo(jpt_800F373C)($at) /* 0C7508 800C6908 01E00008 */ jr $t7 /* 0C750C 800C690C 00000000 */ nop glabel L800C6910 diff --git a/asm/non_matchings/audio/external/func_800C70A8.s b/asm/non_matchings/audio/external/func_800C70A8.s index a483f07c3..ce8eb0cd2 100644 --- a/asm/non_matchings/audio/external/func_800C70A8.s +++ b/asm/non_matchings/audio/external/func_800C70A8.s @@ -52,9 +52,9 @@ glabel func_800C70A8 /* 0C7D6C 800C716C 10200021 */ beqz $at, .L800C71F4 /* 0C7D70 800C7170 30890010 */ andi $t1, $a0, 0x10 /* 0C7D74 800C7174 0018C080 */ sll $t8, $t8, 2 -/* 0C7D78 800C7178 3C01800F */ lui $at, %hi(D_800F37BC) +/* 0C7D78 800C7178 3C01800F */ lui $at, %hi(jpt_800F37BC) /* 0C7D7C 800C717C 00380821 */ addu $at, $at, $t8 -/* 0C7D80 800C7180 8C3837BC */ lw $t8, %lo(D_800F37BC)($at) +/* 0C7D80 800C7180 8C3837BC */ lw $t8, %lo(jpt_800F37BC)($at) /* 0C7D84 800C7184 03000008 */ jr $t8 /* 0C7D88 800C7188 00000000 */ nop glabel L800C718C @@ -106,9 +106,9 @@ glabel L800C71F4 /* 0C7E18 800C7218 1020001E */ beqz $at, .L800C7294 /* 0C7E1C 800C721C AC590000 */ sw $t9, ($v0) /* 0C7E20 800C7220 000B5880 */ sll $t3, $t3, 2 -/* 0C7E24 800C7224 3C01800F */ lui $at, %hi(D_800F37FC) +/* 0C7E24 800C7224 3C01800F */ lui $at, %hi(jpt_800F37FC) /* 0C7E28 800C7228 002B0821 */ addu $at, $at, $t3 -/* 0C7E2C 800C722C 8C2B37FC */ lw $t3, %lo(D_800F37FC)($at) +/* 0C7E2C 800C722C 8C2B37FC */ lw $t3, %lo(jpt_800F37FC)($at) /* 0C7E30 800C7230 01600008 */ jr $t3 /* 0C7E34 800C7234 00000000 */ nop glabel L800C7238 @@ -149,9 +149,9 @@ glabel L800C7294 /* 0C7E98 800C7298 2D81000B */ sltiu $at, $t4, 0xb /* 0C7E9C 800C729C 10200063 */ beqz $at, .L800C742C /* 0C7EA0 800C72A0 000C6080 */ sll $t4, $t4, 2 -/* 0C7EA4 800C72A4 3C01800F */ lui $at, %hi(D_800F383C) +/* 0C7EA4 800C72A4 3C01800F */ lui $at, %hi(jpt_800F383C) /* 0C7EA8 800C72A8 002C0821 */ addu $at, $at, $t4 -/* 0C7EAC 800C72AC 8C2C383C */ lw $t4, %lo(D_800F383C)($at) +/* 0C7EAC 800C72AC 8C2C383C */ lw $t4, %lo(jpt_800F383C)($at) /* 0C7EB0 800C72B0 01800008 */ jr $t4 /* 0C7EB4 800C72B4 00000000 */ nop glabel L800C72B8 @@ -273,9 +273,9 @@ glabel L800C742C /* 0C8034 800C7434 2D61000B */ sltiu $at, $t3, 0xb /* 0C8038 800C7438 10200063 */ beqz $at, .L800C75C8 /* 0C803C 800C743C 000B5880 */ sll $t3, $t3, 2 -/* 0C8040 800C7440 3C01800F */ lui $at, %hi(D_800F3868) +/* 0C8040 800C7440 3C01800F */ lui $at, %hi(jpt_800F3868) /* 0C8044 800C7444 002B0821 */ addu $at, $at, $t3 -/* 0C8048 800C7448 8C2B3868 */ lw $t3, %lo(D_800F3868)($at) +/* 0C8048 800C7448 8C2B3868 */ lw $t3, %lo(jpt_800F3868)($at) /* 0C804C 800C744C 01600008 */ jr $t3 /* 0C8050 800C7450 00000000 */ nop glabel L800C7454 diff --git a/asm/non_matchings/audio/external/func_800C94A4.s b/asm/non_matchings/audio/external/func_800C94A4.s index b396afe8e..0ced5d014 100644 --- a/asm/non_matchings/audio/external/func_800C94A4.s +++ b/asm/non_matchings/audio/external/func_800C94A4.s @@ -42,9 +42,9 @@ glabel func_800C94A4 /* 0CA140 800C9540 2C610008 */ sltiu $at, $v1, 8 /* 0CA144 800C9544 10200078 */ beqz $at, .L800C9728 /* 0CA148 800C9548 00035080 */ sll $t2, $v1, 2 -/* 0CA14C 800C954C 3C01800F */ lui $at, %hi(D_800F38B8) +/* 0CA14C 800C954C 3C01800F */ lui $at, %hi(jpt_800F38B8) /* 0CA150 800C9550 002A0821 */ addu $at, $at, $t2 -/* 0CA154 800C9554 8C2A38B8 */ lw $t2, %lo(D_800F38B8)($at) +/* 0CA154 800C9554 8C2A38B8 */ lw $t2, %lo(jpt_800F38B8)($at) /* 0CA158 800C9558 01400008 */ jr $t2 /* 0CA15C 800C955C 00000000 */ nop glabel L800C9560 diff --git a/asm/non_matchings/audio/external/func_800C9A88.s b/asm/non_matchings/audio/external/func_800C9A88.s index 05fc7f822..526227d68 100644 --- a/asm/non_matchings/audio/external/func_800C9A88.s +++ b/asm/non_matchings/audio/external/func_800C9A88.s @@ -40,9 +40,9 @@ glabel func_800C9A88 /* 0CA71C 800C9B1C 2D010008 */ sltiu $at, $t0, 8 /* 0CA720 800C9B20 1020003C */ beqz $at, .L800C9C14 /* 0CA724 800C9B24 00084080 */ sll $t0, $t0, 2 -/* 0CA728 800C9B28 3C01800F */ lui $at, %hi(D_800F3960) +/* 0CA728 800C9B28 3C01800F */ lui $at, %hi(jpt_800F3960) /* 0CA72C 800C9B2C 00280821 */ addu $at, $at, $t0 -/* 0CA730 800C9B30 8C283960 */ lw $t0, %lo(D_800F3960)($at) +/* 0CA730 800C9B30 8C283960 */ lw $t0, %lo(jpt_800F3960)($at) /* 0CA734 800C9B34 01000008 */ jr $t0 /* 0CA738 800C9B38 00000000 */ nop glabel L800C9B3C diff --git a/asm/non_matchings/audio/heap/func_800BA00C.s b/asm/non_matchings/audio/heap/func_800BA00C.s index 207a20d75..d30b4c1a2 100644 --- a/asm/non_matchings/audio/heap/func_800BA00C.s +++ b/asm/non_matchings/audio/heap/func_800BA00C.s @@ -11,9 +11,9 @@ glabel func_800BA00C /* 0BAC30 800BA030 1020007A */ beqz $at, .L800BA21C /* 0BAC34 800BA034 AFB00018 */ sw $s0, 0x18($sp) /* 0BAC38 800BA038 000F7880 */ sll $t7, $t7, 2 -/* 0BAC3C 800BA03C 3C01800F */ lui $at, %hi(D_800F2E84) +/* 0BAC3C 800BA03C 3C01800F */ lui $at, %hi(jpt_800F2E84) /* 0BAC40 800BA040 002F0821 */ addu $at, $at, $t7 -/* 0BAC44 800BA044 8C2F2E84 */ lw $t7, %lo(D_800F2E84)($at) +/* 0BAC44 800BA044 8C2F2E84 */ lw $t7, %lo(jpt_800F2E84)($at) /* 0BAC48 800BA048 01E00008 */ jr $t7 /* 0BAC4C 800BA04C 00000000 */ nop glabel L800BA050 diff --git a/asm/non_matchings/audio/port_eu/func_800CBCB0.s b/asm/non_matchings/audio/port_eu/func_800CBCB0.s index 7171a04db..f9450087b 100644 --- a/asm/non_matchings/audio/port_eu/func_800CBCB0.s +++ b/asm/non_matchings/audio/port_eu/func_800CBCB0.s @@ -110,9 +110,9 @@ glabel func_800CBCB0 /* 0CCA40 800CBE40 2D010008 */ sltiu $at, $t0, 8 /* 0CCA44 800CBE44 10200030 */ beqz $at, .L800CBF08 /* 0CCA48 800CBE48 00084080 */ sll $t0, $t0, 2 -/* 0CCA4C 800CBE4C 3C01800F */ lui $at, %hi(D_800F39C0) +/* 0CCA4C 800CBE4C 3C01800F */ lui $at, %hi(jpt_800F39C0) /* 0CCA50 800CBE50 00280821 */ addu $at, $at, $t0 -/* 0CCA54 800CBE54 8C2839C0 */ lw $t0, %lo(D_800F39C0)($at) +/* 0CCA54 800CBE54 8C2839C0 */ lw $t0, %lo(jpt_800F39C0)($at) /* 0CCA58 800CBE58 01000008 */ jr $t0 /* 0CCA5C 800CBE5C 00000000 */ nop glabel L800CBE60 diff --git a/asm/non_matchings/audio/seqplayer/func_800BF190.s b/asm/non_matchings/audio/seqplayer/func_800BF190.s index 555d652e0..f633efac5 100644 --- a/asm/non_matchings/audio/seqplayer/func_800BF190.s +++ b/asm/non_matchings/audio/seqplayer/func_800BF190.s @@ -71,18 +71,18 @@ glabel func_800BF190 /* 0BFE90 800BF290 2D41000C */ sltiu $at, $t2, 0xc /* 0BFE94 800BF294 102000DA */ beqz $at, .L800BF600 /* 0BFE98 800BF298 000A5080 */ sll $t2, $t2, 2 -/* 0BFE9C 800BF29C 3C01800F */ lui $at, %hi(D_800F2F10) +/* 0BFE9C 800BF29C 3C01800F */ lui $at, %hi(jpt_800F2F10) /* 0BFEA0 800BF2A0 002A0821 */ addu $at, $at, $t2 -/* 0BFEA4 800BF2A4 8C2A2F10 */ lw $t2, %lo(D_800F2F10)($at) +/* 0BFEA4 800BF2A4 8C2A2F10 */ lw $t2, %lo(jpt_800F2F10)($at) /* 0BFEA8 800BF2A8 01400008 */ jr $t2 /* 0BFEAC 800BF2AC 00000000 */ nop .L800BF2B0: /* 0BFEB0 800BF2B0 2D61000C */ sltiu $at, $t3, 0xc /* 0BFEB4 800BF2B4 102000D2 */ beqz $at, .L800BF600 /* 0BFEB8 800BF2B8 000B5880 */ sll $t3, $t3, 2 -/* 0BFEBC 800BF2BC 3C01800F */ lui $at, %hi(D_800F2F40) +/* 0BFEBC 800BF2BC 3C01800F */ lui $at, %hi(jpt_800F2F40) /* 0BFEC0 800BF2C0 002B0821 */ addu $at, $at, $t3 -/* 0BFEC4 800BF2C4 8C2B2F40 */ lw $t3, %lo(D_800F2F40)($at) +/* 0BFEC4 800BF2C4 8C2B2F40 */ lw $t3, %lo(jpt_800F2F40)($at) /* 0BFEC8 800BF2C8 01600008 */ jr $t3 /* 0BFECC 800BF2CC 00000000 */ nop glabel L800BF2D0 @@ -605,9 +605,9 @@ glabel L800BF600 /* 0C0600 800BFA00 46004302 */ mul.s $f12, $f8, $f0 /* 0C0604 800BFA04 10200008 */ beqz $at, .L800BFA28 /* 0C0608 800BFA08 000E7080 */ sll $t6, $t6, 2 -/* 0C060C 800BFA0C 3C01800F */ lui $at, %hi(D_800F2F7C) +/* 0C060C 800BFA0C 3C01800F */ lui $at, %hi(jpt_800F2F7C) /* 0C0610 800BFA10 002E0821 */ addu $at, $at, $t6 -/* 0C0614 800BFA14 8C2E2F7C */ lw $t6, %lo(D_800F2F7C)($at) +/* 0C0614 800BFA14 8C2E2F7C */ lw $t6, %lo(jpt_800F2F7C)($at) /* 0C0618 800BFA18 01C00008 */ jr $t6 /* 0C061C 800BFA1C 00000000 */ nop glabel L800BFA20 diff --git a/asm/non_matchings/audio/seqplayer/func_800BFD90.s b/asm/non_matchings/audio/seqplayer/func_800BFD90.s index 705ee20ad..79632084e 100644 --- a/asm/non_matchings/audio/seqplayer/func_800BFD90.s +++ b/asm/non_matchings/audio/seqplayer/func_800BFD90.s @@ -60,9 +60,9 @@ glabel L800BFE40 /* 0C0A5C 800BFE5C 2DC1003F */ sltiu $at, $t6, 0x3f /* 0C0A60 800BFE60 1020FFF7 */ beqz $at, .L800BFE40 /* 0C0A64 800BFE64 000E7080 */ sll $t6, $t6, 2 -/* 0C0A68 800BFE68 3C01800F */ lui $at, %hi(D_800F2F90) +/* 0C0A68 800BFE68 3C01800F */ lui $at, %hi(jpt_800F2F90) /* 0C0A6C 800BFE6C 002E0821 */ addu $at, $at, $t6 -/* 0C0A70 800BFE70 8C2E2F90 */ lw $t6, %lo(D_800F2F90)($at) +/* 0C0A70 800BFE70 8C2E2F90 */ lw $t6, %lo(jpt_800F2F90)($at) /* 0C0A74 800BFE74 01C00008 */ jr $t6 /* 0C0A78 800BFE78 00000000 */ nop glabel L800BFE7C @@ -633,9 +633,9 @@ glabel L800C0640 /* 0C1264 800C0664 1020FDF6 */ beqz $at, .L800BFE40 /* 0C1268 800C0668 308800FF */ andi $t0, $a0, 0xff /* 0C126C 800C066C 000E7080 */ sll $t6, $t6, 2 -/* 0C1270 800C0670 3C01800F */ lui $at, %hi(D_800F308C) +/* 0C1270 800C0670 3C01800F */ lui $at, %hi(jpt_800F308C) /* 0C1274 800C0674 002E0821 */ addu $at, $at, $t6 -/* 0C1278 800C0678 8C2E308C */ lw $t6, %lo(D_800F308C)($at) +/* 0C1278 800C0678 8C2E308C */ lw $t6, %lo(jpt_800F308C)($at) /* 0C127C 800C067C 01C00008 */ jr $t6 /* 0C1280 800C0680 00000000 */ nop glabel L800C0684 diff --git a/asm/non_matchings/audio/seqplayer/func_800C08CC.s b/asm/non_matchings/audio/seqplayer/func_800C08CC.s index 1654d194e..d10db391c 100644 --- a/asm/non_matchings/audio/seqplayer/func_800C08CC.s +++ b/asm/non_matchings/audio/seqplayer/func_800C08CC.s @@ -187,9 +187,9 @@ glabel L800C0AE8 /* 0C1770 800C0B70 2D810038 */ sltiu $at, $t4, 0x38 /* 0C1774 800C0B74 1020FFDC */ beqz $at, .L800C0AE8 /* 0C1778 800C0B78 000C6080 */ sll $t4, $t4, 2 -/* 0C177C 800C0B7C 3C01800F */ lui $at, %hi(D_800F3350) +/* 0C177C 800C0B7C 3C01800F */ lui $at, %hi(jpt_800F3350) /* 0C1780 800C0B80 002C0821 */ addu $at, $at, $t4 -/* 0C1784 800C0B84 8C2C3350 */ lw $t4, %lo(D_800F3350)($at) +/* 0C1784 800C0B84 8C2C3350 */ lw $t4, %lo(jpt_800F3350)($at) /* 0C1788 800C0B88 01800008 */ jr $t4 /* 0C178C 800C0B8C 00000000 */ nop glabel L800C0B90 @@ -524,9 +524,9 @@ glabel L800C0FF4 /* 0C1C18 800C1018 2D810061 */ sltiu $at, $t4, 0x61 /* 0C1C1C 800C101C 1020FEB2 */ beqz $at, .L800C0AE8 /* 0C1C20 800C1020 000C6080 */ sll $t4, $t4, 2 -/* 0C1C24 800C1024 3C01800F */ lui $at, %hi(D_800F3430) +/* 0C1C24 800C1024 3C01800F */ lui $at, %hi(jpt_800F3430) /* 0C1C28 800C1028 002C0821 */ addu $at, $at, $t4 -/* 0C1C2C 800C102C 8C2C3430 */ lw $t4, %lo(D_800F3430)($at) +/* 0C1C2C 800C102C 8C2C3430 */ lw $t4, %lo(jpt_800F3430)($at) /* 0C1C30 800C1030 01800008 */ jr $t4 /* 0C1C34 800C1034 00000000 */ nop .L800C1038: diff --git a/asm/non_matchings/code_80005FD0/func_8000DF8C.s b/asm/non_matchings/code_80005FD0/func_8000DF8C.s index 226f0fb1f..b81787b60 100644 --- a/asm/non_matchings/code_80005FD0/func_8000DF8C.s +++ b/asm/non_matchings/code_80005FD0/func_8000DF8C.s @@ -156,9 +156,9 @@ glabel func_8000DF8C /* 00EDD4 8000E1D4 2D410005 */ sltiu $at, $t2, 5 /* 00EDD8 8000E1D8 10200231 */ beqz $at, .L8000EAA0 /* 00EDDC 8000E1DC 000A5080 */ sll $t2, $t2, 2 -/* 00EDE0 8000E1E0 3C01800F */ lui $at, %hi(D_800ED008) +/* 00EDE0 8000E1E0 3C01800F */ lui $at, %hi(jpt_800ED008) /* 00EDE4 8000E1E4 002A0821 */ addu $at, $at, $t2 -/* 00EDE8 8000E1E8 8C2AD008 */ lw $t2, %lo(D_800ED008)($at) +/* 00EDE8 8000E1E8 8C2AD008 */ lw $t2, %lo(jpt_800ED008)($at) /* 00EDEC 8000E1EC 01400008 */ jr $t2 /* 00EDF0 8000E1F0 00000000 */ nop glabel L8000E1F4 diff --git a/asm/non_matchings/code_80005FD0/func_80011B14.s b/asm/non_matchings/code_80005FD0/func_80011B14.s index 12cb3934e..d1addbcb9 100644 --- a/asm/non_matchings/code_80005FD0/func_80011B14.s +++ b/asm/non_matchings/code_80005FD0/func_80011B14.s @@ -49,9 +49,9 @@ glabel func_80011B14 /* 0127C8 80011BC8 1020005B */ beqz $at, .L80011D38 /* 0127CC 80011BCC A4F90000 */ sh $t9, ($a3) /* 0127D0 80011BD0 000E7080 */ sll $t6, $t6, 2 -/* 0127D4 80011BD4 3C01800F */ lui $at, %hi(D_800ED080) +/* 0127D4 80011BD4 3C01800F */ lui $at, %hi(jpt_800ED080) /* 0127D8 80011BD8 002E0821 */ addu $at, $at, $t6 -/* 0127DC 80011BDC 8C2ED080 */ lw $t6, %lo(D_800ED080)($at) +/* 0127DC 80011BDC 8C2ED080 */ lw $t6, %lo(jpt_800ED080)($at) /* 0127E0 80011BE0 01C00008 */ jr $t6 /* 0127E4 80011BE4 00000000 */ nop glabel L80011BE8 diff --git a/asm/non_matchings/code_80005FD0/func_80011D48.s b/asm/non_matchings/code_80005FD0/func_80011D48.s index 07b08bdc3..b81b221a0 100644 --- a/asm/non_matchings/code_80005FD0/func_80011D48.s +++ b/asm/non_matchings/code_80005FD0/func_80011D48.s @@ -25,9 +25,9 @@ glabel func_80011D48 /* 0129A4 80011DA4 2D81000B */ sltiu $at, $t4, 0xb /* 0129A8 80011DA8 10200021 */ beqz $at, .L80011E30 /* 0129AC 80011DAC 000C6080 */ sll $t4, $t4, 2 -/* 0129B0 80011DB0 3C01800F */ lui $at, %hi(D_800ED0B4) +/* 0129B0 80011DB0 3C01800F */ lui $at, %hi(jpt_800ED0B4) /* 0129B4 80011DB4 002C0821 */ addu $at, $at, $t4 -/* 0129B8 80011DB8 8C2CD0B4 */ lw $t4, %lo(D_800ED0B4)($at) +/* 0129B8 80011DB8 8C2CD0B4 */ lw $t4, %lo(jpt_800ED0B4)($at) /* 0129BC 80011DBC 01800008 */ jr $t4 /* 0129C0 80011DC0 00000000 */ nop glabel L80011DC4 diff --git a/asm/non_matchings/code_80005FD0/func_80019890.s b/asm/non_matchings/code_80005FD0/func_80019890.s index e613a16af..43456d140 100644 --- a/asm/non_matchings/code_80005FD0/func_80019890.s +++ b/asm/non_matchings/code_80005FD0/func_80019890.s @@ -32,9 +32,9 @@ glabel func_80019890 /* 01A508 80019908 10200077 */ beqz $at, .L80019AE8 /* 01A50C 8001990C 963145B0 */ lhu $s1, %lo(D_801645B0)($s1) # 0x45b0($s1) /* 01A510 80019910 000D6880 */ sll $t5, $t5, 2 -/* 01A514 80019914 3C01800F */ lui $at, %hi(D_800ED328) +/* 01A514 80019914 3C01800F */ lui $at, %hi(jpt_800ED328) /* 01A518 80019918 002D0821 */ addu $at, $at, $t5 -/* 01A51C 8001991C 8C2DD328 */ lw $t5, %lo(D_800ED328)($at) +/* 01A51C 8001991C 8C2DD328 */ lw $t5, %lo(jpt_800ED328)($at) /* 01A520 80019920 01A00008 */ jr $t5 /* 01A524 80019924 00000000 */ nop glabel L80019928 diff --git a/asm/non_matchings/code_80005FD0/func_8001A220.s b/asm/non_matchings/code_80005FD0/func_8001A220.s index cc5db343c..65045060c 100644 --- a/asm/non_matchings/code_80005FD0/func_8001A220.s +++ b/asm/non_matchings/code_80005FD0/func_8001A220.s @@ -9,9 +9,9 @@ glabel func_8001A220 /* 01AE3C 8001A23C 1020002B */ beqz $at, .L8001A2EC /* 01AE40 8001A240 8FA5001C */ lw $a1, 0x1c($sp) /* 01AE44 8001A244 00027080 */ sll $t6, $v0, 2 -/* 01AE48 8001A248 3C01800F */ lui $at, %hi(D_800ED36C) # 0x800f +/* 01AE48 8001A248 3C01800F */ lui $at, %hi(jpt_800ED36C) # 0x800f /* 01AE4C 8001A24C 002E0821 */ addu $at, $at, $t6 -/* 01AE50 8001A250 8C2ED36C */ lw $t6, %lo(D_800ED36C)($at) # -0x2c94($at) +/* 01AE50 8001A250 8C2ED36C */ lw $t6, %lo(jpt_800ED36C)($at) # -0x2c94($at) /* 01AE54 8001A254 01C00008 */ jr $t6 /* 01AE58 8001A258 00000000 */ nop glabel L8001A25C diff --git a/asm/non_matchings/code_80005FD0/func_8001A588.s b/asm/non_matchings/code_80005FD0/func_8001A588.s index c6e8ec80a..107caf63b 100644 --- a/asm/non_matchings/code_80005FD0/func_8001A588.s +++ b/asm/non_matchings/code_80005FD0/func_8001A588.s @@ -276,9 +276,9 @@ glabel func_8001A588 /* 01B578 8001A978 2D610011 */ sltiu $at, $t3, 0x11 /* 01B57C 8001A97C 10200042 */ beqz $at, .L8001AA88 /* 01B580 8001A980 000B5880 */ sll $t3, $t3, 2 -/* 01B584 8001A984 3C01800F */ lui $at, %hi(D_800ED384) # 0x800f +/* 01B584 8001A984 3C01800F */ lui $at, %hi(jpt_800ED384) # 0x800f /* 01B588 8001A988 002B0821 */ addu $at, $at, $t3 -/* 01B58C 8001A98C 8C2BD384 */ lw $t3, %lo(D_800ED384)($at) # -0x2c7c($at) +/* 01B58C 8001A98C 8C2BD384 */ lw $t3, %lo(jpt_800ED384)($at) # -0x2c7c($at) /* 01B590 8001A990 01600008 */ jr $t3 /* 01B594 8001A994 00000000 */ nop glabel L8001A998 diff --git a/asm/non_matchings/code_80005FD0/func_8001AB74.s b/asm/non_matchings/code_80005FD0/func_8001AB74.s index 78525e923..cd3574c2a 100644 --- a/asm/non_matchings/code_80005FD0/func_8001AB74.s +++ b/asm/non_matchings/code_80005FD0/func_8001AB74.s @@ -5,9 +5,9 @@ glabel func_8001AB74 /* 01B780 8001AB80 10200012 */ beqz $at, .L8001ABCC /* 01B784 8001AB84 2402FFFF */ li $v0, -1 /* 01B788 8001AB88 000E7080 */ sll $t6, $t6, 2 -/* 01B78C 8001AB8C 3C01800F */ lui $at, %hi(D_800ED3C8) # 0x800f +/* 01B78C 8001AB8C 3C01800F */ lui $at, %hi(jpt_800ED3C8) # 0x800f /* 01B790 8001AB90 002E0821 */ addu $at, $at, $t6 -/* 01B794 8001AB94 8C2ED3C8 */ lw $t6, %lo(D_800ED3C8)($at) # -0x2c38($at) +/* 01B794 8001AB94 8C2ED3C8 */ lw $t6, %lo(jpt_800ED3C8)($at) # -0x2c38($at) /* 01B798 8001AB98 01C00008 */ jr $t6 /* 01B79C 8001AB9C 00000000 */ nop glabel L8001ABA0 diff --git a/asm/non_matchings/code_80005FD0/func_8001AC10.s b/asm/non_matchings/code_80005FD0/func_8001AC10.s index f670c53a2..30492e1bc 100644 --- a/asm/non_matchings/code_80005FD0/func_8001AC10.s +++ b/asm/non_matchings/code_80005FD0/func_8001AC10.s @@ -33,9 +33,9 @@ glabel func_8001AC10 /* 01B88C 8001AC8C 2CA10025 */ sltiu $at, $a1, 0x25 /* 01B890 8001AC90 10200467 */ beqz $at, .L8001BE30 /* 01B894 8001AC94 00056080 */ sll $t4, $a1, 2 -/* 01B898 8001AC98 3C01800F */ lui $at, %hi(D_800ED404) # 0x800f +/* 01B898 8001AC98 3C01800F */ lui $at, %hi(jpt_800ED404) # 0x800f /* 01B89C 8001AC9C 002C0821 */ addu $at, $at, $t4 -/* 01B8A0 8001ACA0 8C2CD404 */ lw $t4, %lo(D_800ED404)($at) # -0x2bfc($at) +/* 01B8A0 8001ACA0 8C2CD404 */ lw $t4, %lo(jpt_800ED404)($at) # -0x2bfc($at) /* 01B8A4 8001ACA4 01800008 */ jr $t4 /* 01B8A8 8001ACA8 00000000 */ nop glabel L8001ACAC @@ -912,9 +912,9 @@ glabel L8001B90C /* 01C550 8001B950 000B5900 */ sll $t3, $t3, 4 /* 01C554 8001B954 10200023 */ beqz $at, .L8001B9E4 /* 01C558 8001B958 016C3821 */ addu $a3, $t3, $t4 -/* 01C55C 8001B95C 3C01800F */ lui $at, %hi(D_800ED4A0) +/* 01C55C 8001B95C 3C01800F */ lui $at, %hi(jpt_800ED4A0) /* 01C560 8001B960 002D0821 */ addu $at, $at, $t5 -/* 01C564 8001B964 8C2DD4A0 */ lw $t5, %lo(D_800ED4A0)($at) +/* 01C564 8001B964 8C2DD4A0 */ lw $t5, %lo(jpt_800ED4A0)($at) /* 01C568 8001B968 01A00008 */ jr $t5 /* 01C56C 8001B96C 00000000 */ nop glabel L8001B970 diff --git a/asm/non_matchings/code_8001C4D0/func_8001C4D0.s b/asm/non_matchings/code_8001C4D0/func_8001C4D0.s index 71cd07682..086706950 100644 --- a/asm/non_matchings/code_8001C4D0/func_8001C4D0.s +++ b/asm/non_matchings/code_8001C4D0/func_8001C4D0.s @@ -15,9 +15,9 @@ glabel func_8001C4D0 /* 01D104 8001C504 10200131 */ beqz $at, .L8001C9CC /* 01D108 8001C508 01C03025 */ move $a2, $t6 /* 01D10C 8001C50C 00047880 */ sll $t7, $a0, 2 -/* 01D110 8001C510 3C01800F */ lui $at, %hi(D_800ED4E0) +/* 01D110 8001C510 3C01800F */ lui $at, %hi(jpt_800ED4E0) /* 01D114 8001C514 002F0821 */ addu $at, $at, $t7 -/* 01D118 8001C518 8C2FD4E0 */ lw $t7, %lo(D_800ED4E0)($at) +/* 01D118 8001C518 8C2FD4E0 */ lw $t7, %lo(jpt_800ED4E0)($at) /* 01D11C 8001C51C 01E00008 */ jr $t7 /* 01D120 8001C520 00000000 */ nop glabel L8001C524 diff --git a/asm/non_matchings/code_8001C4D0/func_8001F394.s b/asm/non_matchings/code_8001C4D0/func_8001F394.s index 414885989..62364cb8c 100644 --- a/asm/non_matchings/code_8001C4D0/func_8001F394.s +++ b/asm/non_matchings/code_8001C4D0/func_8001F394.s @@ -88,9 +88,9 @@ glabel func_8001F394 /* 0200C0 8001F4C0 102000A6 */ beqz $at, .L8001F75C /* 0200C4 8001F4C4 3C050010 */ lui $a1, 0x10 /* 0200C8 8001F4C8 0018C080 */ sll $t8, $t8, 2 -/* 0200CC 8001F4CC 3C01800F */ lui $at, %hi(D_800ED5D8) +/* 0200CC 8001F4CC 3C01800F */ lui $at, %hi(jpt_800ED5D8) /* 0200D0 8001F4D0 00380821 */ addu $at, $at, $t8 -/* 0200D4 8001F4D4 8C38D5D8 */ lw $t8, %lo(D_800ED5D8)($at) +/* 0200D4 8001F4D4 8C38D5D8 */ lw $t8, %lo(jpt_800ED5D8)($at) /* 0200D8 8001F4D8 03000008 */ jr $t8 /* 0200DC 8001F4DC 00000000 */ nop glabel L8001F4E0 diff --git a/asm/non_matchings/code_80027D00/func_80027EDC.s b/asm/non_matchings/code_80027D00/func_80027EDC.s index b27b3fab8..a8ae73462 100644 --- a/asm/non_matchings/code_80027D00/func_80027EDC.s +++ b/asm/non_matchings/code_80027D00/func_80027EDC.s @@ -17,9 +17,9 @@ glabel func_80027EDC /* 028B18 80027F18 2F210013 */ sltiu $at, $t9, 0x13 /* 028B1C 80027F1C 1020024D */ beqz $at, .L80028854 /* 028B20 80027F20 0019C880 */ sll $t9, $t9, 2 -/* 028B24 80027F24 3C01800F */ lui $at, %hi(D_800ED6F0) +/* 028B24 80027F24 3C01800F */ lui $at, %hi(jpt_800ED6F0) /* 028B28 80027F28 00390821 */ addu $at, $at, $t9 -/* 028B2C 80027F2C 8C39D6F0 */ lw $t9, %lo(D_800ED6F0)($at) +/* 028B2C 80027F2C 8C39D6F0 */ lw $t9, %lo(jpt_800ED6F0)($at) /* 028B30 80027F30 03200008 */ jr $t9 /* 028B34 80027F34 00000000 */ nop glabel L80027F38 @@ -363,9 +363,9 @@ glabel L800282E4 /* 029004 80028404 2DA10013 */ sltiu $at, $t5, 0x13 /* 029008 80028408 10200112 */ beqz $at, .L80028854 /* 02900C 8002840C 000D6880 */ sll $t5, $t5, 2 -/* 029010 80028410 3C01800F */ lui $at, %hi(D_800ED73C) # 0x800f +/* 029010 80028410 3C01800F */ lui $at, %hi(jpt_800ED73C) # 0x800f /* 029014 80028414 002D0821 */ addu $at, $at, $t5 -/* 029018 80028418 8C2DD73C */ lw $t5, %lo(D_800ED73C)($at) # -0x28c4($at) +/* 029018 80028418 8C2DD73C */ lw $t5, %lo(jpt_800ED73C)($at) # -0x28c4($at) /* 02901C 8002841C 01A00008 */ jr $t5 /* 029020 80028420 00000000 */ nop glabel L80028424 diff --git a/asm/non_matchings/code_800393C0/func_8003C0F0.s b/asm/non_matchings/code_800393C0/func_8003C0F0.s index 89622cf7e..4001bad69 100644 --- a/asm/non_matchings/code_800393C0/func_8003C0F0.s +++ b/asm/non_matchings/code_800393C0/func_8003C0F0.s @@ -9,9 +9,9 @@ glabel func_8003C0F0 /* 03CD0C 8003C10C 2C610014 */ sltiu $at, $v1, 0x14 /* 03CD10 8003C110 1020002C */ beqz $at, .L8003C1C4 /* 03CD14 8003C114 00037080 */ sll $t6, $v1, 2 -/* 03CD18 8003C118 3C01800F */ lui $at, %hi(D_800EDE60) +/* 03CD18 8003C118 3C01800F */ lui $at, %hi(jpt_800EDE60) /* 03CD1C 8003C11C 002E0821 */ addu $at, $at, $t6 -/* 03CD20 8003C120 8C2EDE60 */ lw $t6, %lo(D_800EDE60)($at) +/* 03CD20 8003C120 8C2EDE60 */ lw $t6, %lo(jpt_800EDE60)($at) /* 03CD24 8003C124 01C00008 */ jr $t6 /* 03CD28 8003C128 00000000 */ nop glabel L8003C12C @@ -62,9 +62,9 @@ glabel L8003C1B4 /* 03CDD0 8003C1D0 10200236 */ beqz $at, .L8003CAAC /* 03CDD4 8003C1D4 87A9005A */ lh $t1, 0x5a($sp) /* 03CDD8 8003C1D8 00035880 */ sll $t3, $v1, 2 -/* 03CDDC 8003C1DC 3C01800F */ lui $at, %hi(D_800EDE80) +/* 03CDDC 8003C1DC 3C01800F */ lui $at, %hi(jpt_800EDE80) /* 03CDE0 8003C1E0 002B0821 */ addu $at, $at, $t3 -/* 03CDE4 8003C1E4 8C2BDEB0 */ lw $t3, %lo(D_800EDE80)($at) +/* 03CDE4 8003C1E4 8C2BDEB0 */ lw $t3, %lo(jpt_800EDE80)($at) /* 03CDE8 8003C1E8 01600008 */ jr $t3 /* 03CDEC 8003C1EC 00000000 */ nop glabel L8003C1F0 diff --git a/asm/non_matchings/code_8003DC40/func_8003F46C.s b/asm/non_matchings/code_8003DC40/func_8003F46C.s index eebfac25c..93f724b36 100644 --- a/asm/non_matchings/code_8003DC40/func_8003F46C.s +++ b/asm/non_matchings/code_8003DC40/func_8003F46C.s @@ -71,9 +71,9 @@ glabel func_8003F46C /* 04017C 8003F57C 2F210013 */ sltiu $at, $t9, 0x13 /* 040180 8003F580 10200054 */ beqz $at, .L8003F6D4 /* 040184 8003F584 0019C880 */ sll $t9, $t9, 2 -/* 040188 8003F588 3C01800F */ lui $at, %hi(D_800EDF8C) +/* 040188 8003F588 3C01800F */ lui $at, %hi(jpt_800EDF8C) /* 04018C 8003F58C 00390821 */ addu $at, $at, $t9 -/* 040190 8003F590 8C39DF8C */ lw $t9, %lo(D_800EDF8C)($at) +/* 040190 8003F590 8C39DF8C */ lw $t9, %lo(jpt_800EDF8C)($at) /* 040194 8003F594 03200008 */ jr $t9 /* 040198 8003F598 00000000 */ nop glabel L8003F59C diff --git a/asm/non_matchings/code_800431B0/func_800508C0.s b/asm/non_matchings/code_800431B0/func_800508C0.s index bb8916374..0437cab53 100644 --- a/asm/non_matchings/code_800431B0/func_800508C0.s +++ b/asm/non_matchings/code_800431B0/func_800508C0.s @@ -119,9 +119,9 @@ glabel func_800508C0 .L80050A6C: /* 05166C 80050A6C 10200078 */ beqz $at, .L80050C50 /* 051670 80050A70 000A5080 */ sll $t2, $t2, 2 -/* 051674 80050A74 3C01800F */ lui $at, %hi(D_800EE050) +/* 051674 80050A74 3C01800F */ lui $at, %hi(jpt_800EE050) /* 051678 80050A78 002A0821 */ addu $at, $at, $t2 -/* 05167C 80050A7C 8C2AE050 */ lw $t2, %lo(D_800EE050)($at) +/* 05167C 80050A7C 8C2AE050 */ lw $t2, %lo(jpt_800EE050)($at) /* 051680 80050A80 01400008 */ jr $t2 /* 051684 80050A84 00000000 */ nop glabel L80050A88 diff --git a/asm/non_matchings/code_800431B0/func_800534E8.s b/asm/non_matchings/code_800431B0/func_800534E8.s index d3b390e74..f010ff51b 100644 --- a/asm/non_matchings/code_800431B0/func_800534E8.s +++ b/asm/non_matchings/code_800431B0/func_800534E8.s @@ -8,9 +8,9 @@ glabel func_800534E8 /* 054100 80053500 2DE10005 */ sltiu $at, $t7, 5 /* 054104 80053504 1020006E */ beqz $at, .L800536C0 /* 054108 80053508 000F7880 */ sll $t7, $t7, 2 -/* 05410C 8005350C 3C01800F */ lui $at, %hi(D_800EE068) +/* 05410C 8005350C 3C01800F */ lui $at, %hi(jpt_800EE068) /* 054110 80053510 002F0821 */ addu $at, $at, $t7 -/* 054114 80053514 8C2FE068 */ lw $t7, %lo(D_800EE068)($at) +/* 054114 80053514 8C2FE068 */ lw $t7, %lo(jpt_800EE068)($at) /* 054118 80053518 01E00008 */ jr $t7 /* 05411C 8005351C 00000000 */ nop glabel L80053520 diff --git a/asm/non_matchings/code_80057C60/func_80057CE4.s b/asm/non_matchings/code_80057C60/func_80057CE4.s index e7da8da32..c2c96ebb9 100644 --- a/asm/non_matchings/code_80057C60/func_80057CE4.s +++ b/asm/non_matchings/code_80057C60/func_80057CE4.s @@ -6,9 +6,9 @@ glabel func_80057CE4 /* 0588F4 80057CF4 2DC1000C */ sltiu $at, $t6, 0xc /* 0588F8 80057CF8 10200031 */ beqz $at, .L80057DC0 /* 0588FC 80057CFC 000E7080 */ sll $t6, $t6, 2 -/* 058900 80057D00 3C01800F */ lui $at, %hi(D_800EE090) +/* 058900 80057D00 3C01800F */ lui $at, %hi(jpt_800EE090) /* 058904 80057D04 002E0821 */ addu $at, $at, $t6 -/* 058908 80057D08 8C2EE090 */ lw $t6, %lo(D_800EE090)($at) +/* 058908 80057D08 8C2EE090 */ lw $t6, %lo(jpt_800EE090)($at) /* 05890C 80057D0C 01C00008 */ jr $t6 /* 058910 80057D10 00000000 */ nop glabel L80057D14 diff --git a/asm/non_matchings/code_80057C60/func_80057FC4.s b/asm/non_matchings/code_80057C60/func_80057FC4.s index 4fa7e7333..7988ac011 100644 --- a/asm/non_matchings/code_80057C60/func_80057FC4.s +++ b/asm/non_matchings/code_80057C60/func_80057FC4.s @@ -23,9 +23,9 @@ glabel func_80057FC4 /* 058C18 80058018 2D210005 */ sltiu $at, $t1, 5 /* 058C1C 8005801C 10200018 */ beqz $at, .L80058080 /* 058C20 80058020 00094880 */ sll $t1, $t1, 2 -/* 058C24 80058024 3C01800F */ lui $at, %hi(D_800EE0C0) +/* 058C24 80058024 3C01800F */ lui $at, %hi(jpt_800EE0C0) /* 058C28 80058028 00290821 */ addu $at, $at, $t1 -/* 058C2C 8005802C 8C29E0C0 */ lw $t1, %lo(D_800EE0C0)($at) +/* 058C2C 8005802C 8C29E0C0 */ lw $t1, %lo(jpt_800EE0C0)($at) /* 058C30 80058030 01200008 */ jr $t1 /* 058C34 80058034 00000000 */ nop glabel L80058038 diff --git a/asm/non_matchings/code_80057C60/func_80058090.s b/asm/non_matchings/code_80057C60/func_80058090.s index 4a1fcb365..2f4a02065 100644 --- a/asm/non_matchings/code_80057C60/func_80058090.s +++ b/asm/non_matchings/code_80057C60/func_80058090.s @@ -22,9 +22,9 @@ glabel func_80058090 /* 058CE0 800580E0 8FBF0014 */ lw $ra, 0x14($sp) /* 058CE4 800580E4 10200034 */ beqz $at, .L800581B8 /* 058CE8 800580E8 00054880 */ sll $t1, $a1, 2 -/* 058CEC 800580EC 3C01800F */ lui $at, %hi(D_800EE0D4) +/* 058CEC 800580EC 3C01800F */ lui $at, %hi(jpt_800EE0D4) /* 058CF0 800580F0 00290821 */ addu $at, $at, $t1 -/* 058CF4 800580F4 8C29E0D4 */ lw $t1, %lo(D_800EE0D4)($at) +/* 058CF4 800580F4 8C29E0D4 */ lw $t1, %lo(jpt_800EE0D4)($at) /* 058CF8 800580F8 01200008 */ jr $t1 /* 058CFC 800580FC 00000000 */ nop glabel L80058100 diff --git a/asm/non_matchings/code_80057C60/func_80058538.s b/asm/non_matchings/code_80057C60/func_80058538.s index 2d8cecca8..d12c05d72 100644 --- a/asm/non_matchings/code_80057C60/func_80058538.s +++ b/asm/non_matchings/code_80057C60/func_80058538.s @@ -22,9 +22,9 @@ glabel func_80058538 /* 059188 80058588 8FBF0014 */ lw $ra, 0x14($sp) /* 05918C 8005858C 10200028 */ beqz $at, .L80058630 /* 059190 80058590 00054880 */ sll $t1, $a1, 2 -/* 059194 80058594 3C01800F */ lui $at, %hi(D_800EE104) +/* 059194 80058594 3C01800F */ lui $at, %hi(jpt_800EE104) /* 059198 80058598 00290821 */ addu $at, $at, $t1 -/* 05919C 8005859C 8C29E104 */ lw $t1, %lo(D_800EE104)($at) +/* 05919C 8005859C 8C29E104 */ lw $t1, %lo(jpt_800EE104)($at) /* 0591A0 800585A0 01200008 */ jr $t1 /* 0591A4 800585A4 00000000 */ nop glabel L800585A8 diff --git a/asm/non_matchings/code_80057C60/func_800588F4.s b/asm/non_matchings/code_80057C60/func_800588F4.s index aaf87e122..1c18cb4f4 100644 --- a/asm/non_matchings/code_80057C60/func_800588F4.s +++ b/asm/non_matchings/code_80057C60/func_800588F4.s @@ -8,9 +8,9 @@ glabel func_800588F4 /* 05950C 8005890C 1020007C */ beqz $at, .L80058B00 /* 059510 80058910 AFBF001C */ sw $ra, 0x1c($sp) /* 059514 80058914 000E7080 */ sll $t6, $t6, 2 -/* 059518 80058918 3C01800F */ lui $at, %hi(D_800EE134) +/* 059518 80058918 3C01800F */ lui $at, %hi(jpt_800EE134) /* 05951C 8005891C 002E0821 */ addu $at, $at, $t6 -/* 059520 80058920 8C2EE134 */ lw $t6, %lo(D_800EE134)($at) +/* 059520 80058920 8C2EE134 */ lw $t6, %lo(jpt_800EE134)($at) /* 059524 80058924 01C00008 */ jr $t6 /* 059528 80058928 00000000 */ nop glabel L8005892C diff --git a/asm/non_matchings/code_80057C60/func_80058C20.s b/asm/non_matchings/code_80057C60/func_80058C20.s index da3ddd2d7..e22941bd6 100644 --- a/asm/non_matchings/code_80057C60/func_80058C20.s +++ b/asm/non_matchings/code_80057C60/func_80058C20.s @@ -20,9 +20,9 @@ glabel func_80058C20 /* 059868 80058C68 8FBF0014 */ lw $ra, 0x14($sp) /* 05986C 80058C6C 1020004D */ beqz $at, .L80058DA4 /* 059870 80058C70 00044080 */ sll $t0, $a0, 2 -/* 059874 80058C74 3C01800F */ lui $at, %hi(D_800EE180) +/* 059874 80058C74 3C01800F */ lui $at, %hi(jpt_800EE180) /* 059878 80058C78 00280821 */ addu $at, $at, $t0 -/* 05987C 80058C7C 8C28E180 */ lw $t0, %lo(D_800EE180)($at) +/* 05987C 80058C7C 8C28E180 */ lw $t0, %lo(jpt_800EE180)($at) /* 059880 80058C80 01000008 */ jr $t0 /* 059884 80058C84 00000000 */ nop glabel L80058C88 diff --git a/asm/non_matchings/code_80057C60/func_80058DB4.s b/asm/non_matchings/code_80057C60/func_80058DB4.s index c8487c744..0fd8db208 100644 --- a/asm/non_matchings/code_80057C60/func_80058DB4.s +++ b/asm/non_matchings/code_80057C60/func_80058DB4.s @@ -20,9 +20,9 @@ glabel func_80058DB4 /* 0599FC 80058DFC 8FBF0014 */ lw $ra, 0x14($sp) /* 059A00 80058E00 1020004D */ beqz $at, .L80058F38 /* 059A04 80058E04 00044080 */ sll $t0, $a0, 2 -/* 059A08 80058E08 3C01800F */ lui $at, %hi(D_800EE1B0) +/* 059A08 80058E08 3C01800F */ lui $at, %hi(jpt_800EE1B0) /* 059A0C 80058E0C 00280821 */ addu $at, $at, $t0 -/* 059A10 80058E10 8C28E1B0 */ lw $t0, %lo(D_800EE1B0)($at) +/* 059A10 80058E10 8C28E1B0 */ lw $t0, %lo(jpt_800EE1B0)($at) /* 059A14 80058E14 01000008 */ jr $t0 /* 059A18 80058E18 00000000 */ nop glabel L80058E1C diff --git a/asm/non_matchings/code_80057C60/func_8005A74C.s b/asm/non_matchings/code_80057C60/func_8005A74C.s index a75b971ee..c64f893b7 100644 --- a/asm/non_matchings/code_80057C60/func_8005A74C.s +++ b/asm/non_matchings/code_80057C60/func_8005A74C.s @@ -6,9 +6,9 @@ glabel func_8005A74C /* 05B35C 8005A75C 2DC10013 */ sltiu $at, $t6, 0x13 /* 05B360 8005A760 1020007B */ beqz $at, .L8005A950 /* 05B364 8005A764 000E7080 */ sll $t6, $t6, 2 -/* 05B368 8005A768 3C01800F */ lui $at, %hi(D_800EE1E4) +/* 05B368 8005A768 3C01800F */ lui $at, %hi(jpt_800EE1E4) /* 05B36C 8005A76C 002E0821 */ addu $at, $at, $t6 -/* 05B370 8005A770 8C2EE1E4 */ lw $t6, %lo(D_800EE1E4)($at) +/* 05B370 8005A770 8C2EE1E4 */ lw $t6, %lo(jpt_800EE1E4)($at) /* 05B374 8005A774 01C00008 */ jr $t6 /* 05B378 8005A778 00000000 */ nop glabel L8005A77C diff --git a/asm/non_matchings/code_80057C60/func_8005AB60.s b/asm/non_matchings/code_80057C60/func_8005AB60.s index a1734b5e4..70aac68a2 100644 --- a/asm/non_matchings/code_80057C60/func_8005AB60.s +++ b/asm/non_matchings/code_80057C60/func_8005AB60.s @@ -8,9 +8,9 @@ glabel func_8005AB60 /* 05B778 8005AB78 2DC10009 */ sltiu $at, $t6, 9 /* 05B77C 8005AB7C 10200079 */ beqz $at, .L8005AD64 /* 05B780 8005AB80 000E7080 */ sll $t6, $t6, 2 -/* 05B784 8005AB84 3C01800F */ lui $at, %hi(D_800EE230) +/* 05B784 8005AB84 3C01800F */ lui $at, %hi(jpt_800EE230) /* 05B788 8005AB88 002E0821 */ addu $at, $at, $t6 -/* 05B78C 8005AB8C 8C2EE230 */ lw $t6, %lo(D_800EE230)($at) +/* 05B78C 8005AB8C 8C2EE230 */ lw $t6, %lo(jpt_800EE230)($at) /* 05B790 8005AB90 01C00008 */ jr $t6 /* 05B794 8005AB94 00000000 */ nop glabel L8005AB98 @@ -173,9 +173,9 @@ glabel L8005AD64 /* 05B9D4 8005ADD4 2F010009 */ sltiu $at, $t8, 9 /* 05B9D8 8005ADD8 10200054 */ beqz $at, .L8005AF2C /* 05B9DC 8005ADDC 0018C080 */ sll $t8, $t8, 2 -/* 05B9E0 8005ADE0 3C01800F */ lui $at, %hi(D_800EE254) +/* 05B9E0 8005ADE0 3C01800F */ lui $at, %hi(jpt_800EE254) /* 05B9E4 8005ADE4 00380821 */ addu $at, $at, $t8 -/* 05B9E8 8005ADE8 8C38E254 */ lw $t8, %lo(D_800EE254)($at) +/* 05B9E8 8005ADE8 8C38E254 */ lw $t8, %lo(jpt_800EE254)($at) /* 05B9EC 8005ADEC 03000008 */ jr $t8 /* 05B9F0 8005ADF0 00000000 */ nop glabel L8005ADF4 @@ -271,9 +271,9 @@ glabel L8005AF2C /* 05BB30 8005AF30 2D610009 */ sltiu $at, $t3, 9 /* 05BB34 8005AF34 10200054 */ beqz $at, .L8005B088 /* 05BB38 8005AF38 000B5880 */ sll $t3, $t3, 2 -/* 05BB3C 8005AF3C 3C01800F */ lui $at, %hi(D_800EE278) +/* 05BB3C 8005AF3C 3C01800F */ lui $at, %hi(jpt_800EE278) /* 05BB40 8005AF40 002B0821 */ addu $at, $at, $t3 -/* 05BB44 8005AF44 8C2BE278 */ lw $t3, %lo(D_800EE278)($at) +/* 05BB44 8005AF44 8C2BE278 */ lw $t3, %lo(jpt_800EE278)($at) /* 05BB48 8005AF48 01600008 */ jr $t3 /* 05BB4C 8005AF4C 00000000 */ nop glabel L8005AF50 @@ -369,9 +369,9 @@ glabel L8005B088 /* 05BC8C 8005B08C 2F010009 */ sltiu $at, $t8, 9 /* 05BC90 8005B090 10200054 */ beqz $at, .L8005B1E4 /* 05BC94 8005B094 0018C080 */ sll $t8, $t8, 2 -/* 05BC98 8005B098 3C01800F */ lui $at, %hi(D_800EE29C) +/* 05BC98 8005B098 3C01800F */ lui $at, %hi(jpt_800EE29C) /* 05BC9C 8005B09C 00380821 */ addu $at, $at, $t8 -/* 05BCA0 8005B0A0 8C38E29C */ lw $t8, %lo(D_800EE29C)($at) +/* 05BCA0 8005B0A0 8C38E29C */ lw $t8, %lo(jpt_800EE29C)($at) /* 05BCA4 8005B0A4 03000008 */ jr $t8 /* 05BCA8 8005B0A8 00000000 */ nop glabel L8005B0AC @@ -481,9 +481,9 @@ glabel L8005B1E4 /* 05BE20 8005B220 2DE10009 */ sltiu $at, $t7, 9 /* 05BE24 8005B224 10200054 */ beqz $at, .L8005B378 /* 05BE28 8005B228 000F7880 */ sll $t7, $t7, 2 -/* 05BE2C 8005B22C 3C01800F */ lui $at, %hi(D_800EE2C0) +/* 05BE2C 8005B22C 3C01800F */ lui $at, %hi(jpt_800EE2C0) /* 05BE30 8005B230 002F0821 */ addu $at, $at, $t7 -/* 05BE34 8005B234 8C2FE2C0 */ lw $t7, %lo(D_800EE2C0)($at) +/* 05BE34 8005B234 8C2FE2C0 */ lw $t7, %lo(jpt_800EE2C0)($at) /* 05BE38 8005B238 01E00008 */ jr $t7 /* 05BE3C 8005B23C 00000000 */ nop glabel L8005B240 @@ -579,9 +579,9 @@ glabel L8005B378 /* 05BF7C 8005B37C 2D410009 */ sltiu $at, $t2, 9 /* 05BF80 8005B380 10200054 */ beqz $at, .L8005B4D4 /* 05BF84 8005B384 000A5080 */ sll $t2, $t2, 2 -/* 05BF88 8005B388 3C01800F */ lui $at, %hi(D_800EE2E4) +/* 05BF88 8005B388 3C01800F */ lui $at, %hi(jpt_800EE2E4) /* 05BF8C 8005B38C 002A0821 */ addu $at, $at, $t2 -/* 05BF90 8005B390 8C2AE2E4 */ lw $t2, %lo(D_800EE2E4)($at) +/* 05BF90 8005B390 8C2AE2E4 */ lw $t2, %lo(jpt_800EE2E4)($at) /* 05BF94 8005B394 01400008 */ jr $t2 /* 05BF98 8005B398 00000000 */ nop glabel L8005B39C @@ -677,9 +677,9 @@ glabel L8005B4D4 /* 05C0D8 8005B4D8 2DE10009 */ sltiu $at, $t7, 9 /* 05C0DC 8005B4DC 10200054 */ beqz $at, .L8005B630 /* 05C0E0 8005B4E0 000F7880 */ sll $t7, $t7, 2 -/* 05C0E4 8005B4E4 3C01800F */ lui $at, %hi(D_800EE308) +/* 05C0E4 8005B4E4 3C01800F */ lui $at, %hi(jpt_800EE308) /* 05C0E8 8005B4E8 002F0821 */ addu $at, $at, $t7 -/* 05C0EC 8005B4EC 8C2FE308 */ lw $t7, %lo(D_800EE308)($at) +/* 05C0EC 8005B4EC 8C2FE308 */ lw $t7, %lo(jpt_800EE308)($at) /* 05C0F0 8005B4F0 01E00008 */ jr $t7 /* 05C0F4 8005B4F4 00000000 */ nop glabel L8005B4F8 @@ -775,9 +775,9 @@ glabel L8005B630 /* 05C234 8005B634 2D410009 */ sltiu $at, $t2, 9 /* 05C238 8005B638 10200054 */ beqz $at, .L8005B78C /* 05C23C 8005B63C 000A5080 */ sll $t2, $t2, 2 -/* 05C240 8005B640 3C01800F */ lui $at, %hi(D_800EE32C) +/* 05C240 8005B640 3C01800F */ lui $at, %hi(jpt_800EE32C) /* 05C244 8005B644 002A0821 */ addu $at, $at, $t2 -/* 05C248 8005B648 8C2AE32C */ lw $t2, %lo(D_800EE32C)($at) +/* 05C248 8005B648 8C2AE32C */ lw $t2, %lo(jpt_800EE32C)($at) /* 05C24C 8005B64C 01400008 */ jr $t2 /* 05C250 8005B650 00000000 */ nop glabel L8005B654 diff --git a/asm/non_matchings/code_80057C60/func_8005B914.s b/asm/non_matchings/code_80057C60/func_8005B914.s index 9de4e67cd..8a8b94f93 100644 --- a/asm/non_matchings/code_80057C60/func_8005B914.s +++ b/asm/non_matchings/code_80057C60/func_8005B914.s @@ -10,18 +10,18 @@ glabel func_8005B914 /* 05C534 8005B934 2DC10039 */ sltiu $at, $t6, 0x39 /* 05C538 8005B938 10200255 */ beqz $at, .L8005C290 /* 05C53C 8005B93C 000E7080 */ sll $t6, $t6, 2 -/* 05C540 8005B940 3C01800F */ lui $at, %hi(D_800EE350) +/* 05C540 8005B940 3C01800F */ lui $at, %hi(jpt_800EE350) /* 05C544 8005B944 002E0821 */ addu $at, $at, $t6 -/* 05C548 8005B948 8C2EE350 */ lw $t6, %lo(D_800EE350)($at) +/* 05C548 8005B948 8C2EE350 */ lw $t6, %lo(jpt_800EE350)($at) /* 05C54C 8005B94C 01C00008 */ jr $t6 /* 05C550 8005B950 00000000 */ nop .L8005B954: /* 05C554 8005B954 2C61001D */ sltiu $at, $v1, 0x1d /* 05C558 8005B958 1020024D */ beqz $at, .L8005C290 /* 05C55C 8005B95C 00037880 */ sll $t7, $v1, 2 -/* 05C560 8005B960 3C01800F */ lui $at, %hi(D_800EE434) +/* 05C560 8005B960 3C01800F */ lui $at, %hi(jpt_800EE434) /* 05C564 8005B964 002F0821 */ addu $at, $at, $t7 -/* 05C568 8005B968 8C2FE434 */ lw $t7, %lo(D_800EE434)($at) +/* 05C568 8005B968 8C2FE434 */ lw $t7, %lo(jpt_800EE434)($at) /* 05C56C 8005B96C 01E00008 */ jr $t7 /* 05C570 8005B970 00000000 */ nop glabel L8005B974 diff --git a/asm/non_matchings/code_80057C60/func_8005DAF4.s b/asm/non_matchings/code_80057C60/func_8005DAF4.s index 884967e48..1ff092812 100644 --- a/asm/non_matchings/code_80057C60/func_8005DAF4.s +++ b/asm/non_matchings/code_80057C60/func_8005DAF4.s @@ -55,9 +55,9 @@ glabel func_8005DAF4 /* 05E7B8 8005DBB8 2DC1000D */ sltiu $at, $t6, 0xd /* 05E7BC 8005DBBC 102003AF */ beqz $at, .L8005EA7C /* 05E7C0 8005DBC0 000E7080 */ sll $t6, $t6, 2 -/* 05E7C4 8005DBC4 3C01800F */ lui $at, %hi(D_800EE4B0) +/* 05E7C4 8005DBC4 3C01800F */ lui $at, %hi(jpt_800EE4B0) /* 05E7C8 8005DBC8 002E0821 */ addu $at, $at, $t6 -/* 05E7CC 8005DBCC 8C2EE4B0 */ lw $t6, %lo(D_800EE4B0)($at) +/* 05E7CC 8005DBCC 8C2EE4B0 */ lw $t6, %lo(jpt_800EE4B0)($at) /* 05E7D0 8005DBD0 01C00008 */ jr $t6 /* 05E7D4 8005DBD4 00000000 */ nop glabel L8005DBD8 diff --git a/asm/non_matchings/code_80057C60/func_8005ED48.s b/asm/non_matchings/code_80057C60/func_8005ED48.s index 3a9870de0..9e0ff81dd 100644 --- a/asm/non_matchings/code_80057C60/func_8005ED48.s +++ b/asm/non_matchings/code_80057C60/func_8005ED48.s @@ -55,9 +55,9 @@ glabel func_8005ED48 /* 05FA0C 8005EE0C 2DC1000D */ sltiu $at, $t6, 0xd /* 05FA10 8005EE10 102002B8 */ beqz $at, .L8005F8F4 /* 05FA14 8005EE14 000E7080 */ sll $t6, $t6, 2 -/* 05FA18 8005EE18 3C01800F */ lui $at, %hi(D_800EE4F8) +/* 05FA18 8005EE18 3C01800F */ lui $at, %hi(jpt_800EE4F8) /* 05FA1C 8005EE1C 002E0821 */ addu $at, $at, $t6 -/* 05FA20 8005EE20 8C2EE4F8 */ lw $t6, %lo(D_800EE4F8)($at) +/* 05FA20 8005EE20 8C2EE4F8 */ lw $t6, %lo(jpt_800EE4F8)($at) /* 05FA24 8005EE24 01C00008 */ jr $t6 /* 05FA28 8005EE28 00000000 */ nop glabel L8005EE2C diff --git a/asm/non_matchings/code_80057C60/func_8005F90C.s b/asm/non_matchings/code_80057C60/func_8005F90C.s index 758b2e985..02cf77639 100644 --- a/asm/non_matchings/code_80057C60/func_8005F90C.s +++ b/asm/non_matchings/code_80057C60/func_8005F90C.s @@ -33,9 +33,9 @@ glabel func_8005F90C /* 060580 8005F980 102002DA */ beqz $at, .L800604EC /* 060584 8005F984 00401825 */ move $v1, $v0 /* 060588 8005F988 000C6080 */ sll $t4, $t4, 2 -/* 06058C 8005F98C 3C01800F */ lui $at, %hi(D_800EE52C) +/* 06058C 8005F98C 3C01800F */ lui $at, %hi(jpt_800EE52C) /* 060590 8005F990 002C0821 */ addu $at, $at, $t4 -/* 060594 8005F994 8C2CE52C */ lw $t4, %lo(D_800EE52C)($at) +/* 060594 8005F994 8C2CE52C */ lw $t4, %lo(jpt_800EE52C)($at) /* 060598 8005F998 01800008 */ jr $t4 /* 06059C 8005F99C 00000000 */ nop glabel L8005F9A0 diff --git a/asm/non_matchings/code_80057C60/func_800624D8.s b/asm/non_matchings/code_80057C60/func_800624D8.s index 03e9a629f..93623a1db 100644 --- a/asm/non_matchings/code_80057C60/func_800624D8.s +++ b/asm/non_matchings/code_80057C60/func_800624D8.s @@ -14,9 +14,9 @@ glabel func_800624D8 /* 063108 80062508 2DE1000D */ sltiu $at, $t7, 0xd /* 06310C 8006250C 102000D3 */ beqz $at, .L8006285C /* 063110 80062510 000F7880 */ sll $t7, $t7, 2 -/* 063114 80062514 3C01800F */ lui $at, %hi(D_800EE5C8) +/* 063114 80062514 3C01800F */ lui $at, %hi(jpt_800EE5C8) /* 063118 80062518 002F0821 */ addu $at, $at, $t7 -/* 06311C 8006251C 8C2FE5C8 */ lw $t7, %lo(D_800EE5C8)($at) +/* 06311C 8006251C 8C2FE5C8 */ lw $t7, %lo(jpt_800EE5C8)($at) /* 063120 80062520 01E00008 */ jr $t7 /* 063124 80062524 00000000 */ nop glabel L80062528 diff --git a/asm/non_matchings/code_80057C60/func_8006C6AC.s b/asm/non_matchings/code_80057C60/func_8006C6AC.s index 3105bfc9d..284f15680 100644 --- a/asm/non_matchings/code_80057C60/func_8006C6AC.s +++ b/asm/non_matchings/code_80057C60/func_8006C6AC.s @@ -29,9 +29,9 @@ glabel func_8006C6AC /* 06D314 8006C714 2D61000B */ sltiu $at, $t3, 0xb /* 06D318 8006C718 102000A2 */ beqz $at, .L8006C9A4 /* 06D31C 8006C71C 000B5880 */ sll $t3, $t3, 2 -/* 06D320 8006C720 3C01800F */ lui $at, %hi(D_800EE864) +/* 06D320 8006C720 3C01800F */ lui $at, %hi(jpt_800EE864) /* 06D324 8006C724 002B0821 */ addu $at, $at, $t3 -/* 06D328 8006C728 8C2BE864 */ lw $t3, %lo(D_800EE864)($at) +/* 06D328 8006C728 8C2BE864 */ lw $t3, %lo(jpt_800EE864)($at) /* 06D32C 8006C72C 01600008 */ jr $t3 /* 06D330 8006C730 00000000 */ nop glabel L8006C734 diff --git a/asm/non_matchings/code_80057C60/func_8006C9B8.s b/asm/non_matchings/code_80057C60/func_8006C9B8.s index d41b5dee2..5a72fe74c 100644 --- a/asm/non_matchings/code_80057C60/func_8006C9B8.s +++ b/asm/non_matchings/code_80057C60/func_8006C9B8.s @@ -33,9 +33,9 @@ glabel func_8006C9B8 /* 06D630 8006CA30 2D810009 */ sltiu $at, $t4, 9 /* 06D634 8006CA34 1020011D */ beqz $at, .L8006CEAC /* 06D638 8006CA38 000C6080 */ sll $t4, $t4, 2 -/* 06D63C 8006CA3C 3C01800F */ lui $at, %hi(D_800EE890) +/* 06D63C 8006CA3C 3C01800F */ lui $at, %hi(jpt_800EE890) /* 06D640 8006CA40 002C0821 */ addu $at, $at, $t4 -/* 06D644 8006CA44 8C2CE890 */ lw $t4, %lo(D_800EE890)($at) +/* 06D644 8006CA44 8C2CE890 */ lw $t4, %lo(jpt_800EE890)($at) /* 06D648 8006CA48 01800008 */ jr $t4 /* 06D64C 8006CA4C 00000000 */ nop glabel L8006CA50 diff --git a/asm/non_matchings/code_80057C60/func_8006CEC0.s b/asm/non_matchings/code_80057C60/func_8006CEC0.s index 4c53f6649..bb586e7a1 100644 --- a/asm/non_matchings/code_80057C60/func_8006CEC0.s +++ b/asm/non_matchings/code_80057C60/func_8006CEC0.s @@ -25,9 +25,9 @@ glabel func_8006CEC0 /* 06DB18 8006CF18 2D410007 */ sltiu $at, $t2, 7 /* 06DB1C 8006CF1C 10200099 */ beqz $at, .L8006D184 /* 06DB20 8006CF20 000A5080 */ sll $t2, $t2, 2 -/* 06DB24 8006CF24 3C01800F */ lui $at, %hi(D_800EE8B4) +/* 06DB24 8006CF24 3C01800F */ lui $at, %hi(jpt_800EE8B4) /* 06DB28 8006CF28 002A0821 */ addu $at, $at, $t2 -/* 06DB2C 8006CF2C 8C2AE8B4 */ lw $t2, %lo(D_800EE8B4)($at) +/* 06DB2C 8006CF2C 8C2AE8B4 */ lw $t2, %lo(jpt_800EE8B4)($at) /* 06DB30 8006CF30 01400008 */ jr $t2 /* 06DB34 8006CF34 00000000 */ nop glabel L8006CF38 diff --git a/asm/non_matchings/code_80057C60/func_8006D194.s b/asm/non_matchings/code_80057C60/func_8006D194.s index 8ad74c952..f3c1abd00 100644 --- a/asm/non_matchings/code_80057C60/func_8006D194.s +++ b/asm/non_matchings/code_80057C60/func_8006D194.s @@ -21,9 +21,9 @@ glabel func_8006D194 /* 06DDE0 8006D1E0 2D010005 */ sltiu $at, $t0, 5 /* 06DDE4 8006D1E4 1020007E */ beqz $at, .L8006D3E0 /* 06DDE8 8006D1E8 00084080 */ sll $t0, $t0, 2 -/* 06DDEC 8006D1EC 3C01800F */ lui $at, %hi(D_800EE8D0) +/* 06DDEC 8006D1EC 3C01800F */ lui $at, %hi(jpt_800EE8D0) /* 06DDF0 8006D1F0 00280821 */ addu $at, $at, $t0 -/* 06DDF4 8006D1F4 8C28E8D0 */ lw $t0, %lo(D_800EE8D0)($at) +/* 06DDF4 8006D1F4 8C28E8D0 */ lw $t0, %lo(jpt_800EE8D0)($at) /* 06DDF8 8006D1F8 01000008 */ jr $t0 /* 06DDFC 8006D1FC 00000000 */ nop glabel L8006D200 diff --git a/asm/non_matchings/code_80057C60/func_8006D474.s b/asm/non_matchings/code_80057C60/func_8006D474.s index 785c0f14c..1e9399e7c 100644 --- a/asm/non_matchings/code_80057C60/func_8006D474.s +++ b/asm/non_matchings/code_80057C60/func_8006D474.s @@ -110,9 +110,9 @@ glabel func_8006D474 /* 06E208 8006D608 2D010009 */ sltiu $at, $t0, 9 /* 06E20C 8006D60C 102000F0 */ beqz $at, .L8006D9D0 /* 06E210 8006D610 00084080 */ sll $t0, $t0, 2 -/* 06E214 8006D614 3C01800F */ lui $at, %hi(D_800EE8E4) +/* 06E214 8006D614 3C01800F */ lui $at, %hi(jpt_800EE8E4) /* 06E218 8006D618 00280821 */ addu $at, $at, $t0 -/* 06E21C 8006D61C 8C28E8E4 */ lw $t0, %lo(D_800EE8E4)($at) +/* 06E21C 8006D61C 8C28E8E4 */ lw $t0, %lo(jpt_800EE8E4)($at) /* 06E220 8006D620 01000008 */ jr $t0 /* 06E224 8006D624 00000000 */ nop glabel L8006D628 @@ -372,9 +372,9 @@ glabel L8006D964 /* 06E5D8 8006D9D8 2DE1000B */ sltiu $at, $t7, 0xb /* 06E5DC 8006D9DC 1020007A */ beqz $at, .L8006DBC8 /* 06E5E0 8006D9E0 000F7880 */ sll $t7, $t7, 2 -/* 06E5E4 8006D9E4 3C01800F */ lui $at, %hi(D_800EE908) +/* 06E5E4 8006D9E4 3C01800F */ lui $at, %hi(jpt_800EE908) /* 06E5E8 8006D9E8 002F0821 */ addu $at, $at, $t7 -/* 06E5EC 8006D9EC 8C2FE908 */ lw $t7, %lo(D_800EE908)($at) +/* 06E5EC 8006D9EC 8C2FE908 */ lw $t7, %lo(jpt_800EE908)($at) /* 06E5F0 8006D9F0 01E00008 */ jr $t7 /* 06E5F4 8006D9F4 00000000 */ nop glabel L8006D9F8 diff --git a/asm/non_matchings/code_80057C60/func_8006DD3C.s b/asm/non_matchings/code_80057C60/func_8006DD3C.s index 6bdf2062a..9acf09d55 100644 --- a/asm/non_matchings/code_80057C60/func_8006DD3C.s +++ b/asm/non_matchings/code_80057C60/func_8006DD3C.s @@ -100,9 +100,9 @@ glabel func_8006DD3C /* 06EAB0 8006DEB0 2F010005 */ sltiu $at, $t8, 5 /* 06EAB4 8006DEB4 10200040 */ beqz $at, .L8006DFB8 /* 06EAB8 8006DEB8 0018C080 */ sll $t8, $t8, 2 -/* 06EABC 8006DEBC 3C01800F */ lui $at, %hi(D_800EE934) +/* 06EABC 8006DEBC 3C01800F */ lui $at, %hi(jpt_800EE934) /* 06EAC0 8006DEC0 00380821 */ addu $at, $at, $t8 -/* 06EAC4 8006DEC4 8C38E934 */ lw $t8, %lo(D_800EE934)($at) +/* 06EAC4 8006DEC4 8C38E934 */ lw $t8, %lo(jpt_800EE934)($at) /* 06EAC8 8006DEC8 03000008 */ jr $t8 /* 06EACC 8006DECC 00000000 */ nop glabel L8006DED0 diff --git a/asm/non_matchings/code_8006E9C0/func_8006F008.s b/asm/non_matchings/code_8006E9C0/func_8006F008.s index 5727f5baa..2baec86c2 100644 --- a/asm/non_matchings/code_8006E9C0/func_8006F008.s +++ b/asm/non_matchings/code_8006E9C0/func_8006F008.s @@ -51,9 +51,9 @@ glabel func_8006F008 .L8006F0C8: /* 06FCC8 8006F0C8 102001A5 */ beqz $at, .L8006F760 /* 06FCCC 8006F0CC 0004C880 */ sll $t9, $a0, 2 -/* 06FCD0 8006F0D0 3C01800F */ lui $at, %hi(D_800EE950) +/* 06FCD0 8006F0D0 3C01800F */ lui $at, %hi(jpt_800EE950) /* 06FCD4 8006F0D4 00390821 */ addu $at, $at, $t9 -/* 06FCD8 8006F0D8 8C39E950 */ lw $t9, %lo(D_800EE950)($at) +/* 06FCD8 8006F0D8 8C39E950 */ lw $t9, %lo(jpt_800EE950)($at) /* 06FCDC 8006F0DC 03200008 */ jr $t9 /* 06FCE0 8006F0E0 00000000 */ nop glabel L8006F0E4 diff --git a/asm/non_matchings/code_8006E9C0/func_8007055C.s b/asm/non_matchings/code_8006E9C0/func_8007055C.s index cf6b87950..f426fcf0c 100644 --- a/asm/non_matchings/code_8006E9C0/func_8007055C.s +++ b/asm/non_matchings/code_8006E9C0/func_8007055C.s @@ -11,9 +11,9 @@ glabel func_8007055C /* 071180 80070580 1020005A */ beqz $at, .L800706EC /* 071184 80070584 AFB00018 */ sw $s0, 0x18($sp) /* 071188 80070588 000E7080 */ sll $t6, $t6, 2 -/* 07118C 8007058C 3C01800F */ lui $at, %hi(D_800EE9F0) +/* 07118C 8007058C 3C01800F */ lui $at, %hi(jpt_800EE9F0) /* 071190 80070590 002E0821 */ addu $at, $at, $t6 -/* 071194 80070594 8C2EE9F0 */ lw $t6, %lo(D_800EE9F0)($at) +/* 071194 80070594 8C2EE9F0 */ lw $t6, %lo(jpt_800EE9F0)($at) /* 071198 80070598 01C00008 */ jr $t6 /* 07119C 8007059C 00000000 */ nop glabel L800705A0 diff --git a/asm/non_matchings/code_8006E9C0/func_80070780.s b/asm/non_matchings/code_8006E9C0/func_80070780.s index b8d76dd86..d9188e4a4 100644 --- a/asm/non_matchings/code_8006E9C0/func_80070780.s +++ b/asm/non_matchings/code_8006E9C0/func_80070780.s @@ -13,9 +13,9 @@ glabel func_80070780 /* 0713AC 800707AC 10200314 */ beqz $at, .L80071400 /* 0713B0 800707B0 AFB00020 */ sw $s0, 0x20($sp) /* 0713B4 800707B4 000E7080 */ sll $t6, $t6, 2 -/* 0713B8 800707B8 3C01800F */ lui $at, %hi(D_800EEA2C) # 0x800f +/* 0713B8 800707B8 3C01800F */ lui $at, %hi(jpt_800EEA2C) # 0x800f /* 0713BC 800707BC 002E0821 */ addu $at, $at, $t6 -/* 0713C0 800707C0 8C2EEA2C */ lw $t6, %lo(D_800EEA2C)($at) # -0x15d4($at) +/* 0713C0 800707C0 8C2EEA2C */ lw $t6, %lo(jpt_800EEA2C)($at) # -0x15d4($at) /* 0713C4 800707C4 01C00008 */ jr $t6 /* 0713C8 800707C8 00000000 */ nop glabel L800707CC diff --git a/asm/non_matchings/code_80071F00/func_800763CC.s b/asm/non_matchings/code_80071F00/func_800763CC.s index 47e6221f3..ed3aaf200 100644 --- a/asm/non_matchings/code_80071F00/func_800763CC.s +++ b/asm/non_matchings/code_80071F00/func_800763CC.s @@ -14,9 +14,9 @@ glabel func_800763CC /* 076FFC 800763FC 10200049 */ beqz $at, .L80076524 /* 077000 80076400 AFBF002C */ sw $ra, 0x2c($sp) /* 077004 80076404 0018C080 */ sll $t8, $t8, 2 -/* 077008 80076408 3C01800F */ lui $at, %hi(D_800EEAEC) +/* 077008 80076408 3C01800F */ lui $at, %hi(jpt_800EEAEC) /* 07700C 8007640C 00380821 */ addu $at, $at, $t8 -/* 077010 80076410 8C38EAEC */ lw $t8, %lo(D_800EEAEC)($at) +/* 077010 80076410 8C38EAEC */ lw $t8, %lo(jpt_800EEAEC)($at) /* 077014 80076414 03000008 */ jr $t8 /* 077018 80076418 00000000 */ nop glabel L8007641C diff --git a/asm/non_matchings/code_80071F00/func_800769D8.s b/asm/non_matchings/code_80071F00/func_800769D8.s index eecb7c59a..9c18b9331 100644 --- a/asm/non_matchings/code_80071F00/func_800769D8.s +++ b/asm/non_matchings/code_80071F00/func_800769D8.s @@ -14,9 +14,9 @@ glabel func_800769D8 /* 077608 80076A08 10200033 */ beqz $at, .L80076AD8 /* 07760C 80076A0C AFBF002C */ sw $ra, 0x2c($sp) /* 077610 80076A10 0018C080 */ sll $t8, $t8, 2 -/* 077614 80076A14 3C01800F */ lui $at, %hi(D_800EEB00) # 0x800f +/* 077614 80076A14 3C01800F */ lui $at, %hi(jpt_800EEB00) # 0x800f /* 077618 80076A18 00380821 */ addu $at, $at, $t8 -/* 07761C 80076A1C 8C38EB00 */ lw $t8, %lo(D_800EEB00)($at) # -0x1500($at) +/* 07761C 80076A1C 8C38EB00 */ lw $t8, %lo(jpt_800EEB00)($at) # -0x1500($at) /* 077620 80076A20 03000008 */ jr $t8 /* 077624 80076A24 00000000 */ nop glabel L80076A28 diff --git a/asm/non_matchings/code_80071F00/func_80078A44.s b/asm/non_matchings/code_80071F00/func_80078A44.s index 8421e2df7..0733aa562 100644 --- a/asm/non_matchings/code_80071F00/func_80078A44.s +++ b/asm/non_matchings/code_80071F00/func_80078A44.s @@ -42,9 +42,9 @@ glabel func_80078A44 .L80078AE0: /* 0796E0 80078AE0 00094880 */ sll $t1, $t1, 2 /* 0796E4 80078AE4 1020004E */ beqz $at, .L80078C20 -/* 0796E8 80078AE8 3C01800F */ lui $at, %hi(D_800EEB88) +/* 0796E8 80078AE8 3C01800F */ lui $at, %hi(jpt_800EEB88) /* 0796EC 80078AEC 00290821 */ addu $at, $at, $t1 -/* 0796F0 80078AF0 8C29EB88 */ lw $t1, %lo(D_800EEB88)($at) +/* 0796F0 80078AF0 8C29EB88 */ lw $t1, %lo(jpt_800EEB88)($at) /* 0796F4 80078AF4 01200008 */ jr $t1 /* 0796F8 80078AF8 00000000 */ nop glabel L80078AFC diff --git a/asm/non_matchings/code_80071F00/func_80078C70.s b/asm/non_matchings/code_80071F00/func_80078C70.s index 6d43ff3a2..361c241fd 100644 --- a/asm/non_matchings/code_80071F00/func_80078C70.s +++ b/asm/non_matchings/code_80071F00/func_80078C70.s @@ -7,9 +7,9 @@ glabel func_80078C70 /* 079884 80078C84 2C810005 */ sltiu $at, $a0, 5 /* 079888 80078C88 10200050 */ beqz $at, .L80078DCC /* 07988C 80078C8C 00047880 */ sll $t7, $a0, 2 -/* 079890 80078C90 3C01800F */ lui $at, %hi(D_800EEB9C) # 0x800f +/* 079890 80078C90 3C01800F */ lui $at, %hi(jpt_800EEB9C) # 0x800f /* 079894 80078C94 002F0821 */ addu $at, $at, $t7 -/* 079898 80078C98 8C2FEB9C */ lw $t7, %lo(D_800EEB9C)($at) # -0x1464($at) +/* 079898 80078C98 8C2FEB9C */ lw $t7, %lo(jpt_800EEB9C)($at) # -0x1464($at) /* 07989C 80078C9C 01E00008 */ jr $t7 /* 0798A0 80078CA0 00000000 */ nop glabel L80078CA4 @@ -129,9 +129,9 @@ glabel L80078D8C /* 079A50 80078E50 2D81000F */ sltiu $at, $t4, 0xf /* 079A54 80078E54 1020003F */ beqz $at, .L80078F54 /* 079A58 80078E58 000C6080 */ sll $t4, $t4, 2 -/* 079A5C 80078E5C 3C01800F */ lui $at, %hi(D_800EEBB8) +/* 079A5C 80078E5C 3C01800F */ lui $at, %hi(jpt_800EEBB8) /* 079A60 80078E60 002C0821 */ addu $at, $at, $t4 -/* 079A64 80078E64 8C2CEBB8 */ lw $t4, %lo(D_800EEBB8)($at) +/* 079A64 80078E64 8C2CEBB8 */ lw $t4, %lo(jpt_800EEBB8)($at) /* 079A68 80078E68 01800008 */ jr $t4 /* 079A6C 80078E6C 00000000 */ nop glabel L80078E70 diff --git a/asm/non_matchings/code_80071F00/func_80079380.s b/asm/non_matchings/code_80071F00/func_80079380.s index 1034b189d..2dc3e3644 100644 --- a/asm/non_matchings/code_80071F00/func_80079380.s +++ b/asm/non_matchings/code_80071F00/func_80079380.s @@ -12,9 +12,9 @@ glabel func_80079380 /* 079FA8 800793A8 102000A0 */ beqz $at, .L8007962C /* 079FAC 800793AC AFA5002C */ sw $a1, 0x2c($sp) /* 079FB0 800793B0 0018C080 */ sll $t8, $t8, 2 -/* 079FB4 800793B4 3C01800F */ lui $at, %hi(D_800EEBF8) +/* 079FB4 800793B4 3C01800F */ lui $at, %hi(jpt_800EEBF8) /* 079FB8 800793B8 00380821 */ addu $at, $at, $t8 -/* 079FBC 800793BC 8C38EBF8 */ lw $t8, %lo(D_800EEBF8)($at) +/* 079FBC 800793BC 8C38EBF8 */ lw $t8, %lo(jpt_800EEBF8)($at) /* 079FC0 800793C0 03000008 */ jr $t8 /* 079FC4 800793C4 00000000 */ nop glabel L800793C8 diff --git a/asm/non_matchings/code_80071F00/func_80079700.s b/asm/non_matchings/code_80071F00/func_80079700.s index 9aac675c8..6d8ae90bb 100644 --- a/asm/non_matchings/code_80071F00/func_80079700.s +++ b/asm/non_matchings/code_80071F00/func_80079700.s @@ -10,9 +10,9 @@ glabel func_80079700 /* 07A320 80079720 2DE10005 */ sltiu $at, $t7, 5 /* 07A324 80079724 1020001D */ beqz $at, .L8007979C /* 07A328 80079728 000F7880 */ sll $t7, $t7, 2 -/* 07A32C 8007972C 3C01800F */ lui $at, %hi(D_800EEC40) +/* 07A32C 8007972C 3C01800F */ lui $at, %hi(jpt_800EEC40) /* 07A330 80079730 002F0821 */ addu $at, $at, $t7 -/* 07A334 80079734 8C2FEC40 */ lw $t7, %lo(D_800EEC40)($at) +/* 07A334 80079734 8C2FEC40 */ lw $t7, %lo(jpt_800EEC40)($at) /* 07A338 80079738 01E00008 */ jr $t7 /* 07A33C 8007973C 00000000 */ nop glabel L80079740 diff --git a/asm/non_matchings/code_80071F00/func_80079B40.s b/asm/non_matchings/code_80071F00/func_80079B40.s index 271a16144..5a84c033a 100644 --- a/asm/non_matchings/code_80071F00/func_80079B40.s +++ b/asm/non_matchings/code_80071F00/func_80079B40.s @@ -65,9 +65,9 @@ glabel func_80079B40 /* 07A82C 80079C2C 2DC10006 */ sltiu $at, $t6, 6 /* 07A830 80079C30 10200034 */ beqz $at, .L80079D04 /* 07A834 80079C34 000E7080 */ sll $t6, $t6, 2 -/* 07A838 80079C38 3C01800F */ lui $at, %hi(D_800EEC58) +/* 07A838 80079C38 3C01800F */ lui $at, %hi(jpt_800EEC58) /* 07A83C 80079C3C 002E0821 */ addu $at, $at, $t6 -/* 07A840 80079C40 8C2EEC58 */ lw $t6, %lo(D_800EEC58)($at) +/* 07A840 80079C40 8C2EEC58 */ lw $t6, %lo(jpt_800EEC58)($at) /* 07A844 80079C44 01C00008 */ jr $t6 /* 07A848 80079C48 00000000 */ nop glabel L80079C4C diff --git a/asm/non_matchings/code_80071F00/func_80079D44.s b/asm/non_matchings/code_80071F00/func_80079D44.s index 085bdaad8..d4c79e3c1 100644 --- a/asm/non_matchings/code_80071F00/func_80079D44.s +++ b/asm/non_matchings/code_80071F00/func_80079D44.s @@ -69,9 +69,9 @@ glabel func_80079D44 /* 07AA3C 80079E3C 2F010008 */ sltiu $at, $t8, 8 /* 07AA40 80079E40 10200077 */ beqz $at, .L8007A020 /* 07AA44 80079E44 0018C080 */ sll $t8, $t8, 2 -/* 07AA48 80079E48 3C01800F */ lui $at, %hi(D_800EEC70) # 0x800f +/* 07AA48 80079E48 3C01800F */ lui $at, %hi(jpt_800EEC70) # 0x800f /* 07AA4C 80079E4C 00380821 */ addu $at, $at, $t8 -/* 07AA50 80079E50 8C38EC70 */ lw $t8, %lo(D_800EEC70)($at) # -0x1390($at) +/* 07AA50 80079E50 8C38EC70 */ lw $t8, %lo(jpt_800EEC70)($at) # -0x1390($at) /* 07AA54 80079E54 03000008 */ jr $t8 /* 07AA58 80079E58 00000000 */ nop glabel L80079E5C diff --git a/asm/non_matchings/code_80071F00/func_8007A124.s b/asm/non_matchings/code_80071F00/func_8007A124.s index e503c7503..f9af33104 100644 --- a/asm/non_matchings/code_80071F00/func_8007A124.s +++ b/asm/non_matchings/code_80071F00/func_8007A124.s @@ -11,9 +11,9 @@ glabel func_8007A124 /* 07AD48 8007A148 2F010008 */ sltiu $at, $t8, 8 /* 07AD4C 8007A14C 10200032 */ beqz $at, .L8007A218 /* 07AD50 8007A150 0018C080 */ sll $t8, $t8, 2 -/* 07AD54 8007A154 3C01800F */ lui $at, %hi(D_800EEC98) +/* 07AD54 8007A154 3C01800F */ lui $at, %hi(jpt_800EEC98) /* 07AD58 8007A158 00380821 */ addu $at, $at, $t8 -/* 07AD5C 8007A15C 8C38EC98 */ lw $t8, %lo(D_800EEC98)($at) +/* 07AD5C 8007A15C 8C38EC98 */ lw $t8, %lo(jpt_800EEC98)($at) /* 07AD60 8007A160 03000008 */ jr $t8 /* 07AD64 8007A164 00000000 */ nop glabel L8007A168 diff --git a/asm/non_matchings/code_80071F00/func_8007A2EC.s b/asm/non_matchings/code_80071F00/func_8007A2EC.s index 3c96187e1..3af94a40f 100644 --- a/asm/non_matchings/code_80071F00/func_8007A2EC.s +++ b/asm/non_matchings/code_80071F00/func_8007A2EC.s @@ -11,9 +11,9 @@ glabel func_8007A2EC /* 07AF10 8007A310 2F010008 */ sltiu $at, $t8, 8 /* 07AF14 8007A314 10200032 */ beqz $at, .L8007A3E0 /* 07AF18 8007A318 0018C080 */ sll $t8, $t8, 2 -/* 07AF1C 8007A31C 3C01800F */ lui $at, %hi(D_800EECC0) +/* 07AF1C 8007A31C 3C01800F */ lui $at, %hi(jpt_800EECC0) /* 07AF20 8007A320 00380821 */ addu $at, $at, $t8 -/* 07AF24 8007A324 8C38ECC0 */ lw $t8, %lo(D_800EECC0)($at) +/* 07AF24 8007A324 8C38ECC0 */ lw $t8, %lo(jpt_800EECC0)($at) /* 07AF28 8007A328 03000008 */ jr $t8 /* 07AF2C 8007A32C 00000000 */ nop glabel L8007A330 diff --git a/asm/non_matchings/code_80071F00/func_8007A4D4.s b/asm/non_matchings/code_80071F00/func_8007A4D4.s index 0b50e9b35..db9724c03 100644 --- a/asm/non_matchings/code_80071F00/func_8007A4D4.s +++ b/asm/non_matchings/code_80071F00/func_8007A4D4.s @@ -26,9 +26,9 @@ glabel func_8007A4D4 /* 07B134 8007A534 10200022 */ beqz $at, .L8007A5C0 /* 07B138 8007A538 AFB9002C */ sw $t9, 0x2c($sp) /* 07B13C 8007A53C 000A5080 */ sll $t2, $t2, 2 -/* 07B140 8007A540 3C01800F */ lui $at, %hi(D_800EECE8) +/* 07B140 8007A540 3C01800F */ lui $at, %hi(jpt_800EECE8) /* 07B144 8007A544 002A0821 */ addu $at, $at, $t2 -/* 07B148 8007A548 8C2AECE8 */ lw $t2, %lo(D_800EECE8)($at) +/* 07B148 8007A548 8C2AECE8 */ lw $t2, %lo(jpt_800EECE8)($at) /* 07B14C 8007A54C 01400008 */ jr $t2 /* 07B150 8007A550 00000000 */ nop glabel L8007A554 diff --git a/asm/non_matchings/code_80071F00/func_8007A948.s b/asm/non_matchings/code_80071F00/func_8007A948.s index 8fa04d8a5..9bc2ccb3b 100644 --- a/asm/non_matchings/code_80071F00/func_8007A948.s +++ b/asm/non_matchings/code_80071F00/func_8007A948.s @@ -16,9 +16,9 @@ glabel func_8007A948 /* 07B580 8007A980 2F010008 */ sltiu $at, $t8, 8 /* 07B584 8007A984 1020002A */ beqz $at, .L8007AA30 /* 07B588 8007A988 0018C080 */ sll $t8, $t8, 2 -/* 07B58C 8007A98C 3C01800F */ lui $at, %hi(D_800EECFC) # 0x800f +/* 07B58C 8007A98C 3C01800F */ lui $at, %hi(jpt_800EECFC) # 0x800f /* 07B590 8007A990 00380821 */ addu $at, $at, $t8 -/* 07B594 8007A994 8C38ECFC */ lw $t8, %lo(D_800EECFC)($at) # -0x1304($at) +/* 07B594 8007A994 8C38ECFC */ lw $t8, %lo(jpt_800EECFC)($at) # -0x1304($at) /* 07B598 8007A998 03000008 */ jr $t8 /* 07B59C 8007A99C 00000000 */ nop glabel L8007A9A0 diff --git a/asm/non_matchings/code_80071F00/func_8007AA44.s b/asm/non_matchings/code_80071F00/func_8007AA44.s index 60500c323..20244939c 100644 --- a/asm/non_matchings/code_80071F00/func_8007AA44.s +++ b/asm/non_matchings/code_80071F00/func_8007AA44.s @@ -24,9 +24,9 @@ glabel func_8007AA44 /* 07B69C 8007AA9C 2D210008 */ sltiu $at, $t1, 8 /* 07B6A0 8007AAA0 10200051 */ beqz $at, .L8007ABE8 /* 07B6A4 8007AAA4 00094880 */ sll $t1, $t1, 2 -/* 07B6A8 8007AAA8 3C01800F */ lui $at, %hi(D_800EED1C) # 0x800f +/* 07B6A8 8007AAA8 3C01800F */ lui $at, %hi(jpt_800EED1C) # 0x800f /* 07B6AC 8007AAAC 00290821 */ addu $at, $at, $t1 -/* 07B6B0 8007AAB0 8C29ED1C */ lw $t1, %lo(D_800EED1C)($at) # -0x12e4($at) +/* 07B6B0 8007AAB0 8C29ED1C */ lw $t1, %lo(jpt_800EED1C)($at) # -0x12e4($at) /* 07B6B4 8007AAB4 01200008 */ jr $t1 /* 07B6B8 8007AAB8 00000000 */ nop glabel L8007AABC diff --git a/asm/non_matchings/code_80071F00/func_8007B34C.s b/asm/non_matchings/code_80071F00/func_8007B34C.s index cb14b7167..52667bf2d 100644 --- a/asm/non_matchings/code_80071F00/func_8007B34C.s +++ b/asm/non_matchings/code_80071F00/func_8007B34C.s @@ -48,9 +48,9 @@ glabel func_8007B34C /* 07BFFC 8007B3FC 2DC10033 */ sltiu $at, $t6, 0x33 /* 07C000 8007B400 10200165 */ beqz $at, .L8007B998 /* 07C004 8007B404 000E7080 */ sll $t6, $t6, 2 -/* 07C008 8007B408 3C01800F */ lui $at, %hi(D_800EED3C) # 0x800f +/* 07C008 8007B408 3C01800F */ lui $at, %hi(jpt_800EED3C) # 0x800f /* 07C00C 8007B40C 002E0821 */ addu $at, $at, $t6 -/* 07C010 8007B410 8C2EED3C */ lw $t6, %lo(D_800EED3C)($at) # -0x12c4($at) +/* 07C010 8007B410 8C2EED3C */ lw $t6, %lo(jpt_800EED3C)($at) # -0x12c4($at) /* 07C014 8007B414 01C00008 */ jr $t6 /* 07C018 8007B418 00000000 */ nop glabel L8007B41C diff --git a/asm/non_matchings/code_80071F00/func_8007BEC8.s b/asm/non_matchings/code_80071F00/func_8007BEC8.s index f650ebb41..9f8ee9369 100644 --- a/asm/non_matchings/code_80071F00/func_8007BEC8.s +++ b/asm/non_matchings/code_80071F00/func_8007BEC8.s @@ -11,9 +11,9 @@ glabel func_8007BEC8 /* 07CAEC 8007BEEC 2F010006 */ sltiu $at, $t8, 6 /* 07CAF0 8007BEF0 1020002B */ beqz $at, .L8007BFA0 /* 07CAF4 8007BEF4 0018C080 */ sll $t8, $t8, 2 -/* 07CAF8 8007BEF8 3C01800F */ lui $at, %hi(D_800EEE20) +/* 07CAF8 8007BEF8 3C01800F */ lui $at, %hi(jpt_800EEE20) /* 07CAFC 8007BEFC 00380821 */ addu $at, $at, $t8 -/* 07CB00 8007BF00 8C38EE20 */ lw $t8, %lo(D_800EEE20)($at) +/* 07CB00 8007BF00 8C38EE20 */ lw $t8, %lo(jpt_800EEE20)($at) /* 07CB04 8007BF04 03000008 */ jr $t8 /* 07CB08 8007BF08 00000000 */ nop glabel L8007BF0C diff --git a/asm/non_matchings/code_80071F00/func_8007BFB0.s b/asm/non_matchings/code_80071F00/func_8007BFB0.s index 29d3d7abc..faf762b06 100644 --- a/asm/non_matchings/code_80071F00/func_8007BFB0.s +++ b/asm/non_matchings/code_80071F00/func_8007BFB0.s @@ -14,9 +14,9 @@ glabel func_8007BFB0 /* 07CBE0 8007BFE0 1020008F */ beqz $at, .L8007C220 /* 07CBE4 8007BFE4 AFBF002C */ sw $ra, 0x2c($sp) /* 07CBE8 8007BFE8 0002C080 */ sll $t8, $v0, 2 -/* 07CBEC 8007BFEC 3C01800F */ lui $at, %hi(D_800EEE38) # 0x800f +/* 07CBEC 8007BFEC 3C01800F */ lui $at, %hi(jpt_800EEE38) # 0x800f /* 07CBF0 8007BFF0 00380821 */ addu $at, $at, $t8 -/* 07CBF4 8007BFF4 8C38EE38 */ lw $t8, %lo(D_800EEE38)($at) # -0x11c8($at) +/* 07CBF4 8007BFF4 8C38EE38 */ lw $t8, %lo(jpt_800EEE38)($at) # -0x11c8($at) /* 07CBF8 8007BFF8 03000008 */ jr $t8 /* 07CBFC 8007BFFC 00000000 */ nop glabel L8007C000 diff --git a/asm/non_matchings/code_80071F00/func_8007C684.s b/asm/non_matchings/code_80071F00/func_8007C684.s index 48966be3c..3c87d5219 100644 --- a/asm/non_matchings/code_80071F00/func_8007C684.s +++ b/asm/non_matchings/code_80071F00/func_8007C684.s @@ -28,9 +28,9 @@ glabel func_8007C684 /* 07D2E4 8007C6E4 2F010005 */ sltiu $at, $t8, 5 /* 07D2E8 8007C6E8 1020002B */ beqz $at, .L8007C798 /* 07D2EC 8007C6EC 0018C080 */ sll $t8, $t8, 2 -/* 07D2F0 8007C6F0 3C01800F */ lui $at, %hi(D_800EEEA4) +/* 07D2F0 8007C6F0 3C01800F */ lui $at, %hi(jpt_800EEEA4) /* 07D2F4 8007C6F4 00380821 */ addu $at, $at, $t8 -/* 07D2F8 8007C6F8 8C38EEA4 */ lw $t8, %lo(D_800EEEA4)($at) +/* 07D2F8 8007C6F8 8C38EEA4 */ lw $t8, %lo(jpt_800EEEA4)($at) /* 07D2FC 8007C6FC 03000008 */ jr $t8 /* 07D300 8007C700 00000000 */ nop glabel L8007C704 diff --git a/asm/non_matchings/code_80071F00/func_8007CEDC.s b/asm/non_matchings/code_80071F00/func_8007CEDC.s index e4fa1230c..9e97d23f1 100644 --- a/asm/non_matchings/code_80071F00/func_8007CEDC.s +++ b/asm/non_matchings/code_80071F00/func_8007CEDC.s @@ -14,9 +14,9 @@ glabel func_8007CEDC /* 07DB0C 8007CF0C 10200018 */ beqz $at, .L8007CF70 /* 07DB10 8007CF10 AFBF002C */ sw $ra, 0x2c($sp) /* 07DB14 8007CF14 0002C080 */ sll $t8, $v0, 2 -/* 07DB18 8007CF18 3C01800F */ lui $at, %hi(D_800EEEBC) +/* 07DB18 8007CF18 3C01800F */ lui $at, %hi(jpt_800EEEBC) /* 07DB1C 8007CF1C 00380821 */ addu $at, $at, $t8 -/* 07DB20 8007CF20 8C38EEBC */ lw $t8, %lo(D_800EEEBC)($at) +/* 07DB20 8007CF20 8C38EEBC */ lw $t8, %lo(jpt_800EEEBC)($at) /* 07DB24 8007CF24 03000008 */ jr $t8 /* 07DB28 8007CF28 00000000 */ nop glabel L8007CF2C @@ -55,9 +55,9 @@ glabel L8007CF70 /* 07DB98 8007CF98 2F210005 */ sltiu $at, $t9, 5 /* 07DB9C 8007CF9C 1020002F */ beqz $at, .L8007D05C /* 07DBA0 8007CFA0 0019C880 */ sll $t9, $t9, 2 -/* 07DBA4 8007CFA4 3C01800F */ lui $at, %hi(D_800EEED0) # 0x800f +/* 07DBA4 8007CFA4 3C01800F */ lui $at, %hi(jpt_800EEED0) # 0x800f /* 07DBA8 8007CFA8 00390821 */ addu $at, $at, $t9 -/* 07DBAC 8007CFAC 8C39EED0 */ lw $t9, %lo(D_800EEED0)($at) # -0x1130($at) +/* 07DBAC 8007CFAC 8C39EED0 */ lw $t9, %lo(jpt_800EEED0)($at) # -0x1130($at) /* 07DBB0 8007CFB0 03200008 */ jr $t9 /* 07DBB4 8007CFB4 00000000 */ nop glabel L8007CFB8 diff --git a/asm/non_matchings/code_80071F00/func_8007E00C.s b/asm/non_matchings/code_80071F00/func_8007E00C.s index 69320a7de..12ea16c7e 100644 --- a/asm/non_matchings/code_80071F00/func_8007E00C.s +++ b/asm/non_matchings/code_80071F00/func_8007E00C.s @@ -13,9 +13,9 @@ glabel func_8007E00C /* 07EC38 8007E038 2F010007 */ sltiu $at, $t8, 7 /* 07EC3C 8007E03C 10200056 */ beqz $at, .L8007E198 /* 07EC40 8007E040 0018C080 */ sll $t8, $t8, 2 -/* 07EC44 8007E044 3C01800F */ lui $at, %hi(D_800EEF4C) +/* 07EC44 8007E044 3C01800F */ lui $at, %hi(jpt_800EEF4C) /* 07EC48 8007E048 00380821 */ addu $at, $at, $t8 -/* 07EC4C 8007E04C 8C38EF4C */ lw $t8, %lo(D_800EEF4C)($at) +/* 07EC4C 8007E04C 8C38EF4C */ lw $t8, %lo(jpt_800EEF4C)($at) /* 07EC50 8007E050 03000008 */ jr $t8 /* 07EC54 8007E054 00000000 */ nop glabel L8007E058 diff --git a/asm/non_matchings/code_80071F00/func_8007E3EC.s b/asm/non_matchings/code_80071F00/func_8007E3EC.s index f5768e481..731c490db 100644 --- a/asm/non_matchings/code_80071F00/func_8007E3EC.s +++ b/asm/non_matchings/code_80071F00/func_8007E3EC.s @@ -10,9 +10,9 @@ glabel func_8007E3EC /* 07F00C 8007E40C 2DE10006 */ sltiu $at, $t7, 6 /* 07F010 8007E410 10200028 */ beqz $at, .L8007E4B4 /* 07F014 8007E414 000F7880 */ sll $t7, $t7, 2 -/* 07F018 8007E418 3C01800F */ lui $at, %hi(D_800EEF6C) +/* 07F018 8007E418 3C01800F */ lui $at, %hi(jpt_800EEF6C) /* 07F01C 8007E41C 002F0821 */ addu $at, $at, $t7 -/* 07F020 8007E420 8C2FEF6C */ lw $t7, %lo(D_800EEF6C)($at) +/* 07F020 8007E420 8C2FEF6C */ lw $t7, %lo(jpt_800EEF6C)($at) /* 07F024 8007E424 01E00008 */ jr $t7 /* 07F028 8007E428 00000000 */ nop glabel L8007E42C diff --git a/asm/non_matchings/code_80071F00/func_8007E63C.s b/asm/non_matchings/code_80071F00/func_8007E63C.s index 9c6f0e016..19a7371b2 100644 --- a/asm/non_matchings/code_80071F00/func_8007E63C.s +++ b/asm/non_matchings/code_80071F00/func_8007E63C.s @@ -28,18 +28,18 @@ glabel func_8007E63C /* 07F2A0 8007E6A0 2F010009 */ sltiu $at, $t8, 9 /* 07F2A4 8007E6A4 1020015D */ beqz $at, .L8007EC1C /* 07F2A8 8007E6A8 0018C080 */ sll $t8, $t8, 2 -/* 07F2AC 8007E6AC 3C01800F */ lui $at, %hi(D_800EEF84) +/* 07F2AC 8007E6AC 3C01800F */ lui $at, %hi(jpt_800EEF84) /* 07F2B0 8007E6B0 00380821 */ addu $at, $at, $t8 -/* 07F2B4 8007E6B4 8C38EF84 */ lw $t8, %lo(D_800EEF84)($at) # -0x107c($at) +/* 07F2B4 8007E6B4 8C38EF84 */ lw $t8, %lo(jpt_800EEF84)($at) # -0x107c($at) /* 07F2B8 8007E6B8 03000008 */ jr $t8 /* 07F2BC 8007E6BC 00000000 */ nop .L8007E6C0: /* 07F2C0 8007E6C0 2F210005 */ sltiu $at, $t9, 5 /* 07F2C4 8007E6C4 10200155 */ beqz $at, .L8007EC1C /* 07F2C8 8007E6C8 0019C880 */ sll $t9, $t9, 2 -/* 07F2CC 8007E6CC 3C01800F */ lui $at, %hi(D_800EEFA8) +/* 07F2CC 8007E6CC 3C01800F */ lui $at, %hi(jpt_800EEFA8) /* 07F2D0 8007E6D0 00390821 */ addu $at, $at, $t9 -/* 07F2D4 8007E6D4 8C39EFA8 */ lw $t9, %lo(D_800EEFA8)($at) # -0x1058($at) +/* 07F2D4 8007E6D4 8C39EFA8 */ lw $t9, %lo(jpt_800EEFA8)($at) # -0x1058($at) /* 07F2D8 8007E6D8 03200008 */ jr $t9 /* 07F2DC 8007E6DC 00000000 */ nop glabel L8007E6E0 diff --git a/asm/non_matchings/code_80071F00/func_8007ED6C.s b/asm/non_matchings/code_80071F00/func_8007ED6C.s index 7151e6dd5..b45b79837 100644 --- a/asm/non_matchings/code_80071F00/func_8007ED6C.s +++ b/asm/non_matchings/code_80071F00/func_8007ED6C.s @@ -14,9 +14,9 @@ glabel func_8007ED6C /* 07F99C 8007ED9C 2F210005 */ sltiu $at, $t9, 5 /* 07F9A0 8007EDA0 10200020 */ beqz $at, .L8007EE24 /* 07F9A4 8007EDA4 0019C880 */ sll $t9, $t9, 2 -/* 07F9A8 8007EDA8 3C01800F */ lui $at, %hi(D_800EEFBC) # 0x800f +/* 07F9A8 8007EDA8 3C01800F */ lui $at, %hi(jpt_800EEFBC) # 0x800f /* 07F9AC 8007EDAC 00390821 */ addu $at, $at, $t9 -/* 07F9B0 8007EDB0 8C39EFBC */ lw $t9, %lo(D_800EEFBC)($at) # -0x1044($at) +/* 07F9B0 8007EDB0 8C39EFBC */ lw $t9, %lo(jpt_800EEFBC)($at) # -0x1044($at) /* 07F9B4 8007EDB4 03200008 */ jr $t9 /* 07F9B8 8007EDB8 00000000 */ nop glabel L8007EDBC diff --git a/asm/non_matchings/code_80071F00/func_8007EFBC.s b/asm/non_matchings/code_80071F00/func_8007EFBC.s index 80c3bf70c..c5c0991b5 100644 --- a/asm/non_matchings/code_80071F00/func_8007EFBC.s +++ b/asm/non_matchings/code_80071F00/func_8007EFBC.s @@ -13,9 +13,9 @@ glabel func_8007EFBC /* 07FBE8 8007EFE8 102000A0 */ beqz $at, .L8007F26C /* 07FBEC 8007EFEC AFBF001C */ sw $ra, 0x1c($sp) /* 07FBF0 8007EFF0 0018C080 */ sll $t8, $t8, 2 -/* 07FBF4 8007EFF4 3C01800F */ lui $at, %hi(D_800EEFD0) # 0x800f +/* 07FBF4 8007EFF4 3C01800F */ lui $at, %hi(jpt_800EEFD0) # 0x800f /* 07FBF8 8007EFF8 00380821 */ addu $at, $at, $t8 -/* 07FBFC 8007EFFC 8C38EFD0 */ lw $t8, %lo(D_800EEFD0)($at) # -0x1030($at) +/* 07FBFC 8007EFFC 8C38EFD0 */ lw $t8, %lo(jpt_800EEFD0)($at) # -0x1030($at) /* 07FC00 8007F000 03000008 */ jr $t8 /* 07FC04 8007F004 00000000 */ nop glabel L8007F008 diff --git a/asm/non_matchings/code_80071F00/func_8007F280.s b/asm/non_matchings/code_80071F00/func_8007F280.s index 78d4a04d8..49b1c3fe9 100644 --- a/asm/non_matchings/code_80071F00/func_8007F280.s +++ b/asm/non_matchings/code_80071F00/func_8007F280.s @@ -13,9 +13,9 @@ glabel func_8007F280 /* 07FEAC 8007F2AC 102000A0 */ beqz $at, .L8007F530 /* 07FEB0 8007F2B0 AFBF001C */ sw $ra, 0x1c($sp) /* 07FEB4 8007F2B4 0018C080 */ sll $t8, $t8, 2 -/* 07FEB8 8007F2B8 3C01800F */ lui $at, %hi(D_800EF018) # 0x800f +/* 07FEB8 8007F2B8 3C01800F */ lui $at, %hi(jpt_800EF018) # 0x800f /* 07FEBC 8007F2BC 00380821 */ addu $at, $at, $t8 -/* 07FEC0 8007F2C0 8C38F018 */ lw $t8, %lo(D_800EF018)($at) # -0xfe8($at) +/* 07FEC0 8007F2C0 8C38F018 */ lw $t8, %lo(jpt_800EF018)($at) # -0xfe8($at) /* 07FEC4 8007F2C4 03000008 */ jr $t8 /* 07FEC8 8007F2C8 00000000 */ nop glabel L8007F2CC diff --git a/asm/non_matchings/code_80071F00/func_8007FB48.s b/asm/non_matchings/code_80071F00/func_8007FB48.s index fab44333a..c83567415 100644 --- a/asm/non_matchings/code_80071F00/func_8007FB48.s +++ b/asm/non_matchings/code_80071F00/func_8007FB48.s @@ -23,9 +23,9 @@ glabel func_8007FB48 /* 08079C 8007FB9C 102000BD */ beqz $at, .L8007FE94 /* 0807A0 8007FBA0 01092821 */ addu $a1, $t0, $t1 /* 0807A4 8007FBA4 000A5080 */ sll $t2, $t2, 2 -/* 0807A8 8007FBA8 3C01800F */ lui $at, %hi(D_800EF060) # 0x800f +/* 0807A8 8007FBA8 3C01800F */ lui $at, %hi(jpt_800EF060) # 0x800f /* 0807AC 8007FBAC 002A0821 */ addu $at, $at, $t2 -/* 0807B0 8007FBB0 8C2AF060 */ lw $t2, %lo(D_800EF060)($at) # -0xfa0($at) +/* 0807B0 8007FBB0 8C2AF060 */ lw $t2, %lo(jpt_800EF060)($at) # -0xfa0($at) /* 0807B4 8007FBB4 01400008 */ jr $t2 /* 0807B8 8007FBB8 00000000 */ nop glabel L8007FBBC diff --git a/asm/non_matchings/code_80071F00/func_800801FC.s b/asm/non_matchings/code_80071F00/func_800801FC.s index f32d84c4a..479afc526 100644 --- a/asm/non_matchings/code_80071F00/func_800801FC.s +++ b/asm/non_matchings/code_80071F00/func_800801FC.s @@ -13,9 +13,9 @@ glabel func_800801FC /* 080E28 80080228 1020001A */ beqz $at, .L80080294 /* 080E2C 8008022C AFBF001C */ sw $ra, 0x1c($sp) /* 080E30 80080230 0018C080 */ sll $t8, $t8, 2 -/* 080E34 80080234 3C01800F */ lui $at, %hi(D_800EF088) +/* 080E34 80080234 3C01800F */ lui $at, %hi(jpt_800EF088) /* 080E38 80080238 00380821 */ addu $at, $at, $t8 -/* 080E3C 8008023C 8C38F088 */ lw $t8, %lo(D_800EF088)($at) +/* 080E3C 8008023C 8C38F088 */ lw $t8, %lo(jpt_800EF088)($at) /* 080E40 80080240 03000008 */ jr $t8 /* 080E44 80080244 00000000 */ nop glabel L80080248 diff --git a/asm/non_matchings/code_80071F00/func_80080408.s b/asm/non_matchings/code_80071F00/func_80080408.s index 15460bc32..f45ca0943 100644 --- a/asm/non_matchings/code_80071F00/func_80080408.s +++ b/asm/non_matchings/code_80071F00/func_80080408.s @@ -13,9 +13,9 @@ glabel func_80080408 /* 081034 80080434 10200032 */ beqz $at, .L80080500 /* 081038 80080438 AFBF0024 */ sw $ra, 0x24($sp) /* 08103C 8008043C 0018C080 */ sll $t8, $t8, 2 -/* 081040 80080440 3C01800F */ lui $at, %hi(D_800EF09C) # 0x800f +/* 081040 80080440 3C01800F */ lui $at, %hi(jpt_800EF09C) # 0x800f /* 081044 80080444 00380821 */ addu $at, $at, $t8 -/* 081048 80080448 8C38F09C */ lw $t8, %lo(D_800EF09C)($at) # -0xf64($at) +/* 081048 80080448 8C38F09C */ lw $t8, %lo(jpt_800EF09C)($at) # -0xf64($at) /* 08104C 8008044C 03000008 */ jr $t8 /* 081050 80080450 00000000 */ nop glabel L80080454 diff --git a/asm/non_matchings/code_80071F00/func_80081210.s b/asm/non_matchings/code_80071F00/func_80081210.s index c46df081b..d9a34c28e 100644 --- a/asm/non_matchings/code_80071F00/func_80081210.s +++ b/asm/non_matchings/code_80071F00/func_80081210.s @@ -63,9 +63,9 @@ glabel func_80081210 /* 081EF8 800812F8 2DC10006 */ sltiu $at, $t6, 6 /* 081EFC 800812FC 1020001D */ beqz $at, .L80081374 /* 081F00 80081300 000E7080 */ sll $t6, $t6, 2 -/* 081F04 80081304 3C01800F */ lui $at, %hi(D_800EF0CC) +/* 081F04 80081304 3C01800F */ lui $at, %hi(jpt_800EF0CC) /* 081F08 80081308 002E0821 */ addu $at, $at, $t6 -/* 081F0C 8008130C 8C2EF0CC */ lw $t6, %lo(D_800EF0CC)($at) +/* 081F0C 8008130C 8C2EF0CC */ lw $t6, %lo(jpt_800EF0CC)($at) /* 081F10 80081310 01C00008 */ jr $t6 /* 081F14 80081314 00000000 */ nop glabel L80081318 diff --git a/asm/non_matchings/code_80071F00/func_80081924.s b/asm/non_matchings/code_80071F00/func_80081924.s index 2514aa0c5..25492a377 100644 --- a/asm/non_matchings/code_80071F00/func_80081924.s +++ b/asm/non_matchings/code_80071F00/func_80081924.s @@ -13,9 +13,9 @@ glabel func_80081924 /* 082550 80081950 10200048 */ beqz $at, .L80081A74 /* 082554 80081954 AFBF001C */ sw $ra, 0x1c($sp) /* 082558 80081958 0018C080 */ sll $t8, $t8, 2 -/* 08255C 8008195C 3C01800F */ lui $at, %hi(D_800EF10C) +/* 08255C 8008195C 3C01800F */ lui $at, %hi(jpt_800EF10C) /* 082560 80081960 00380821 */ addu $at, $at, $t8 -/* 082564 80081964 8C38F10C */ lw $t8, %lo(D_800EF10C)($at) +/* 082564 80081964 8C38F10C */ lw $t8, %lo(jpt_800EF10C)($at) /* 082568 80081968 03000008 */ jr $t8 /* 08256C 8008196C 00000000 */ nop glabel L80081970 diff --git a/asm/non_matchings/code_80071F00/func_80081AFC.s b/asm/non_matchings/code_80071F00/func_80081AFC.s index 6caec2353..deb7b00ce 100644 --- a/asm/non_matchings/code_80071F00/func_80081AFC.s +++ b/asm/non_matchings/code_80071F00/func_80081AFC.s @@ -24,9 +24,9 @@ glabel func_80081AFC /* 082750 80081B50 2C41000B */ sltiu $at, $v0, 0xb /* 082754 80081B54 1020006D */ beqz $at, .L80081D0C /* 082758 80081B58 0002C080 */ sll $t8, $v0, 2 -/* 08275C 80081B5C 3C01800F */ lui $at, %hi(D_800EF140) +/* 08275C 80081B5C 3C01800F */ lui $at, %hi(jpt_800EF140) /* 082760 80081B60 00380821 */ addu $at, $at, $t8 -/* 082764 80081B64 8C38F140 */ lw $t8, %lo(D_800EF140)($at) +/* 082764 80081B64 8C38F140 */ lw $t8, %lo(jpt_800EF140)($at) /* 082768 80081B68 03000008 */ jr $t8 /* 08276C 80081B6C 00000000 */ nop glabel L80081B70 diff --git a/asm/non_matchings/code_80071F00/func_80082C30.s b/asm/non_matchings/code_80071F00/func_80082C30.s index e4158314f..88bdf9a8d 100644 --- a/asm/non_matchings/code_80071F00/func_80082C30.s +++ b/asm/non_matchings/code_80071F00/func_80082C30.s @@ -15,9 +15,9 @@ glabel func_80082C30 /* 083864 80082C64 2D010005 */ sltiu $at, $t0, 5 /* 083868 80082C68 10200054 */ beqz $at, .L80082DBC /* 08386C 80082C6C 00084080 */ sll $t0, $t0, 2 -/* 083870 80082C70 3C01800F */ lui $at, %hi(D_800EF1A4) +/* 083870 80082C70 3C01800F */ lui $at, %hi(jpt_800EF1A4) /* 083874 80082C74 00280821 */ addu $at, $at, $t0 -/* 083878 80082C78 8C28F1A4 */ lw $t0, %lo(D_800EF1A4)($at) +/* 083878 80082C78 8C28F1A4 */ lw $t0, %lo(jpt_800EF1A4)($at) /* 08387C 80082C7C 01000008 */ jr $t0 /* 083880 80082C80 00000000 */ nop glabel L80082C84 diff --git a/asm/non_matchings/code_80071F00/func_80083248.s b/asm/non_matchings/code_80071F00/func_80083248.s index b6a162fa0..a92b1f9ef 100644 --- a/asm/non_matchings/code_80071F00/func_80083248.s +++ b/asm/non_matchings/code_80071F00/func_80083248.s @@ -14,9 +14,9 @@ glabel func_80083248 /* 083E78 80083278 1020003B */ beqz $at, .L80083368 /* 083E7C 8008327C AFBF0024 */ sw $ra, 0x24($sp) /* 083E80 80083280 0018C080 */ sll $t8, $t8, 2 -/* 083E84 80083284 3C01800F */ lui $at, %hi(D_800EF1D0) +/* 083E84 80083284 3C01800F */ lui $at, %hi(jpt_800EF1D0) /* 083E88 80083288 00380821 */ addu $at, $at, $t8 -/* 083E8C 8008328C 8C38F1D0 */ lw $t8, %lo(D_800EF1D0)($at) +/* 083E8C 8008328C 8C38F1D0 */ lw $t8, %lo(jpt_800EF1D0)($at) /* 083E90 80083290 03000008 */ jr $t8 /* 083E94 80083294 00000000 */ nop glabel L80083298 diff --git a/asm/non_matchings/code_80071F00/func_80083948.s b/asm/non_matchings/code_80071F00/func_80083948.s index e04c450b8..5afc8e9f5 100644 --- a/asm/non_matchings/code_80071F00/func_80083948.s +++ b/asm/non_matchings/code_80071F00/func_80083948.s @@ -14,9 +14,9 @@ glabel func_80083948 /* 084578 80083978 10200030 */ beqz $at, .L80083A3C /* 08457C 8008397C AFBF002C */ sw $ra, 0x2c($sp) /* 084580 80083980 0018C080 */ sll $t8, $t8, 2 -/* 084584 80083984 3C01800F */ lui $at, %hi(D_800EF20C) +/* 084584 80083984 3C01800F */ lui $at, %hi(jpt_800EF20C) /* 084588 80083988 00380821 */ addu $at, $at, $t8 -/* 08458C 8008398C 8C38F20C */ lw $t8, %lo(D_800EF20C)($at) +/* 08458C 8008398C 8C38F20C */ lw $t8, %lo(jpt_800EF20C)($at) /* 084590 80083990 03000008 */ jr $t8 /* 084594 80083994 00000000 */ nop glabel L80083998 diff --git a/asm/non_matchings/code_80071F00/func_80083C04.s b/asm/non_matchings/code_80071F00/func_80083C04.s index 6d127bacb..8bce855cf 100644 --- a/asm/non_matchings/code_80071F00/func_80083C04.s +++ b/asm/non_matchings/code_80071F00/func_80083C04.s @@ -14,9 +14,9 @@ glabel func_80083C04 /* 084834 80083C34 1020003E */ beqz $at, .L80083D30 /* 084838 80083C38 AFBF002C */ sw $ra, 0x2c($sp) /* 08483C 80083C3C 0003C080 */ sll $t8, $v1, 2 -/* 084840 80083C40 3C01800F */ lui $at, %hi(D_800EF264) +/* 084840 80083C40 3C01800F */ lui $at, %hi(jpt_800EF264) /* 084844 80083C44 00380821 */ addu $at, $at, $t8 -/* 084848 80083C48 8C38F264 */ lw $t8, %lo(D_800EF264)($at) +/* 084848 80083C48 8C38F264 */ lw $t8, %lo(jpt_800EF264)($at) /* 08484C 80083C4C 03000008 */ jr $t8 /* 084850 80083C50 00000000 */ nop glabel L80083C54 diff --git a/asm/non_matchings/code_80071F00/func_800845C8.s b/asm/non_matchings/code_80071F00/func_800845C8.s index 1d1b1c301..53a7d8ab0 100644 --- a/asm/non_matchings/code_80071F00/func_800845C8.s +++ b/asm/non_matchings/code_80071F00/func_800845C8.s @@ -163,9 +163,9 @@ glabel func_800845C8 /* 085428 80084828 2F210006 */ sltiu $at, $t9, 6 /* 08542C 8008482C 102000B1 */ beqz $at, .L80084AF4 /* 085430 80084830 0019C880 */ sll $t9, $t9, 2 -/* 085434 80084834 3C01800F */ lui $at, %hi(D_800EF2FC) +/* 085434 80084834 3C01800F */ lui $at, %hi(jpt_800EF2FC) /* 085438 80084838 00390821 */ addu $at, $at, $t9 -/* 08543C 8008483C 8C39F2FC */ lw $t9, %lo(D_800EF2FC)($at) +/* 08543C 8008483C 8C39F2FC */ lw $t9, %lo(jpt_800EF2FC)($at) /* 085440 80084840 03200008 */ jr $t9 /* 085444 80084844 00000000 */ nop glabel L80084848 diff --git a/asm/non_matchings/code_80071F00/func_80084B7C.s b/asm/non_matchings/code_80071F00/func_80084B7C.s index 863d98c02..62b91f4e7 100644 --- a/asm/non_matchings/code_80071F00/func_80084B7C.s +++ b/asm/non_matchings/code_80071F00/func_80084B7C.s @@ -14,9 +14,9 @@ glabel func_80084B7C /* 0857AC 80084BAC 10200034 */ beqz $at, .L80084C80 /* 0857B0 80084BB0 AFBF0024 */ sw $ra, 0x24($sp) /* 0857B4 80084BB4 0018C080 */ sll $t8, $t8, 2 -/* 0857B8 80084BB8 3C01800F */ lui $at, %hi(D_800EF35C) +/* 0857B8 80084BB8 3C01800F */ lui $at, %hi(jpt_800EF35C) /* 0857BC 80084BBC 00380821 */ addu $at, $at, $t8 -/* 0857C0 80084BC0 8C38F35C */ lw $t8, %lo(D_800EF35C)($at) +/* 0857C0 80084BC0 8C38F35C */ lw $t8, %lo(jpt_800EF35C)($at) /* 0857C4 80084BC4 03000008 */ jr $t8 /* 0857C8 80084BC8 00000000 */ nop glabel L80084BCC diff --git a/asm/non_matchings/code_80071F00/func_80084D2C.s b/asm/non_matchings/code_80071F00/func_80084D2C.s index 7bdbed6f1..15c00e59e 100644 --- a/asm/non_matchings/code_80071F00/func_80084D2C.s +++ b/asm/non_matchings/code_80071F00/func_80084D2C.s @@ -14,9 +14,9 @@ glabel func_80084D2C /* 08595C 80084D5C 102000A8 */ beqz $at, .L80085000 /* 085960 80084D60 AFBF001C */ sw $ra, 0x1c($sp) /* 085964 80084D64 0018C080 */ sll $t8, $t8, 2 -/* 085968 80084D68 3C01800F */ lui $at, %hi(D_800EF370) # 0x800f +/* 085968 80084D68 3C01800F */ lui $at, %hi(jpt_800EF370) # 0x800f /* 08596C 80084D6C 00380821 */ addu $at, $at, $t8 -/* 085970 80084D70 8C38F370 */ lw $t8, %lo(D_800EF370)($at) # -0xc90($at) +/* 085970 80084D70 8C38F370 */ lw $t8, %lo(jpt_800EF370)($at) # -0xc90($at) /* 085974 80084D74 03000008 */ jr $t8 /* 085978 80084D78 00000000 */ nop glabel L80084D7C diff --git a/asm/non_matchings/code_80071F00/func_800850B0.s b/asm/non_matchings/code_80071F00/func_800850B0.s index 07f5535c5..0a4d6b4af 100644 --- a/asm/non_matchings/code_80071F00/func_800850B0.s +++ b/asm/non_matchings/code_80071F00/func_800850B0.s @@ -15,9 +15,9 @@ glabel func_800850B0 /* 085CE4 800850E4 10200021 */ beqz $at, .L8008516C /* 085CE8 800850E8 AFBF001C */ sw $ra, 0x1c($sp) /* 085CEC 800850EC 0019C880 */ sll $t9, $t9, 2 -/* 085CF0 800850F0 3C01800F */ lui $at, %hi(D_800EF390) +/* 085CF0 800850F0 3C01800F */ lui $at, %hi(jpt_800EF390) /* 085CF4 800850F4 00390821 */ addu $at, $at, $t9 -/* 085CF8 800850F8 8C39F390 */ lw $t9, %lo(D_800EF390)($at) +/* 085CF8 800850F8 8C39F390 */ lw $t9, %lo(jpt_800EF390)($at) /* 085CFC 800850FC 03200008 */ jr $t9 /* 085D00 80085100 00000000 */ nop glabel L80085104 diff --git a/asm/non_matchings/code_80071F00/func_80085534.s b/asm/non_matchings/code_80071F00/func_80085534.s index 7caace69d..34a7530e0 100644 --- a/asm/non_matchings/code_80071F00/func_80085534.s +++ b/asm/non_matchings/code_80071F00/func_80085534.s @@ -15,9 +15,9 @@ glabel func_80085534 /* 086168 80085568 10200075 */ beqz $at, .L80085740 /* 08616C 8008556C AFBF001C */ sw $ra, 0x1c($sp) /* 086170 80085570 0019C880 */ sll $t9, $t9, 2 -/* 086174 80085574 3C01800F */ lui $at, %hi(D_800EF3B8) +/* 086174 80085574 3C01800F */ lui $at, %hi(jpt_800EF3B8) /* 086178 80085578 00390821 */ addu $at, $at, $t9 -/* 08617C 8008557C 8C39F3B8 */ lw $t9, %lo(D_800EF3B8)($at) +/* 08617C 8008557C 8C39F3B8 */ lw $t9, %lo(jpt_800EF3B8)($at) /* 086180 80085580 03200008 */ jr $t9 /* 086184 80085584 00000000 */ nop glabel L80085588 diff --git a/asm/non_matchings/code_80071F00/func_80085CA0.s b/asm/non_matchings/code_80071F00/func_80085CA0.s index 55b880061..4a9fcd944 100644 --- a/asm/non_matchings/code_80071F00/func_80085CA0.s +++ b/asm/non_matchings/code_80071F00/func_80085CA0.s @@ -10,9 +10,9 @@ glabel func_80085CA0 /* 0868C0 80085CC0 2DE10009 */ sltiu $at, $t7, 9 /* 0868C4 80085CC4 10200038 */ beqz $at, .L80085DA8 /* 0868C8 80085CC8 000F7880 */ sll $t7, $t7, 2 -/* 0868CC 80085CCC 3C01800F */ lui $at, %hi(D_800EF3F0) +/* 0868CC 80085CCC 3C01800F */ lui $at, %hi(jpt_800EF3F0) /* 0868D0 80085CD0 002F0821 */ addu $at, $at, $t7 -/* 0868D4 80085CD4 8C2FF3F0 */ lw $t7, %lo(D_800EF3F0)($at) +/* 0868D4 80085CD4 8C2FF3F0 */ lw $t7, %lo(jpt_800EF3F0)($at) /* 0868D8 80085CD8 01E00008 */ jr $t7 /* 0868DC 80085CDC 00000000 */ nop glabel L80085CE0 diff --git a/asm/non_matchings/code_80071F00/func_80085E38.s b/asm/non_matchings/code_80071F00/func_80085E38.s index 671949fdd..fa6ee8997 100644 --- a/asm/non_matchings/code_80071F00/func_80085E38.s +++ b/asm/non_matchings/code_80071F00/func_80085E38.s @@ -10,9 +10,9 @@ glabel func_80085E38 /* 086A58 80085E58 2DE10006 */ sltiu $at, $t7, 6 /* 086A5C 80085E5C 10200022 */ beqz $at, .L80085EE8 /* 086A60 80085E60 000F7880 */ sll $t7, $t7, 2 -/* 086A64 80085E64 3C01800F */ lui $at, %hi(D_800EF420) +/* 086A64 80085E64 3C01800F */ lui $at, %hi(jpt_800EF420) /* 086A68 80085E68 002F0821 */ addu $at, $at, $t7 -/* 086A6C 80085E6C 8C2FF420 */ lw $t7, %lo(D_800EF420)($at) +/* 086A6C 80085E6C 8C2FF420 */ lw $t7, %lo(jpt_800EF420)($at) /* 086A70 80085E70 01E00008 */ jr $t7 /* 086A74 80085E74 00000000 */ nop glabel L80085E78 diff --git a/asm/non_matchings/code_80071F00/func_80085F74.s b/asm/non_matchings/code_80071F00/func_80085F74.s index bb68f74f2..3b2b99d9a 100644 --- a/asm/non_matchings/code_80071F00/func_80085F74.s +++ b/asm/non_matchings/code_80071F00/func_80085F74.s @@ -10,9 +10,9 @@ glabel func_80085F74 /* 086B94 80085F94 2DE10009 */ sltiu $at, $t7, 9 /* 086B98 80085F98 10200032 */ beqz $at, .L80086064 /* 086B9C 80085F9C 000F7880 */ sll $t7, $t7, 2 -/* 086BA0 80085FA0 3C01800F */ lui $at, %hi(D_800EF440) +/* 086BA0 80085FA0 3C01800F */ lui $at, %hi(jpt_800EF440) /* 086BA4 80085FA4 002F0821 */ addu $at, $at, $t7 -/* 086BA8 80085FA8 8C2FF440 */ lw $t7, %lo(D_800EF440)($at) +/* 086BA8 80085FA8 8C2FF440 */ lw $t7, %lo(jpt_800EF440)($at) /* 086BAC 80085FAC 01E00008 */ jr $t7 /* 086BB0 80085FB0 00000000 */ nop glabel L80085FB4 diff --git a/asm/non_matchings/code_80071F00/func_80086940.s b/asm/non_matchings/code_80071F00/func_80086940.s index 30cdcc4a5..bb7a9a149 100644 --- a/asm/non_matchings/code_80071F00/func_80086940.s +++ b/asm/non_matchings/code_80071F00/func_80086940.s @@ -14,9 +14,9 @@ glabel func_80086940 /* 087570 80086970 1020008F */ beqz $at, .L80086BB0 /* 087574 80086974 AFBF001C */ sw $ra, 0x1c($sp) /* 087578 80086978 0018C080 */ sll $t8, $t8, 2 -/* 08757C 8008697C 3C01800F */ lui $at, %hi(D_800EF474) +/* 08757C 8008697C 3C01800F */ lui $at, %hi(jpt_800EF474) /* 087580 80086980 00380821 */ addu $at, $at, $t8 -/* 087584 80086984 8C38F474 */ lw $t8, %lo(D_800EF474)($at) +/* 087584 80086984 8C38F474 */ lw $t8, %lo(jpt_800EF474)($at) /* 087588 80086988 03000008 */ jr $t8 /* 08758C 8008698C 00000000 */ nop glabel L80086990 diff --git a/asm/non_matchings/code_80086E70/func_8008BFFC.s b/asm/non_matchings/code_80086E70/func_8008BFFC.s index bdb6f0e32..7e8e56182 100644 --- a/asm/non_matchings/code_80086E70/func_8008BFFC.s +++ b/asm/non_matchings/code_80086E70/func_8008BFFC.s @@ -11,9 +11,9 @@ glabel func_8008BFFC /* 08CC20 8008C020 2F010008 */ sltiu $at, $t8, 8 /* 08CC24 8008C024 10200060 */ beqz $at, .L8008C1A8 /* 08CC28 8008C028 0018C080 */ sll $t8, $t8, 2 -/* 08CC2C 8008C02C 3C01800F */ lui $at, %hi(D_800EF518) +/* 08CC2C 8008C02C 3C01800F */ lui $at, %hi(jpt_800EF518) /* 08CC30 8008C030 00380821 */ addu $at, $at, $t8 -/* 08CC34 8008C034 8C38F518 */ lw $t8, %lo(D_800EF518)($at) +/* 08CC34 8008C034 8C38F518 */ lw $t8, %lo(jpt_800EF518)($at) /* 08CC38 8008C038 03000008 */ jr $t8 /* 08CC3C 8008C03C 00000000 */ nop glabel L8008C040 diff --git a/asm/non_matchings/code_8008C1D0/code_8008C1D0.s b/asm/non_matchings/code_8008C1D0/code_8008C1D0.s index 9a27b4b99..d8fff977c 100644 --- a/asm/non_matchings/code_8008C1D0/code_8008C1D0.s +++ b/asm/non_matchings/code_8008C1D0/code_8008C1D0.s @@ -3685,9 +3685,9 @@ glabel func_8008FF08 /* 090B20 8008FF20 10200087 */ beqz $at, .L80090140 /* 090B24 8008FF24 000E2E03 */ sra $a1, $t6, 0x18 /* 090B28 8008FF28 0019C880 */ sll $t9, $t9, 2 -/* 090B2C 8008FF2C 3C01800F */ lui $at, %hi(D_800EF5B0) +/* 090B2C 8008FF2C 3C01800F */ lui $at, %hi(jpt_800EF5B0) /* 090B30 8008FF30 00390821 */ addu $at, $at, $t9 -/* 090B34 8008FF34 8C39F5B0 */ lw $t9, %lo(D_800EF5B0)($at) +/* 090B34 8008FF34 8C39F5B0 */ lw $t9, %lo(jpt_800EF5B0)($at) /* 090B38 8008FF38 03200008 */ jr $t9 /* 090B3C 8008FF3C 00000000 */ nop glabel L8008FF40 @@ -4049,9 +4049,9 @@ glabel func_80090178 /* 091054 80090454 2DC10010 */ sltiu $at, $t6, 0x10 /* 091058 80090458 1020008F */ beqz $at, .L80090698 /* 09105C 8009045C 000E7080 */ sll $t6, $t6, 2 -/* 091060 80090460 3C01800F */ lui $at, %hi(D_800EF5F8) +/* 091060 80090460 3C01800F */ lui $at, %hi(jpt_800EF5F8) /* 091064 80090464 002E0821 */ addu $at, $at, $t6 -/* 091068 80090468 8C2EF5F8 */ lw $t6, %lo(D_800EF5F8)($at) +/* 091068 80090468 8C2EF5F8 */ lw $t6, %lo(jpt_800EF5F8)($at) /* 09106C 8009046C 01C00008 */ jr $t6 /* 091070 80090470 00000000 */ nop glabel L80090474 @@ -4418,9 +4418,9 @@ glabel func_80090970 /* 0915B0 800909B0 2DE10005 */ sltiu $at, $t7, 5 /* 0915B4 800909B4 1020018C */ beqz $at, .L80090FE8 /* 0915B8 800909B8 000F7880 */ sll $t7, $t7, 2 -/* 0915BC 800909BC 3C01800F */ lui $at, %hi(D_800EF638) # 0x800f +/* 0915BC 800909BC 3C01800F */ lui $at, %hi(jpt_800EF638) # 0x800f /* 0915C0 800909C0 002F0821 */ addu $at, $at, $t7 -/* 0915C4 800909C4 8C2FF638 */ lw $t7, %lo(D_800EF638)($at) # -0x9c8($at) +/* 0915C4 800909C4 8C2FF638 */ lw $t7, %lo(jpt_800EF638)($at) # -0x9c8($at) /* 0915C8 800909C8 01E00008 */ jr $t7 /* 0915CC 800909CC 00000000 */ nop glabel L800909D0 @@ -4931,9 +4931,9 @@ glabel func_800910E4 /* 091D38 80091138 2D410006 */ sltiu $at, $t2, 6 /* 091D3C 8009113C 10200015 */ beqz $at, .L80091194 /* 091D40 80091140 000A5080 */ sll $t2, $t2, 2 -/* 091D44 80091144 3C01800F */ lui $at, %hi(D_800EF660) +/* 091D44 80091144 3C01800F */ lui $at, %hi(jpt_800EF660) /* 091D48 80091148 002A0821 */ addu $at, $at, $t2 -/* 091D4C 8009114C 8C2AF660 */ lw $t2, %lo(D_800EF660)($at) +/* 091D4C 8009114C 8C2AF660 */ lw $t2, %lo(jpt_800EF660)($at) /* 091D50 80091150 01400008 */ jr $t2 /* 091D54 80091154 00000000 */ nop glabel L80091158 diff --git a/asm/non_matchings/code_8008C1D0/func_8008C9EC.s b/asm/non_matchings/code_8008C1D0/func_8008C9EC.s new file mode 100644 index 000000000..60b8c69c8 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008C9EC.s @@ -0,0 +1,267 @@ +glabel func_8008C9EC +/* 08D5EC 8008C9EC 27BDFFC0 */ addiu $sp, $sp, -0x40 +/* 08D5F0 8008C9F0 3C0F800E */ lui $t7, %hi(D_800E6F60) # $t7, 0x800e +/* 08D5F4 8008C9F4 AFBF001C */ sw $ra, 0x1c($sp) +/* 08D5F8 8008C9F8 AFB00018 */ sw $s0, 0x18($sp) +/* 08D5FC 8008C9FC AFA50044 */ sw $a1, 0x44($sp) +/* 08D600 8008CA00 25EF6F60 */ addiu $t7, %lo(D_800E6F60) # addiu $t7, $t7, 0x6f60 +/* 08D604 8008CA04 8DE10000 */ lw $at, ($t7) +/* 08D608 8008CA08 27AE0030 */ addiu $t6, $sp, 0x30 +/* 08D60C 8008CA0C 8DE80004 */ lw $t0, 4($t7) +/* 08D610 8008CA10 ADC10000 */ sw $at, ($t6) +/* 08D614 8008CA14 95E10008 */ lhu $at, 8($t7) +/* 08D618 8008CA18 ADC80004 */ sw $t0, 4($t6) +/* 08D61C 8008CA1C 00808025 */ move $s0, $a0 +/* 08D620 8008CA20 A5C10008 */ sh $at, 8($t6) +/* 08D624 8008CA24 94890046 */ lhu $t1, 0x46($a0) +/* 08D628 8008CA28 24010040 */ li $at, 64 +/* 08D62C 8008CA2C A4800206 */ sh $zero, 0x206($a0) +/* 08D630 8008CA30 312A0040 */ andi $t2, $t1, 0x40 +/* 08D634 8008CA34 15410005 */ bne $t2, $at, .L8008CA4C +/* 08D638 8008CA38 A48000C4 */ sh $zero, 0xc4($a0) +/* 08D63C 8008CA3C 0C00C7D2 */ jal func_80031F48 +/* 08D640 8008CA40 3C0542C8 */ lui $a1, 0x42c8 +/* 08D644 8008CA44 10000015 */ b .L8008CA9C +/* 08D648 8008CA48 8E1800BC */ lw $t8, 0xbc($s0) +.L8008CA4C: +/* 08D64C 8008CA4C 960B0000 */ lhu $t3, ($s0) +/* 08D650 8008CA50 24014000 */ li $at, 16384 +/* 08D654 8008CA54 3C053F80 */ lui $a1, 0x3f80 +/* 08D658 8008CA58 316C4000 */ andi $t4, $t3, 0x4000 +/* 08D65C 8008CA5C 15810005 */ bne $t4, $at, .L8008CA74 +/* 08D660 8008CA60 02002025 */ move $a0, $s0 +/* 08D664 8008CA64 0C00C7D2 */ jal func_80031F48 +/* 08D668 8008CA68 02002025 */ move $a0, $s0 +/* 08D66C 8008CA6C 10000004 */ b .L8008CA80 +/* 08D670 8008CA70 960D0000 */ lhu $t5, ($s0) +.L8008CA74: +/* 08D674 8008CA74 0C00C7D2 */ jal func_80031F48 +/* 08D678 8008CA78 3C054080 */ lui $a1, 0x4080 +/* 08D67C 8008CA7C 960D0000 */ lhu $t5, ($s0) +.L8008CA80: +/* 08D680 8008CA80 02002025 */ move $a0, $s0 +/* 08D684 8008CA84 31B94000 */ andi $t9, $t5, 0x4000 +/* 08D688 8008CA88 57200004 */ bnel $t9, $zero, .L8008CA9C +/* 08D68C 8008CA8C 8E1800BC */ lw $t8, 0xbc($s0) +/* 08D690 8008CA90 0C00C7D2 */ jal func_80031F48 +/* 08D694 8008CA94 3C0541F0 */ lui $a1, 0x41f0 +/* 08D698 8008CA98 8E1800BC */ lw $t8, 0xbc($s0) +.L8008CA9C: +/* 08D69C 8008CA9C 24010080 */ li $at, 128 +/* 08D6A0 8008CAA0 330E0080 */ andi $t6, $t8, 0x80 +/* 08D6A4 8008CAA4 55C10057 */ bnel $t6, $at, .L8008CC04 +/* 08D6A8 8008CAA8 860C00B2 */ lh $t4, 0xb2($s0) +/* 08D6AC 8008CAAC 860F00B2 */ lh $t7, 0xb2($s0) +/* 08D6B0 8008CAB0 27A60030 */ addiu $a2, $sp, 0x30 +/* 08D6B4 8008CAB4 8609002E */ lh $t1, 0x2e($s0) +/* 08D6B8 8008CAB8 000F4040 */ sll $t0, $t7, 1 +/* 08D6BC 8008CABC 00C82021 */ addu $a0, $a2, $t0 +/* 08D6C0 8008CAC0 848A0000 */ lh $t2, ($a0) +/* 08D6C4 8008CAC4 3C198019 */ lui $t9, %hi(D_8018D920) # $t9, 0x8019 +/* 08D6C8 8008CAC8 2739D920 */ addiu $t9, %lo(D_8018D920) # addiu $t9, $t9, -0x26e0 +/* 08D6CC 8008CACC 012A5823 */ subu $t3, $t1, $t2 +/* 08D6D0 8008CAD0 A60B002E */ sh $t3, 0x2e($s0) +/* 08D6D4 8008CAD4 83AC0047 */ lb $t4, 0x47($sp) +/* 08D6D8 8008CAD8 848E0000 */ lh $t6, ($a0) +/* 08D6DC 8008CADC 240100B6 */ li $at, 182 +/* 08D6E0 8008CAE0 000C6840 */ sll $t5, $t4, 1 +/* 08D6E4 8008CAE4 01B91021 */ addu $v0, $t5, $t9 +/* 08D6E8 8008CAE8 84580000 */ lh $t8, ($v0) +/* 08D6EC 8008CAEC 240D0168 */ li $t5, 360 +/* 08D6F0 8008CAF0 030E7823 */ subu $t7, $t8, $t6 +/* 08D6F4 8008CAF4 A44F0000 */ sh $t7, ($v0) +/* 08D6F8 8008CAF8 860300B2 */ lh $v1, 0xb2($s0) +/* 08D6FC 8008CAFC 3C180001 */ lui $t8, 1 +/* 08D700 8008CB00 31E8FFFF */ andi $t0, $t7, 0xffff +/* 08D704 8008CB04 00034840 */ sll $t1, $v1, 1 +/* 08D708 8008CB08 00C95021 */ addu $t2, $a2, $t1 +/* 08D70C 8008CB0C 854B0000 */ lh $t3, ($t2) +/* 08D710 8008CB10 246AFFFF */ addiu $t2, $v1, -1 +/* 08D714 8008CB14 0161001A */ div $zero, $t3, $at +/* 08D718 8008CB18 00006012 */ mflo $t4 +/* 08D71C 8008CB1C 00000000 */ nop +/* 08D720 8008CB20 00000000 */ nop +/* 08D724 8008CB24 01AC001A */ div $zero, $t5, $t4 +/* 08D728 8008CB28 0000C812 */ mflo $t9 +/* 08D72C 8008CB2C 15800002 */ bnez $t4, .L8008CB38 +/* 08D730 8008CB30 00000000 */ nop +/* 08D734 8008CB34 0007000D */ break 7 +.L8008CB38: +/* 08D738 8008CB38 2401FFFF */ li $at, -1 +/* 08D73C 8008CB3C 15810004 */ bne $t4, $at, .L8008CB50 +/* 08D740 8008CB40 3C018000 */ lui $at, 0x8000 +/* 08D744 8008CB44 15A10002 */ bne $t5, $at, .L8008CB50 +/* 08D748 8008CB48 00000000 */ nop +/* 08D74C 8008CB4C 0006000D */ break 6 +.L8008CB50: +/* 08D750 8008CB50 0319001A */ div $zero, $t8, $t9 +/* 08D754 8008CB54 00007012 */ mflo $t6 +/* 08D758 8008CB58 17200002 */ bnez $t9, .L8008CB64 +/* 08D75C 8008CB5C 00000000 */ nop +/* 08D760 8008CB60 0007000D */ break 7 +.L8008CB64: +/* 08D764 8008CB64 2401FFFF */ li $at, -1 +/* 08D768 8008CB68 17210004 */ bne $t9, $at, .L8008CB7C +/* 08D76C 8008CB6C 3C018000 */ lui $at, 0x8000 +/* 08D770 8008CB70 17010002 */ bne $t8, $at, .L8008CB7C +/* 08D774 8008CB74 00000000 */ nop +/* 08D778 8008CB78 0006000D */ break 6 +.L8008CB7C: +/* 08D77C 8008CB7C 010E001A */ div $zero, $t0, $t6 +/* 08D780 8008CB80 00002812 */ mflo $a1 +/* 08D784 8008CB84 00057C00 */ sll $t7, $a1, 0x10 +/* 08D788 8008CB88 000F4C03 */ sra $t1, $t7, 0x10 +/* 08D78C 8008CB8C 15C00002 */ bnez $t6, .L8008CB98 +/* 08D790 8008CB90 00000000 */ nop +/* 08D794 8008CB94 0007000D */ break 7 +.L8008CB98: +/* 08D798 8008CB98 2401FFFF */ li $at, -1 +/* 08D79C 8008CB9C 15C10004 */ bne $t6, $at, .L8008CBB0 +/* 08D7A0 8008CBA0 3C018000 */ lui $at, 0x8000 +/* 08D7A4 8008CBA4 15010002 */ bne $t0, $at, .L8008CBB0 +/* 08D7A8 8008CBA8 00000000 */ nop +/* 08D7AC 8008CBAC 0006000D */ break 6 +.L8008CBB0: +/* 08D7B0 8008CBB0 01202825 */ move $a1, $t1 +/* 08D7B4 8008CBB4 55200066 */ bnel $t1, $zero, .L8008CD50 +/* 08D7B8 8008CBB8 83A20047 */ lb $v0, 0x47($sp) +/* 08D7BC 8008CBBC A60A00B2 */ sh $t2, 0xb2($s0) +/* 08D7C0 8008CBC0 860B00B2 */ lh $t3, 0xb2($s0) +/* 08D7C4 8008CBC4 3C0D800E */ lui $t5, %hi(gModeSelection) # $t5, 0x800e +/* 08D7C8 8008CBC8 5D600061 */ bgtzl $t3, .L8008CD50 +/* 08D7CC 8008CBCC 83A20047 */ lb $v0, 0x47($sp) +/* 08D7D0 8008CBD0 8DADC53C */ lw $t5, %lo(gModeSelection)($t5) +/* 08D7D4 8008CBD4 24010003 */ li $at, 3 +/* 08D7D8 8008CBD8 02002025 */ move $a0, $s0 +/* 08D7DC 8008CBDC 55A10004 */ bnel $t5, $at, .L8008CBF0 +/* 08D7E0 8008CBE0 02002025 */ move $a0, $s0 +/* 08D7E4 8008CBE4 0C01AE2D */ jal func_8006B8B4 +/* 08D7E8 8008CBE8 83A50047 */ lb $a1, 0x47($sp) +/* 08D7EC 8008CBEC 02002025 */ move $a0, $s0 +.L8008CBF0: +/* 08D7F0 8008CBF0 0C023231 */ jal func_8008C8C4 +/* 08D7F4 8008CBF4 83A50047 */ lb $a1, 0x47($sp) +/* 08D7F8 8008CBF8 10000055 */ b .L8008CD50 +/* 08D7FC 8008CBFC 83A20047 */ lb $v0, 0x47($sp) +/* 08D800 8008CC00 860C00B2 */ lh $t4, 0xb2($s0) +.L8008CC04: +/* 08D804 8008CC04 27B90030 */ addiu $t9, $sp, 0x30 +/* 08D808 8008CC08 8608002E */ lh $t0, 0x2e($s0) +/* 08D80C 8008CC0C 000CC040 */ sll $t8, $t4, 1 +/* 08D810 8008CC10 03192021 */ addu $a0, $t8, $t9 +/* 08D814 8008CC14 848E0000 */ lh $t6, ($a0) +/* 08D818 8008CC18 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 +/* 08D81C 8008CC1C 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 +/* 08D820 8008CC20 010E7821 */ addu $t7, $t0, $t6 +/* 08D824 8008CC24 A60F002E */ sh $t7, 0x2e($s0) +/* 08D828 8008CC28 83A90047 */ lb $t1, 0x47($sp) +/* 08D82C 8008CC2C 848C0000 */ lh $t4, ($a0) +/* 08D830 8008CC30 240100B6 */ li $at, 182 +/* 08D834 8008CC34 00095040 */ sll $t2, $t1, 1 +/* 08D838 8008CC38 014B1021 */ addu $v0, $t2, $t3 +/* 08D83C 8008CC3C 844D0000 */ lh $t5, ($v0) +/* 08D840 8008CC40 24090168 */ li $t1, 360 +/* 08D844 8008CC44 3C0B0001 */ lui $t3, 1 +/* 08D848 8008CC48 01ACC023 */ subu $t8, $t5, $t4 +/* 08D84C 8008CC4C A4580000 */ sh $t8, ($v0) +/* 08D850 8008CC50 860300B2 */ lh $v1, 0xb2($s0) +/* 08D854 8008CC54 3319FFFF */ andi $t9, $t8, 0xffff +/* 08D858 8008CC58 00034040 */ sll $t0, $v1, 1 +/* 08D85C 8008CC5C 03A87021 */ addu $t6, $sp, $t0 +/* 08D860 8008CC60 85CE0030 */ lh $t6, 0x30($t6) +/* 08D864 8008CC64 2468FFFF */ addiu $t0, $v1, -1 +/* 08D868 8008CC68 01C1001A */ div $zero, $t6, $at +/* 08D86C 8008CC6C 00007812 */ mflo $t7 +/* 08D870 8008CC70 00000000 */ nop +/* 08D874 8008CC74 00000000 */ nop +/* 08D878 8008CC78 012F001A */ div $zero, $t1, $t7 +/* 08D87C 8008CC7C 00005012 */ mflo $t2 +/* 08D880 8008CC80 15E00002 */ bnez $t7, .L8008CC8C +/* 08D884 8008CC84 00000000 */ nop +/* 08D888 8008CC88 0007000D */ break 7 +.L8008CC8C: +/* 08D88C 8008CC8C 2401FFFF */ li $at, -1 +/* 08D890 8008CC90 15E10004 */ bne $t7, $at, .L8008CCA4 +/* 08D894 8008CC94 3C018000 */ lui $at, 0x8000 +/* 08D898 8008CC98 15210002 */ bne $t1, $at, .L8008CCA4 +/* 08D89C 8008CC9C 00000000 */ nop +/* 08D8A0 8008CCA0 0006000D */ break 6 +.L8008CCA4: +/* 08D8A4 8008CCA4 016A001A */ div $zero, $t3, $t2 +/* 08D8A8 8008CCA8 00006812 */ mflo $t5 +/* 08D8AC 8008CCAC 15400002 */ bnez $t2, .L8008CCB8 +/* 08D8B0 8008CCB0 00000000 */ nop +/* 08D8B4 8008CCB4 0007000D */ break 7 +.L8008CCB8: +/* 08D8B8 8008CCB8 2401FFFF */ li $at, -1 +/* 08D8BC 8008CCBC 15410004 */ bne $t2, $at, .L8008CCD0 +/* 08D8C0 8008CCC0 3C018000 */ lui $at, 0x8000 +/* 08D8C4 8008CCC4 15610002 */ bne $t3, $at, .L8008CCD0 +/* 08D8C8 8008CCC8 00000000 */ nop +/* 08D8CC 8008CCCC 0006000D */ break 6 +.L8008CCD0: +/* 08D8D0 8008CCD0 032D001A */ div $zero, $t9, $t5 +/* 08D8D4 8008CCD4 00002812 */ mflo $a1 +/* 08D8D8 8008CCD8 00056400 */ sll $t4, $a1, 0x10 +/* 08D8DC 8008CCDC 000CC403 */ sra $t8, $t4, 0x10 +/* 08D8E0 8008CCE0 15A00002 */ bnez $t5, .L8008CCEC +/* 08D8E4 8008CCE4 00000000 */ nop +/* 08D8E8 8008CCE8 0007000D */ break 7 +.L8008CCEC: +/* 08D8EC 8008CCEC 2401FFFF */ li $at, -1 +/* 08D8F0 8008CCF0 15A10004 */ bne $t5, $at, .L8008CD04 +/* 08D8F4 8008CCF4 3C018000 */ lui $at, 0x8000 +/* 08D8F8 8008CCF8 17210002 */ bne $t9, $at, .L8008CD04 +/* 08D8FC 8008CCFC 00000000 */ nop +/* 08D900 8008CD00 0006000D */ break 6 +.L8008CD04: +/* 08D904 8008CD04 03002825 */ move $a1, $t8 +/* 08D908 8008CD08 57000011 */ bnel $t8, $zero, .L8008CD50 +/* 08D90C 8008CD0C 83A20047 */ lb $v0, 0x47($sp) +/* 08D910 8008CD10 A60800B2 */ sh $t0, 0xb2($s0) +/* 08D914 8008CD14 860E00B2 */ lh $t6, 0xb2($s0) +/* 08D918 8008CD18 02002025 */ move $a0, $s0 +/* 08D91C 8008CD1C 5DC0000C */ bgtzl $t6, .L8008CD50 +/* 08D920 8008CD20 83A20047 */ lb $v0, 0x47($sp) +/* 08D924 8008CD24 0C023231 */ jal func_8008C8C4 +/* 08D928 8008CD28 83A50047 */ lb $a1, 0x47($sp) +/* 08D92C 8008CD2C 3C09800E */ lui $t1, %hi(gModeSelection) # $t1, 0x800e +/* 08D930 8008CD30 8D29C53C */ lw $t1, %lo(gModeSelection)($t1) +/* 08D934 8008CD34 24010003 */ li $at, 3 +/* 08D938 8008CD38 02002025 */ move $a0, $s0 +/* 08D93C 8008CD3C 55210004 */ bnel $t1, $at, .L8008CD50 +/* 08D940 8008CD40 83A20047 */ lb $v0, 0x47($sp) +/* 08D944 8008CD44 0C01AE2D */ jal func_8006B8B4 +/* 08D948 8008CD48 83A50047 */ lb $a1, 0x47($sp) +/* 08D94C 8008CD4C 83A20047 */ lb $v0, 0x47($sp) +.L8008CD50: +/* 08D950 8008CD50 3C0B8016 */ lui $t3, %hi(D_80165460) # 0x8016 +/* 08D954 8008CD54 24010001 */ li $at, 1 +/* 08D958 8008CD58 00027880 */ sll $t7, $v0, 2 +/* 08D95C 8008CD5C 016F5821 */ addu $t3, $t3, $t7 +/* 08D960 8008CD60 8D6B5460 */ lw $t3, %lo(D_80165460)($t3) # 0x5460($t3) +/* 08D964 8008CD64 55610012 */ bnel $t3, $at, .L8008CDB0 +/* 08D968 8008CD68 8FBF001C */ lw $ra, 0x1c($sp) +/* 08D96C 8008CD6C 960A0000 */ lhu $t2, ($s0) +/* 08D970 8008CD70 24014000 */ li $at, 16384 +/* 08D974 8008CD74 240D0078 */ li $t5, 120 +/* 08D978 8008CD78 31594000 */ andi $t9, $t2, 0x4000 +/* 08D97C 8008CD7C 1721000B */ bne $t9, $at, .L8008CDAC +/* 08D980 8008CD80 3C0142B4 */ li $at, 0x42B40000 # 90.000000 +/* 08D984 8008CD84 44810000 */ mtc1 $at, $f0 +/* 08D988 8008CD88 3C018016 */ lui $at, %hi(D_80165480) # 0x8016 +/* 08D98C 8008CD8C 002F0821 */ addu $at, $at, $t7 +/* 08D990 8008CD90 AC2D5480 */ sw $t5, %lo(D_80165480)($at) # 0x5480($at) +/* 08D994 8008CD94 C604009C */ lwc1 $f4, 0x9c($s0) +/* 08D998 8008CD98 4600203E */ c.le.s $f4, $f0 +/* 08D99C 8008CD9C 00000000 */ nop +/* 08D9A0 8008CDA0 45020003 */ bc1fl .L8008CDB0 +/* 08D9A4 8008CDA4 8FBF001C */ lw $ra, 0x1c($sp) +/* 08D9A8 8008CDA8 E600009C */ swc1 $f0, 0x9c($s0) +.L8008CDAC: +/* 08D9AC 8008CDAC 8FBF001C */ lw $ra, 0x1c($sp) +.L8008CDB0: +/* 08D9B0 8008CDB0 8FB00018 */ lw $s0, 0x18($sp) +/* 08D9B4 8008CDB4 27BD0040 */ addiu $sp, $sp, 0x40 +/* 08D9B8 8008CDB8 03E00008 */ jr $ra +/* 08D9BC 8008CDBC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008CDC0.s b/asm/non_matchings/code_8008C1D0/func_8008CDC0.s new file mode 100644 index 000000000..708ea4d08 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008CDC0.s @@ -0,0 +1,64 @@ +glabel func_8008CDC0 +/* 08D9C0 8008CDC0 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08D9C4 8008CDC4 AFBF0014 */ sw $ra, 0x14($sp) +/* 08D9C8 8008CDC8 AFA5001C */ sw $a1, 0x1c($sp) +/* 08D9CC 8008CDCC 83A5001F */ lb $a1, 0x1f($sp) +/* 08D9D0 8008CDD0 0C0230D5 */ jal func_8008C354 +/* 08D9D4 8008CDD4 AFA40018 */ sw $a0, 0x18($sp) +/* 08D9D8 8008CDD8 8FA40018 */ lw $a0, 0x18($sp) +/* 08D9DC 8008CDDC 2401FFFE */ li $at, -2 +/* 08D9E0 8008CDE0 24180001 */ li $t8, 1 +/* 08D9E4 8008CDE4 8C8E000C */ lw $t6, 0xc($a0) +/* 08D9E8 8008CDE8 8C9900BC */ lw $t9, 0xbc($a0) +/* 08D9EC 8008CDEC 8C82007C */ lw $v0, 0x7c($a0) +/* 08D9F0 8008CDF0 01C17824 */ and $t7, $t6, $at +/* 08D9F4 8008CDF4 3C014040 */ li $at, 0x40400000 # 3.000000 +/* 08D9F8 8008CDF8 44812000 */ mtc1 $at, $f4 +/* 08D9FC 8008CDFC 2401FFEF */ li $at, -17 +/* 08DA00 8008CE00 03214024 */ and $t0, $t9, $at +/* 08DA04 8008CE04 00024C03 */ sra $t1, $v0, 0x10 +/* 08DA08 8008CE08 29210014 */ slti $at, $t1, 0x14 +/* 08DA0C 8008CE0C AC8F000C */ sw $t7, 0xc($a0) +/* 08DA10 8008CE10 A48000B4 */ sh $zero, 0xb4($a0) +/* 08DA14 8008CE14 A49800AC */ sh $t8, 0xac($a0) +/* 08DA18 8008CE18 AC8800BC */ sw $t0, 0xbc($a0) +/* 08DA1C 8008CE1C 1020001B */ beqz $at, .L8008CE8C +/* 08DA20 8008CE20 E48400B8 */ swc1 $f4, 0xb8($a0) +/* 08DA24 8008CE24 2921FFED */ slti $at, $t1, -0x13 +/* 08DA28 8008CE28 14200018 */ bnez $at, .L8008CE8C +/* 08DA2C 8008CE2C 3C0141F0 */ li $at, 0x41F00000 # 30.000000 +/* 08DA30 8008CE30 44813000 */ mtc1 $at, $f6 +/* 08DA34 8008CE34 3C014190 */ li $at, 0x41900000 # 18.000000 +/* 08DA38 8008CE38 44815000 */ mtc1 $at, $f10 +/* 08DA3C 8008CE3C C4880094 */ lwc1 $f8, 0x94($a0) +/* 08DA40 8008CE40 3C014358 */ li $at, 0x43580000 # 216.000000 +/* 08DA44 8008CE44 44819000 */ mtc1 $at, $f18 +/* 08DA48 8008CE48 460A4403 */ div.s $f16, $f8, $f10 +/* 08DA4C 8008CE4C 310A0008 */ andi $t2, $t0, 8 +/* 08DA50 8008CE50 46128102 */ mul.s $f4, $f16, $f18 +/* 08DA54 8008CE54 4606203E */ c.le.s $f4, $f6 +/* 08DA58 8008CE58 00000000 */ nop +/* 08DA5C 8008CE5C 4501000B */ bc1t .L8008CE8C +/* 08DA60 8008CE60 00000000 */ nop +/* 08DA64 8008CE64 15400009 */ bnez $t2, .L8008CE8C +/* 08DA68 8008CE68 01001025 */ move $v0, $t0 +/* 08DA6C 8008CE6C 948B0000 */ lhu $t3, ($a0) +/* 08DA70 8008CE70 310D1000 */ andi $t5, $t0, 0x1000 +/* 08DA74 8008CE74 344E0800 */ ori $t6, $v0, 0x800 +/* 08DA78 8008CE78 316C4000 */ andi $t4, $t3, 0x4000 +/* 08DA7C 8008CE7C 55800008 */ bnel $t4, $zero, .L8008CEA0 +/* 08DA80 8008CE80 AC8E00BC */ sw $t6, 0xbc($a0) +/* 08DA84 8008CE84 55A00006 */ bnel $t5, $zero, .L8008CEA0 +/* 08DA88 8008CE88 AC8E00BC */ sw $t6, 0xbc($a0) +.L8008CE8C: +/* 08DA8C 8008CE8C 0C0231CF */ jal func_8008C73C +/* 08DA90 8008CE90 83A5001F */ lb $a1, 0x1f($sp) +/* 08DA94 8008CE94 10000003 */ b .L8008CEA4 +/* 08DA98 8008CE98 8FBF0014 */ lw $ra, 0x14($sp) +/* 08DA9C 8008CE9C AC8E00BC */ sw $t6, 0xbc($a0) +.L8008CEA0: +/* 08DAA0 8008CEA0 8FBF0014 */ lw $ra, 0x14($sp) +.L8008CEA4: +/* 08DAA4 8008CEA4 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08DAA8 8008CEA8 03E00008 */ jr $ra +/* 08DAAC 8008CEAC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008CEB0.s b/asm/non_matchings/code_8008C1D0/func_8008CEB0.s new file mode 100644 index 000000000..c8d973b5b --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008CEB0.s @@ -0,0 +1,149 @@ +glabel func_8008CEB0 +/* 08DAB0 8008CEB0 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 08DAB4 8008CEB4 AFBF001C */ sw $ra, 0x1c($sp) +/* 08DAB8 8008CEB8 AFB00018 */ sw $s0, 0x18($sp) +/* 08DABC 8008CEBC AFA50034 */ sw $a1, 0x34($sp) +/* 08DAC0 8008CEC0 848300B4 */ lh $v1, 0xb4($a0) +/* 08DAC4 8008CEC4 3C01800F */ lui $at, %hi(D_800EF540) +/* 08DAC8 8008CEC8 D424F540 */ ldc1 $f4, %lo(D_800EF540)($at) +/* 08DACC 8008CECC 24630001 */ addiu $v1, $v1, 1 +/* 08DAD0 8008CED0 00037400 */ sll $t6, $v1, 0x10 +/* 08DAD4 8008CED4 000E1C03 */ sra $v1, $t6, 0x10 +/* 08DAD8 8008CED8 00630019 */ multu $v1, $v1 +/* 08DADC 8008CEDC 44838000 */ mtc1 $v1, $f16 +/* 08DAE0 8008CEE0 C48000B8 */ lwc1 $f0, 0xb8($a0) +/* 08DAE4 8008CEE4 00808025 */ move $s0, $a0 +/* 08DAE8 8008CEE8 468084A0 */ cvt.s.w $f18, $f16 +/* 08DAEC 8008CEEC 848700AC */ lh $a3, 0xac($a0) +/* 08DAF0 8008CEF0 0000C012 */ mflo $t8 +/* 08DAF4 8008CEF4 44983000 */ mtc1 $t8, $f6 +/* 08DAF8 8008CEF8 00000000 */ nop +/* 08DAFC 8008CEFC 46803221 */ cvt.d.w $f8, $f6 +/* 08DB00 8008CF00 46282282 */ mul.d $f10, $f4, $f8 +/* 08DB04 8008CF04 00000000 */ nop +/* 08DB08 8008CF08 46009182 */ mul.s $f6, $f18, $f0 +/* 08DB0C 8008CF0C 46003121 */ cvt.d.s $f4, $f6 +/* 08DB10 8008CF10 462A2201 */ sub.d $f8, $f4, $f10 +/* 08DB14 8008CF14 4620440D */ trunc.w.d $f16, $f8 +/* 08DB18 8008CF18 44028000 */ mfc1 $v0, $f16 +/* 08DB1C 8008CF1C 00000000 */ nop +/* 08DB20 8008CF20 00023400 */ sll $a2, $v0, 0x10 +/* 08DB24 8008CF24 00064403 */ sra $t0, $a2, 0x10 +/* 08DB28 8008CF28 10600047 */ beqz $v1, .L8008D048 +/* 08DB2C 8008CF2C 01003025 */ move $a2, $t0 +/* 08DB30 8008CF30 00024C00 */ sll $t1, $v0, 0x10 +/* 08DB34 8008CF34 00095403 */ sra $t2, $t1, 0x10 +/* 08DB38 8008CF38 05410043 */ bgez $t2, .L8008D048 +/* 08DB3C 8008CF3C 3C01800F */ lui $at, %hi(D_800EF548) +/* 08DB40 8008CF40 D426F548 */ ldc1 $f6, %lo(D_800EF548)($at) +/* 08DB44 8008CF44 460004A1 */ cvt.d.s $f18, $f0 +/* 08DB48 8008CF48 8C8200BC */ lw $v0, 0xbc($a0) +/* 08DB4C 8008CF4C 46269102 */ mul.d $f4, $f18, $f6 +/* 08DB50 8008CF50 00073823 */ negu $a3, $a3 +/* 08DB54 8008CF54 00075C00 */ sll $t3, $a3, 0x10 +/* 08DB58 8008CF58 24010001 */ li $at, 1 +/* 08DB5C 8008CF5C 304D0001 */ andi $t5, $v0, 1 +/* 08DB60 8008CF60 00001825 */ move $v1, $zero +/* 08DB64 8008CF64 000B3C03 */ sra $a3, $t3, 0x10 +/* 08DB68 8008CF68 15A10004 */ bne $t5, $at, .L8008CF7C +/* 08DB6C 8008CF6C 46202020 */ cvt.s.d $f0, $f4 +/* 08DB70 8008CF70 3C040004 */ lui $a0, 4 +/* 08DB74 8008CF74 00447025 */ or $t6, $v0, $a0 +/* 08DB78 8008CF78 AE0E00BC */ sw $t6, 0xbc($s0) +.L8008CF7C: +/* 08DB7C 8008CF7C 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08DB80 8008CF80 44815000 */ mtc1 $at, $f10 +/* 08DB84 8008CF84 3C040004 */ lui $a0, 4 +/* 08DB88 8008CF88 460A003E */ c.le.s $f0, $f10 +/* 08DB8C 8008CF8C 00000000 */ nop +/* 08DB90 8008CF90 4500002D */ bc1f .L8008D048 +/* 08DB94 8008CF94 00000000 */ nop +/* 08DB98 8008CF98 8E0F00BC */ lw $t7, 0xbc($s0) +/* 08DB9C 8008CF9C 2401F7FF */ li $at, -2049 +/* 08DBA0 8008CFA0 01E11024 */ and $v0, $t7, $at +/* 08DBA4 8008CFA4 0044C824 */ and $t9, $v0, $a0 +/* 08DBA8 8008CFA8 1099000D */ beq $a0, $t9, .L8008CFE0 +/* 08DBAC 8008CFAC AE0200BC */ sw $v0, 0xbc($s0) +/* 08DBB0 8008CFB0 02002025 */ move $a0, $s0 +/* 08DBB4 8008CFB4 83A50037 */ lb $a1, 0x37($sp) +/* 08DBB8 8008CFB8 A7A3002A */ sh $v1, 0x2a($sp) +/* 08DBBC 8008CFBC A7A60026 */ sh $a2, 0x26($sp) +/* 08DBC0 8008CFC0 A7A70028 */ sh $a3, 0x28($sp) +/* 08DBC4 8008CFC4 0C0231CF */ jal func_8008C73C +/* 08DBC8 8008CFC8 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 08DBCC 8008CFCC 87A3002A */ lh $v1, 0x2a($sp) +/* 08DBD0 8008CFD0 87A60026 */ lh $a2, 0x26($sp) +/* 08DBD4 8008CFD4 87A70028 */ lh $a3, 0x28($sp) +/* 08DBD8 8008CFD8 1000001B */ b .L8008D048 +/* 08DBDC 8008CFDC C7A0002C */ lwc1 $f0, 0x2c($sp) +.L8008CFE0: +/* 08DBE0 8008CFE0 960800B6 */ lhu $t0, 0xb6($s0) +/* 08DBE4 8008CFE4 960B0000 */ lhu $t3, ($s0) +/* 08DBE8 8008CFE8 3C01FFFB */ lui $at, (0xFFFBFFFF >> 16) # lui $at, 0xfffb +/* 08DBEC 8008CFEC 3421FFFF */ ori $at, (0xFFFBFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08DBF0 8008CFF0 00415024 */ and $t2, $v0, $at +/* 08DBF4 8008CFF4 24014000 */ li $at, 16384 +/* 08DBF8 8008CFF8 35090020 */ ori $t1, $t0, 0x20 +/* 08DBFC 8008CFFC 316C4000 */ andi $t4, $t3, 0x4000 +/* 08DC00 8008D000 A60900B6 */ sh $t1, 0xb6($s0) +/* 08DC04 8008D004 15810010 */ bne $t4, $at, .L8008D048 +/* 08DC08 8008D008 AE0A00BC */ sw $t2, 0xbc($s0) +/* 08DC0C 8008D00C 96050254 */ lhu $a1, 0x254($s0) +/* 08DC10 8008D010 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900 +/* 08DC14 8008D014 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008 +/* 08DC18 8008D018 00056900 */ sll $t5, $a1, 4 +/* 08DC1C 8008D01C 01A12821 */ addu $a1, $t5, $at +/* 08DC20 8008D020 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 08DC24 8008D024 A7A70028 */ sh $a3, 0x28($sp) +/* 08DC28 8008D028 A7A60026 */ sh $a2, 0x26($sp) +/* 08DC2C 8008D02C A7A3002A */ sh $v1, 0x2a($sp) +/* 08DC30 8008D030 0C03243D */ jal func_800C90F4 +/* 08DC34 8008D034 93A40037 */ lbu $a0, 0x37($sp) +/* 08DC38 8008D038 87A3002A */ lh $v1, 0x2a($sp) +/* 08DC3C 8008D03C 87A60026 */ lh $a2, 0x26($sp) +/* 08DC40 8008D040 87A70028 */ lh $a3, 0x28($sp) +/* 08DC44 8008D044 C7A0002C */ lwc1 $f0, 0x2c($sp) +.L8008D048: +/* 08DC48 8008D048 00C70019 */ multu $a2, $a3 +/* 08DC4C 8008D04C 8E0200BC */ lw $v0, 0xbc($s0) +/* 08DC50 8008D050 24010001 */ li $at, 1 +/* 08DC54 8008D054 02002025 */ move $a0, $s0 +/* 08DC58 8008D058 30490008 */ andi $t1, $v0, 8 +/* 08DC5C 8008D05C 00003012 */ mflo $a2 +/* 08DC60 8008D060 00067400 */ sll $t6, $a2, 0x10 +/* 08DC64 8008D064 000E3403 */ sra $a2, $t6, 0x10 +/* 08DC68 8008D068 1CC00004 */ bgtz $a2, .L8008D07C +/* 08DC6C 8008D06C 00000000 */ nop +/* 08DC70 8008D070 14E10002 */ bne $a3, $at, .L8008D07C +/* 08DC74 8008D074 00000000 */ nop +/* 08DC78 8008D078 00003025 */ move $a2, $zero +.L8008D07C: +/* 08DC7C 8008D07C 04C00004 */ bltz $a2, .L8008D090 +/* 08DC80 8008D080 2401FFFF */ li $at, -1 +/* 08DC84 8008D084 54E10003 */ bnel $a3, $at, .L8008D094 +/* 08DC88 8008D088 86180078 */ lh $t8, 0x78($s0) +/* 08DC8C 8008D08C 00003025 */ move $a2, $zero +.L8008D090: +/* 08DC90 8008D090 86180078 */ lh $t8, 0x78($s0) +.L8008D094: +/* 08DC94 8008D094 0006C8C0 */ sll $t9, $a2, 3 +/* 08DC98 8008D098 0326C821 */ addu $t9, $t9, $a2 +/* 08DC9C 8008D09C 0019C840 */ sll $t9, $t9, 1 +/* 08DCA0 8008D0A0 03194021 */ addu $t0, $t8, $t9 +/* 08DCA4 8008D0A4 A6080078 */ sh $t0, 0x78($s0) +/* 08DCA8 8008D0A8 E60000B8 */ swc1 $f0, 0xb8($s0) +/* 08DCAC 8008D0AC A60300B4 */ sh $v1, 0xb4($s0) +/* 08DCB0 8008D0B0 11200007 */ beqz $t1, .L8008D0D0 +/* 08DCB4 8008D0B4 A60700AC */ sh $a3, 0xac($s0) +/* 08DCB8 8008D0B8 0C0231CF */ jal func_8008C73C +/* 08DCBC 8008D0BC 83A50037 */ lb $a1, 0x37($sp) +/* 08DCC0 8008D0C0 8E0A00BC */ lw $t2, 0xbc($s0) +/* 08DCC4 8008D0C4 2401F7FF */ li $at, -2049 +/* 08DCC8 8008D0C8 01415824 */ and $t3, $t2, $at +/* 08DCCC 8008D0CC AE0B00BC */ sw $t3, 0xbc($s0) +.L8008D0D0: +/* 08DCD0 8008D0D0 8FBF001C */ lw $ra, 0x1c($sp) +/* 08DCD4 8008D0D4 8FB00018 */ lw $s0, 0x18($sp) +/* 08DCD8 8008D0D8 27BD0030 */ addiu $sp, $sp, 0x30 +/* 08DCDC 8008D0DC 03E00008 */ jr $ra +/* 08DCE0 8008D0E0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D0E4.s b/asm/non_matchings/code_8008C1D0/func_8008D0E4.s new file mode 100644 index 000000000..4a92bd922 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D0E4.s @@ -0,0 +1,7 @@ +glabel func_8008D0E4 +/* 08DCE4 8008D0E4 AFA50004 */ sw $a1, 4($sp) +/* 08DCE8 8008D0E8 8C8E00BC */ lw $t6, 0xbc($a0) +/* 08DCEC 8008D0EC 2401F7FF */ li $at, -2049 +/* 08DCF0 8008D0F0 01C17824 */ and $t7, $t6, $at +/* 08DCF4 8008D0F4 03E00008 */ jr $ra +/* 08DCF8 8008D0F8 AC8F00BC */ sw $t7, 0xbc($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008D0FC.s b/asm/non_matchings/code_8008C1D0/func_8008D0FC.s new file mode 100644 index 000000000..874104aab --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D0FC.s @@ -0,0 +1,30 @@ +glabel func_8008D0FC +/* 08DCFC 8008D0FC 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08DD00 8008D100 AFBF0014 */ sw $ra, 0x14($sp) +/* 08DD04 8008D104 AFA5001C */ sw $a1, 0x1c($sp) +/* 08DD08 8008D108 00057600 */ sll $t6, $a1, 0x18 +/* 08DD0C 8008D10C 000E2E03 */ sra $a1, $t6, 0x18 +/* 08DD10 8008D110 0C0230D5 */ jal func_8008C354 +/* 08DD14 8008D114 AFA40018 */ sw $a0, 0x18($sp) +/* 08DD18 8008D118 8FA40018 */ lw $a0, 0x18($sp) +/* 08DD1C 8008D11C 2401FF7F */ li $at, -129 +/* 08DD20 8008D120 24080001 */ li $t0, 1 +/* 08DD24 8008D124 8C98000C */ lw $t8, 0xc($a0) +/* 08DD28 8008D128 8C8900BC */ lw $t1, 0xbc($a0) +/* 08DD2C 8008D12C 848B0044 */ lh $t3, 0x44($a0) +/* 08DD30 8008D130 0301C824 */ and $t9, $t8, $at +/* 08DD34 8008D134 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 08DD38 8008D138 44812000 */ mtc1 $at, $f4 +/* 08DD3C 8008D13C 2401FFEF */ li $at, -17 +/* 08DD40 8008D140 01215024 */ and $t2, $t1, $at +/* 08DD44 8008D144 356C4000 */ ori $t4, $t3, 0x4000 +/* 08DD48 8008D148 AC99000C */ sw $t9, 0xc($a0) +/* 08DD4C 8008D14C A48000B4 */ sh $zero, 0xb4($a0) +/* 08DD50 8008D150 A48800AC */ sh $t0, 0xac($a0) +/* 08DD54 8008D154 AC8A00BC */ sw $t2, 0xbc($a0) +/* 08DD58 8008D158 A48C0044 */ sh $t4, 0x44($a0) +/* 08DD5C 8008D15C E48400B8 */ swc1 $f4, 0xb8($a0) +/* 08DD60 8008D160 8FBF0014 */ lw $ra, 0x14($sp) +/* 08DD64 8008D164 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08DD68 8008D168 03E00008 */ jr $ra +/* 08DD6C 8008D16C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D170.s b/asm/non_matchings/code_8008C1D0/func_8008D170.s new file mode 100644 index 000000000..3a8ea16b9 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D170.s @@ -0,0 +1,153 @@ +glabel func_8008D170 +/* 08DD70 8008D170 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 08DD74 8008D174 AFBF001C */ sw $ra, 0x1c($sp) +/* 08DD78 8008D178 AFB00018 */ sw $s0, 0x18($sp) +/* 08DD7C 8008D17C AFA50034 */ sw $a1, 0x34($sp) +/* 08DD80 8008D180 848300B4 */ lh $v1, 0xb4($a0) +/* 08DD84 8008D184 3C01800F */ lui $at, %hi(D_800EF550) +/* 08DD88 8008D188 D424F550 */ ldc1 $f4, %lo(D_800EF550)($at) +/* 08DD8C 8008D18C 24630001 */ addiu $v1, $v1, 1 +/* 08DD90 8008D190 00037400 */ sll $t6, $v1, 0x10 +/* 08DD94 8008D194 000E1C03 */ sra $v1, $t6, 0x10 +/* 08DD98 8008D198 00630019 */ multu $v1, $v1 +/* 08DD9C 8008D19C 44838000 */ mtc1 $v1, $f16 +/* 08DDA0 8008D1A0 C48000B8 */ lwc1 $f0, 0xb8($a0) +/* 08DDA4 8008D1A4 00808025 */ move $s0, $a0 +/* 08DDA8 8008D1A8 468084A0 */ cvt.s.w $f18, $f16 +/* 08DDAC 8008D1AC 848700AC */ lh $a3, 0xac($a0) +/* 08DDB0 8008D1B0 0000C012 */ mflo $t8 +/* 08DDB4 8008D1B4 44983000 */ mtc1 $t8, $f6 +/* 08DDB8 8008D1B8 00000000 */ nop +/* 08DDBC 8008D1BC 46803221 */ cvt.d.w $f8, $f6 +/* 08DDC0 8008D1C0 46282282 */ mul.d $f10, $f4, $f8 +/* 08DDC4 8008D1C4 00000000 */ nop +/* 08DDC8 8008D1C8 46009182 */ mul.s $f6, $f18, $f0 +/* 08DDCC 8008D1CC 46003121 */ cvt.d.s $f4, $f6 +/* 08DDD0 8008D1D0 462A2201 */ sub.d $f8, $f4, $f10 +/* 08DDD4 8008D1D4 4620440D */ trunc.w.d $f16, $f8 +/* 08DDD8 8008D1D8 44028000 */ mfc1 $v0, $f16 +/* 08DDDC 8008D1DC 00000000 */ nop +/* 08DDE0 8008D1E0 00023400 */ sll $a2, $v0, 0x10 +/* 08DDE4 8008D1E4 00064403 */ sra $t0, $a2, 0x10 +/* 08DDE8 8008D1E8 1060004B */ beqz $v1, .L8008D318 +/* 08DDEC 8008D1EC 01003025 */ move $a2, $t0 +/* 08DDF0 8008D1F0 00024C00 */ sll $t1, $v0, 0x10 +/* 08DDF4 8008D1F4 00095403 */ sra $t2, $t1, 0x10 +/* 08DDF8 8008D1F8 05410047 */ bgez $t2, .L8008D318 +/* 08DDFC 8008D1FC 3C01800F */ lui $at, %hi(D_800EF558) +/* 08DE00 8008D200 D426F558 */ ldc1 $f6, %lo(D_800EF558)($at) +/* 08DE04 8008D204 460004A1 */ cvt.d.s $f18, $f0 +/* 08DE08 8008D208 8C8200BC */ lw $v0, 0xbc($a0) +/* 08DE0C 8008D20C 46269102 */ mul.d $f4, $f18, $f6 +/* 08DE10 8008D210 00073823 */ negu $a3, $a3 +/* 08DE14 8008D214 00075C00 */ sll $t3, $a3, 0x10 +/* 08DE18 8008D218 24010001 */ li $at, 1 +/* 08DE1C 8008D21C 304D0001 */ andi $t5, $v0, 1 +/* 08DE20 8008D220 00001825 */ move $v1, $zero +/* 08DE24 8008D224 000B3C03 */ sra $a3, $t3, 0x10 +/* 08DE28 8008D228 11A10004 */ beq $t5, $at, .L8008D23C +/* 08DE2C 8008D22C 46202020 */ cvt.s.d $f0, $f4 +/* 08DE30 8008D230 848E0044 */ lh $t6, 0x44($a0) +/* 08DE34 8008D234 31CF0020 */ andi $t7, $t6, 0x20 +/* 08DE38 8008D238 15E00003 */ bnez $t7, .L8008D248 +.L8008D23C: +/* 08DE3C 8008D23C 3C040004 */ lui $a0, 4 +/* 08DE40 8008D240 0044C025 */ or $t8, $v0, $a0 +/* 08DE44 8008D244 AE1800BC */ sw $t8, 0xbc($s0) +.L8008D248: +/* 08DE48 8008D248 3C01800F */ lui $at, %hi(D_800EF560) +/* 08DE4C 8008D24C D42AF560 */ ldc1 $f10, %lo(D_800EF560)($at) +/* 08DE50 8008D250 46000221 */ cvt.d.s $f8, $f0 +/* 08DE54 8008D254 3C040004 */ lui $a0, 4 +/* 08DE58 8008D258 462A403E */ c.le.d $f8, $f10 +/* 08DE5C 8008D25C 00000000 */ nop +/* 08DE60 8008D260 4500002D */ bc1f .L8008D318 +/* 08DE64 8008D264 00000000 */ nop +/* 08DE68 8008D268 86190044 */ lh $t9, 0x44($s0) +/* 08DE6C 8008D26C 8E0200BC */ lw $v0, 0xbc($s0) +/* 08DE70 8008D270 3C01FFFB */ lui $at, (0xFFFBFFFF >> 16) # lui $at, 0xfffb +/* 08DE74 8008D274 3328BFFF */ andi $t0, $t9, 0xbfff +/* 08DE78 8008D278 00444824 */ and $t1, $v0, $a0 +/* 08DE7C 8008D27C 1089000D */ beq $a0, $t1, .L8008D2B4 +/* 08DE80 8008D280 A6080044 */ sh $t0, 0x44($s0) +/* 08DE84 8008D284 02002025 */ move $a0, $s0 +/* 08DE88 8008D288 83A50037 */ lb $a1, 0x37($sp) +/* 08DE8C 8008D28C A7A3002A */ sh $v1, 0x2a($sp) +/* 08DE90 8008D290 A7A60026 */ sh $a2, 0x26($sp) +/* 08DE94 8008D294 A7A70028 */ sh $a3, 0x28($sp) +/* 08DE98 8008D298 0C0231CF */ jal func_8008C73C +/* 08DE9C 8008D29C E7A0002C */ swc1 $f0, 0x2c($sp) +/* 08DEA0 8008D2A0 87A3002A */ lh $v1, 0x2a($sp) +/* 08DEA4 8008D2A4 87A60026 */ lh $a2, 0x26($sp) +/* 08DEA8 8008D2A8 87A70028 */ lh $a3, 0x28($sp) +/* 08DEAC 8008D2AC 1000001A */ b .L8008D318 +/* 08DEB0 8008D2B0 C7A0002C */ lwc1 $f0, 0x2c($sp) +.L8008D2B4: +/* 08DEB4 8008D2B4 960A00B6 */ lhu $t2, 0xb6($s0) +/* 08DEB8 8008D2B8 960D0000 */ lhu $t5, ($s0) +/* 08DEBC 8008D2BC 3421FFFF */ ori $at, (0xFFFBFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08DEC0 8008D2C0 00416024 */ and $t4, $v0, $at +/* 08DEC4 8008D2C4 24014000 */ li $at, 16384 +/* 08DEC8 8008D2C8 354B0020 */ ori $t3, $t2, 0x20 +/* 08DECC 8008D2CC 31AE4000 */ andi $t6, $t5, 0x4000 +/* 08DED0 8008D2D0 A60B00B6 */ sh $t3, 0xb6($s0) +/* 08DED4 8008D2D4 15C10010 */ bne $t6, $at, .L8008D318 +/* 08DED8 8008D2D8 AE0C00BC */ sw $t4, 0xbc($s0) +/* 08DEDC 8008D2DC 96050254 */ lhu $a1, 0x254($s0) +/* 08DEE0 8008D2E0 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900 +/* 08DEE4 8008D2E4 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008 +/* 08DEE8 8008D2E8 00057900 */ sll $t7, $a1, 4 +/* 08DEEC 8008D2EC 01E12821 */ addu $a1, $t7, $at +/* 08DEF0 8008D2F0 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 08DEF4 8008D2F4 A7A70028 */ sh $a3, 0x28($sp) +/* 08DEF8 8008D2F8 A7A60026 */ sh $a2, 0x26($sp) +/* 08DEFC 8008D2FC A7A3002A */ sh $v1, 0x2a($sp) +/* 08DF00 8008D300 0C03243D */ jal func_800C90F4 +/* 08DF04 8008D304 93A40037 */ lbu $a0, 0x37($sp) +/* 08DF08 8008D308 87A3002A */ lh $v1, 0x2a($sp) +/* 08DF0C 8008D30C 87A60026 */ lh $a2, 0x26($sp) +/* 08DF10 8008D310 87A70028 */ lh $a3, 0x28($sp) +/* 08DF14 8008D314 C7A0002C */ lwc1 $f0, 0x2c($sp) +.L8008D318: +/* 08DF18 8008D318 00C70019 */ multu $a2, $a3 +/* 08DF1C 8008D31C 8E0200BC */ lw $v0, 0xbc($s0) +/* 08DF20 8008D320 24010001 */ li $at, 1 +/* 08DF24 8008D324 02002025 */ move $a0, $s0 +/* 08DF28 8008D328 304B0008 */ andi $t3, $v0, 8 +/* 08DF2C 8008D32C 00003012 */ mflo $a2 +/* 08DF30 8008D330 0006C400 */ sll $t8, $a2, 0x10 +/* 08DF34 8008D334 00183403 */ sra $a2, $t8, 0x10 +/* 08DF38 8008D338 1CC00004 */ bgtz $a2, .L8008D34C +/* 08DF3C 8008D33C 00000000 */ nop +/* 08DF40 8008D340 14E10002 */ bne $a3, $at, .L8008D34C +/* 08DF44 8008D344 00000000 */ nop +/* 08DF48 8008D348 00003025 */ move $a2, $zero +.L8008D34C: +/* 08DF4C 8008D34C 04C00004 */ bltz $a2, .L8008D360 +/* 08DF50 8008D350 2401FFFF */ li $at, -1 +/* 08DF54 8008D354 54E10003 */ bnel $a3, $at, .L8008D364 +/* 08DF58 8008D358 86080078 */ lh $t0, 0x78($s0) +/* 08DF5C 8008D35C 00003025 */ move $a2, $zero +.L8008D360: +/* 08DF60 8008D360 86080078 */ lh $t0, 0x78($s0) +.L8008D364: +/* 08DF64 8008D364 00064880 */ sll $t1, $a2, 2 +/* 08DF68 8008D368 01264821 */ addu $t1, $t1, $a2 +/* 08DF6C 8008D36C 00094880 */ sll $t1, $t1, 2 +/* 08DF70 8008D370 01095021 */ addu $t2, $t0, $t1 +/* 08DF74 8008D374 A60A0078 */ sh $t2, 0x78($s0) +/* 08DF78 8008D378 E60000B8 */ swc1 $f0, 0xb8($s0) +/* 08DF7C 8008D37C A60300B4 */ sh $v1, 0xb4($s0) +/* 08DF80 8008D380 11600006 */ beqz $t3, .L8008D39C +/* 08DF84 8008D384 A60700AC */ sh $a3, 0xac($s0) +/* 08DF88 8008D388 0C0231CF */ jal func_8008C73C +/* 08DF8C 8008D38C 83A50037 */ lb $a1, 0x37($sp) +/* 08DF90 8008D390 860C0044 */ lh $t4, 0x44($s0) +/* 08DF94 8008D394 318DBFFF */ andi $t5, $t4, 0xbfff +/* 08DF98 8008D398 A60D0044 */ sh $t5, 0x44($s0) +.L8008D39C: +/* 08DF9C 8008D39C 8FBF001C */ lw $ra, 0x1c($sp) +/* 08DFA0 8008D3A0 8FB00018 */ lw $s0, 0x18($sp) +/* 08DFA4 8008D3A4 27BD0030 */ addiu $sp, $sp, 0x30 +/* 08DFA8 8008D3A8 03E00008 */ jr $ra +/* 08DFAC 8008D3AC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D3B0.s b/asm/non_matchings/code_8008C1D0/func_8008D3B0.s new file mode 100644 index 000000000..f1af9f3e4 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D3B0.s @@ -0,0 +1,6 @@ +glabel func_8008D3B0 +/* 08DFB0 8008D3B0 AFA50004 */ sw $a1, 4($sp) +/* 08DFB4 8008D3B4 848E0044 */ lh $t6, 0x44($a0) +/* 08DFB8 8008D3B8 31CFBFFF */ andi $t7, $t6, 0xbfff +/* 08DFBC 8008D3BC 03E00008 */ jr $ra +/* 08DFC0 8008D3C0 A48F0044 */ sh $t7, 0x44($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008D3C4.s b/asm/non_matchings/code_8008C1D0/func_8008D3C4.s new file mode 100644 index 000000000..8c7d1d82b --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D3C4.s @@ -0,0 +1,64 @@ +glabel func_8008D3C4 +/* 08DFC4 8008D3C4 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 08DFC8 8008D3C8 AFA5002C */ sw $a1, 0x2c($sp) +/* 08DFCC 8008D3CC 00057600 */ sll $t6, $a1, 0x18 +/* 08DFD0 8008D3D0 000E2E03 */ sra $a1, $t6, 0x18 +/* 08DFD4 8008D3D4 AFBF001C */ sw $ra, 0x1c($sp) +/* 08DFD8 8008D3D8 AFB00018 */ sw $s0, 0x18($sp) +/* 08DFDC 8008D3DC 00808025 */ move $s0, $a0 +/* 08DFE0 8008D3E0 0C0230D5 */ jal func_8008C354 +/* 08DFE4 8008D3E4 A3A5002F */ sb $a1, 0x2f($sp) +/* 08DFE8 8008D3E8 8E08000C */ lw $t0, 0xc($s0) +/* 08DFEC 8008D3EC 2401FDFF */ li $at, -513 +/* 08DFF0 8008D3F0 8E1800BC */ lw $t8, 0xbc($s0) +/* 08DFF4 8008D3F4 01014824 */ and $t1, $t0, $at +/* 08DFF8 8008D3F8 83A5002F */ lb $a1, 0x2f($sp) +/* 08DFFC 8008D3FC 3C014100 */ li $at, 0x41000000 # 8.000000 +/* 08E000 8008D400 44812000 */ mtc1 $at, $f4 +/* 08E004 8008D404 37192000 */ ori $t9, $t8, 0x2000 +/* 08E008 8008D408 AE1900BC */ sw $t9, 0xbc($s0) +/* 08E00C 8008D40C AE09000C */ sw $t1, 0xc($s0) +/* 08E010 8008D410 A6000DB4 */ sh $zero, 0xdb4($s0) +/* 08E014 8008D414 3C0A8016 */ lui $t2, %hi(D_8015F890) # $t2, 0x8016 +/* 08E018 8008D418 E6040DBC */ swc1 $f4, 0xdbc($s0) +/* 08E01C 8008D41C 954AF890 */ lhu $t2, %lo(D_8015F890)($t2) +/* 08E020 8008D420 24010001 */ li $at, 1 +/* 08E024 8008D424 3C0D800E */ lui $t5, %hi(D_800DC4DC) # $t5, 0x800e +/* 08E028 8008D428 11410011 */ beq $t2, $at, .L8008D470 +/* 08E02C 8008D42C 00000000 */ nop +/* 08E030 8008D430 96020000 */ lhu $v0, ($s0) +/* 08E034 8008D434 24014000 */ li $at, 16384 +/* 08E038 8008D438 304B4000 */ andi $t3, $v0, 0x4000 +/* 08E03C 8008D43C 15610016 */ bne $t3, $at, .L8008D498 +/* 08E040 8008D440 304C0100 */ andi $t4, $v0, 0x100 +/* 08E044 8008D444 24010100 */ li $at, 256 +/* 08E048 8008D448 11810013 */ beq $t4, $at, .L8008D498 +/* 08E04C 8008D44C 30A400FF */ andi $a0, $a1, 0xff +/* 08E050 8008D450 0C032494 */ jal func_800C9250 +/* 08E054 8008D454 AFA40024 */ sw $a0, 0x24($sp) +/* 08E058 8008D458 3C051900 */ lui $a1, (0x1900A40B >> 16) # lui $a1, 0x1900 +/* 08E05C 8008D45C 8FA40024 */ lw $a0, 0x24($sp) +/* 08E060 8008D460 0C032418 */ jal func_800C9060 +/* 08E064 8008D464 34A5A40B */ ori $a1, (0x1900A40B & 0xFFFF) # ori $a1, $a1, 0xa40b +/* 08E068 8008D468 1000000C */ b .L8008D49C +/* 08E06C 8008D46C 240E0050 */ li $t6, 80 +.L8008D470: +/* 08E070 8008D470 8DADC4DC */ lw $t5, %lo(D_800DC4DC)($t5) +/* 08E074 8008D474 30A400FF */ andi $a0, $a1, 0xff +/* 08E078 8008D478 560D0008 */ bnel $s0, $t5, .L8008D49C +/* 08E07C 8008D47C 240E0050 */ li $t6, 80 +/* 08E080 8008D480 0C032494 */ jal func_800C9250 +/* 08E084 8008D484 AFA40024 */ sw $a0, 0x24($sp) +/* 08E088 8008D488 3C051900 */ lui $a1, (0x1900A40B >> 16) # lui $a1, 0x1900 +/* 08E08C 8008D48C 8FA40024 */ lw $a0, 0x24($sp) +/* 08E090 8008D490 0C032418 */ jal func_800C9060 +/* 08E094 8008D494 34A5A40B */ ori $a1, (0x1900A40B & 0xFFFF) # ori $a1, $a1, 0xa40b +.L8008D498: +/* 08E098 8008D498 240E0050 */ li $t6, 80 +.L8008D49C: +/* 08E09C 8008D49C A60E00DC */ sh $t6, 0xdc($s0) +/* 08E0A0 8008D4A0 8FBF001C */ lw $ra, 0x1c($sp) +/* 08E0A4 8008D4A4 8FB00018 */ lw $s0, 0x18($sp) +/* 08E0A8 8008D4A8 27BD0028 */ addiu $sp, $sp, 0x28 +/* 08E0AC 8008D4AC 03E00008 */ jr $ra +/* 08E0B0 8008D4B0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D4B4.s b/asm/non_matchings/code_8008C1D0/func_8008D4B4.s new file mode 100644 index 000000000..15f1a307a --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D4B4.s @@ -0,0 +1,45 @@ +glabel func_8008D4B4 +/* 08E0B4 8008D4B4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E0B8 8008D4B8 AFBF0014 */ sw $ra, 0x14($sp) +/* 08E0BC 8008D4BC 848200DC */ lh $v0, 0xdc($a0) +/* 08E0C0 8008D4C0 C4840214 */ lwc1 $f4, 0x214($a0) +/* 08E0C4 8008D4C4 00803825 */ move $a3, $a0 +/* 08E0C8 8008D4C8 18400004 */ blez $v0, .L8008D4DC +/* 08E0CC 8008D4CC E484009C */ swc1 $f4, 0x9c($a0) +/* 08E0D0 8008D4D0 244EFFFF */ addiu $t6, $v0, -1 +/* 08E0D4 8008D4D4 A48E00DC */ sh $t6, 0xdc($a0) +/* 08E0D8 8008D4D8 848200DC */ lh $v0, 0xdc($a0) +.L8008D4DC: +/* 08E0DC 8008D4DC 10400008 */ beqz $v0, .L8008D500 +/* 08E0E0 8008D4E0 24E40080 */ addiu $a0, $a3, 0x80 +/* 08E0E4 8008D4E4 24E40080 */ addiu $a0, $a3, 0x80 +/* 08E0E8 8008D4E8 3C0543C8 */ lui $a1, 0x43c8 +/* 08E0EC 8008D4EC 3C063F00 */ lui $a2, 0x3f00 +/* 08E0F0 8008D4F0 0C008973 */ jal func_800225CC +/* 08E0F4 8008D4F4 AFA70018 */ sw $a3, 0x18($sp) +/* 08E0F8 8008D4F8 10000007 */ b .L8008D518 +/* 08E0FC 8008D4FC 8FA70018 */ lw $a3, 0x18($sp) +.L8008D500: +/* 08E100 8008D500 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc +/* 08E104 8008D504 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 08E108 8008D508 24050000 */ li $a1, 0 +/* 08E10C 8008D50C 0C008973 */ jal func_800225CC +/* 08E110 8008D510 AFA70018 */ sw $a3, 0x18($sp) +/* 08E114 8008D514 8FA70018 */ lw $a3, 0x18($sp) +.L8008D518: +/* 08E118 8008D518 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08E11C 8008D51C 44813000 */ mtc1 $at, $f6 +/* 08E120 8008D520 C4E80080 */ lwc1 $f8, 0x80($a3) +/* 08E124 8008D524 4606403E */ c.le.s $f8, $f6 +/* 08E128 8008D528 00000000 */ nop +/* 08E12C 8008D52C 45020006 */ bc1fl .L8008D548 +/* 08E130 8008D530 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E134 8008D534 8CEF00BC */ lw $t7, 0xbc($a3) +/* 08E138 8008D538 2401DFFF */ li $at, -8193 +/* 08E13C 8008D53C 01E1C024 */ and $t8, $t7, $at +/* 08E140 8008D540 ACF800BC */ sw $t8, 0xbc($a3) +/* 08E144 8008D544 8FBF0014 */ lw $ra, 0x14($sp) +.L8008D548: +/* 08E148 8008D548 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08E14C 8008D54C 03E00008 */ jr $ra +/* 08E150 8008D550 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D554.s b/asm/non_matchings/code_8008C1D0/func_8008D554.s new file mode 100644 index 000000000..2d54cf01e --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D554.s @@ -0,0 +1,8 @@ +glabel func_8008D554 +/* 08E154 8008D554 8C8E00BC */ lw $t6, 0xbc($a0) +/* 08E158 8008D558 44802000 */ mtc1 $zero, $f4 +/* 08E15C 8008D55C 2401DFFF */ li $at, -8193 +/* 08E160 8008D560 01C17824 */ and $t7, $t6, $at +/* 08E164 8008D564 AC8F00BC */ sw $t7, 0xbc($a0) +/* 08E168 8008D568 03E00008 */ jr $ra +/* 08E16C 8008D56C E4840080 */ swc1 $f4, 0x80($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008D570.s b/asm/non_matchings/code_8008C1D0/func_8008D570.s new file mode 100644 index 000000000..d78f00c98 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D570.s @@ -0,0 +1,77 @@ +glabel func_8008D570 +/* 08E170 8008D570 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E174 8008D574 AFBF0014 */ sw $ra, 0x14($sp) +/* 08E178 8008D578 AFA5001C */ sw $a1, 0x1c($sp) +/* 08E17C 8008D57C 83A5001F */ lb $a1, 0x1f($sp) +/* 08E180 8008D580 0C0230D5 */ jal func_8008C354 +/* 08E184 8008D584 AFA40018 */ sw $a0, 0x18($sp) +/* 08E188 8008D588 8FA60018 */ lw $a2, 0x18($sp) +/* 08E18C 8008D58C 3C010008 */ lui $at, 8 +/* 08E190 8008D590 83A7001F */ lb $a3, 0x1f($sp) +/* 08E194 8008D594 8CCF00BC */ lw $t7, 0xbc($a2) +/* 08E198 8008D598 8CC9000C */ lw $t1, 0xc($a2) +/* 08E19C 8008D59C 94C20254 */ lhu $v0, 0x254($a2) +/* 08E1A0 8008D5A0 01E1C025 */ or $t8, $t7, $at +/* 08E1A4 8008D5A4 2401FFEF */ li $at, -17 +/* 08E1A8 8008D5A8 03014024 */ and $t0, $t8, $at +/* 08E1AC 8008D5AC 84CE002E */ lh $t6, 0x2e($a2) +/* 08E1B0 8008D5B0 2401EFFF */ li $at, -4097 +/* 08E1B4 8008D5B4 01215024 */ and $t2, $t1, $at +/* 08E1B8 8008D5B8 3C01800E */ lui $at, %hi(D_800E3730) +/* 08E1BC 8008D5BC ACD800BC */ sw $t8, 0xbc($a2) +/* 08E1C0 8008D5C0 00025880 */ sll $t3, $v0, 2 +/* 08E1C4 8008D5C4 002B0821 */ addu $at, $at, $t3 +/* 08E1C8 8008D5C8 ACC800BC */ sw $t0, 0xbc($a2) +/* 08E1CC 8008D5CC ACCA000C */ sw $t2, 0xc($a2) +/* 08E1D0 8008D5D0 A4CE00AE */ sh $t6, 0xae($a2) +/* 08E1D4 8008D5D4 C4243730 */ lwc1 $f4, %lo(D_800E3730)($at) +/* 08E1D8 8008D5D8 44803000 */ mtc1 $zero, $f6 +/* 08E1DC 8008D5DC 3C01800E */ lui $at, %hi(D_800E3710) +/* 08E1E0 8008D5E0 002B0821 */ addu $at, $at, $t3 +/* 08E1E4 8008D5E4 E4C400F0 */ swc1 $f4, 0xf0($a2) +/* 08E1E8 8008D5E8 E4C600F4 */ swc1 $f6, 0xf4($a2) +/* 08E1EC 8008D5EC C4283710 */ lwc1 $f8, %lo(D_800E3710)($at) +/* 08E1F0 8008D5F0 240C0001 */ li $t4, 1 +/* 08E1F4 8008D5F4 3C018019 */ lui $at, %hi(D_8018D920) # 0x8019 +/* 08E1F8 8008D5F8 00076840 */ sll $t5, $a3, 1 +/* 08E1FC 8008D5FC 002D0821 */ addu $at, $at, $t5 +/* 08E200 8008D600 A4CC00B2 */ sh $t4, 0xb2($a2) +/* 08E204 8008D604 A4C000C0 */ sh $zero, 0xc0($a2) +/* 08E208 8008D608 ACC0007C */ sw $zero, 0x7c($a2) +/* 08E20C 8008D60C A4C00078 */ sh $zero, 0x78($a2) +/* 08E210 8008D610 E4C800EC */ swc1 $f8, 0xec($a2) +/* 08E214 8008D614 A420D920 */ sh $zero, %lo(D_8018D920)($at) # -0x26e0($at) +/* 08E218 8008D618 94C30000 */ lhu $v1, ($a2) +/* 08E21C 8008D61C 24014000 */ li $at, 16384 +/* 08E220 8008D620 30644000 */ andi $a0, $v1, 0x4000 +/* 08E224 8008D624 1481000C */ bne $a0, $at, .L8008D658 +/* 08E228 8008D628 306E0100 */ andi $t6, $v1, 0x100 +/* 08E22C 8008D62C 24010100 */ li $at, 256 +/* 08E230 8008D630 11C10009 */ beq $t6, $at, .L8008D658 +/* 08E234 8008D634 3C051900 */ lui $a1, (0x19008002 >> 16) # lui $a1, 0x1900 +/* 08E238 8008D638 30E400FF */ andi $a0, $a3, 0xff +/* 08E23C 8008D63C 34A58002 */ ori $a1, (0x19008002 & 0xFFFF) # ori $a1, $a1, 0x8002 +/* 08E240 8008D640 0C032418 */ jal func_800C9060 +/* 08E244 8008D644 AFA60018 */ sw $a2, 0x18($sp) +/* 08E248 8008D648 8FA60018 */ lw $a2, 0x18($sp) +/* 08E24C 8008D64C 83A7001F */ lb $a3, 0x1f($sp) +/* 08E250 8008D650 94C30000 */ lhu $v1, ($a2) +/* 08E254 8008D654 30644000 */ andi $a0, $v1, 0x4000 +.L8008D658: +/* 08E258 8008D658 24014000 */ li $at, 16384 +/* 08E25C 8008D65C 1481000A */ bne $a0, $at, .L8008D688 +/* 08E260 8008D660 306F0100 */ andi $t7, $v1, 0x100 +/* 08E264 8008D664 24010100 */ li $at, 256 +/* 08E268 8008D668 11E10007 */ beq $t7, $at, .L8008D688 +/* 08E26C 8008D66C 30E400FF */ andi $a0, $a3, 0xff +/* 08E270 8008D670 94C50254 */ lhu $a1, 0x254($a2) +/* 08E274 8008D674 3C012900 */ lui $at, (0x2900800C >> 16) # lui $at, 0x2900 +/* 08E278 8008D678 3421800C */ ori $at, (0x2900800C & 0xFFFF) # ori $at, $at, 0x800c +/* 08E27C 8008D67C 0005C100 */ sll $t8, $a1, 4 +/* 08E280 8008D680 0C03243D */ jal func_800C90F4 +/* 08E284 8008D684 03012821 */ addu $a1, $t8, $at +.L8008D688: +/* 08E288 8008D688 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E28C 8008D68C 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08E290 8008D690 03E00008 */ jr $ra +/* 08E294 8008D694 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D698.s b/asm/non_matchings/code_8008C1D0/func_8008D698.s new file mode 100644 index 000000000..5e1ad8d07 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D698.s @@ -0,0 +1,55 @@ +glabel func_8008D698 +/* 08E298 8008D698 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E29C 8008D69C AFBF0014 */ sw $ra, 0x14($sp) +/* 08E2A0 8008D6A0 AFA5001C */ sw $a1, 0x1c($sp) +/* 08E2A4 8008D6A4 849800B2 */ lh $t8, 0xb2($a0) +/* 08E2A8 8008D6A8 00057600 */ sll $t6, $a1, 0x18 +/* 08E2AC 8008D6AC 000E2E03 */ sra $a1, $t6, 0x18 +/* 08E2B0 8008D6B0 17000005 */ bnez $t8, .L8008D6C8 +/* 08E2B4 8008D6B4 00055040 */ sll $t2, $a1, 1 +/* 08E2B8 8008D6B8 849900AE */ lh $t9, 0xae($a0) +/* 08E2BC 8008D6BC 00001825 */ move $v1, $zero +/* 08E2C0 8008D6C0 10000010 */ b .L8008D704 +/* 08E2C4 8008D6C4 A499002E */ sh $t9, 0x2e($a0) +.L8008D6C8: +/* 08E2C8 8008D6C8 8488002E */ lh $t0, 0x2e($a0) +/* 08E2CC 8008D6CC 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 +/* 08E2D0 8008D6D0 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 +/* 08E2D4 8008D6D4 2509F8E4 */ addiu $t1, $t0, -0x71c +/* 08E2D8 8008D6D8 A489002E */ sh $t1, 0x2e($a0) +/* 08E2DC 8008D6DC 014B1021 */ addu $v0, $t2, $t3 +/* 08E2E0 8008D6E0 844C0000 */ lh $t4, ($v0) +/* 08E2E4 8008D6E4 2401071C */ li $at, 1820 +/* 08E2E8 8008D6E8 258DF8E4 */ addiu $t5, $t4, -0x71c +/* 08E2EC 8008D6EC 31A3FFFF */ andi $v1, $t5, 0xffff +/* 08E2F0 8008D6F0 0061001A */ div $zero, $v1, $at +/* 08E2F4 8008D6F4 00007012 */ mflo $t6 +/* 08E2F8 8008D6F8 000E7C00 */ sll $t7, $t6, 0x10 +/* 08E2FC 8008D6FC A44D0000 */ sh $t5, ($v0) +/* 08E300 8008D700 000F1C03 */ sra $v1, $t7, 0x10 +.L8008D704: +/* 08E304 8008D704 54600013 */ bnel $v1, $zero, .L8008D754 +/* 08E308 8008D708 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E30C 8008D70C 849900B2 */ lh $t9, 0xb2($a0) +/* 08E310 8008D710 2728FFFF */ addiu $t0, $t9, -1 +/* 08E314 8008D714 A48800B2 */ sh $t0, 0xb2($a0) +/* 08E318 8008D718 848200B2 */ lh $v0, 0xb2($a0) +/* 08E31C 8008D71C 1C400003 */ bgtz $v0, .L8008D72C +/* 08E320 8008D720 00000000 */ nop +/* 08E324 8008D724 A48000B2 */ sh $zero, 0xb2($a0) +/* 08E328 8008D728 848200B2 */ lh $v0, 0xb2($a0) +.L8008D72C: +/* 08E32C 8008D72C 54400009 */ bnel $v0, $zero, .L8008D754 +/* 08E330 8008D730 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E334 8008D734 8C8900BC */ lw $t1, 0xbc($a0) +/* 08E338 8008D738 24010008 */ li $at, 8 +/* 08E33C 8008D73C 312A0008 */ andi $t2, $t1, 8 +/* 08E340 8008D740 51410004 */ beql $t2, $at, .L8008D754 +/* 08E344 8008D744 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E348 8008D748 0C0235D8 */ jal func_8008D760 +/* 08E34C 8008D74C 00000000 */ nop +/* 08E350 8008D750 8FBF0014 */ lw $ra, 0x14($sp) +.L8008D754: +/* 08E354 8008D754 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08E358 8008D758 03E00008 */ jr $ra +/* 08E35C 8008D75C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D760.s b/asm/non_matchings/code_8008C1D0/func_8008D760.s new file mode 100644 index 000000000..21cd2b808 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D760.s @@ -0,0 +1,21 @@ +glabel func_8008D760 +/* 08E360 8008D760 8C8F00BC */ lw $t7, 0xbc($a0) +/* 08E364 8008D764 94990254 */ lhu $t9, 0x254($a0) +/* 08E368 8008D768 3C01FFF7 */ lui $at, (0xFFF7FFFF >> 16) # lui $at, 0xfff7 +/* 08E36C 8008D76C 848E00AE */ lh $t6, 0xae($a0) +/* 08E370 8008D770 3421FFFF */ ori $at, (0xFFF7FFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08E374 8008D774 01E1C024 */ and $t8, $t7, $at +/* 08E378 8008D778 94890000 */ lhu $t1, ($a0) +/* 08E37C 8008D77C 3C01800E */ lui $at, %hi(gKartGravityTable) +/* 08E380 8008D780 00194080 */ sll $t0, $t9, 2 +/* 08E384 8008D784 A48000A8 */ sh $zero, 0xa8($a0) +/* 08E388 8008D788 AC80007C */ sw $zero, 0x7c($a0) +/* 08E38C 8008D78C A48000C0 */ sh $zero, 0xc0($a0) +/* 08E390 8008D790 AC9800BC */ sw $t8, 0xbc($a0) +/* 08E394 8008D794 00280821 */ addu $at, $at, $t0 +/* 08E398 8008D798 A48E002E */ sh $t6, 0x2e($a0) +/* 08E39C 8008D79C C4242650 */ lwc1 $f4, %lo(gKartGravityTable)($at) +/* 08E3A0 8008D7A0 312AFF7F */ andi $t2, $t1, 0xff7f +/* 08E3A4 8008D7A4 A48A0000 */ sh $t2, ($a0) +/* 08E3A8 8008D7A8 03E00008 */ jr $ra +/* 08E3AC 8008D7AC E4840100 */ swc1 $f4, 0x100($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008D7B0.s b/asm/non_matchings/code_8008C1D0/func_8008D7B0.s new file mode 100644 index 000000000..768c8f6e6 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D7B0.s @@ -0,0 +1,67 @@ +glabel func_8008D7B0 +/* 08E3B0 8008D7B0 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E3B4 8008D7B4 AFA5001C */ sw $a1, 0x1c($sp) +/* 08E3B8 8008D7B8 00A07025 */ move $t6, $a1 +/* 08E3BC 8008D7BC 000E2E00 */ sll $a1, $t6, 0x18 +/* 08E3C0 8008D7C0 AFBF0014 */ sw $ra, 0x14($sp) +/* 08E3C4 8008D7C4 00057E03 */ sra $t7, $a1, 0x18 +/* 08E3C8 8008D7C8 01E02825 */ move $a1, $t7 +/* 08E3CC 8008D7CC A3AE001F */ sb $t6, 0x1f($sp) +/* 08E3D0 8008D7D0 0C0230D5 */ jal func_8008C354 +/* 08E3D4 8008D7D4 AFA40018 */ sw $a0, 0x18($sp) +/* 08E3D8 8008D7D8 8FA60018 */ lw $a2, 0x18($sp) +/* 08E3DC 8008D7DC 3C010080 */ lui $at, 0x80 +/* 08E3E0 8008D7E0 83A7001F */ lb $a3, 0x1f($sp) +/* 08E3E4 8008D7E4 8CD900BC */ lw $t9, 0xbc($a2) +/* 08E3E8 8008D7E8 8CCB000C */ lw $t3, 0xc($a2) +/* 08E3EC 8008D7EC 94C20254 */ lhu $v0, 0x254($a2) +/* 08E3F0 8008D7F0 03214025 */ or $t0, $t9, $at +/* 08E3F4 8008D7F4 2401FFEF */ li $at, -17 +/* 08E3F8 8008D7F8 01015024 */ and $t2, $t0, $at +/* 08E3FC 8008D7FC 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd +/* 08E400 8008D800 84D8002E */ lh $t8, 0x2e($a2) +/* 08E404 8008D804 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08E408 8008D808 01616024 */ and $t4, $t3, $at +/* 08E40C 8008D80C 3C01800E */ lui $at, %hi(D_800E3770) +/* 08E410 8008D810 ACC800BC */ sw $t0, 0xbc($a2) +/* 08E414 8008D814 00026880 */ sll $t5, $v0, 2 +/* 08E418 8008D818 002D0821 */ addu $at, $at, $t5 +/* 08E41C 8008D81C ACCA00BC */ sw $t2, 0xbc($a2) +/* 08E420 8008D820 ACCC000C */ sw $t4, 0xc($a2) +/* 08E424 8008D824 A4D800AE */ sh $t8, 0xae($a2) +/* 08E428 8008D828 C4243770 */ lwc1 $f4, %lo(D_800E3770)($at) +/* 08E42C 8008D82C 44803000 */ mtc1 $zero, $f6 +/* 08E430 8008D830 3C01800E */ lui $at, %hi(D_800E3750) +/* 08E434 8008D834 002D0821 */ addu $at, $at, $t5 +/* 08E438 8008D838 E4C400F0 */ swc1 $f4, 0xf0($a2) +/* 08E43C 8008D83C E4C600F4 */ swc1 $f6, 0xf4($a2) +/* 08E440 8008D840 C4283750 */ lwc1 $f8, %lo(D_800E3750)($at) +/* 08E444 8008D844 3C018019 */ lui $at, %hi(D_8018D920) # 0x8019 +/* 08E448 8008D848 00077040 */ sll $t6, $a3, 1 +/* 08E44C 8008D84C 002E0821 */ addu $at, $at, $t6 +/* 08E450 8008D850 E4C800EC */ swc1 $f8, 0xec($a2) +/* 08E454 8008D854 A420D920 */ sh $zero, %lo(D_8018D920)($at) # -0x26e0($at) +/* 08E458 8008D858 94C30000 */ lhu $v1, ($a2) +/* 08E45C 8008D85C 240F0004 */ li $t7, 4 +/* 08E460 8008D860 24014000 */ li $at, 16384 +/* 08E464 8008D864 30784000 */ andi $t8, $v1, 0x4000 +/* 08E468 8008D868 A4CF00B2 */ sh $t7, 0xb2($a2) +/* 08E46C 8008D86C A4C000C0 */ sh $zero, 0xc0($a2) +/* 08E470 8008D870 ACC0007C */ sw $zero, 0x7c($a2) +/* 08E474 8008D874 1701000B */ bne $t8, $at, .L8008D8A4 +/* 08E478 8008D878 A4C00078 */ sh $zero, 0x78($a2) +/* 08E47C 8008D87C 30790100 */ andi $t9, $v1, 0x100 +/* 08E480 8008D880 24010100 */ li $at, 256 +/* 08E484 8008D884 13210007 */ beq $t9, $at, .L8008D8A4 +/* 08E488 8008D888 30E400FF */ andi $a0, $a3, 0xff +/* 08E48C 8008D88C 94C50254 */ lhu $a1, 0x254($a2) +/* 08E490 8008D890 3C012900 */ lui $at, (0x29008003 >> 16) # lui $at, 0x2900 +/* 08E494 8008D894 34218003 */ ori $at, (0x29008003 & 0xFFFF) # ori $at, $at, 0x8003 +/* 08E498 8008D898 00054100 */ sll $t0, $a1, 4 +/* 08E49C 8008D89C 0C03243D */ jal func_800C90F4 +/* 08E4A0 8008D8A0 01012821 */ addu $a1, $t0, $at +.L8008D8A4: +/* 08E4A4 8008D8A4 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E4A8 8008D8A8 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08E4AC 8008D8AC 03E00008 */ jr $ra +/* 08E4B0 8008D8B0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D8B4.s b/asm/non_matchings/code_8008C1D0/func_8008D8B4.s new file mode 100644 index 000000000..bf8b96dd8 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D8B4.s @@ -0,0 +1,55 @@ +glabel func_8008D8B4 +/* 08E4B4 8008D8B4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E4B8 8008D8B8 AFBF0014 */ sw $ra, 0x14($sp) +/* 08E4BC 8008D8BC AFA5001C */ sw $a1, 0x1c($sp) +/* 08E4C0 8008D8C0 849800B2 */ lh $t8, 0xb2($a0) +/* 08E4C4 8008D8C4 00057600 */ sll $t6, $a1, 0x18 +/* 08E4C8 8008D8C8 000E2E03 */ sra $a1, $t6, 0x18 +/* 08E4CC 8008D8CC 17000005 */ bnez $t8, .L8008D8E4 +/* 08E4D0 8008D8D0 00055040 */ sll $t2, $a1, 1 +/* 08E4D4 8008D8D4 849900AE */ lh $t9, 0xae($a0) +/* 08E4D8 8008D8D8 00001825 */ move $v1, $zero +/* 08E4DC 8008D8DC 10000010 */ b .L8008D920 +/* 08E4E0 8008D8E0 A499002E */ sh $t9, 0x2e($a0) +.L8008D8E4: +/* 08E4E4 8008D8E4 8488002E */ lh $t0, 0x2e($a0) +/* 08E4E8 8008D8E8 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 +/* 08E4EC 8008D8EC 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 +/* 08E4F0 8008D8F0 2509F8E4 */ addiu $t1, $t0, -0x71c +/* 08E4F4 8008D8F4 A489002E */ sh $t1, 0x2e($a0) +/* 08E4F8 8008D8F8 014B1021 */ addu $v0, $t2, $t3 +/* 08E4FC 8008D8FC 844C0000 */ lh $t4, ($v0) +/* 08E500 8008D900 2401071C */ li $at, 1820 +/* 08E504 8008D904 258DF8E4 */ addiu $t5, $t4, -0x71c +/* 08E508 8008D908 31A3FFFF */ andi $v1, $t5, 0xffff +/* 08E50C 8008D90C 0061001A */ div $zero, $v1, $at +/* 08E510 8008D910 00007012 */ mflo $t6 +/* 08E514 8008D914 000E7C00 */ sll $t7, $t6, 0x10 +/* 08E518 8008D918 A44D0000 */ sh $t5, ($v0) +/* 08E51C 8008D91C 000F1C03 */ sra $v1, $t7, 0x10 +.L8008D920: +/* 08E520 8008D920 54600013 */ bnel $v1, $zero, .L8008D970 +/* 08E524 8008D924 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E528 8008D928 849900B2 */ lh $t9, 0xb2($a0) +/* 08E52C 8008D92C 2728FFFF */ addiu $t0, $t9, -1 +/* 08E530 8008D930 A48800B2 */ sh $t0, 0xb2($a0) +/* 08E534 8008D934 848200B2 */ lh $v0, 0xb2($a0) +/* 08E538 8008D938 1C400003 */ bgtz $v0, .L8008D948 +/* 08E53C 8008D93C 00000000 */ nop +/* 08E540 8008D940 A48000B2 */ sh $zero, 0xb2($a0) +/* 08E544 8008D944 848200B2 */ lh $v0, 0xb2($a0) +.L8008D948: +/* 08E548 8008D948 54400009 */ bnel $v0, $zero, .L8008D970 +/* 08E54C 8008D94C 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E550 8008D950 8C8900BC */ lw $t1, 0xbc($a0) +/* 08E554 8008D954 24010008 */ li $at, 8 +/* 08E558 8008D958 312A0008 */ andi $t2, $t1, 8 +/* 08E55C 8008D95C 51410004 */ beql $t2, $at, .L8008D970 +/* 08E560 8008D960 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E564 8008D964 0C02365F */ jal func_8008D97C +/* 08E568 8008D968 00000000 */ nop +/* 08E56C 8008D96C 8FBF0014 */ lw $ra, 0x14($sp) +.L8008D970: +/* 08E570 8008D970 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08E574 8008D974 03E00008 */ jr $ra +/* 08E578 8008D978 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008D97C.s b/asm/non_matchings/code_8008C1D0/func_8008D97C.s new file mode 100644 index 000000000..0bfa8a901 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D97C.s @@ -0,0 +1,18 @@ +glabel func_8008D97C +/* 08E57C 8008D97C 8C8F00BC */ lw $t7, 0xbc($a0) +/* 08E580 8008D980 94990254 */ lhu $t9, 0x254($a0) +/* 08E584 8008D984 3C01FF7F */ lui $at, (0xFF7FFFFF >> 16) # lui $at, 0xff7f +/* 08E588 8008D988 848E00AE */ lh $t6, 0xae($a0) +/* 08E58C 8008D98C 3421FFFF */ ori $at, (0xFF7FFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08E590 8008D990 01E1C024 */ and $t8, $t7, $at +/* 08E594 8008D994 3C01800E */ lui $at, %hi(gKartGravityTable) +/* 08E598 8008D998 00194080 */ sll $t0, $t9, 2 +/* 08E59C 8008D99C A48000A8 */ sh $zero, 0xa8($a0) +/* 08E5A0 8008D9A0 AC80007C */ sw $zero, 0x7c($a0) +/* 08E5A4 8008D9A4 A48000C0 */ sh $zero, 0xc0($a0) +/* 08E5A8 8008D9A8 AC9800BC */ sw $t8, 0xbc($a0) +/* 08E5AC 8008D9AC 00280821 */ addu $at, $at, $t0 +/* 08E5B0 8008D9B0 A48E002E */ sh $t6, 0x2e($a0) +/* 08E5B4 8008D9B4 C4242650 */ lwc1 $f4, %lo(gKartGravityTable)($at) +/* 08E5B8 8008D9B8 03E00008 */ jr $ra +/* 08E5BC 8008D9BC E4840100 */ swc1 $f4, 0x100($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008D9C0.s b/asm/non_matchings/code_8008C1D0/func_8008D9C0.s new file mode 100644 index 000000000..b82164643 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008D9C0.s @@ -0,0 +1,67 @@ +glabel func_8008D9C0 +/* 08E5C0 8008D9C0 3C01430C */ li $at, 0x430C0000 # 140.000000 +/* 08E5C4 8008D9C4 44810000 */ mtc1 $at, $f0 +/* 08E5C8 8008D9C8 3C014100 */ li $at, 0x41000000 # 8.000000 +/* 08E5CC 8008D9CC 44813000 */ mtc1 $at, $f6 +/* 08E5D0 8008D9D0 C4840DA0 */ lwc1 $f4, 0xda0($a0) +/* 08E5D4 8008D9D4 46062200 */ add.s $f8, $f4, $f6 +/* 08E5D8 8008D9D8 E4880DA0 */ swc1 $f8, 0xda0($a0) +/* 08E5DC 8008D9DC C48A0DA0 */ lwc1 $f10, 0xda0($a0) +/* 08E5E0 8008D9E0 460A003E */ c.le.s $f0, $f10 +/* 08E5E4 8008D9E4 00000000 */ nop +/* 08E5E8 8008D9E8 45020003 */ bc1fl .L8008D9F8 +/* 08E5EC 8008D9EC 848E0D98 */ lh $t6, 0xd98($a0) +/* 08E5F0 8008D9F0 E4800DA0 */ swc1 $f0, 0xda0($a0) +/* 08E5F4 8008D9F4 848E0D98 */ lh $t6, 0xd98($a0) +.L8008D9F8: +/* 08E5F8 8008D9F8 24010001 */ li $at, 1 +/* 08E5FC 8008D9FC 55C10017 */ bnel $t6, $at, .L8008DA5C +/* 08E600 8008DA00 84990D98 */ lh $t9, 0xd98($a0) +/* 08E604 8008DA04 C4900D9C */ lwc1 $f16, 0xd9c($a0) +/* 08E608 8008DA08 C4920DA0 */ lwc1 $f18, 0xda0($a0) +/* 08E60C 8008DA0C 3C01800F */ lui $at, %hi(D_800EF568) # $at, 0x800f +/* 08E610 8008DA10 46128100 */ add.s $f4, $f16, $f18 +/* 08E614 8008DA14 E4840D9C */ swc1 $f4, 0xd9c($a0) +/* 08E618 8008DA18 C428F568 */ lwc1 $f8, %lo(D_800EF568)($at) +/* 08E61C 8008DA1C C4860D9C */ lwc1 $f6, 0xd9c($a0) +/* 08E620 8008DA20 4606403E */ c.le.s $f8, $f6 +/* 08E624 8008DA24 00000000 */ nop +/* 08E628 8008DA28 4502000C */ bc1fl .L8008DA5C +/* 08E62C 8008DA2C 84990D98 */ lh $t9, 0xd98($a0) +/* 08E630 8008DA30 848F0D98 */ lh $t7, 0xd98($a0) +/* 08E634 8008DA34 2402FFFF */ li $v0, -1 +/* 08E638 8008DA38 3C014120 */ li $at, 0x41200000 # 10.000000 +/* 08E63C 8008DA3C 01E20019 */ multu $t7, $v0 +/* 08E640 8008DA40 44815000 */ mtc1 $at, $f10 +/* 08E644 8008DA44 00000000 */ nop +/* 08E648 8008DA48 E48A0DA0 */ swc1 $f10, 0xda0($a0) +/* 08E64C 8008DA4C 0000C012 */ mflo $t8 +/* 08E650 8008DA50 A4980D98 */ sh $t8, 0xd98($a0) +/* 08E654 8008DA54 00000000 */ nop +/* 08E658 8008DA58 84990D98 */ lh $t9, 0xd98($a0) +.L8008DA5C: +/* 08E65C 8008DA5C 2402FFFF */ li $v0, -1 +/* 08E660 8008DA60 14590014 */ bne $v0, $t9, .L8008DAB4 +/* 08E664 8008DA64 00000000 */ nop +/* 08E668 8008DA68 C4900D9C */ lwc1 $f16, 0xd9c($a0) +/* 08E66C 8008DA6C C4920DA0 */ lwc1 $f18, 0xda0($a0) +/* 08E670 8008DA70 3C01800F */ lui $at, %hi(D_800EF56C) # $at, 0x800f +/* 08E674 8008DA74 46128101 */ sub.s $f4, $f16, $f18 +/* 08E678 8008DA78 E4840D9C */ swc1 $f4, 0xd9c($a0) +/* 08E67C 8008DA7C C4880D9C */ lwc1 $f8, 0xd9c($a0) +/* 08E680 8008DA80 C426F56C */ lwc1 $f6, %lo(D_800EF56C)($at) +/* 08E684 8008DA84 4606403E */ c.le.s $f8, $f6 +/* 08E688 8008DA88 00000000 */ nop +/* 08E68C 8008DA8C 45000009 */ bc1f .L8008DAB4 +/* 08E690 8008DA90 00000000 */ nop +/* 08E694 8008DA94 84880D98 */ lh $t0, 0xd98($a0) +/* 08E698 8008DA98 3C014120 */ li $at, 0x41200000 # 10.000000 +/* 08E69C 8008DA9C 44815000 */ mtc1 $at, $f10 +/* 08E6A0 8008DAA0 01020019 */ multu $t0, $v0 +/* 08E6A4 8008DAA4 E48A0DA0 */ swc1 $f10, 0xda0($a0) +/* 08E6A8 8008DAA8 00004812 */ mflo $t1 +/* 08E6AC 8008DAAC A4890D98 */ sh $t1, 0xd98($a0) +/* 08E6B0 8008DAB0 00000000 */ nop +.L8008DAB4: +/* 08E6B4 8008DAB4 03E00008 */ jr $ra +/* 08E6B8 8008DAB8 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008DABC.s b/asm/non_matchings/code_8008C1D0/func_8008DABC.s new file mode 100644 index 000000000..a10d4075a --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008DABC.s @@ -0,0 +1,88 @@ +glabel func_8008DABC +/* 08E6BC 8008DABC 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E6C0 8008DAC0 AFA5001C */ sw $a1, 0x1c($sp) +/* 08E6C4 8008DAC4 00A07025 */ move $t6, $a1 +/* 08E6C8 8008DAC8 000E2E00 */ sll $a1, $t6, 0x18 +/* 08E6CC 8008DACC AFBF0014 */ sw $ra, 0x14($sp) +/* 08E6D0 8008DAD0 00057E03 */ sra $t7, $a1, 0x18 +/* 08E6D4 8008DAD4 01E02825 */ move $a1, $t7 +/* 08E6D8 8008DAD8 A3AE001F */ sb $t6, 0x1f($sp) +/* 08E6DC 8008DADC 0C0230D5 */ jal func_8008C354 +/* 08E6E0 8008DAE0 AFA40018 */ sw $a0, 0x18($sp) +/* 08E6E4 8008DAE4 8FA60018 */ lw $a2, 0x18($sp) +/* 08E6E8 8008DAE8 83A7001F */ lb $a3, 0x1f($sp) +/* 08E6EC 8008DAEC 3C080400 */ lui $t0, 0x400 +/* 08E6F0 8008DAF0 8CD800BC */ lw $t8, 0xbc($a2) +/* 08E6F4 8008DAF4 24030001 */ li $v1, 1 +/* 08E6F8 8008DAF8 3C014090 */ li $at, 0x40900000 # 4.500000 +/* 08E6FC 8008DAFC 0018C940 */ sll $t9, $t8, 5 +/* 08E700 8008DB00 0720003D */ bltz $t9, .L8008DBF8 +/* 08E704 8008DB04 00074880 */ sll $t1, $a3, 2 +/* 08E708 8008DB08 44812000 */ mtc1 $at, $f4 +/* 08E70C 8008DB0C 3C018019 */ lui $at, %hi(D_8018D990) # 0x8019 +/* 08E710 8008DB10 A4C00DB6 */ sh $zero, 0xdb6($a2) +/* 08E714 8008DB14 A4C00238 */ sh $zero, 0x238($a2) +/* 08E718 8008DB18 00290821 */ addu $at, $at, $t1 +/* 08E71C 8008DB1C E4C40DC4 */ swc1 $f4, 0xdc4($a2) +/* 08E720 8008DB20 AC20D990 */ sw $zero, %lo(D_8018D990)($at) # -0x2670($at) +/* 08E724 8008DB24 8CCA00BC */ lw $t2, 0xbc($a2) +/* 08E728 8008DB28 3C01F7FF */ lui $at, (0xF7FFFFEF >> 16) # lui $at, 0xf7ff +/* 08E72C 8008DB2C 3421FFEF */ ori $at, (0xF7FFFFEF & 0xFFFF) # ori $at, $at, 0xffef +/* 08E730 8008DB30 3C0D8016 */ lui $t5, %hi(D_80165190) # $t5, 0x8016 +/* 08E734 8008DB34 25AD5190 */ addiu $t5, %lo(D_80165190) # addiu $t5, $t5, 0x5190 +/* 08E738 8008DB38 00076040 */ sll $t4, $a3, 1 +/* 08E73C 8008DB3C 01415824 */ and $t3, $t2, $at +/* 08E740 8008DB40 ACCB00BC */ sw $t3, 0xbc($a2) +/* 08E744 8008DB44 018D1021 */ addu $v0, $t4, $t5 +/* 08E748 8008DB48 A4430000 */ sh $v1, ($v0) +/* 08E74C 8008DB4C A4430010 */ sh $v1, 0x10($v0) +/* 08E750 8008DB50 A4430020 */ sh $v1, 0x20($v0) +/* 08E754 8008DB54 A4430030 */ sh $v1, 0x30($v0) +/* 08E758 8008DB58 8CCE000C */ lw $t6, 0xc($a2) +/* 08E75C 8008DB5C 3C014282 */ li $at, 0x42820000 # 65.000000 +/* 08E760 8008DB60 44803000 */ mtc1 $zero, $f6 +/* 08E764 8008DB64 44814000 */ mtc1 $at, $f8 +/* 08E768 8008DB68 31CF0100 */ andi $t7, $t6, 0x100 +/* 08E76C 8008DB6C A4C30D98 */ sh $v1, 0xd98($a2) +/* 08E770 8008DB70 E4C60D9C */ swc1 $f6, 0xd9c($a2) +/* 08E774 8008DB74 11E00004 */ beqz $t7, .L8008DB88 +/* 08E778 8008DB78 E4C80DA0 */ swc1 $f8, 0xda0($a2) +/* 08E77C 8008DB7C 94D80046 */ lhu $t8, 0x46($a2) +/* 08E780 8008DB80 37190080 */ ori $t9, $t8, 0x80 +/* 08E784 8008DB84 A4D90046 */ sh $t9, 0x46($a2) +.L8008DB88: +/* 08E788 8008DB88 94C20000 */ lhu $v0, ($a2) +/* 08E78C 8008DB8C 30494000 */ andi $t1, $v0, 0x4000 +/* 08E790 8008DB90 51200012 */ beql $t1, $zero, .L8008DBDC +/* 08E794 8008DB94 8CCD00BC */ lw $t5, 0xbc($a2) +/* 08E798 8008DB98 8CCA00BC */ lw $t2, 0xbc($a2) +/* 08E79C 8008DB9C 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900 +/* 08E7A0 8008DBA0 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005 +/* 08E7A4 8008DBA4 01485824 */ and $t3, $t2, $t0 +/* 08E7A8 8008DBA8 1560000B */ bnez $t3, .L8008DBD8 +/* 08E7AC 8008DBAC 30E400FF */ andi $a0, $a3, 0xff +/* 08E7B0 8008DBB0 94C50254 */ lhu $a1, 0x254($a2) +/* 08E7B4 8008DBB4 A3A7001F */ sb $a3, 0x1f($sp) +/* 08E7B8 8008DBB8 AFA60018 */ sw $a2, 0x18($sp) +/* 08E7BC 8008DBBC 00056100 */ sll $t4, $a1, 4 +/* 08E7C0 8008DBC0 0C03243D */ jal func_800C90F4 +/* 08E7C4 8008DBC4 01812821 */ addu $a1, $t4, $at +/* 08E7C8 8008DBC8 8FA60018 */ lw $a2, 0x18($sp) +/* 08E7CC 8008DBCC 83A7001F */ lb $a3, 0x1f($sp) +/* 08E7D0 8008DBD0 3C080400 */ lui $t0, 0x400 +/* 08E7D4 8008DBD4 94C20000 */ lhu $v0, ($a2) +.L8008DBD8: +/* 08E7D8 8008DBD8 8CCD00BC */ lw $t5, 0xbc($a2) +.L8008DBDC: +/* 08E7DC 8008DBDC 304F1000 */ andi $t7, $v0, 0x1000 +/* 08E7E0 8008DBE0 00E02025 */ move $a0, $a3 +/* 08E7E4 8008DBE4 01A87025 */ or $t6, $t5, $t0 +/* 08E7E8 8008DBE8 11E00003 */ beqz $t7, .L8008DBF8 +/* 08E7EC 8008DBEC ACCE00BC */ sw $t6, 0xbc($a2) +/* 08E7F0 8008DBF0 0C00263F */ jal func_800098FC +/* 08E7F4 8008DBF4 00C02825 */ move $a1, $a2 +.L8008DBF8: +/* 08E7F8 8008DBF8 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E7FC 8008DBFC 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08E800 8008DC00 03E00008 */ jr $ra +/* 08E804 8008DC04 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008DC08.s b/asm/non_matchings/code_8008C1D0/func_8008DC08.s new file mode 100644 index 000000000..ad9f3f64a --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008DC08.s @@ -0,0 +1,246 @@ +glabel func_8008DC08 +/* 08E808 8008DC08 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08E80C 8008DC0C AFBF0014 */ sw $ra, 0x14($sp) +/* 08E810 8008DC10 AFA5001C */ sw $a1, 0x1c($sp) +/* 08E814 8008DC14 3C014416 */ li $at, 0x44160000 # 600.000000 +/* 08E818 8008DC18 44810000 */ mtc1 $at, $f0 +/* 08E81C 8008DC1C C4840124 */ lwc1 $f4, 0x124($a0) +/* 08E820 8008DC20 44806000 */ mtc1 $zero, $f12 +/* 08E824 8008DC24 00053E00 */ sll $a3, $a1, 0x18 +/* 08E828 8008DC28 4604003E */ c.le.s $f0, $f4 +/* 08E82C 8008DC2C 00077603 */ sra $t6, $a3, 0x18 +/* 08E830 8008DC30 01C03825 */ move $a3, $t6 +/* 08E834 8008DC34 00803025 */ move $a2, $a0 +/* 08E838 8008DC38 A48000C2 */ sh $zero, 0xc2($a0) +/* 08E83C 8008DC3C A48000A8 */ sh $zero, 0xa8($a0) +/* 08E840 8008DC40 AC80007C */ sw $zero, 0x7c($a0) +/* 08E844 8008DC44 A48000C0 */ sh $zero, 0xc0($a0) +/* 08E848 8008DC48 E48C008C */ swc1 $f12, 0x8c($a0) +/* 08E84C 8008DC4C 45010004 */ bc1t .L8008DC60 +/* 08E850 8008DC50 E48C009C */ swc1 $f12, 0x9c($a0) +/* 08E854 8008DC54 8C8F00BC */ lw $t7, 0xbc($a0) +/* 08E858 8008DC58 31F81000 */ andi $t8, $t7, 0x1000 +/* 08E85C 8008DC5C 13000005 */ beqz $t8, .L8008DC74 +.L8008DC60: +/* 08E860 8008DC60 0007C880 */ sll $t9, $a3, 2 +/* 08E864 8008DC64 3C018019 */ lui $at, %hi(D_8018D990) # 0x8019 +/* 08E868 8008DC68 00390821 */ addu $at, $at, $t9 +/* 08E86C 8008DC6C 24050003 */ li $a1, 3 +/* 08E870 8008DC70 AC25D990 */ sw $a1, %lo(D_8018D990)($at) # -0x2670($at) +.L8008DC74: +/* 08E874 8008DC74 3C098019 */ lui $t1, %hi(D_8018D990) # $t1, 0x8019 +/* 08E878 8008DC78 2529D990 */ addiu $t1, %lo(D_8018D990) # addiu $t1, $t1, -0x2670 +/* 08E87C 8008DC7C 00074080 */ sll $t0, $a3, 2 +/* 08E880 8008DC80 01091821 */ addu $v1, $t0, $t1 +/* 08E884 8008DC84 8C620000 */ lw $v0, ($v1) +/* 08E888 8008DC88 24050003 */ li $a1, 3 +/* 08E88C 8008DC8C 24040001 */ li $a0, 1 +/* 08E890 8008DC90 5040000B */ beql $v0, $zero, .L8008DCC0 +/* 08E894 8008DC94 84C20238 */ lh $v0, 0x238($a2) +/* 08E898 8008DC98 10440037 */ beq $v0, $a0, .L8008DD78 +/* 08E89C 8008DC9C 3C014090 */ lui $at, 0x4090 +/* 08E8A0 8008DCA0 24010002 */ li $at, 2 +/* 08E8A4 8008DCA4 50410070 */ beql $v0, $at, .L8008DE68 +/* 08E8A8 8008DCA8 84CC0238 */ lh $t4, 0x238($a2) +/* 08E8AC 8008DCAC 1045008F */ beq $v0, $a1, .L8008DEEC +/* 08E8B0 8008DCB0 3C014040 */ li $at, 0x40400000 # 3.000000 +/* 08E8B4 8008DCB4 100000B5 */ b .L8008DF8C +/* 08E8B8 8008DCB8 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E8BC 8008DCBC 84C20238 */ lh $v0, 0x238($a2) +.L8008DCC0: +/* 08E8C0 8008DCC0 3C014090 */ li $at, 0x40900000 # 4.500000 +/* 08E8C4 8008DCC4 44813000 */ mtc1 $at, $f6 +/* 08E8C8 8008DCC8 2841003D */ slti $at, $v0, 0x3d +/* 08E8CC 8008DCCC 10200003 */ beqz $at, .L8008DCDC +/* 08E8D0 8008DCD0 E4C60DC4 */ swc1 $f6, 0xdc4($a2) +/* 08E8D4 8008DCD4 244A0001 */ addiu $t2, $v0, 1 +/* 08E8D8 8008DCD8 A4CA0238 */ sh $t2, 0x238($a2) +.L8008DCDC: +/* 08E8DC 8008DCDC 94CB0046 */ lhu $t3, 0x46($a2) +/* 08E8E0 8008DCE0 316C0080 */ andi $t4, $t3, 0x80 +/* 08E8E4 8008DCE4 51800012 */ beql $t4, $zero, .L8008DD30 +/* 08E8E8 8008DCE8 84D90238 */ lh $t9, 0x238($a2) +/* 08E8EC 8008DCEC 8CCD000C */ lw $t5, 0xc($a2) +/* 08E8F0 8008DCF0 24040001 */ li $a0, 1 +/* 08E8F4 8008DCF4 31AE0100 */ andi $t6, $t5, 0x100 +/* 08E8F8 8008DCF8 55C000A4 */ bnel $t6, $zero, .L8008DF8C +/* 08E8FC 8008DCFC 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E900 8008DD00 AC640000 */ sw $a0, ($v1) +/* 08E904 8008DD04 94CF0000 */ lhu $t7, ($a2) +/* 08E908 8008DD08 A4C00238 */ sh $zero, 0x238($a2) +/* 08E90C 8008DD0C 30E400FF */ andi $a0, $a3, 0xff +/* 08E910 8008DD10 31F84000 */ andi $t8, $t7, 0x4000 +/* 08E914 8008DD14 1300009C */ beqz $t8, .L8008DF88 +/* 08E918 8008DD18 3C051901 */ lui $a1, (0x1901904B >> 16) # lui $a1, 0x1901 +/* 08E91C 8008DD1C 0C032418 */ jal func_800C9060 +/* 08E920 8008DD20 34A5904B */ ori $a1, (0x1901904B & 0xFFFF) # ori $a1, $a1, 0x904b +/* 08E924 8008DD24 10000099 */ b .L8008DF8C +/* 08E928 8008DD28 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E92C 8008DD2C 84D90238 */ lh $t9, 0x238($a2) +.L8008DD30: +/* 08E930 8008DD30 24040001 */ li $a0, 1 +/* 08E934 8008DD34 27280001 */ addiu $t0, $t9, 1 +/* 08E938 8008DD38 A4C80238 */ sh $t0, 0x238($a2) +/* 08E93C 8008DD3C 84C90238 */ lh $t1, 0x238($a2) +/* 08E940 8008DD40 2921001E */ slti $at, $t1, 0x1e +/* 08E944 8008DD44 54200091 */ bnel $at, $zero, .L8008DF8C +/* 08E948 8008DD48 8FBF0014 */ lw $ra, 0x14($sp) +/* 08E94C 8008DD4C AC640000 */ sw $a0, ($v1) +/* 08E950 8008DD50 94CA0000 */ lhu $t2, ($a2) +/* 08E954 8008DD54 A4C00238 */ sh $zero, 0x238($a2) +/* 08E958 8008DD58 30E400FF */ andi $a0, $a3, 0xff +/* 08E95C 8008DD5C 314B4000 */ andi $t3, $t2, 0x4000 +/* 08E960 8008DD60 11600089 */ beqz $t3, .L8008DF88 +/* 08E964 8008DD64 3C051901 */ lui $a1, (0x1901904B >> 16) # lui $a1, 0x1901 +/* 08E968 8008DD68 0C032418 */ jal func_800C9060 +/* 08E96C 8008DD6C 34A5904B */ ori $a1, (0x1901904B & 0xFFFF) # ori $a1, $a1, 0x904b +/* 08E970 8008DD70 10000086 */ b .L8008DF8C +/* 08E974 8008DD74 8FBF0014 */ lw $ra, 0x14($sp) +.L8008DD78: +/* 08E978 8008DD78 44814000 */ mtc1 $at, $f8 +/* 08E97C 8008DD7C C4CA0018 */ lwc1 $f10, 0x18($a2) +/* 08E980 8008DD80 3C01800F */ lui $at, %hi(D_800EF570) +/* 08E984 8008DD84 E4C80DC4 */ swc1 $f8, 0xdc4($a2) +/* 08E988 8008DD88 D432F570 */ ldc1 $f18, %lo(D_800EF570)($at) +/* 08E98C 8008DD8C 46005421 */ cvt.d.s $f16, $f10 +/* 08E990 8008DD90 84CC0238 */ lh $t4, 0x238($a2) +/* 08E994 8008DD94 46328100 */ add.d $f4, $f16, $f18 +/* 08E998 8008DD98 94CE0046 */ lhu $t6, 0x46($a2) +/* 08E99C 8008DD9C 258D0001 */ addiu $t5, $t4, 1 +/* 08E9A0 8008DDA0 A4CD0238 */ sh $t5, 0x238($a2) +/* 08E9A4 8008DDA4 462021A0 */ cvt.s.d $f6, $f4 +/* 08E9A8 8008DDA8 31CF0080 */ andi $t7, $t6, 0x80 +/* 08E9AC 8008DDAC 11E0000C */ beqz $t7, .L8008DDE0 +/* 08E9B0 8008DDB0 E4C60018 */ swc1 $f6, 0x18($a2) +/* 08E9B4 8008DDB4 84D80238 */ lh $t8, 0x238($a2) +/* 08E9B8 8008DDB8 24190002 */ li $t9, 2 +/* 08E9BC 8008DDBC 2B010032 */ slti $at, $t8, 0x32 +/* 08E9C0 8008DDC0 5420000F */ bnel $at, $zero, .L8008DE00 +/* 08E9C4 8008DDC4 3C0142B4 */ lui $at, 0x42b4 +/* 08E9C8 8008DDC8 AC790000 */ sw $t9, ($v1) +/* 08E9CC 8008DDCC 94C80046 */ lhu $t0, 0x46($a2) +/* 08E9D0 8008DDD0 A4C00238 */ sh $zero, 0x238($a2) +/* 08E9D4 8008DDD4 3109FF7F */ andi $t1, $t0, 0xff7f +/* 08E9D8 8008DDD8 10000008 */ b .L8008DDFC +/* 08E9DC 8008DDDC A4C90046 */ sh $t1, 0x46($a2) +.L8008DDE0: +/* 08E9E0 8008DDE0 84CA0238 */ lh $t2, 0x238($a2) +/* 08E9E4 8008DDE4 240B0002 */ li $t3, 2 +/* 08E9E8 8008DDE8 29410050 */ slti $at, $t2, 0x50 +/* 08E9EC 8008DDEC 54200004 */ bnel $at, $zero, .L8008DE00 +/* 08E9F0 8008DDF0 3C0142B4 */ lui $at, 0x42b4 +/* 08E9F4 8008DDF4 AC6B0000 */ sw $t3, ($v1) +/* 08E9F8 8008DDF8 A4C00238 */ sh $zero, 0x238($a2) +.L8008DDFC: +/* 08E9FC 8008DDFC 3C0142B4 */ li $at, 0x42B40000 # 90.000000 +.L8008DE00: +/* 08EA00 8008DE00 44811000 */ mtc1 $at, $f2 +/* 08EA04 8008DE04 3C0140C0 */ li $at, 0x40C00000 # 6.000000 +/* 08EA08 8008DE08 44815000 */ mtc1 $at, $f10 +/* 08EA0C 8008DE0C C4C80DA0 */ lwc1 $f8, 0xda0($a2) +/* 08EA10 8008DE10 460A4400 */ add.s $f16, $f8, $f10 +/* 08EA14 8008DE14 E4D00DA0 */ swc1 $f16, 0xda0($a2) +/* 08EA18 8008DE18 C4C00DA0 */ lwc1 $f0, 0xda0($a2) +/* 08EA1C 8008DE1C 4600103E */ c.le.s $f2, $f0 +/* 08EA20 8008DE20 00000000 */ nop +/* 08EA24 8008DE24 45020004 */ bc1fl .L8008DE38 +/* 08EA28 8008DE28 C4D20D9C */ lwc1 $f18, 0xd9c($a2) +/* 08EA2C 8008DE2C E4C20DA0 */ swc1 $f2, 0xda0($a2) +/* 08EA30 8008DE30 C4C00DA0 */ lwc1 $f0, 0xda0($a2) +/* 08EA34 8008DE34 C4D20D9C */ lwc1 $f18, 0xd9c($a2) +.L8008DE38: +/* 08EA38 8008DE38 3C01800F */ lui $at, %hi(D_800EF578) # $at, 0x800f +/* 08EA3C 8008DE3C 46009100 */ add.s $f4, $f18, $f0 +/* 08EA40 8008DE40 E4C40D9C */ swc1 $f4, 0xd9c($a2) +/* 08EA44 8008DE44 C428F578 */ lwc1 $f8, %lo(D_800EF578)($at) +/* 08EA48 8008DE48 C4C60D9C */ lwc1 $f6, 0xd9c($a2) +/* 08EA4C 8008DE4C 4606403E */ c.le.s $f8, $f6 +/* 08EA50 8008DE50 00000000 */ nop +/* 08EA54 8008DE54 4502004D */ bc1fl .L8008DF8C +/* 08EA58 8008DE58 8FBF0014 */ lw $ra, 0x14($sp) +/* 08EA5C 8008DE5C 1000004A */ b .L8008DF88 +/* 08EA60 8008DE60 E4CC0DA0 */ swc1 $f12, 0xda0($a2) +/* 08EA64 8008DE64 84CC0238 */ lh $t4, 0x238($a2) +.L8008DE68: +/* 08EA68 8008DE68 258D0001 */ addiu $t5, $t4, 1 +/* 08EA6C 8008DE6C A4CD0238 */ sh $t5, 0x238($a2) +/* 08EA70 8008DE70 84CE0238 */ lh $t6, 0x238($a2) +/* 08EA74 8008DE74 29C10259 */ slti $at, $t6, 0x259 +/* 08EA78 8008DE78 54200004 */ bnel $at, $zero, .L8008DE8C +/* 08EA7C 8008DE7C C4CA0124 */ lwc1 $f10, 0x124($a2) +/* 08EA80 8008DE80 AC650000 */ sw $a1, ($v1) +/* 08EA84 8008DE84 A4C00238 */ sh $zero, 0x238($a2) +/* 08EA88 8008DE88 C4CA0124 */ lwc1 $f10, 0x124($a2) +.L8008DE8C: +/* 08EA8C 8008DE8C 3C014090 */ li $at, 0x40900000 # 4.500000 +/* 08EA90 8008DE90 44818000 */ mtc1 $at, $f16 +/* 08EA94 8008DE94 460A003E */ c.le.s $f0, $f10 +/* 08EA98 8008DE98 3C01800F */ lui $at, %hi(D_800EF580) +/* 08EA9C 8008DE9C 45020003 */ bc1fl .L8008DEAC +/* 08EAA0 8008DEA0 C4D20018 */ lwc1 $f18, 0x18($a2) +/* 08EAA4 8008DEA4 AC650000 */ sw $a1, ($v1) +/* 08EAA8 8008DEA8 C4D20018 */ lwc1 $f18, 0x18($a2) +.L8008DEAC: +/* 08EAAC 8008DEAC E4D00DC4 */ swc1 $f16, 0xdc4($a2) +/* 08EAB0 8008DEB0 D426F580 */ ldc1 $f6, %lo(D_800EF580)($at) +/* 08EAB4 8008DEB4 46009121 */ cvt.d.s $f4, $f18 +/* 08EAB8 8008DEB8 8CCF00BC */ lw $t7, 0xbc($a2) +/* 08EABC 8008DEBC 46262201 */ sub.d $f8, $f4, $f6 +/* 08EAC0 8008DEC0 24010008 */ li $at, 8 +/* 08EAC4 8008DEC4 31F80008 */ andi $t8, $t7, 8 +/* 08EAC8 8008DEC8 462042A0 */ cvt.s.d $f10, $f8 +/* 08EACC 8008DECC 13010003 */ beq $t8, $at, .L8008DEDC +/* 08EAD0 8008DED0 E4CA0018 */ swc1 $f10, 0x18($a2) +/* 08EAD4 8008DED4 AC650000 */ sw $a1, ($v1) +/* 08EAD8 8008DED8 A4C00238 */ sh $zero, 0x238($a2) +.L8008DEDC: +/* 08EADC 8008DEDC 0C023670 */ jal func_8008D9C0 +/* 08EAE0 8008DEE0 00C02025 */ move $a0, $a2 +/* 08EAE4 8008DEE4 10000029 */ b .L8008DF8C +/* 08EAE8 8008DEE8 8FBF0014 */ lw $ra, 0x14($sp) +.L8008DEEC: +/* 08EAEC 8008DEEC 44818000 */ mtc1 $at, $f16 +/* 08EAF0 8008DEF0 8CD900BC */ lw $t9, 0xbc($a2) +/* 08EAF4 8008DEF4 3C01FBFF */ lui $at, (0xFBFFFFFF >> 16) # lui $at, 0xfbff +/* 08EAF8 8008DEF8 3421FFFF */ ori $at, (0xFBFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08EAFC 8008DEFC 03214024 */ and $t0, $t9, $at +/* 08EB00 8008DF00 3C010800 */ lui $at, 0x800 +/* 08EB04 8008DF04 01015025 */ or $t2, $t0, $at +/* 08EB08 8008DF08 94CB0254 */ lhu $t3, 0x254($a2) +/* 08EB0C 8008DF0C 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08EB10 8008DF10 44819000 */ mtc1 $at, $f18 +/* 08EB14 8008DF14 ACC800BC */ sw $t0, 0xbc($a2) +/* 08EB18 8008DF18 3C01800E */ lui $at, %hi(gKartBoundingBoxTable) +/* 08EB1C 8008DF1C 000B6080 */ sll $t4, $t3, 2 +/* 08EB20 8008DF20 A4C00DB6 */ sh $zero, 0xdb6($a2) +/* 08EB24 8008DF24 ACCA00BC */ sw $t2, 0xbc($a2) +/* 08EB28 8008DF28 002C0821 */ addu $at, $at, $t4 +/* 08EB2C 8008DF2C E4D00DC4 */ swc1 $f16, 0xdc4($a2) +/* 08EB30 8008DF30 E4D20224 */ swc1 $f18, 0x224($a2) +/* 08EB34 8008DF34 C42426B0 */ lwc1 $f4, %lo(gKartBoundingBoxTable)($at) +/* 08EB38 8008DF38 3C0E8016 */ lui $t6, %hi(D_80165190) # $t6, 0x8016 +/* 08EB3C 8008DF3C 25CE5190 */ addiu $t6, %lo(D_80165190) # addiu $t6, $t6, 0x5190 +/* 08EB40 8008DF40 00076840 */ sll $t5, $a3, 1 +/* 08EB44 8008DF44 01AE1021 */ addu $v0, $t5, $t6 +/* 08EB48 8008DF48 E4C40070 */ swc1 $f4, 0x70($a2) +/* 08EB4C 8008DF4C A4440000 */ sh $a0, ($v0) +/* 08EB50 8008DF50 A4440010 */ sh $a0, 0x10($v0) +/* 08EB54 8008DF54 A4440020 */ sh $a0, 0x20($v0) +/* 08EB58 8008DF58 A4440030 */ sh $a0, 0x30($v0) +/* 08EB5C 8008DF5C 94CF0000 */ lhu $t7, ($a2) +/* 08EB60 8008DF60 30E400FF */ andi $a0, $a3, 0xff +/* 08EB64 8008DF64 31F84000 */ andi $t8, $t7, 0x4000 +/* 08EB68 8008DF68 53000008 */ beql $t8, $zero, .L8008DF8C +/* 08EB6C 8008DF6C 8FBF0014 */ lw $ra, 0x14($sp) +/* 08EB70 8008DF70 94C50254 */ lhu $a1, 0x254($a2) +/* 08EB74 8008DF74 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900 +/* 08EB78 8008DF78 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008 +/* 08EB7C 8008DF7C 0005C900 */ sll $t9, $a1, 4 +/* 08EB80 8008DF80 0C03243D */ jal func_800C90F4 +/* 08EB84 8008DF84 03212821 */ addu $a1, $t9, $at +.L8008DF88: +/* 08EB88 8008DF88 8FBF0014 */ lw $ra, 0x14($sp) +.L8008DF8C: +/* 08EB8C 8008DF8C 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08EB90 8008DF90 03E00008 */ jr $ra +/* 08EB94 8008DF94 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008DF98.s b/asm/non_matchings/code_8008C1D0/func_8008DF98.s new file mode 100644 index 000000000..5b4d1a451 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008DF98.s @@ -0,0 +1,100 @@ +glabel func_8008DF98 +/* 08EB98 8008DF98 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 08EB9C 8008DF9C AFB10018 */ sw $s1, 0x18($sp) +/* 08EBA0 8008DFA0 00058E00 */ sll $s1, $a1, 0x18 +/* 08EBA4 8008DFA4 00117603 */ sra $t6, $s1, 0x18 +/* 08EBA8 8008DFA8 AFA50024 */ sw $a1, 0x24($sp) +/* 08EBAC 8008DFAC 000E2E00 */ sll $a1, $t6, 0x18 +/* 08EBB0 8008DFB0 AFBF001C */ sw $ra, 0x1c($sp) +/* 08EBB4 8008DFB4 AFB00014 */ sw $s0, 0x14($sp) +/* 08EBB8 8008DFB8 00057E03 */ sra $t7, $a1, 0x18 +/* 08EBBC 8008DFBC 00808025 */ move $s0, $a0 +/* 08EBC0 8008DFC0 01C08825 */ move $s1, $t6 +/* 08EBC4 8008DFC4 0C0230D5 */ jal func_8008C354 +/* 08EBC8 8008DFC8 01E02825 */ move $a1, $t7 +/* 08EBCC 8008DFCC 8E18000C */ lw $t8, 0xc($s0) +/* 08EBD0 8008DFD0 8E0800BC */ lw $t0, 0xbc($s0) +/* 08EBD4 8008DFD4 2401BFFF */ li $at, -16385 +/* 08EBD8 8008DFD8 0301C824 */ and $t9, $t8, $at +/* 08EBDC 8008DFDC 3C014002 */ lui $at, 0x4002 +/* 08EBE0 8008DFE0 01014825 */ or $t1, $t0, $at +/* 08EBE4 8008DFE4 2401FFEF */ li $at, -17 +/* 08EBE8 8008DFE8 01215824 */ and $t3, $t1, $at +/* 08EBEC 8008DFEC C604008C */ lwc1 $f4, 0x8c($s0) +/* 08EBF0 8008DFF0 AE0900BC */ sw $t1, 0xbc($s0) +/* 08EBF4 8008DFF4 AE19000C */ sw $t9, 0xc($s0) +/* 08EBF8 8008DFF8 AE0B00BC */ sw $t3, 0xbc($s0) +/* 08EBFC 8008DFFC 3C01800F */ lui $at, %hi(D_800EF588) +/* 08EC00 8008E000 D428F588 */ ldc1 $f8, %lo(D_800EF588)($at) +/* 08EC04 8008E004 460021A1 */ cvt.d.s $f6, $f4 +/* 08EC08 8008E008 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08EC0C 8008E00C 46283282 */ mul.d $f10, $f6, $f8 +/* 08EC10 8008E010 44819000 */ mtc1 $at, $f18 +/* 08EC14 8008E014 A60000B0 */ sh $zero, 0xb0($s0) +/* 08EC18 8008E018 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 08EC1C 8008E01C E6120224 */ swc1 $f18, 0x224($s0) +/* 08EC20 8008E020 00117080 */ sll $t6, $s1, 2 +/* 08EC24 8008E024 3C198016 */ lui $t9, %hi(D_80165190) # $t9, 0x8016 +/* 08EC28 8008E028 24180002 */ li $t8, 2 +/* 08EC2C 8008E02C 46205420 */ cvt.s.d $f16, $f10 +/* 08EC30 8008E030 27395190 */ addiu $t9, %lo(D_80165190) # addiu $t9, $t9, 0x5190 +/* 08EC34 8008E034 00111840 */ sll $v1, $s1, 1 +/* 08EC38 8008E038 24050001 */ li $a1, 1 +/* 08EC3C 8008E03C E610008C */ swc1 $f16, 0x8c($s0) +/* 08EC40 8008E040 C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) +/* 08EC44 8008E044 3C018019 */ lui $at, %hi(D_8018D930) # 0x8019 +/* 08EC48 8008E048 002E0821 */ addu $at, $at, $t6 +/* 08EC4C 8008E04C 4600218D */ trunc.w.s $f6, $f4 +/* 08EC50 8008E050 00791021 */ addu $v0, $v1, $t9 +/* 08EC54 8008E054 440D3000 */ mfc1 $t5, $f6 +/* 08EC58 8008E058 00000000 */ nop +/* 08EC5C 8008E05C AC2DD930 */ sw $t5, %lo(D_8018D930)($at) # -0x26d0($at) +/* 08EC60 8008E060 860F002E */ lh $t7, 0x2e($s0) +/* 08EC64 8008E064 A61800B2 */ sh $t8, 0xb2($s0) +/* 08EC68 8008E068 A60000C0 */ sh $zero, 0xc0($s0) +/* 08EC6C 8008E06C AE00007C */ sw $zero, 0x7c($s0) +/* 08EC70 8008E070 A6000078 */ sh $zero, 0x78($s0) +/* 08EC74 8008E074 A60F00AE */ sh $t7, 0xae($s0) +/* 08EC78 8008E078 3C018019 */ lui $at, %hi(D_8018D920) # 0x8019 +/* 08EC7C 8008E07C A4450000 */ sh $a1, ($v0) +/* 08EC80 8008E080 A4450010 */ sh $a1, 0x10($v0) +/* 08EC84 8008E084 A4450020 */ sh $a1, 0x20($v0) +/* 08EC88 8008E088 A4450030 */ sh $a1, 0x30($v0) +/* 08EC8C 8008E08C 00230821 */ addu $at, $at, $v1 +/* 08EC90 8008E090 A420D920 */ sh $zero, %lo(D_8018D920)($at) # -0x26e0($at) +/* 08EC94 8008E094 96040000 */ lhu $a0, ($s0) +/* 08EC98 8008E098 24014000 */ li $at, 16384 +/* 08EC9C 8008E09C 02002825 */ move $a1, $s0 +/* 08ECA0 8008E0A0 30884000 */ andi $t0, $a0, 0x4000 +/* 08ECA4 8008E0A4 1501000C */ bne $t0, $at, .L8008E0D8 +/* 08ECA8 8008E0A8 30890100 */ andi $t1, $a0, 0x100 +/* 08ECAC 8008E0AC 24010100 */ li $at, 256 +/* 08ECB0 8008E0B0 11210009 */ beq $t1, $at, .L8008E0D8 +/* 08ECB4 8008E0B4 322400FF */ andi $a0, $s1, 0xff +/* 08ECB8 8008E0B8 96050254 */ lhu $a1, 0x254($s0) +/* 08ECBC 8008E0BC 3C012900 */ lui $at, (0x29008003 >> 16) # lui $at, 0x2900 +/* 08ECC0 8008E0C0 34218003 */ ori $at, (0x29008003 & 0xFFFF) # ori $at, $at, 0x8003 +/* 08ECC4 8008E0C4 00055100 */ sll $t2, $a1, 4 +/* 08ECC8 8008E0C8 0C03243D */ jal func_800C90F4 +/* 08ECCC 8008E0CC 01412821 */ addu $a1, $t2, $at +/* 08ECD0 8008E0D0 10000003 */ b .L8008E0E0 +/* 08ECD4 8008E0D4 00000000 */ nop +.L8008E0D8: +/* 08ECD8 8008E0D8 0C00263F */ jal func_800098FC +/* 08ECDC 8008E0DC 02202025 */ move $a0, $s1 +.L8008E0E0: +/* 08ECE0 8008E0E0 3C0B800E */ lui $t3, %hi(gModeSelection) # $t3, 0x800e +/* 08ECE4 8008E0E4 8D6BC53C */ lw $t3, %lo(gModeSelection)($t3) +/* 08ECE8 8008E0E8 24010003 */ li $at, 3 +/* 08ECEC 8008E0EC 02002025 */ move $a0, $s0 +/* 08ECF0 8008E0F0 15610004 */ bne $t3, $at, .L8008E104 +/* 08ECF4 8008E0F4 00112E00 */ sll $a1, $s1, 0x18 +/* 08ECF8 8008E0F8 00056603 */ sra $t4, $a1, 0x18 +/* 08ECFC 8008E0FC 0C01AE2D */ jal func_8006B8B4 +/* 08ED00 8008E100 01802825 */ move $a1, $t4 +.L8008E104: +/* 08ED04 8008E104 8FBF001C */ lw $ra, 0x1c($sp) +/* 08ED08 8008E108 8FB00014 */ lw $s0, 0x14($sp) +/* 08ED0C 8008E10C 8FB10018 */ lw $s1, 0x18($sp) +/* 08ED10 8008E110 03E00008 */ jr $ra +/* 08ED14 8008E114 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/non_matchings/code_8008C1D0/func_8008E118.s b/asm/non_matchings/code_8008C1D0/func_8008E118.s new file mode 100644 index 000000000..d77171e4d --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008E118.s @@ -0,0 +1,178 @@ +glabel func_8008E118 +/* 08ED18 8008E118 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 08ED1C 8008E11C AFBF001C */ sw $ra, 0x1c($sp) +/* 08ED20 8008E120 AFB00018 */ sw $s0, 0x18($sp) +/* 08ED24 8008E124 AFA50024 */ sw $a1, 0x24($sp) +/* 08ED28 8008E128 8C8200BC */ lw $v0, 0xbc($a0) +/* 08ED2C 8008E12C 00053600 */ sll $a2, $a1, 0x18 +/* 08ED30 8008E130 00067603 */ sra $t6, $a2, 0x18 +/* 08ED34 8008E134 34018000 */ li $at, 32768 +/* 08ED38 8008E138 304F8000 */ andi $t7, $v0, 0x8000 +/* 08ED3C 8008E13C 01C03025 */ move $a2, $t6 +/* 08ED40 8008E140 15E10023 */ bne $t7, $at, .L8008E1D0 +/* 08ED44 8008E144 00808025 */ move $s0, $a0 +/* 08ED48 8008E148 3C030400 */ lui $v1, 0x400 +/* 08ED4C 8008E14C 0043C024 */ and $t8, $v0, $v1 +/* 08ED50 8008E150 1078001F */ beq $v1, $t8, .L8008E1D0 +/* 08ED54 8008E154 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd +/* 08ED58 8008E158 848800AE */ lh $t0, 0xae($a0) +/* 08ED5C 8008E15C 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08ED60 8008E160 0041C824 */ and $t9, $v0, $at +/* 08ED64 8008E164 000E2E00 */ sll $a1, $t6, 0x18 +/* 08ED68 8008E168 AC9900BC */ sw $t9, 0xbc($a0) +/* 08ED6C 8008E16C A48000A8 */ sh $zero, 0xa8($a0) +/* 08ED70 8008E170 AC80007C */ sw $zero, 0x7c($a0) +/* 08ED74 8008E174 A48000C0 */ sh $zero, 0xc0($a0) +/* 08ED78 8008E178 00054E03 */ sra $t1, $a1, 0x18 +/* 08ED7C 8008E17C A488002E */ sh $t0, 0x2e($a0) +/* 08ED80 8008E180 A3AE0027 */ sb $t6, 0x27($sp) +/* 08ED84 8008E184 0C0238F0 */ jal func_8008E3C0 +/* 08ED88 8008E188 01202825 */ move $a1, $t1 +/* 08ED8C 8008E18C 83A60027 */ lb $a2, 0x27($sp) +/* 08ED90 8008E190 3C0B8016 */ lui $t3, %hi(D_80165190) # $t3, 0x8016 +/* 08ED94 8008E194 256B5190 */ addiu $t3, %lo(D_80165190) # addiu $t3, $t3, 0x5190 +/* 08ED98 8008E198 00065040 */ sll $t2, $a2, 1 +/* 08ED9C 8008E19C 24030001 */ li $v1, 1 +/* 08EDA0 8008E1A0 014B1021 */ addu $v0, $t2, $t3 +/* 08EDA4 8008E1A4 00062E00 */ sll $a1, $a2, 0x18 +/* 08EDA8 8008E1A8 00056603 */ sra $t4, $a1, 0x18 +/* 08EDAC 8008E1AC A4430000 */ sh $v1, ($v0) +/* 08EDB0 8008E1B0 A4430010 */ sh $v1, 0x10($v0) +/* 08EDB4 8008E1B4 A4430020 */ sh $v1, 0x20($v0) +/* 08EDB8 8008E1B8 A4430030 */ sh $v1, 0x30($v0) +/* 08EDBC 8008E1BC 01802825 */ move $a1, $t4 +/* 08EDC0 8008E1C0 0C0236AF */ jal func_8008DABC +/* 08EDC4 8008E1C4 02002025 */ move $a0, $s0 +/* 08EDC8 8008E1C8 10000079 */ b .L8008E3B0 +/* 08EDCC 8008E1CC 8FBF001C */ lw $ra, 0x1c($sp) +.L8008E1D0: +/* 08EDD0 8008E1D0 3C030002 */ lui $v1, 2 +/* 08EDD4 8008E1D4 00436824 */ and $t5, $v0, $v1 +/* 08EDD8 8008E1D8 146D002D */ bne $v1, $t5, .L8008E290 +/* 08EDDC 8008E1DC 00062040 */ sll $a0, $a2, 1 +/* 08EDE0 8008E1E0 860E002E */ lh $t6, 0x2e($s0) +/* 08EDE4 8008E1E4 3C188019 */ lui $t8, %hi(D_8018D920) # $t8, 0x8019 +/* 08EDE8 8008E1E8 2718D920 */ addiu $t8, %lo(D_8018D920) # addiu $t8, $t8, -0x26e0 +/* 08EDEC 8008E1EC 25CFFA50 */ addiu $t7, $t6, -0x5b0 +/* 08EDF0 8008E1F0 A60F002E */ sh $t7, 0x2e($s0) +/* 08EDF4 8008E1F4 00981021 */ addu $v0, $a0, $t8 +/* 08EDF8 8008E1F8 84590000 */ lh $t9, ($v0) +/* 08EDFC 8008E1FC 240105B0 */ li $at, 1456 +/* 08EE00 8008E200 3C053F80 */ lui $a1, 0x3f80 +/* 08EE04 8008E204 2728FA50 */ addiu $t0, $t9, -0x5b0 +/* 08EE08 8008E208 3103FFFF */ andi $v1, $t0, 0xffff +/* 08EE0C 8008E20C 0061001A */ div $zero, $v1, $at +/* 08EE10 8008E210 00004812 */ mflo $t1 +/* 08EE14 8008E214 00095400 */ sll $t2, $t1, 0x10 +/* 08EE18 8008E218 000A5C03 */ sra $t3, $t2, 0x10 +/* 08EE1C 8008E21C 15600018 */ bnez $t3, .L8008E280 +/* 08EE20 8008E220 A4480000 */ sh $t0, ($v0) +/* 08EE24 8008E224 860C00B2 */ lh $t4, 0xb2($s0) +/* 08EE28 8008E228 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd +/* 08EE2C 8008E22C 3C088016 */ lui $t0, %hi(D_80165190) # $t0, 0x8016 +/* 08EE30 8008E230 258DFFFF */ addiu $t5, $t4, -1 +/* 08EE34 8008E234 A60D00B2 */ sh $t5, 0xb2($s0) +/* 08EE38 8008E238 860E00B2 */ lh $t6, 0xb2($s0) +/* 08EE3C 8008E23C 24030001 */ li $v1, 1 +/* 08EE40 8008E240 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08EE44 8008E244 1DC0000E */ bgtz $t6, .L8008E280 +/* 08EE48 8008E248 25085190 */ addiu $t0, %lo(D_80165190) # addiu $t0, $t0, 0x5190 +/* 08EE4C 8008E24C 8E0F00BC */ lw $t7, 0xbc($s0) +/* 08EE50 8008E250 861900AE */ lh $t9, 0xae($s0) +/* 08EE54 8008E254 A60000A8 */ sh $zero, 0xa8($s0) +/* 08EE58 8008E258 01E1C024 */ and $t8, $t7, $at +/* 08EE5C 8008E25C AE1800BC */ sw $t8, 0xbc($s0) +/* 08EE60 8008E260 AE00007C */ sw $zero, 0x7c($s0) +/* 08EE64 8008E264 A60000C0 */ sh $zero, 0xc0($s0) +/* 08EE68 8008E268 00881021 */ addu $v0, $a0, $t0 +/* 08EE6C 8008E26C A619002E */ sh $t9, 0x2e($s0) +/* 08EE70 8008E270 A4430000 */ sh $v1, ($v0) +/* 08EE74 8008E274 A4430010 */ sh $v1, 0x10($v0) +/* 08EE78 8008E278 A4430020 */ sh $v1, 0x20($v0) +/* 08EE7C 8008E27C A4430030 */ sh $v1, 0x30($v0) +.L8008E280: +/* 08EE80 8008E280 0C00C7D2 */ jal func_80031F48 +/* 08EE84 8008E284 02002025 */ move $a0, $s0 +/* 08EE88 8008E288 10000049 */ b .L8008E3B0 +/* 08EE8C 8008E28C 8FBF001C */ lw $ra, 0x1c($sp) +.L8008E290: +/* 08EE90 8008E290 860900B0 */ lh $t1, 0xb0($s0) +/* 08EE94 8008E294 C604008C */ lwc1 $f4, 0x8c($s0) +/* 08EE98 8008E298 3C01800F */ lui $at, %hi(D_800EF590) +/* 08EE9C 8008E29C 252A0001 */ addiu $t2, $t1, 1 +/* 08EEA0 8008E2A0 A60A00B0 */ sh $t2, 0xb0($s0) +/* 08EEA4 8008E2A4 D428F590 */ ldc1 $f8, %lo(D_800EF590)($at) +/* 08EEA8 8008E2A8 460021A1 */ cvt.d.s $f6, $f4 +/* 08EEAC 8008E2AC 860200B0 */ lh $v0, 0xb0($s0) +/* 08EEB0 8008E2B0 46283282 */ mul.d $f10, $f6, $f8 +/* 08EEB4 8008E2B4 24030001 */ li $v1, 1 +/* 08EEB8 8008E2B8 46205420 */ cvt.s.d $f16, $f10 +/* 08EEBC 8008E2BC 1462000F */ bne $v1, $v0, .L8008E2FC +/* 08EEC0 8008E2C0 E610008C */ swc1 $f16, 0x8c($s0) +/* 08EEC4 8008E2C4 960B0000 */ lhu $t3, ($s0) +/* 08EEC8 8008E2C8 30C400FF */ andi $a0, $a2, 0xff +/* 08EECC 8008E2CC 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900 +/* 08EED0 8008E2D0 316C4000 */ andi $t4, $t3, 0x4000 +/* 08EED4 8008E2D4 11800009 */ beqz $t4, .L8008E2FC +/* 08EED8 8008E2D8 00000000 */ nop +/* 08EEDC 8008E2DC 96050254 */ lhu $a1, 0x254($s0) +/* 08EEE0 8008E2E0 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005 +/* 08EEE4 8008E2E4 A3A60027 */ sb $a2, 0x27($sp) +/* 08EEE8 8008E2E8 00056900 */ sll $t5, $a1, 4 +/* 08EEEC 8008E2EC 0C03243D */ jal func_800C90F4 +/* 08EEF0 8008E2F0 01A12821 */ addu $a1, $t5, $at +/* 08EEF4 8008E2F4 83A60027 */ lb $a2, 0x27($sp) +/* 08EEF8 8008E2F8 860200B0 */ lh $v0, 0xb0($s0) +.L8008E2FC: +/* 08EEFC 8008E2FC 0440001A */ bltz $v0, .L8008E368 +/* 08EF00 8008E300 284101CC */ slti $at, $v0, 0x1cc +/* 08EF04 8008E304 10200018 */ beqz $at, .L8008E368 +/* 08EF08 8008E308 26040224 */ addiu $a0, $s0, 0x224 +/* 08EF0C 8008E30C 3C053F33 */ lui $a1, (0x3F333333 >> 16) # lui $a1, 0x3f33 +/* 08EF10 8008E310 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc +/* 08EF14 8008E314 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 08EF18 8008E318 0C008973 */ jal func_800225CC +/* 08EF1C 8008E31C 34A53333 */ ori $a1, (0x3F333333 & 0xFFFF) # ori $a1, $a1, 0x3333 +/* 08EF20 8008E320 960E0254 */ lhu $t6, 0x254($s0) +/* 08EF24 8008E324 3C01800E */ lui $at, %hi(gKartBoundingBoxTable) +/* 08EF28 8008E328 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc +/* 08EF2C 8008E32C 000E7880 */ sll $t7, $t6, 2 +/* 08EF30 8008E330 002F0821 */ addu $at, $at, $t7 +/* 08EF34 8008E334 C43226B0 */ lwc1 $f18, %lo(gKartBoundingBoxTable)($at) +/* 08EF38 8008E338 3C01800F */ lui $at, %hi(D_800EF598) +/* 08EF3C 8008E33C D426F598 */ ldc1 $f6, %lo(D_800EF598)($at) +/* 08EF40 8008E340 46009121 */ cvt.d.s $f4, $f18 +/* 08EF44 8008E344 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 08EF48 8008E348 46262202 */ mul.d $f8, $f4, $f6 +/* 08EF4C 8008E34C 26040070 */ addiu $a0, $s0, 0x70 +/* 08EF50 8008E350 462042A0 */ cvt.s.d $f10, $f8 +/* 08EF54 8008E354 44055000 */ mfc1 $a1, $f10 +/* 08EF58 8008E358 0C008973 */ jal func_800225CC +/* 08EF5C 8008E35C 00000000 */ nop +/* 08EF60 8008E360 10000013 */ b .L8008E3B0 +/* 08EF64 8008E364 8FBF001C */ lw $ra, 0x1c($sp) +.L8008E368: +/* 08EF68 8008E368 00062E00 */ sll $a1, $a2, 0x18 +/* 08EF6C 8008E36C 0005C603 */ sra $t8, $a1, 0x18 +/* 08EF70 8008E370 03002825 */ move $a1, $t8 +/* 08EF74 8008E374 02002025 */ move $a0, $s0 +/* 08EF78 8008E378 0C0238F0 */ jal func_8008E3C0 +/* 08EF7C 8008E37C A3A60027 */ sb $a2, 0x27($sp) +/* 08EF80 8008E380 96190000 */ lhu $t9, ($s0) +/* 08EF84 8008E384 83A60027 */ lb $a2, 0x27($sp) +/* 08EF88 8008E388 33284000 */ andi $t0, $t9, 0x4000 +/* 08EF8C 8008E38C 11000007 */ beqz $t0, .L8008E3AC +/* 08EF90 8008E390 30C400FF */ andi $a0, $a2, 0xff +/* 08EF94 8008E394 96050254 */ lhu $a1, 0x254($s0) +/* 08EF98 8008E398 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900 +/* 08EF9C 8008E39C 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008 +/* 08EFA0 8008E3A0 00054900 */ sll $t1, $a1, 4 +/* 08EFA4 8008E3A4 0C03243D */ jal func_800C90F4 +/* 08EFA8 8008E3A8 01212821 */ addu $a1, $t1, $at +.L8008E3AC: +/* 08EFAC 8008E3AC 8FBF001C */ lw $ra, 0x1c($sp) +.L8008E3B0: +/* 08EFB0 8008E3B0 8FB00018 */ lw $s0, 0x18($sp) +/* 08EFB4 8008E3B4 27BD0020 */ addiu $sp, $sp, 0x20 +/* 08EFB8 8008E3B8 03E00008 */ jr $ra +/* 08EFBC 8008E3BC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008E3C0.s b/asm/non_matchings/code_8008C1D0/func_8008E3C0.s new file mode 100644 index 000000000..7fd191460 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008E3C0.s @@ -0,0 +1,59 @@ +glabel func_8008E3C0 +/* 08EFC0 8008E3C0 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08EFC4 8008E3C4 AFBF0014 */ sw $ra, 0x14($sp) +/* 08EFC8 8008E3C8 AFA5001C */ sw $a1, 0x1c($sp) +/* 08EFCC 8008E3CC 00803825 */ move $a3, $a0 +/* 08EFD0 8008E3D0 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc +/* 08EFD4 8008E3D4 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 08EFD8 8008E3D8 AFA70018 */ sw $a3, 0x18($sp) +/* 08EFDC 8008E3DC 24840224 */ addiu $a0, $a0, 0x224 +/* 08EFE0 8008E3E0 0C008973 */ jal func_800225CC +/* 08EFE4 8008E3E4 3C053F80 */ lui $a1, 0x3f80 +/* 08EFE8 8008E3E8 8FA70018 */ lw $a3, 0x18($sp) +/* 08EFEC 8008E3EC 3C05800E */ lui $a1, %hi(gKartBoundingBoxTable) # 0x800e +/* 08EFF0 8008E3F0 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc +/* 08EFF4 8008E3F4 94EE0254 */ lhu $t6, 0x254($a3) +/* 08EFF8 8008E3F8 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 08EFFC 8008E3FC 24E40070 */ addiu $a0, $a3, 0x70 +/* 08F000 8008E400 000E7880 */ sll $t7, $t6, 2 +/* 08F004 8008E404 00AF2821 */ addu $a1, $a1, $t7 +/* 08F008 8008E408 0C008973 */ jal func_800225CC +/* 08F00C 8008E40C 8CA526B0 */ lw $a1, %lo(gKartBoundingBoxTable)($a1) # 0x26b0($a1) +/* 08F010 8008E410 8FA70018 */ lw $a3, 0x18($sp) +/* 08F014 8008E414 3C01BFFF */ lui $at, (0xBFFFFFFF >> 16) # lui $at, 0xbfff +/* 08F018 8008E418 3421FFFF */ ori $at, (0xBFFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F01C 8008E41C 8CF800BC */ lw $t8, 0xbc($a3) +/* 08F020 8008E420 94E80254 */ lhu $t0, 0x254($a3) +/* 08F024 8008E424 3C030002 */ lui $v1, 2 +/* 08F028 8008E428 0301C824 */ and $t9, $t8, $at +/* 08F02C 8008E42C 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08F030 8008E430 44812000 */ mtc1 $at, $f4 +/* 08F034 8008E434 3C01800E */ lui $at, %hi(gKartBoundingBoxTable) +/* 08F038 8008E438 00084880 */ sll $t1, $t0, 2 +/* 08F03C 8008E43C 00290821 */ addu $at, $at, $t1 +/* 08F040 8008E440 ACF900BC */ sw $t9, 0xbc($a3) +/* 08F044 8008E444 E4E40224 */ swc1 $f4, 0x224($a3) +/* 08F048 8008E448 C42626B0 */ lwc1 $f6, %lo(gKartBoundingBoxTable)($at) +/* 08F04C 8008E44C 3C014040 */ li $at, 0x40400000 # 3.000000 +/* 08F050 8008E450 44814000 */ mtc1 $at, $f8 +/* 08F054 8008E454 3C010800 */ lui $at, 0x800 +/* 08F058 8008E458 03215825 */ or $t3, $t9, $at +/* 08F05C 8008E45C 01636024 */ and $t4, $t3, $v1 +/* 08F060 8008E460 01601025 */ move $v0, $t3 +/* 08F064 8008E464 A4E00DB6 */ sh $zero, 0xdb6($a3) +/* 08F068 8008E468 ACEB00BC */ sw $t3, 0xbc($a3) +/* 08F06C 8008E46C E4E60070 */ swc1 $f6, 0x70($a3) +/* 08F070 8008E470 146C0004 */ bne $v1, $t4, .L8008E484 +/* 08F074 8008E474 E4E80DC4 */ swc1 $f8, 0xdc4($a3) +/* 08F078 8008E478 84ED00AE */ lh $t5, 0xae($a3) +/* 08F07C 8008E47C 01601025 */ move $v0, $t3 +/* 08F080 8008E480 A4ED002E */ sh $t5, 0x2e($a3) +.L8008E484: +/* 08F084 8008E484 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd +/* 08F088 8008E488 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F08C 8008E48C 00417024 */ and $t6, $v0, $at +/* 08F090 8008E490 ACEE00BC */ sw $t6, 0xbc($a3) +/* 08F094 8008E494 8FBF0014 */ lw $ra, 0x14($sp) +/* 08F098 8008E498 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08F09C 8008E49C 03E00008 */ jr $ra +/* 08F0A0 8008E4A0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008E4A4.s b/asm/non_matchings/code_8008C1D0/func_8008E4A4.s new file mode 100644 index 000000000..261c4f353 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008E4A4.s @@ -0,0 +1,144 @@ +glabel func_8008E4A4 +/* 08F0A4 8008E4A4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08F0A8 8008E4A8 AFA5001C */ sw $a1, 0x1c($sp) +/* 08F0AC 8008E4AC AFBF0014 */ sw $ra, 0x14($sp) +/* 08F0B0 8008E4B0 8C8900BC */ lw $t1, 0xbc($a0) +/* 08F0B4 8008E4B4 44800000 */ mtc1 $zero, $f0 +/* 08F0B8 8008E4B8 84990042 */ lh $t9, 0x42($a0) +/* 08F0BC 8008E4BC 2401FF3F */ li $at, -193 +/* 08F0C0 8008E4C0 01215024 */ and $t2, $t1, $at +/* 08F0C4 8008E4C4 00057600 */ sll $t6, $a1, 0x18 +/* 08F0C8 8008E4C8 2418000F */ li $t8, 15 +/* 08F0CC 8008E4CC 314C0008 */ andi $t4, $t2, 8 +/* 08F0D0 8008E4D0 24010008 */ li $at, 8 +/* 08F0D4 8008E4D4 27280AAA */ addiu $t0, $t9, 0xaaa +/* 08F0D8 8008E4D8 000E2E03 */ sra $a1, $t6, 0x18 +/* 08F0DC 8008E4DC A4800206 */ sh $zero, 0x206($a0) +/* 08F0E0 8008E4E0 A48000C4 */ sh $zero, 0xc4($a0) +/* 08F0E4 8008E4E4 A48000C0 */ sh $zero, 0xc0($a0) +/* 08F0E8 8008E4E8 AC80007C */ sw $zero, 0x7c($a0) +/* 08F0EC 8008E4EC A49800C2 */ sh $t8, 0xc2($a0) +/* 08F0F0 8008E4F0 A4880042 */ sh $t0, 0x42($a0) +/* 08F0F4 8008E4F4 AC8A00BC */ sw $t2, 0xbc($a0) +/* 08F0F8 8008E4F8 E480008C */ swc1 $f0, 0x8c($a0) +/* 08F0FC 8008E4FC E480009C */ swc1 $f0, 0x9c($a0) +/* 08F100 8008E500 E4800034 */ swc1 $f0, 0x34($a0) +/* 08F104 8008E504 11810004 */ beq $t4, $at, .L8008E518 +/* 08F108 8008E508 E480003C */ swc1 $f0, 0x3c($a0) +/* 08F10C 8008E50C 848D00E0 */ lh $t5, 0xe0($a0) +/* 08F110 8008E510 25AE0001 */ addiu $t6, $t5, 1 +/* 08F114 8008E514 A48E00E0 */ sh $t6, 0xe0($a0) +.L8008E518: +/* 08F118 8008E518 848F00E0 */ lh $t7, 0xe0($a0) +/* 08F11C 8008E51C 24060003 */ li $a2, 3 +/* 08F120 8008E520 24030001 */ li $v1, 1 +/* 08F124 8008E524 14CF0029 */ bne $a2, $t7, .L8008E5CC +/* 08F128 8008E528 3C01FEFF */ lui $at, (0xFEFFFFFF >> 16) # lui $at, 0xfeff +/* 08F12C 8008E52C 8C9800BC */ lw $t8, 0xbc($a0) +/* 08F130 8008E530 3421FFFF */ ori $at, (0xFEFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F134 8008E534 3C098016 */ lui $t1, %hi(D_80165190) # $t1, 0x8016 +/* 08F138 8008E538 25295190 */ addiu $t1, %lo(D_80165190) # addiu $t1, $t1, 0x5190 +/* 08F13C 8008E53C 00054040 */ sll $t0, $a1, 1 +/* 08F140 8008E540 0301C824 */ and $t9, $t8, $at +/* 08F144 8008E544 AC9900BC */ sw $t9, 0xbc($a0) +/* 08F148 8008E548 A48000A8 */ sh $zero, 0xa8($a0) +/* 08F14C 8008E54C A4800236 */ sh $zero, 0x236($a0) +/* 08F150 8008E550 01091021 */ addu $v0, $t0, $t1 +/* 08F154 8008E554 A4430000 */ sh $v1, ($v0) +/* 08F158 8008E558 A4430010 */ sh $v1, 0x10($v0) +/* 08F15C 8008E55C A4430020 */ sh $v1, 0x20($v0) +/* 08F160 8008E560 A4430030 */ sh $v1, 0x30($v0) +/* 08F164 8008E564 948A0000 */ lhu $t2, ($a0) +/* 08F168 8008E568 2401FF7F */ li $at, -129 +/* 08F16C 8008E56C 00056080 */ sll $t4, $a1, 2 +/* 08F170 8008E570 3C0D8016 */ lui $t5, %hi(D_80165460) # 0x8016 +/* 08F174 8008E574 01415824 */ and $t3, $t2, $at +/* 08F178 8008E578 A4800042 */ sh $zero, 0x42($a0) +/* 08F17C 8008E57C A48B0000 */ sh $t3, ($a0) +/* 08F180 8008E580 01AC6821 */ addu $t5, $t5, $t4 +/* 08F184 8008E584 8DAD5460 */ lw $t5, %lo(D_80165460)($t5) # 0x5460($t5) +/* 08F188 8008E588 316F4000 */ andi $t7, $t3, 0x4000 +/* 08F18C 8008E58C 24014000 */ li $at, 16384 +/* 08F190 8008E590 146D0007 */ bne $v1, $t5, .L8008E5B0 +/* 08F194 8008E594 3C18800E */ lui $t8, %hi(gModeSelection) # $t8, 0x800e +/* 08F198 8008E598 15E10005 */ bne $t7, $at, .L8008E5B0 +/* 08F19C 8008E59C 3C0142C8 */ li $at, 0x42C80000 # 100.000000 +/* 08F1A0 8008E5A0 44813000 */ mtc1 $at, $f6 +/* 08F1A4 8008E5A4 C484009C */ lwc1 $f4, 0x9c($a0) +/* 08F1A8 8008E5A8 46062200 */ add.s $f8, $f4, $f6 +/* 08F1AC 8008E5AC E488009C */ swc1 $f8, 0x9c($a0) +.L8008E5B0: +/* 08F1B0 8008E5B0 8F18C53C */ lw $t8, %lo(gModeSelection)($t8) +/* 08F1B4 8008E5B4 54D8003F */ bnel $a2, $t8, .L8008E6B4 +/* 08F1B8 8008E5B8 8FBF0014 */ lw $ra, 0x14($sp) +/* 08F1BC 8008E5BC 0C01AE2D */ jal func_8006B8B4 +/* 08F1C0 8008E5C0 00000000 */ nop +/* 08F1C4 8008E5C4 1000003B */ b .L8008E6B4 +/* 08F1C8 8008E5C8 8FBF0014 */ lw $ra, 0x14($sp) +.L8008E5CC: +/* 08F1CC 8008E5CC 849900A8 */ lh $t9, 0xa8($a0) +/* 08F1D0 8008E5D0 27280080 */ addiu $t0, $t9, 0x80 +/* 08F1D4 8008E5D4 A48800A8 */ sh $t0, 0xa8($a0) +/* 08F1D8 8008E5D8 848900A8 */ lh $t1, 0xa8($a0) +/* 08F1DC 8008E5DC 29212000 */ slti $at, $t1, 0x2000 +/* 08F1E0 8008E5E0 54200034 */ bnel $at, $zero, .L8008E6B4 +/* 08F1E4 8008E5E4 8FBF0014 */ lw $ra, 0x14($sp) +/* 08F1E8 8008E5E8 848A0236 */ lh $t2, 0x236($a0) +/* 08F1EC 8008E5EC 3C01FEFF */ lui $at, (0xFEFFFFFF >> 16) # lui $at, 0xfeff +/* 08F1F0 8008E5F0 A48000A8 */ sh $zero, 0xa8($a0) +/* 08F1F4 8008E5F4 254BFFFF */ addiu $t3, $t2, -1 +/* 08F1F8 8008E5F8 A48B0236 */ sh $t3, 0x236($a0) +/* 08F1FC 8008E5FC 848C0236 */ lh $t4, 0x236($a0) +/* 08F200 8008E600 24030001 */ li $v1, 1 +/* 08F204 8008E604 3421FFFF */ ori $at, (0xFEFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F208 8008E608 15800029 */ bnez $t4, .L8008E6B0 +/* 08F20C 8008E60C 00057840 */ sll $t7, $a1, 1 +/* 08F210 8008E610 8C8D00BC */ lw $t5, 0xbc($a0) +/* 08F214 8008E614 3C188016 */ lui $t8, %hi(D_80165190) # $t8, 0x8016 +/* 08F218 8008E618 27185190 */ addiu $t8, %lo(D_80165190) # addiu $t8, $t8, 0x5190 +/* 08F21C 8008E61C 01A17024 */ and $t6, $t5, $at +/* 08F220 8008E620 AC8E00BC */ sw $t6, 0xbc($a0) +/* 08F224 8008E624 A4800236 */ sh $zero, 0x236($a0) +/* 08F228 8008E628 01F81021 */ addu $v0, $t7, $t8 +/* 08F22C 8008E62C A4430000 */ sh $v1, ($v0) +/* 08F230 8008E630 A4430010 */ sh $v1, 0x10($v0) +/* 08F234 8008E634 A4430020 */ sh $v1, 0x20($v0) +/* 08F238 8008E638 A4430030 */ sh $v1, 0x30($v0) +/* 08F23C 8008E63C A4800042 */ sh $zero, 0x42($a0) +/* 08F240 8008E640 3C19800E */ lui $t9, %hi(gModeSelection) # $t9, 0x800e +/* 08F244 8008E644 8F39C53C */ lw $t9, %lo(gModeSelection)($t9) +/* 08F248 8008E648 54D90008 */ bnel $a2, $t9, .L8008E66C +/* 08F24C 8008E64C 00054080 */ sll $t0, $a1, 2 +/* 08F250 8008E650 AFA40018 */ sw $a0, 0x18($sp) +/* 08F254 8008E654 0C01AE2D */ jal func_8006B8B4 +/* 08F258 8008E658 A3A5001F */ sb $a1, 0x1f($sp) +/* 08F25C 8008E65C 24030001 */ li $v1, 1 +/* 08F260 8008E660 8FA40018 */ lw $a0, 0x18($sp) +/* 08F264 8008E664 83A5001F */ lb $a1, 0x1f($sp) +/* 08F268 8008E668 00054080 */ sll $t0, $a1, 2 +.L8008E66C: +/* 08F26C 8008E66C 3C098016 */ lui $t1, %hi(D_80165460) # 0x8016 +/* 08F270 8008E670 01284821 */ addu $t1, $t1, $t0 +/* 08F274 8008E674 8D295460 */ lw $t1, %lo(D_80165460)($t1) # 0x5460($t1) +/* 08F278 8008E678 5469000B */ bnel $v1, $t1, .L8008E6A8 +/* 08F27C 8008E67C 948C0000 */ lhu $t4, ($a0) +/* 08F280 8008E680 948A0000 */ lhu $t2, ($a0) +/* 08F284 8008E684 24014000 */ li $at, 16384 +/* 08F288 8008E688 314B4000 */ andi $t3, $t2, 0x4000 +/* 08F28C 8008E68C 15610005 */ bne $t3, $at, .L8008E6A4 +/* 08F290 8008E690 3C0142C8 */ li $at, 0x42C80000 # 100.000000 +/* 08F294 8008E694 44818000 */ mtc1 $at, $f16 +/* 08F298 8008E698 C48A009C */ lwc1 $f10, 0x9c($a0) +/* 08F29C 8008E69C 46105480 */ add.s $f18, $f10, $f16 +/* 08F2A0 8008E6A0 E492009C */ swc1 $f18, 0x9c($a0) +.L8008E6A4: +/* 08F2A4 8008E6A4 948C0000 */ lhu $t4, ($a0) +.L8008E6A8: +/* 08F2A8 8008E6A8 318DFF7F */ andi $t5, $t4, 0xff7f +/* 08F2AC 8008E6AC A48D0000 */ sh $t5, ($a0) +.L8008E6B0: +/* 08F2B0 8008E6B0 8FBF0014 */ lw $ra, 0x14($sp) +.L8008E6B4: +/* 08F2B4 8008E6B4 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08F2B8 8008E6B8 03E00008 */ jr $ra +/* 08F2BC 8008E6BC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008E6C0.s b/asm/non_matchings/code_8008C1D0/func_8008E6C0.s new file mode 100644 index 000000000..1d08d539b --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008E6C0.s @@ -0,0 +1,119 @@ +glabel func_8008E6C0 +/* 08F2C0 8008E6C0 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 08F2C4 8008E6C4 AFBF001C */ sw $ra, 0x1c($sp) +/* 08F2C8 8008E6C8 AFB00018 */ sw $s0, 0x18($sp) +/* 08F2CC 8008E6CC AFA5002C */ sw $a1, 0x2c($sp) +/* 08F2D0 8008E6D0 00808025 */ move $s0, $a0 +/* 08F2D4 8008E6D4 0C0230D5 */ jal func_8008C354 +/* 08F2D8 8008E6D8 83A5002F */ lb $a1, 0x2f($sp) +/* 08F2DC 8008E6DC 0C0230C4 */ jal func_8008C310 +/* 08F2E0 8008E6E0 02002025 */ move $a0, $s0 +/* 08F2E4 8008E6E4 8E0E00BC */ lw $t6, 0xbc($s0) +/* 08F2E8 8008E6E8 44800000 */ mtc1 $zero, $f0 +/* 08F2EC 8008E6EC 3C010100 */ lui $at, 0x100 +/* 08F2F0 8008E6F0 96060254 */ lhu $a2, 0x254($s0) +/* 08F2F4 8008E6F4 01C17825 */ or $t7, $t6, $at +/* 08F2F8 8008E6F8 2401FFEF */ li $at, -17 +/* 08F2FC 8008E6FC 01E1C824 */ and $t9, $t7, $at +/* 08F300 8008E700 AE0F00BC */ sw $t7, 0xbc($s0) +/* 08F304 8008E704 3C01800E */ lui $at, %hi(D_800E3730) +/* 08F308 8008E708 00061080 */ sll $v0, $a2, 2 +/* 08F30C 8008E70C A60000A8 */ sh $zero, 0xa8($s0) +/* 08F310 8008E710 AE1900BC */ sw $t9, 0xbc($s0) +/* 08F314 8008E714 00220821 */ addu $at, $at, $v0 +/* 08F318 8008E718 E60000F0 */ swc1 $f0, 0xf0($s0) +/* 08F31C 8008E71C E60000F4 */ swc1 $f0, 0xf4($s0) +/* 08F320 8008E720 E60000EC */ swc1 $f0, 0xec($s0) +/* 08F324 8008E724 C4243730 */ lwc1 $f4, %lo(D_800E3730)($at) +/* 08F328 8008E728 3C01800E */ lui $at, %hi(D_800E3710) +/* 08F32C 8008E72C 00220821 */ addu $at, $at, $v0 +/* 08F330 8008E730 E60400F0 */ swc1 $f4, 0xf0($s0) +/* 08F334 8008E734 C4263710 */ lwc1 $f6, %lo(D_800E3710)($at) +/* 08F338 8008E738 96030000 */ lhu $v1, ($s0) +/* 08F33C 8008E73C 24080004 */ li $t0, 4 +/* 08F340 8008E740 24014000 */ li $at, 16384 +/* 08F344 8008E744 30694000 */ andi $t1, $v1, 0x4000 +/* 08F348 8008E748 A6080236 */ sh $t0, 0x236($s0) +/* 08F34C 8008E74C A6000042 */ sh $zero, 0x42($s0) +/* 08F350 8008E750 A60000E0 */ sh $zero, 0xe0($s0) +/* 08F354 8008E754 1521002E */ bne $t1, $at, .L8008E810 +/* 08F358 8008E758 E60600EC */ swc1 $f6, 0xec($s0) +/* 08F35C 8008E75C 306A0100 */ andi $t2, $v1, 0x100 +/* 08F360 8008E760 24010100 */ li $at, 256 +/* 08F364 8008E764 1141002A */ beq $t2, $at, .L8008E810 +/* 08F368 8008E768 3C0B800E */ lui $t3, %hi(gModeSelection) # $t3, 0x800e +/* 08F36C 8008E76C 8D6BC53C */ lw $t3, %lo(gModeSelection)($t3) +/* 08F370 8008E770 24010002 */ li $at, 2 +/* 08F374 8008E774 306C1000 */ andi $t4, $v1, 0x1000 +/* 08F378 8008E778 5561000A */ bnel $t3, $at, .L8008E7A4 +/* 08F37C 8008E77C 93A4002F */ lbu $a0, 0x2f($sp) +/* 08F380 8008E780 11800007 */ beqz $t4, .L8008E7A0 +/* 08F384 8008E784 3C0D800E */ lui $t5, %hi(D_800DC51C) # $t5, 0x800e +/* 08F388 8008E788 95ADC51C */ lhu $t5, %lo(D_800DC51C)($t5) +/* 08F38C 8008E78C 55A00005 */ bnel $t5, $zero, .L8008E7A4 +/* 08F390 8008E790 93A4002F */ lbu $a0, 0x2f($sp) +/* 08F394 8008E794 0C032893 */ jal func_800CA24C +/* 08F398 8008E798 93A4002F */ lbu $a0, 0x2f($sp) +/* 08F39C 8008E79C 96060254 */ lhu $a2, 0x254($s0) +.L8008E7A0: +/* 08F3A0 8008E7A0 93A4002F */ lbu $a0, 0x2f($sp) +.L8008E7A4: +/* 08F3A4 8008E7A4 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900 +/* 08F3A8 8008E7A8 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005 +/* 08F3AC 8008E7AC 00062900 */ sll $a1, $a2, 4 +/* 08F3B0 8008E7B0 00A12821 */ addu $a1, $a1, $at +/* 08F3B4 8008E7B4 0C03243D */ jal func_800C90F4 +/* 08F3B8 8008E7B8 AFA40020 */ sw $a0, 0x20($sp) +/* 08F3BC 8008E7BC 3C0E800E */ lui $t6, %hi(gModeSelection) # $t6, 0x800e +/* 08F3C0 8008E7C0 8DCEC53C */ lw $t6, %lo(gModeSelection)($t6) +/* 08F3C4 8008E7C4 24010002 */ li $at, 2 +/* 08F3C8 8008E7C8 55C1000C */ bnel $t6, $at, .L8008E7FC +/* 08F3CC 8008E7CC 3C051900 */ lui $a1, 0x1900 +/* 08F3D0 8008E7D0 960F0000 */ lhu $t7, ($s0) +/* 08F3D4 8008E7D4 3C19800E */ lui $t9, %hi(D_800DC51C) # $t9, 0x800e +/* 08F3D8 8008E7D8 31F81000 */ andi $t8, $t7, 0x1000 +/* 08F3DC 8008E7DC 53000007 */ beql $t8, $zero, .L8008E7FC +/* 08F3E0 8008E7E0 3C051900 */ lui $a1, 0x1900 +/* 08F3E4 8008E7E4 9739C51C */ lhu $t9, %lo(D_800DC51C)($t9) +/* 08F3E8 8008E7E8 57200004 */ bnel $t9, $zero, .L8008E7FC +/* 08F3EC 8008E7EC 3C051900 */ lui $a1, 0x1900 +/* 08F3F0 8008E7F0 0C032893 */ jal func_800CA24C +/* 08F3F4 8008E7F4 93A40023 */ lbu $a0, 0x23($sp) +/* 08F3F8 8008E7F8 3C051900 */ lui $a1, (0x19009005 >> 16) # lui $a1, 0x1900 +.L8008E7FC: +/* 08F3FC 8008E7FC 34A59005 */ ori $a1, (0x19009005 & 0xFFFF) # ori $a1, $a1, 0x9005 +/* 08F400 8008E800 0C032418 */ jal func_800C9060 +/* 08F404 8008E804 93A40023 */ lbu $a0, 0x23($sp) +/* 08F408 8008E808 10000005 */ b .L8008E820 +/* 08F40C 8008E80C 8E08000C */ lw $t0, 0xc($s0) +.L8008E810: +/* 08F410 8008E810 83A4002F */ lb $a0, 0x2f($sp) +/* 08F414 8008E814 0C00263F */ jal func_800098FC +/* 08F418 8008E818 02002825 */ move $a1, $s0 +/* 08F41C 8008E81C 8E08000C */ lw $t0, 0xc($s0) +.L8008E820: +/* 08F420 8008E820 960A00B6 */ lhu $t2, 0xb6($s0) +/* 08F424 8008E824 3C01FFB7 */ lui $at, (0xFFB7FFFF >> 16) # lui $at, 0xffb7 +/* 08F428 8008E828 3421FFFF */ ori $at, (0xFFB7FFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F42C 8008E82C 01014824 */ and $t1, $t0, $at +/* 08F430 8008E830 354B0040 */ ori $t3, $t2, 0x40 +/* 08F434 8008E834 AE09000C */ sw $t1, 0xc($s0) +/* 08F438 8008E838 A60B00B6 */ sh $t3, 0xb6($s0) +/* 08F43C 8008E83C 83A2002F */ lb $v0, 0x2f($sp) +/* 08F440 8008E840 3C018016 */ lui $at, %hi(D_80165480) # 0x8016 +/* 08F444 8008E844 8FBF001C */ lw $ra, 0x1c($sp) +/* 08F448 8008E848 00026080 */ sll $t4, $v0, 2 +/* 08F44C 8008E84C 002C0821 */ addu $at, $at, $t4 +/* 08F450 8008E850 AC205480 */ sw $zero, %lo(D_80165480)($at) # 0x5480($at) +/* 08F454 8008E854 3C018016 */ lui $at, %hi(D_80165460) # 0x8016 +/* 08F458 8008E858 002C0821 */ addu $at, $at, $t4 +/* 08F45C 8008E85C AC205460 */ sw $zero, %lo(D_80165460)($at) # 0x5460($at) +/* 08F460 8008E860 3C018016 */ lui $at, %hi(D_80165440) # 0x8016 +/* 08F464 8008E864 002C0821 */ addu $at, $at, $t4 +/* 08F468 8008E868 AC205440 */ sw $zero, %lo(D_80165440)($at) # 0x5440($at) +/* 08F46C 8008E86C 3C018016 */ lui $at, %hi(D_80165420) # 0x8016 +/* 08F470 8008E870 002C0821 */ addu $at, $at, $t4 +/* 08F474 8008E874 8FB00018 */ lw $s0, 0x18($sp) +/* 08F478 8008E878 AC205420 */ sw $zero, %lo(D_80165420)($at) # 0x5420($at) +/* 08F47C 8008E87C 03E00008 */ jr $ra +/* 08F480 8008E880 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/code_8008C1D0/func_8008E884.s b/asm/non_matchings/code_8008C1D0/func_8008E884.s new file mode 100644 index 000000000..80da48552 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008E884.s @@ -0,0 +1,22 @@ +glabel func_8008E884 +/* 08F484 8008E884 AFA50004 */ sw $a1, 4($sp) +/* 08F488 8008E888 8C9800BC */ lw $t8, 0xbc($a0) +/* 08F48C 8008E88C 00057600 */ sll $t6, $a1, 0x18 +/* 08F490 8008E890 3C01FEFF */ lui $at, (0xFEFFFFFF >> 16) # lui $at, 0xfeff +/* 08F494 8008E894 000E7E03 */ sra $t7, $t6, 0x18 +/* 08F498 8008E898 3421FFFF */ ori $at, (0xFEFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F49C 8008E89C 3C098016 */ lui $t1, %hi(D_80165190) # $t1, 0x8016 +/* 08F4A0 8008E8A0 25295190 */ addiu $t1, %lo(D_80165190) # addiu $t1, $t1, 0x5190 +/* 08F4A4 8008E8A4 000F4040 */ sll $t0, $t7, 1 +/* 08F4A8 8008E8A8 0301C824 */ and $t9, $t8, $at +/* 08F4AC 8008E8AC 24030001 */ li $v1, 1 +/* 08F4B0 8008E8B0 AC9900BC */ sw $t9, 0xbc($a0) +/* 08F4B4 8008E8B4 A48000A8 */ sh $zero, 0xa8($a0) +/* 08F4B8 8008E8B8 A4800236 */ sh $zero, 0x236($a0) +/* 08F4BC 8008E8BC 01091021 */ addu $v0, $t0, $t1 +/* 08F4C0 8008E8C0 A4430000 */ sh $v1, ($v0) +/* 08F4C4 8008E8C4 A4430010 */ sh $v1, 0x10($v0) +/* 08F4C8 8008E8C8 A4430020 */ sh $v1, 0x20($v0) +/* 08F4CC 8008E8CC A4430030 */ sh $v1, 0x30($v0) +/* 08F4D0 8008E8D0 03E00008 */ jr $ra +/* 08F4D4 8008E8D4 A4800042 */ sh $zero, 0x42($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008E8D8.s b/asm/non_matchings/code_8008C1D0/func_8008E8D8.s new file mode 100644 index 000000000..2bbc32ef4 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008E8D8.s @@ -0,0 +1,137 @@ +glabel func_8008E8D8 +/* 08F4D8 8008E8D8 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08F4DC 8008E8DC AFBF0014 */ sw $ra, 0x14($sp) +/* 08F4E0 8008E8E0 AFA5001C */ sw $a1, 0x1c($sp) +/* 08F4E4 8008E8E4 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 08F4E8 8008E8E8 44813000 */ mtc1 $at, $f6 +/* 08F4EC 8008E8EC C484008C */ lwc1 $f4, 0x8c($a0) +/* 08F4F0 8008E8F0 8C8900BC */ lw $t1, 0xbc($a0) +/* 08F4F4 8008E8F4 84990042 */ lh $t9, 0x42($a0) +/* 08F4F8 8008E8F8 46062203 */ div.s $f8, $f4, $f6 +/* 08F4FC 8008E8FC 2401FF3F */ li $at, -193 +/* 08F500 8008E900 01215024 */ and $t2, $t1, $at +/* 08F504 8008E904 44805000 */ mtc1 $zero, $f10 +/* 08F508 8008E908 00057600 */ sll $t6, $a1, 0x18 +/* 08F50C 8008E90C 27280AAA */ addiu $t0, $t9, 0xaaa +/* 08F510 8008E910 000E2E03 */ sra $a1, $t6, 0x18 +/* 08F514 8008E914 2418000F */ li $t8, 15 +/* 08F518 8008E918 A4880042 */ sh $t0, 0x42($a0) +/* 08F51C 8008E91C 314C0008 */ andi $t4, $t2, 8 +/* 08F520 8008E920 24010008 */ li $at, 8 +/* 08F524 8008E924 3C098016 */ lui $t1, %hi(D_80165190) # $t1, 0x8016 +/* 08F528 8008E928 A4800206 */ sh $zero, 0x206($a0) +/* 08F52C 8008E92C A48000C4 */ sh $zero, 0xc4($a0) +/* 08F530 8008E930 A48000C0 */ sh $zero, 0xc0($a0) +/* 08F534 8008E934 AC80007C */ sw $zero, 0x7c($a0) +/* 08F538 8008E938 A49800C2 */ sh $t8, 0xc2($a0) +/* 08F53C 8008E93C AC8A00BC */ sw $t2, 0xbc($a0) +/* 08F540 8008E940 24030001 */ li $v1, 1 +/* 08F544 8008E944 25295190 */ addiu $t1, %lo(D_80165190) # addiu $t1, $t1, 0x5190 +/* 08F548 8008E948 00054040 */ sll $t0, $a1, 1 +/* 08F54C 8008E94C E48A009C */ swc1 $f10, 0x9c($a0) +/* 08F550 8008E950 11810004 */ beq $t4, $at, .L8008E964 +/* 08F554 8008E954 E488008C */ swc1 $f8, 0x8c($a0) +/* 08F558 8008E958 848D00E0 */ lh $t5, 0xe0($a0) +/* 08F55C 8008E95C 25AE0001 */ addiu $t6, $t5, 1 +/* 08F560 8008E960 A48E00E0 */ sh $t6, 0xe0($a0) +.L8008E964: +/* 08F564 8008E964 848F00E0 */ lh $t7, 0xe0($a0) +/* 08F568 8008E968 24010004 */ li $at, 4 +/* 08F56C 8008E96C 01091021 */ addu $v0, $t0, $t1 +/* 08F570 8008E970 15E10024 */ bne $t7, $at, .L8008EA04 +/* 08F574 8008E974 00055080 */ sll $t2, $a1, 2 +/* 08F578 8008E978 8C9800BC */ lw $t8, 0xbc($a0) +/* 08F57C 8008E97C 3C01FDFF */ lui $at, (0xFDFFFFFF >> 16) # lui $at, 0xfdff +/* 08F580 8008E980 3421FFFF */ ori $at, (0xFDFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F584 8008E984 0301C824 */ and $t9, $t8, $at +/* 08F588 8008E988 AC9900BC */ sw $t9, 0xbc($a0) +/* 08F58C 8008E98C A48000A8 */ sh $zero, 0xa8($a0) +/* 08F590 8008E990 A4800236 */ sh $zero, 0x236($a0) +/* 08F594 8008E994 A4430030 */ sh $v1, 0x30($v0) +/* 08F598 8008E998 A4430000 */ sh $v1, ($v0) +/* 08F59C 8008E99C A4430010 */ sh $v1, 0x10($v0) +/* 08F5A0 8008E9A0 A4430020 */ sh $v1, 0x20($v0) +/* 08F5A4 8008E9A4 3C0B8016 */ lui $t3, %hi(D_80165460) # 0x8016 +/* 08F5A8 8008E9A8 A4800042 */ sh $zero, 0x42($a0) +/* 08F5AC 8008E9AC 016A5821 */ addu $t3, $t3, $t2 +/* 08F5B0 8008E9B0 8D6B5460 */ lw $t3, %lo(D_80165460)($t3) # 0x5460($t3) +/* 08F5B4 8008E9B4 3C0E800E */ lui $t6, %hi(gModeSelection) # $t6, 0x800e +/* 08F5B8 8008E9B8 146B000A */ bne $v1, $t3, .L8008E9E4 +/* 08F5BC 8008E9BC 00000000 */ nop +/* 08F5C0 8008E9C0 948C0000 */ lhu $t4, ($a0) +/* 08F5C4 8008E9C4 24014000 */ li $at, 16384 +/* 08F5C8 8008E9C8 318D4000 */ andi $t5, $t4, 0x4000 +/* 08F5CC 8008E9CC 15A10005 */ bne $t5, $at, .L8008E9E4 +/* 08F5D0 8008E9D0 3C0142C8 */ li $at, 0x42C80000 # 100.000000 +/* 08F5D4 8008E9D4 44819000 */ mtc1 $at, $f18 +/* 08F5D8 8008E9D8 C490009C */ lwc1 $f16, 0x9c($a0) +/* 08F5DC 8008E9DC 46128100 */ add.s $f4, $f16, $f18 +/* 08F5E0 8008E9E0 E484009C */ swc1 $f4, 0x9c($a0) +.L8008E9E4: +/* 08F5E4 8008E9E4 8DCEC53C */ lw $t6, %lo(gModeSelection)($t6) +/* 08F5E8 8008E9E8 24010003 */ li $at, 3 +/* 08F5EC 8008E9EC 55C10039 */ bnel $t6, $at, .L8008EAD4 +/* 08F5F0 8008E9F0 8FBF0014 */ lw $ra, 0x14($sp) +/* 08F5F4 8008E9F4 0C01AE2D */ jal func_8006B8B4 +/* 08F5F8 8008E9F8 00000000 */ nop +/* 08F5FC 8008E9FC 10000035 */ b .L8008EAD4 +/* 08F600 8008EA00 8FBF0014 */ lw $ra, 0x14($sp) +.L8008EA04: +/* 08F604 8008EA04 848F00A8 */ lh $t7, 0xa8($a0) +/* 08F608 8008EA08 25F80090 */ addiu $t8, $t7, 0x90 +/* 08F60C 8008EA0C A49800A8 */ sh $t8, 0xa8($a0) +/* 08F610 8008EA10 849900A8 */ lh $t9, 0xa8($a0) +/* 08F614 8008EA14 2B212000 */ slti $at, $t9, 0x2000 +/* 08F618 8008EA18 5420002E */ bnel $at, $zero, .L8008EAD4 +/* 08F61C 8008EA1C 8FBF0014 */ lw $ra, 0x14($sp) +/* 08F620 8008EA20 84880236 */ lh $t0, 0x236($a0) +/* 08F624 8008EA24 3C01FDFF */ lui $at, (0xFDFFFFFF >> 16) # lui $at, 0xfdff +/* 08F628 8008EA28 A48000A8 */ sh $zero, 0xa8($a0) +/* 08F62C 8008EA2C 2509FFFF */ addiu $t1, $t0, -1 +/* 08F630 8008EA30 A4890236 */ sh $t1, 0x236($a0) +/* 08F634 8008EA34 848A0236 */ lh $t2, 0x236($a0) +/* 08F638 8008EA38 24030001 */ li $v1, 1 +/* 08F63C 8008EA3C 3421FFFF */ ori $at, (0xFDFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F640 8008EA40 15400023 */ bnez $t2, .L8008EAD0 +/* 08F644 8008EA44 00056840 */ sll $t5, $a1, 1 +/* 08F648 8008EA48 8C8B00BC */ lw $t3, 0xbc($a0) +/* 08F64C 8008EA4C 3C0E8016 */ lui $t6, %hi(D_80165190) # $t6, 0x8016 +/* 08F650 8008EA50 25CE5190 */ addiu $t6, %lo(D_80165190) # addiu $t6, $t6, 0x5190 +/* 08F654 8008EA54 01616024 */ and $t4, $t3, $at +/* 08F658 8008EA58 AC8C00BC */ sw $t4, 0xbc($a0) +/* 08F65C 8008EA5C A4800236 */ sh $zero, 0x236($a0) +/* 08F660 8008EA60 01AE1021 */ addu $v0, $t5, $t6 +/* 08F664 8008EA64 A4430000 */ sh $v1, ($v0) +/* 08F668 8008EA68 A4430010 */ sh $v1, 0x10($v0) +/* 08F66C 8008EA6C A4430020 */ sh $v1, 0x20($v0) +/* 08F670 8008EA70 A4430030 */ sh $v1, 0x30($v0) +/* 08F674 8008EA74 00057880 */ sll $t7, $a1, 2 +/* 08F678 8008EA78 3C188016 */ lui $t8, %hi(D_80165460) # 0x8016 +/* 08F67C 8008EA7C A4800042 */ sh $zero, 0x42($a0) +/* 08F680 8008EA80 030FC021 */ addu $t8, $t8, $t7 +/* 08F684 8008EA84 8F185460 */ lw $t8, %lo(D_80165460)($t8) # 0x5460($t8) +/* 08F688 8008EA88 3C09800E */ lui $t1, %hi(gModeSelection) # $t1, 0x800e +/* 08F68C 8008EA8C 1478000A */ bne $v1, $t8, .L8008EAB8 +/* 08F690 8008EA90 00000000 */ nop +/* 08F694 8008EA94 94990000 */ lhu $t9, ($a0) +/* 08F698 8008EA98 24014000 */ li $at, 16384 +/* 08F69C 8008EA9C 33284000 */ andi $t0, $t9, 0x4000 +/* 08F6A0 8008EAA0 15010005 */ bne $t0, $at, .L8008EAB8 +/* 08F6A4 8008EAA4 3C0142C8 */ li $at, 0x42C80000 # 100.000000 +/* 08F6A8 8008EAA8 44814000 */ mtc1 $at, $f8 +/* 08F6AC 8008EAAC C486009C */ lwc1 $f6, 0x9c($a0) +/* 08F6B0 8008EAB0 46083280 */ add.s $f10, $f6, $f8 +/* 08F6B4 8008EAB4 E48A009C */ swc1 $f10, 0x9c($a0) +.L8008EAB8: +/* 08F6B8 8008EAB8 8D29C53C */ lw $t1, %lo(gModeSelection)($t1) +/* 08F6BC 8008EABC 24010003 */ li $at, 3 +/* 08F6C0 8008EAC0 55210004 */ bnel $t1, $at, .L8008EAD4 +/* 08F6C4 8008EAC4 8FBF0014 */ lw $ra, 0x14($sp) +/* 08F6C8 8008EAC8 0C01AE2D */ jal func_8006B8B4 +/* 08F6CC 8008EACC 00000000 */ nop +.L8008EAD0: +/* 08F6D0 8008EAD0 8FBF0014 */ lw $ra, 0x14($sp) +.L8008EAD4: +/* 08F6D4 8008EAD4 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08F6D8 8008EAD8 03E00008 */ jr $ra +/* 08F6DC 8008EADC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008EAE0.s b/asm/non_matchings/code_8008C1D0/func_8008EAE0.s new file mode 100644 index 000000000..39c5add05 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008EAE0.s @@ -0,0 +1,88 @@ +glabel func_8008EAE0 +/* 08F6E0 8008EAE0 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 08F6E4 8008EAE4 AFBF001C */ sw $ra, 0x1c($sp) +/* 08F6E8 8008EAE8 AFB00018 */ sw $s0, 0x18($sp) +/* 08F6EC 8008EAEC AFA5002C */ sw $a1, 0x2c($sp) +/* 08F6F0 8008EAF0 00808025 */ move $s0, $a0 +/* 08F6F4 8008EAF4 0C0230D5 */ jal func_8008C354 +/* 08F6F8 8008EAF8 83A5002F */ lb $a1, 0x2f($sp) +/* 08F6FC 8008EAFC 0C0230C4 */ jal func_8008C310 +/* 08F700 8008EB00 02002025 */ move $a0, $s0 +/* 08F704 8008EB04 44800000 */ mtc1 $zero, $f0 +/* 08F708 8008EB08 8E0E00BC */ lw $t6, 0xbc($s0) +/* 08F70C 8008EB0C 96030254 */ lhu $v1, 0x254($s0) +/* 08F710 8008EB10 2401FFEF */ li $at, -17 +/* 08F714 8008EB14 01C17824 */ and $t7, $t6, $at +/* 08F718 8008EB18 3C01800E */ lui $at, %hi(D_800E3730) +/* 08F71C 8008EB1C 00031080 */ sll $v0, $v1, 2 +/* 08F720 8008EB20 A60000A8 */ sh $zero, 0xa8($s0) +/* 08F724 8008EB24 AE0F00BC */ sw $t7, 0xbc($s0) +/* 08F728 8008EB28 00220821 */ addu $at, $at, $v0 +/* 08F72C 8008EB2C E60000F0 */ swc1 $f0, 0xf0($s0) +/* 08F730 8008EB30 E60000F4 */ swc1 $f0, 0xf4($s0) +/* 08F734 8008EB34 E60000EC */ swc1 $f0, 0xec($s0) +/* 08F738 8008EB38 C4243730 */ lwc1 $f4, %lo(D_800E3730)($at) +/* 08F73C 8008EB3C 3C01800E */ lui $at, %hi(D_800E3710) +/* 08F740 8008EB40 00220821 */ addu $at, $at, $v0 +/* 08F744 8008EB44 E60400F0 */ swc1 $f4, 0xf0($s0) +/* 08F748 8008EB48 C4263710 */ lwc1 $f6, %lo(D_800E3710)($at) +/* 08F74C 8008EB4C 96040000 */ lhu $a0, ($s0) +/* 08F750 8008EB50 24180004 */ li $t8, 4 +/* 08F754 8008EB54 24014000 */ li $at, 16384 +/* 08F758 8008EB58 30994000 */ andi $t9, $a0, 0x4000 +/* 08F75C 8008EB5C A6180236 */ sh $t8, 0x236($s0) +/* 08F760 8008EB60 A6000042 */ sh $zero, 0x42($s0) +/* 08F764 8008EB64 A60000E0 */ sh $zero, 0xe0($s0) +/* 08F768 8008EB68 17210011 */ bne $t9, $at, .L8008EBB0 +/* 08F76C 8008EB6C E60600EC */ swc1 $f6, 0xec($s0) +/* 08F770 8008EB70 30880100 */ andi $t0, $a0, 0x100 +/* 08F774 8008EB74 24010100 */ li $at, 256 +/* 08F778 8008EB78 1101000D */ beq $t0, $at, .L8008EBB0 +/* 08F77C 8008EB7C 93A4002F */ lbu $a0, 0x2f($sp) +/* 08F780 8008EB80 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900 +/* 08F784 8008EB84 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005 +/* 08F788 8008EB88 00032900 */ sll $a1, $v1, 4 +/* 08F78C 8008EB8C 00A12821 */ addu $a1, $a1, $at +/* 08F790 8008EB90 0C03243D */ jal func_800C90F4 +/* 08F794 8008EB94 AFA40020 */ sw $a0, 0x20($sp) +/* 08F798 8008EB98 3C051900 */ lui $a1, (0x19009005 >> 16) # lui $a1, 0x1900 +/* 08F79C 8008EB9C 8FA40020 */ lw $a0, 0x20($sp) +/* 08F7A0 8008EBA0 0C032418 */ jal func_800C9060 +/* 08F7A4 8008EBA4 34A59005 */ ori $a1, (0x19009005 & 0xFFFF) # ori $a1, $a1, 0x9005 +/* 08F7A8 8008EBA8 10000005 */ b .L8008EBC0 +/* 08F7AC 8008EBAC 8E0900BC */ lw $t1, 0xbc($s0) +.L8008EBB0: +/* 08F7B0 8008EBB0 83A4002F */ lb $a0, 0x2f($sp) +/* 08F7B4 8008EBB4 0C00263F */ jal func_800098FC +/* 08F7B8 8008EBB8 02002825 */ move $a1, $s0 +/* 08F7BC 8008EBBC 8E0900BC */ lw $t1, 0xbc($s0) +.L8008EBC0: +/* 08F7C0 8008EBC0 3C010200 */ lui $at, 0x200 +/* 08F7C4 8008EBC4 960B00B6 */ lhu $t3, 0xb6($s0) +/* 08F7C8 8008EBC8 8E0D000C */ lw $t5, 0xc($s0) +/* 08F7CC 8008EBCC 01215025 */ or $t2, $t1, $at +/* 08F7D0 8008EBD0 3C01FEFF */ lui $at, (0xFEFFFFFD >> 16) # lui $at, 0xfeff +/* 08F7D4 8008EBD4 3421FFFD */ ori $at, (0xFEFFFFFD & 0xFFFF) # ori $at, $at, 0xfffd +/* 08F7D8 8008EBD8 356C0040 */ ori $t4, $t3, 0x40 +/* 08F7DC 8008EBDC 01A17024 */ and $t6, $t5, $at +/* 08F7E0 8008EBE0 AE0A00BC */ sw $t2, 0xbc($s0) +/* 08F7E4 8008EBE4 A60C00B6 */ sh $t4, 0xb6($s0) +/* 08F7E8 8008EBE8 AE0E000C */ sw $t6, 0xc($s0) +/* 08F7EC 8008EBEC 83A2002F */ lb $v0, 0x2f($sp) +/* 08F7F0 8008EBF0 3C018016 */ lui $at, %hi(D_80165480) # 0x8016 +/* 08F7F4 8008EBF4 8FBF001C */ lw $ra, 0x1c($sp) +/* 08F7F8 8008EBF8 00027880 */ sll $t7, $v0, 2 +/* 08F7FC 8008EBFC 002F0821 */ addu $at, $at, $t7 +/* 08F800 8008EC00 AC205480 */ sw $zero, %lo(D_80165480)($at) # 0x5480($at) +/* 08F804 8008EC04 3C018016 */ lui $at, %hi(D_80165460) # 0x8016 +/* 08F808 8008EC08 002F0821 */ addu $at, $at, $t7 +/* 08F80C 8008EC0C AC205460 */ sw $zero, %lo(D_80165460)($at) # 0x5460($at) +/* 08F810 8008EC10 3C018016 */ lui $at, %hi(D_80165440) # 0x8016 +/* 08F814 8008EC14 002F0821 */ addu $at, $at, $t7 +/* 08F818 8008EC18 AC205440 */ sw $zero, %lo(D_80165440)($at) # 0x5440($at) +/* 08F81C 8008EC1C 3C018016 */ lui $at, %hi(D_80165420) # 0x8016 +/* 08F820 8008EC20 002F0821 */ addu $at, $at, $t7 +/* 08F824 8008EC24 8FB00018 */ lw $s0, 0x18($sp) +/* 08F828 8008EC28 AC205420 */ sw $zero, %lo(D_80165420)($at) # 0x5420($at) +/* 08F82C 8008EC2C 03E00008 */ jr $ra +/* 08F830 8008EC30 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/code_8008C1D0/func_8008EC34.s b/asm/non_matchings/code_8008C1D0/func_8008EC34.s new file mode 100644 index 000000000..392ee1cf5 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008EC34.s @@ -0,0 +1,22 @@ +glabel func_8008EC34 +/* 08F834 8008EC34 AFA50004 */ sw $a1, 4($sp) +/* 08F838 8008EC38 8C9800BC */ lw $t8, 0xbc($a0) +/* 08F83C 8008EC3C 00057600 */ sll $t6, $a1, 0x18 +/* 08F840 8008EC40 3C01FDFF */ lui $at, (0xFDFFFFFF >> 16) # lui $at, 0xfdff +/* 08F844 8008EC44 000E7E03 */ sra $t7, $t6, 0x18 +/* 08F848 8008EC48 3421FFFF */ ori $at, (0xFDFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F84C 8008EC4C 3C098016 */ lui $t1, %hi(D_80165190) # $t1, 0x8016 +/* 08F850 8008EC50 25295190 */ addiu $t1, %lo(D_80165190) # addiu $t1, $t1, 0x5190 +/* 08F854 8008EC54 000F4040 */ sll $t0, $t7, 1 +/* 08F858 8008EC58 0301C824 */ and $t9, $t8, $at +/* 08F85C 8008EC5C 24030001 */ li $v1, 1 +/* 08F860 8008EC60 AC9900BC */ sw $t9, 0xbc($a0) +/* 08F864 8008EC64 A48000A8 */ sh $zero, 0xa8($a0) +/* 08F868 8008EC68 A4800236 */ sh $zero, 0x236($a0) +/* 08F86C 8008EC6C 01091021 */ addu $v0, $t0, $t1 +/* 08F870 8008EC70 A4430000 */ sh $v1, ($v0) +/* 08F874 8008EC74 A4430010 */ sh $v1, 0x10($v0) +/* 08F878 8008EC78 A4430020 */ sh $v1, 0x20($v0) +/* 08F87C 8008EC7C A4430030 */ sh $v1, 0x30($v0) +/* 08F880 8008EC80 03E00008 */ jr $ra +/* 08F884 8008EC84 A4800042 */ sh $zero, 0x42($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008EC88.s b/asm/non_matchings/code_8008C1D0/func_8008EC88.s new file mode 100644 index 000000000..b0f3f0952 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008EC88.s @@ -0,0 +1,82 @@ +glabel func_8008EC88 +/* 08F888 8008EC88 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 08F88C 8008EC8C AFA5002C */ sw $a1, 0x2c($sp) +/* 08F890 8008EC90 00A07025 */ move $t6, $a1 +/* 08F894 8008EC94 000E2E00 */ sll $a1, $t6, 0x18 +/* 08F898 8008EC98 AFBF001C */ sw $ra, 0x1c($sp) +/* 08F89C 8008EC9C AFB00018 */ sw $s0, 0x18($sp) +/* 08F8A0 8008ECA0 00057E03 */ sra $t7, $a1, 0x18 +/* 08F8A4 8008ECA4 00808025 */ move $s0, $a0 +/* 08F8A8 8008ECA8 01E02825 */ move $a1, $t7 +/* 08F8AC 8008ECAC 0C0230D5 */ jal func_8008C354 +/* 08F8B0 8008ECB0 A3AE002F */ sb $t6, 0x2f($sp) +/* 08F8B4 8008ECB4 8E1800BC */ lw $t8, 0xbc($s0) +/* 08F8B8 8008ECB8 3C010010 */ lui $at, 0x10 +/* 08F8BC 8008ECBC 8E08000C */ lw $t0, 0xc($s0) +/* 08F8C0 8008ECC0 0301C825 */ or $t9, $t8, $at +/* 08F8C4 8008ECC4 3C01FF7F */ lui $at, (0xFF7FFFFF >> 16) # lui $at, 0xff7f +/* 08F8C8 8008ECC8 3421FFFF */ ori $at, (0xFF7FFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08F8CC 8008ECCC 01014824 */ and $t1, $t0, $at +/* 08F8D0 8008ECD0 83A6002F */ lb $a2, 0x2f($sp) +/* 08F8D4 8008ECD4 3C014100 */ li $at, 0x41000000 # 8.000000 +/* 08F8D8 8008ECD8 44812000 */ mtc1 $at, $f4 +/* 08F8DC 8008ECDC AE1900BC */ sw $t9, 0xbc($s0) +/* 08F8E0 8008ECE0 AE09000C */ sw $t1, 0xc($s0) +/* 08F8E4 8008ECE4 A6000DB4 */ sh $zero, 0xdb4($s0) +/* 08F8E8 8008ECE8 3C0A8016 */ lui $t2, %hi(D_8015F890) # $t2, 0x8016 +/* 08F8EC 8008ECEC E6040DBC */ swc1 $f4, 0xdbc($s0) +/* 08F8F0 8008ECF0 954AF890 */ lhu $t2, %lo(D_8015F890)($t2) +/* 08F8F4 8008ECF4 24010001 */ li $at, 1 +/* 08F8F8 8008ECF8 3C0E800E */ lui $t6, %hi(D_800DC4DC) # $t6, 0x800e +/* 08F8FC 8008ECFC 11410015 */ beq $t2, $at, .L8008ED54 +/* 08F900 8008ED00 00000000 */ nop +/* 08F904 8008ED04 96020000 */ lhu $v0, ($s0) +/* 08F908 8008ED08 24014000 */ li $at, 16384 +/* 08F90C 8008ED0C 304B4000 */ andi $t3, $v0, 0x4000 +/* 08F910 8008ED10 1561001F */ bne $t3, $at, .L8008ED90 +/* 08F914 8008ED14 304C0100 */ andi $t4, $v0, 0x100 +/* 08F918 8008ED18 1580001D */ bnez $t4, .L8008ED90 +/* 08F91C 8008ED1C 30C400FF */ andi $a0, $a2, 0xff +/* 08F920 8008ED20 96050254 */ lhu $a1, 0x254($s0) +/* 08F924 8008ED24 3C012900 */ lui $at, (0x29008001 >> 16) # lui $at, 0x2900 +/* 08F928 8008ED28 34218001 */ ori $at, (0x29008001 & 0xFFFF) # ori $at, $at, 0x8001 +/* 08F92C 8008ED2C 00056900 */ sll $t5, $a1, 4 +/* 08F930 8008ED30 01A12821 */ addu $a1, $t5, $at +/* 08F934 8008ED34 0C03243D */ jal func_800C90F4 +/* 08F938 8008ED38 AFA40024 */ sw $a0, 0x24($sp) +/* 08F93C 8008ED3C 3C051900 */ lui $a1, (0x1900A40B >> 16) # lui $a1, 0x1900 +/* 08F940 8008ED40 8FA40024 */ lw $a0, 0x24($sp) +/* 08F944 8008ED44 0C032418 */ jal func_800C9060 +/* 08F948 8008ED48 34A5A40B */ ori $a1, (0x1900A40B & 0xFFFF) # ori $a1, $a1, 0xa40b +/* 08F94C 8008ED4C 10000011 */ b .L8008ED94 +/* 08F950 8008ED50 86180044 */ lh $t8, 0x44($s0) +.L8008ED54: +/* 08F954 8008ED54 8DCEC4DC */ lw $t6, %lo(D_800DC4DC)($t6) +/* 08F958 8008ED58 30C400FF */ andi $a0, $a2, 0xff +/* 08F95C 8008ED5C 3C012900 */ lui $at, (0x29008001 >> 16) # lui $at, 0x2900 +/* 08F960 8008ED60 560E000C */ bnel $s0, $t6, .L8008ED94 +/* 08F964 8008ED64 86180044 */ lh $t8, 0x44($s0) +/* 08F968 8008ED68 96050254 */ lhu $a1, 0x254($s0) +/* 08F96C 8008ED6C 34218001 */ ori $at, (0x29008001 & 0xFFFF) # ori $at, $at, 0x8001 +/* 08F970 8008ED70 AFA40024 */ sw $a0, 0x24($sp) +/* 08F974 8008ED74 00057900 */ sll $t7, $a1, 4 +/* 08F978 8008ED78 0C03243D */ jal func_800C90F4 +/* 08F97C 8008ED7C 01E12821 */ addu $a1, $t7, $at +/* 08F980 8008ED80 3C051900 */ lui $a1, (0x1900A40B >> 16) # lui $a1, 0x1900 +/* 08F984 8008ED84 8FA40024 */ lw $a0, 0x24($sp) +/* 08F988 8008ED88 0C032418 */ jal func_800C9060 +/* 08F98C 8008ED8C 34A5A40B */ ori $a1, (0x1900A40B & 0xFFFF) # ori $a1, $a1, 0xa40b +.L8008ED90: +/* 08F990 8008ED90 86180044 */ lh $t8, 0x44($s0) +.L8008ED94: +/* 08F994 8008ED94 8E0800BC */ lw $t0, 0xbc($s0) +/* 08F998 8008ED98 2401FFDF */ li $at, -33 +/* 08F99C 8008ED9C 3319FFFE */ andi $t9, $t8, 0xfffe +/* 08F9A0 8008EDA0 01014824 */ and $t1, $t0, $at +/* 08F9A4 8008EDA4 A6190044 */ sh $t9, 0x44($s0) +/* 08F9A8 8008EDA8 AE0900BC */ sw $t1, 0xbc($s0) +/* 08F9AC 8008EDAC 8FBF001C */ lw $ra, 0x1c($sp) +/* 08F9B0 8008EDB0 8FB00018 */ lw $s0, 0x18($sp) +/* 08F9B4 8008EDB4 27BD0028 */ addiu $sp, $sp, 0x28 +/* 08F9B8 8008EDB8 03E00008 */ jr $ra +/* 08F9BC 8008EDBC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008EDC0.s b/asm/non_matchings/code_8008C1D0/func_8008EDC0.s new file mode 100644 index 000000000..607c2efee --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008EDC0.s @@ -0,0 +1,72 @@ +glabel func_8008EDC0 +/* 08F9C0 8008EDC0 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08F9C4 8008EDC4 AFBF0014 */ sw $ra, 0x14($sp) +/* 08F9C8 8008EDC8 948E0256 */ lhu $t6, 0x256($a0) +/* 08F9CC 8008EDCC C4840214 */ lwc1 $f4, 0x214($a0) +/* 08F9D0 8008EDD0 00803825 */ move $a3, $a0 +/* 08F9D4 8008EDD4 19C00004 */ blez $t6, .L8008EDE8 +/* 08F9D8 8008EDD8 E484009C */ swc1 $f4, 0x9c($a0) +/* 08F9DC 8008EDDC 44803000 */ mtc1 $zero, $f6 +/* 08F9E0 8008EDE0 00000000 */ nop +/* 08F9E4 8008EDE4 E486009C */ swc1 $f6, 0x9c($a0) +.L8008EDE8: +/* 08F9E8 8008EDE8 94EF00F8 */ lhu $t7, 0xf8($a3) +/* 08F9EC 8008EDEC 240100FE */ li $at, 254 +/* 08F9F0 8008EDF0 24E40080 */ addiu $a0, $a3, 0x80 +/* 08F9F4 8008EDF4 11E1000D */ beq $t7, $at, .L8008EE2C +/* 08F9F8 8008EDF8 3C0543C8 */ lui $a1, 0x43c8 +/* 08F9FC 8008EDFC 8CF800BC */ lw $t8, 0xbc($a3) +/* 08FA00 8008EE00 24010008 */ li $at, 8 +/* 08FA04 8008EE04 3C063F80 */ lui $a2, 0x3f80 +/* 08FA08 8008EE08 33190008 */ andi $t9, $t8, 8 +/* 08FA0C 8008EE0C 53210008 */ beql $t9, $at, .L8008EE30 +/* 08FA10 8008EE10 3C063C23 */ lui $a2, 0x3c23 +/* 08FA14 8008EE14 24E40080 */ addiu $a0, $a3, 0x80 +/* 08FA18 8008EE18 24050000 */ li $a1, 0 +/* 08FA1C 8008EE1C 0C008973 */ jal func_800225CC +/* 08FA20 8008EE20 AFA70018 */ sw $a3, 0x18($sp) +/* 08FA24 8008EE24 10000006 */ b .L8008EE40 +/* 08FA28 8008EE28 8FA70018 */ lw $a3, 0x18($sp) +.L8008EE2C: +/* 08FA2C 8008EE2C 3C063C23 */ lui $a2, (0x3C23D70A >> 16) # lui $a2, 0x3c23 +.L8008EE30: +/* 08FA30 8008EE30 34C6D70A */ ori $a2, (0x3C23D70A & 0xFFFF) # ori $a2, $a2, 0xd70a +/* 08FA34 8008EE34 0C008973 */ jal func_800225CC +/* 08FA38 8008EE38 AFA70018 */ sw $a3, 0x18($sp) +/* 08FA3C 8008EE3C 8FA70018 */ lw $a3, 0x18($sp) +.L8008EE40: +/* 08FA40 8008EE40 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08FA44 8008EE44 44814000 */ mtc1 $at, $f8 +/* 08FA48 8008EE48 C4EA0080 */ lwc1 $f10, 0x80($a3) +/* 08FA4C 8008EE4C 3C01FFEF */ lui $at, (0xFFEFFFFF >> 16) # lui $at, 0xffef +/* 08FA50 8008EE50 3421FFFF */ ori $at, (0xFFEFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08FA54 8008EE54 4608503E */ c.le.s $f10, $f8 +/* 08FA58 8008EE58 00000000 */ nop +/* 08FA5C 8008EE5C 45020016 */ bc1fl .L8008EEB8 +/* 08FA60 8008EE60 8FBF0014 */ lw $ra, 0x14($sp) +/* 08FA64 8008EE64 8CE800BC */ lw $t0, 0xbc($a3) +/* 08FA68 8008EE68 84EA00C2 */ lh $t2, 0xc2($a3) +/* 08FA6C 8008EE6C 44808000 */ mtc1 $zero, $f16 +/* 08FA70 8008EE70 01014824 */ and $t1, $t0, $at +/* 08FA74 8008EE74 29410033 */ slti $at, $t2, 0x33 +/* 08FA78 8008EE78 ACE900BC */ sw $t1, 0xbc($a3) +/* 08FA7C 8008EE7C 1420000D */ bnez $at, .L8008EEB4 +/* 08FA80 8008EE80 E4F00080 */ swc1 $f16, 0x80($a3) +/* 08FA84 8008EE84 C4F2009C */ lwc1 $f18, 0x9c($a3) +/* 08FA88 8008EE88 3C01800F */ lui $at, %hi(D_800EF5A0) +/* 08FA8C 8008EE8C D420F5A0 */ ldc1 $f0, %lo(D_800EF5A0)($at) +/* 08FA90 8008EE90 C4EA008C */ lwc1 $f10, 0x8c($a3) +/* 08FA94 8008EE94 46009121 */ cvt.d.s $f4, $f18 +/* 08FA98 8008EE98 46202182 */ mul.d $f6, $f4, $f0 +/* 08FA9C 8008EE9C 46005421 */ cvt.d.s $f16, $f10 +/* 08FAA0 8008EEA0 46208482 */ mul.d $f18, $f16, $f0 +/* 08FAA4 8008EEA4 46203220 */ cvt.s.d $f8, $f6 +/* 08FAA8 8008EEA8 46209120 */ cvt.s.d $f4, $f18 +/* 08FAAC 8008EEAC E4E8009C */ swc1 $f8, 0x9c($a3) +/* 08FAB0 8008EEB0 E4E4008C */ swc1 $f4, 0x8c($a3) +.L8008EEB4: +/* 08FAB4 8008EEB4 8FBF0014 */ lw $ra, 0x14($sp) +.L8008EEB8: +/* 08FAB8 8008EEB8 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08FABC 8008EEBC 03E00008 */ jr $ra +/* 08FAC0 8008EEC0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008EEC4.s b/asm/non_matchings/code_8008C1D0/func_8008EEC4.s new file mode 100644 index 000000000..1f449b793 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008EEC4.s @@ -0,0 +1,9 @@ +glabel func_8008EEC4 +/* 08FAC4 8008EEC4 8C8E00BC */ lw $t6, 0xbc($a0) +/* 08FAC8 8008EEC8 3C01FFEF */ lui $at, (0xFFEFFFFF >> 16) # lui $at, 0xffef +/* 08FACC 8008EECC 44802000 */ mtc1 $zero, $f4 +/* 08FAD0 8008EED0 3421FFFF */ ori $at, (0xFFEFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 08FAD4 8008EED4 01C17824 */ and $t7, $t6, $at +/* 08FAD8 8008EED8 AC8F00BC */ sw $t7, 0xbc($a0) +/* 08FADC 8008EEDC 03E00008 */ jr $ra +/* 08FAE0 8008EEE0 E4840080 */ swc1 $f4, 0x80($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008EEE4.s b/asm/non_matchings/code_8008C1D0/func_8008EEE4.s new file mode 100644 index 000000000..7cecdb9f0 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008EEE4.s @@ -0,0 +1,77 @@ +glabel func_8008EEE4 +/* 08FAE4 8008EEE4 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 08FAE8 8008EEE8 AFA5002C */ sw $a1, 0x2c($sp) +/* 08FAEC 8008EEEC 00A07025 */ move $t6, $a1 +/* 08FAF0 8008EEF0 000E2E00 */ sll $a1, $t6, 0x18 +/* 08FAF4 8008EEF4 AFBF001C */ sw $ra, 0x1c($sp) +/* 08FAF8 8008EEF8 AFB00018 */ sw $s0, 0x18($sp) +/* 08FAFC 8008EEFC 00057E03 */ sra $t7, $a1, 0x18 +/* 08FB00 8008EF00 00808025 */ move $s0, $a0 +/* 08FB04 8008EF04 01E02825 */ move $a1, $t7 +/* 08FB08 8008EF08 0C0230D5 */ jal func_8008C354 +/* 08FB0C 8008EF0C A3AE002F */ sb $t6, 0x2f($sp) +/* 08FB10 8008EF10 8E1800BC */ lw $t8, 0xbc($s0) +/* 08FB14 8008EF14 8E08000C */ lw $t0, 0xc($s0) +/* 08FB18 8008EF18 3C01FFFF */ lui $at, (0xFFFF7FFF >> 16) # lui $at, 0xffff +/* 08FB1C 8008EF1C 83A6002F */ lb $a2, 0x2f($sp) +/* 08FB20 8008EF20 34217FFF */ ori $at, (0xFFFF7FFF & 0xFFFF) # ori $at, $at, 0x7fff +/* 08FB24 8008EF24 37190004 */ ori $t9, $t8, 4 +/* 08FB28 8008EF28 01014824 */ and $t1, $t0, $at +/* 08FB2C 8008EF2C AE1900BC */ sw $t9, 0xbc($s0) +/* 08FB30 8008EF30 AE09000C */ sw $t1, 0xc($s0) +/* 08FB34 8008EF34 3C0A8016 */ lui $t2, %hi(D_8015F890) # $t2, 0x8016 +/* 08FB38 8008EF38 954AF890 */ lhu $t2, %lo(D_8015F890)($t2) +/* 08FB3C 8008EF3C 24010001 */ li $at, 1 +/* 08FB40 8008EF40 3C0E800E */ lui $t6, %hi(D_800DC4DC) # $t6, 0x800e +/* 08FB44 8008EF44 11410015 */ beq $t2, $at, .L8008EF9C +/* 08FB48 8008EF48 00000000 */ nop +/* 08FB4C 8008EF4C 96020000 */ lhu $v0, ($s0) +/* 08FB50 8008EF50 24014000 */ li $at, 16384 +/* 08FB54 8008EF54 304B4000 */ andi $t3, $v0, 0x4000 +/* 08FB58 8008EF58 1561001F */ bne $t3, $at, .L8008EFD8 +/* 08FB5C 8008EF5C 304C0100 */ andi $t4, $v0, 0x100 +/* 08FB60 8008EF60 1580001D */ bnez $t4, .L8008EFD8 +/* 08FB64 8008EF64 30C400FF */ andi $a0, $a2, 0xff +/* 08FB68 8008EF68 96050254 */ lhu $a1, 0x254($s0) +/* 08FB6C 8008EF6C 3C012900 */ lui $at, (0x29008001 >> 16) # lui $at, 0x2900 +/* 08FB70 8008EF70 34218001 */ ori $at, (0x29008001 & 0xFFFF) # ori $at, $at, 0x8001 +/* 08FB74 8008EF74 00056900 */ sll $t5, $a1, 4 +/* 08FB78 8008EF78 01A12821 */ addu $a1, $t5, $at +/* 08FB7C 8008EF7C 0C03243D */ jal func_800C90F4 +/* 08FB80 8008EF80 AFA40024 */ sw $a0, 0x24($sp) +/* 08FB84 8008EF84 3C051900 */ lui $a1, (0x1900A40B >> 16) # lui $a1, 0x1900 +/* 08FB88 8008EF88 8FA40024 */ lw $a0, 0x24($sp) +/* 08FB8C 8008EF8C 0C032418 */ jal func_800C9060 +/* 08FB90 8008EF90 34A5A40B */ ori $a1, (0x1900A40B & 0xFFFF) # ori $a1, $a1, 0xa40b +/* 08FB94 8008EF94 10000011 */ b .L8008EFDC +/* 08FB98 8008EF98 86180044 */ lh $t8, 0x44($s0) +.L8008EF9C: +/* 08FB9C 8008EF9C 8DCEC4DC */ lw $t6, %lo(D_800DC4DC)($t6) +/* 08FBA0 8008EFA0 30C400FF */ andi $a0, $a2, 0xff +/* 08FBA4 8008EFA4 3C012900 */ lui $at, (0x29008001 >> 16) # lui $at, 0x2900 +/* 08FBA8 8008EFA8 560E000C */ bnel $s0, $t6, .L8008EFDC +/* 08FBAC 8008EFAC 86180044 */ lh $t8, 0x44($s0) +/* 08FBB0 8008EFB0 96050254 */ lhu $a1, 0x254($s0) +/* 08FBB4 8008EFB4 34218001 */ ori $at, (0x29008001 & 0xFFFF) # ori $at, $at, 0x8001 +/* 08FBB8 8008EFB8 AFA40024 */ sw $a0, 0x24($sp) +/* 08FBBC 8008EFBC 00057900 */ sll $t7, $a1, 4 +/* 08FBC0 8008EFC0 0C03243D */ jal func_800C90F4 +/* 08FBC4 8008EFC4 01E12821 */ addu $a1, $t7, $at +/* 08FBC8 8008EFC8 3C051900 */ lui $a1, (0x1900A40B >> 16) # lui $a1, 0x1900 +/* 08FBCC 8008EFCC 8FA40024 */ lw $a0, 0x24($sp) +/* 08FBD0 8008EFD0 0C032418 */ jal func_800C9060 +/* 08FBD4 8008EFD4 34A5A40B */ ori $a1, (0x1900A40B & 0xFFFF) # ori $a1, $a1, 0xa40b +.L8008EFD8: +/* 08FBD8 8008EFD8 86180044 */ lh $t8, 0x44($s0) +.L8008EFDC: +/* 08FBDC 8008EFDC 8E0800BC */ lw $t0, 0xbc($s0) +/* 08FBE0 8008EFE0 2401FFDF */ li $at, -33 +/* 08FBE4 8008EFE4 3319FFFE */ andi $t9, $t8, 0xfffe +/* 08FBE8 8008EFE8 01014824 */ and $t1, $t0, $at +/* 08FBEC 8008EFEC A6190044 */ sh $t9, 0x44($s0) +/* 08FBF0 8008EFF0 AE0900BC */ sw $t1, 0xbc($s0) +/* 08FBF4 8008EFF4 8FBF001C */ lw $ra, 0x1c($sp) +/* 08FBF8 8008EFF8 8FB00018 */ lw $s0, 0x18($sp) +/* 08FBFC 8008EFFC 27BD0028 */ addiu $sp, $sp, 0x28 +/* 08FC00 8008F000 03E00008 */ jr $ra +/* 08FC04 8008F004 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F008.s b/asm/non_matchings/code_8008C1D0/func_8008F008.s new file mode 100644 index 000000000..0bc3b92c5 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F008.s @@ -0,0 +1,60 @@ +glabel func_8008F008 +/* 08FC08 8008F008 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08FC0C 8008F00C AFBF0014 */ sw $ra, 0x14($sp) +/* 08FC10 8008F010 948F0254 */ lhu $t7, 0x254($a0) +/* 08FC14 8008F014 3C0E800E */ lui $t6, %hi(D_800E261C) # $t6, 0x800e +/* 08FC18 8008F018 8DCE261C */ lw $t6, %lo(D_800E261C)($t6) +/* 08FC1C 8008F01C 000FC080 */ sll $t8, $t7, 2 +/* 08FC20 8008F020 948800F8 */ lhu $t0, 0xf8($a0) +/* 08FC24 8008F024 01D8C821 */ addu $t9, $t6, $t8 +/* 08FC28 8008F028 C7240000 */ lwc1 $f4, ($t9) +/* 08FC2C 8008F02C 240100FC */ li $at, 252 +/* 08FC30 8008F030 00803825 */ move $a3, $a0 +/* 08FC34 8008F034 1101000C */ beq $t0, $at, .L8008F068 +/* 08FC38 8008F038 E484009C */ swc1 $f4, 0x9c($a0) +/* 08FC3C 8008F03C 8C8900BC */ lw $t1, 0xbc($a0) +/* 08FC40 8008F040 24010008 */ li $at, 8 +/* 08FC44 8008F044 24840080 */ addiu $a0, $a0, 0x80 +/* 08FC48 8008F048 312A0008 */ andi $t2, $t1, 8 +/* 08FC4C 8008F04C 11410006 */ beq $t2, $at, .L8008F068 +/* 08FC50 8008F050 24050000 */ li $a1, 0 +/* 08FC54 8008F054 3C063F80 */ lui $a2, 0x3f80 +/* 08FC58 8008F058 0C008973 */ jal func_800225CC +/* 08FC5C 8008F05C AFA70018 */ sw $a3, 0x18($sp) +/* 08FC60 8008F060 10000008 */ b .L8008F084 +/* 08FC64 8008F064 8FA70018 */ lw $a3, 0x18($sp) +.L8008F068: +/* 08FC68 8008F068 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc +/* 08FC6C 8008F06C 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 08FC70 8008F070 24E40080 */ addiu $a0, $a3, 0x80 +/* 08FC74 8008F074 3C054396 */ lui $a1, 0x4396 +/* 08FC78 8008F078 0C008973 */ jal func_800225CC +/* 08FC7C 8008F07C AFA70018 */ sw $a3, 0x18($sp) +/* 08FC80 8008F080 8FA70018 */ lw $a3, 0x18($sp) +.L8008F084: +/* 08FC84 8008F084 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 08FC88 8008F088 44813000 */ mtc1 $at, $f6 +/* 08FC8C 8008F08C C4E80080 */ lwc1 $f8, 0x80($a3) +/* 08FC90 8008F090 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 08FC94 8008F094 4606403E */ c.le.s $f8, $f6 +/* 08FC98 8008F098 00000000 */ nop +/* 08FC9C 8008F09C 4502000F */ bc1fl .L8008F0DC +/* 08FCA0 8008F0A0 8FBF0014 */ lw $ra, 0x14($sp) +/* 08FCA4 8008F0A4 44810000 */ mtc1 $at, $f0 +/* 08FCA8 8008F0A8 C4F0009C */ lwc1 $f16, 0x9c($a3) +/* 08FCAC 8008F0AC C4E4008C */ lwc1 $f4, 0x8c($a3) +/* 08FCB0 8008F0B0 8CEB00BC */ lw $t3, 0xbc($a3) +/* 08FCB4 8008F0B4 46008483 */ div.s $f18, $f16, $f0 +/* 08FCB8 8008F0B8 44805000 */ mtc1 $zero, $f10 +/* 08FCBC 8008F0BC 2401FFFB */ li $at, -5 +/* 08FCC0 8008F0C0 01616024 */ and $t4, $t3, $at +/* 08FCC4 8008F0C4 ACEC00BC */ sw $t4, 0xbc($a3) +/* 08FCC8 8008F0C8 E4EA0080 */ swc1 $f10, 0x80($a3) +/* 08FCCC 8008F0CC 46002183 */ div.s $f6, $f4, $f0 +/* 08FCD0 8008F0D0 E4F2009C */ swc1 $f18, 0x9c($a3) +/* 08FCD4 8008F0D4 E4E6008C */ swc1 $f6, 0x8c($a3) +/* 08FCD8 8008F0D8 8FBF0014 */ lw $ra, 0x14($sp) +.L8008F0DC: +/* 08FCDC 8008F0DC 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08FCE0 8008F0E0 03E00008 */ jr $ra +/* 08FCE4 8008F0E4 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F0E8.s b/asm/non_matchings/code_8008C1D0/func_8008F0E8.s new file mode 100644 index 000000000..a366f7d61 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F0E8.s @@ -0,0 +1,8 @@ +glabel func_8008F0E8 +/* 08FCE8 8008F0E8 8C8E00BC */ lw $t6, 0xbc($a0) +/* 08FCEC 8008F0EC 44802000 */ mtc1 $zero, $f4 +/* 08FCF0 8008F0F0 2401FFFB */ li $at, -5 +/* 08FCF4 8008F0F4 01C17824 */ and $t7, $t6, $at +/* 08FCF8 8008F0F8 AC8F00BC */ sw $t7, 0xbc($a0) +/* 08FCFC 8008F0FC 03E00008 */ jr $ra +/* 08FD00 8008F100 E4840080 */ swc1 $f4, 0x80($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008F104.s b/asm/non_matchings/code_8008C1D0/func_8008F104.s new file mode 100644 index 000000000..ca5e84435 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F104.s @@ -0,0 +1,47 @@ +glabel func_8008F104 +/* 08FD04 8008F104 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08FD08 8008F108 AFA5001C */ sw $a1, 0x1c($sp) +/* 08FD0C 8008F10C 00A07025 */ move $t6, $a1 +/* 08FD10 8008F110 000E2E00 */ sll $a1, $t6, 0x18 +/* 08FD14 8008F114 AFBF0014 */ sw $ra, 0x14($sp) +/* 08FD18 8008F118 00057E03 */ sra $t7, $a1, 0x18 +/* 08FD1C 8008F11C 01E02825 */ move $a1, $t7 +/* 08FD20 8008F120 A3AE001F */ sb $t6, 0x1f($sp) +/* 08FD24 8008F124 0C0230D5 */ jal func_8008C354 +/* 08FD28 8008F128 AFA40018 */ sw $a0, 0x18($sp) +/* 08FD2C 8008F12C 8FA60018 */ lw $a2, 0x18($sp) +/* 08FD30 8008F130 83A7001F */ lb $a3, 0x1f($sp) +/* 08FD34 8008F134 24190002 */ li $t9, 2 +/* 08FD38 8008F138 8CC800BC */ lw $t0, 0xbc($a2) +/* 08FD3C 8008F13C 84D8002E */ lh $t8, 0x2e($a2) +/* 08FD40 8008F140 3C018019 */ lui $at, %hi(D_8018D920) # 0x8019 +/* 08FD44 8008F144 00075840 */ sll $t3, $a3, 1 +/* 08FD48 8008F148 35094000 */ ori $t1, $t0, 0x4000 +/* 08FD4C 8008F14C 002B0821 */ addu $at, $at, $t3 +/* 08FD50 8008F150 240A8000 */ li $t2, -32768 +/* 08FD54 8008F154 A4D900B2 */ sh $t9, 0xb2($a2) +/* 08FD58 8008F158 A4C000C0 */ sh $zero, 0xc0($a2) +/* 08FD5C 8008F15C ACC0007C */ sw $zero, 0x7c($a2) +/* 08FD60 8008F160 ACC900BC */ sw $t1, 0xbc($a2) +/* 08FD64 8008F164 A4C00078 */ sh $zero, 0x78($a2) +/* 08FD68 8008F168 A4D800AE */ sh $t8, 0xae($a2) +/* 08FD6C 8008F16C A42AD920 */ sh $t2, %lo(D_8018D920)($at) # -0x26e0($at) +/* 08FD70 8008F170 94C20000 */ lhu $v0, ($a2) +/* 08FD74 8008F174 24014000 */ li $at, 16384 +/* 08FD78 8008F178 304C4000 */ andi $t4, $v0, 0x4000 +/* 08FD7C 8008F17C 1581000A */ bne $t4, $at, .L8008F1A8 +/* 08FD80 8008F180 304D0100 */ andi $t5, $v0, 0x100 +/* 08FD84 8008F184 24010100 */ li $at, 256 +/* 08FD88 8008F188 11A10007 */ beq $t5, $at, .L8008F1A8 +/* 08FD8C 8008F18C 30E400FF */ andi $a0, $a3, 0xff +/* 08FD90 8008F190 94C50254 */ lhu $a1, 0x254($a2) +/* 08FD94 8008F194 3C012900 */ lui $at, (0x29008003 >> 16) # lui $at, 0x2900 +/* 08FD98 8008F198 34218003 */ ori $at, (0x29008003 & 0xFFFF) # ori $at, $at, 0x8003 +/* 08FD9C 8008F19C 00057100 */ sll $t6, $a1, 4 +/* 08FDA0 8008F1A0 0C03243D */ jal func_800C90F4 +/* 08FDA4 8008F1A4 01C12821 */ addu $a1, $t6, $at +.L8008F1A8: +/* 08FDA8 8008F1A8 8FBF0014 */ lw $ra, 0x14($sp) +/* 08FDAC 8008F1AC 27BD0018 */ addiu $sp, $sp, 0x18 +/* 08FDB0 8008F1B0 03E00008 */ jr $ra +/* 08FDB4 8008F1B4 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F1B8.s b/asm/non_matchings/code_8008C1D0/func_8008F1B8.s new file mode 100644 index 000000000..97c1159b4 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F1B8.s @@ -0,0 +1,148 @@ +glabel func_8008F1B8 +/* 08FDB8 8008F1B8 AFA50004 */ sw $a1, 4($sp) +/* 08FDBC 8008F1BC C4840210 */ lwc1 $f4, 0x210($a0) +/* 08FDC0 8008F1C0 3C01800F */ lui $at, %hi(D_800EF5A8) +/* 08FDC4 8008F1C4 D428F5A8 */ ldc1 $f8, %lo(D_800EF5A8)($at) +/* 08FDC8 8008F1C8 460021A1 */ cvt.d.s $f6, $f4 +/* 08FDCC 8008F1CC 848200B2 */ lh $v0, 0xb2($a0) +/* 08FDD0 8008F1D0 46283282 */ mul.d $f10, $f6, $f8 +/* 08FDD4 8008F1D4 00057600 */ sll $t6, $a1, 0x18 +/* 08FDD8 8008F1D8 000E7E03 */ sra $t7, $t6, 0x18 +/* 08FDDC 8008F1DC 01E02825 */ move $a1, $t7 +/* 08FDE0 8008F1E0 304E0001 */ andi $t6, $v0, 1 +/* 08FDE4 8008F1E4 46205420 */ cvt.s.d $f16, $f10 +/* 08FDE8 8008F1E8 04410043 */ bgez $v0, .L8008F2F8 +/* 08FDEC 8008F1EC E490008C */ swc1 $f16, 0x8c($a0) +/* 08FDF0 8008F1F0 84980044 */ lh $t8, 0x44($a0) +/* 08FDF4 8008F1F4 24010080 */ li $at, 128 +/* 08FDF8 8008F1F8 00056840 */ sll $t5, $a1, 1 +/* 08FDFC 8008F1FC 33190080 */ andi $t9, $t8, 0x80 +/* 08FE00 8008F200 17210020 */ bne $t9, $at, .L8008F284 +/* 08FE04 8008F204 3C0E8019 */ lui $t6, %hi(D_8018D920) # 0x8019 +/* 08FE08 8008F208 8488002E */ lh $t0, 0x2e($a0) +/* 08FE0C 8008F20C 3C0B8019 */ lui $t3, %hi(D_8018D920) # $t3, 0x8019 +/* 08FE10 8008F210 256BD920 */ addiu $t3, %lo(D_8018D920) # addiu $t3, $t3, -0x26e0 +/* 08FE14 8008F214 000F5040 */ sll $t2, $t7, 1 +/* 08FE18 8008F218 250900B6 */ addiu $t1, $t0, 0xb6 +/* 08FE1C 8008F21C A489002E */ sh $t1, 0x2e($a0) +/* 08FE20 8008F220 014B1021 */ addu $v0, $t2, $t3 +/* 08FE24 8008F224 844C0000 */ lh $t4, ($v0) +/* 08FE28 8008F228 240100B6 */ li $at, 182 +/* 08FE2C 8008F22C 258D00B6 */ addiu $t5, $t4, 0xb6 +/* 08FE30 8008F230 31A3FFFF */ andi $v1, $t5, 0xffff +/* 08FE34 8008F234 0061001A */ div $zero, $v1, $at +/* 08FE38 8008F238 00007012 */ mflo $t6 +/* 08FE3C 8008F23C 000E7C00 */ sll $t7, $t6, 0x10 +/* 08FE40 8008F240 000FC403 */ sra $t8, $t7, 0x10 +/* 08FE44 8008F244 240100B4 */ li $at, 180 +/* 08FE48 8008F248 17010063 */ bne $t8, $at, .L8008F3D8 +/* 08FE4C 8008F24C A44D0000 */ sh $t5, ($v0) +/* 08FE50 8008F250 8C9900BC */ lw $t9, 0xbc($a0) +/* 08FE54 8008F254 2401BFFF */ li $at, -16385 +/* 08FE58 8008F258 C492009C */ lwc1 $f18, 0x9c($a0) +/* 08FE5C 8008F25C 03214024 */ and $t0, $t9, $at +/* 08FE60 8008F260 3C014040 */ li $at, 0x40400000 # 3.000000 +/* 08FE64 8008F264 44812000 */ mtc1 $at, $f4 +/* 08FE68 8008F268 94890000 */ lhu $t1, ($a0) +/* 08FE6C 8008F26C AC8800BC */ sw $t0, 0xbc($a0) +/* 08FE70 8008F270 46049183 */ div.s $f6, $f18, $f4 +/* 08FE74 8008F274 312AFF7F */ andi $t2, $t1, 0xff7f +/* 08FE78 8008F278 A48A0000 */ sh $t2, ($a0) +/* 08FE7C 8008F27C 03E00008 */ jr $ra +/* 08FE80 8008F280 E486009C */ swc1 $f6, 0x9c($a0) + +.L8008F284: +/* 08FE84 8008F284 848B002E */ lh $t3, 0x2e($a0) +/* 08FE88 8008F288 25CED920 */ addiu $t6, $t6, %lo(D_8018D920) # -0x26e0 +/* 08FE8C 8008F28C 01AE1021 */ addu $v0, $t5, $t6 +/* 08FE90 8008F290 256CFF4A */ addiu $t4, $t3, -0xb6 +/* 08FE94 8008F294 A48C002E */ sh $t4, 0x2e($a0) +/* 08FE98 8008F298 844F0000 */ lh $t7, ($v0) +/* 08FE9C 8008F29C 240100B6 */ li $at, 182 +/* 08FEA0 8008F2A0 25F8FF4A */ addiu $t8, $t7, -0xb6 +/* 08FEA4 8008F2A4 3303FFFF */ andi $v1, $t8, 0xffff +/* 08FEA8 8008F2A8 0061001A */ div $zero, $v1, $at +/* 08FEAC 8008F2AC 0000C812 */ mflo $t9 +/* 08FEB0 8008F2B0 00194400 */ sll $t0, $t9, 0x10 +/* 08FEB4 8008F2B4 00084C03 */ sra $t1, $t0, 0x10 +/* 08FEB8 8008F2B8 240100B4 */ li $at, 180 +/* 08FEBC 8008F2BC 15210046 */ bne $t1, $at, .L8008F3D8 +/* 08FEC0 8008F2C0 A4580000 */ sh $t8, ($v0) +/* 08FEC4 8008F2C4 8C8A00BC */ lw $t2, 0xbc($a0) +/* 08FEC8 8008F2C8 2401BFFF */ li $at, -16385 +/* 08FECC 8008F2CC C488009C */ lwc1 $f8, 0x9c($a0) +/* 08FED0 8008F2D0 01415824 */ and $t3, $t2, $at +/* 08FED4 8008F2D4 3C014040 */ li $at, 0x40400000 # 3.000000 +/* 08FED8 8008F2D8 44815000 */ mtc1 $at, $f10 +/* 08FEDC 8008F2DC 948C0000 */ lhu $t4, ($a0) +/* 08FEE0 8008F2E0 AC8B00BC */ sw $t3, 0xbc($a0) +/* 08FEE4 8008F2E4 460A4403 */ div.s $f16, $f8, $f10 +/* 08FEE8 8008F2E8 318DFF7F */ andi $t5, $t4, 0xff7f +/* 08FEEC 8008F2EC A48D0000 */ sh $t5, ($a0) +/* 08FEF0 8008F2F0 03E00008 */ jr $ra +/* 08FEF4 8008F2F4 E490009C */ swc1 $f16, 0x9c($a0) + +.L8008F2F8: +/* 08FEF8 8008F2F8 11C0001D */ beqz $t6, .L8008F370 +/* 08FEFC 8008F2FC 00056040 */ sll $t4, $a1, 1 +/* 08FF00 8008F300 848F002E */ lh $t7, 0x2e($a0) +/* 08FF04 8008F304 3C088019 */ lui $t0, %hi(D_8018D920) # $t0, 0x8019 +/* 08FF08 8008F308 2508D920 */ addiu $t0, %lo(D_8018D920) # addiu $t0, $t0, -0x26e0 +/* 08FF0C 8008F30C 0005C840 */ sll $t9, $a1, 1 +/* 08FF10 8008F310 25F8FE94 */ addiu $t8, $t7, -0x16c +/* 08FF14 8008F314 A498002E */ sh $t8, 0x2e($a0) +/* 08FF18 8008F318 03281021 */ addu $v0, $t9, $t0 +/* 08FF1C 8008F31C 84490000 */ lh $t1, ($v0) +/* 08FF20 8008F320 2401016C */ li $at, 364 +/* 08FF24 8008F324 252AFE94 */ addiu $t2, $t1, -0x16c +/* 08FF28 8008F328 3143FFFF */ andi $v1, $t2, 0xffff +/* 08FF2C 8008F32C 0061001A */ div $zero, $v1, $at +/* 08FF30 8008F330 00005812 */ mflo $t3 +/* 08FF34 8008F334 000B6400 */ sll $t4, $t3, 0x10 +/* 08FF38 8008F338 000C6C03 */ sra $t5, $t4, 0x10 +/* 08FF3C 8008F33C 29A10047 */ slti $at, $t5, 0x47 +/* 08FF40 8008F340 10200004 */ beqz $at, .L8008F354 +/* 08FF44 8008F344 A44A0000 */ sh $t2, ($v0) +/* 08FF48 8008F348 848E00B2 */ lh $t6, 0xb2($a0) +/* 08FF4C 8008F34C 25CFFFFF */ addiu $t7, $t6, -1 +/* 08FF50 8008F350 A48F00B2 */ sh $t7, 0xb2($a0) +.L8008F354: +/* 08FF54 8008F354 84980044 */ lh $t8, 0x44($a0) +/* 08FF58 8008F358 37190080 */ ori $t9, $t8, 0x80 +/* 08FF5C 8008F35C A4990044 */ sh $t9, 0x44($a0) +/* 08FF60 8008F360 84880044 */ lh $t0, 0x44($a0) +/* 08FF64 8008F364 3109FFBF */ andi $t1, $t0, 0xffbf +/* 08FF68 8008F368 03E00008 */ jr $ra +/* 08FF6C 8008F36C A4890044 */ sh $t1, 0x44($a0) + +.L8008F370: +/* 08FF70 8008F370 848A002E */ lh $t2, 0x2e($a0) +/* 08FF74 8008F374 3C0D8019 */ lui $t5, %hi(D_8018D920) # $t5, 0x8019 +/* 08FF78 8008F378 25ADD920 */ addiu $t5, %lo(D_8018D920) # addiu $t5, $t5, -0x26e0 +/* 08FF7C 8008F37C 254B016C */ addiu $t3, $t2, 0x16c +/* 08FF80 8008F380 A48B002E */ sh $t3, 0x2e($a0) +/* 08FF84 8008F384 018D1021 */ addu $v0, $t4, $t5 +/* 08FF88 8008F388 844E0000 */ lh $t6, ($v0) +/* 08FF8C 8008F38C 2401016C */ li $at, 364 +/* 08FF90 8008F390 25CF016C */ addiu $t7, $t6, 0x16c +/* 08FF94 8008F394 31E3FFFF */ andi $v1, $t7, 0xffff +/* 08FF98 8008F398 0061001A */ div $zero, $v1, $at +/* 08FF9C 8008F39C 0000C012 */ mflo $t8 +/* 08FFA0 8008F3A0 0018CC00 */ sll $t9, $t8, 0x10 +/* 08FFA4 8008F3A4 00194403 */ sra $t0, $t9, 0x10 +/* 08FFA8 8008F3A8 2901006E */ slti $at, $t0, 0x6e +/* 08FFAC 8008F3AC 14200004 */ bnez $at, .L8008F3C0 +/* 08FFB0 8008F3B0 A44F0000 */ sh $t7, ($v0) +/* 08FFB4 8008F3B4 848900B2 */ lh $t1, 0xb2($a0) +/* 08FFB8 8008F3B8 252AFFFF */ addiu $t2, $t1, -1 +/* 08FFBC 8008F3BC A48A00B2 */ sh $t2, 0xb2($a0) +.L8008F3C0: +/* 08FFC0 8008F3C0 848B0044 */ lh $t3, 0x44($a0) +/* 08FFC4 8008F3C4 356C0040 */ ori $t4, $t3, 0x40 +/* 08FFC8 8008F3C8 A48C0044 */ sh $t4, 0x44($a0) +/* 08FFCC 8008F3CC 848D0044 */ lh $t5, 0x44($a0) +/* 08FFD0 8008F3D0 31AEFF7F */ andi $t6, $t5, 0xff7f +/* 08FFD4 8008F3D4 A48E0044 */ sh $t6, 0x44($a0) +.L8008F3D8: +/* 08FFD8 8008F3D8 03E00008 */ jr $ra +/* 08FFDC 8008F3DC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F3E0.s b/asm/non_matchings/code_8008C1D0/func_8008F3E0.s new file mode 100644 index 000000000..1c9bdfd14 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F3E0.s @@ -0,0 +1,6 @@ +glabel func_8008F3E0 +/* 08FFE0 8008F3E0 8C8E00BC */ lw $t6, 0xbc($a0) +/* 08FFE4 8008F3E4 2401BFFF */ li $at, -16385 +/* 08FFE8 8008F3E8 01C17824 */ and $t7, $t6, $at +/* 08FFEC 8008F3EC 03E00008 */ jr $ra +/* 08FFF0 8008F3F0 AC8F00BC */ sw $t7, 0xbc($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008F3F4.s b/asm/non_matchings/code_8008C1D0/func_8008F3F4.s new file mode 100644 index 000000000..2fe021290 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F3F4.s @@ -0,0 +1,43 @@ +glabel func_8008F3F4 +/* 08FFF4 8008F3F4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 08FFF8 8008F3F8 AFBF0014 */ sw $ra, 0x14($sp) +/* 08FFFC 8008F3FC AFA5001C */ sw $a1, 0x1c($sp) +/* 090000 8008F400 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 090004 8008F404 44814000 */ mtc1 $at, $f8 +/* 090008 8008F408 C486008C */ lwc1 $f6, 0x8c($a0) +/* 09000C 8008F40C 848E00A8 */ lh $t6, 0xa8($a0) +/* 090010 8008F410 84980042 */ lh $t8, 0x42($a0) +/* 090014 8008F414 46083283 */ div.s $f10, $f6, $f8 +/* 090018 8008F418 25CF0080 */ addiu $t7, $t6, 0x80 +/* 09001C 8008F41C A48F00A8 */ sh $t7, 0xa8($a0) +/* 090020 8008F420 848800A8 */ lh $t0, 0xa8($a0) +/* 090024 8008F424 44802000 */ mtc1 $zero, $f4 +/* 090028 8008F428 2719071C */ addiu $t9, $t8, 0x71c +/* 09002C 8008F42C 29012000 */ slti $at, $t0, 0x2000 +/* 090030 8008F430 A4990042 */ sh $t9, 0x42($a0) +/* 090034 8008F434 AC80007C */ sw $zero, 0x7c($a0) +/* 090038 8008F438 E484009C */ swc1 $f4, 0x9c($a0) +/* 09003C 8008F43C 14200011 */ bnez $at, .L8008F484 +/* 090040 8008F440 E48A008C */ swc1 $f10, 0x8c($a0) +/* 090044 8008F444 84890236 */ lh $t1, 0x236($a0) +/* 090048 8008F448 A48000A8 */ sh $zero, 0xa8($a0) +/* 09004C 8008F44C 252AFFFF */ addiu $t2, $t1, -1 +/* 090050 8008F450 A48A0236 */ sh $t2, 0x236($a0) +/* 090054 8008F454 848B0236 */ lh $t3, 0x236($a0) +/* 090058 8008F458 5560000B */ bnel $t3, $zero, .L8008F488 +/* 09005C 8008F45C 8FBF0014 */ lw $ra, 0x14($sp) +/* 090060 8008F460 8C8C00BC */ lw $t4, 0xbc($a0) +/* 090064 8008F464 3C01FFFE */ lui $at, (0xFFFEFFFF >> 16) # lui $at, 0xfffe +/* 090068 8008F468 3421FFFF */ ori $at, (0xFFFEFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 09006C 8008F46C 01816824 */ and $t5, $t4, $at +/* 090070 8008F470 AC8D00BC */ sw $t5, 0xbc($a0) +/* 090074 8008F474 0C0241DE */ jal func_80090778 +/* 090078 8008F478 AFA40018 */ sw $a0, 0x18($sp) +/* 09007C 8008F47C 0C02421A */ jal func_80090868 +/* 090080 8008F480 8FA40018 */ lw $a0, 0x18($sp) +.L8008F484: +/* 090084 8008F484 8FBF0014 */ lw $ra, 0x14($sp) +.L8008F488: +/* 090088 8008F488 27BD0018 */ addiu $sp, $sp, 0x18 +/* 09008C 8008F48C 03E00008 */ jr $ra +/* 090090 8008F490 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F494.s b/asm/non_matchings/code_8008C1D0/func_8008F494.s new file mode 100644 index 000000000..11a8f95ca --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F494.s @@ -0,0 +1,74 @@ +glabel func_8008F494 +/* 090094 8008F494 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 090098 8008F498 AFBF0014 */ sw $ra, 0x14($sp) +/* 09009C 8008F49C AFA5001C */ sw $a1, 0x1c($sp) +/* 0900A0 8008F4A0 8C8200BC */ lw $v0, 0xbc($a0) +/* 0900A4 8008F4A4 00803025 */ move $a2, $a0 +/* 0900A8 8008F4A8 00C02025 */ move $a0, $a2 +/* 0900AC 8008F4AC 304E0080 */ andi $t6, $v0, 0x80 +/* 0900B0 8008F4B0 15C00008 */ bnez $t6, .L8008F4D4 +/* 0900B4 8008F4B4 304F0040 */ andi $t7, $v0, 0x40 +/* 0900B8 8008F4B8 15E00006 */ bnez $t7, .L8008F4D4 +/* 0900BC 8008F4BC 0002C1C0 */ sll $t8, $v0, 7 +/* 0900C0 8008F4C0 07000004 */ bltz $t8, .L8008F4D4 +/* 0900C4 8008F4C4 0002C980 */ sll $t9, $v0, 6 +/* 0900C8 8008F4C8 07200002 */ bltz $t9, .L8008F4D4 +/* 0900CC 8008F4CC 30480400 */ andi $t0, $v0, 0x400 +/* 0900D0 8008F4D0 11000008 */ beqz $t0, .L8008F4F4 +.L8008F4D4: +/* 0900D4 8008F4D4 3C09800E */ lui $t1, %hi(gModeSelection) # $t1, 0x800e +/* 0900D8 8008F4D8 8D29C53C */ lw $t1, %lo(gModeSelection)($t1) +/* 0900DC 8008F4DC 24010003 */ li $at, 3 +/* 0900E0 8008F4E0 55210005 */ bnel $t1, $at, .L8008F4F8 +/* 0900E4 8008F4E4 83A5001F */ lb $a1, 0x1f($sp) +/* 0900E8 8008F4E8 84CA0044 */ lh $t2, 0x44($a2) +/* 0900EC 8008F4EC 354B8000 */ ori $t3, $t2, 0x8000 +/* 0900F0 8008F4F0 A4CB0044 */ sh $t3, 0x44($a2) +.L8008F4F4: +/* 0900F4 8008F4F4 83A5001F */ lb $a1, 0x1f($sp) +.L8008F4F8: +/* 0900F8 8008F4F8 0C0230D5 */ jal func_8008C354 +/* 0900FC 8008F4FC AFA60018 */ sw $a2, 0x18($sp) +/* 090100 8008F500 8FA40018 */ lw $a0, 0x18($sp) +/* 090104 8008F504 0C023E1B */ jal func_8008F86C +/* 090108 8008F508 83A5001F */ lb $a1, 0x1f($sp) +/* 09010C 8008F50C 8FA60018 */ lw $a2, 0x18($sp) +/* 090110 8008F510 3C010001 */ lui $at, 1 +/* 090114 8008F514 2418001E */ li $t8, 30 +/* 090118 8008F518 8CCC00BC */ lw $t4, 0xbc($a2) +/* 09011C 8008F51C 94C20000 */ lhu $v0, ($a2) +/* 090120 8008F520 A4C000A8 */ sh $zero, 0xa8($a2) +/* 090124 8008F524 01816825 */ or $t5, $t4, $at +/* 090128 8008F528 2401FFEF */ li $at, -17 +/* 09012C 8008F52C 01A17824 */ and $t7, $t5, $at +/* 090130 8008F530 ACCD00BC */ sw $t5, 0xbc($a2) +/* 090134 8008F534 30594000 */ andi $t9, $v0, 0x4000 +/* 090138 8008F538 ACCF00BC */ sw $t7, 0xbc($a2) +/* 09013C 8008F53C A4D80236 */ sh $t8, 0x236($a2) +/* 090140 8008F540 13200014 */ beqz $t9, .L8008F594 +/* 090144 8008F544 A4C00042 */ sh $zero, 0x42($a2) +/* 090148 8008F548 30480100 */ andi $t0, $v0, 0x100 +/* 09014C 8008F54C 55000012 */ bnel $t0, $zero, .L8008F598 +/* 090150 8008F550 8FBF0014 */ lw $ra, 0x14($sp) +/* 090154 8008F554 84C900CA */ lh $t1, 0xca($a2) +/* 090158 8008F558 312A0002 */ andi $t2, $t1, 2 +/* 09015C 8008F55C 5540000E */ bnel $t2, $zero, .L8008F598 +/* 090160 8008F560 8FBF0014 */ lw $ra, 0x14($sp) +/* 090164 8008F564 94C200DE */ lhu $v0, 0xde($a2) +/* 090168 8008F568 304B0001 */ andi $t3, $v0, 1 +/* 09016C 8008F56C 15600009 */ bnez $t3, .L8008F594 +/* 090170 8008F570 304C0002 */ andi $t4, $v0, 2 +/* 090174 8008F574 15800007 */ bnez $t4, .L8008F594 +/* 090178 8008F578 93A4001F */ lbu $a0, 0x1f($sp) +/* 09017C 8008F57C 94C50254 */ lhu $a1, 0x254($a2) +/* 090180 8008F580 3C012900 */ lui $at, (0x29008004 >> 16) # lui $at, 0x2900 +/* 090184 8008F584 34218004 */ ori $at, (0x29008004 & 0xFFFF) # ori $at, $at, 0x8004 +/* 090188 8008F588 00056900 */ sll $t5, $a1, 4 +/* 09018C 8008F58C 0C03243D */ jal func_800C90F4 +/* 090190 8008F590 01A12821 */ addu $a1, $t5, $at +.L8008F594: +/* 090194 8008F594 8FBF0014 */ lw $ra, 0x14($sp) +.L8008F598: +/* 090198 8008F598 27BD0018 */ addiu $sp, $sp, 0x18 +/* 09019C 8008F59C 03E00008 */ jr $ra +/* 0901A0 8008F5A0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F5A4.s b/asm/non_matchings/code_8008C1D0/func_8008F5A4.s new file mode 100644 index 000000000..675deda7e --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F5A4.s @@ -0,0 +1,45 @@ +glabel func_8008F5A4 +/* 0901A4 8008F5A4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 0901A8 8008F5A8 AFBF0014 */ sw $ra, 0x14($sp) +/* 0901AC 8008F5AC AFA5001C */ sw $a1, 0x1c($sp) +/* 0901B0 8008F5B0 848E0044 */ lh $t6, 0x44($a0) +/* 0901B4 8008F5B4 83A5001F */ lb $a1, 0x1f($sp) +/* 0901B8 8008F5B8 31CF8000 */ andi $t7, $t6, 0x8000 +/* 0901BC 8008F5BC 51E00008 */ beql $t7, $zero, .L8008F5E0 +/* 0901C0 8008F5C0 8C8800BC */ lw $t0, 0xbc($a0) +/* 0901C4 8008F5C4 0C01AE2D */ jal func_8006B8B4 +/* 0901C8 8008F5C8 AFA40018 */ sw $a0, 0x18($sp) +/* 0901CC 8008F5CC 8FA40018 */ lw $a0, 0x18($sp) +/* 0901D0 8008F5D0 84980044 */ lh $t8, 0x44($a0) +/* 0901D4 8008F5D4 33197FFF */ andi $t9, $t8, 0x7fff +/* 0901D8 8008F5D8 A4990044 */ sh $t9, 0x44($a0) +/* 0901DC 8008F5DC 8C8800BC */ lw $t0, 0xbc($a0) +.L8008F5E0: +/* 0901E0 8008F5E0 44802000 */ mtc1 $zero, $f4 +/* 0901E4 8008F5E4 3C01FFFE */ lui $at, (0xFFFEFFFF >> 16) # lui $at, 0xfffe +/* 0901E8 8008F5E8 3421FFFF */ ori $at, (0xFFFEFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 0901EC 8008F5EC 01014824 */ and $t1, $t0, $at +/* 0901F0 8008F5F0 A4800206 */ sh $zero, 0x206($a0) +/* 0901F4 8008F5F4 A48000C4 */ sh $zero, 0xc4($a0) +/* 0901F8 8008F5F8 AC8900BC */ sw $t1, 0xbc($a0) +/* 0901FC 8008F5FC A48000A8 */ sh $zero, 0xa8($a0) +/* 090200 8008F600 A48000C0 */ sh $zero, 0xc0($a0) +/* 090204 8008F604 AC80007C */ sw $zero, 0x7c($a0) +/* 090208 8008F608 A4800236 */ sh $zero, 0x236($a0) +/* 09020C 8008F60C A4800078 */ sh $zero, 0x78($a0) +/* 090210 8008F610 E484009C */ swc1 $f4, 0x9c($a0) +/* 090214 8008F614 83AA001F */ lb $t2, 0x1f($sp) +/* 090218 8008F618 3C0C8016 */ lui $t4, %hi(D_80165190) # $t4, 0x8016 +/* 09021C 8008F61C 258C5190 */ addiu $t4, %lo(D_80165190) # addiu $t4, $t4, 0x5190 +/* 090220 8008F620 000A5840 */ sll $t3, $t2, 1 +/* 090224 8008F624 24030001 */ li $v1, 1 +/* 090228 8008F628 016C1021 */ addu $v0, $t3, $t4 +/* 09022C 8008F62C A4430000 */ sh $v1, ($v0) +/* 090230 8008F630 A4430010 */ sh $v1, 0x10($v0) +/* 090234 8008F634 A4430020 */ sh $v1, 0x20($v0) +/* 090238 8008F638 A4430030 */ sh $v1, 0x30($v0) +/* 09023C 8008F63C A4800042 */ sh $zero, 0x42($a0) +/* 090240 8008F640 8FBF0014 */ lw $ra, 0x14($sp) +/* 090244 8008F644 27BD0018 */ addiu $sp, $sp, 0x18 +/* 090248 8008F648 03E00008 */ jr $ra +/* 09024C 8008F64C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F650.s b/asm/non_matchings/code_8008C1D0/func_8008F650.s new file mode 100644 index 000000000..da20a5552 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F650.s @@ -0,0 +1,80 @@ +glabel func_8008F650 +/* 090250 8008F650 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 090254 8008F654 C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) +/* 090258 8008F658 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 09025C 8008F65C AFA5002C */ sw $a1, 0x2c($sp) +/* 090260 8008F660 4600218D */ trunc.w.s $f6, $f4 +/* 090264 8008F664 00057600 */ sll $t6, $a1, 0x18 +/* 090268 8008F668 000E2E03 */ sra $a1, $t6, 0x18 +/* 09026C 8008F66C 3C188019 */ lui $t8, %hi(D_8018D930) # $t8, 0x8019 +/* 090270 8008F670 2718D930 */ addiu $t8, %lo(D_8018D930) # addiu $t8, $t8, -0x26d0 +/* 090274 8008F674 00053080 */ sll $a2, $a1, 2 +/* 090278 8008F678 00D83821 */ addu $a3, $a2, $t8 +/* 09027C 8008F67C 8CEA0000 */ lw $t2, ($a3) +/* 090280 8008F680 44093000 */ mfc1 $t1, $f6 +/* 090284 8008F684 AFBF0014 */ sw $ra, 0x14($sp) +/* 090288 8008F688 AFA40028 */ sw $a0, 0x28($sp) +/* 09028C 8008F68C 012A1823 */ subu $v1, $t1, $t2 +/* 090290 8008F690 28610009 */ slti $at, $v1, 9 +/* 090294 8008F694 1420002D */ bnez $at, .L8008F74C +/* 090298 8008F698 24080001 */ li $t0, 1 +/* 09029C 8008F69C 3C0B8019 */ lui $t3, %hi(D_8018D900) # $t3, 0x8019 +/* 0902A0 8008F6A0 256BD900 */ addiu $t3, %lo(D_8018D900) # addiu $t3, $t3, -0x2700 +/* 0902A4 8008F6A4 00CB1021 */ addu $v0, $a2, $t3 +/* 0902A8 8008F6A8 AC480000 */ sw $t0, ($v0) +/* 0902AC 8008F6AC 94840000 */ lhu $a0, ($a0) +/* 0902B0 8008F6B0 24014000 */ li $at, 16384 +/* 0902B4 8008F6B4 308D4000 */ andi $t5, $a0, 0x4000 +/* 0902B8 8008F6B8 15A10013 */ bne $t5, $at, .L8008F708 +/* 0902BC 8008F6BC 308E0100 */ andi $t6, $a0, 0x100 +/* 0902C0 8008F6C0 24010100 */ li $at, 256 +/* 0902C4 8008F6C4 51C10011 */ beql $t6, $at, .L8008F70C +/* 0902C8 8008F6C8 8C4A0000 */ lw $t2, ($v0) +/* 0902CC 8008F6CC 1508001F */ bne $t0, $t0, .L8008F74C +/* 0902D0 8008F6D0 30A400FF */ andi $a0, $a1, 0xff +/* 0902D4 8008F6D4 AFA20018 */ sw $v0, 0x18($sp) +/* 0902D8 8008F6D8 0C0329CC */ jal func_800CA730 +/* 0902DC 8008F6DC AFA70020 */ sw $a3, 0x20($sp) +/* 0902E0 8008F6E0 8FA20018 */ lw $v0, 0x18($sp) +/* 0902E4 8008F6E4 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 0902E8 8008F6E8 8FA70020 */ lw $a3, 0x20($sp) +/* 0902EC 8008F6EC AC400000 */ sw $zero, ($v0) +/* 0902F0 8008F6F0 C428C598 */ lwc1 $f8, %lo(gCourseTimer)($at) +/* 0902F4 8008F6F4 8CE90000 */ lw $t1, ($a3) +/* 0902F8 8008F6F8 4600428D */ trunc.w.s $f10, $f8 +/* 0902FC 8008F6FC 44195000 */ mfc1 $t9, $f10 +/* 090300 8008F700 10000012 */ b .L8008F74C +/* 090304 8008F704 03291823 */ subu $v1, $t9, $t1 +.L8008F708: +/* 090308 8008F708 8C4A0000 */ lw $t2, ($v0) +.L8008F70C: +/* 09030C 8008F70C 30A400FF */ andi $a0, $a1, 0xff +/* 090310 8008F710 550A000F */ bnel $t0, $t2, .L8008F750 +/* 090314 8008F714 2861000A */ slti $at, $v1, 0xa +/* 090318 8008F718 AFA20018 */ sw $v0, 0x18($sp) +/* 09031C 8008F71C 0C032AB3 */ jal func_800CAACC +/* 090320 8008F720 AFA70020 */ sw $a3, 0x20($sp) +/* 090324 8008F724 8FA20018 */ lw $v0, 0x18($sp) +/* 090328 8008F728 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 09032C 8008F72C 8FA70020 */ lw $a3, 0x20($sp) +/* 090330 8008F730 AC400000 */ sw $zero, ($v0) +/* 090334 8008F734 C430C598 */ lwc1 $f16, %lo(gCourseTimer)($at) +/* 090338 8008F738 8CED0000 */ lw $t5, ($a3) +/* 09033C 8008F73C 4600848D */ trunc.w.s $f18, $f16 +/* 090340 8008F740 440C9000 */ mfc1 $t4, $f18 +/* 090344 8008F744 00000000 */ nop +/* 090348 8008F748 018D1823 */ subu $v1, $t4, $t5 +.L8008F74C: +/* 09034C 8008F74C 2861000A */ slti $at, $v1, 0xa +.L8008F750: +/* 090350 8008F750 14200005 */ bnez $at, .L8008F768 +/* 090354 8008F754 8FAE0028 */ lw $t6, 0x28($sp) +/* 090358 8008F758 8DCF00BC */ lw $t7, 0xbc($t6) +/* 09035C 8008F75C 2401FDFF */ li $at, -513 +/* 090360 8008F760 01E1C024 */ and $t8, $t7, $at +/* 090364 8008F764 ADD800BC */ sw $t8, 0xbc($t6) +.L8008F768: +/* 090368 8008F768 8FBF0014 */ lw $ra, 0x14($sp) +/* 09036C 8008F76C 27BD0028 */ addiu $sp, $sp, 0x28 +/* 090370 8008F770 03E00008 */ jr $ra +/* 090374 8008F774 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F778.s b/asm/non_matchings/code_8008C1D0/func_8008F778.s new file mode 100644 index 000000000..986bf9e23 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F778.s @@ -0,0 +1,66 @@ +glabel func_8008F778 +/* 090378 8008F778 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 09037C 8008F77C AFA50024 */ sw $a1, 0x24($sp) +/* 090380 8008F780 00A07025 */ move $t6, $a1 +/* 090384 8008F784 000E2E00 */ sll $a1, $t6, 0x18 +/* 090388 8008F788 AFBF0014 */ sw $ra, 0x14($sp) +/* 09038C 8008F78C 00057E03 */ sra $t7, $a1, 0x18 +/* 090390 8008F790 01E02825 */ move $a1, $t7 +/* 090394 8008F794 A3AE0027 */ sb $t6, 0x27($sp) +/* 090398 8008F798 0C0230D5 */ jal func_8008C354 +/* 09039C 8008F79C AFA40020 */ sw $a0, 0x20($sp) +/* 0903A0 8008F7A0 8FA40020 */ lw $a0, 0x20($sp) +/* 0903A4 8008F7A4 2401DFFF */ li $at, -8193 +/* 0903A8 8008F7A8 83A60027 */ lb $a2, 0x27($sp) +/* 0903AC 8008F7AC 8C88000C */ lw $t0, 0xc($a0) +/* 0903B0 8008F7B0 8C9800BC */ lw $t8, 0xbc($a0) +/* 0903B4 8008F7B4 3C0C8019 */ lui $t4, %hi(D_8018D900) # $t4, 0x8019 +/* 0903B8 8008F7B8 01014824 */ and $t1, $t0, $at +/* 0903BC 8008F7BC 37190200 */ ori $t9, $t8, 0x200 +/* 0903C0 8008F7C0 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 0903C4 8008F7C4 AC9900BC */ sw $t9, 0xbc($a0) +/* 0903C8 8008F7C8 AC89000C */ sw $t1, 0xc($a0) +/* 0903CC 8008F7CC C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) +/* 0903D0 8008F7D0 3C018019 */ lui $at, %hi(D_8018D930) # 0x8019 +/* 0903D4 8008F7D4 00061080 */ sll $v0, $a2, 2 +/* 0903D8 8008F7D8 4600218D */ trunc.w.s $f6, $f4 +/* 0903DC 8008F7DC 00220821 */ addu $at, $at, $v0 +/* 0903E0 8008F7E0 258CD900 */ addiu $t4, %lo(D_8018D900) # addiu $t4, $t4, -0x2700 +/* 0903E4 8008F7E4 24070001 */ li $a3, 1 +/* 0903E8 8008F7E8 440B3000 */ mfc1 $t3, $f6 +/* 0903EC 8008F7EC 004C1821 */ addu $v1, $v0, $t4 +/* 0903F0 8008F7F0 AC2BD930 */ sw $t3, %lo(D_8018D930)($at) # -0x26d0($at) +/* 0903F4 8008F7F4 AC670000 */ sw $a3, ($v1) +/* 0903F8 8008F7F8 94850000 */ lhu $a1, ($a0) +/* 0903FC 8008F7FC 24014000 */ li $at, 16384 +/* 090400 8008F800 30AD4000 */ andi $t5, $a1, 0x4000 +/* 090404 8008F804 15A1000C */ bne $t5, $at, .L8008F838 +/* 090408 8008F808 30AE0100 */ andi $t6, $a1, 0x100 +/* 09040C 8008F80C 24010100 */ li $at, 256 +/* 090410 8008F810 51C1000A */ beql $t6, $at, .L8008F83C +/* 090414 8008F814 8C790000 */ lw $t9, ($v1) +/* 090418 8008F818 14E70010 */ bne $a3, $a3, .L8008F85C +/* 09041C 8008F81C 30C400FF */ andi $a0, $a2, 0xff +/* 090420 8008F820 0C032967 */ jal func_800CA59C +/* 090424 8008F824 AFA3001C */ sw $v1, 0x1c($sp) +/* 090428 8008F828 8FA3001C */ lw $v1, 0x1c($sp) +/* 09042C 8008F82C 24180002 */ li $t8, 2 +/* 090430 8008F830 1000000A */ b .L8008F85C +/* 090434 8008F834 AC780000 */ sw $t8, ($v1) +.L8008F838: +/* 090438 8008F838 8C790000 */ lw $t9, ($v1) +.L8008F83C: +/* 09043C 8008F83C 30C400FF */ andi $a0, $a2, 0xff +/* 090440 8008F840 54F90007 */ bnel $a3, $t9, .L8008F860 +/* 090444 8008F844 8FBF0014 */ lw $ra, 0x14($sp) +/* 090448 8008F848 0C032A61 */ jal func_800CA984 +/* 09044C 8008F84C AFA3001C */ sw $v1, 0x1c($sp) +/* 090450 8008F850 8FA3001C */ lw $v1, 0x1c($sp) +/* 090454 8008F854 24080002 */ li $t0, 2 +/* 090458 8008F858 AC680000 */ sw $t0, ($v1) +.L8008F85C: +/* 09045C 8008F85C 8FBF0014 */ lw $ra, 0x14($sp) +.L8008F860: +/* 090460 8008F860 27BD0020 */ addiu $sp, $sp, 0x20 +/* 090464 8008F864 03E00008 */ jr $ra +/* 090468 8008F868 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F86C.s b/asm/non_matchings/code_8008C1D0/func_8008F86C.s new file mode 100644 index 000000000..905961d24 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F86C.s @@ -0,0 +1,31 @@ +glabel func_8008F86C +/* 09046C 8008F86C 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 090470 8008F870 AFBF0014 */ sw $ra, 0x14($sp) +/* 090474 8008F874 AFA5001C */ sw $a1, 0x1c($sp) +/* 090478 8008F878 8C9800BC */ lw $t8, 0xbc($a0) +/* 09047C 8008F87C 94820000 */ lhu $v0, ($a0) +/* 090480 8008F880 2401FDFF */ li $at, -513 +/* 090484 8008F884 00057600 */ sll $t6, $a1, 0x18 +/* 090488 8008F888 0301C824 */ and $t9, $t8, $at +/* 09048C 8008F88C 000E7E03 */ sra $t7, $t6, 0x18 +/* 090490 8008F890 24014000 */ li $at, 16384 +/* 090494 8008F894 30484000 */ andi $t0, $v0, 0x4000 +/* 090498 8008F898 01E02825 */ move $a1, $t7 +/* 09049C 8008F89C 15010009 */ bne $t0, $at, .L8008F8C4 +/* 0904A0 8008F8A0 AC9900BC */ sw $t9, 0xbc($a0) +/* 0904A4 8008F8A4 30490100 */ andi $t1, $v0, 0x100 +/* 0904A8 8008F8A8 24010100 */ li $at, 256 +/* 0904AC 8008F8AC 11210005 */ beq $t1, $at, .L8008F8C4 +/* 0904B0 8008F8B0 00000000 */ nop +/* 0904B4 8008F8B4 0C0329CC */ jal func_800CA730 +/* 0904B8 8008F8B8 31E400FF */ andi $a0, $t7, 0xff +/* 0904BC 8008F8BC 10000004 */ b .L8008F8D0 +/* 0904C0 8008F8C0 8FBF0014 */ lw $ra, 0x14($sp) +.L8008F8C4: +/* 0904C4 8008F8C4 0C032AB3 */ jal func_800CAACC +/* 0904C8 8008F8C8 30A400FF */ andi $a0, $a1, 0xff +/* 0904CC 8008F8CC 8FBF0014 */ lw $ra, 0x14($sp) +.L8008F8D0: +/* 0904D0 8008F8D0 27BD0018 */ addiu $sp, $sp, 0x18 +/* 0904D4 8008F8D4 03E00008 */ jr $ra +/* 0904D8 8008F8D8 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008F8DC.s b/asm/non_matchings/code_8008C1D0/func_8008F8DC.s new file mode 100644 index 000000000..d56548f61 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008F8DC.s @@ -0,0 +1,92 @@ +glabel func_8008F8DC +/* 0904DC 8008F8DC 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 0904E0 8008F8E0 C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) +/* 0904E4 8008F8E4 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 0904E8 8008F8E8 AFA50024 */ sw $a1, 0x24($sp) +/* 0904EC 8008F8EC 4600218D */ trunc.w.s $f6, $f4 +/* 0904F0 8008F8F0 00057600 */ sll $t6, $a1, 0x18 +/* 0904F4 8008F8F4 000E2E03 */ sra $a1, $t6, 0x18 +/* 0904F8 8008F8F8 00051880 */ sll $v1, $a1, 2 +/* 0904FC 8008F8FC 3C088019 */ lui $t0, %hi(D_8018D950) # 0x8019 +/* 090500 8008F900 01034021 */ addu $t0, $t0, $v1 +/* 090504 8008F904 8D08D950 */ lw $t0, %lo(D_8018D950)($t0) # -0x26b0($t0) +/* 090508 8008F908 44193000 */ mfc1 $t9, $f6 +/* 09050C 8008F90C AFBF0014 */ sw $ra, 0x14($sp) +/* 090510 8008F910 00803025 */ move $a2, $a0 +/* 090514 8008F914 03281023 */ subu $v0, $t9, $t0 +/* 090518 8008F918 28410007 */ slti $at, $v0, 7 +/* 09051C 8008F91C 10200012 */ beqz $at, .L8008F968 +/* 090520 8008F920 3C0D8019 */ lui $t5, %hi(D_8018D970) # $t5, 0x8019 +/* 090524 8008F924 848900C6 */ lh $t1, 0xc6($a0) +/* 090528 8008F928 25ADD970 */ addiu $t5, %lo(D_8018D970) # addiu $t5, $t5, -0x2690 +/* 09052C 8008F92C 240C0060 */ li $t4, 96 +/* 090530 8008F930 252AFFFE */ addiu $t2, $t1, -2 +/* 090534 8008F934 A48A00C6 */ sh $t2, 0xc6($a0) +/* 090538 8008F938 848B00C6 */ lh $t3, 0xc6($a0) +/* 09053C 8008F93C 006D1021 */ addu $v0, $v1, $t5 +/* 090540 8008F940 29610061 */ slti $at, $t3, 0x61 +/* 090544 8008F944 50200003 */ beql $at, $zero, .L8008F954 +/* 090548 8008F948 8C4E0000 */ lw $t6, ($v0) +/* 09054C 8008F94C A48C00C6 */ sh $t4, 0xc6($a0) +/* 090550 8008F950 8C4E0000 */ lw $t6, ($v0) +.L8008F954: +/* 090554 8008F954 25CFFFFE */ addiu $t7, $t6, -2 +/* 090558 8008F958 1DE00033 */ bgtz $t7, .L8008FA28 +/* 09055C 8008F95C AC4F0000 */ sw $t7, ($v0) +/* 090560 8008F960 10000031 */ b .L8008FA28 +/* 090564 8008F964 AC400000 */ sw $zero, ($v0) +.L8008F968: +/* 090568 8008F968 84D900C6 */ lh $t9, 0xc6($a2) +/* 09056C 8008F96C 240700FF */ li $a3, 255 +/* 090570 8008F970 27280004 */ addiu $t0, $t9, 4 +/* 090574 8008F974 A4C800C6 */ sh $t0, 0xc6($a2) +/* 090578 8008F978 84C900C6 */ lh $t1, 0xc6($a2) +/* 09057C 8008F97C 292100F0 */ slti $at, $t1, 0xf0 +/* 090580 8008F980 14200014 */ bnez $at, .L8008F9D4 +/* 090584 8008F984 3C018019 */ lui $at, %hi(D_8018D970) # 0x8019 +/* 090588 8008F988 A4C700C6 */ sh $a3, 0xc6($a2) +/* 09058C 8008F98C 00230821 */ addu $at, $at, $v1 +/* 090590 8008F990 AC27D970 */ sw $a3, %lo(D_8018D970)($at) # -0x2690($at) +/* 090594 8008F994 8CCA00BC */ lw $t2, 0xbc($a2) +/* 090598 8008F998 94CC0000 */ lhu $t4, ($a2) +/* 09059C 8008F99C 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff +/* 0905A0 8008F9A0 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 0905A4 8008F9A4 01415824 */ and $t3, $t2, $at +/* 0905A8 8008F9A8 318D4000 */ andi $t5, $t4, 0x4000 +/* 0905AC 8008F9AC 11A00009 */ beqz $t5, .L8008F9D4 +/* 0905B0 8008F9B0 ACCB00BC */ sw $t3, 0xbc($a2) +/* 0905B4 8008F9B4 30A400FF */ andi $a0, $a1, 0xff +/* 0905B8 8008F9B8 AFA30018 */ sw $v1, 0x18($sp) +/* 0905BC 8008F9BC A3A50027 */ sb $a1, 0x27($sp) +/* 0905C0 8008F9C0 0C032C19 */ jal func_800CB064 +/* 0905C4 8008F9C4 AFA60020 */ sw $a2, 0x20($sp) +/* 0905C8 8008F9C8 8FA30018 */ lw $v1, 0x18($sp) +/* 0905CC 8008F9CC 83A50027 */ lb $a1, 0x27($sp) +/* 0905D0 8008F9D0 8FA60020 */ lw $a2, 0x20($sp) +.L8008F9D4: +/* 0905D4 8008F9D4 3C0E8019 */ lui $t6, %hi(D_8018D970) # $t6, 0x8019 +/* 0905D8 8008F9D8 25CED970 */ addiu $t6, %lo(D_8018D970) # addiu $t6, $t6, -0x2690 +/* 0905DC 8008F9DC 006E1021 */ addu $v0, $v1, $t6 +/* 0905E0 8008F9E0 8C4F0000 */ lw $t7, ($v0) +/* 0905E4 8008F9E4 240700FF */ li $a3, 255 +/* 0905E8 8008F9E8 25F80008 */ addiu $t8, $t7, 8 +/* 0905EC 8008F9EC 2B0100F0 */ slti $at, $t8, 0xf0 +/* 0905F0 8008F9F0 1420000D */ bnez $at, .L8008FA28 +/* 0905F4 8008F9F4 AC580000 */ sw $t8, ($v0) +/* 0905F8 8008F9F8 AC470000 */ sw $a3, ($v0) +/* 0905FC 8008F9FC 8CC800BC */ lw $t0, 0xbc($a2) +/* 090600 8008FA00 94CA0000 */ lhu $t2, ($a2) +/* 090604 8008FA04 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff +/* 090608 8008FA08 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 09060C 8008FA0C 01014824 */ and $t1, $t0, $at +/* 090610 8008FA10 314B4000 */ andi $t3, $t2, 0x4000 +/* 090614 8008FA14 A4C700C6 */ sh $a3, 0xc6($a2) +/* 090618 8008FA18 11600003 */ beqz $t3, .L8008FA28 +/* 09061C 8008FA1C ACC900BC */ sw $t1, 0xbc($a2) +/* 090620 8008FA20 0C032C19 */ jal func_800CB064 +/* 090624 8008FA24 30A400FF */ andi $a0, $a1, 0xff +.L8008FA28: +/* 090628 8008FA28 8FBF0014 */ lw $ra, 0x14($sp) +/* 09062C 8008FA2C 27BD0020 */ addiu $sp, $sp, 0x20 +/* 090630 8008FA30 03E00008 */ jr $ra +/* 090634 8008FA34 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FA38.s b/asm/non_matchings/code_8008C1D0/func_8008FA38.s new file mode 100644 index 000000000..57a0d7ae3 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FA38.s @@ -0,0 +1,66 @@ +glabel func_8008FA38 +/* 090638 8008FA38 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 09063C 8008FA3C AFBF0014 */ sw $ra, 0x14($sp) +/* 090640 8008FA40 AFA5001C */ sw $a1, 0x1c($sp) +/* 090644 8008FA44 94980000 */ lhu $t8, ($a0) +/* 090648 8008FA48 00057600 */ sll $t6, $a1, 0x18 +/* 09064C 8008FA4C 000E2E03 */ sra $a1, $t6, 0x18 +/* 090650 8008FA50 33194000 */ andi $t9, $t8, 0x4000 +/* 090654 8008FA54 13200011 */ beqz $t9, .L8008FA9C +/* 090658 8008FA58 00803025 */ move $a2, $a0 +/* 09065C 8008FA5C 84880044 */ lh $t0, 0x44($a0) +/* 090660 8008FA60 00001825 */ move $v1, $zero +/* 090664 8008FA64 35090200 */ ori $t1, $t0, 0x200 +/* 090668 8008FA68 A4890044 */ sh $t1, 0x44($a0) +/* 09066C 8008FA6C 24040048 */ li $a0, 72 +.L8008FA70: +/* 090670 8008FA70 00640019 */ multu $v1, $a0 +/* 090674 8008FA74 24630001 */ addiu $v1, $v1, 1 +/* 090678 8008FA78 00035C00 */ sll $t3, $v1, 0x10 +/* 09067C 8008FA7C 000B1C03 */ sra $v1, $t3, 0x10 +/* 090680 8008FA80 2861000A */ slti $at, $v1, 0xa +/* 090684 8008FA84 00005012 */ mflo $t2 +/* 090688 8008FA88 00CA1021 */ addu $v0, $a2, $t2 +/* 09068C 8008FA8C A4400274 */ sh $zero, 0x274($v0) +/* 090690 8008FA90 A4400276 */ sh $zero, 0x276($v0) +/* 090694 8008FA94 1420FFF6 */ bnez $at, .L8008FA70 +/* 090698 8008FA98 A440026A */ sh $zero, 0x26a($v0) +.L8008FA9C: +/* 09069C 8008FA9C 00C02025 */ move $a0, $a2 +/* 0906A0 8008FAA0 A3A5001F */ sb $a1, 0x1f($sp) +/* 0906A4 8008FAA4 0C0230D5 */ jal func_8008C354 +/* 0906A8 8008FAA8 AFA60018 */ sw $a2, 0x18($sp) +/* 0906AC 8008FAAC 8FA60018 */ lw $a2, 0x18($sp) +/* 0906B0 8008FAB0 3C018000 */ lui $at, 0x8000 +/* 0906B4 8008FAB4 83A5001F */ lb $a1, 0x1f($sp) +/* 0906B8 8008FAB8 8CCD00BC */ lw $t5, 0xbc($a2) +/* 0906BC 8008FABC 8CCF000C */ lw $t7, 0xc($a2) +/* 0906C0 8008FAC0 00051080 */ sll $v0, $a1, 2 +/* 0906C4 8008FAC4 01A17025 */ or $t6, $t5, $at +/* 0906C8 8008FAC8 2401F7FF */ li $at, -2049 +/* 0906CC 8008FACC 01E1C024 */ and $t8, $t7, $at +/* 0906D0 8008FAD0 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e +/* 0906D4 8008FAD4 ACCE00BC */ sw $t6, 0xbc($a2) +/* 0906D8 8008FAD8 ACD8000C */ sw $t8, 0xc($a2) +/* 0906DC 8008FADC C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) +/* 0906E0 8008FAE0 3C018019 */ lui $at, %hi(D_8018D950) # 0x8019 +/* 0906E4 8008FAE4 00220821 */ addu $at, $at, $v0 +/* 0906E8 8008FAE8 4600218D */ trunc.w.s $f6, $f4 +/* 0906EC 8008FAEC 240900FF */ li $t1, 255 +/* 0906F0 8008FAF0 44083000 */ mfc1 $t0, $f6 +/* 0906F4 8008FAF4 00000000 */ nop +/* 0906F8 8008FAF8 AC28D950 */ sw $t0, %lo(D_8018D950)($at) # -0x26b0($at) +/* 0906FC 8008FAFC 3C018019 */ lui $at, %hi(D_8018D970) # 0x8019 +/* 090700 8008FB00 00220821 */ addu $at, $at, $v0 +/* 090704 8008FB04 AC29D970 */ sw $t1, %lo(D_8018D970)($at) # -0x2690($at) +/* 090708 8008FB08 94CA0000 */ lhu $t2, ($a2) +/* 09070C 8008FB0C 314B4000 */ andi $t3, $t2, 0x4000 +/* 090710 8008FB10 51600004 */ beql $t3, $zero, .L8008FB24 +/* 090714 8008FB14 8FBF0014 */ lw $ra, 0x14($sp) +/* 090718 8008FB18 0C032BF0 */ jal func_800CAFC0 +/* 09071C 8008FB1C 30A400FF */ andi $a0, $a1, 0xff +/* 090720 8008FB20 8FBF0014 */ lw $ra, 0x14($sp) +.L8008FB24: +/* 090724 8008FB24 27BD0018 */ addiu $sp, $sp, 0x18 +/* 090728 8008FB28 03E00008 */ jr $ra +/* 09072C 8008FB2C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FB30.s b/asm/non_matchings/code_8008C1D0/func_8008FB30.s new file mode 100644 index 000000000..427703658 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FB30.s @@ -0,0 +1,62 @@ +glabel func_8008FB30 +/* 090730 8008FB30 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 090734 8008FB34 AFBF0014 */ sw $ra, 0x14($sp) +/* 090738 8008FB38 AFA5001C */ sw $a1, 0x1c($sp) +/* 09073C 8008FB3C 849800C6 */ lh $t8, 0xc6($a0) +/* 090740 8008FB40 00057600 */ sll $t6, $a1, 0x18 +/* 090744 8008FB44 000E7E03 */ sra $t7, $t6, 0x18 +/* 090748 8008FB48 27190008 */ addiu $t9, $t8, 8 +/* 09074C 8008FB4C A49900C6 */ sh $t9, 0xc6($a0) +/* 090750 8008FB50 848800C6 */ lh $t0, 0xc6($a0) +/* 090754 8008FB54 01E02825 */ move $a1, $t7 +/* 090758 8008FB58 00803025 */ move $a2, $a0 +/* 09075C 8008FB5C 290100F0 */ slti $at, $t0, 0xf0 +/* 090760 8008FB60 14200014 */ bnez $at, .L8008FBB4 +/* 090764 8008FB64 240300FF */ li $v1, 255 +/* 090768 8008FB68 000F4880 */ sll $t1, $t7, 2 +/* 09076C 8008FB6C 3C018019 */ lui $at, %hi(D_8018D970) # 0x8019 +/* 090770 8008FB70 A48300C6 */ sh $v1, 0xc6($a0) +/* 090774 8008FB74 00290821 */ addu $at, $at, $t1 +/* 090778 8008FB78 AC23D970 */ sw $v1, %lo(D_8018D970)($at) # -0x2690($at) +/* 09077C 8008FB7C 8C8A00BC */ lw $t2, 0xbc($a0) +/* 090780 8008FB80 948C0000 */ lhu $t4, ($a0) +/* 090784 8008FB84 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff +/* 090788 8008FB88 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 09078C 8008FB8C 01415824 */ and $t3, $t2, $at +/* 090790 8008FB90 318D4000 */ andi $t5, $t4, 0x4000 +/* 090794 8008FB94 11A00007 */ beqz $t5, .L8008FBB4 +/* 090798 8008FB98 AC8B00BC */ sw $t3, 0xbc($a0) +/* 09079C 8008FB9C 31E400FF */ andi $a0, $t7, 0xff +/* 0907A0 8008FBA0 A3AF001F */ sb $t7, 0x1f($sp) +/* 0907A4 8008FBA4 0C032C19 */ jal func_800CB064 +/* 0907A8 8008FBA8 AFA60018 */ sw $a2, 0x18($sp) +/* 0907AC 8008FBAC 83A5001F */ lb $a1, 0x1f($sp) +/* 0907B0 8008FBB0 8FA60018 */ lw $a2, 0x18($sp) +.L8008FBB4: +/* 0907B4 8008FBB4 3C0F8019 */ lui $t7, %hi(D_8018D970) # $t7, 0x8019 +/* 0907B8 8008FBB8 25EFD970 */ addiu $t7, %lo(D_8018D970) # addiu $t7, $t7, -0x2690 +/* 0907BC 8008FBBC 00057080 */ sll $t6, $a1, 2 +/* 0907C0 8008FBC0 01CF1021 */ addu $v0, $t6, $t7 +/* 0907C4 8008FBC4 8C580000 */ lw $t8, ($v0) +/* 0907C8 8008FBC8 240300FF */ li $v1, 255 +/* 0907CC 8008FBCC 27190010 */ addiu $t9, $t8, 0x10 +/* 0907D0 8008FBD0 2B2100E0 */ slti $at, $t9, 0xe0 +/* 0907D4 8008FBD4 1420000D */ bnez $at, .L8008FC0C +/* 0907D8 8008FBD8 AC590000 */ sw $t9, ($v0) +/* 0907DC 8008FBDC AC430000 */ sw $v1, ($v0) +/* 0907E0 8008FBE0 8CC900BC */ lw $t1, 0xbc($a2) +/* 0907E4 8008FBE4 94CB0000 */ lhu $t3, ($a2) +/* 0907E8 8008FBE8 3C017FFF */ lui $at, (0x7FFFFFFF >> 16) # lui $at, 0x7fff +/* 0907EC 8008FBEC 3421FFFF */ ori $at, (0x7FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 0907F0 8008FBF0 01215024 */ and $t2, $t1, $at +/* 0907F4 8008FBF4 316C4000 */ andi $t4, $t3, 0x4000 +/* 0907F8 8008FBF8 A4C300C6 */ sh $v1, 0xc6($a2) +/* 0907FC 8008FBFC 11800003 */ beqz $t4, .L8008FC0C +/* 090800 8008FC00 ACCA00BC */ sw $t2, 0xbc($a2) +/* 090804 8008FC04 0C032C19 */ jal func_800CB064 +/* 090808 8008FC08 30A400FF */ andi $a0, $a1, 0xff +.L8008FC0C: +/* 09080C 8008FC0C 8FBF0014 */ lw $ra, 0x14($sp) +/* 090810 8008FC10 27BD0018 */ addiu $sp, $sp, 0x18 +/* 090814 8008FC14 03E00008 */ jr $ra +/* 090818 8008FC18 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FC1C.s b/asm/non_matchings/code_8008C1D0/func_8008FC1C.s new file mode 100644 index 000000000..071f74a22 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FC1C.s @@ -0,0 +1,20 @@ +glabel func_8008FC1C +/* 09081C 8008FC1C 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 090820 8008FC20 AFBF0014 */ sw $ra, 0x14($sp) +/* 090824 8008FC24 948E0000 */ lhu $t6, ($a0) +/* 090828 8008FC28 00802825 */ move $a1, $a0 +/* 09082C 8008FC2C 31CF0040 */ andi $t7, $t6, 0x40 +/* 090830 8008FC30 51E00009 */ beql $t7, $zero, .L8008FC58 +/* 090834 8008FC34 8FBF0014 */ lw $ra, 0x14($sp) +/* 090838 8008FC38 0C009F40 */ jal func_80027D00 +/* 09083C 8008FC3C AFA50018 */ sw $a1, 0x18($sp) +/* 090840 8008FC40 8FA50018 */ lw $a1, 0x18($sp) +/* 090844 8008FC44 24187000 */ li $t8, 28672 +/* 090848 8008FC48 00402025 */ move $a0, $v0 +/* 09084C 8008FC4C 0C015AA5 */ jal func_80056A94 +/* 090850 8008FC50 A4B80000 */ sh $t8, ($a1) +/* 090854 8008FC54 8FBF0014 */ lw $ra, 0x14($sp) +.L8008FC58: +/* 090858 8008FC58 27BD0018 */ addiu $sp, $sp, 0x18 +/* 09085C 8008FC5C 03E00008 */ jr $ra +/* 090860 8008FC60 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FC64.s b/asm/non_matchings/code_8008C1D0/func_8008FC64.s new file mode 100644 index 000000000..75252707c --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FC64.s @@ -0,0 +1,32 @@ +glabel func_8008FC64 +/* 090864 8008FC64 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 090868 8008FC68 AFBF0014 */ sw $ra, 0x14($sp) +/* 09086C 8008FC6C AFA5001C */ sw $a1, 0x1c($sp) +/* 090870 8008FC70 848E00C6 */ lh $t6, 0xc6($a0) +/* 090874 8008FC74 25CFFFFC */ addiu $t7, $t6, -4 +/* 090878 8008FC78 A48F00C6 */ sh $t7, 0xc6($a0) +/* 09087C 8008FC7C 849800C6 */ lh $t8, 0xc6($a0) +/* 090880 8008FC80 2B010005 */ slti $at, $t8, 5 +/* 090884 8008FC84 50200012 */ beql $at, $zero, .L8008FCD0 +/* 090888 8008FC88 8FBF0014 */ lw $ra, 0x14($sp) +/* 09088C 8008FC8C 8C99000C */ lw $t9, 0xc($a0) +/* 090890 8008FC90 3C01FBFF */ lui $at, (0xFBFFFFFF >> 16) # lui $at, 0xfbff +/* 090894 8008FC94 3421FFFF */ ori $at, (0xFBFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 090898 8008FC98 948B0000 */ lhu $t3, ($a0) +/* 09089C 8008FC9C 03214024 */ and $t0, $t9, $at +/* 0908A0 8008FCA0 3C010800 */ lui $at, 0x800 +/* 0908A4 8008FCA4 AC88000C */ sw $t0, 0xc($a0) +/* 0908A8 8008FCA8 01015025 */ or $t2, $t0, $at +/* 0908AC 8008FCAC 356C0040 */ ori $t4, $t3, 0x40 +/* 0908B0 8008FCB0 A48000C6 */ sh $zero, 0xc6($a0) +/* 0908B4 8008FCB4 AC8A000C */ sw $t2, 0xc($a0) +/* 0908B8 8008FCB8 A48C0000 */ sh $t4, ($a0) +/* 0908BC 8008FCBC 0C023F6A */ jal func_8008FDA8 +/* 0908C0 8008FCC0 83A5001F */ lb $a1, 0x1f($sp) +/* 0908C4 8008FCC4 0C015A7D */ jal func_800569F4 +/* 0908C8 8008FCC8 83A4001F */ lb $a0, 0x1f($sp) +/* 0908CC 8008FCCC 8FBF0014 */ lw $ra, 0x14($sp) +.L8008FCD0: +/* 0908D0 8008FCD0 27BD0018 */ addiu $sp, $sp, 0x18 +/* 0908D4 8008FCD4 03E00008 */ jr $ra +/* 0908D8 8008FCD8 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FCDC.s b/asm/non_matchings/code_8008C1D0/func_8008FCDC.s new file mode 100644 index 000000000..cb4271f61 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FCDC.s @@ -0,0 +1,30 @@ +glabel func_8008FCDC +/* 0908DC 8008FCDC 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 0908E0 8008FCE0 AFBF0014 */ sw $ra, 0x14($sp) +/* 0908E4 8008FCE4 AFA5001C */ sw $a1, 0x1c($sp) +/* 0908E8 8008FCE8 848F00C6 */ lh $t7, 0xc6($a0) +/* 0908EC 8008FCEC 00053600 */ sll $a2, $a1, 0x18 +/* 0908F0 8008FCF0 00067603 */ sra $t6, $a2, 0x18 +/* 0908F4 8008FCF4 25F80002 */ addiu $t8, $t7, 2 +/* 0908F8 8008FCF8 A49800C6 */ sh $t8, 0xc6($a0) +/* 0908FC 8008FCFC 848200C6 */ lh $v0, 0xc6($a0) +/* 090900 8008FD00 01C03025 */ move $a2, $t6 +/* 090904 8008FD04 241900FF */ li $t9, 255 +/* 090908 8008FD08 284100F0 */ slti $at, $v0, 0xf0 +/* 09090C 8008FD0C 54200009 */ bnel $at, $zero, .L8008FD34 +/* 090910 8008FD10 00C02025 */ move $a0, $a2 +/* 090914 8008FD14 8C88000C */ lw $t0, 0xc($a0) +/* 090918 8008FD18 3C01F7FF */ lui $at, (0xF7FFFFFF >> 16) # lui $at, 0xf7ff +/* 09091C 8008FD1C 3421FFFF */ ori $at, (0xF7FFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 090920 8008FD20 A49900C6 */ sh $t9, 0xc6($a0) +/* 090924 8008FD24 01014824 */ and $t1, $t0, $at +/* 090928 8008FD28 AC89000C */ sw $t1, 0xc($a0) +/* 09092C 8008FD2C 848200C6 */ lh $v0, 0xc6($a0) +/* 090930 8008FD30 00C02025 */ move $a0, $a2 +.L8008FD34: +/* 090934 8008FD34 0C015A90 */ jal func_80056A40 +/* 090938 8008FD38 00402825 */ move $a1, $v0 +/* 09093C 8008FD3C 8FBF0014 */ lw $ra, 0x14($sp) +/* 090940 8008FD40 27BD0018 */ addiu $sp, $sp, 0x18 +/* 090944 8008FD44 03E00008 */ jr $ra +/* 090948 8008FD48 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FD4C.s b/asm/non_matchings/code_8008C1D0/func_8008FD4C.s new file mode 100644 index 000000000..aaca7e290 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FD4C.s @@ -0,0 +1,25 @@ +glabel func_8008FD4C +/* 09094C 8008FD4C AFA50004 */ sw $a1, 4($sp) +/* 090950 8008FD50 8C8E000C */ lw $t6, 0xc($a0) +/* 090954 8008FD54 84980044 */ lh $t8, 0x44($a0) +/* 090958 8008FD58 3C010400 */ lui $at, 0x400 +/* 09095C 8008FD5C 01C17825 */ or $t7, $t6, $at +/* 090960 8008FD60 37190200 */ ori $t9, $t8, 0x200 +/* 090964 8008FD64 AC8F000C */ sw $t7, 0xc($a0) +/* 090968 8008FD68 A4990044 */ sh $t9, 0x44($a0) +/* 09096C 8008FD6C 24050048 */ li $a1, 72 +/* 090970 8008FD70 00001025 */ move $v0, $zero +.L8008FD74: +/* 090974 8008FD74 00450019 */ multu $v0, $a1 +/* 090978 8008FD78 24420001 */ addiu $v0, $v0, 1 +/* 09097C 8008FD7C 00024C00 */ sll $t1, $v0, 0x10 +/* 090980 8008FD80 00091403 */ sra $v0, $t1, 0x10 +/* 090984 8008FD84 2841000A */ slti $at, $v0, 0xa +/* 090988 8008FD88 00004012 */ mflo $t0 +/* 09098C 8008FD8C 00881821 */ addu $v1, $a0, $t0 +/* 090990 8008FD90 A4600274 */ sh $zero, 0x274($v1) +/* 090994 8008FD94 A4600276 */ sh $zero, 0x276($v1) +/* 090998 8008FD98 1420FFF6 */ bnez $at, .L8008FD74 +/* 09099C 8008FD9C A460026A */ sh $zero, 0x26a($v1) +/* 0909A0 8008FDA0 03E00008 */ jr $ra +/* 0909A4 8008FDA4 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FDA8.s b/asm/non_matchings/code_8008C1D0/func_8008FDA8.s new file mode 100644 index 000000000..a2b8721a1 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FDA8.s @@ -0,0 +1,21 @@ +glabel func_8008FDA8 +/* 0909A8 8008FDA8 AFA50004 */ sw $a1, 4($sp) +/* 0909AC 8008FDAC 848E0044 */ lh $t6, 0x44($a0) +/* 0909B0 8008FDB0 24050048 */ li $a1, 72 +/* 0909B4 8008FDB4 00001025 */ move $v0, $zero +/* 0909B8 8008FDB8 35CF0200 */ ori $t7, $t6, 0x200 +/* 0909BC 8008FDBC A48F0044 */ sh $t7, 0x44($a0) +.L8008FDC0: +/* 0909C0 8008FDC0 00450019 */ multu $v0, $a1 +/* 0909C4 8008FDC4 24420001 */ addiu $v0, $v0, 1 +/* 0909C8 8008FDC8 0002CC00 */ sll $t9, $v0, 0x10 +/* 0909CC 8008FDCC 00191403 */ sra $v0, $t9, 0x10 +/* 0909D0 8008FDD0 2841000A */ slti $at, $v0, 0xa +/* 0909D4 8008FDD4 0000C012 */ mflo $t8 +/* 0909D8 8008FDD8 00981821 */ addu $v1, $a0, $t8 +/* 0909DC 8008FDDC A4600274 */ sh $zero, 0x274($v1) +/* 0909E0 8008FDE0 A4600276 */ sh $zero, 0x276($v1) +/* 0909E4 8008FDE4 1420FFF6 */ bnez $at, .L8008FDC0 +/* 0909E8 8008FDE8 A460026A */ sh $zero, 0x26a($v1) +/* 0909EC 8008FDEC 03E00008 */ jr $ra +/* 0909F0 8008FDF0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FDF4.s b/asm/non_matchings/code_8008C1D0/func_8008FDF4.s new file mode 100644 index 000000000..827dceca3 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FDF4.s @@ -0,0 +1,37 @@ +glabel func_8008FDF4 +/* 0909F4 8008FDF4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 0909F8 8008FDF8 AFBF0014 */ sw $ra, 0x14($sp) +/* 0909FC 8008FDFC AFA5001C */ sw $a1, 0x1c($sp) +/* 090A00 8008FE00 00057600 */ sll $t6, $a1, 0x18 +/* 090A04 8008FE04 000E2E03 */ sra $a1, $t6, 0x18 +/* 090A08 8008FE08 0C0230D5 */ jal func_8008C354 +/* 090A0C 8008FE0C AFA40018 */ sw $a0, 0x18($sp) +/* 090A10 8008FE10 8FA40018 */ lw $a0, 0x18($sp) +/* 090A14 8008FE14 2401FFEF */ li $at, -17 +/* 090A18 8008FE18 44803000 */ mtc1 $zero, $f6 +/* 090A1C 8008FE1C 8C9800BC */ lw $t8, 0xbc($a0) +/* 090A20 8008FE20 94820254 */ lhu $v0, 0x254($a0) +/* 090A24 8008FE24 8C89000C */ lw $t1, 0xc($a0) +/* 090A28 8008FE28 0301C824 */ and $t9, $t8, $at +/* 090A2C 8008FE2C 3C01800E */ lui $at, %hi(D_800E37F0) +/* 090A30 8008FE30 00024080 */ sll $t0, $v0, 2 +/* 090A34 8008FE34 00280821 */ addu $at, $at, $t0 +/* 090A38 8008FE38 AC9900BC */ sw $t9, 0xbc($a0) +/* 090A3C 8008FE3C C42437F0 */ lwc1 $f4, %lo(D_800E37F0)($at) +/* 090A40 8008FE40 3C01800E */ lui $at, %hi(D_800E37D0) +/* 090A44 8008FE44 00280821 */ addu $at, $at, $t0 +/* 090A48 8008FE48 E48600F4 */ swc1 $f6, 0xf4($a0) +/* 090A4C 8008FE4C E48400F0 */ swc1 $f4, 0xf0($a0) +/* 090A50 8008FE50 C42837D0 */ lwc1 $f8, %lo(D_800E37D0)($at) +/* 090A54 8008FE54 3C01FFEF */ lui $at, (0xFFEFFFFF >> 16) # lui $at, 0xffef +/* 090A58 8008FE58 3421FFFF */ ori $at, (0xFFEFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 090A5C 8008FE5C 01215024 */ and $t2, $t1, $at +/* 090A60 8008FE60 3C011000 */ lui $at, 0x1000 +/* 090A64 8008FE64 03216025 */ or $t4, $t9, $at +/* 090A68 8008FE68 AC8A000C */ sw $t2, 0xc($a0) +/* 090A6C 8008FE6C AC8C00BC */ sw $t4, 0xbc($a0) +/* 090A70 8008FE70 E48800EC */ swc1 $f8, 0xec($a0) +/* 090A74 8008FE74 8FBF0014 */ lw $ra, 0x14($sp) +/* 090A78 8008FE78 27BD0018 */ addiu $sp, $sp, 0x18 +/* 090A7C 8008FE7C 03E00008 */ jr $ra +/* 090A80 8008FE80 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FE84.s b/asm/non_matchings/code_8008C1D0/func_8008FE84.s new file mode 100644 index 000000000..3a6f09672 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FE84.s @@ -0,0 +1,24 @@ +glabel func_8008FE84 +/* 090A84 8008FE84 AFA50004 */ sw $a1, 4($sp) +/* 090A88 8008FE88 8C8E00BC */ lw $t6, 0xbc($a0) +/* 090A8C 8008FE8C 2401FFEF */ li $at, -17 +/* 090A90 8008FE90 01C17824 */ and $t7, $t6, $at +/* 090A94 8008FE94 31F80008 */ andi $t8, $t7, 8 +/* 090A98 8008FE98 24010008 */ li $at, 8 +/* 090A9C 8008FE9C 1301000D */ beq $t8, $at, .L8008FED4 +/* 090AA0 8008FEA0 AC8F00BC */ sw $t7, 0xbc($a0) +/* 090AA4 8008FEA4 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 090AA8 8008FEA8 44810000 */ mtc1 $at, $f0 +/* 090AAC 8008FEAC C484009C */ lwc1 $f4, 0x9c($a0) +/* 090AB0 8008FEB0 C488008C */ lwc1 $f8, 0x8c($a0) +/* 090AB4 8008FEB4 3C01EFFF */ lui $at, (0xEFFFFFFF >> 16) # lui $at, 0xefff +/* 090AB8 8008FEB8 46002183 */ div.s $f6, $f4, $f0 +/* 090ABC 8008FEBC 3421FFFF */ ori $at, (0xEFFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 090AC0 8008FEC0 01E1C824 */ and $t9, $t7, $at +/* 090AC4 8008FEC4 AC9900BC */ sw $t9, 0xbc($a0) +/* 090AC8 8008FEC8 46004283 */ div.s $f10, $f8, $f0 +/* 090ACC 8008FECC E486009C */ swc1 $f6, 0x9c($a0) +/* 090AD0 8008FED0 E48A008C */ swc1 $f10, 0x8c($a0) +.L8008FED4: +/* 090AD4 8008FED4 03E00008 */ jr $ra +/* 090AD8 8008FED8 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_8008FEDC.s b/asm/non_matchings/code_8008C1D0/func_8008FEDC.s new file mode 100644 index 000000000..3506037fb --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FEDC.s @@ -0,0 +1,12 @@ +glabel func_8008FEDC +/* 090ADC 8008FEDC AFA50004 */ sw $a1, 4($sp) +/* 090AE0 8008FEE0 44800000 */ mtc1 $zero, $f0 +/* 090AE4 8008FEE4 8C8E00BC */ lw $t6, 0xbc($a0) +/* 090AE8 8008FEE8 3C01EFFF */ lui $at, (0xEFFFFFFF >> 16) # lui $at, 0xefff +/* 090AEC 8008FEEC 3421FFFF */ ori $at, (0xEFFFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 090AF0 8008FEF0 01C17824 */ and $t7, $t6, $at +/* 090AF4 8008FEF4 AC8F00BC */ sw $t7, 0xbc($a0) +/* 090AF8 8008FEF8 E48000F0 */ swc1 $f0, 0xf0($a0) +/* 090AFC 8008FEFC E48000EC */ swc1 $f0, 0xec($a0) +/* 090B00 8008FF00 03E00008 */ jr $ra +/* 090B04 8008FF04 E48000F4 */ swc1 $f0, 0xf4($a0) diff --git a/asm/non_matchings/code_8008C1D0/func_8008FF08.s b/asm/non_matchings/code_8008C1D0/func_8008FF08.s new file mode 100644 index 000000000..d1ec7b27c --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_8008FF08.s @@ -0,0 +1,186 @@ +glabel func_8008FF08 +/* 090B08 8008FF08 3C18800E */ lui $t8, %hi(gCurrentCourseId) # $t8, 0x800e +/* 090B0C 8008FF0C 8718C5A0 */ lh $t8, %lo(gCurrentCourseId)($t8) +/* 090B10 8008FF10 AFA50004 */ sw $a1, 4($sp) +/* 090B14 8008FF14 00057600 */ sll $t6, $a1, 0x18 +/* 090B18 8008FF18 2719FFFE */ addiu $t9, $t8, -2 +/* 090B1C 8008FF1C 2F210012 */ sltiu $at, $t9, 0x12 +/* 090B20 8008FF20 10200087 */ beqz $at, .L80090140 +/* 090B24 8008FF24 000E2E03 */ sra $a1, $t6, 0x18 +/* 090B28 8008FF28 0019C880 */ sll $t9, $t9, 2 +/* 090B2C 8008FF2C 3C01800F */ lui $at, %hi(jpt_800EF5B0) +/* 090B30 8008FF30 00390821 */ addu $at, $at, $t9 +/* 090B34 8008FF34 8C39F5B0 */ lw $t9, %lo(jpt_800EF5B0)($at) +/* 090B38 8008FF38 03200008 */ jr $t9 +/* 090B3C 8008FF3C 00000000 */ nop +glabel L8008FF40 +/* 090B40 8008FF40 00054040 */ sll $t0, $a1, 1 +/* 090B44 8008FF44 3C038016 */ lui $v1, %hi(D_80164438) # 0x8016 +/* 090B48 8008FF48 00681821 */ addu $v1, $v1, $t0 +/* 090B4C 8008FF4C 94634438 */ lhu $v1, %lo(D_80164438)($v1) # 0x4438($v1) +/* 090B50 8008FF50 00031400 */ sll $v0, $v1, 0x10 +/* 090B54 8008FF54 00024C03 */ sra $t1, $v0, 0x10 +/* 090B58 8008FF58 29210235 */ slti $at, $t1, 0x235 +/* 090B5C 8008FF5C 14200006 */ bnez $at, .L8008FF78 +/* 090B60 8008FF60 01201025 */ move $v0, $t1 +/* 090B64 8008FF64 29210247 */ slti $at, $t1, 0x247 +/* 090B68 8008FF68 10200003 */ beqz $at, .L8008FF78 +/* 090B6C 8008FF6C 240A0214 */ li $t2, 532 +/* 090B70 8008FF70 03E00008 */ jr $ra +/* 090B74 8008FF74 A48A0220 */ sh $t2, 0x220($a0) + +.L8008FF78: +/* 090B78 8008FF78 28410267 */ slti $at, $v0, 0x267 +/* 090B7C 8008FF7C 14200005 */ bnez $at, .L8008FF94 +/* 090B80 8008FF80 28410277 */ slti $at, $v0, 0x277 +/* 090B84 8008FF84 10200003 */ beqz $at, .L8008FF94 +/* 090B88 8008FF88 240B025B */ li $t3, 603 +/* 090B8C 8008FF8C 03E00008 */ jr $ra +/* 090B90 8008FF90 A48B0220 */ sh $t3, 0x220($a0) + +.L8008FF94: +/* 090B94 8008FF94 A4830220 */ sh $v1, 0x220($a0) +/* 090B98 8008FF98 84820220 */ lh $v0, 0x220($a0) +/* 090B9C 8008FF9C 3C0C8016 */ lui $t4, %hi(D_801645C8) # $t4, 0x8016 +/* 090BA0 8008FFA0 04410073 */ bgez $v0, .L80090170 +/* 090BA4 8008FFA4 00000000 */ nop +/* 090BA8 8008FFA8 958C45C8 */ lhu $t4, %lo(D_801645C8)($t4) +/* 090BAC 8008FFAC 01826821 */ addu $t5, $t4, $v0 +/* 090BB0 8008FFB0 03E00008 */ jr $ra +/* 090BB4 8008FFB4 A48D0220 */ sh $t5, 0x220($a0) + +glabel L8008FFB8 +/* 090BB8 8008FFB8 00057040 */ sll $t6, $a1, 1 +/* 090BBC 8008FFBC 3C038016 */ lui $v1, %hi(D_80164438) # 0x8016 +/* 090BC0 8008FFC0 006E1821 */ addu $v1, $v1, $t6 +/* 090BC4 8008FFC4 94634438 */ lhu $v1, %lo(D_80164438)($v1) # 0x4438($v1) +/* 090BC8 8008FFC8 00031400 */ sll $v0, $v1, 0x10 +/* 090BCC 8008FFCC 00027C03 */ sra $t7, $v0, 0x10 +/* 090BD0 8008FFD0 29E1012C */ slti $at, $t7, 0x12c +/* 090BD4 8008FFD4 14200005 */ bnez $at, .L8008FFEC +/* 090BD8 8008FFD8 29E1013C */ slti $at, $t7, 0x13c +/* 090BDC 8008FFDC 10200003 */ beqz $at, .L8008FFEC +/* 090BE0 8008FFE0 2418012C */ li $t8, 300 +/* 090BE4 8008FFE4 03E00008 */ jr $ra +/* 090BE8 8008FFE8 A4980220 */ sh $t8, 0x220($a0) + +.L8008FFEC: +/* 090BEC 8008FFEC A4830220 */ sh $v1, 0x220($a0) +/* 090BF0 8008FFF0 84820220 */ lh $v0, 0x220($a0) +/* 090BF4 8008FFF4 3C198016 */ lui $t9, %hi(D_801645C8) # $t9, 0x8016 +/* 090BF8 8008FFF8 0441005D */ bgez $v0, .L80090170 +/* 090BFC 8008FFFC 00000000 */ nop +/* 090C00 80090000 973945C8 */ lhu $t9, %lo(D_801645C8)($t9) +/* 090C04 80090004 03224021 */ addu $t0, $t9, $v0 +/* 090C08 80090008 03E00008 */ jr $ra +/* 090C0C 8009000C A4880220 */ sh $t0, 0x220($a0) + +glabel L80090010 +/* 090C10 80090010 00054840 */ sll $t1, $a1, 1 +/* 090C14 80090014 3C0A8016 */ lui $t2, %hi(D_80165320) # 0x8016 +/* 090C18 80090018 01495021 */ addu $t2, $t2, $t1 +/* 090C1C 8009001C 854A5320 */ lh $t2, %lo(D_80165320)($t2) # 0x5320($t2) +/* 090C20 80090020 03E00008 */ jr $ra +/* 090C24 80090024 A48A0220 */ sh $t2, 0x220($a0) + +glabel L80090028 +/* 090C28 80090028 00051840 */ sll $v1, $a1, 1 +/* 090C2C 8009002C 3C028016 */ lui $v0, %hi(D_80164438) # 0x8016 +/* 090C30 80090030 00431021 */ addu $v0, $v0, $v1 +/* 090C34 80090034 84424438 */ lh $v0, %lo(D_80164438)($v0) # 0x4438($v0) +/* 090C38 80090038 3C0C8016 */ lui $t4, %hi(D_80165320) # 0x8016 +/* 090C3C 8009003C 01836021 */ addu $t4, $t4, $v1 +/* 090C40 80090040 284100F0 */ slti $at, $v0, 0xf0 +/* 090C44 80090044 14200005 */ bnez $at, .L8009005C +/* 090C48 80090048 28410105 */ slti $at, $v0, 0x105 +/* 090C4C 8009004C 10200003 */ beqz $at, .L8009005C +/* 090C50 80090050 240B00F0 */ li $t3, 240 +/* 090C54 80090054 03E00008 */ jr $ra +/* 090C58 80090058 A48B0220 */ sh $t3, 0x220($a0) + +.L8009005C: +/* 090C5C 8009005C 858C5320 */ lh $t4, %lo(D_80165320)($t4) # 0x5320($t4) +/* 090C60 80090060 3C0D8016 */ lui $t5, %hi(D_801645C8) # $t5, 0x8016 +/* 090C64 80090064 A48C0220 */ sh $t4, 0x220($a0) +/* 090C68 80090068 84820220 */ lh $v0, 0x220($a0) +/* 090C6C 8009006C 04410040 */ bgez $v0, .L80090170 +/* 090C70 80090070 00000000 */ nop +/* 090C74 80090074 95AD45C8 */ lhu $t5, %lo(D_801645C8)($t5) +/* 090C78 80090078 01A27021 */ addu $t6, $t5, $v0 +/* 090C7C 8009007C 03E00008 */ jr $ra +/* 090C80 80090080 A48E0220 */ sh $t6, 0x220($a0) + +glabel L80090084 +/* 090C84 80090084 00051840 */ sll $v1, $a1, 1 +/* 090C88 80090088 3C028016 */ lui $v0, %hi(D_80164438) # 0x8016 +/* 090C8C 8009008C 00431021 */ addu $v0, $v0, $v1 +/* 090C90 80090090 84424438 */ lh $v0, %lo(D_80164438)($v0) # 0x4438($v0) +/* 090C94 80090094 3C188016 */ lui $t8, %hi(D_80165320) # 0x8016 +/* 090C98 80090098 0303C021 */ addu $t8, $t8, $v1 +/* 090C9C 8009009C 28410258 */ slti $at, $v0, 0x258 +/* 090CA0 800900A0 14200005 */ bnez $at, .L800900B8 +/* 090CA4 800900A4 284102A4 */ slti $at, $v0, 0x2a4 +/* 090CA8 800900A8 10200003 */ beqz $at, .L800900B8 +/* 090CAC 800900AC 240F0258 */ li $t7, 600 +/* 090CB0 800900B0 03E00008 */ jr $ra +/* 090CB4 800900B4 A48F0220 */ sh $t7, 0x220($a0) + +.L800900B8: +/* 090CB8 800900B8 87185320 */ lh $t8, %lo(D_80165320)($t8) # 0x5320($t8) +/* 090CBC 800900BC 3C198016 */ lui $t9, %hi(D_801645C8) # $t9, 0x8016 +/* 090CC0 800900C0 A4980220 */ sh $t8, 0x220($a0) +/* 090CC4 800900C4 84820220 */ lh $v0, 0x220($a0) +/* 090CC8 800900C8 04410029 */ bgez $v0, .L80090170 +/* 090CCC 800900CC 00000000 */ nop +/* 090CD0 800900D0 973945C8 */ lhu $t9, %lo(D_801645C8)($t9) +/* 090CD4 800900D4 03224021 */ addu $t0, $t9, $v0 +/* 090CD8 800900D8 03E00008 */ jr $ra +/* 090CDC 800900DC A4880220 */ sh $t0, 0x220($a0) + +glabel L800900E0 +/* 090CE0 800900E0 00054840 */ sll $t1, $a1, 1 +/* 090CE4 800900E4 3C038016 */ lui $v1, %hi(D_80164438) # 0x8016 +/* 090CE8 800900E8 00691821 */ addu $v1, $v1, $t1 +/* 090CEC 800900EC 94634438 */ lhu $v1, %lo(D_80164438)($v1) # 0x4438($v1) +/* 090CF0 800900F0 00031400 */ sll $v0, $v1, 0x10 +/* 090CF4 800900F4 00025403 */ sra $t2, $v0, 0x10 +/* 090CF8 800900F8 294100B9 */ slti $at, $t2, 0xb9 +/* 090CFC 800900FC 14200005 */ bnez $at, .L80090114 +/* 090D00 80090100 29410119 */ slti $at, $t2, 0x119 +/* 090D04 80090104 10200003 */ beqz $at, .L80090114 +/* 090D08 80090108 240B00B9 */ li $t3, 185 +/* 090D0C 8009010C 03E00008 */ jr $ra +/* 090D10 80090110 A48B0220 */ sh $t3, 0x220($a0) + +.L80090114: +/* 090D14 80090114 A4830220 */ sh $v1, 0x220($a0) +/* 090D18 80090118 84820220 */ lh $v0, 0x220($a0) +/* 090D1C 8009011C 3C0C8016 */ lui $t4, %hi(D_801645C8) # $t4, 0x8016 +/* 090D20 80090120 04410013 */ bgez $v0, .L80090170 +/* 090D24 80090124 00000000 */ nop +/* 090D28 80090128 958C45C8 */ lhu $t4, %lo(D_801645C8)($t4) +/* 090D2C 8009012C 01826821 */ addu $t5, $t4, $v0 +/* 090D30 80090130 03E00008 */ jr $ra +/* 090D34 80090134 A48D0220 */ sh $t5, 0x220($a0) + +glabel L80090138 +/* 090D38 80090138 03E00008 */ jr $ra +/* 090D3C 8009013C A4800220 */ sh $zero, 0x220($a0) + +.L80090140: +glabel L80090140 +/* 090D40 80090140 00057040 */ sll $t6, $a1, 1 +/* 090D44 80090144 3C0F8016 */ lui $t7, %hi(D_80164438) # 0x8016 +/* 090D48 80090148 01EE7821 */ addu $t7, $t7, $t6 +/* 090D4C 8009014C 95EF4438 */ lhu $t7, %lo(D_80164438)($t7) # 0x4438($t7) +/* 090D50 80090150 3C188016 */ lui $t8, %hi(D_801645C8) # $t8, 0x8016 +/* 090D54 80090154 A48F0220 */ sh $t7, 0x220($a0) +/* 090D58 80090158 84820220 */ lh $v0, 0x220($a0) +/* 090D5C 8009015C 04410004 */ bgez $v0, .L80090170 +/* 090D60 80090160 00000000 */ nop +/* 090D64 80090164 971845C8 */ lhu $t8, %lo(D_801645C8)($t8) +/* 090D68 80090168 0302C821 */ addu $t9, $t8, $v0 +/* 090D6C 8009016C A4990220 */ sh $t9, 0x220($a0) +.L80090170: +/* 090D70 80090170 03E00008 */ jr $ra +/* 090D74 80090174 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80090178.s b/asm/non_matchings/code_8008C1D0/func_80090178.s new file mode 100644 index 000000000..3872ddc34 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_80090178.s @@ -0,0 +1,397 @@ +glabel func_80090178 +/* 090D78 80090178 27BDFEF0 */ addiu $sp, $sp, -0x110 +/* 090D7C 8009017C 3C18800E */ lui $t8, %hi(D_800E6F6C) # $t8, 0x800e +/* 090D80 80090180 AFA50114 */ sw $a1, 0x114($sp) +/* 090D84 80090184 27186F6C */ addiu $t8, %lo(D_800E6F6C) # addiu $t8, $t8, 0x6f6c +/* 090D88 80090188 8F010000 */ lw $at, ($t8) +/* 090D8C 8009018C 27A200F8 */ addiu $v0, $sp, 0xf8 +/* 090D90 80090190 00057600 */ sll $t6, $a1, 0x18 +/* 090D94 80090194 AC410000 */ sw $at, ($v0) +/* 090D98 80090198 8F0F0004 */ lw $t7, 4($t8) +/* 090D9C 8009019C 000E2E03 */ sra $a1, $t6, 0x18 +/* 090DA0 800901A0 3C0E800E */ lui $t6, %hi(D_800E6F7C) # $t6, 0x800e +/* 090DA4 800901A4 AC4F0004 */ sw $t7, 4($v0) +/* 090DA8 800901A8 8F010008 */ lw $at, 8($t8) +/* 090DAC 800901AC 25CE6F7C */ addiu $t6, %lo(D_800E6F7C) # addiu $t6, $t6, 0x6f7c +/* 090DB0 800901B0 27A300E8 */ addiu $v1, $sp, 0xe8 +/* 090DB4 800901B4 AC410008 */ sw $at, 8($v0) +/* 090DB8 800901B8 8F0F000C */ lw $t7, 0xc($t8) +/* 090DBC 800901BC 3C18800E */ lui $t8, %hi(D_800E6F8C) # $t8, 0x800e +/* 090DC0 800901C0 27186F8C */ addiu $t8, %lo(D_800E6F8C) # addiu $t8, $t8, 0x6f8c +/* 090DC4 800901C4 AC4F000C */ sw $t7, 0xc($v0) +/* 090DC8 800901C8 8DC10000 */ lw $at, ($t6) +/* 090DCC 800901CC 27A800D8 */ addiu $t0, $sp, 0xd8 +/* 090DD0 800901D0 27A900C8 */ addiu $t1, $sp, 0xc8 +/* 090DD4 800901D4 AC610000 */ sw $at, ($v1) +/* 090DD8 800901D8 8DCF0004 */ lw $t7, 4($t6) +/* 090DDC 800901DC 27AA00B8 */ addiu $t2, $sp, 0xb8 +/* 090DE0 800901E0 27AB00A8 */ addiu $t3, $sp, 0xa8 +/* 090DE4 800901E4 AC6F0004 */ sw $t7, 4($v1) +/* 090DE8 800901E8 8DC10008 */ lw $at, 8($t6) +/* 090DEC 800901EC 27AC0098 */ addiu $t4, $sp, 0x98 +/* 090DF0 800901F0 27AD0088 */ addiu $t5, $sp, 0x88 +/* 090DF4 800901F4 AC610008 */ sw $at, 8($v1) +/* 090DF8 800901F8 8DCF000C */ lw $t7, 0xc($t6) +/* 090DFC 800901FC 3C0E800E */ lui $t6, %hi(D_800E6F9C) # $t6, 0x800e +/* 090E00 80090200 25CE6F9C */ addiu $t6, %lo(D_800E6F9C) # addiu $t6, $t6, 0x6f9c +/* 090E04 80090204 AC6F000C */ sw $t7, 0xc($v1) +/* 090E08 80090208 8F010000 */ lw $at, ($t8) +/* 090E0C 8009020C 3C19800E */ lui $t9, %hi(D_800E6FEC) # $t9, 0x800e +/* 090E10 80090210 27396FEC */ addiu $t9, %lo(D_800E6FEC) # addiu $t9, $t9, 0x6fec +/* 090E14 80090214 AD010000 */ sw $at, ($t0) +/* 090E18 80090218 8F0F0004 */ lw $t7, 4($t8) +/* 090E1C 8009021C AD0F0004 */ sw $t7, 4($t0) +/* 090E20 80090220 8F010008 */ lw $at, 8($t8) +/* 090E24 80090224 AD010008 */ sw $at, 8($t0) +/* 090E28 80090228 8F0F000C */ lw $t7, 0xc($t8) +/* 090E2C 8009022C 3C18800E */ lui $t8, %hi(D_800E6FAC) # $t8, 0x800e +/* 090E30 80090230 27186FAC */ addiu $t8, %lo(D_800E6FAC) # addiu $t8, $t8, 0x6fac +/* 090E34 80090234 AD0F000C */ sw $t7, 0xc($t0) +/* 090E38 80090238 8DC10000 */ lw $at, ($t6) +/* 090E3C 8009023C AD210000 */ sw $at, ($t1) +/* 090E40 80090240 8DCF0004 */ lw $t7, 4($t6) +/* 090E44 80090244 AD2F0004 */ sw $t7, 4($t1) +/* 090E48 80090248 8DC10008 */ lw $at, 8($t6) +/* 090E4C 8009024C AD210008 */ sw $at, 8($t1) +/* 090E50 80090250 8DCF000C */ lw $t7, 0xc($t6) +/* 090E54 80090254 3C0E800E */ lui $t6, %hi(D_800E6FBC) # $t6, 0x800e +/* 090E58 80090258 25CE6FBC */ addiu $t6, %lo(D_800E6FBC) # addiu $t6, $t6, 0x6fbc +/* 090E5C 8009025C AD2F000C */ sw $t7, 0xc($t1) +/* 090E60 80090260 8F010000 */ lw $at, ($t8) +/* 090E64 80090264 AD410000 */ sw $at, ($t2) +/* 090E68 80090268 8F0F0004 */ lw $t7, 4($t8) +/* 090E6C 8009026C AD4F0004 */ sw $t7, 4($t2) +/* 090E70 80090270 8F010008 */ lw $at, 8($t8) +/* 090E74 80090274 AD410008 */ sw $at, 8($t2) +/* 090E78 80090278 8F0F000C */ lw $t7, 0xc($t8) +/* 090E7C 8009027C 3C18800E */ lui $t8, %hi(D_800E6FCC) # $t8, 0x800e +/* 090E80 80090280 27186FCC */ addiu $t8, %lo(D_800E6FCC) # addiu $t8, $t8, 0x6fcc +/* 090E84 80090284 AD4F000C */ sw $t7, 0xc($t2) +/* 090E88 80090288 8DC10000 */ lw $at, ($t6) +/* 090E8C 8009028C AD610000 */ sw $at, ($t3) +/* 090E90 80090290 8DCF0004 */ lw $t7, 4($t6) +/* 090E94 80090294 AD6F0004 */ sw $t7, 4($t3) +/* 090E98 80090298 8DC10008 */ lw $at, 8($t6) +/* 090E9C 8009029C AD610008 */ sw $at, 8($t3) +/* 090EA0 800902A0 8DCF000C */ lw $t7, 0xc($t6) +/* 090EA4 800902A4 3C0E800E */ lui $t6, %hi(D_800E6FDC) # $t6, 0x800e +/* 090EA8 800902A8 25CE6FDC */ addiu $t6, %lo(D_800E6FDC) # addiu $t6, $t6, 0x6fdc +/* 090EAC 800902AC AD6F000C */ sw $t7, 0xc($t3) +/* 090EB0 800902B0 8F010000 */ lw $at, ($t8) +/* 090EB4 800902B4 AD810000 */ sw $at, ($t4) +/* 090EB8 800902B8 8F0F0004 */ lw $t7, 4($t8) +/* 090EBC 800902BC AD8F0004 */ sw $t7, 4($t4) +/* 090EC0 800902C0 8F010008 */ lw $at, 8($t8) +/* 090EC4 800902C4 AD810008 */ sw $at, 8($t4) +/* 090EC8 800902C8 8F0F000C */ lw $t7, 0xc($t8) +/* 090ECC 800902CC 27B80078 */ addiu $t8, $sp, 0x78 +/* 090ED0 800902D0 AD8F000C */ sw $t7, 0xc($t4) +/* 090ED4 800902D4 8DC10000 */ lw $at, ($t6) +/* 090ED8 800902D8 ADA10000 */ sw $at, ($t5) +/* 090EDC 800902DC 8DCF0004 */ lw $t7, 4($t6) +/* 090EE0 800902E0 ADAF0004 */ sw $t7, 4($t5) +/* 090EE4 800902E4 8DC10008 */ lw $at, 8($t6) +/* 090EE8 800902E8 ADA10008 */ sw $at, 8($t5) +/* 090EEC 800902EC 8DCF000C */ lw $t7, 0xc($t6) +/* 090EF0 800902F0 27AE0068 */ addiu $t6, $sp, 0x68 +/* 090EF4 800902F4 ADAF000C */ sw $t7, 0xc($t5) +/* 090EF8 800902F8 8F2F0004 */ lw $t7, 4($t9) +/* 090EFC 800902FC 8F210000 */ lw $at, ($t9) +/* 090F00 80090300 AF0F0004 */ sw $t7, 4($t8) +/* 090F04 80090304 AF010000 */ sw $at, ($t8) +/* 090F08 80090308 8F210008 */ lw $at, 8($t9) +/* 090F0C 8009030C 8F2F000C */ lw $t7, 0xc($t9) +/* 090F10 80090310 27B90058 */ addiu $t9, $sp, 0x58 +/* 090F14 80090314 AF010008 */ sw $at, 8($t8) +/* 090F18 80090318 AF0F000C */ sw $t7, 0xc($t8) +/* 090F1C 8009031C 3C18800E */ lui $t8, %hi(D_800E6FFC) # $t8, 0x800e +/* 090F20 80090320 27186FFC */ addiu $t8, %lo(D_800E6FFC) # addiu $t8, $t8, 0x6ffc +/* 090F24 80090324 8F010000 */ lw $at, ($t8) +/* 090F28 80090328 8F0F0004 */ lw $t7, 4($t8) +/* 090F2C 8009032C ADC10000 */ sw $at, ($t6) +/* 090F30 80090330 ADCF0004 */ sw $t7, 4($t6) +/* 090F34 80090334 8F0F000C */ lw $t7, 0xc($t8) +/* 090F38 80090338 8F010008 */ lw $at, 8($t8) +/* 090F3C 8009033C 27B80048 */ addiu $t8, $sp, 0x48 +/* 090F40 80090340 ADCF000C */ sw $t7, 0xc($t6) +/* 090F44 80090344 ADC10008 */ sw $at, 8($t6) +/* 090F48 80090348 3C0E800E */ lui $t6, %hi(D_800E700C) # $t6, 0x800e +/* 090F4C 8009034C 25CE700C */ addiu $t6, %lo(D_800E700C) # addiu $t6, $t6, 0x700c +/* 090F50 80090350 8DC10000 */ lw $at, ($t6) +/* 090F54 80090354 8DCF0004 */ lw $t7, 4($t6) +/* 090F58 80090358 AF210000 */ sw $at, ($t9) +/* 090F5C 8009035C AF2F0004 */ sw $t7, 4($t9) +/* 090F60 80090360 8DCF000C */ lw $t7, 0xc($t6) +/* 090F64 80090364 8DC10008 */ lw $at, 8($t6) +/* 090F68 80090368 27AE0038 */ addiu $t6, $sp, 0x38 +/* 090F6C 8009036C AF2F000C */ sw $t7, 0xc($t9) +/* 090F70 80090370 AF210008 */ sw $at, 8($t9) +/* 090F74 80090374 3C19800E */ lui $t9, %hi(D_800E701C) # $t9, 0x800e +/* 090F78 80090378 2739701C */ addiu $t9, %lo(D_800E701C) # addiu $t9, $t9, 0x701c +/* 090F7C 8009037C 8F210000 */ lw $at, ($t9) +/* 090F80 80090380 8F2F0004 */ lw $t7, 4($t9) +/* 090F84 80090384 AF010000 */ sw $at, ($t8) +/* 090F88 80090388 AF0F0004 */ sw $t7, 4($t8) +/* 090F8C 8009038C 8F2F000C */ lw $t7, 0xc($t9) +/* 090F90 80090390 8F210008 */ lw $at, 8($t9) +/* 090F94 80090394 27B90028 */ addiu $t9, $sp, 0x28 +/* 090F98 80090398 AF0F000C */ sw $t7, 0xc($t8) +/* 090F9C 8009039C AF010008 */ sw $at, 8($t8) +/* 090FA0 800903A0 3C18800E */ lui $t8, %hi(D_800E702C) # $t8, 0x800e +/* 090FA4 800903A4 2718702C */ addiu $t8, %lo(D_800E702C) # addiu $t8, $t8, 0x702c +/* 090FA8 800903A8 8F010000 */ lw $at, ($t8) +/* 090FAC 800903AC 8F0F0004 */ lw $t7, 4($t8) +/* 090FB0 800903B0 ADC10000 */ sw $at, ($t6) +/* 090FB4 800903B4 ADCF0004 */ sw $t7, 4($t6) +/* 090FB8 800903B8 8F0F000C */ lw $t7, 0xc($t8) +/* 090FBC 800903BC 8F010008 */ lw $at, 8($t8) +/* 090FC0 800903C0 27B80018 */ addiu $t8, $sp, 0x18 +/* 090FC4 800903C4 ADCF000C */ sw $t7, 0xc($t6) +/* 090FC8 800903C8 ADC10008 */ sw $at, 8($t6) +/* 090FCC 800903CC 3C0E800E */ lui $t6, %hi(D_800E703C) # $t6, 0x800e +/* 090FD0 800903D0 25CE703C */ addiu $t6, %lo(D_800E703C) # addiu $t6, $t6, 0x703c +/* 090FD4 800903D4 8DC10000 */ lw $at, ($t6) +/* 090FD8 800903D8 8DCF0004 */ lw $t7, 4($t6) +/* 090FDC 800903DC AF210000 */ sw $at, ($t9) +/* 090FE0 800903E0 AF2F0004 */ sw $t7, 4($t9) +/* 090FE4 800903E4 8DCF000C */ lw $t7, 0xc($t6) +/* 090FE8 800903E8 8DC10008 */ lw $at, 8($t6) +/* 090FEC 800903EC 27AE0008 */ addiu $t6, $sp, 8 +/* 090FF0 800903F0 AF2F000C */ sw $t7, 0xc($t9) +/* 090FF4 800903F4 AF210008 */ sw $at, 8($t9) +/* 090FF8 800903F8 3C19800E */ lui $t9, %hi(D_800E704C) # $t9, 0x800e +/* 090FFC 800903FC 2739704C */ addiu $t9, %lo(D_800E704C) # addiu $t9, $t9, 0x704c +/* 091000 80090400 8F210000 */ lw $at, ($t9) +/* 091004 80090404 8F2F0004 */ lw $t7, 4($t9) +/* 091008 80090408 AF010000 */ sw $at, ($t8) +/* 09100C 8009040C AF0F0004 */ sw $t7, 4($t8) +/* 091010 80090410 8F2F000C */ lw $t7, 0xc($t9) +/* 091014 80090414 8F210008 */ lw $at, 8($t9) +/* 091018 80090418 3C19800E */ lui $t9, %hi(gCurrentCourseId) # $t9, 0x800e +/* 09101C 8009041C AF0F000C */ sw $t7, 0xc($t8) +/* 091020 80090420 AF010008 */ sw $at, 8($t8) +/* 091024 80090424 3C18800E */ lui $t8, %hi(D_800E705C) # $t8, 0x800e +/* 091028 80090428 2718705C */ addiu $t8, %lo(D_800E705C) # addiu $t8, $t8, 0x705c +/* 09102C 8009042C 8F010000 */ lw $at, ($t8) +/* 091030 80090430 8F0F0004 */ lw $t7, 4($t8) +/* 091034 80090434 ADC10000 */ sw $at, ($t6) +/* 091038 80090438 ADCF0004 */ sw $t7, 4($t6) +/* 09103C 8009043C 8F0F000C */ lw $t7, 0xc($t8) +/* 091040 80090440 8F010008 */ lw $at, 8($t8) +/* 091044 80090444 ADCF000C */ sw $t7, 0xc($t6) +/* 091048 80090448 ADC10008 */ sw $at, 8($t6) +/* 09104C 8009044C 8739C5A0 */ lh $t9, %lo(gCurrentCourseId)($t9) +/* 091050 80090450 272EFFFC */ addiu $t6, $t9, -4 +/* 091054 80090454 2DC10010 */ sltiu $at, $t6, 0x10 +/* 091058 80090458 1020008F */ beqz $at, .L80090698 +/* 09105C 8009045C 000E7080 */ sll $t6, $t6, 2 +/* 091060 80090460 3C01800F */ lui $at, %hi(jpt_800EF5F8) +/* 091064 80090464 002E0821 */ addu $at, $at, $t6 +/* 091068 80090468 8C2EF5F8 */ lw $t6, %lo(jpt_800EF5F8)($at) +/* 09106C 8009046C 01C00008 */ jr $t6 +/* 091070 80090470 00000000 */ nop +glabel L80090474 +/* 091074 80090474 3C0F8016 */ lui $t7, %hi(D_80165310) # $t7, 0x8016 +/* 091078 80090478 25EF5310 */ addiu $t7, %lo(D_80165310) # addiu $t7, $t7, 0x5310 +/* 09107C 8009047C 0005C040 */ sll $t8, $a1, 1 +/* 091080 80090480 030F4021 */ addu $t0, $t8, $t7 +/* 091084 80090484 95190000 */ lhu $t9, ($t0) +/* 091088 80090488 3C0A8016 */ lui $t2, %hi(D_80164550) # $t2, 0x8016 +/* 09108C 8009048C 254A4550 */ addiu $t2, %lo(D_80164550) # addiu $t2, $t2, 0x4550 +/* 091090 80090490 00197080 */ sll $t6, $t9, 2 +/* 091094 80090494 94820220 */ lhu $v0, 0x220($a0) +/* 091098 80090498 014EC021 */ addu $t8, $t2, $t6 +/* 09109C 8009049C 8F0F0000 */ lw $t7, ($t8) +/* 0910A0 800904A0 0002C8C0 */ sll $t9, $v0, 3 +/* 0910A4 800904A4 01F91821 */ addu $v1, $t7, $t9 +/* 0910A8 800904A8 846E0000 */ lh $t6, ($v1) +/* 0910AC 800904AC 448E2000 */ mtc1 $t6, $f4 +/* 0910B0 800904B0 00000000 */ nop +/* 0910B4 800904B4 468021A0 */ cvt.s.w $f6, $f4 +/* 0910B8 800904B8 E4C60000 */ swc1 $f6, ($a2) +/* 0910BC 800904BC 84780002 */ lh $t8, 2($v1) +/* 0910C0 800904C0 44984000 */ mtc1 $t8, $f8 +/* 0910C4 800904C4 00000000 */ nop +/* 0910C8 800904C8 468042A0 */ cvt.s.w $f10, $f8 +/* 0910CC 800904CC E4CA0004 */ swc1 $f10, 4($a2) +/* 0910D0 800904D0 846F0004 */ lh $t7, 4($v1) +/* 0910D4 800904D4 448F8000 */ mtc1 $t7, $f16 +/* 0910D8 800904D8 3C0F8016 */ lui $t7, %hi(D_801645C8) # 0x8016 +/* 0910DC 800904DC 468084A0 */ cvt.s.w $f18, $f16 +/* 0910E0 800904E0 E4D20008 */ swc1 $f18, 8($a2) +/* 0910E4 800904E4 95090000 */ lhu $t1, ($t0) +/* 0910E8 800904E8 84990220 */ lh $t9, 0x220($a0) +/* 0910EC 800904EC 0009C040 */ sll $t8, $t1, 1 +/* 0910F0 800904F0 01F87821 */ addu $t7, $t7, $t8 +/* 0910F4 800904F4 95EF45C8 */ lhu $t7, %lo(D_801645C8)($t7) # 0x45c8($t7) +/* 0910F8 800904F8 272E0005 */ addiu $t6, $t9, 5 +/* 0910FC 800904FC 25F90001 */ addiu $t9, $t7, 1 +/* 091100 80090500 01D9001A */ div $zero, $t6, $t9 +/* 091104 80090504 17200002 */ bnez $t9, .L80090510 +/* 091108 80090508 00000000 */ nop +/* 09110C 8009050C 0007000D */ break 7 +.L80090510: +/* 091110 80090510 2401FFFF */ li $at, -1 +/* 091114 80090514 17210004 */ bne $t9, $at, .L80090528 +/* 091118 80090518 3C018000 */ lui $at, 0x8000 +/* 09111C 8009051C 15C10002 */ bne $t6, $at, .L80090528 +/* 091120 80090520 00000000 */ nop +/* 091124 80090524 0006000D */ break 6 +.L80090528: +/* 091128 80090528 0000C010 */ mfhi $t8 +/* 09112C 8009052C 00097080 */ sll $t6, $t1, 2 +/* 091130 80090530 014EC821 */ addu $t9, $t2, $t6 +/* 091134 80090534 001878C0 */ sll $t7, $t8, 3 +/* 091138 80090538 8F380000 */ lw $t8, ($t9) +/* 09113C 8009053C 01F81821 */ addu $v1, $t7, $t8 +/* 091140 80090540 846E0000 */ lh $t6, ($v1) +/* 091144 80090544 448E2000 */ mtc1 $t6, $f4 +/* 091148 80090548 00000000 */ nop +/* 09114C 8009054C 468021A0 */ cvt.s.w $f6, $f4 +/* 091150 80090550 E4E60000 */ swc1 $f6, ($a3) +/* 091154 80090554 84790002 */ lh $t9, 2($v1) +/* 091158 80090558 44994000 */ mtc1 $t9, $f8 +/* 09115C 8009055C 00000000 */ nop +/* 091160 80090560 468042A0 */ cvt.s.w $f10, $f8 +/* 091164 80090564 E4EA0004 */ swc1 $f10, 4($a3) +/* 091168 80090568 846F0004 */ lh $t7, 4($v1) +/* 09116C 8009056C 448F8000 */ mtc1 $t7, $f16 +/* 091170 80090570 00000000 */ nop +/* 091174 80090574 468084A0 */ cvt.s.w $f18, $f16 +/* 091178 80090578 1000007D */ b .L80090770 +/* 09117C 8009057C E4F20008 */ swc1 $f18, 8($a3) +glabel L80090580 +/* 091180 80090580 00052080 */ sll $a0, $a1, 2 +/* 091184 80090584 0044C021 */ addu $t8, $v0, $a0 +/* 091188 80090588 44800000 */ mtc1 $zero, $f0 +/* 09118C 8009058C C7040000 */ lwc1 $f4, ($t8) +/* 091190 80090590 00647021 */ addu $t6, $v1, $a0 +/* 091194 80090594 E4C00004 */ swc1 $f0, 4($a2) +/* 091198 80090598 E4C40000 */ swc1 $f4, ($a2) +/* 09119C 8009059C C5C60000 */ lwc1 $f6, ($t6) +/* 0911A0 800905A0 0104C821 */ addu $t9, $t0, $a0 +/* 0911A4 800905A4 01247821 */ addu $t7, $t1, $a0 +/* 0911A8 800905A8 E4C60008 */ swc1 $f6, 8($a2) +/* 0911AC 800905AC C7280000 */ lwc1 $f8, ($t9) +/* 0911B0 800905B0 E4E00004 */ swc1 $f0, 4($a3) +/* 0911B4 800905B4 E4E80000 */ swc1 $f8, ($a3) +/* 0911B8 800905B8 C5EA0000 */ lwc1 $f10, ($t7) +/* 0911BC 800905BC 1000006C */ b .L80090770 +/* 0911C0 800905C0 E4EA0008 */ swc1 $f10, 8($a3) +glabel L800905C4 +/* 0911C4 800905C4 00052080 */ sll $a0, $a1, 2 +/* 0911C8 800905C8 3C0143F0 */ li $at, 0x43F00000 # 480.000000 +/* 0911CC 800905CC 0144C021 */ addu $t8, $t2, $a0 +/* 0911D0 800905D0 44810000 */ mtc1 $at, $f0 +/* 0911D4 800905D4 C7100000 */ lwc1 $f16, ($t8) +/* 0911D8 800905D8 01647021 */ addu $t6, $t3, $a0 +/* 0911DC 800905DC E4C00004 */ swc1 $f0, 4($a2) +/* 0911E0 800905E0 E4D00000 */ swc1 $f16, ($a2) +/* 0911E4 800905E4 C5D20000 */ lwc1 $f18, ($t6) +/* 0911E8 800905E8 0184C821 */ addu $t9, $t4, $a0 +/* 0911EC 800905EC 01A47821 */ addu $t7, $t5, $a0 +/* 0911F0 800905F0 E4D20008 */ swc1 $f18, 8($a2) +/* 0911F4 800905F4 C7240000 */ lwc1 $f4, ($t9) +/* 0911F8 800905F8 E4E00004 */ swc1 $f0, 4($a3) +/* 0911FC 800905FC E4E40000 */ swc1 $f4, ($a3) +/* 091200 80090600 C5E60000 */ lwc1 $f6, ($t7) +/* 091204 80090604 1000005A */ b .L80090770 +/* 091208 80090608 E4E60008 */ swc1 $f6, 8($a3) +glabel L8009060C +/* 09120C 8009060C 00052080 */ sll $a0, $a1, 2 +/* 091210 80090610 03A4C021 */ addu $t8, $sp, $a0 +/* 091214 80090614 44800000 */ mtc1 $zero, $f0 +/* 091218 80090618 C7080078 */ lwc1 $f8, 0x78($t8) +/* 09121C 8009061C 03A47021 */ addu $t6, $sp, $a0 +/* 091220 80090620 E4C00004 */ swc1 $f0, 4($a2) +/* 091224 80090624 E4C80000 */ swc1 $f8, ($a2) +/* 091228 80090628 C5CA0068 */ lwc1 $f10, 0x68($t6) +/* 09122C 8009062C 03A4C821 */ addu $t9, $sp, $a0 +/* 091230 80090630 03A47821 */ addu $t7, $sp, $a0 +/* 091234 80090634 E4CA0008 */ swc1 $f10, 8($a2) +/* 091238 80090638 C7300058 */ lwc1 $f16, 0x58($t9) +/* 09123C 8009063C E4E00004 */ swc1 $f0, 4($a3) +/* 091240 80090640 E4F00000 */ swc1 $f16, ($a3) +/* 091244 80090644 C5F20048 */ lwc1 $f18, 0x48($t7) +/* 091248 80090648 10000049 */ b .L80090770 +/* 09124C 8009064C E4F20008 */ swc1 $f18, 8($a3) +glabel L80090650 +/* 091250 80090650 00052080 */ sll $a0, $a1, 2 +/* 091254 80090654 3C014348 */ li $at, 0x43480000 # 200.000000 +/* 091258 80090658 03A4C021 */ addu $t8, $sp, $a0 +/* 09125C 8009065C 44810000 */ mtc1 $at, $f0 +/* 091260 80090660 C7040038 */ lwc1 $f4, 0x38($t8) +/* 091264 80090664 03A47021 */ addu $t6, $sp, $a0 +/* 091268 80090668 E4C00004 */ swc1 $f0, 4($a2) +/* 09126C 8009066C E4C40000 */ swc1 $f4, ($a2) +/* 091270 80090670 C5C60028 */ lwc1 $f6, 0x28($t6) +/* 091274 80090674 03A4C821 */ addu $t9, $sp, $a0 +/* 091278 80090678 03A47821 */ addu $t7, $sp, $a0 +/* 09127C 8009067C E4C60008 */ swc1 $f6, 8($a2) +/* 091280 80090680 C7280018 */ lwc1 $f8, 0x18($t9) +/* 091284 80090684 E4E00004 */ swc1 $f0, 4($a3) +/* 091288 80090688 E4E80000 */ swc1 $f8, ($a3) +/* 09128C 8009068C C5EA0008 */ lwc1 $f10, 8($t7) +/* 091290 80090690 10000037 */ b .L80090770 +/* 091294 80090694 E4EA0008 */ swc1 $f10, 8($a3) +.L80090698: +glabel L80090698 +/* 091298 80090698 3C0A8016 */ lui $t2, %hi(D_80164550) # $t2, 0x8016 +/* 09129C 8009069C 94820220 */ lhu $v0, 0x220($a0) +/* 0912A0 800906A0 254A4550 */ addiu $t2, %lo(D_80164550) # addiu $t2, $t2, 0x4550 +/* 0912A4 800906A4 8D580000 */ lw $t8, ($t2) +/* 0912A8 800906A8 000270C0 */ sll $t6, $v0, 3 +/* 0912AC 800906AC 030E1821 */ addu $v1, $t8, $t6 +/* 0912B0 800906B0 84790000 */ lh $t9, ($v1) +/* 0912B4 800906B4 44998000 */ mtc1 $t9, $f16 +/* 0912B8 800906B8 00000000 */ nop +/* 0912BC 800906BC 468084A0 */ cvt.s.w $f18, $f16 +/* 0912C0 800906C0 E4D20000 */ swc1 $f18, ($a2) +/* 0912C4 800906C4 846F0002 */ lh $t7, 2($v1) +/* 0912C8 800906C8 448F2000 */ mtc1 $t7, $f4 +/* 0912CC 800906CC 3C0F8016 */ lui $t7, %hi(D_801645C8) # $t7, 0x8016 +/* 0912D0 800906D0 468021A0 */ cvt.s.w $f6, $f4 +/* 0912D4 800906D4 E4C60004 */ swc1 $f6, 4($a2) +/* 0912D8 800906D8 84780004 */ lh $t8, 4($v1) +/* 0912DC 800906DC 44984000 */ mtc1 $t8, $f8 +/* 0912E0 800906E0 00000000 */ nop +/* 0912E4 800906E4 468042A0 */ cvt.s.w $f10, $f8 +/* 0912E8 800906E8 E4CA0008 */ swc1 $f10, 8($a2) +/* 0912EC 800906EC 848E0220 */ lh $t6, 0x220($a0) +/* 0912F0 800906F0 95EF45C8 */ lhu $t7, %lo(D_801645C8)($t7) +/* 0912F4 800906F4 25D90005 */ addiu $t9, $t6, 5 +/* 0912F8 800906F8 25F80001 */ addiu $t8, $t7, 1 +/* 0912FC 800906FC 0338001A */ div $zero, $t9, $t8 +/* 091300 80090700 17000002 */ bnez $t8, .L8009070C +/* 091304 80090704 00000000 */ nop +/* 091308 80090708 0007000D */ break 7 +.L8009070C: +/* 09130C 8009070C 2401FFFF */ li $at, -1 +/* 091310 80090710 17010004 */ bne $t8, $at, .L80090724 +/* 091314 80090714 3C018000 */ lui $at, 0x8000 +/* 091318 80090718 17210002 */ bne $t9, $at, .L80090724 +/* 09131C 8009071C 00000000 */ nop +/* 091320 80090720 0006000D */ break 6 +.L80090724: +/* 091324 80090724 8D590000 */ lw $t9, ($t2) +/* 091328 80090728 00007010 */ mfhi $t6 +/* 09132C 8009072C 000E78C0 */ sll $t7, $t6, 3 +/* 091330 80090730 01F91821 */ addu $v1, $t7, $t9 +/* 091334 80090734 84780000 */ lh $t8, ($v1) +/* 091338 80090738 44988000 */ mtc1 $t8, $f16 +/* 09133C 8009073C 00000000 */ nop +/* 091340 80090740 468084A0 */ cvt.s.w $f18, $f16 +/* 091344 80090744 E4F20000 */ swc1 $f18, ($a3) +/* 091348 80090748 846E0002 */ lh $t6, 2($v1) +/* 09134C 8009074C 448E2000 */ mtc1 $t6, $f4 +/* 091350 80090750 00000000 */ nop +/* 091354 80090754 468021A0 */ cvt.s.w $f6, $f4 +/* 091358 80090758 E4E60004 */ swc1 $f6, 4($a3) +/* 09135C 8009075C 846F0004 */ lh $t7, 4($v1) +/* 091360 80090760 448F4000 */ mtc1 $t7, $f8 +/* 091364 80090764 00000000 */ nop +/* 091368 80090768 468042A0 */ cvt.s.w $f10, $f8 +/* 09136C 8009076C E4EA0008 */ swc1 $f10, 8($a3) +.L80090770: +/* 091370 80090770 03E00008 */ jr $ra +/* 091374 80090774 27BD0110 */ addiu $sp, $sp, 0x110 diff --git a/asm/non_matchings/code_8008C1D0/func_80090778.s b/asm/non_matchings/code_8008C1D0/func_80090778.s new file mode 100644 index 000000000..71ad3a57e --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_80090778.s @@ -0,0 +1,63 @@ +glabel func_80090778 +/* 091378 80090778 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 09137C 8009077C AFBF001C */ sw $ra, 0x1c($sp) +/* 091380 80090780 AFB00018 */ sw $s0, 0x18($sp) +/* 091384 80090784 0C009F40 */ jal func_80027D00 +/* 091388 80090788 00808025 */ move $s0, $a0 +/* 09138C 8009078C AFA2002C */ sw $v0, 0x2c($sp) +/* 091390 80090790 860E00CA */ lh $t6, 0xca($s0) +/* 091394 80090794 8E1800BC */ lw $t8, 0xbc($s0) +/* 091398 80090798 44802000 */ mtc1 $zero, $f4 +/* 09139C 8009079C 2401FFEF */ li $at, -17 +/* 0913A0 800907A0 00022E00 */ sll $a1, $v0, 0x18 +/* 0913A4 800907A4 00054603 */ sra $t0, $a1, 0x18 +/* 0913A8 800907A8 35CF0008 */ ori $t7, $t6, 8 +/* 0913AC 800907AC 0301C824 */ and $t9, $t8, $at +/* 0913B0 800907B0 A6000078 */ sh $zero, 0x78($s0) +/* 0913B4 800907B4 AE00007C */ sw $zero, 0x7c($s0) +/* 0913B8 800907B8 A60000C0 */ sh $zero, 0xc0($s0) +/* 0913BC 800907BC A60F00CA */ sh $t7, 0xca($s0) +/* 0913C0 800907C0 AE1900BC */ sw $t9, 0xbc($s0) +/* 0913C4 800907C4 A6000222 */ sh $zero, 0x222($s0) +/* 0913C8 800907C8 01002825 */ move $a1, $t0 +/* 0913CC 800907CC 02002025 */ move $a0, $s0 +/* 0913D0 800907D0 0C0230D5 */ jal func_8008C354 +/* 0913D4 800907D4 E604008C */ swc1 $f4, 0x8c($s0) +/* 0913D8 800907D8 83A5002F */ lb $a1, 0x2f($sp) +/* 0913DC 800907DC 02002025 */ move $a0, $s0 +/* 0913E0 800907E0 0C023E1B */ jal func_8008F86C +/* 0913E4 800907E4 AFA50024 */ sw $a1, 0x24($sp) +/* 0913E8 800907E8 8E0200BC */ lw $v0, 0xbc($s0) +/* 0913EC 800907EC 44803000 */ mtc1 $zero, $f6 +/* 0913F0 800907F0 3C034000 */ lui $v1, 0x4000 +/* 0913F4 800907F4 8FA50024 */ lw $a1, 0x24($sp) +/* 0913F8 800907F8 00434824 */ and $t1, $v0, $v1 +/* 0913FC 800907FC A6000DB4 */ sh $zero, 0xdb4($s0) +/* 091400 80090800 A60000C2 */ sh $zero, 0xc2($s0) +/* 091404 80090804 14690010 */ bne $v1, $t1, .L80090848 +/* 091408 80090808 E6060DBC */ swc1 $f6, 0xdbc($s0) +/* 09140C 8009080C 3C030002 */ lui $v1, 2 +/* 091410 80090810 00435024 */ and $t2, $v0, $v1 +/* 091414 80090814 146A0009 */ bne $v1, $t2, .L8009083C +/* 091418 80090818 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd +/* 09141C 8009081C 860C00AE */ lh $t4, 0xae($s0) +/* 091420 80090820 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 091424 80090824 00415824 */ and $t3, $v0, $at +/* 091428 80090828 AE0B00BC */ sw $t3, 0xbc($s0) +/* 09142C 8009082C A60000A8 */ sh $zero, 0xa8($s0) +/* 091430 80090830 AE00007C */ sw $zero, 0x7c($s0) +/* 091434 80090834 A60000C0 */ sh $zero, 0xc0($s0) +/* 091438 80090838 A60C002E */ sh $t4, 0x2e($s0) +.L8009083C: +/* 09143C 8009083C 0C0238F0 */ jal func_8008E3C0 +/* 091440 80090840 02002025 */ move $a0, $s0 +/* 091444 80090844 8E0200BC */ lw $v0, 0xbc($s0) +.L80090848: +/* 091448 80090848 2401FFDF */ li $at, -33 +/* 09144C 8009084C 00416824 */ and $t5, $v0, $at +/* 091450 80090850 AE0D00BC */ sw $t5, 0xbc($s0) +/* 091454 80090854 8FBF001C */ lw $ra, 0x1c($sp) +/* 091458 80090858 8FB00018 */ lw $s0, 0x18($sp) +/* 09145C 8009085C 27BD0030 */ addiu $sp, $sp, 0x30 +/* 091460 80090860 03E00008 */ jr $ra +/* 091464 80090864 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80090868.s b/asm/non_matchings/code_8008C1D0/func_80090868.s new file mode 100644 index 000000000..ef430e4e8 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_80090868.s @@ -0,0 +1,73 @@ +glabel func_80090868 +/* 091468 80090868 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 09146C 8009086C AFBF0014 */ sw $ra, 0x14($sp) +/* 091470 80090870 44802000 */ mtc1 $zero, $f4 +/* 091474 80090874 A4800078 */ sh $zero, 0x78($a0) +/* 091478 80090878 AC80007C */ sw $zero, 0x7c($a0) +/* 09147C 8009087C A48000C0 */ sh $zero, 0xc0($a0) +/* 091480 80090880 E484008C */ swc1 $f4, 0x8c($a0) +/* 091484 80090884 0C009F40 */ jal func_80027D00 +/* 091488 80090888 AFA40018 */ sw $a0, 0x18($sp) +/* 09148C 8009088C 8FA40018 */ lw $a0, 0x18($sp) +/* 091490 80090890 00022E00 */ sll $a1, $v0, 0x18 +/* 091494 80090894 24010002 */ li $at, 2 +/* 091498 80090898 848E00CA */ lh $t6, 0xca($a0) +/* 09149C 8009089C 0005CE03 */ sra $t9, $a1, 0x18 +/* 0914A0 800908A0 24180001 */ li $t8, 1 +/* 0914A4 800908A4 31CF0002 */ andi $t7, $t6, 2 +/* 0914A8 800908A8 11E1002D */ beq $t7, $at, .L80090960 +/* 0914AC 800908AC 03202825 */ move $a1, $t9 +/* 0914B0 800908B0 3C013F00 */ li $at, 0x3F000000 # 0.500000 +/* 0914B4 800908B4 44803000 */ mtc1 $zero, $f6 +/* 0914B8 800908B8 44814000 */ mtc1 $at, $f8 +/* 0914BC 800908BC A4980D98 */ sh $t8, 0xd98($a0) +/* 0914C0 800908C0 E4860D9C */ swc1 $f6, 0xd9c($a0) +/* 0914C4 800908C4 E4880DA0 */ swc1 $f8, 0xda0($a0) +/* 0914C8 800908C8 0C023FC2 */ jal func_8008FF08 +/* 0914CC 800908CC AFA40018 */ sw $a0, 0x18($sp) +/* 0914D0 800908D0 8FA40018 */ lw $a0, 0x18($sp) +/* 0914D4 800908D4 24010001 */ li $at, 1 +/* 0914D8 800908D8 3C03800E */ lui $v1, %hi(gCurrentCourseId) # $v1, 0x800e +/* 0914DC 800908DC 848800CA */ lh $t0, 0xca($a0) +/* 0914E0 800908E0 948A00DE */ lhu $t2, 0xde($a0) +/* 0914E4 800908E4 A4800222 */ sh $zero, 0x222($a0) +/* 0914E8 800908E8 35090002 */ ori $t1, $t0, 2 +/* 0914EC 800908EC 314B0001 */ andi $t3, $t2, 1 +/* 0914F0 800908F0 A48900CA */ sh $t1, 0xca($a0) +/* 0914F4 800908F4 1561001A */ bne $t3, $at, .L80090960 +/* 0914F8 800908F8 A48000C8 */ sh $zero, 0xc8($a0) +/* 0914FC 800908FC 2463C5A0 */ addiu $v1, %lo(gCurrentCourseId) # addiu $v1, $v1, -0x3a60 +/* 091500 80090900 84620000 */ lh $v0, ($v1) +/* 091504 80090904 24010002 */ li $at, 2 +/* 091508 80090908 10410003 */ beq $v0, $at, .L80090918 +/* 09150C 8009090C 24010013 */ li $at, 19 +/* 091510 80090910 54410006 */ bnel $v0, $at, .L8009092C +/* 091514 80090914 848E00CA */ lh $t6, 0xca($a0) +.L80090918: +/* 091518 80090918 848C00CA */ lh $t4, 0xca($a0) +/* 09151C 8009091C 358D1000 */ ori $t5, $t4, 0x1000 +/* 091520 80090920 10000004 */ b .L80090934 +/* 091524 80090924 A48D00CA */ sh $t5, 0xca($a0) +/* 091528 80090928 848E00CA */ lh $t6, 0xca($a0) +.L8009092C: +/* 09152C 8009092C 35CF2000 */ ori $t7, $t6, 0x2000 +/* 091530 80090930 A48F00CA */ sh $t7, 0xca($a0) +.L80090934: +/* 091534 80090934 84620000 */ lh $v0, ($v1) +/* 091538 80090938 2401000C */ li $at, 12 +/* 09153C 8009093C 10410005 */ beq $v0, $at, .L80090954 +/* 091540 80090940 24010010 */ li $at, 16 +/* 091544 80090944 10410003 */ beq $v0, $at, .L80090954 +/* 091548 80090948 2401000D */ li $at, 13 +/* 09154C 8009094C 54410005 */ bnel $v0, $at, .L80090964 +/* 091550 80090950 8FBF0014 */ lw $ra, 0x14($sp) +.L80090954: +/* 091554 80090954 849800CA */ lh $t8, 0xca($a0) +/* 091558 80090958 3319CFFF */ andi $t9, $t8, 0xcfff +/* 09155C 8009095C A49900CA */ sh $t9, 0xca($a0) +.L80090960: +/* 091560 80090960 8FBF0014 */ lw $ra, 0x14($sp) +.L80090964: +/* 091564 80090964 27BD0018 */ addiu $sp, $sp, 0x18 +/* 091568 80090968 03E00008 */ jr $ra +/* 09156C 8009096C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80090970.s b/asm/non_matchings/code_8008C1D0/func_80090970.s new file mode 100644 index 000000000..7d3cab17d --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_80090970.s @@ -0,0 +1,504 @@ +glabel func_80090970 +/* 091570 80090970 27BDFFA8 */ addiu $sp, $sp, -0x58 +/* 091574 80090974 AFBF001C */ sw $ra, 0x1c($sp) +/* 091578 80090978 AFB00018 */ sw $s0, 0x18($sp) +/* 09157C 8009097C AFA5005C */ sw $a1, 0x5c($sp) +/* 091580 80090980 AFA60060 */ sw $a2, 0x60($sp) +/* 091584 80090984 44802000 */ mtc1 $zero, $f4 +/* 091588 80090988 240E000C */ li $t6, 12 +/* 09158C 8009098C A48E00C2 */ sh $t6, 0xc2($a0) +/* 091590 80090990 A4800078 */ sh $zero, 0x78($a0) +/* 091594 80090994 AC80007C */ sw $zero, 0x7c($a0) +/* 091598 80090998 A48000C0 */ sh $zero, 0xc0($a0) +/* 09159C 8009099C E484008C */ swc1 $f4, 0x8c($a0) +/* 0915A0 800909A0 00808025 */ move $s0, $a0 +/* 0915A4 800909A4 0C0230D5 */ jal func_8008C354 +/* 0915A8 800909A8 83A5005F */ lb $a1, 0x5f($sp) +/* 0915AC 800909AC 960F0222 */ lhu $t7, 0x222($s0) +/* 0915B0 800909B0 2DE10005 */ sltiu $at, $t7, 5 +/* 0915B4 800909B4 1020018C */ beqz $at, .L80090FE8 +/* 0915B8 800909B8 000F7880 */ sll $t7, $t7, 2 +/* 0915BC 800909BC 3C01800F */ lui $at, %hi(jpt_800EF638) # 0x800f +/* 0915C0 800909C0 002F0821 */ addu $at, $at, $t7 +/* 0915C4 800909C4 8C2FF638 */ lw $t7, %lo(jpt_800EF638)($at) # -0x9c8($at) +/* 0915C8 800909C8 01E00008 */ jr $t7 +/* 0915CC 800909CC 00000000 */ nop +glabel L800909D0 +/* 0915D0 800909D0 860300CA */ lh $v1, 0xca($s0) +/* 0915D4 800909D4 24010001 */ li $at, 1 +/* 0915D8 800909D8 30780001 */ andi $t8, $v1, 1 +/* 0915DC 800909DC 1701003A */ bne $t8, $at, .L80090AC8 +/* 0915E0 800909E0 306B0002 */ andi $t3, $v1, 2 +/* 0915E4 800909E4 860200C8 */ lh $v0, 0xc8($s0) +/* 0915E8 800909E8 30790002 */ andi $t9, $v1, 2 +/* 0915EC 800909EC 2841003C */ slti $at, $v0, 0x3c +/* 0915F0 800909F0 14200004 */ bnez $at, .L80090A04 +/* 0915F4 800909F4 24480001 */ addiu $t0, $v0, 1 +/* 0915F8 800909F8 24010002 */ li $at, 2 +/* 0915FC 800909FC 13210009 */ beq $t9, $at, .L80090A24 +/* 091600 80090A00 83AB005F */ lb $t3, 0x5f($sp) +.L80090A04: +/* 091604 80090A04 A60800C8 */ sh $t0, 0xc8($s0) +/* 091608 80090A08 860900C8 */ lh $t1, 0xc8($s0) +/* 09160C 80090A0C 240A003C */ li $t2, 60 +/* 091610 80090A10 2921003C */ slti $at, $t1, 0x3c +/* 091614 80090A14 54200051 */ bnel $at, $zero, .L80090B5C +/* 091618 80090A18 8E0800BC */ lw $t0, 0xbc($s0) +/* 09161C 80090A1C 1000004E */ b .L80090B58 +/* 091620 80090A20 A60A00C8 */ sh $t2, 0xc8($s0) +.L80090A24: +/* 091624 80090A24 3C0D8016 */ lui $t5, %hi(D_801652A0) # $t5, 0x8016 +/* 091628 80090A28 25AD52A0 */ addiu $t5, %lo(D_801652A0) # addiu $t5, $t5, 0x52a0 +/* 09162C 80090A2C 000B6080 */ sll $t4, $t3, 2 +/* 091630 80090A30 018D1021 */ addu $v0, $t4, $t5 +/* 091634 80090A34 3C0142C8 */ li $at, 0x42C80000 # 100.000000 +/* 091638 80090A38 44814000 */ mtc1 $at, $f8 +/* 09163C 80090A3C C4460000 */ lwc1 $f6, ($v0) +/* 091640 80090A40 3C063C44 */ lui $a2, (0x3C449BA6 >> 16) # lui $a2, 0x3c44 +/* 091644 80090A44 34C69BA6 */ ori $a2, (0x3C449BA6 & 0xFFFF) # ori $a2, $a2, 0x9ba6 +/* 091648 80090A48 46083280 */ add.s $f10, $f6, $f8 +/* 09164C 80090A4C AFA20028 */ sw $v0, 0x28($sp) +/* 091650 80090A50 26040018 */ addiu $a0, $s0, 0x18 +/* 091654 80090A54 44055000 */ mfc1 $a1, $f10 +/* 091658 80090A58 0C008973 */ jal func_800225CC +/* 09165C 80090A5C 00000000 */ nop +/* 091660 80090A60 83AE0063 */ lb $t6, 0x63($sp) +/* 091664 80090A64 3C063E4C */ lui $a2, (0x3E4CCCCD >> 16) # lui $a2, 0x3e4c +/* 091668 80090A68 34C6CCCD */ ori $a2, (0x3E4CCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 09166C 80090A6C 000E7840 */ sll $t7, $t6, 1 +/* 091670 80090A70 020F2021 */ addu $a0, $s0, $t7 +/* 091674 80090A74 248400CC */ addiu $a0, $a0, 0xcc +/* 091678 80090A78 0C00898D */ jal func_80022634 +/* 09167C 80090A7C 00002825 */ move $a1, $zero +/* 091680 80090A80 8FB80028 */ lw $t8, 0x28($sp) +/* 091684 80090A84 3C014220 */ li $at, 0x42200000 # 40.000000 +/* 091688 80090A88 44812000 */ mtc1 $at, $f4 +/* 09168C 80090A8C C7120000 */ lwc1 $f18, ($t8) +/* 091690 80090A90 C6100018 */ lwc1 $f16, 0x18($s0) +/* 091694 80090A94 24190001 */ li $t9, 1 +/* 091698 80090A98 46049180 */ add.s $f6, $f18, $f4 +/* 09169C 80090A9C 240A00FF */ li $t2, 255 +/* 0916A0 80090AA0 4610303E */ c.le.s $f6, $f16 +/* 0916A4 80090AA4 00000000 */ nop +/* 0916A8 80090AA8 4502002C */ bc1fl .L80090B5C +/* 0916AC 80090AAC 8E0800BC */ lw $t0, 0xbc($s0) +/* 0916B0 80090AB0 860800CA */ lh $t0, 0xca($s0) +/* 0916B4 80090AB4 A6190222 */ sh $t9, 0x222($s0) +/* 0916B8 80090AB8 A60A00C6 */ sh $t2, 0xc6($s0) +/* 0916BC 80090ABC 35090004 */ ori $t1, $t0, 4 +/* 0916C0 80090AC0 10000025 */ b .L80090B58 +/* 0916C4 80090AC4 A60900CA */ sh $t1, 0xca($s0) +.L80090AC8: +/* 0916C8 80090AC8 24010002 */ li $at, 2 +/* 0916CC 80090ACC 15610022 */ bne $t3, $at, .L80090B58 +/* 0916D0 80090AD0 3C0142C8 */ li $at, 0x42C80000 # 100.000000 +/* 0916D4 80090AD4 44815000 */ mtc1 $at, $f10 +/* 0916D8 80090AD8 C6080074 */ lwc1 $f8, 0x74($s0) +/* 0916DC 80090ADC 3C063CCC */ lui $a2, (0x3CCCCCCD >> 16) # lui $a2, 0x3ccc +/* 0916E0 80090AE0 34C6CCCD */ ori $a2, (0x3CCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 0916E4 80090AE4 460A4480 */ add.s $f18, $f8, $f10 +/* 0916E8 80090AE8 26040018 */ addiu $a0, $s0, 0x18 +/* 0916EC 80090AEC 44059000 */ mfc1 $a1, $f18 +/* 0916F0 80090AF0 0C008973 */ jal func_800225CC +/* 0916F4 80090AF4 00000000 */ nop +/* 0916F8 80090AF8 83AC0063 */ lb $t4, 0x63($sp) +/* 0916FC 80090AFC 3C063E4C */ lui $a2, (0x3E4CCCCD >> 16) # lui $a2, 0x3e4c +/* 091700 80090B00 34C6CCCD */ ori $a2, (0x3E4CCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd +/* 091704 80090B04 000C6840 */ sll $t5, $t4, 1 +/* 091708 80090B08 020D2021 */ addu $a0, $s0, $t5 +/* 09170C 80090B0C 248400CC */ addiu $a0, $a0, 0xcc +/* 091710 80090B10 0C00898D */ jal func_80022634 +/* 091714 80090B14 00002825 */ move $a1, $zero +/* 091718 80090B18 3C014220 */ li $at, 0x42200000 # 40.000000 +/* 09171C 80090B1C 44813000 */ mtc1 $at, $f6 +/* 091720 80090B20 C6100074 */ lwc1 $f16, 0x74($s0) +/* 091724 80090B24 C6040018 */ lwc1 $f4, 0x18($s0) +/* 091728 80090B28 240E0001 */ li $t6, 1 +/* 09172C 80090B2C 46068200 */ add.s $f8, $f16, $f6 +/* 091730 80090B30 241900FF */ li $t9, 255 +/* 091734 80090B34 4604403E */ c.le.s $f8, $f4 +/* 091738 80090B38 00000000 */ nop +/* 09173C 80090B3C 45020007 */ bc1fl .L80090B5C +/* 091740 80090B40 8E0800BC */ lw $t0, 0xbc($s0) +/* 091744 80090B44 860F00CA */ lh $t7, 0xca($s0) +/* 091748 80090B48 A60E0222 */ sh $t6, 0x222($s0) +/* 09174C 80090B4C A61900C6 */ sh $t9, 0xc6($s0) +/* 091750 80090B50 35F80004 */ ori $t8, $t7, 4 +/* 091754 80090B54 A61800CA */ sh $t8, 0xca($s0) +.L80090B58: +/* 091758 80090B58 8E0800BC */ lw $t0, 0xbc($s0) +.L80090B5C: +/* 09175C 80090B5C 3C028000 */ lui $v0, %hi(D_80004334) # 0x8000 +/* 091760 80090B60 02002025 */ move $a0, $s0 +/* 091764 80090B64 01024824 */ and $t1, $t0, $v0 +/* 091768 80090B68 54490120 */ bnel $v0, $t1, .L80090FEC +/* 09176C 80090B6C 3C014334 */ lui $at, %lo(D_80004334) # 0x4334 +/* 091770 80090B70 0C023ECC */ jal func_8008FB30 +/* 091774 80090B74 83A5005F */ lb $a1, 0x5f($sp) +/* 091778 80090B78 1000011C */ b .L80090FEC +/* 09177C 80090B7C 3C014334 */ lui $at, 0x4334 +glabel L80090B80 +/* 091780 80090B80 96020000 */ lhu $v0, ($s0) +/* 091784 80090B84 24014000 */ li $at, 16384 +/* 091788 80090B88 304A4000 */ andi $t2, $v0, 0x4000 +/* 09178C 80090B8C 15410005 */ bne $t2, $at, .L80090BA4 +/* 091790 80090B90 304B1000 */ andi $t3, $v0, 0x1000 +/* 091794 80090B94 15600003 */ bnez $t3, .L80090BA4 +/* 091798 80090B98 83A4005F */ lb $a0, 0x5f($sp) +/* 09179C 80090B9C 0C027822 */ jal func_8009E088 +/* 0917A0 80090BA0 2405000A */ li $a1, 10 +.L80090BA4: +/* 0917A4 80090BA4 860C00CA */ lh $t4, 0xca($s0) +/* 0917A8 80090BA8 83AE005F */ lb $t6, 0x5f($sp) +/* 0917AC 80090BAC 24010001 */ li $at, 1 +/* 0917B0 80090BB0 318D0001 */ andi $t5, $t4, 1 +/* 0917B4 80090BB4 15A1001B */ bne $t5, $at, .L80090C24 +/* 0917B8 80090BB8 000E7880 */ sll $t7, $t6, 2 +/* 0917BC 80090BBC 3C018016 */ lui $at, %hi(D_801652A0) +/* 0917C0 80090BC0 002F0821 */ addu $at, $at, $t7 +/* 0917C4 80090BC4 C42A52A0 */ lwc1 $f10, %lo(D_801652A0)($at) +/* 0917C8 80090BC8 3C014220 */ li $at, 0x42200000 # 40.000000 +/* 0917CC 80090BCC 44819000 */ mtc1 $at, $f18 +/* 0917D0 80090BD0 3C063CA3 */ lui $a2, (0x3CA3D70A >> 16) # lui $a2, 0x3ca3 +/* 0917D4 80090BD4 34C6D70A */ ori $a2, (0x3CA3D70A & 0xFFFF) # ori $a2, $a2, 0xd70a +/* 0917D8 80090BD8 46125400 */ add.s $f16, $f10, $f18 +/* 0917DC 80090BDC 26040018 */ addiu $a0, $s0, 0x18 +/* 0917E0 80090BE0 44058000 */ mfc1 $a1, $f16 +/* 0917E4 80090BE4 0C008973 */ jal func_800225CC +/* 0917E8 80090BE8 00000000 */ nop +/* 0917EC 80090BEC 861800C6 */ lh $t8, 0xc6($s0) +/* 0917F0 80090BF0 24090002 */ li $t1, 2 +/* 0917F4 80090BF4 2719FFF8 */ addiu $t9, $t8, -8 +/* 0917F8 80090BF8 A61900C6 */ sh $t9, 0xc6($s0) +/* 0917FC 80090BFC 860800C6 */ lh $t0, 0xc6($s0) +/* 091800 80090C00 29010009 */ slti $at, $t0, 9 +/* 091804 80090C04 5020001C */ beql $at, $zero, .L80090C78 +/* 091808 80090C08 861800CA */ lh $t8, 0xca($s0) +/* 09180C 80090C0C 860A00CA */ lh $t2, 0xca($s0) +/* 091810 80090C10 A60000C6 */ sh $zero, 0xc6($s0) +/* 091814 80090C14 A6090222 */ sh $t1, 0x222($s0) +/* 091818 80090C18 314BFFFE */ andi $t3, $t2, 0xfffe +/* 09181C 80090C1C 10000015 */ b .L80090C74 +/* 091820 80090C20 A60B00CA */ sh $t3, 0xca($s0) +.L80090C24: +/* 091824 80090C24 3C014220 */ li $at, 0x42200000 # 40.000000 +/* 091828 80090C28 44812000 */ mtc1 $at, $f4 +/* 09182C 80090C2C C6060024 */ lwc1 $f6, 0x24($s0) +/* 091830 80090C30 3C063CA3 */ lui $a2, (0x3CA3D70A >> 16) # lui $a2, 0x3ca3 +/* 091834 80090C34 34C6D70A */ ori $a2, (0x3CA3D70A & 0xFFFF) # ori $a2, $a2, 0xd70a +/* 091838 80090C38 46043200 */ add.s $f8, $f6, $f4 +/* 09183C 80090C3C 26040018 */ addiu $a0, $s0, 0x18 +/* 091840 80090C40 44054000 */ mfc1 $a1, $f8 +/* 091844 80090C44 0C008973 */ jal func_800225CC +/* 091848 80090C48 00000000 */ nop +/* 09184C 80090C4C 860C00C6 */ lh $t4, 0xc6($s0) +/* 091850 80090C50 240F0002 */ li $t7, 2 +/* 091854 80090C54 258DFFF8 */ addiu $t5, $t4, -8 +/* 091858 80090C58 A60D00C6 */ sh $t5, 0xc6($s0) +/* 09185C 80090C5C 860E00C6 */ lh $t6, 0xc6($s0) +/* 091860 80090C60 29C10009 */ slti $at, $t6, 9 +/* 091864 80090C64 50200004 */ beql $at, $zero, .L80090C78 +/* 091868 80090C68 861800CA */ lh $t8, 0xca($s0) +/* 09186C 80090C6C A60000C6 */ sh $zero, 0xc6($s0) +/* 091870 80090C70 A60F0222 */ sh $t7, 0x222($s0) +.L80090C74: +/* 091874 80090C74 861800CA */ lh $t8, 0xca($s0) +.L80090C78: +/* 091878 80090C78 3319DFFF */ andi $t9, $t8, 0xdfff +/* 09187C 80090C7C 100000DA */ b .L80090FE8 +/* 091880 80090C80 A61900CA */ sh $t9, 0xca($s0) +glabel L80090C84 +/* 091884 80090C84 02002025 */ move $a0, $s0 +/* 091888 80090C88 83A5005F */ lb $a1, 0x5f($sp) +/* 09188C 80090C8C 27A60044 */ addiu $a2, $sp, 0x44 +/* 091890 80090C90 0C02405E */ jal func_80090178 +/* 091894 80090C94 27A70038 */ addiu $a3, $sp, 0x38 +/* 091898 80090C98 27A40044 */ addiu $a0, $sp, 0x44 +/* 09189C 80090C9C 0C0AD489 */ jal func_802B5224 +/* 0918A0 80090CA0 27A50038 */ addiu $a1, $sp, 0x38 +/* 0918A4 80090CA4 00025023 */ negu $t2, $v0 +/* 0918A8 80090CA8 A60A002E */ sh $t2, 0x2e($s0) +/* 0918AC 80090CAC C7AA0044 */ lwc1 $f10, 0x44($sp) +/* 0918B0 80090CB0 3C014220 */ li $at, 0x42200000 # 40.000000 +/* 0918B4 80090CB4 44818000 */ mtc1 $at, $f16 +/* 0918B8 80090CB8 E60A0014 */ swc1 $f10, 0x14($s0) +/* 0918BC 80090CBC C7B20048 */ lwc1 $f18, 0x48($sp) +/* 0918C0 80090CC0 240B0003 */ li $t3, 3 +/* 0918C4 80090CC4 46109180 */ add.s $f6, $f18, $f16 +/* 0918C8 80090CC8 E6060018 */ swc1 $f6, 0x18($s0) +/* 0918CC 80090CCC C7A4004C */ lwc1 $f4, 0x4c($sp) +/* 0918D0 80090CD0 A60B0222 */ sh $t3, 0x222($s0) +/* 0918D4 80090CD4 100000C4 */ b .L80090FE8 +/* 0918D8 80090CD8 E604001C */ swc1 $f4, 0x1c($s0) +glabel L80090CDC +/* 0918DC 80090CDC 83AC005F */ lb $t4, 0x5f($sp) +/* 0918E0 80090CE0 3C018016 */ lui $at, %hi(D_80165330) # 0x8016 +/* 0918E4 80090CE4 000C6840 */ sll $t5, $t4, 1 +/* 0918E8 80090CE8 002D0821 */ addu $at, $at, $t5 +/* 0918EC 80090CEC A4205330 */ sh $zero, %lo(D_80165330)($at) # 0x5330($at) +/* 0918F0 80090CF0 96020000 */ lhu $v0, ($s0) +/* 0918F4 80090CF4 24014000 */ li $at, 16384 +/* 0918F8 80090CF8 304E4000 */ andi $t6, $v0, 0x4000 +/* 0918FC 80090CFC 15C10005 */ bne $t6, $at, .L80090D14 +/* 091900 80090D00 304F1000 */ andi $t7, $v0, 0x1000 +/* 091904 80090D04 15E00003 */ bnez $t7, .L80090D14 +/* 091908 80090D08 01802025 */ move $a0, $t4 +/* 09190C 80090D0C 0C027808 */ jal func_8009E020 +/* 091910 80090D10 24050014 */ li $a1, 20 +.L80090D14: +/* 091914 80090D14 02002025 */ move $a0, $s0 +/* 091918 80090D18 83A5005F */ lb $a1, 0x5f($sp) +/* 09191C 80090D1C 27A60044 */ addiu $a2, $sp, 0x44 +/* 091920 80090D20 0C02405E */ jal func_80090178 +/* 091924 80090D24 27A70038 */ addiu $a3, $sp, 0x38 +/* 091928 80090D28 C7A80044 */ lwc1 $f8, 0x44($sp) +/* 09192C 80090D2C 3C014220 */ li $at, 0x42200000 # 40.000000 +/* 091930 80090D30 44819000 */ mtc1 $at, $f18 +/* 091934 80090D34 E6080014 */ swc1 $f8, 0x14($s0) +/* 091938 80090D38 C7AA0048 */ lwc1 $f10, 0x48($sp) +/* 09193C 80090D3C 8619002E */ lh $t9, 0x2e($s0) +/* 091940 80090D40 46125400 */ add.s $f16, $f10, $f18 +/* 091944 80090D44 E6100018 */ swc1 $f16, 0x18($s0) +/* 091948 80090D48 C7A6004C */ lwc1 $f6, 0x4c($sp) +/* 09194C 80090D4C E606001C */ swc1 $f6, 0x1c($s0) +/* 091950 80090D50 83A2005F */ lb $v0, 0x5f($sp) +/* 091954 80090D54 0002C0C0 */ sll $t8, $v0, 3 +/* 091958 80090D58 0302C023 */ subu $t8, $t8, $v0 +/* 09195C 80090D5C 0018C0C0 */ sll $t8, $t8, 3 +/* 091960 80090D60 0302C021 */ addu $t8, $t8, $v0 +/* 091964 80090D64 0018C0C0 */ sll $t8, $t8, 3 +/* 091968 80090D68 0302C023 */ subu $t8, $t8, $v0 +/* 09196C 80090D6C 00181100 */ sll $v0, $t8, 4 +/* 091970 80090D70 00592023 */ subu $a0, $v0, $t9 +/* 091974 80090D74 3088FFFF */ andi $t0, $a0, 0xffff +/* 091978 80090D78 01002025 */ move $a0, $t0 +/* 09197C 80090D7C 0C0AE00E */ jal func_802B8038 +/* 091980 80090D80 AFA20028 */ sw $v0, 0x28($sp) +/* 091984 80090D84 3C01C0A0 */ li $at, 0xC0A00000 # -5.000000 +/* 091988 80090D88 44812000 */ mtc1 $at, $f4 +/* 09198C 80090D8C C60A001C */ lwc1 $f10, 0x1c($s0) +/* 091990 80090D90 8FA20028 */ lw $v0, 0x28($sp) +/* 091994 80090D94 46040202 */ mul.s $f8, $f0, $f4 +/* 091998 80090D98 8609002E */ lh $t1, 0x2e($s0) +/* 09199C 80090D9C 00492023 */ subu $a0, $v0, $t1 +/* 0919A0 80090DA0 308AFFFF */ andi $t2, $a0, 0xffff +/* 0919A4 80090DA4 01402025 */ move $a0, $t2 +/* 0919A8 80090DA8 460A4480 */ add.s $f18, $f8, $f10 +/* 0919AC 80090DAC 0C0AE006 */ jal func_802B8018 +/* 0919B0 80090DB0 E612001C */ swc1 $f18, 0x1c($s0) +/* 0919B4 80090DB4 3C01C0A0 */ li $at, 0xC0A00000 # -5.000000 +/* 0919B8 80090DB8 44818000 */ mtc1 $at, $f16 +/* 0919BC 80090DBC 860B00C6 */ lh $t3, 0xc6($s0) +/* 0919C0 80090DC0 C6040014 */ lwc1 $f4, 0x14($s0) +/* 0919C4 80090DC4 46100182 */ mul.s $f6, $f0, $f16 +/* 0919C8 80090DC8 256D0008 */ addiu $t5, $t3, 8 +/* 0919CC 80090DCC A60D00C6 */ sh $t5, 0xc6($s0) +/* 0919D0 80090DD0 860E00C6 */ lh $t6, 0xc6($s0) +/* 0919D4 80090DD4 240F00FF */ li $t7, 255 +/* 0919D8 80090DD8 240C0004 */ li $t4, 4 +/* 0919DC 80090DDC 29C100F0 */ slti $at, $t6, 0xf0 +/* 0919E0 80090DE0 46043200 */ add.s $f8, $f6, $f4 +/* 0919E4 80090DE4 14200080 */ bnez $at, .L80090FE8 +/* 0919E8 80090DE8 E6080014 */ swc1 $f8, 0x14($s0) +/* 0919EC 80090DEC 861800CA */ lh $t8, 0xca($s0) +/* 0919F0 80090DF0 A60F00C6 */ sh $t7, 0xc6($s0) +/* 0919F4 80090DF4 A60C0222 */ sh $t4, 0x222($s0) +/* 0919F8 80090DF8 3319FFFB */ andi $t9, $t8, 0xfffb +/* 0919FC 80090DFC A61900CA */ sh $t9, 0xca($s0) +/* 091A00 80090E00 10000079 */ b .L80090FE8 +/* 091A04 80090E04 A60000C8 */ sh $zero, 0xc8($s0) +glabel L80090E08 +/* 091A08 80090E08 860200C8 */ lh $v0, 0xc8($s0) +/* 091A0C 80090E0C 24010096 */ li $at, 150 +/* 091A10 80090E10 10410005 */ beq $v0, $at, .L80090E28 +/* 091A14 80090E14 240100C8 */ li $at, 200 +/* 091A18 80090E18 10410003 */ beq $v0, $at, .L80090E28 +/* 091A1C 80090E1C 240100FA */ li $at, 250 +/* 091A20 80090E20 54410019 */ bnel $v0, $at, .L80090E88 +/* 091A24 80090E24 240100FC */ li $at, 252 +.L80090E28: +/* 091A28 80090E28 8604002E */ lh $a0, 0x2e($s0) +/* 091A2C 80090E2C 00042023 */ negu $a0, $a0 +/* 091A30 80090E30 3088FFFF */ andi $t0, $a0, 0xffff +/* 091A34 80090E34 0C0AE00E */ jal func_802B8038 +/* 091A38 80090E38 01002025 */ move $a0, $t0 +/* 091A3C 80090E3C 3C01C120 */ li $at, 0xC1200000 # -10.000000 +/* 091A40 80090E40 44815000 */ mtc1 $at, $f10 +/* 091A44 80090E44 C610001C */ lwc1 $f16, 0x1c($s0) +/* 091A48 80090E48 8604002E */ lh $a0, 0x2e($s0) +/* 091A4C 80090E4C 460A0482 */ mul.s $f18, $f0, $f10 +/* 091A50 80090E50 00042023 */ negu $a0, $a0 +/* 091A54 80090E54 3089FFFF */ andi $t1, $a0, 0xffff +/* 091A58 80090E58 01202025 */ move $a0, $t1 +/* 091A5C 80090E5C 46109180 */ add.s $f6, $f18, $f16 +/* 091A60 80090E60 0C0AE006 */ jal func_802B8018 +/* 091A64 80090E64 E606001C */ swc1 $f6, 0x1c($s0) +/* 091A68 80090E68 3C01C120 */ li $at, 0xC1200000 # -10.000000 +/* 091A6C 80090E6C 44812000 */ mtc1 $at, $f4 +/* 091A70 80090E70 C60A0014 */ lwc1 $f10, 0x14($s0) +/* 091A74 80090E74 860200C8 */ lh $v0, 0xc8($s0) +/* 091A78 80090E78 46040202 */ mul.s $f8, $f0, $f4 +/* 091A7C 80090E7C 460A4480 */ add.s $f18, $f8, $f10 +/* 091A80 80090E80 E6120014 */ swc1 $f18, 0x14($s0) +/* 091A84 80090E84 240100FC */ li $at, 252 +.L80090E88: +/* 091A88 80090E88 14410011 */ bne $v0, $at, .L80090ED0 +/* 091A8C 80090E8C 3C028016 */ lui $v0, %hi(D_80164550) # $v0, 0x8016 +/* 091A90 80090E90 8C424550 */ lw $v0, %lo(D_80164550)($v0) +/* 091A94 80090E94 844A0000 */ lh $t2, ($v0) +/* 091A98 80090E98 448A8000 */ mtc1 $t2, $f16 +/* 091A9C 80090E9C 00000000 */ nop +/* 091AA0 80090EA0 468081A0 */ cvt.s.w $f6, $f16 +/* 091AA4 80090EA4 E6060014 */ swc1 $f6, 0x14($s0) +/* 091AA8 80090EA8 844B0002 */ lh $t3, 2($v0) +/* 091AAC 80090EAC 448B2000 */ mtc1 $t3, $f4 +/* 091AB0 80090EB0 00000000 */ nop +/* 091AB4 80090EB4 46802220 */ cvt.s.w $f8, $f4 +/* 091AB8 80090EB8 E6080018 */ swc1 $f8, 0x18($s0) +/* 091ABC 80090EBC 844D0004 */ lh $t5, 4($v0) +/* 091AC0 80090EC0 448D5000 */ mtc1 $t5, $f10 +/* 091AC4 80090EC4 00000000 */ nop +/* 091AC8 80090EC8 468054A0 */ cvt.s.w $f18, $f10 +/* 091ACC 80090ECC E612001C */ swc1 $f18, 0x1c($s0) +.L80090ED0: +/* 091AD0 80090ED0 C6100074 */ lwc1 $f16, 0x74($s0) +/* 091AD4 80090ED4 C6060070 */ lwc1 $f6, 0x70($s0) +/* 091AD8 80090ED8 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 091ADC 80090EDC 44814000 */ mtc1 $at, $f8 +/* 091AE0 80090EE0 46068100 */ add.s $f4, $f16, $f6 +/* 091AE4 80090EE4 3C063D23 */ lui $a2, (0x3D23D70A >> 16) # lui $a2, 0x3d23 +/* 091AE8 80090EE8 34C6D70A */ ori $a2, (0x3D23D70A & 0xFFFF) # ori $a2, $a2, 0xd70a +/* 091AEC 80090EEC 26040018 */ addiu $a0, $s0, 0x18 +/* 091AF0 80090EF0 46082281 */ sub.s $f10, $f4, $f8 +/* 091AF4 80090EF4 44055000 */ mfc1 $a1, $f10 +/* 091AF8 80090EF8 0C008973 */ jal func_800225CC +/* 091AFC 80090EFC 00000000 */ nop +/* 091B00 80090F00 860E00C8 */ lh $t6, 0xc8($s0) +/* 091B04 80090F04 8E0200BC */ lw $v0, 0xbc($s0) +/* 091B08 80090F08 24010008 */ li $at, 8 +/* 091B0C 80090F0C 25CF0001 */ addiu $t7, $t6, 1 +/* 091B10 80090F10 304C0008 */ andi $t4, $v0, 8 +/* 091B14 80090F14 15810004 */ bne $t4, $at, .L80090F28 +/* 091B18 80090F18 A60F00C8 */ sh $t7, 0xc8($s0) +/* 091B1C 80090F1C 30588000 */ andi $t8, $v0, %hi(D_80004334) # 0x8000 +/* 091B20 80090F20 53000032 */ beql $t8, $zero, .L80090FEC +/* 091B24 80090F24 3C014334 */ lui $at, %lo(D_80004334) # 0x4334 +.L80090F28: +/* 091B28 80090F28 861900CA */ lh $t9, 0xca($s0) +/* 091B2C 80090F2C 860900C8 */ lh $t1, 0xc8($s0) +/* 091B30 80090F30 3328EFFF */ andi $t0, $t9, 0xefff +/* 091B34 80090F34 2921005B */ slti $at, $t1, 0x5b +/* 091B38 80090F38 1420002B */ bnez $at, .L80090FE8 +/* 091B3C 80090F3C A60800CA */ sh $t0, 0xca($s0) +/* 091B40 80090F40 960A0000 */ lhu $t2, ($s0) +/* 091B44 80090F44 93A4005F */ lbu $a0, 0x5f($sp) +/* 091B48 80090F48 3C050100 */ lui $a1, (0x0100FA28 >> 16) # lui $a1, 0x100 +/* 091B4C 80090F4C 314B4000 */ andi $t3, $t2, 0x4000 +/* 091B50 80090F50 11600003 */ beqz $t3, .L80090F60 +/* 091B54 80090F54 00000000 */ nop +/* 091B58 80090F58 0C032406 */ jal func_800C9018 +/* 091B5C 80090F5C 34A5FA28 */ ori $a1, (0x0100FA28 & 0xFFFF) # ori $a1, $a1, 0xfa28 +.L80090F60: +/* 091B60 80090F60 3C0D800E */ lui $t5, %hi(gModeSelection) # $t5, 0x800e +/* 091B64 80090F64 8DADC53C */ lw $t5, %lo(gModeSelection)($t5) +/* 091B68 80090F68 24010003 */ li $at, 3 +/* 091B6C 80090F6C 02002025 */ move $a0, $s0 +/* 091B70 80090F70 55A10004 */ bnel $t5, $at, .L80090F84 +/* 091B74 80090F74 860E00CA */ lh $t6, 0xca($s0) +/* 091B78 80090F78 0C01AE2D */ jal func_8006B8B4 +/* 091B7C 80090F7C 83A5005F */ lb $a1, 0x5f($sp) +/* 091B80 80090F80 860E00CA */ lh $t6, 0xca($s0) +.L80090F84: +/* 091B84 80090F84 960C00DE */ lhu $t4, 0xde($s0) +/* 091B88 80090F88 24010080 */ li $at, 128 +/* 091B8C 80090F8C 31CFFFFD */ andi $t7, $t6, 0xfffd +/* 091B90 80090F90 A60F00CA */ sh $t7, 0xca($s0) +/* 091B94 80090F94 860300CA */ lh $v1, 0xca($s0) +/* 091B98 80090F98 3198FFFB */ andi $t8, $t4, 0xfffb +/* 091B9C 80090F9C A61800DE */ sh $t8, 0xde($s0) +/* 091BA0 80090FA0 30790080 */ andi $t9, $v1, 0x80 +/* 091BA4 80090FA4 13210010 */ beq $t9, $at, .L80090FE8 +/* 091BA8 80090FA8 3068FFF7 */ andi $t0, $v1, 0xfff7 +/* 091BAC 80090FAC C6060214 */ lwc1 $f6, 0x214($s0) +/* 091BB0 80090FB0 A60800CA */ sh $t0, 0xca($s0) +/* 091BB4 80090FB4 3C01800F */ lui $at, %hi(D_800EF650) +/* 091BB8 80090FB8 D428F650 */ ldc1 $f8, %lo(D_800EF650)($at) +/* 091BBC 80090FBC 46003121 */ cvt.d.s $f4, $f6 +/* 091BC0 80090FC0 C612009C */ lwc1 $f18, 0x9c($s0) +/* 091BC4 80090FC4 46282282 */ mul.d $f10, $f4, $f8 +/* 091BC8 80090FC8 02002025 */ move $a0, $s0 +/* 091BCC 80090FCC 46009421 */ cvt.d.s $f16, $f18 +/* 091BD0 80090FD0 4630503E */ c.le.d $f10, $f16 +/* 091BD4 80090FD4 00000000 */ nop +/* 091BD8 80090FD8 45020004 */ bc1fl .L80090FEC +/* 091BDC 80090FDC 3C014334 */ lui $at, 0x4334 +/* 091BE0 80090FE0 0C023C41 */ jal func_8008F104 +/* 091BE4 80090FE4 83A5005F */ lb $a1, 0x5f($sp) +.L80090FE8: +/* 091BE8 80090FE8 3C014334 */ li $at, 0x43340000 # 180.000000 +.L80090FEC: +/* 091BEC 80090FEC 44810000 */ mtc1 $at, $f0 +/* 091BF0 80090FF0 3C014100 */ li $at, 0x41000000 # 8.000000 +/* 091BF4 80090FF4 44813000 */ mtc1 $at, $f6 +/* 091BF8 80090FF8 C6120DA0 */ lwc1 $f18, 0xda0($s0) +/* 091BFC 80090FFC 46069100 */ add.s $f4, $f18, $f6 +/* 091C00 80091000 E6040DA0 */ swc1 $f4, 0xda0($s0) +/* 091C04 80091004 C6080DA0 */ lwc1 $f8, 0xda0($s0) +/* 091C08 80091008 4608003E */ c.le.s $f0, $f8 +/* 091C0C 8009100C 00000000 */ nop +/* 091C10 80091010 45020003 */ bc1fl .L80091020 +/* 091C14 80091014 86090D98 */ lh $t1, 0xd98($s0) +/* 091C18 80091018 E6000DA0 */ swc1 $f0, 0xda0($s0) +/* 091C1C 8009101C 86090D98 */ lh $t1, 0xd98($s0) +.L80091020: +/* 091C20 80091020 24010001 */ li $at, 1 +/* 091C24 80091024 55210015 */ bnel $t1, $at, .L8009107C +/* 091C28 80091028 860D0D98 */ lh $t5, 0xd98($s0) +/* 091C2C 8009102C C6100D9C */ lwc1 $f16, 0xd9c($s0) +/* 091C30 80091030 C60A0DA0 */ lwc1 $f10, 0xda0($s0) +/* 091C34 80091034 3C01800F */ lui $at, %hi(D_800EF658) # $at, 0x800f +/* 091C38 80091038 460A8480 */ add.s $f18, $f16, $f10 +/* 091C3C 8009103C E6120D9C */ swc1 $f18, 0xd9c($s0) +/* 091C40 80091040 C424F658 */ lwc1 $f4, %lo(D_800EF658)($at) +/* 091C44 80091044 C6060D9C */ lwc1 $f6, 0xd9c($s0) +/* 091C48 80091048 4606203E */ c.le.s $f4, $f6 +/* 091C4C 8009104C 00000000 */ nop +/* 091C50 80091050 4502000A */ bc1fl .L8009107C +/* 091C54 80091054 860D0D98 */ lh $t5, 0xd98($s0) +/* 091C58 80091058 860A0D98 */ lh $t2, 0xd98($s0) +/* 091C5C 8009105C 2402FFFF */ li $v0, -1 +/* 091C60 80091060 44804000 */ mtc1 $zero, $f8 +/* 091C64 80091064 01420019 */ multu $t2, $v0 +/* 091C68 80091068 E6080DA0 */ swc1 $f8, 0xda0($s0) +/* 091C6C 8009106C 00005812 */ mflo $t3 +/* 091C70 80091070 A60B0D98 */ sh $t3, 0xd98($s0) +/* 091C74 80091074 00000000 */ nop +/* 091C78 80091078 860D0D98 */ lh $t5, 0xd98($s0) +.L8009107C: +/* 091C7C 8009107C 2402FFFF */ li $v0, -1 +/* 091C80 80091080 544D0014 */ bnel $v0, $t5, .L800910D4 +/* 091C84 80091084 8FBF001C */ lw $ra, 0x1c($sp) +/* 091C88 80091088 C6100D9C */ lwc1 $f16, 0xd9c($s0) +/* 091C8C 8009108C C60A0DA0 */ lwc1 $f10, 0xda0($s0) +/* 091C90 80091090 3C01800F */ lui $at, %hi(D_800EF65C) # $at, 0x800f +/* 091C94 80091094 460A8481 */ sub.s $f18, $f16, $f10 +/* 091C98 80091098 E6120D9C */ swc1 $f18, 0xd9c($s0) +/* 091C9C 8009109C C6040D9C */ lwc1 $f4, 0xd9c($s0) +/* 091CA0 800910A0 C426F65C */ lwc1 $f6, %lo(D_800EF65C)($at) +/* 091CA4 800910A4 4606203E */ c.le.s $f4, $f6 +/* 091CA8 800910A8 00000000 */ nop +/* 091CAC 800910AC 45020009 */ bc1fl .L800910D4 +/* 091CB0 800910B0 8FBF001C */ lw $ra, 0x1c($sp) +/* 091CB4 800910B4 860E0D98 */ lh $t6, 0xd98($s0) +/* 091CB8 800910B8 44804000 */ mtc1 $zero, $f8 +/* 091CBC 800910BC 01C20019 */ multu $t6, $v0 +/* 091CC0 800910C0 E6080DA0 */ swc1 $f8, 0xda0($s0) +/* 091CC4 800910C4 00007812 */ mflo $t7 +/* 091CC8 800910C8 A60F0D98 */ sh $t7, 0xd98($s0) +/* 091CCC 800910CC 00000000 */ nop +/* 091CD0 800910D0 8FBF001C */ lw $ra, 0x1c($sp) +.L800910D4: +/* 091CD4 800910D4 8FB00018 */ lw $s0, 0x18($sp) +/* 091CD8 800910D8 27BD0058 */ addiu $sp, $sp, 0x58 +/* 091CDC 800910DC 03E00008 */ jr $ra +/* 091CE0 800910E0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_800910E4.s b/asm/non_matchings/code_8008C1D0/func_800910E4.s new file mode 100644 index 000000000..5211b79cb --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_800910E4.s @@ -0,0 +1,64 @@ +glabel func_800910E4 +/* 091CE4 800910E4 848300CA */ lh $v1, 0xca($a0) +/* 091CE8 800910E8 24010002 */ li $at, 2 +/* 091CEC 800910EC 00001025 */ move $v0, $zero +/* 091CF0 800910F0 306E0002 */ andi $t6, $v1, 2 +/* 091CF4 800910F4 11C1000C */ beq $t6, $at, .L80091128 +/* 091CF8 800910F8 306F0008 */ andi $t7, $v1, 8 +/* 091CFC 800910FC 24010008 */ li $at, 8 +/* 091D00 80091100 11E10009 */ beq $t7, $at, .L80091128 +/* 091D04 80091104 00000000 */ nop +/* 091D08 80091108 94830000 */ lhu $v1, ($a0) +/* 091D0C 8009110C 30780040 */ andi $t8, $v1, 0x40 +/* 091D10 80091110 17000005 */ bnez $t8, .L80091128 +/* 091D14 80091114 30790800 */ andi $t9, $v1, 0x800 +/* 091D18 80091118 17200003 */ bnez $t9, .L80091128 +/* 091D1C 8009111C 30688000 */ andi $t0, $v1, 0x8000 +/* 091D20 80091120 55000004 */ bnel $t0, $zero, .L80091134 +/* 091D24 80091124 84890010 */ lh $t1, 0x10($a0) +.L80091128: +/* 091D28 80091128 03E00008 */ jr $ra +/* 091D2C 8009112C 24020001 */ li $v0, 1 + +/* 091D30 80091130 84890010 */ lh $t1, 0x10($a0) +.L80091134: +/* 091D34 80091134 252AFFF6 */ addiu $t2, $t1, -0xa +/* 091D38 80091138 2D410006 */ sltiu $at, $t2, 6 +/* 091D3C 8009113C 10200015 */ beqz $at, .L80091194 +/* 091D40 80091140 000A5080 */ sll $t2, $t2, 2 +/* 091D44 80091144 3C01800F */ lui $at, %hi(jpt_800EF660) +/* 091D48 80091148 002A0821 */ addu $at, $at, $t2 +/* 091D4C 8009114C 8C2AF660 */ lw $t2, %lo(jpt_800EF660)($at) +/* 091D50 80091150 01400008 */ jr $t2 +/* 091D54 80091154 00000000 */ nop +glabel L80091158 +/* 091D58 80091158 8C8B00BC */ lw $t3, 0xbc($a0) +/* 091D5C 8009115C 3C025F93 */ lui $v0, 0x5f93 +/* 091D60 80091160 316C0008 */ andi $t4, $t3, 8 +/* 091D64 80091164 11800003 */ beqz $t4, .L80091174 +/* 091D68 80091168 00000000 */ nop +/* 091D6C 8009116C 03E00008 */ jr $ra +/* 091D70 80091170 24020001 */ li $v0, 1 + +.L80091174: +/* 091D74 80091174 10000007 */ b .L80091194 +/* 091D78 80091178 34424EC4 */ ori $v0, $v0, 0x4ec4 +glabel L8009117C +/* 091D7C 8009117C 3C02DF93 */ lui $v0, (0xDF934EC4 >> 16) # lui $v0, 0xdf93 +/* 091D80 80091180 34424EC4 */ ori $v0, (0xDF934EC4 & 0xFFFF) # ori $v0, $v0, 0x4ec4 +glabel L80091184 +/* 091D84 80091184 3C01DF93 */ lui $at, (0xDF934EC4 >> 16) # lui $at, 0xdf93 +/* 091D88 80091188 34214EC4 */ ori $at, (0xDF934EC4 & 0xFFFF) # ori $at, $at, 0x4ec4 +/* 091D8C 8009118C 00416825 */ or $t5, $v0, $at +/* 091D90 80091190 01A01025 */ move $v0, $t5 +.L80091194: +/* 091D94 80091194 8C8E00BC */ lw $t6, 0xbc($a0) +/* 091D98 80091198 01C27824 */ and $t7, $t6, $v0 +/* 091D9C 8009119C 11E00003 */ beqz $t7, .L800911AC +/* 091DA0 800911A0 00001025 */ move $v0, $zero +/* 091DA4 800911A4 03E00008 */ jr $ra +/* 091DA8 800911A8 24020001 */ li $v0, 1 + +.L800911AC: +/* 091DAC 800911AC 03E00008 */ jr $ra +/* 091DB0 800911B0 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_800911B4.s b/asm/non_matchings/code_8008C1D0/func_800911B4.s new file mode 100644 index 000000000..258fc30f3 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_800911B4.s @@ -0,0 +1,59 @@ +glabel func_800911B4 +/* 091DB4 800911B4 AFA50004 */ sw $a1, 4($sp) +/* 091DB8 800911B8 84990044 */ lh $t9, 0x44($a0) +/* 091DBC 800911BC 8498002E */ lh $t8, 0x2e($a0) +/* 091DC0 800911C0 3C01800F */ lui $at, %hi(D_800EF678) # $at, 0x800f +/* 091DC4 800911C4 37281800 */ ori $t0, $t9, 0x1800 +/* 091DC8 800911C8 A4880044 */ sh $t0, 0x44($a0) +/* 091DCC 800911CC 84890044 */ lh $t1, 0x44($a0) +/* 091DD0 800911D0 A49800AE */ sh $t8, 0xae($a0) +/* 091DD4 800911D4 44803000 */ mtc1 $zero, $f6 +/* 091DD8 800911D8 312AFBFF */ andi $t2, $t1, 0xfbff +/* 091DDC 800911DC A48A0044 */ sh $t2, 0x44($a0) +/* 091DE0 800911E0 848B0044 */ lh $t3, 0x44($a0) +/* 091DE4 800911E4 00057600 */ sll $t6, $a1, 0x18 +/* 091DE8 800911E8 000E7E03 */ sra $t7, $t6, 0x18 +/* 091DEC 800911EC 356C2000 */ ori $t4, $t3, 0x2000 +/* 091DF0 800911F0 A48C0044 */ sh $t4, 0x44($a0) +/* 091DF4 800911F4 C424F678 */ lwc1 $f4, %lo(D_800EF678)($at) +/* 091DF8 800911F8 3C01800F */ lui $at, %hi(D_800EF67C) # $at, 0x800f +/* 091DFC 800911FC E48600F4 */ swc1 $f6, 0xf4($a0) +/* 091E00 80091200 E48400F0 */ swc1 $f4, 0xf0($a0) +/* 091E04 80091204 C428F67C */ lwc1 $f8, %lo(D_800EF67C)($at) +/* 091E08 80091208 240D0002 */ li $t5, 2 +/* 091E0C 8009120C 3C018019 */ lui $at, %hi(D_8018D920) # 0x8019 +/* 091E10 80091210 000F7040 */ sll $t6, $t7, 1 +/* 091E14 80091214 A48D00B2 */ sh $t5, 0xb2($a0) +/* 091E18 80091218 A48000C0 */ sh $zero, 0xc0($a0) +/* 091E1C 8009121C AC80007C */ sw $zero, 0x7c($a0) +/* 091E20 80091220 A4800078 */ sh $zero, 0x78($a0) +/* 091E24 80091224 002E0821 */ addu $at, $at, $t6 +/* 091E28 80091228 E48800EC */ swc1 $f8, 0xec($a0) +/* 091E2C 8009122C A420D920 */ sh $zero, %lo(D_8018D920)($at) # -0x26e0($at) +/* 091E30 80091230 A4800B22 */ sh $zero, 0xb22($a0) +/* 091E34 80091234 A4800B2E */ sh $zero, 0xb2e($a0) +/* 091E38 80091238 A4800B2C */ sh $zero, 0xb2c($a0) +/* 091E3C 8009123C A4800ADA */ sh $zero, 0xada($a0) +/* 091E40 80091240 A4800AE6 */ sh $zero, 0xae6($a0) +/* 091E44 80091244 A4800AE4 */ sh $zero, 0xae4($a0) +/* 091E48 80091248 24830090 */ addiu $v1, $a0, 0x90 +/* 091E4C 8009124C 2404000A */ li $a0, 10 +/* 091E50 80091250 24020002 */ li $v0, 2 +.L80091254: +/* 091E54 80091254 24420004 */ addiu $v0, $v0, 4 +/* 091E58 80091258 A4600B2C */ sh $zero, 0xb2c($v1) +/* 091E5C 8009125C A4600B2E */ sh $zero, 0xb2e($v1) +/* 091E60 80091260 A4600B22 */ sh $zero, 0xb22($v1) +/* 091E64 80091264 A4600B74 */ sh $zero, 0xb74($v1) +/* 091E68 80091268 A4600B76 */ sh $zero, 0xb76($v1) +/* 091E6C 8009126C A4600B6A */ sh $zero, 0xb6a($v1) +/* 091E70 80091270 A4600BBC */ sh $zero, 0xbbc($v1) +/* 091E74 80091274 A4600BBE */ sh $zero, 0xbbe($v1) +/* 091E78 80091278 A4600BB2 */ sh $zero, 0xbb2($v1) +/* 091E7C 8009127C 24630120 */ addiu $v1, $v1, 0x120 +/* 091E80 80091280 A46009C4 */ sh $zero, 0x9c4($v1) +/* 091E84 80091284 A46009C6 */ sh $zero, 0x9c6($v1) +/* 091E88 80091288 1444FFF2 */ bne $v0, $a0, .L80091254 +/* 091E8C 8009128C A46009BA */ sh $zero, 0x9ba($v1) +/* 091E90 80091290 03E00008 */ jr $ra +/* 091E94 80091294 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_80091298.s b/asm/non_matchings/code_8008C1D0/func_80091298.s new file mode 100644 index 000000000..0d1a0eee1 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_80091298.s @@ -0,0 +1,114 @@ +glabel func_80091298 +/* 091E98 80091298 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 091E9C 8009129C 3C18800E */ lui $t8, %hi(D_800E706C) # $t8, 0x800e +/* 091EA0 800912A0 AFA50024 */ sw $a1, 0x24($sp) +/* 091EA4 800912A4 2718706C */ addiu $t8, %lo(D_800E706C) # addiu $t8, $t8, 0x706c +/* 091EA8 800912A8 8F010000 */ lw $at, ($t8) +/* 091EAC 800912AC 27A7000C */ addiu $a3, $sp, 0xc +/* 091EB0 800912B0 00057600 */ sll $t6, $a1, 0x18 +/* 091EB4 800912B4 ACE10000 */ sw $at, ($a3) +/* 091EB8 800912B8 8F090004 */ lw $t1, 4($t8) +/* 091EBC 800912BC 000E2E03 */ sra $a1, $t6, 0x18 +/* 091EC0 800912C0 00057040 */ sll $t6, $a1, 1 +/* 091EC4 800912C4 ACE90004 */ sw $t1, 4($a3) +/* 091EC8 800912C8 8F010008 */ lw $at, 8($t8) +/* 091ECC 800912CC 3C0F8019 */ lui $t7, %hi(D_8018D920) # $t7, 0x8019 +/* 091ED0 800912D0 ACE10008 */ sw $at, 8($a3) +/* 091ED4 800912D4 848A0044 */ lh $t2, 0x44($a0) +/* 091ED8 800912D8 848200B2 */ lh $v0, 0xb2($a0) +/* 091EDC 800912DC 354B2000 */ ori $t3, $t2, 0x2000 +/* 091EE0 800912E0 14400003 */ bnez $v0, .L800912F0 +/* 091EE4 800912E4 A48B0044 */ sh $t3, 0x44($a0) +/* 091EE8 800912E8 10000010 */ b .L8009132C +/* 091EEC 800912EC 00001825 */ move $v1, $zero +.L800912F0: +/* 091EF0 800912F0 848C002E */ lh $t4, 0x2e($a0) +/* 091EF4 800912F4 25EFD920 */ addiu $t7, %lo(D_8018D920) # addiu $t7, $t7, -0x26e0 +/* 091EF8 800912F8 01CF3021 */ addu $a2, $t6, $t7 +/* 091EFC 800912FC 258DF1C8 */ addiu $t5, $t4, -0xe38 +/* 091F00 80091300 A48D002E */ sh $t5, 0x2e($a0) +/* 091F04 80091304 84C80000 */ lh $t0, ($a2) +/* 091F08 80091308 24010E38 */ li $at, 3640 +/* 091F0C 8009130C 2519F1C8 */ addiu $t9, $t0, -0xe38 +/* 091F10 80091310 3323FFFF */ andi $v1, $t9, 0xffff +/* 091F14 80091314 0061001A */ div $zero, $v1, $at +/* 091F18 80091318 0000C012 */ mflo $t8 +/* 091F1C 8009131C A4D90000 */ sh $t9, ($a2) +/* 091F20 80091320 00184C00 */ sll $t1, $t8, 0x10 +/* 091F24 80091324 00091C03 */ sra $v1, $t1, 0x10 +/* 091F28 80091328 848200B2 */ lh $v0, 0xb2($a0) +.L8009132C: +/* 091F2C 8009132C 24010009 */ li $at, 9 +/* 091F30 80091330 14610003 */ bne $v1, $at, .L80091340 +/* 091F34 80091334 24010001 */ li $at, 1 +/* 091F38 80091338 50410007 */ beql $v0, $at, .L80091358 +/* 091F3C 8009133C 244BFFFF */ addiu $t3, $v0, -1 +.L80091340: +/* 091F40 80091340 14600003 */ bnez $v1, .L80091350 +/* 091F44 80091344 24010002 */ li $at, 2 +/* 091F48 80091348 50410003 */ beql $v0, $at, .L80091358 +/* 091F4C 8009134C 244BFFFF */ addiu $t3, $v0, -1 +.L80091350: +/* 091F50 80091350 14400039 */ bnez $v0, .L80091438 +/* 091F54 80091354 244BFFFF */ addiu $t3, $v0, -1 +.L80091358: +/* 091F58 80091358 A48B00B2 */ sh $t3, 0xb2($a0) +/* 091F5C 8009135C 848200B2 */ lh $v0, 0xb2($a0) +/* 091F60 80091360 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 091F64 80091364 1C400003 */ bgtz $v0, .L80091374 +/* 091F68 80091368 00000000 */ nop +/* 091F6C 8009136C A48000B2 */ sh $zero, 0xb2($a0) +/* 091F70 80091370 848200B2 */ lh $v0, 0xb2($a0) +.L80091374: +/* 091F74 80091374 14400030 */ bnez $v0, .L80091438 +/* 091F78 80091378 00000000 */ nop +/* 091F7C 8009137C C4820070 */ lwc1 $f2, 0x70($a0) +/* 091F80 80091380 44813000 */ mtc1 $at, $f6 +/* 091F84 80091384 C4840018 */ lwc1 $f4, 0x18($a0) +/* 091F88 80091388 00056080 */ sll $t4, $a1, 2 +/* 091F8C 8009138C 46061200 */ add.s $f8, $f2, $f6 +/* 091F90 80091390 00EC6821 */ addu $t5, $a3, $t4 +/* 091F94 80091394 C5A00000 */ lwc1 $f0, ($t5) +/* 091F98 80091398 3C01800F */ lui $at, %hi(D_800EF680) +/* 091F9C 8009139C 46082281 */ sub.s $f10, $f4, $f8 +/* 091FA0 800913A0 4600503E */ c.le.s $f10, $f0 +/* 091FA4 800913A4 00000000 */ nop +/* 091FA8 800913A8 45000023 */ bc1f .L80091438 +/* 091FAC 800913AC 00000000 */ nop +/* 091FB0 800913B0 46020400 */ add.s $f16, $f0, $f2 +/* 091FB4 800913B4 D426F680 */ ldc1 $f6, %lo(D_800EF680)($at) +/* 091FB8 800913B8 848E0044 */ lh $t6, 0x44($a0) +/* 091FBC 800913BC 94880254 */ lhu $t0, 0x254($a0) +/* 091FC0 800913C0 460084A1 */ cvt.d.s $f18, $f16 +/* 091FC4 800913C4 3C014040 */ li $at, 0x40400000 # 3.000000 +/* 091FC8 800913C8 46269100 */ add.d $f4, $f18, $f6 +/* 091FCC 800913CC 44815000 */ mtc1 $at, $f10 +/* 091FD0 800913D0 3C01800E */ lui $at, %hi(gKartGravityTable) +/* 091FD4 800913D4 31CFF7FF */ andi $t7, $t6, 0xf7ff +/* 091FD8 800913D8 46202220 */ cvt.s.d $f8, $f4 +/* 091FDC 800913DC 0008C880 */ sll $t9, $t0, 2 +/* 091FE0 800913E0 A4800DCC */ sh $zero, 0xdcc($a0) +/* 091FE4 800913E4 A48000A8 */ sh $zero, 0xa8($a0) +/* 091FE8 800913E8 E4880018 */ swc1 $f8, 0x18($a0) +/* 091FEC 800913EC AC80007C */ sw $zero, 0x7c($a0) +/* 091FF0 800913F0 A48000C0 */ sh $zero, 0xc0($a0) +/* 091FF4 800913F4 A48F0044 */ sh $t7, 0x44($a0) +/* 091FF8 800913F8 00390821 */ addu $at, $at, $t9 +/* 091FFC 800913FC E48A0DC0 */ swc1 $f10, 0xdc0($a0) +/* 092000 80091400 C4302650 */ lwc1 $f16, %lo(gKartGravityTable)($at) +/* 092004 80091404 44806000 */ mtc1 $zero, $f12 +/* 092008 80091408 94980000 */ lhu $t8, ($a0) +/* 09200C 8009140C A48000D4 */ sh $zero, 0xd4($a0) +/* 092010 80091410 E4900100 */ swc1 $f16, 0x100($a0) +/* 092014 80091414 37092000 */ ori $t1, $t8, 0x2000 +/* 092018 80091418 A4890000 */ sh $t1, ($a0) +/* 09201C 8009141C E48C0094 */ swc1 $f12, 0x94($a0) +/* 092020 80091420 E48C008C */ swc1 $f12, 0x8c($a0) +/* 092024 80091424 14A00004 */ bnez $a1, .L80091438 +/* 092028 80091428 E48C009C */ swc1 $f12, 0x9c($a0) +/* 09202C 8009142C 240A0001 */ li $t2, 1 +/* 092030 80091430 3C018016 */ lui $at, %hi(D_801658BC) # $at, 0x8016 +/* 092034 80091434 A02A58BC */ sb $t2, %lo(D_801658BC)($at) +.L80091438: +/* 092038 80091438 03E00008 */ jr $ra +/* 09203C 8009143C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/non_matchings/code_8008C1D0/func_80091440.s b/asm/non_matchings/code_8008C1D0/func_80091440.s new file mode 100644 index 000000000..7d8a7baf5 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_80091440.s @@ -0,0 +1,26 @@ +glabel func_80091440 +/* 092040 80091440 00047600 */ sll $t6, $a0, 0x18 +/* 092044 80091444 000E7E03 */ sra $t7, $t6, 0x18 +/* 092048 80091448 000FC0C0 */ sll $t8, $t7, 3 +/* 09204C 8009144C 030FC023 */ subu $t8, $t8, $t7 +/* 092050 80091450 0018C100 */ sll $t8, $t8, 4 +/* 092054 80091454 030FC023 */ subu $t8, $t8, $t7 +/* 092058 80091458 0018C080 */ sll $t8, $t8, 2 +/* 09205C 8009145C 030FC023 */ subu $t8, $t8, $t7 +/* 092060 80091460 3C19800F */ lui $t9, %hi(gPlayers) # $t9, 0x800f +/* 092064 80091464 27396990 */ addiu $t9, %lo(gPlayers) # addiu $t9, $t9, 0x6990 +/* 092068 80091468 0018C0C0 */ sll $t8, $t8, 3 +/* 09206C 8009146C 03191021 */ addu $v0, $t8, $t9 +/* 092070 80091470 84430044 */ lh $v1, 0x44($v0) +/* 092074 80091474 AFA40000 */ sw $a0, ($sp) +/* 092078 80091478 30680800 */ andi $t0, $v1, 0x800 +/* 09207C 8009147C 15000006 */ bnez $t0, .L80091498 +/* 092080 80091480 00000000 */ nop +/* 092084 80091484 944A0000 */ lhu $t2, ($v0) +/* 092088 80091488 34692400 */ ori $t1, $v1, 0x2400 +/* 09208C 8009148C A4490044 */ sh $t1, 0x44($v0) +/* 092090 80091490 314BDFFF */ andi $t3, $t2, 0xdfff +/* 092094 80091494 A44B0000 */ sh $t3, ($v0) +.L80091498: +/* 092098 80091498 03E00008 */ jr $ra +/* 09209C 8009149C 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_800914A0.s b/asm/non_matchings/code_8008C1D0/func_800914A0.s new file mode 100644 index 000000000..d8dd2dd33 --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_800914A0.s @@ -0,0 +1,18 @@ +glabel func_800914A0 +/* 0920A0 800914A0 3C0E800E */ lui $t6, %hi(D_800DC4FC) # $t6, 0x800e +/* 0920A4 800914A4 8DCEC4FC */ lw $t6, %lo(D_800DC4FC)($t6) +/* 0920A8 800914A8 3C048015 */ lui $a0, %hi(D_80152308) # $a0, 0x8015 +/* 0920AC 800914AC 24842308 */ addiu $a0, %lo(D_80152308) # addiu $a0, $a0, 0x2308 +/* 0920B0 800914B0 95CF0006 */ lhu $t7, 6($t6) +/* 0920B4 800914B4 3C028016 */ lui $v0, %hi(D_8015F6F8) # $v0, 0x8016 +/* 0920B8 800914B8 25F80007 */ addiu $t8, $t7, 7 +/* 0920BC 800914BC A4980000 */ sh $t8, ($a0) +/* 0920C0 800914C0 9442F6F8 */ lhu $v0, %lo(D_8015F6F8)($v0) +/* 0920C4 800914C4 3303FFFF */ andi $v1, $t8, 0xffff +/* 0920C8 800914C8 0043082A */ slt $at, $v0, $v1 +/* 0920CC 800914CC 10200002 */ beqz $at, .L800914D8 +/* 0920D0 800914D0 0062C823 */ subu $t9, $v1, $v0 +/* 0920D4 800914D4 A4990000 */ sh $t9, ($a0) +.L800914D8: +/* 0920D8 800914D8 03E00008 */ jr $ra +/* 0920DC 800914DC 00000000 */ nop diff --git a/asm/non_matchings/code_8008C1D0/func_800914E0.s b/asm/non_matchings/code_8008C1D0/func_800914E0.s new file mode 100644 index 000000000..f988dfd7a --- /dev/null +++ b/asm/non_matchings/code_8008C1D0/func_800914E0.s @@ -0,0 +1,159 @@ +glabel func_800914E0 +/* 0920E0 800914E0 27BDFF90 */ addiu $sp, $sp, -0x70 +/* 0920E4 800914E4 3C0F800E */ lui $t7, %hi(D_800E7080) # $t7, 0x800e +/* 0920E8 800914E8 AFBF001C */ sw $ra, 0x1c($sp) +/* 0920EC 800914EC 25EF7080 */ addiu $t7, %lo(D_800E7080) # addiu $t7, $t7, 0x7080 +/* 0920F0 800914F0 8DE10000 */ lw $at, ($t7) +/* 0920F4 800914F4 27AE0064 */ addiu $t6, $sp, 0x64 +/* 0920F8 800914F8 8DEA0004 */ lw $t2, 4($t7) +/* 0920FC 800914FC ADC10000 */ sw $at, ($t6) +/* 092100 80091500 8DE10008 */ lw $at, 8($t7) +/* 092104 80091504 3C0C800E */ lui $t4, %hi(D_800E708C) # $t4, 0x800e +/* 092108 80091508 258C708C */ addiu $t4, %lo(D_800E708C) # addiu $t4, $t4, 0x708c +/* 09210C 8009150C ADCA0004 */ sw $t2, 4($t6) +/* 092110 80091510 ADC10008 */ sw $at, 8($t6) +/* 092114 80091514 8D810000 */ lw $at, ($t4) +/* 092118 80091518 27AB0058 */ addiu $t3, $sp, 0x58 +/* 09211C 8009151C 8D980004 */ lw $t8, 4($t4) +/* 092120 80091520 AD610000 */ sw $at, ($t3) +/* 092124 80091524 8D810008 */ lw $at, 8($t4) +/* 092128 80091528 3C028016 */ lui $v0, %hi(D_8015F718) # $v0, 0x8016 +/* 09212C 8009152C AD780004 */ sw $t8, 4($t3) +/* 092130 80091530 AD610008 */ sw $at, 8($t3) +/* 092134 80091534 8C42F718 */ lw $v0, %lo(D_8015F718)($v0) +/* 092138 80091538 3C0F8015 */ lui $t7, %hi(gSegmentTable) +/* 09213C 8009153C 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff +/* 092140 80091540 00021E02 */ srl $v1, $v0, 0x18 +/* 092144 80091544 00037080 */ sll $t6, $v1, 2 +/* 092148 80091548 01EE7821 */ addu $t7, $t7, $t6 +/* 09214C 8009154C 8DEF0258 */ lw $t7, %lo(gSegmentTable)($t7) +/* 092150 80091550 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 092154 80091554 3C09800E */ lui $t1, %hi(D_800DC4FC) # $t1, 0x800e +/* 092158 80091558 00412024 */ and $a0, $v0, $at +/* 09215C 8009155C 2529C4FC */ addiu $t1, %lo(D_800DC4FC) # addiu $t1, $t1, -0x3b04 +/* 092160 80091560 8D2B0000 */ lw $t3, ($t1) +/* 092164 80091564 3C018000 */ lui $at, 0x8000 +/* 092168 80091568 01E45021 */ addu $t2, $t7, $a0 +/* 09216C 8009156C 0141C821 */ addu $t9, $t2, $at +/* 092170 80091570 AFB90048 */ sw $t9, 0x48($sp) +/* 092174 80091574 3C088015 */ lui $t0, %hi(D_80152308) # $t0, 0x8015 +/* 092178 80091578 44800000 */ mtc1 $zero, $f0 +/* 09217C 8009157C 95082308 */ lhu $t0, %lo(D_80152308)($t0) +/* 092180 80091580 85670006 */ lh $a3, 6($t3) +/* 092184 80091584 3C058016 */ lui $a1, %hi(cameras) # $a1, 0x8016 +/* 092188 80091588 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 09218C 8009158C 44812000 */ mtc1 $at, $f4 +/* 092190 80091590 24A546F0 */ addiu $a1, %lo(cameras) # addiu $a1, $a1, 0x46f0 +/* 092194 80091594 00E81023 */ subu $v0, $a3, $t0 +/* 092198 80091598 00021C00 */ sll $v1, $v0, 0x10 +/* 09219C 8009159C E4A00018 */ swc1 $f0, 0x18($a1) +/* 0921A0 800915A0 E4A00020 */ swc1 $f0, 0x20($a1) +/* 0921A4 800915A4 E4A4001C */ swc1 $f4, 0x1c($a1) +/* 0921A8 800915A8 24050007 */ li $a1, 7 +/* 0921AC 800915AC 0003C403 */ sra $t8, $v1, 0x10 +/* 0921B0 800915B0 14B80008 */ bne $a1, $t8, .L800915D4 +/* 0921B4 800915B4 03001825 */ move $v1, $t8 +/* 0921B8 800915B8 0C024528 */ jal func_800914A0 +/* 0921BC 800915BC 00000000 */ nop +/* 0921C0 800915C0 3C09800E */ lui $t1, %hi(D_800DC4FC) # $t1, 0x800e +/* 0921C4 800915C4 3C088015 */ lui $t0, %hi(D_80152308) # $t0, 0x8015 +/* 0921C8 800915C8 95082308 */ lhu $t0, %lo(D_80152308)($t0) +/* 0921CC 800915CC 10000010 */ b .L80091610 +/* 0921D0 800915D0 2529C4FC */ addiu $t1, %lo(D_800DC4FC) # addiu $t1, $t1, -0x3b04 +.L800915D4: +/* 0921D4 800915D4 2861000E */ slti $at, $v1, 0xe +/* 0921D8 800915D8 1020000D */ beqz $at, .L80091610 +/* 0921DC 800915DC 3C0E8016 */ lui $t6, %hi(D_8015F6F8) # $t6, 0x8016 +/* 0921E0 800915E0 85CEF6F8 */ lh $t6, %lo(D_8015F6F8)($t6) +/* 0921E4 800915E4 006E2021 */ addu $a0, $v1, $t6 +/* 0921E8 800915E8 00047C00 */ sll $t7, $a0, 0x10 +/* 0921EC 800915EC 000F5403 */ sra $t2, $t7, 0x10 +/* 0921F0 800915F0 55450008 */ bnel $t2, $a1, .L80091614 +/* 0921F4 800915F4 8FAD0048 */ lw $t5, 0x48($sp) +/* 0921F8 800915F8 0C024528 */ jal func_800914A0 +/* 0921FC 800915FC 00000000 */ nop +/* 092200 80091600 3C09800E */ lui $t1, %hi(D_800DC4FC) # $t1, 0x800e +/* 092204 80091604 3C088015 */ lui $t0, %hi(D_80152308) # $t0, 0x8015 +/* 092208 80091608 95082308 */ lhu $t0, %lo(D_80152308)($t0) +/* 09220C 8009160C 2529C4FC */ addiu $t1, %lo(D_800DC4FC) # addiu $t1, $t1, -0x3b04 +.L80091610: +/* 092210 80091610 8FAD0048 */ lw $t5, 0x48($sp) +.L80091614: +/* 092214 80091614 0008C8C0 */ sll $t9, $t0, 3 +/* 092218 80091618 3C018016 */ lui $at, %hi(cameras) # $at, 0x8016 +/* 09221C 8009161C 032D1021 */ addu $v0, $t9, $t5 +/* 092220 80091620 844B0000 */ lh $t3, ($v0) +/* 092224 80091624 3C048016 */ lui $a0, %hi(cameras+0x54) # $a0, 0x8016 +/* 092228 80091628 24844744 */ addiu $a0, %lo(cameras+0x54) # addiu $a0, $a0, 0x4744 +/* 09222C 8009162C 256C000A */ addiu $t4, $t3, 0xa +/* 092230 80091630 448C3000 */ mtc1 $t4, $f6 +/* 092234 80091634 3C0541A0 */ lui $a1, 0x41a0 +/* 092238 80091638 46803220 */ cvt.s.w $f8, $f6 +/* 09223C 8009163C E42846F0 */ swc1 $f8, %lo(cameras)($at) +/* 092240 80091640 84580002 */ lh $t8, 2($v0) +/* 092244 80091644 3C018016 */ lui $at, %hi(cameras+0x4) # $at, 0x8016 +/* 092248 80091648 44064000 */ mfc1 $a2, $f8 +/* 09224C 8009164C 270E0007 */ addiu $t6, $t8, 7 +/* 092250 80091650 448E5000 */ mtc1 $t6, $f10 +/* 092254 80091654 00000000 */ nop +/* 092258 80091658 46805420 */ cvt.s.w $f16, $f10 +/* 09225C 8009165C E43046F4 */ swc1 $f16, %lo(cameras+0x4)($at) +/* 092260 80091660 844F0004 */ lh $t7, 4($v0) +/* 092264 80091664 3C018016 */ lui $at, %hi(cameras+0x8) # $at, 0x8016 +/* 092268 80091668 44078000 */ mfc1 $a3, $f16 +/* 09226C 8009166C 25EAFFEC */ addiu $t2, $t7, -0x14 +/* 092270 80091670 448A9000 */ mtc1 $t2, $f18 +/* 092274 80091674 00000000 */ nop +/* 092278 80091678 46809120 */ cvt.s.w $f4, $f18 +/* 09227C 8009167C E42446F8 */ swc1 $f4, %lo(cameras+0x8)($at) +/* 092280 80091680 8D390000 */ lw $t9, ($t1) +/* 092284 80091684 3C018016 */ lui $at, %hi(cameras+0xC) # $at, 0x8016 +/* 092288 80091688 C7260014 */ lwc1 $f6, 0x14($t9) +/* 09228C 8009168C E42646FC */ swc1 $f6, %lo(cameras+0xC)($at) +/* 092290 80091690 8D2D0000 */ lw $t5, ($t1) +/* 092294 80091694 3C018016 */ lui $at, %hi(cameras+0x10) # $at, 0x8016 +/* 092298 80091698 C5AA0018 */ lwc1 $f10, 0x18($t5) +/* 09229C 8009169C E42A4700 */ swc1 $f10, %lo(cameras+0x10)($at) +/* 0922A0 800916A0 8D2B0000 */ lw $t3, ($t1) +/* 0922A4 800916A4 3C018016 */ lui $at, %hi(cameras+0x14) # $at, 0x8016 +/* 0922A8 800916A8 C572001C */ lwc1 $f18, 0x1c($t3) +/* 0922AC 800916AC E7A40010 */ swc1 $f4, 0x10($sp) +/* 0922B0 800916B0 0C0AB772 */ jal func_802ADDC8 +/* 0922B4 800916B4 E4324704 */ swc1 $f18, %lo(cameras+0x14)($at) +/* 0922B8 800916B8 3C018016 */ lui $at, %hi(cameras+0xC) # $at, 0x8016 +/* 0922BC 800916BC C42646FC */ lwc1 $f6, %lo(cameras+0xC)($at) +/* 0922C0 800916C0 3C018016 */ lui $at, %hi(cameras) # $at, 0x8016 +/* 0922C4 800916C4 C42A46F0 */ lwc1 $f10, %lo(cameras)($at) +/* 0922C8 800916C8 3C018016 */ lui $at, %hi(cameras+0x10) # $at, 0x8016 +/* 0922CC 800916CC C4324700 */ lwc1 $f18, %lo(cameras+0x10)($at) +/* 0922D0 800916D0 3C018016 */ lui $at, %hi(cameras+0x4) # $at, 0x8016 +/* 0922D4 800916D4 C42846F4 */ lwc1 $f8, %lo(cameras+0x4)($at) +/* 0922D8 800916D8 3C018016 */ lui $at, %hi(cameras+0x14) # $at, 0x8016 +/* 0922DC 800916DC C4244704 */ lwc1 $f4, %lo(cameras+0x14)($at) +/* 0922E0 800916E0 460A3301 */ sub.s $f12, $f6, $f10 +/* 0922E4 800916E4 3C018016 */ lui $at, %hi(cameras+0x8) # $at, 0x8016 +/* 0922E8 800916E8 C42646F8 */ lwc1 $f6, %lo(cameras+0x8)($at) +/* 0922EC 800916EC 46089401 */ sub.s $f16, $f18, $f8 +/* 0922F0 800916F0 E7AC0038 */ swc1 $f12, 0x38($sp) +/* 0922F4 800916F4 46062381 */ sub.s $f14, $f4, $f6 +/* 0922F8 800916F8 E7B00034 */ swc1 $f16, 0x34($sp) +/* 0922FC 800916FC 0C0ADE0C */ jal func_802B7830 +/* 092300 80091700 E7AE0030 */ swc1 $f14, 0x30($sp) +/* 092304 80091704 C7A00038 */ lwc1 $f0, 0x38($sp) +/* 092308 80091708 C7AE0030 */ lwc1 $f14, 0x30($sp) +/* 09230C 8009170C 3C018016 */ lui $at, %hi(cameras+0x26) # $at, 0x8016 +/* 092310 80091710 46000282 */ mul.s $f10, $f0, $f0 +/* 092314 80091714 A4224716 */ sh $v0, %lo(cameras+0x26)($at) +/* 092318 80091718 460E7482 */ mul.s $f18, $f14, $f14 +/* 09231C 8009171C 0C033850 */ jal sqrtf +/* 092320 80091720 46125300 */ add.s $f12, $f10, $f18 +/* 092324 80091724 46000306 */ mov.s $f12, $f0 +/* 092328 80091728 0C0ADE0C */ jal func_802B7830 +/* 09232C 8009172C C7AE0034 */ lwc1 $f14, 0x34($sp) +/* 092330 80091730 8FBF001C */ lw $ra, 0x1c($sp) +/* 092334 80091734 3C018016 */ lui $at, %hi(cameras+0x24) # $at, 0x8016 +/* 092338 80091738 A4224714 */ sh $v0, %lo(cameras+0x24)($at) +/* 09233C 8009173C 3C018016 */ lui $at, %hi(cameras+0x28) # $at, 0x8016 +/* 092340 80091740 A4204718 */ sh $zero, %lo(cameras+0x28)($at) +/* 092344 80091744 03E00008 */ jr $ra +/* 092348 80091748 27BD0070 */ addiu $sp, $sp, 0x70 diff --git a/asm/non_matchings/code_80091750/func_80092688.s b/asm/non_matchings/code_80091750/func_80092688.s index d019fd52f..d3a7ca947 100644 --- a/asm/non_matchings/code_80091750/func_80092688.s +++ b/asm/non_matchings/code_80091750/func_80092688.s @@ -6,9 +6,9 @@ glabel func_80092688 /* 093298 80092698 2DC10013 */ sltiu $at, $t6, 0x13 /* 09329C 8009269C 1020000D */ beqz $at, .L800926D4 /* 0932A0 800926A0 000E7080 */ sll $t6, $t6, 2 -/* 0932A4 800926A4 3C01800F */ lui $at, %hi(D_800F0CD8) +/* 0932A4 800926A4 3C01800F */ lui $at, %hi(jpt_800F0CD8) /* 0932A8 800926A8 002E0821 */ addu $at, $at, $t6 -/* 0932AC 800926AC 8C2E0CD8 */ lw $t6, %lo(D_800F0CD8)($at) +/* 0932AC 800926AC 8C2E0CD8 */ lw $t6, %lo(jpt_800F0CD8)($at) /* 0932B0 800926B0 01C00008 */ jr $t6 /* 0932B4 800926B4 00000000 */ nop glabel L800926B8 diff --git a/asm/non_matchings/code_80091750/func_80092C90.s b/asm/non_matchings/code_80091750/func_80092C90.s index d263475d8..7059cff6f 100644 --- a/asm/non_matchings/code_80091750/func_80092C90.s +++ b/asm/non_matchings/code_80091750/func_80092C90.s @@ -43,9 +43,9 @@ glabel func_80092C90 /* 093918 80092D18 2DC1000B */ sltiu $at, $t6, 0xb /* 09391C 80092D1C 10200031 */ beqz $at, .L80092DE4 /* 093920 80092D20 000E7080 */ sll $t6, $t6, 2 -/* 093924 80092D24 3C01800F */ lui $at, %hi(D_800F0D24) +/* 093924 80092D24 3C01800F */ lui $at, %hi(jpt_800F0D24) /* 093928 80092D28 002E0821 */ addu $at, $at, $t6 -/* 09392C 80092D2C 8C2E0D24 */ lw $t6, %lo(D_800F0D24)($at) +/* 09392C 80092D2C 8C2E0D24 */ lw $t6, %lo(jpt_800F0D24)($at) /* 093930 80092D30 01C00008 */ jr $t6 /* 093934 80092D34 00000000 */ nop glabel L80092D38 @@ -67,9 +67,9 @@ glabel L80092D58 /* 093968 80092D68 2DE1001F */ sltiu $at, $t7, 0x1f /* 09396C 80092D6C 1020001C */ beqz $at, .L80092DE0 /* 093970 80092D70 000F7880 */ sll $t7, $t7, 2 -/* 093974 80092D74 3C01800F */ lui $at, %hi(D_800F0D50) +/* 093974 80092D74 3C01800F */ lui $at, %hi(jpt_800F0D50) /* 093978 80092D78 002F0821 */ addu $at, $at, $t7 -/* 09397C 80092D7C 8C2F0D50 */ lw $t7, %lo(D_800F0D50)($at) +/* 09397C 80092D7C 8C2F0D50 */ lw $t7, %lo(jpt_800F0D50)($at) /* 093980 80092D80 01E00008 */ jr $t7 /* 093984 80092D84 00000000 */ nop glabel L80092D88 diff --git a/asm/non_matchings/code_80091750/func_80092EE4.s b/asm/non_matchings/code_80091750/func_80092EE4.s index b2a7ccdfb..185e3f8f9 100644 --- a/asm/non_matchings/code_80091750/func_80092EE4.s +++ b/asm/non_matchings/code_80091750/func_80092EE4.s @@ -20,9 +20,9 @@ glabel func_80092EE4 /* 093B24 80092F24 2DE1003C */ sltiu $at, $t7, 0x3c /* 093B28 80092F28 10200040 */ beqz $at, .L8009302C /* 093B2C 80092F2C 000F7880 */ sll $t7, $t7, 2 -/* 093B30 80092F30 3C01800F */ lui $at, %hi(D_800F0DCC) +/* 093B30 80092F30 3C01800F */ lui $at, %hi(jpt_800F0DCC) /* 093B34 80092F34 002F0821 */ addu $at, $at, $t7 -/* 093B38 80092F38 8C2F0DCC */ lw $t7, %lo(D_800F0DCC)($at) +/* 093B38 80092F38 8C2F0DCC */ lw $t7, %lo(jpt_800F0DCC)($at) /* 093B3C 80092F3C 01E00008 */ jr $t7 /* 093B40 80092F40 00000000 */ nop glabel L80092F44 @@ -78,9 +78,9 @@ glabel L80092F84 /* 093BB4 80092FB4 2F010034 */ sltiu $at, $t8, 0x34 /* 093BB8 80092FB8 1020001C */ beqz $at, .L8009302C /* 093BBC 80092FBC 0018C080 */ sll $t8, $t8, 2 -/* 093BC0 80092FC0 3C01800F */ lui $at, %hi(D_800F0EBC) +/* 093BC0 80092FC0 3C01800F */ lui $at, %hi(jpt_800F0EBC) /* 093BC4 80092FC4 00380821 */ addu $at, $at, $t8 -/* 093BC8 80092FC8 8C380EBC */ lw $t8, %lo(D_800F0EBC)($at) +/* 093BC8 80092FC8 8C380EBC */ lw $t8, %lo(jpt_800F0EBC)($at) /* 093BCC 80092FCC 03000008 */ jr $t8 /* 093BD0 80092FD0 00000000 */ nop glabel L80092FD4 diff --git a/asm/non_matchings/code_80091750/func_80093A5C.s b/asm/non_matchings/code_80091750/func_80093A5C.s index 47c876f03..acfa55b15 100644 --- a/asm/non_matchings/code_80091750/func_80093A5C.s +++ b/asm/non_matchings/code_80091750/func_80093A5C.s @@ -15,9 +15,9 @@ glabel func_80093A5C /* 09468C 80093A8C 2CA1000C */ sltiu $at, $a1, 0xc /* 094690 80093A90 10200028 */ beqz $at, .L80093B34 /* 094694 80093A94 00057880 */ sll $t7, $a1, 2 -/* 094698 80093A98 3C01800F */ lui $at, %hi(D_800F0F8C) +/* 094698 80093A98 3C01800F */ lui $at, %hi(jpt_800F0F8C) /* 09469C 80093A9C 002F0821 */ addu $at, $at, $t7 -/* 0946A0 80093AA0 8C2F0F8C */ lw $t7, %lo(D_800F0F8C)($at) +/* 0946A0 80093AA0 8C2F0F8C */ lw $t7, %lo(jpt_800F0F8C)($at) /* 0946A4 80093AA4 01E00008 */ jr $t7 /* 0946A8 80093AA8 00000000 */ nop glabel L80093AAC @@ -95,9 +95,9 @@ glabel L80093B34 .L80093BA8: /* 0947A8 80093BA8 10200018 */ beqz $at, .L80093C0C /* 0947AC 80093BAC 00047080 */ sll $t6, $a0, 2 -/* 0947B0 80093BB0 3C01800F */ lui $at, %hi(D_800F0FBC) +/* 0947B0 80093BB0 3C01800F */ lui $at, %hi(jpt_800F0FBC) /* 0947B4 80093BB4 002E0821 */ addu $at, $at, $t6 -/* 0947B8 80093BB8 8C2E0FBC */ lw $t6, %lo(D_800F0FBC)($at) +/* 0947B8 80093BB8 8C2E0FBC */ lw $t6, %lo(jpt_800F0FBC)($at) /* 0947BC 80093BBC 01C00008 */ jr $t6 /* 0947C0 80093BC0 00000000 */ nop glabel L80093BC4 diff --git a/asm/non_matchings/code_80091750/func_80094A64.s b/asm/non_matchings/code_80091750/func_80094A64.s index c41c4280a..1455106b1 100644 --- a/asm/non_matchings/code_80091750/func_80094A64.s +++ b/asm/non_matchings/code_80091750/func_80094A64.s @@ -85,9 +85,9 @@ glabel func_80094A64 /* 0957B0 80094BB0 2D410009 */ sltiu $at, $t2, 9 /* 0957B4 80094BB4 10200010 */ beqz $at, .L80094BF8 /* 0957B8 80094BB8 000A5080 */ sll $t2, $t2, 2 -/* 0957BC 80094BBC 3C01800F */ lui $at, %hi(D_800F0FEC) +/* 0957BC 80094BBC 3C01800F */ lui $at, %hi(jpt_800F0FEC) /* 0957C0 80094BC0 002A0821 */ addu $at, $at, $t2 -/* 0957C4 80094BC4 8C2A0FEC */ lw $t2, %lo(D_800F0FEC)($at) +/* 0957C4 80094BC4 8C2A0FEC */ lw $t2, %lo(jpt_800F0FEC)($at) /* 0957C8 80094BC8 01400008 */ jr $t2 /* 0957CC 80094BCC 00000000 */ nop glabel L80094BD0 diff --git a/asm/non_matchings/code_80091750/func_80094C60.s b/asm/non_matchings/code_80091750/func_80094C60.s index b812722cc..8eb168406 100644 --- a/asm/non_matchings/code_80091750/func_80094C60.s +++ b/asm/non_matchings/code_80091750/func_80094C60.s @@ -27,9 +27,9 @@ glabel func_80094C60 /* 0958C4 80094CC4 2DE1000E */ sltiu $at, $t7, 0xe /* 0958C8 80094CC8 10200219 */ beqz $at, .L80095530 /* 0958CC 80094CCC 000F7880 */ sll $t7, $t7, 2 -/* 0958D0 80094CD0 3C01800F */ lui $at, %hi(D_800F1010) +/* 0958D0 80094CD0 3C01800F */ lui $at, %hi(jpt_800F1010) /* 0958D4 80094CD4 002F0821 */ addu $at, $at, $t7 -/* 0958D8 80094CD8 8C2F1010 */ lw $t7, %lo(D_800F1010)($at) +/* 0958D8 80094CD8 8C2F1010 */ lw $t7, %lo(jpt_800F1010)($at) /* 0958DC 80094CDC 01E00008 */ jr $t7 /* 0958E0 80094CE0 00000000 */ nop glabel L80094CE4 diff --git a/asm/non_matchings/code_80091750/func_80095574.s b/asm/non_matchings/code_80091750/func_80095574.s index ddf2f1dd5..7153f9d23 100644 --- a/asm/non_matchings/code_80091750/func_80095574.s +++ b/asm/non_matchings/code_80091750/func_80095574.s @@ -31,9 +31,9 @@ glabel func_80095574 /* 0961E0 800955E0 2F210006 */ sltiu $at, $t9, 6 /* 0961E4 800955E4 1020002E */ beqz $at, .L800956A0 /* 0961E8 800955E8 0019C880 */ sll $t9, $t9, 2 -/* 0961EC 800955EC 3C01800F */ lui $at, %hi(D_800F1048) +/* 0961EC 800955EC 3C01800F */ lui $at, %hi(jpt_800F1048) /* 0961F0 800955F0 00390821 */ addu $at, $at, $t9 -/* 0961F4 800955F4 8C391048 */ lw $t9, %lo(D_800F1048)($at) +/* 0961F4 800955F4 8C391048 */ lw $t9, %lo(jpt_800F1048)($at) /* 0961F8 800955F8 03200008 */ jr $t9 /* 0961FC 800955FC 00000000 */ nop glabel L80095600 diff --git a/asm/non_matchings/code_80091750/func_8009BA74.s b/asm/non_matchings/code_80091750/func_8009BA74.s index 07140d2fc..fc4d1e5f4 100644 --- a/asm/non_matchings/code_80091750/func_8009BA74.s +++ b/asm/non_matchings/code_80091750/func_8009BA74.s @@ -30,9 +30,9 @@ glabel func_8009BA74 /* 09C6E0 8009BAE0 2DE10005 */ sltiu $at, $t7, 5 /* 09C6E4 8009BAE4 10200026 */ beqz $at, .L8009BB80 /* 09C6E8 8009BAE8 000F7880 */ sll $t7, $t7, 2 -/* 09C6EC 8009BAEC 3C01800F */ lui $at, %hi(D_800F1060) +/* 09C6EC 8009BAEC 3C01800F */ lui $at, %hi(jpt_800F1060) /* 09C6F0 8009BAF0 002F0821 */ addu $at, $at, $t7 -/* 09C6F4 8009BAF4 8C2F1060 */ lw $t7, %lo(D_800F1060)($at) +/* 09C6F4 8009BAF4 8C2F1060 */ lw $t7, %lo(jpt_800F1060)($at) /* 09C6F8 8009BAF8 01E00008 */ jr $t7 /* 09C6FC 8009BAFC 00000000 */ nop glabel L8009BB00 diff --git a/asm/non_matchings/code_80091750/func_8009CA6C.s b/asm/non_matchings/code_80091750/func_8009CA6C.s index 770708d2f..a038d8f1a 100644 --- a/asm/non_matchings/code_80091750/func_8009CA6C.s +++ b/asm/non_matchings/code_80091750/func_8009CA6C.s @@ -60,9 +60,9 @@ glabel func_8009CA6C /* 09D74C 8009CB4C 2D010009 */ sltiu $at, $t0, 9 /* 09D750 8009CB50 10200020 */ beqz $at, .L8009CBD4 /* 09D754 8009CB54 00084080 */ sll $t0, $t0, 2 -/* 09D758 8009CB58 3C01800F */ lui $at, %hi(D_800F1078) +/* 09D758 8009CB58 3C01800F */ lui $at, %hi(jpt_800F1078) /* 09D75C 8009CB5C 00280821 */ addu $at, $at, $t0 -/* 09D760 8009CB60 8C281078 */ lw $t0, %lo(D_800F1078)($at) +/* 09D760 8009CB60 8C281078 */ lw $t0, %lo(jpt_800F1078)($at) /* 09D764 8009CB64 01000008 */ jr $t0 /* 09D768 8009CB68 00000000 */ nop glabel L8009CB6C diff --git a/asm/non_matchings/code_80091750/func_8009CE64.s b/asm/non_matchings/code_80091750/func_8009CE64.s index d7ca0cbf0..cbaef9037 100644 --- a/asm/non_matchings/code_80091750/func_8009CE64.s +++ b/asm/non_matchings/code_80091750/func_8009CE64.s @@ -137,9 +137,9 @@ glabel func_8009CE64 /* 09DC4C 8009D04C 2DE10021 */ sltiu $at, $t7, 0x21 /* 09DC50 8009D050 10200016 */ beqz $at, .L8009D0AC /* 09DC54 8009D054 000F7880 */ sll $t7, $t7, 2 -/* 09DC58 8009D058 3C01800F */ lui $at, %hi(D_800F109C) +/* 09DC58 8009D058 3C01800F */ lui $at, %hi(jpt_800F109C) /* 09DC5C 8009D05C 002F0821 */ addu $at, $at, $t7 -/* 09DC60 8009D060 8C2F109C */ lw $t7, %lo(D_800F109C)($at) +/* 09DC60 8009D060 8C2F109C */ lw $t7, %lo(jpt_800F109C)($at) /* 09DC64 8009D064 01E00008 */ jr $t7 /* 09DC68 8009D068 00000000 */ nop glabel L8009D06C @@ -181,9 +181,9 @@ glabel L8009D0AC /* 09DCDC 8009D0DC 2DE10005 */ sltiu $at, $t7, 5 /* 09DCE0 8009D0E0 102001A2 */ beqz $at, .L8009D76C /* 09DCE4 8009D0E4 000F7880 */ sll $t7, $t7, 2 -/* 09DCE8 8009D0E8 3C01800F */ lui $at, %hi(D_800F1120) +/* 09DCE8 8009D0E8 3C01800F */ lui $at, %hi(jpt_800F1120) /* 09DCEC 8009D0EC 002F0821 */ addu $at, $at, $t7 -/* 09DCF0 8009D0F0 8C2F1120 */ lw $t7, %lo(D_800F1120)($at) +/* 09DCF0 8009D0F0 8C2F1120 */ lw $t7, %lo(jpt_800F1120)($at) /* 09DCF4 8009D0F4 01E00008 */ jr $t7 /* 09DCF8 8009D0F8 00000000 */ nop glabel L8009D0FC @@ -244,9 +244,9 @@ glabel L8009D170 /* 09DDBC 8009D1BC 2F210005 */ sltiu $at, $t9, 5 /* 09DDC0 8009D1C0 102000DE */ beqz $at, .L8009D53C /* 09DDC4 8009D1C4 0019C880 */ sll $t9, $t9, 2 -/* 09DDC8 8009D1C8 3C01800F */ lui $at, %hi(D_800F1134) +/* 09DDC8 8009D1C8 3C01800F */ lui $at, %hi(jpt_800F1134) /* 09DDCC 8009D1CC 00390821 */ addu $at, $at, $t9 -/* 09DDD0 8009D1D0 8C391134 */ lw $t9, %lo(D_800F1134)($at) +/* 09DDD0 8009D1D0 8C391134 */ lw $t9, %lo(jpt_800F1134)($at) /* 09DDD4 8009D1D4 03200008 */ jr $t9 /* 09DDD8 8009D1D8 00000000 */ nop glabel L8009D1DC @@ -289,9 +289,9 @@ glabel L8009D22C /* 09DE60 8009D260 2C610006 */ sltiu $at, $v1, 6 /* 09DE64 8009D264 10200084 */ beqz $at, .L8009D478 /* 09DE68 8009D268 00037880 */ sll $t7, $v1, 2 -/* 09DE6C 8009D26C 3C01800F */ lui $at, %hi(D_800F1148) +/* 09DE6C 8009D26C 3C01800F */ lui $at, %hi(jpt_800F1148) /* 09DE70 8009D270 002F0821 */ addu $at, $at, $t7 -/* 09DE74 8009D274 8C2F1148 */ lw $t7, %lo(D_800F1148)($at) +/* 09DE74 8009D274 8C2F1148 */ lw $t7, %lo(jpt_800F1148)($at) /* 09DE78 8009D278 01E00008 */ jr $t7 /* 09DE7C 8009D27C 00000000 */ nop glabel L8009D280 diff --git a/asm/non_matchings/code_80091750/func_8009E650.s b/asm/non_matchings/code_80091750/func_8009E650.s index bbad489fb..4209ce446 100644 --- a/asm/non_matchings/code_80091750/func_8009E650.s +++ b/asm/non_matchings/code_80091750/func_8009E650.s @@ -45,9 +45,9 @@ glabel func_8009E650 /* 09F2EC 8009E6EC 2DE1003F */ sltiu $at, $t7, 0x3f /* 09F2F0 8009E6F0 102003B7 */ beqz $at, .L8009F5D0 /* 09F2F4 8009E6F4 000F7880 */ sll $t7, $t7, 2 -/* 09F2F8 8009E6F8 3C01800F */ lui $at, %hi(D_800F1160) +/* 09F2F8 8009E6F8 3C01800F */ lui $at, %hi(jpt_800F1160) /* 09F2FC 8009E6FC 002F0821 */ addu $at, $at, $t7 -/* 09F300 8009E700 8C2F1160 */ lw $t7, %lo(D_800F1160)($at) +/* 09F300 8009E700 8C2F1160 */ lw $t7, %lo(jpt_800F1160)($at) /* 09F304 8009E704 01E00008 */ jr $t7 /* 09F308 8009E708 00000000 */ nop .L8009E70C: @@ -64,9 +64,9 @@ glabel func_8009E650 /* 09F330 8009E730 2DC100AA */ sltiu $at, $t6, 0xaa /* 09F334 8009E734 102003A6 */ beqz $at, .L8009F5D0 /* 09F338 8009E738 000E7080 */ sll $t6, $t6, 2 -/* 09F33C 8009E73C 3C01800F */ lui $at, %hi(D_800F125C) +/* 09F33C 8009E73C 3C01800F */ lui $at, %hi(jpt_800F125C) /* 09F340 8009E740 002E0821 */ addu $at, $at, $t6 -/* 09F344 8009E744 8C2E125C */ lw $t6, %lo(D_800F125C)($at) +/* 09F344 8009E744 8C2E125C */ lw $t6, %lo(jpt_800F125C)($at) /* 09F348 8009E748 01C00008 */ jr $t6 /* 09F34C 8009E74C 00000000 */ nop .L8009E750: @@ -74,9 +74,9 @@ glabel func_8009E650 /* 09F354 8009E754 2F010037 */ sltiu $at, $t8, 0x37 /* 09F358 8009E758 1020039D */ beqz $at, .L8009F5D0 /* 09F35C 8009E75C 0018C080 */ sll $t8, $t8, 2 -/* 09F360 8009E760 3C01800F */ lui $at, %hi(D_800F1504) +/* 09F360 8009E760 3C01800F */ lui $at, %hi(jpt_800F1504) /* 09F364 8009E764 00380821 */ addu $at, $at, $t8 -/* 09F368 8009E768 8C381504 */ lw $t8, %lo(D_800F1504)($at) +/* 09F368 8009E768 8C381504 */ lw $t8, %lo(jpt_800F1504)($at) /* 09F36C 8009E76C 03000008 */ jr $t8 /* 09F370 8009E770 00000000 */ nop glabel L8009E774 diff --git a/asm/non_matchings/code_80091750/func_8009F5E0.s b/asm/non_matchings/code_80091750/func_8009F5E0.s index fb31a3a02..ff52c1fba 100644 --- a/asm/non_matchings/code_80091750/func_8009F5E0.s +++ b/asm/non_matchings/code_80091750/func_8009F5E0.s @@ -25,18 +25,18 @@ glabel func_8009F5E0 /* 0A023C 8009F63C 2F21003F */ sltiu $at, $t9, 0x3f /* 0A0240 8009F640 102004A0 */ beqz $at, .L800A08C4 /* 0A0244 8009F644 0019C880 */ sll $t9, $t9, 2 -/* 0A0248 8009F648 3C01800F */ lui $at, %hi(D_800F15E4) +/* 0A0248 8009F648 3C01800F */ lui $at, %hi(jpt_800F15E4) /* 0A024C 8009F64C 00390821 */ addu $at, $at, $t9 -/* 0A0250 8009F650 8C3915E4 */ lw $t9, %lo(D_800F15E4)($at) +/* 0A0250 8009F650 8C3915E4 */ lw $t9, %lo(jpt_800F15E4)($at) /* 0A0254 8009F654 03200008 */ jr $t9 /* 0A0258 8009F658 00000000 */ nop .L8009F65C: /* 0A025C 8009F65C 2D210006 */ sltiu $at, $t1, 6 /* 0A0260 8009F660 10200498 */ beqz $at, .L800A08C4 /* 0A0264 8009F664 00094880 */ sll $t1, $t1, 2 -/* 0A0268 8009F668 3C01800F */ lui $at, %hi(D_800F16E0) +/* 0A0268 8009F668 3C01800F */ lui $at, %hi(jpt_800F16E0) /* 0A026C 8009F66C 00290821 */ addu $at, $at, $t1 -/* 0A0270 8009F670 8C2916E0 */ lw $t1, %lo(D_800F16E0)($at) +/* 0A0270 8009F670 8C2916E0 */ lw $t1, %lo(jpt_800F16E0)($at) /* 0A0274 8009F674 01200008 */ jr $t1 /* 0A0278 8009F678 00000000 */ nop .L8009F67C: @@ -47,18 +47,18 @@ glabel func_8009F5E0 /* 0A028C 8009F68C 2D4100BD */ sltiu $at, $t2, 0xbd /* 0A0290 8009F690 1020048C */ beqz $at, .L800A08C4 /* 0A0294 8009F694 000A5080 */ sll $t2, $t2, 2 -/* 0A0298 8009F698 3C01800F */ lui $at, %hi(D_800F16F8) +/* 0A0298 8009F698 3C01800F */ lui $at, %hi(jpt_800F16F8) /* 0A029C 8009F69C 002A0821 */ addu $at, $at, $t2 -/* 0A02A0 8009F6A0 8C2A16F8 */ lw $t2, %lo(D_800F16F8)($at) +/* 0A02A0 8009F6A0 8C2A16F8 */ lw $t2, %lo(jpt_800F16F8)($at) /* 0A02A4 8009F6A4 01400008 */ jr $t2 /* 0A02A8 8009F6A8 00000000 */ nop .L8009F6AC: /* 0A02AC 8009F6AC 2D610037 */ sltiu $at, $t3, 0x37 /* 0A02B0 8009F6B0 10200484 */ beqz $at, .L800A08C4 /* 0A02B4 8009F6B4 000B5880 */ sll $t3, $t3, 2 -/* 0A02B8 8009F6B8 3C01800F */ lui $at, %hi(D_800F19EC) +/* 0A02B8 8009F6B8 3C01800F */ lui $at, %hi(jpt_800F19EC) /* 0A02BC 8009F6BC 002B0821 */ addu $at, $at, $t3 -/* 0A02C0 8009F6C0 8C2B19EC */ lw $t3, %lo(D_800F19EC)($at) +/* 0A02C0 8009F6C0 8C2B19EC */ lw $t3, %lo(jpt_800F19EC)($at) /* 0A02C4 8009F6C4 01600008 */ jr $t3 /* 0A02C8 8009F6C8 00000000 */ nop glabel L8009F6CC @@ -618,9 +618,9 @@ glabel L8009FE9C /* 0A0AEC 8009FEEC 10200037 */ beqz $at, .L8009FFCC /* 0A0AF0 8009FEF0 8CA52B70 */ lw $a1, %lo(D_800F2B70)($a1) # 0x2b70($a1) /* 0A0AF4 8009FEF4 0018C080 */ sll $t8, $t8, 2 -/* 0A0AF8 8009FEF8 3C01800F */ lui $at, %hi(D_800F1AD0) +/* 0A0AF8 8009FEF8 3C01800F */ lui $at, %hi(jpt_800F1AD0) /* 0A0AFC 8009FEFC 00380821 */ addu $at, $at, $t8 -/* 0A0B00 8009FF00 8C381AD0 */ lw $t8, %lo(D_800F1AD0)($at) +/* 0A0B00 8009FF00 8C381AD0 */ lw $t8, %lo(jpt_800F1AD0)($at) /* 0A0B04 8009FF04 03000008 */ jr $t8 /* 0A0B08 8009FF08 00000000 */ nop glabel L8009FF0C diff --git a/asm/non_matchings/code_80091750/func_800A0FA4.s b/asm/non_matchings/code_80091750/func_800A0FA4.s index db842bd7b..0d654e02e 100644 --- a/asm/non_matchings/code_80091750/func_800A0FA4.s +++ b/asm/non_matchings/code_80091750/func_800A0FA4.s @@ -9,9 +9,9 @@ glabel func_800A0FA4 /* 0A1BC0 800A0FC0 2DC10005 */ sltiu $at, $t6, 5 /* 0A1BC4 800A0FC4 1020003B */ beqz $at, .L800A10B4 /* 0A1BC8 800A0FC8 000E7080 */ sll $t6, $t6, 2 -/* 0A1BCC 800A0FCC 3C01800F */ lui $at, %hi(D_800F1B00) +/* 0A1BCC 800A0FCC 3C01800F */ lui $at, %hi(jpt_800F1B00) /* 0A1BD0 800A0FD0 002E0821 */ addu $at, $at, $t6 -/* 0A1BD4 800A0FD4 8C2E1B00 */ lw $t6, %lo(D_800F1B00)($at) +/* 0A1BD4 800A0FD4 8C2E1B00 */ lw $t6, %lo(jpt_800F1B00)($at) /* 0A1BD8 800A0FD8 01C00008 */ jr $t6 /* 0A1BDC 800A0FDC 00000000 */ nop glabel L800A0FE0 diff --git a/asm/non_matchings/code_80091750/func_800A12BC.s b/asm/non_matchings/code_80091750/func_800A12BC.s index d20eee838..cb20e41f6 100644 --- a/asm/non_matchings/code_80091750/func_800A12BC.s +++ b/asm/non_matchings/code_80091750/func_800A12BC.s @@ -7,9 +7,9 @@ glabel func_800A12BC /* 0A1ED0 800A12D0 2DC10005 */ sltiu $at, $t6, 5 /* 0A1ED4 800A12D4 10200019 */ beqz $at, .L800A133C /* 0A1ED8 800A12D8 000E7080 */ sll $t6, $t6, 2 -/* 0A1EDC 800A12DC 3C01800F */ lui $at, %hi(D_800F1B18) +/* 0A1EDC 800A12DC 3C01800F */ lui $at, %hi(jpt_800F1B18) /* 0A1EE0 800A12E0 002E0821 */ addu $at, $at, $t6 -/* 0A1EE4 800A12E4 8C2E1B18 */ lw $t6, %lo(D_800F1B18)($at) +/* 0A1EE4 800A12E4 8C2E1B18 */ lw $t6, %lo(jpt_800F1B18)($at) /* 0A1EE8 800A12E8 01C00008 */ jr $t6 /* 0A1EEC 800A12EC 00000000 */ nop glabel L800A12F0 @@ -54,9 +54,9 @@ glabel L800A1310 /* 0A1F7C 800A137C 2DC10005 */ sltiu $at, $t6, 5 /* 0A1F80 800A1380 10200029 */ beqz $at, .L800A1428 /* 0A1F84 800A1384 000E7080 */ sll $t6, $t6, 2 -/* 0A1F88 800A1388 3C01800F */ lui $at, %hi(D_800F1B2C) +/* 0A1F88 800A1388 3C01800F */ lui $at, %hi(jpt_800F1B2C) /* 0A1F8C 800A138C 002E0821 */ addu $at, $at, $t6 -/* 0A1F90 800A1390 8C2E1B2C */ lw $t6, %lo(D_800F1B2C)($at) +/* 0A1F90 800A1390 8C2E1B2C */ lw $t6, %lo(jpt_800F1B2C)($at) /* 0A1F94 800A1394 01C00008 */ jr $t6 /* 0A1F98 800A1398 00000000 */ nop glabel L800A139C diff --git a/asm/non_matchings/code_80091750/func_800A143C.s b/asm/non_matchings/code_80091750/func_800A143C.s index cdcdfbaf6..0be1eddec 100644 --- a/asm/non_matchings/code_80091750/func_800A143C.s +++ b/asm/non_matchings/code_80091750/func_800A143C.s @@ -7,9 +7,9 @@ glabel func_800A143C /* 0A2050 800A1450 2DC10005 */ sltiu $at, $t6, 5 /* 0A2054 800A1454 10200025 */ beqz $at, .L800A14EC /* 0A2058 800A1458 000E7080 */ sll $t6, $t6, 2 -/* 0A205C 800A145C 3C01800F */ lui $at, %hi(D_800F1B40) +/* 0A205C 800A145C 3C01800F */ lui $at, %hi(jpt_800F1B40) /* 0A2060 800A1460 002E0821 */ addu $at, $at, $t6 -/* 0A2064 800A1464 8C2E1B40 */ lw $t6, %lo(D_800F1B40)($at) +/* 0A2064 800A1464 8C2E1B40 */ lw $t6, %lo(jpt_800F1B40)($at) /* 0A2068 800A1468 01C00008 */ jr $t6 /* 0A206C 800A146C 00000000 */ nop glabel L800A1470 diff --git a/asm/non_matchings/code_80091750/func_800A1FB0.s b/asm/non_matchings/code_80091750/func_800A1FB0.s index 2009e1e12..f8b9229e4 100644 --- a/asm/non_matchings/code_80091750/func_800A1FB0.s +++ b/asm/non_matchings/code_80091750/func_800A1FB0.s @@ -35,9 +35,9 @@ glabel func_800A1FB0 /* 0A2C34 800A2034 2F010033 */ sltiu $at, $t8, 0x33 /* 0A2C38 800A2038 10200310 */ beqz $at, .L800A2C7C /* 0A2C3C 800A203C 0018C080 */ sll $t8, $t8, 2 -/* 0A2C40 800A2040 3C01800F */ lui $at, %hi(D_800F1B5C) +/* 0A2C40 800A2040 3C01800F */ lui $at, %hi(jpt_800F1B5C) /* 0A2C44 800A2044 00380821 */ addu $at, $at, $t8 -/* 0A2C48 800A2048 8C381B5C */ lw $t8, %lo(D_800F1B5C)($at) +/* 0A2C48 800A2048 8C381B5C */ lw $t8, %lo(jpt_800F1B5C)($at) /* 0A2C4C 800A204C 03000008 */ jr $t8 /* 0A2C50 800A2050 00000000 */ nop glabel L800A2054 @@ -897,9 +897,9 @@ glabel L800A2C7C /* 0A3880 800A2C80 2DE10012 */ sltiu $at, $t7, 0x12 /* 0A3884 800A2C84 1020000D */ beqz $at, .L800A2CBC /* 0A3888 800A2C88 000F7880 */ sll $t7, $t7, 2 -/* 0A388C 800A2C8C 3C01800F */ lui $at, %hi(D_800F1C48) +/* 0A388C 800A2C8C 3C01800F */ lui $at, %hi(jpt_800F1C48) /* 0A3890 800A2C90 002F0821 */ addu $at, $at, $t7 -/* 0A3894 800A2C94 8C2F1C48 */ lw $t7, %lo(D_800F1C48)($at) +/* 0A3894 800A2C94 8C2F1C48 */ lw $t7, %lo(jpt_800F1C48)($at) /* 0A3898 800A2C98 01E00008 */ jr $t7 /* 0A389C 800A2C9C 00000000 */ nop glabel L800A2CA0 diff --git a/asm/non_matchings/code_80091750/func_800A3E60.s b/asm/non_matchings/code_80091750/func_800A3E60.s index 6672c2ea7..43b06df0e 100644 --- a/asm/non_matchings/code_80091750/func_800A3E60.s +++ b/asm/non_matchings/code_80091750/func_800A3E60.s @@ -76,9 +76,9 @@ glabel func_800A3E60 /* 0A4B84 800A3F84 2D21001E */ sltiu $at, $t1, 0x1e /* 0A4B88 800A3F88 1020013B */ beqz $at, .L800A4478 /* 0A4B8C 800A3F8C 00094880 */ sll $t1, $t1, 2 -/* 0A4B90 800A3F90 3C01800F */ lui $at, %hi(D_800F1CD0) +/* 0A4B90 800A3F90 3C01800F */ lui $at, %hi(jpt_800F1CD0) /* 0A4B94 800A3F94 00290821 */ addu $at, $at, $t1 -/* 0A4B98 800A3F98 8C291CD0 */ lw $t1, %lo(D_800F1CD0)($at) +/* 0A4B98 800A3F98 8C291CD0 */ lw $t1, %lo(jpt_800F1CD0)($at) /* 0A4B9C 800A3F9C 01200008 */ jr $t1 /* 0A4BA0 800A3FA0 00000000 */ nop glabel L800A3FA4 @@ -421,9 +421,9 @@ glabel L800A4478 /* 0A507C 800A447C 2F01001A */ sltiu $at, $t8, 0x1a /* 0A5080 800A4480 10200029 */ beqz $at, .L800A4528 /* 0A5084 800A4484 0018C080 */ sll $t8, $t8, 2 -/* 0A5088 800A4488 3C01800F */ lui $at, %hi(D_800F1D5C) +/* 0A5088 800A4488 3C01800F */ lui $at, %hi(jpt_800F1D5C) /* 0A508C 800A448C 00380821 */ addu $at, $at, $t8 -/* 0A5090 800A4490 8C381D5C */ lw $t8, %lo(D_800F1D5C)($at) +/* 0A5090 800A4490 8C381D5C */ lw $t8, %lo(jpt_800F1D5C)($at) /* 0A5094 800A4494 03000008 */ jr $t8 /* 0A5098 800A4498 00000000 */ nop glabel L800A449C diff --git a/asm/non_matchings/code_80091750/func_800A5738.s b/asm/non_matchings/code_80091750/func_800A5738.s index 15f8692f5..f72bd3256 100644 --- a/asm/non_matchings/code_80091750/func_800A5738.s +++ b/asm/non_matchings/code_80091750/func_800A5738.s @@ -129,9 +129,9 @@ glabel func_800A5738 /* 0A6520 800A5920 2DA10029 */ sltiu $at, $t5, 0x29 /* 0A6524 800A5924 1020019A */ beqz $at, .L800A5F90 /* 0A6528 800A5928 000D6880 */ sll $t5, $t5, 2 -/* 0A652C 800A592C 3C01800F */ lui $at, %hi(D_800F1DDC) +/* 0A652C 800A592C 3C01800F */ lui $at, %hi(jpt_800F1DDC) /* 0A6530 800A5930 002D0821 */ addu $at, $at, $t5 -/* 0A6534 800A5934 8C2D1DDC */ lw $t5, %lo(D_800F1DDC)($at) +/* 0A6534 800A5934 8C2D1DDC */ lw $t5, %lo(jpt_800F1DDC)($at) /* 0A6538 800A5938 01A00008 */ jr $t5 /* 0A653C 800A593C 00000000 */ nop glabel L800A5940 @@ -564,9 +564,9 @@ glabel L800A5F90 /* 0A6B94 800A5F94 2DC1001A */ sltiu $at, $t6, 0x1a /* 0A6B98 800A5F98 1020001E */ beqz $at, .L800A6014 /* 0A6B9C 800A5F9C 000E7080 */ sll $t6, $t6, 2 -/* 0A6BA0 800A5FA0 3C01800F */ lui $at, %hi(D_800F1E9C) +/* 0A6BA0 800A5FA0 3C01800F */ lui $at, %hi(jpt_800F1E9C) /* 0A6BA4 800A5FA4 002E0821 */ addu $at, $at, $t6 -/* 0A6BA8 800A5FA8 8C2E1E9C */ lw $t6, %lo(D_800F1E9C)($at) +/* 0A6BA8 800A5FA8 8C2E1E9C */ lw $t6, %lo(jpt_800F1E9C)($at) /* 0A6BAC 800A5FAC 01C00008 */ jr $t6 /* 0A6BB0 800A5FB0 00000000 */ nop glabel L800A5FB4 diff --git a/asm/non_matchings/code_80091750/func_800A7A4C.s b/asm/non_matchings/code_80091750/func_800A7A4C.s index 661047994..32438c89e 100644 --- a/asm/non_matchings/code_80091750/func_800A7A4C.s +++ b/asm/non_matchings/code_80091750/func_800A7A4C.s @@ -46,18 +46,18 @@ glabel func_800A7A4C /* 0A86EC 800A7AEC 2DC1003F */ sltiu $at, $t6, 0x3f /* 0A86F0 800A7AF0 1020019E */ beqz $at, .L800A816C /* 0A86F4 800A7AF4 000E7080 */ sll $t6, $t6, 2 -/* 0A86F8 800A7AF8 3C01800F */ lui $at, %hi(D_800F1F38) +/* 0A86F8 800A7AF8 3C01800F */ lui $at, %hi(jpt_800F1F38) /* 0A86FC 800A7AFC 002E0821 */ addu $at, $at, $t6 -/* 0A8700 800A7B00 8C2E1F38 */ lw $t6, %lo(D_800F1F38)($at) +/* 0A8700 800A7B00 8C2E1F38 */ lw $t6, %lo(jpt_800F1F38)($at) /* 0A8704 800A7B04 01C00008 */ jr $t6 /* 0A8708 800A7B08 00000000 */ nop .L800A7B0C: /* 0A870C 800A7B0C 2DE10006 */ sltiu $at, $t7, 6 /* 0A8710 800A7B10 10200196 */ beqz $at, .L800A816C /* 0A8714 800A7B14 000F7880 */ sll $t7, $t7, 2 -/* 0A8718 800A7B18 3C01800F */ lui $at, %hi(D_800F2034) +/* 0A8718 800A7B18 3C01800F */ lui $at, %hi(jpt_800F2034) /* 0A871C 800A7B1C 002F0821 */ addu $at, $at, $t7 -/* 0A8720 800A7B20 8C2F2034 */ lw $t7, %lo(D_800F2034)($at) +/* 0A8720 800A7B20 8C2F2034 */ lw $t7, %lo(jpt_800F2034)($at) /* 0A8724 800A7B24 01E00008 */ jr $t7 /* 0A8728 800A7B28 00000000 */ nop .L800A7B2C: @@ -67,18 +67,18 @@ glabel func_800A7A4C /* 0A8738 800A7B38 2F0100BC */ sltiu $at, $t8, 0xbc /* 0A873C 800A7B3C 1020018B */ beqz $at, .L800A816C /* 0A8740 800A7B40 0018C080 */ sll $t8, $t8, 2 -/* 0A8744 800A7B44 3C01800F */ lui $at, %hi(D_800F204C) +/* 0A8744 800A7B44 3C01800F */ lui $at, %hi(jpt_800F204C) /* 0A8748 800A7B48 00380821 */ addu $at, $at, $t8 -/* 0A874C 800A7B4C 8C38204C */ lw $t8, %lo(D_800F204C)($at) +/* 0A874C 800A7B4C 8C38204C */ lw $t8, %lo(jpt_800F204C)($at) /* 0A8750 800A7B50 03000008 */ jr $t8 /* 0A8754 800A7B54 00000000 */ nop .L800A7B58: /* 0A8758 800A7B58 2C410038 */ sltiu $at, $v0, 0x38 /* 0A875C 800A7B5C 10200183 */ beqz $at, .L800A816C /* 0A8760 800A7B60 0002C880 */ sll $t9, $v0, 2 -/* 0A8764 800A7B64 3C01800F */ lui $at, %hi(D_800F233C) +/* 0A8764 800A7B64 3C01800F */ lui $at, %hi(jpt_800F233C) /* 0A8768 800A7B68 00390821 */ addu $at, $at, $t9 -/* 0A876C 800A7B6C 8C39233C */ lw $t9, %lo(D_800F233C)($at) +/* 0A876C 800A7B6C 8C39233C */ lw $t9, %lo(jpt_800F233C)($at) /* 0A8770 800A7B70 03200008 */ jr $t9 /* 0A8774 800A7B74 00000000 */ nop glabel L800A7B78 @@ -241,9 +241,9 @@ glabel L800A7D9C /* 0A89A8 800A7DA8 2D010008 */ sltiu $at, $t0, 8 /* 0A89AC 800A7DAC 102000EF */ beqz $at, .L800A816C /* 0A89B0 800A7DB0 00084080 */ sll $t0, $t0, 2 -/* 0A89B4 800A7DB4 3C01800F */ lui $at, %hi(D_800F2440) +/* 0A89B4 800A7DB4 3C01800F */ lui $at, %hi(jpt_800F2440) /* 0A89B8 800A7DB8 00280821 */ addu $at, $at, $t0 -/* 0A89BC 800A7DBC 8C282440 */ lw $t0, %lo(D_800F2440)($at) +/* 0A89BC 800A7DBC 8C282440 */ lw $t0, %lo(jpt_800F2440)($at) /* 0A89C0 800A7DC0 01000008 */ jr $t0 /* 0A89C4 800A7DC4 00000000 */ nop glabel L800A7DC8 @@ -270,9 +270,9 @@ glabel L800A7E00 /* 0A8A0C 800A7E0C 2D410008 */ sltiu $at, $t2, 8 /* 0A8A10 800A7E10 1020000C */ beqz $at, .L800A7E44 /* 0A8A14 800A7E14 000A5080 */ sll $t2, $t2, 2 -/* 0A8A18 800A7E18 3C01800F */ lui $at, %hi(D_800F2460) +/* 0A8A18 800A7E18 3C01800F */ lui $at, %hi(jpt_800F2460) /* 0A8A1C 800A7E1C 002A0821 */ addu $at, $at, $t2 -/* 0A8A20 800A7E20 8C2A2460 */ lw $t2, %lo(D_800F2460)($at) +/* 0A8A20 800A7E20 8C2A2460 */ lw $t2, %lo(jpt_800F2460)($at) /* 0A8A24 800A7E24 01400008 */ jr $t2 /* 0A8A28 800A7E28 00000000 */ nop glabel L800A7E2C @@ -311,9 +311,9 @@ glabel L800A7E84 /* 0A8A94 800A7E94 2D810008 */ sltiu $at, $t4, 8 /* 0A8A98 800A7E98 10200008 */ beqz $at, .L800A7EBC /* 0A8A9C 800A7E9C 000C6080 */ sll $t4, $t4, 2 -/* 0A8AA0 800A7EA0 3C01800F */ lui $at, %hi(D_800F2480) +/* 0A8AA0 800A7EA0 3C01800F */ lui $at, %hi(jpt_800F2480) /* 0A8AA4 800A7EA4 002C0821 */ addu $at, $at, $t4 -/* 0A8AA8 800A7EA8 8C2C2480 */ lw $t4, %lo(D_800F2480)($at) +/* 0A8AA8 800A7EA8 8C2C2480 */ lw $t4, %lo(jpt_800F2480)($at) /* 0A8AAC 800A7EAC 01800008 */ jr $t4 /* 0A8AB0 800A7EB0 00000000 */ nop glabel L800A7EB4 diff --git a/asm/non_matchings/code_80091750/func_800A9710.s b/asm/non_matchings/code_80091750/func_800A9710.s index a1aabbea3..832964fc1 100644 --- a/asm/non_matchings/code_80091750/func_800A9710.s +++ b/asm/non_matchings/code_80091750/func_800A9710.s @@ -8,9 +8,9 @@ glabel func_800A9710 /* 0AA328 800A9728 10200011 */ beqz $at, .L800A9770 /* 0AA32C 800A972C 00803825 */ move $a3, $a0 /* 0AA330 800A9730 000F7880 */ sll $t7, $t7, 2 -/* 0AA334 800A9734 3C01800F */ lui $at, %hi(D_800F24C8) +/* 0AA334 800A9734 3C01800F */ lui $at, %hi(jpt_800F24C8) /* 0AA338 800A9738 002F0821 */ addu $at, $at, $t7 -/* 0AA33C 800A973C 8C2F24C8 */ lw $t7, %lo(D_800F24C8)($at) +/* 0AA33C 800A973C 8C2F24C8 */ lw $t7, %lo(jpt_800F24C8)($at) /* 0AA340 800A9740 01E00008 */ jr $t7 /* 0AA344 800A9744 00000000 */ nop glabel L800A9748 diff --git a/asm/non_matchings/code_80091750/func_800A9B9C.s b/asm/non_matchings/code_80091750/func_800A9B9C.s index 7c5102a9f..a128797bd 100644 --- a/asm/non_matchings/code_80091750/func_800A9B9C.s +++ b/asm/non_matchings/code_80091750/func_800A9B9C.s @@ -5,9 +5,9 @@ glabel func_800A9B9C /* 0AA7A8 800A9BA8 2DC10005 */ sltiu $at, $t6, 5 /* 0AA7AC 800A9BAC 10200020 */ beqz $at, .L800A9C30 /* 0AA7B0 800A9BB0 000E7080 */ sll $t6, $t6, 2 -/* 0AA7B4 800A9BB4 3C01800F */ lui $at, %hi(D_800F24E8) +/* 0AA7B4 800A9BB4 3C01800F */ lui $at, %hi(jpt_800F24E8) /* 0AA7B8 800A9BB8 002E0821 */ addu $at, $at, $t6 -/* 0AA7BC 800A9BBC 8C2E24E8 */ lw $t6, %lo(D_800F24E8)($at) +/* 0AA7BC 800A9BBC 8C2E24E8 */ lw $t6, %lo(jpt_800F24E8)($at) /* 0AA7C0 800A9BC0 01C00008 */ jr $t6 /* 0AA7C4 800A9BC4 00000000 */ nop glabel L800A9BC8 diff --git a/asm/non_matchings/code_80091750/func_800A9C40.s b/asm/non_matchings/code_80091750/func_800A9C40.s index 4e89f44fb..3cb9a068a 100644 --- a/asm/non_matchings/code_80091750/func_800A9C40.s +++ b/asm/non_matchings/code_80091750/func_800A9C40.s @@ -5,9 +5,9 @@ glabel func_800A9C40 /* 0AA84C 800A9C4C 2DC10005 */ sltiu $at, $t6, 5 /* 0AA850 800A9C50 1020003E */ beqz $at, .L800A9D4C /* 0AA854 800A9C54 000E7080 */ sll $t6, $t6, 2 -/* 0AA858 800A9C58 3C01800F */ lui $at, %hi(D_800F24FC) +/* 0AA858 800A9C58 3C01800F */ lui $at, %hi(jpt_800F24FC) /* 0AA85C 800A9C5C 002E0821 */ addu $at, $at, $t6 -/* 0AA860 800A9C60 8C2E24FC */ lw $t6, %lo(D_800F24FC)($at) +/* 0AA860 800A9C60 8C2E24FC */ lw $t6, %lo(jpt_800F24FC)($at) /* 0AA864 800A9C64 01C00008 */ jr $t6 /* 0AA868 800A9C68 00000000 */ nop glabel L800A9C6C diff --git a/asm/non_matchings/code_80091750/func_800A9D5C.s b/asm/non_matchings/code_80091750/func_800A9D5C.s index c50d9c56a..185b01952 100644 --- a/asm/non_matchings/code_80091750/func_800A9D5C.s +++ b/asm/non_matchings/code_80091750/func_800A9D5C.s @@ -17,9 +17,9 @@ glabel func_800A9D5C /* 0AA990 800A9D90 2D210005 */ sltiu $at, $t1, 5 /* 0AA994 800A9D94 1020002C */ beqz $at, .L800A9E48 /* 0AA998 800A9D98 00094880 */ sll $t1, $t1, 2 -/* 0AA99C 800A9D9C 3C01800F */ lui $at, %hi(D_800F2510) +/* 0AA99C 800A9D9C 3C01800F */ lui $at, %hi(jpt_800F2510) /* 0AA9A0 800A9DA0 00290821 */ addu $at, $at, $t1 -/* 0AA9A4 800A9DA4 8C292510 */ lw $t1, %lo(D_800F2510)($at) +/* 0AA9A4 800A9DA4 8C292510 */ lw $t1, %lo(jpt_800F2510)($at) /* 0AA9A8 800A9DA8 01200008 */ jr $t1 /* 0AA9AC 800A9DAC 00000000 */ nop glabel L800A9DB0 diff --git a/asm/non_matchings/code_80091750/func_800A9E58.s b/asm/non_matchings/code_80091750/func_800A9E58.s index 5947c8c57..4cc9cf145 100644 --- a/asm/non_matchings/code_80091750/func_800A9E58.s +++ b/asm/non_matchings/code_80091750/func_800A9E58.s @@ -6,9 +6,9 @@ glabel func_800A9E58 /* 0AAA68 800A9E68 2DE10008 */ sltiu $at, $t7, 8 /* 0AAA6C 800A9E6C 10200019 */ beqz $at, .L800A9ED4 /* 0AAA70 800A9E70 000F7880 */ sll $t7, $t7, 2 -/* 0AAA74 800A9E74 3C01800F */ lui $at, %hi(D_800F2524) +/* 0AAA74 800A9E74 3C01800F */ lui $at, %hi(jpt_800F2524) /* 0AAA78 800A9E78 002F0821 */ addu $at, $at, $t7 -/* 0AAA7C 800A9E7C 8C2F2524 */ lw $t7, %lo(D_800F2524)($at) +/* 0AAA7C 800A9E7C 8C2F2524 */ lw $t7, %lo(jpt_800F2524)($at) /* 0AAA80 800A9E80 01E00008 */ jr $t7 /* 0AAA84 800A9E84 00000000 */ nop glabel L800A9E88 @@ -74,9 +74,9 @@ glabel L800A9EBC /* 0AAB5C 800A9F5C 2DC10005 */ sltiu $at, $t6, 5 /* 0AAB60 800A9F60 10200042 */ beqz $at, .L800AA06C /* 0AAB64 800A9F64 000E7080 */ sll $t6, $t6, 2 -/* 0AAB68 800A9F68 3C01800F */ lui $at, %hi(D_800F2544) +/* 0AAB68 800A9F68 3C01800F */ lui $at, %hi(jpt_800F2544) /* 0AAB6C 800A9F6C 002E0821 */ addu $at, $at, $t6 -/* 0AAB70 800A9F70 8C2E2544 */ lw $t6, %lo(D_800F2544)($at) +/* 0AAB70 800A9F70 8C2E2544 */ lw $t6, %lo(jpt_800F2544)($at) /* 0AAB74 800A9F74 01C00008 */ jr $t6 /* 0AAB78 800A9F78 00000000 */ nop glabel L800A9F7C @@ -150,9 +150,9 @@ glabel L800A9FD8 /* 0AAC7C 800AA07C 2D610005 */ sltiu $at, $t3, 5 /* 0AAC80 800AA080 10200038 */ beqz $at, .L800AA164 /* 0AAC84 800AA084 000B5880 */ sll $t3, $t3, 2 -/* 0AAC88 800AA088 3C01800F */ lui $at, %hi(D_800F2558) +/* 0AAC88 800AA088 3C01800F */ lui $at, %hi(jpt_800F2558) /* 0AAC8C 800AA08C 002B0821 */ addu $at, $at, $t3 -/* 0AAC90 800AA090 8C2B2558 */ lw $t3, %lo(D_800F2558)($at) +/* 0AAC90 800AA090 8C2B2558 */ lw $t3, %lo(jpt_800F2558)($at) /* 0AAC94 800AA094 01600008 */ jr $t3 /* 0AAC98 800AA098 00000000 */ nop glabel L800AA09C @@ -218,9 +218,9 @@ glabel L800AA09C /* 0AAD78 800AA178 2F010005 */ sltiu $at, $t8, 5 /* 0AAD7C 800AA17C 1020003A */ beqz $at, .L800AA268 /* 0AAD80 800AA180 0018C080 */ sll $t8, $t8, 2 -/* 0AAD84 800AA184 3C01800F */ lui $at, %hi(D_800F256C) +/* 0AAD84 800AA184 3C01800F */ lui $at, %hi(jpt_800F256C) /* 0AAD88 800AA188 00380821 */ addu $at, $at, $t8 -/* 0AAD8C 800AA18C 8C38256C */ lw $t8, %lo(D_800F256C)($at) +/* 0AAD8C 800AA18C 8C38256C */ lw $t8, %lo(jpt_800F256C)($at) /* 0AAD90 800AA190 03000008 */ jr $t8 /* 0AAD94 800AA194 00000000 */ nop glabel L800AA198 diff --git a/asm/non_matchings/code_80091750/func_800AA2EC.s b/asm/non_matchings/code_80091750/func_800AA2EC.s index 018c528ff..cec22668c 100644 --- a/asm/non_matchings/code_80091750/func_800AA2EC.s +++ b/asm/non_matchings/code_80091750/func_800AA2EC.s @@ -9,9 +9,9 @@ glabel func_800AA2EC /* 0AAF08 800AA308 102000AB */ beqz $at, .L800AA5B8 /* 0AAF0C 800AA30C 00004825 */ move $t1, $zero /* 0AAF10 800AA310 000F7880 */ sll $t7, $t7, 2 -/* 0AAF14 800AA314 3C01800F */ lui $at, %hi(D_800F2580) +/* 0AAF14 800AA314 3C01800F */ lui $at, %hi(jpt_800F2580) /* 0AAF18 800AA318 002F0821 */ addu $at, $at, $t7 -/* 0AAF1C 800AA31C 8C2F2580 */ lw $t7, %lo(D_800F2580)($at) +/* 0AAF1C 800AA31C 8C2F2580 */ lw $t7, %lo(jpt_800F2580)($at) /* 0AAF20 800AA320 01E00008 */ jr $t7 /* 0AAF24 800AA324 00000000 */ nop glabel L800AA328 diff --git a/asm/non_matchings/code_80091750/func_800AA69C.s b/asm/non_matchings/code_80091750/func_800AA69C.s index 9c44f90e4..24401cac5 100644 --- a/asm/non_matchings/code_80091750/func_800AA69C.s +++ b/asm/non_matchings/code_80091750/func_800AA69C.s @@ -18,9 +18,9 @@ glabel func_800AA69C /* 0AB2D4 800AA6D4 2C610006 */ sltiu $at, $v1, 6 /* 0AB2D8 800AA6D8 102000EB */ beqz $at, .L800AAA88 /* 0AB2DC 800AA6DC 00037080 */ sll $t6, $v1, 2 -/* 0AB2E0 800AA6E0 3C01800F */ lui $at, %hi(D_800F25A0) +/* 0AB2E0 800AA6E0 3C01800F */ lui $at, %hi(jpt_800F25A0) /* 0AB2E4 800AA6E4 002E0821 */ addu $at, $at, $t6 -/* 0AB2E8 800AA6E8 8C2E25A0 */ lw $t6, %lo(D_800F25A0)($at) +/* 0AB2E8 800AA6E8 8C2E25A0 */ lw $t6, %lo(jpt_800F25A0)($at) /* 0AB2EC 800AA6EC 01C00008 */ jr $t6 /* 0AB2F0 800AA6F0 00000000 */ nop glabel L800AA6F4 diff --git a/asm/non_matchings/code_80091750/func_800AAA9C.s b/asm/non_matchings/code_80091750/func_800AAA9C.s index 600b8cf07..e3e0891d9 100644 --- a/asm/non_matchings/code_80091750/func_800AAA9C.s +++ b/asm/non_matchings/code_80091750/func_800AAA9C.s @@ -6,9 +6,9 @@ glabel func_800AAA9C /* 0AB6AC 800AAAAC 2DC10005 */ sltiu $at, $t6, 5 /* 0AB6B0 800AAAB0 10200033 */ beqz $at, .L800AAB80 /* 0AB6B4 800AAAB4 000E7080 */ sll $t6, $t6, 2 -/* 0AB6B8 800AAAB8 3C01800F */ lui $at, %hi(D_800F25B8) +/* 0AB6B8 800AAAB8 3C01800F */ lui $at, %hi(jpt_800F25B8) /* 0AB6BC 800AAABC 002E0821 */ addu $at, $at, $t6 -/* 0AB6C0 800AAAC0 8C2E25B8 */ lw $t6, %lo(D_800F25B8)($at) +/* 0AB6C0 800AAAC0 8C2E25B8 */ lw $t6, %lo(jpt_800F25B8)($at) /* 0AB6C4 800AAAC4 01C00008 */ jr $t6 /* 0AB6C8 800AAAC8 00000000 */ nop glabel L800AAACC diff --git a/asm/non_matchings/code_80091750/func_800AAB90.s b/asm/non_matchings/code_80091750/func_800AAB90.s index cf28f3353..b423599db 100644 --- a/asm/non_matchings/code_80091750/func_800AAB90.s +++ b/asm/non_matchings/code_80091750/func_800AAB90.s @@ -3,9 +3,9 @@ glabel func_800AAB90 /* 0AB794 800AAB94 2DC10005 */ sltiu $at, $t6, 5 /* 0AB798 800AAB98 1020001D */ beqz $at, .L800AAC10 /* 0AB79C 800AAB9C 000E7080 */ sll $t6, $t6, 2 -/* 0AB7A0 800AABA0 3C01800F */ lui $at, %hi(D_800F25CC) +/* 0AB7A0 800AABA0 3C01800F */ lui $at, %hi(jpt_800F25CC) /* 0AB7A4 800AABA4 002E0821 */ addu $at, $at, $t6 -/* 0AB7A8 800AABA8 8C2E25CC */ lw $t6, %lo(D_800F25CC)($at) +/* 0AB7A8 800AABA8 8C2E25CC */ lw $t6, %lo(jpt_800F25CC)($at) /* 0AB7AC 800AABAC 01C00008 */ jr $t6 /* 0AB7B0 800AABB0 00000000 */ nop glabel L800AABB4 diff --git a/asm/non_matchings/code_80091750/func_800AAC18.s b/asm/non_matchings/code_80091750/func_800AAC18.s index ff59271b9..38e4dff80 100644 --- a/asm/non_matchings/code_80091750/func_800AAC18.s +++ b/asm/non_matchings/code_80091750/func_800AAC18.s @@ -8,9 +8,9 @@ glabel func_800AAC18 /* 0AB830 800AAC30 10200064 */ beqz $at, .L800AADC4 /* 0AB834 800AAC34 24A5FFD5 */ addiu $a1, $a1, -0x2b /* 0AB838 800AAC38 00037080 */ sll $t6, $v1, 2 -/* 0AB83C 800AAC3C 3C01800F */ lui $at, %hi(D_800F25E0) +/* 0AB83C 800AAC3C 3C01800F */ lui $at, %hi(jpt_800F25E0) /* 0AB840 800AAC40 002E0821 */ addu $at, $at, $t6 -/* 0AB844 800AAC44 8C2E25E0 */ lw $t6, %lo(D_800F25E0)($at) +/* 0AB844 800AAC44 8C2E25E0 */ lw $t6, %lo(jpt_800F25E0)($at) /* 0AB848 800AAC48 01C00008 */ jr $t6 /* 0AB84C 800AAC4C 00000000 */ nop glabel L800AAC50 diff --git a/asm/non_matchings/code_80091750/func_800AB020.s b/asm/non_matchings/code_80091750/func_800AB020.s index 124e925c5..3c612696d 100644 --- a/asm/non_matchings/code_80091750/func_800AB020.s +++ b/asm/non_matchings/code_80091750/func_800AB020.s @@ -3,9 +3,9 @@ glabel func_800AB020 /* 0ABC24 800AB024 2DC10005 */ sltiu $at, $t6, 5 /* 0ABC28 800AB028 10200019 */ beqz $at, .L800AB090 /* 0ABC2C 800AB02C 000E7080 */ sll $t6, $t6, 2 -/* 0ABC30 800AB030 3C01800F */ lui $at, %hi(D_800F25F4) +/* 0ABC30 800AB030 3C01800F */ lui $at, %hi(jpt_800F25F4) /* 0ABC34 800AB034 002E0821 */ addu $at, $at, $t6 -/* 0ABC38 800AB038 8C2E25F4 */ lw $t6, %lo(D_800F25F4)($at) +/* 0ABC38 800AB038 8C2E25F4 */ lw $t6, %lo(jpt_800F25F4)($at) /* 0ABC3C 800AB03C 01C00008 */ jr $t6 /* 0ABC40 800AB040 00000000 */ nop glabel L800AB044 diff --git a/asm/non_matchings/code_80091750/func_800AB098.s b/asm/non_matchings/code_80091750/func_800AB098.s index 88c7e9a31..d45d6b605 100644 --- a/asm/non_matchings/code_80091750/func_800AB098.s +++ b/asm/non_matchings/code_80091750/func_800AB098.s @@ -3,9 +3,9 @@ glabel func_800AB098 /* 0ABC9C 800AB09C 2DC10005 */ sltiu $at, $t6, 5 /* 0ABCA0 800AB0A0 1020002E */ beqz $at, .L800AB15C /* 0ABCA4 800AB0A4 000E7080 */ sll $t6, $t6, 2 -/* 0ABCA8 800AB0A8 3C01800F */ lui $at, %hi(D_800F2608) +/* 0ABCA8 800AB0A8 3C01800F */ lui $at, %hi(jpt_800F2608) /* 0ABCAC 800AB0AC 002E0821 */ addu $at, $at, $t6 -/* 0ABCB0 800AB0B0 8C2E2608 */ lw $t6, %lo(D_800F2608)($at) +/* 0ABCB0 800AB0B0 8C2E2608 */ lw $t6, %lo(jpt_800F2608)($at) /* 0ABCB4 800AB0B4 01C00008 */ jr $t6 /* 0ABCB8 800AB0B8 00000000 */ nop glabel L800AB0BC diff --git a/asm/non_matchings/code_80091750/func_800AB164.s b/asm/non_matchings/code_80091750/func_800AB164.s index a9411ac65..6a3fe7322 100644 --- a/asm/non_matchings/code_80091750/func_800AB164.s +++ b/asm/non_matchings/code_80091750/func_800AB164.s @@ -17,9 +17,9 @@ glabel func_800AB164 /* 0ABD98 800AB198 2D210005 */ sltiu $at, $t1, 5 /* 0ABD9C 800AB19C 1020002C */ beqz $at, .L800AB250 /* 0ABDA0 800AB1A0 00094880 */ sll $t1, $t1, 2 -/* 0ABDA4 800AB1A4 3C01800F */ lui $at, %hi(D_800F261C) +/* 0ABDA4 800AB1A4 3C01800F */ lui $at, %hi(jpt_800F261C) /* 0ABDA8 800AB1A8 00290821 */ addu $at, $at, $t1 -/* 0ABDAC 800AB1AC 8C29261C */ lw $t1, %lo(D_800F261C)($at) +/* 0ABDAC 800AB1AC 8C29261C */ lw $t1, %lo(jpt_800F261C)($at) /* 0ABDB0 800AB1B0 01200008 */ jr $t1 /* 0ABDB4 800AB1B4 00000000 */ nop glabel L800AB1B8 diff --git a/asm/non_matchings/code_80091750/func_800AC458.s b/asm/non_matchings/code_80091750/func_800AC458.s index d3f2fa0bc..cce8dd052 100644 --- a/asm/non_matchings/code_80091750/func_800AC458.s +++ b/asm/non_matchings/code_80091750/func_800AC458.s @@ -6,9 +6,9 @@ glabel func_800AC458 /* 0AD068 800AC468 2C41000E */ sltiu $at, $v0, 0xe /* 0AD06C 800AC46C 1020013E */ beqz $at, .L800AC968 /* 0AD070 800AC470 00027080 */ sll $t6, $v0, 2 -/* 0AD074 800AC474 3C01800F */ lui $at, %hi(D_800F2688) +/* 0AD074 800AC474 3C01800F */ lui $at, %hi(jpt_800F2688) /* 0AD078 800AC478 002E0821 */ addu $at, $at, $t6 -/* 0AD07C 800AC47C 8C2E2688 */ lw $t6, %lo(D_800F2688)($at) +/* 0AD07C 800AC47C 8C2E2688 */ lw $t6, %lo(jpt_800F2688)($at) /* 0AD080 800AC480 01C00008 */ jr $t6 /* 0AD084 800AC484 00000000 */ nop glabel L800AC488 diff --git a/asm/non_matchings/code_80091750/func_800ACC50.s b/asm/non_matchings/code_80091750/func_800ACC50.s index e5469f01e..b32ae7c9d 100644 --- a/asm/non_matchings/code_80091750/func_800ACC50.s +++ b/asm/non_matchings/code_80091750/func_800ACC50.s @@ -7,9 +7,9 @@ glabel func_800ACC50 /* 0AD864 800ACC64 2DC1000E */ sltiu $at, $t6, 0xe /* 0AD868 800ACC68 102000B0 */ beqz $at, .L800ACF2C /* 0AD86C 800ACC6C 000E7080 */ sll $t6, $t6, 2 -/* 0AD870 800ACC70 3C01800F */ lui $at, %hi(D_800F26D8) +/* 0AD870 800ACC70 3C01800F */ lui $at, %hi(jpt_800F26D8) /* 0AD874 800ACC74 002E0821 */ addu $at, $at, $t6 -/* 0AD878 800ACC78 8C2E26D8 */ lw $t6, %lo(D_800F26D8)($at) +/* 0AD878 800ACC78 8C2E26D8 */ lw $t6, %lo(jpt_800F26D8)($at) /* 0AD87C 800ACC7C 01C00008 */ jr $t6 /* 0AD880 800ACC80 00000000 */ nop glabel L800ACC84 diff --git a/asm/non_matchings/code_80091750/func_800ACF40.s b/asm/non_matchings/code_80091750/func_800ACF40.s index 2f38091c3..46b81ad2b 100644 --- a/asm/non_matchings/code_80091750/func_800ACF40.s +++ b/asm/non_matchings/code_80091750/func_800ACF40.s @@ -15,9 +15,9 @@ glabel func_800ACF40 /* 0ADB74 800ACF74 10200086 */ beqz $at, .L800AD190 /* 0ADB78 800ACF78 2446FF4F */ addiu $a2, $v0, -0xb1 /* 0ADB7C 800ACF7C 000F7880 */ sll $t7, $t7, 2 -/* 0ADB80 800ACF80 3C01800F */ lui $at, %hi(D_800F2728) +/* 0ADB80 800ACF80 3C01800F */ lui $at, %hi(jpt_800F2728) /* 0ADB84 800ACF84 002F0821 */ addu $at, $at, $t7 -/* 0ADB88 800ACF88 8C2F2728 */ lw $t7, %lo(D_800F2728)($at) +/* 0ADB88 800ACF88 8C2F2728 */ lw $t7, %lo(jpt_800F2728)($at) /* 0ADB8C 800ACF8C 01E00008 */ jr $t7 /* 0ADB90 800ACF90 00000000 */ nop glabel L800ACF94 diff --git a/asm/non_matchings/code_80091750/func_800AD1A4.s b/asm/non_matchings/code_80091750/func_800AD1A4.s index 28a5614dd..9d32adcc2 100644 --- a/asm/non_matchings/code_80091750/func_800AD1A4.s +++ b/asm/non_matchings/code_80091750/func_800AD1A4.s @@ -7,9 +7,9 @@ glabel func_800AD1A4 /* 0ADDB8 800AD1B8 2DC10005 */ sltiu $at, $t6, 5 /* 0ADDBC 800AD1BC 10200045 */ beqz $at, .L800AD2D4 /* 0ADDC0 800AD1C0 000E7080 */ sll $t6, $t6, 2 -/* 0ADDC4 800AD1C4 3C01800F */ lui $at, %hi(D_800F273C) +/* 0ADDC4 800AD1C4 3C01800F */ lui $at, %hi(jpt_800F273C) /* 0ADDC8 800AD1C8 002E0821 */ addu $at, $at, $t6 -/* 0ADDCC 800AD1CC 8C2E273C */ lw $t6, %lo(D_800F273C)($at) +/* 0ADDCC 800AD1CC 8C2E273C */ lw $t6, %lo(jpt_800F273C)($at) /* 0ADDD0 800AD1D0 01C00008 */ jr $t6 /* 0ADDD4 800AD1D4 00000000 */ nop glabel L800AD1D8 diff --git a/asm/non_matchings/code_80091750/func_800AD2E8.s b/asm/non_matchings/code_80091750/func_800AD2E8.s index f9cbaac11..3e7380bb6 100644 --- a/asm/non_matchings/code_80091750/func_800AD2E8.s +++ b/asm/non_matchings/code_80091750/func_800AD2E8.s @@ -7,9 +7,9 @@ glabel func_800AD2E8 /* 0ADEFC 800AD2FC 2C410020 */ sltiu $at, $v0, 0x20 /* 0ADF00 800AD300 1020030C */ beqz $at, .L800ADF34 /* 0ADF04 800AD304 00027080 */ sll $t6, $v0, 2 -/* 0ADF08 800AD308 3C01800F */ lui $at, %hi(D_800F2750) +/* 0ADF08 800AD308 3C01800F */ lui $at, %hi(jpt_800F2750) /* 0ADF0C 800AD30C 002E0821 */ addu $at, $at, $t6 -/* 0ADF10 800AD310 8C2E2750 */ lw $t6, %lo(D_800F2750)($at) +/* 0ADF10 800AD310 8C2E2750 */ lw $t6, %lo(jpt_800F2750)($at) /* 0ADF14 800AD314 01C00008 */ jr $t6 /* 0ADF18 800AD318 00000000 */ nop glabel L800AD31C @@ -281,9 +281,9 @@ glabel L800AD438 /* 0AE2F8 800AD6F8 10200017 */ beqz $at, .L800AD758 /* 0AE2FC 800AD6FC 8FA30028 */ lw $v1, 0x28($sp) /* 0AE300 800AD700 000E7080 */ sll $t6, $t6, 2 -/* 0AE304 800AD704 3C01800F */ lui $at, %hi(D_800F27E8) +/* 0AE304 800AD704 3C01800F */ lui $at, %hi(jpt_800F27E8) /* 0AE308 800AD708 002E0821 */ addu $at, $at, $t6 -/* 0AE30C 800AD70C 8C2E27E8 */ lw $t6, %lo(D_800F27E8)($at) +/* 0AE30C 800AD70C 8C2E27E8 */ lw $t6, %lo(jpt_800F27E8)($at) /* 0AE310 800AD710 01C00008 */ jr $t6 /* 0AE314 800AD714 00000000 */ nop glabel L800AD718 @@ -795,9 +795,9 @@ glabel L800ADE14 /* 0AEA60 800ADE60 2DA10005 */ sltiu $at, $t5, 5 /* 0AEA64 800ADE64 10200020 */ beqz $at, .L800ADEE8 /* 0AEA68 800ADE68 000D6880 */ sll $t5, $t5, 2 -/* 0AEA6C 800ADE6C 3C01800F */ lui $at, %hi(D_800F2868) +/* 0AEA6C 800ADE6C 3C01800F */ lui $at, %hi(jpt_800F2868) /* 0AEA70 800ADE70 002D0821 */ addu $at, $at, $t5 -/* 0AEA74 800ADE74 8C2D2868 */ lw $t5, %lo(D_800F2868)($at) +/* 0AEA74 800ADE74 8C2D2868 */ lw $t5, %lo(jpt_800F2868)($at) /* 0AEA78 800ADE78 01A00008 */ jr $t5 /* 0AEA7C 800ADE7C 00000000 */ nop glabel L800ADE80 diff --git a/asm/non_matchings/code_80091750/func_800ADF48.s b/asm/non_matchings/code_80091750/func_800ADF48.s index 92ff5bb8a..3517d1ffc 100644 --- a/asm/non_matchings/code_80091750/func_800ADF48.s +++ b/asm/non_matchings/code_80091750/func_800ADF48.s @@ -9,9 +9,9 @@ glabel func_800ADF48 /* 0AEB64 800ADF64 2DE1002D */ sltiu $at, $t7, 0x2d /* 0AEB68 800ADF68 102000A7 */ beqz $at, .L800AE208 /* 0AEB6C 800ADF6C 000F7880 */ sll $t7, $t7, 2 -/* 0AEB70 800ADF70 3C01800F */ lui $at, %hi(D_800F287C) +/* 0AEB70 800ADF70 3C01800F */ lui $at, %hi(jpt_800F287C) /* 0AEB74 800ADF74 002F0821 */ addu $at, $at, $t7 -/* 0AEB78 800ADF78 8C2F287C */ lw $t7, %lo(D_800F287C)($at) +/* 0AEB78 800ADF78 8C2F287C */ lw $t7, %lo(jpt_800F287C)($at) /* 0AEB7C 800ADF7C 01E00008 */ jr $t7 /* 0AEB80 800ADF80 00000000 */ nop glabel L800ADF84 diff --git a/asm/non_matchings/code_80091750/func_800AE218.s b/asm/non_matchings/code_80091750/func_800AE218.s index 4257e8573..4da001380 100644 --- a/asm/non_matchings/code_80091750/func_800AE218.s +++ b/asm/non_matchings/code_80091750/func_800AE218.s @@ -13,9 +13,9 @@ glabel func_800AE218 .L800AE244: /* 0AEE44 800AE244 1020027E */ beqz $at, .L800AEC40 /* 0AEE48 800AE248 00037080 */ sll $t6, $v1, 2 -/* 0AEE4C 800AE24C 3C01800F */ lui $at, %hi(D_800F2948) +/* 0AEE4C 800AE24C 3C01800F */ lui $at, %hi(jpt_800F2948) /* 0AEE50 800AE250 002E0821 */ addu $at, $at, $t6 -/* 0AEE54 800AE254 8C2E2948 */ lw $t6, %lo(D_800F2948)($at) +/* 0AEE54 800AE254 8C2E2948 */ lw $t6, %lo(jpt_800F2948)($at) /* 0AEE58 800AE258 01C00008 */ jr $t6 /* 0AEE5C 800AE25C 00000000 */ nop glabel L800AE260 @@ -217,9 +217,9 @@ glabel L800AE2E8 /* 0AF130 800AE530 10200017 */ beqz $at, .L800AE590 /* 0AF134 800AE534 8FA30028 */ lw $v1, 0x28($sp) /* 0AF138 800AE538 0018C080 */ sll $t8, $t8, 2 -/* 0AF13C 800AE53C 3C01800F */ lui $at, %hi(D_800F2A08) +/* 0AF13C 800AE53C 3C01800F */ lui $at, %hi(jpt_800F2A08) /* 0AF140 800AE540 00380821 */ addu $at, $at, $t8 -/* 0AF144 800AE544 8C382A08 */ lw $t8, %lo(D_800F2A08)($at) +/* 0AF144 800AE544 8C382A08 */ lw $t8, %lo(jpt_800F2A08)($at) /* 0AF148 800AE548 03000008 */ jr $t8 /* 0AF14C 800AE54C 00000000 */ nop glabel L800AE550 diff --git a/asm/non_matchings/code_80091750/func_800AEC54.s b/asm/non_matchings/code_80091750/func_800AEC54.s index 037256bce..844f56ada 100644 --- a/asm/non_matchings/code_80091750/func_800AEC54.s +++ b/asm/non_matchings/code_80091750/func_800AEC54.s @@ -7,9 +7,9 @@ glabel func_800AEC54 /* 0AF868 800AEC68 2DC10005 */ sltiu $at, $t6, 5 /* 0AF86C 800AEC6C 1020004E */ beqz $at, .L800AEDA8 /* 0AF870 800AEC70 000E7080 */ sll $t6, $t6, 2 -/* 0AF874 800AEC74 3C01800F */ lui $at, %hi(D_800F2A88) +/* 0AF874 800AEC74 3C01800F */ lui $at, %hi(jpt_800F2A88) /* 0AF878 800AEC78 002E0821 */ addu $at, $at, $t6 -/* 0AF87C 800AEC7C 8C2E2A88 */ lw $t6, %lo(D_800F2A88)($at) +/* 0AF87C 800AEC7C 8C2E2A88 */ lw $t6, %lo(jpt_800F2A88)($at) /* 0AF880 800AEC80 01C00008 */ jr $t6 /* 0AF884 800AEC84 00000000 */ nop glabel L800AEC88 diff --git a/asm/non_matchings/code_80091750/func_800AF004.s b/asm/non_matchings/code_80091750/func_800AF004.s index 8382aaabe..d2443e384 100644 --- a/asm/non_matchings/code_80091750/func_800AF004.s +++ b/asm/non_matchings/code_80091750/func_800AF004.s @@ -7,9 +7,9 @@ glabel func_800AF004 /* 0AFC18 800AF018 2DC10008 */ sltiu $at, $t6, 8 /* 0AFC1C 800AF01C 1020005E */ beqz $at, .L800AF198 /* 0AFC20 800AF020 000E7080 */ sll $t6, $t6, 2 -/* 0AFC24 800AF024 3C01800F */ lui $at, %hi(D_800F2A9C) +/* 0AFC24 800AF024 3C01800F */ lui $at, %hi(jpt_800F2A9C) /* 0AFC28 800AF028 002E0821 */ addu $at, $at, $t6 -/* 0AFC2C 800AF02C 8C2E2A9C */ lw $t6, %lo(D_800F2A9C)($at) +/* 0AFC2C 800AF02C 8C2E2A9C */ lw $t6, %lo(jpt_800F2A9C)($at) /* 0AFC30 800AF030 01C00008 */ jr $t6 /* 0AFC34 800AF034 00000000 */ nop glabel L800AF038 diff --git a/asm/non_matchings/code_80091750/func_800AF270.s b/asm/non_matchings/code_80091750/func_800AF270.s index 2f70e8d89..9f4684c82 100644 --- a/asm/non_matchings/code_80091750/func_800AF270.s +++ b/asm/non_matchings/code_80091750/func_800AF270.s @@ -16,9 +16,9 @@ glabel func_800AF270 /* 0AFEA8 800AF2A8 10200070 */ beqz $at, .L800AF46C /* 0AFEAC 800AF2AC 2463FED4 */ addiu $v1, $v1, -0x12c /* 0AFEB0 800AF2B0 0018C080 */ sll $t8, $t8, 2 -/* 0AFEB4 800AF2B4 3C01800F */ lui $at, %hi(D_800F2ABC) +/* 0AFEB4 800AF2B4 3C01800F */ lui $at, %hi(jpt_800F2ABC) /* 0AFEB8 800AF2B8 00380821 */ addu $at, $at, $t8 -/* 0AFEBC 800AF2BC 8C382ABC */ lw $t8, %lo(D_800F2ABC)($at) +/* 0AFEBC 800AF2BC 8C382ABC */ lw $t8, %lo(jpt_800F2ABC)($at) /* 0AFEC0 800AF2C0 03000008 */ jr $t8 /* 0AFEC4 800AF2C4 00000000 */ nop glabel L800AF2C8 diff --git a/asm/non_matchings/code_80091750/func_800AF4DC.s b/asm/non_matchings/code_80091750/func_800AF4DC.s index 0a7fc74ad..d8c86db75 100644 --- a/asm/non_matchings/code_80091750/func_800AF4DC.s +++ b/asm/non_matchings/code_80091750/func_800AF4DC.s @@ -15,9 +15,9 @@ glabel func_800AF4DC /* 0B0110 800AF510 10200086 */ beqz $at, .L800AF72C /* 0B0114 800AF514 AC980010 */ sw $t8, 0x10($a0) /* 0B0118 800AF518 0019C880 */ sll $t9, $t9, 2 -/* 0B011C 800AF51C 3C01800F */ lui $at, %hi(D_800F2AD0) +/* 0B011C 800AF51C 3C01800F */ lui $at, %hi(jpt_800F2AD0) /* 0B0120 800AF520 00390821 */ addu $at, $at, $t9 -/* 0B0124 800AF524 8C392AD0 */ lw $t9, %lo(D_800F2AD0)($at) +/* 0B0124 800AF524 8C392AD0 */ lw $t9, %lo(jpt_800F2AD0)($at) /* 0B0128 800AF528 03200008 */ jr $t9 /* 0B012C 800AF52C 00000000 */ nop glabel L800AF530 diff --git a/asm/non_matchings/code_80091750/func_800AF740.s b/asm/non_matchings/code_80091750/func_800AF740.s index f2a076418..d97ca82ec 100644 --- a/asm/non_matchings/code_80091750/func_800AF740.s +++ b/asm/non_matchings/code_80091750/func_800AF740.s @@ -15,9 +15,9 @@ glabel func_800AF740 /* 0B0374 800AF774 10200086 */ beqz $at, .L800AF990 /* 0B0378 800AF778 AC980010 */ sw $t8, 0x10($a0) /* 0B037C 800AF77C 0019C880 */ sll $t9, $t9, 2 -/* 0B0380 800AF780 3C01800F */ lui $at, %hi(D_800F2B00) +/* 0B0380 800AF780 3C01800F */ lui $at, %hi(jpt_800F2B00) /* 0B0384 800AF784 00390821 */ addu $at, $at, $t9 -/* 0B0388 800AF788 8C392B00 */ lw $t9, %lo(D_800F2B00)($at) +/* 0B0388 800AF788 8C392B00 */ lw $t9, %lo(jpt_800F2B00)($at) /* 0B038C 800AF78C 03200008 */ jr $t9 /* 0B0390 800AF790 00000000 */ nop glabel L800AF794 diff --git a/asm/non_matchings/code_800AF9B0/func_800B0350.s b/asm/non_matchings/code_800AF9B0/func_800B0350.s index 0c0c92124..c839dc2a7 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B0350.s +++ b/asm/non_matchings/code_800AF9B0/func_800B0350.s @@ -57,9 +57,9 @@ glabel func_800B0350 /* 0B101C 800B041C 2D41000E */ sltiu $at, $t2, 0xe /* 0B1020 800B0420 1020003B */ beqz $at, .L800B0510 /* 0B1024 800B0424 000A5080 */ sll $t2, $t2, 2 -/* 0B1028 800B0428 3C01800F */ lui $at, %hi(D_800F2C20) +/* 0B1028 800B0428 3C01800F */ lui $at, %hi(jpt_800F2C20) /* 0B102C 800B042C 002A0821 */ addu $at, $at, $t2 -/* 0B1030 800B0430 8C2A2C20 */ lw $t2, %lo(D_800F2C20)($at) +/* 0B1030 800B0430 8C2A2C20 */ lw $t2, %lo(jpt_800F2C20)($at) /* 0B1034 800B0434 01400008 */ jr $t2 /* 0B1038 800B0438 00000000 */ nop glabel L800B043C diff --git a/asm/non_matchings/code_800AF9B0/func_800B053C.s b/asm/non_matchings/code_800AF9B0/func_800B053C.s index 7aded41ac..ef0f940ca 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B053C.s +++ b/asm/non_matchings/code_800AF9B0/func_800B053C.s @@ -36,9 +36,9 @@ glabel func_800B053C /* 0B11C0 800B05C0 10200377 */ beqz $at, .L800B13A0 /* 0B11C4 800B05C4 AFAC0030 */ sw $t4, 0x30($sp) /* 0B11C8 800B05C8 000D6880 */ sll $t5, $t5, 2 -/* 0B11CC 800B05CC 3C01800F */ lui $at, %hi(D_800F2C58) # 0x800f +/* 0B11CC 800B05CC 3C01800F */ lui $at, %hi(jpt_800F2C58) # 0x800f /* 0B11D0 800B05D0 002D0821 */ addu $at, $at, $t5 -/* 0B11D4 800B05D4 8C2D2C58 */ lw $t5, %lo(D_800F2C58)($at) # 0x2c58($at) +/* 0B11D4 800B05D4 8C2D2C58 */ lw $t5, %lo(jpt_800F2C58)($at) # 0x2c58($at) /* 0B11D8 800B05D8 01A00008 */ jr $t5 /* 0B11DC 800B05DC 00000000 */ nop glabel L800B05E0 @@ -271,9 +271,9 @@ glabel L800B05E0 /* 0B1528 800B0928 10200025 */ beqz $at, .L800B09C0 /* 0B152C 800B092C AFA2002C */ sw $v0, 0x2c($sp) /* 0B1530 800B0930 0019C880 */ sll $t9, $t9, 2 -/* 0B1534 800B0934 3C01800F */ lui $at, %hi(D_800F2D38) +/* 0B1534 800B0934 3C01800F */ lui $at, %hi(jpt_800F2D38) /* 0B1538 800B0938 00390821 */ addu $at, $at, $t9 -/* 0B153C 800B093C 8C392D38 */ lw $t9, %lo(D_800F2D38)($at) +/* 0B153C 800B093C 8C392D38 */ lw $t9, %lo(jpt_800F2D38)($at) /* 0B1540 800B0940 03200008 */ jr $t9 /* 0B1544 800B0944 00000000 */ nop glabel L800B0948 diff --git a/asm/non_matchings/code_800AF9B0/func_800B1C90.s b/asm/non_matchings/code_800AF9B0/func_800B1C90.s index 73e70ea34..94e338f59 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B1C90.s +++ b/asm/non_matchings/code_800AF9B0/func_800B1C90.s @@ -16,9 +16,9 @@ glabel func_800B1C90 /* 0B28C8 800B1CC8 2D41000A */ sltiu $at, $t2, 0xa /* 0B28CC 800B1CCC 10200105 */ beqz $at, .L800B20E4 /* 0B28D0 800B1CD0 000A5080 */ sll $t2, $t2, 2 -/* 0B28D4 800B1CD4 3C01800F */ lui $at, %hi(D_800F2DB8) +/* 0B28D4 800B1CD4 3C01800F */ lui $at, %hi(jpt_800F2DB8) /* 0B28D8 800B1CD8 002A0821 */ addu $at, $at, $t2 -/* 0B28DC 800B1CDC 8C2A2DB8 */ lw $t2, %lo(D_800F2DB8)($at) +/* 0B28DC 800B1CDC 8C2A2DB8 */ lw $t2, %lo(jpt_800F2DB8)($at) /* 0B28E0 800B1CE0 01400008 */ jr $t2 /* 0B28E4 800B1CE4 00000000 */ nop glabel L800B1CE8 diff --git a/asm/non_matchings/code_800AF9B0/func_800B20F4.s b/asm/non_matchings/code_800AF9B0/func_800B20F4.s index d131fa5f9..9a4671309 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B20F4.s +++ b/asm/non_matchings/code_800AF9B0/func_800B20F4.s @@ -28,9 +28,9 @@ glabel func_800B20F4 /* 0B2D58 800B2158 2D610007 */ sltiu $at, $t3, 7 /* 0B2D5C 800B215C 10200182 */ beqz $at, .L800B2768 /* 0B2D60 800B2160 000B5880 */ sll $t3, $t3, 2 -/* 0B2D64 800B2164 3C01800F */ lui $at, %hi(D_800F2DE0) # 0x800f +/* 0B2D64 800B2164 3C01800F */ lui $at, %hi(jpt_800F2DE0) # 0x800f /* 0B2D68 800B2168 002B0821 */ addu $at, $at, $t3 -/* 0B2D6C 800B216C 8C2B2DE0 */ lw $t3, %lo(D_800F2DE0)($at) # 0x2de0($at) +/* 0B2D6C 800B216C 8C2B2DE0 */ lw $t3, %lo(jpt_800F2DE0)($at) # 0x2de0($at) /* 0B2D70 800B2170 01600008 */ jr $t3 /* 0B2D74 800B2174 00000000 */ nop glabel L800B2178 diff --git a/asm/non_matchings/code_800AF9B0/func_800B29D8.s b/asm/non_matchings/code_800AF9B0/func_800B29D8.s index 704229315..3319c25af 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B29D8.s +++ b/asm/non_matchings/code_800AF9B0/func_800B29D8.s @@ -33,9 +33,9 @@ glabel func_800B29D8 /* 0B364C 800B2A4C 2D810009 */ sltiu $at, $t4, 9 /* 0B3650 800B2A50 10200293 */ beqz $at, .L800B34A0 /* 0B3654 800B2A54 000C6080 */ sll $t4, $t4, 2 -/* 0B3658 800B2A58 3C01800F */ lui $at, %hi(D_800F2DFC) # 0x800f +/* 0B3658 800B2A58 3C01800F */ lui $at, %hi(jpt_800F2DFC) # 0x800f /* 0B365C 800B2A5C 002C0821 */ addu $at, $at, $t4 -/* 0B3660 800B2A60 8C2C2DFC */ lw $t4, %lo(D_800F2DFC)($at) # 0x2dfc($at) +/* 0B3660 800B2A60 8C2C2DFC */ lw $t4, %lo(jpt_800F2DFC)($at) # 0x2dfc($at) /* 0B3664 800B2A64 01800008 */ jr $t4 /* 0B3668 800B2A68 00000000 */ nop glabel L800B2A6C diff --git a/asm/non_matchings/code_800AF9B0/func_800B3F74.s b/asm/non_matchings/code_800AF9B0/func_800B3F74.s index 0239dc880..f0e18bab0 100644 --- a/asm/non_matchings/code_800AF9B0/func_800B3F74.s +++ b/asm/non_matchings/code_800AF9B0/func_800B3F74.s @@ -34,9 +34,9 @@ glabel func_800B3F74 /* 0B4BF4 800B3FF4 10200127 */ beqz $at, .L800B4494 /* 0B4BF8 800B3FF8 AFBF0014 */ sw $ra, 0x14($sp) /* 0B4BFC 800B3FFC 00047080 */ sll $t6, $a0, 2 -/* 0B4C00 800B4000 3C01800F */ lui $at, %hi(D_800F2E20) # 0x800f +/* 0B4C00 800B4000 3C01800F */ lui $at, %hi(jpt_800F2E20) # 0x800f /* 0B4C04 800B4004 002E0821 */ addu $at, $at, $t6 -/* 0B4C08 800B4008 8C2E2E20 */ lw $t6, %lo(D_800F2E20)($at) # 0x2e20($at) +/* 0B4C08 800B4008 8C2E2E20 */ lw $t6, %lo(jpt_800F2E20)($at) # 0x2e20($at) /* 0B4C0C 800B400C 01C00008 */ jr $t6 /* 0B4C10 800B4010 00000000 */ nop glabel L800B4014 diff --git a/asm/non_matchings/code_8028DF00/func_802903D8.s b/asm/non_matchings/code_8028DF00/func_802903D8.s index 763098137..78ecca3cb 100644 --- a/asm/non_matchings/code_8028DF00/func_802903D8.s +++ b/asm/non_matchings/code_8028DF00/func_802903D8.s @@ -403,4 +403,3 @@ glabel func_802903D8 /* 0F9FF4 802909E4 27BD0078 */ addiu $sp, $sp, 0x78 /* 0F9FF8 802909E8 03E00008 */ jr $ra /* 0F9FFC 802909EC 00000000 */ nop - diff --git a/asm/non_matchings/code_80290C20/func_8029122C.s b/asm/non_matchings/code_80290C20/func_8029122C.s index a2830ada5..51414a31e 100644 --- a/asm/non_matchings/code_80290C20/func_8029122C.s +++ b/asm/non_matchings/code_80290C20/func_8029122C.s @@ -150,9 +150,9 @@ glabel func_8029122C /* 0FAA78 80291468 102003FA */ beqz $at, .L80292454 /* 0FAA7C 8029146C 87AB0216 */ lh $t3, 0x216($sp) /* 0FAA80 80291470 0018C080 */ sll $t8, $t8, 2 -/* 0FAA84 80291474 3C01802C */ lui $at, %hi(D_802B92C0) +/* 0FAA84 80291474 3C01802C */ lui $at, %hi(jpt_802B92C0) /* 0FAA88 80291478 00380821 */ addu $at, $at, $t8 -/* 0FAA8C 8029147C 8C3892C0 */ lw $t8, %lo(D_802B92C0)($at) +/* 0FAA8C 8029147C 8C3892C0 */ lw $t8, %lo(jpt_802B92C0)($at) /* 0FAA90 80291480 03000008 */ jr $t8 /* 0FAA94 80291484 00000000 */ nop glabel L80291488 @@ -303,9 +303,9 @@ glabel L80291600 /* 0FACCC 802916BC 2F010010 */ sltiu $at, $t8, 0x10 /* 0FACD0 802916C0 1020001B */ beqz $at, .L80291730 /* 0FACD4 802916C4 0018C080 */ sll $t8, $t8, 2 -/* 0FACD8 802916C8 3C01802C */ lui $at, %hi(D_802B9304) +/* 0FACD8 802916C8 3C01802C */ lui $at, %hi(jpt_802B9304) /* 0FACDC 802916CC 00380821 */ addu $at, $at, $t8 -/* 0FACE0 802916D0 8C389304 */ lw $t8, %lo(D_802B9304)($at) +/* 0FACE0 802916D0 8C389304 */ lw $t8, %lo(jpt_802B9304)($at) /* 0FACE4 802916D4 03000008 */ jr $t8 /* 0FACE8 802916D8 00000000 */ nop glabel L802916DC @@ -1005,9 +1005,9 @@ glabel L80291D4C /* 0FB76C 8029215C 102000A8 */ beqz $at, .L80292400 /* 0FB770 80292160 AC6D0000 */ sw $t5, ($v1) /* 0FB774 80292164 000E7080 */ sll $t6, $t6, 2 -/* 0FB778 80292168 3C01802C */ lui $at, %hi(D_802B9344) +/* 0FB778 80292168 3C01802C */ lui $at, %hi(jpt_802B9344) /* 0FB77C 8029216C 002E0821 */ addu $at, $at, $t6 -/* 0FB780 80292170 8C2E9344 */ lw $t6, %lo(D_802B9344)($at) +/* 0FB780 80292170 8C2E9344 */ lw $t6, %lo(jpt_802B9344)($at) /* 0FB784 80292174 01C00008 */ jr $t6 /* 0FB788 80292178 00000000 */ nop glabel L8029217C diff --git a/asm/non_matchings/code_80290C20/func_8029569C.s b/asm/non_matchings/code_80290C20/func_8029569C.s index 33ad4a18a..3670e42a4 100644 --- a/asm/non_matchings/code_80290C20/func_8029569C.s +++ b/asm/non_matchings/code_80290C20/func_8029569C.s @@ -4,9 +4,9 @@ glabel func_8029569C /* 0FECB4 802956A4 2DC10014 */ sltiu $at, $t6, 0x14 /* 0FECB8 802956A8 102000E1 */ beqz $at, .L80295A30 /* 0FECBC 802956AC 000E7080 */ sll $t6, $t6, 2 -/* 0FECC0 802956B0 3C01802C */ lui $at, %hi(D_802B9404) +/* 0FECC0 802956B0 3C01802C */ lui $at, %hi(jpt_802B9404) /* 0FECC4 802956B4 002E0821 */ addu $at, $at, $t6 -/* 0FECC8 802956B8 8C2E9404 */ lw $t6, %lo(D_802B9404)($at) +/* 0FECC8 802956B8 8C2E9404 */ lw $t6, %lo(jpt_802B9404)($at) /* 0FECCC 802956BC 01C00008 */ jr $t6 /* 0FECD0 802956C0 00000000 */ nop glabel L802956C4 diff --git a/asm/non_matchings/code_80290C20/func_80295A38.s b/asm/non_matchings/code_80290C20/func_80295A38.s index 451753c96..98c653abe 100644 --- a/asm/non_matchings/code_80290C20/func_80295A38.s +++ b/asm/non_matchings/code_80290C20/func_80295A38.s @@ -24,9 +24,9 @@ glabel func_80295A38 /* 0FF09C 80295A8C 2DE10014 */ sltiu $at, $t7, 0x14 /* 0FF0A0 80295A90 10200054 */ beqz $at, .L80295BE4 /* 0FF0A4 80295A94 000F7880 */ sll $t7, $t7, 2 -/* 0FF0A8 80295A98 3C01802C */ lui $at, %hi(D_802B9454) +/* 0FF0A8 80295A98 3C01802C */ lui $at, %hi(jpt_802B9454) /* 0FF0AC 80295A9C 002F0821 */ addu $at, $at, $t7 -/* 0FF0B0 80295AA0 8C2F9454 */ lw $t7, %lo(D_802B9454)($at) +/* 0FF0B0 80295AA0 8C2F9454 */ lw $t7, %lo(jpt_802B9454)($at) /* 0FF0B4 80295AA4 01E00008 */ jr $t7 /* 0FF0B8 80295AA8 00000000 */ nop glabel L80295AAC diff --git a/asm/non_matchings/code_80290C20/func_80295D88.s b/asm/non_matchings/code_80290C20/func_80295D88.s index f1e668d8a..82cd25a98 100644 --- a/asm/non_matchings/code_80290C20/func_80295D88.s +++ b/asm/non_matchings/code_80290C20/func_80295D88.s @@ -39,9 +39,9 @@ glabel func_80295D88 /* 0FF42C 80295E1C 2DE10014 */ sltiu $at, $t7, 0x14 /* 0FF430 80295E20 1020021B */ beqz $at, .L80296690 /* 0FF434 80295E24 000F7880 */ sll $t7, $t7, 2 -/* 0FF438 80295E28 3C01802C */ lui $at, %hi(D_802B94A4) +/* 0FF438 80295E28 3C01802C */ lui $at, %hi(jpt_802B94A4) /* 0FF43C 80295E2C 002F0821 */ addu $at, $at, $t7 -/* 0FF440 80295E30 8C2F94A4 */ lw $t7, %lo(D_802B94A4)($at) +/* 0FF440 80295E30 8C2F94A4 */ lw $t7, %lo(jpt_802B94A4)($at) /* 0FF444 80295E34 01E00008 */ jr $t7 /* 0FF448 80295E38 00000000 */ nop glabel L80295E3C diff --git a/asm/non_matchings/code_80290C20/render_luigi_raceway.s b/asm/non_matchings/code_80290C20/render_luigi_raceway.s index 80d9ea595..701268528 100644 --- a/asm/non_matchings/code_80290C20/render_luigi_raceway.s +++ b/asm/non_matchings/code_80290C20/render_luigi_raceway.s @@ -164,9 +164,9 @@ glabel render_luigi_raceway .L80293D08: /* 0FD318 80293D08 10200088 */ beqz $at, .L80293F2C /* 0FD31C 80293D0C 0003C080 */ sll $t8, $v1, 2 -/* 0FD320 80293D10 3C01802C */ lui $at, %hi(D_802B93D4) +/* 0FD320 80293D10 3C01802C */ lui $at, %hi(jpt_802B93D4) /* 0FD324 80293D14 00380821 */ addu $at, $at, $t8 -/* 0FD328 80293D18 8C3893D4 */ lw $t8, %lo(D_802B93D4)($at) +/* 0FD328 80293D18 8C3893D4 */ lw $t8, %lo(jpt_802B93D4)($at) /* 0FD32C 80293D1C 03000008 */ jr $t8 /* 0FD330 80293D20 00000000 */ nop glabel L80293D24 diff --git a/asm/non_matchings/code_80290C20/render_mario_raceway.s b/asm/non_matchings/code_80290C20/render_mario_raceway.s index 96e4e164b..479bc7e3b 100644 --- a/asm/non_matchings/code_80290C20/render_mario_raceway.s +++ b/asm/non_matchings/code_80290C20/render_mario_raceway.s @@ -93,9 +93,9 @@ glabel render_mario_raceway /* 0FBBDC 802925CC 2D810011 */ sltiu $at, $t4, 0x11 /* 0FBBE0 802925D0 10200063 */ beqz $at, .L80292760 /* 0FBBE4 802925D4 000C6080 */ sll $t4, $t4, 2 -/* 0FBBE8 802925D8 3C01802C */ lui $at, %hi(D_802B9390) +/* 0FBBE8 802925D8 3C01802C */ lui $at, %hi(jpt_802B9390) /* 0FBBEC 802925DC 002C0821 */ addu $at, $at, $t4 -/* 0FBBF0 802925E0 8C2C9390 */ lw $t4, %lo(D_802B9390)($at) +/* 0FBBF0 802925E0 8C2C9390 */ lw $t4, %lo(jpt_802B9390)($at) /* 0FBBF4 802925E4 01800008 */ jr $t4 /* 0FBBF8 802925E8 00000000 */ nop glabel L802925EC diff --git a/asm/non_matchings/code_80290C20/render_wario_stadium.s b/asm/non_matchings/code_80290C20/render_wario_stadium.s index 84ccc26ca..de07601b2 100644 --- a/asm/non_matchings/code_80290C20/render_wario_stadium.s +++ b/asm/non_matchings/code_80290C20/render_wario_stadium.s @@ -170,9 +170,9 @@ glabel render_wario_stadium .L80294DBC: /* 0FE3CC 80294DBC 10200083 */ beqz $at, .L80294FCC /* 0FE3D0 80294DC0 0003C080 */ sll $t8, $v1, 2 -/* 0FE3D4 80294DC4 3C01802C */ lui $at, %hi(D_802B93EC) +/* 0FE3D4 80294DC4 3C01802C */ lui $at, %hi(jpt_802B93EC) /* 0FE3D8 80294DC8 00380821 */ addu $at, $at, $t8 -/* 0FE3DC 80294DCC 8C3893EC */ lw $t8, %lo(D_802B93EC)($at) +/* 0FE3DC 80294DCC 8C3893EC */ lw $t8, %lo(jpt_802B93EC)($at) /* 0FE3E0 80294DD0 03000008 */ jr $t8 /* 0FE3E4 80294DD4 00000000 */ nop glabel L80294DD8 diff --git a/asm/non_matchings/code_802B0210/func_802B2914.s b/asm/non_matchings/code_802B0210/func_802B2914.s index 348105172..e04fdd362 100644 --- a/asm/non_matchings/code_802B0210/func_802B2914.s +++ b/asm/non_matchings/code_802B0210/func_802B2914.s @@ -122,9 +122,9 @@ glabel func_802B2914 /* 11C0FC 802B2AEC 10200037 */ beqz $at, .L802B2BCC /* 11C100 802B2AF0 A604000A */ sh $a0, 0xa($s0) /* 11C104 802B2AF4 00047880 */ sll $t7, $a0, 2 -/* 11C108 802B2AF8 3C01802C */ lui $at, %hi(D_802B9EF4) +/* 11C108 802B2AF8 3C01802C */ lui $at, %hi(jpt_802B9EF4) /* 11C10C 802B2AFC 002F0821 */ addu $at, $at, $t7 -/* 11C110 802B2B00 8C2F9EF4 */ lw $t7, %lo(D_802B9EF4)($at) +/* 11C110 802B2B00 8C2F9EF4 */ lw $t7, %lo(jpt_802B9EF4)($at) /* 11C114 802B2B04 01E00008 */ jr $t7 /* 11C118 802B2B08 00000000 */ nop glabel L802B2B0C diff --git a/asm/non_matchings/code_802B0210/func_802B2FA0.s b/asm/non_matchings/code_802B0210/func_802B2FA0.s index ab0008aff..2551bc822 100644 --- a/asm/non_matchings/code_802B0210/func_802B2FA0.s +++ b/asm/non_matchings/code_802B0210/func_802B2FA0.s @@ -13,9 +13,9 @@ glabel func_802B2FA0 /* 11C5DC 802B2FCC 2D01000F */ sltiu $at, $t0, 0xf /* 11C5E0 802B2FD0 10200040 */ beqz $at, .L802B30D4 /* 11C5E4 802B2FD4 00084080 */ sll $t0, $t0, 2 -/* 11C5E8 802B2FD8 3C01802C */ lui $at, %hi(D_802B9F08) +/* 11C5E8 802B2FD8 3C01802C */ lui $at, %hi(jpt_802B9F08) /* 11C5EC 802B2FDC 00280821 */ addu $at, $at, $t0 -/* 11C5F0 802B2FE0 8C289F08 */ lw $t0, %lo(D_802B9F08)($at) +/* 11C5F0 802B2FE0 8C289F08 */ lw $t0, %lo(jpt_802B9F08)($at) /* 11C5F4 802B2FE4 01000008 */ jr $t0 /* 11C5F8 802B2FE8 00000000 */ nop glabel L802B2FEC diff --git a/asm/non_matchings/code_802B0210/update_obj_banana.s b/asm/non_matchings/code_802B0210/update_obj_banana.s index 3f53340ed..8e5e81319 100644 --- a/asm/non_matchings/code_802B0210/update_obj_banana.s +++ b/asm/non_matchings/code_802B0210/update_obj_banana.s @@ -18,9 +18,9 @@ glabel update_obj_banana /* 11B684 802B2074 10200222 */ beqz $at, .L802B2900 /* 11B688 802B2078 01F81021 */ addu $v0, $t7, $t8 /* 11B68C 802B207C 0019C880 */ sll $t9, $t9, 2 -/* 11B690 802B2080 3C01802C */ lui $at, %hi(D_802B9EC8) +/* 11B690 802B2080 3C01802C */ lui $at, %hi(jpt_802B9EC8) /* 11B694 802B2084 00390821 */ addu $at, $at, $t9 -/* 11B698 802B2088 8C399EC8 */ lw $t9, %lo(D_802B9EC8)($at) +/* 11B698 802B2088 8C399EC8 */ lw $t9, %lo(jpt_802B9EC8)($at) /* 11B69C 802B208C 03200008 */ jr $t9 /* 11B6A0 802B2090 00000000 */ nop glabel L802B2094 diff --git a/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s b/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s index 803044e8c..125840736 100644 --- a/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s +++ b/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s @@ -18,9 +18,9 @@ glabel update_obj_banana_bunch /* 11A078 802B0A68 102000E5 */ beqz $at, .L802B0E00 /* 11A07C 802B0A6C 01F83821 */ addu $a3, $t7, $t8 /* 11A080 802B0A70 0019C880 */ sll $t9, $t9, 2 -/* 11A084 802B0A74 3C01802C */ lui $at, %hi(D_802B9E98) +/* 11A084 802B0A74 3C01802C */ lui $at, %hi(jpt_802B9E98) /* 11A088 802B0A78 00390821 */ addu $at, $at, $t9 -/* 11A08C 802B0A7C 8C399E98 */ lw $t9, %lo(D_802B9E98)($at) +/* 11A08C 802B0A7C 8C399E98 */ lw $t9, %lo(jpt_802B9E98)($at) /* 11A090 802B0A80 03200008 */ jr $t9 /* 11A094 802B0A84 00000000 */ nop glabel L802B0A88 diff --git a/asm/non_matchings/code_802B0210/update_obj_green_shell.s b/asm/non_matchings/code_802B0210/update_obj_green_shell.s index e00f8ba51..ca474b14e 100644 --- a/asm/non_matchings/code_802B0210/update_obj_green_shell.s +++ b/asm/non_matchings/code_802B0210/update_obj_green_shell.s @@ -62,9 +62,9 @@ glabel update_obj_green_shell /* 11C9BC 802B33AC 102001E0 */ beqz $at, .L802B3B30 /* 11C9C0 802B33B0 A60A0010 */ sh $t2, 0x10($s0) /* 11C9C4 802B33B4 000B5880 */ sll $t3, $t3, 2 -/* 11C9C8 802B33B8 3C01802C */ lui $at, %hi(D_802B9F44) +/* 11C9C8 802B33B8 3C01802C */ lui $at, %hi(jpt_802B9F44) /* 11C9CC 802B33BC 002B0821 */ addu $at, $at, $t3 -/* 11C9D0 802B33C0 8C2B9F44 */ lw $t3, %lo(D_802B9F44)($at) +/* 11C9D0 802B33C0 8C2B9F44 */ lw $t3, %lo(jpt_802B9F44)($at) /* 11C9D4 802B33C4 01600008 */ jr $t3 /* 11C9D8 802B33C8 00000000 */ nop glabel L802B33CC diff --git a/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s b/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s index 7fccbd329..aa6cbc88e 100644 --- a/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s +++ b/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s @@ -63,9 +63,9 @@ glabel update_obj_red_blue_shell /* 11D914 802B4304 102002C5 */ beqz $at, .L802B4E1C /* 11D918 802B4308 A60B0010 */ sh $t3, 0x10($s0) /* 11D91C 802B430C 000C6080 */ sll $t4, $t4, 2 -/* 11D920 802B4310 3C01802C */ lui $at, %hi(D_802B9F6C) +/* 11D920 802B4310 3C01802C */ lui $at, %hi(jpt_802B9F6C) /* 11D924 802B4314 002C0821 */ addu $at, $at, $t4 -/* 11D928 802B4318 8C2C9F6C */ lw $t4, %lo(D_802B9F6C)($at) +/* 11D928 802B4318 8C2C9F6C */ lw $t4, %lo(jpt_802B9F6C)($at) /* 11D92C 802B431C 01800008 */ jr $t4 /* 11D930 802B4320 00000000 */ nop glabel L802B4324 diff --git a/asm/non_matchings/code_802B0210/update_obj_triple_shell.s b/asm/non_matchings/code_802B0210/update_obj_triple_shell.s index 943e0d341..8e2826ab3 100644 --- a/asm/non_matchings/code_802B0210/update_obj_triple_shell.s +++ b/asm/non_matchings/code_802B0210/update_obj_triple_shell.s @@ -17,9 +17,9 @@ glabel update_obj_triple_shell /* 11A4E4 802B0ED4 10200242 */ beqz $at, .L802B17E0 /* 11A4E8 802B0ED8 3303FFFF */ andi $v1, $t8, 0xffff /* 11A4EC 802B0EDC 0019C880 */ sll $t9, $t9, 2 -/* 11A4F0 802B0EE0 3C01802C */ lui $at, %hi(D_802B9EB4) +/* 11A4F0 802B0EE0 3C01802C */ lui $at, %hi(jpt_802B9EB4) /* 11A4F4 802B0EE4 00390821 */ addu $at, $at, $t9 -/* 11A4F8 802B0EE8 8C399EB4 */ lw $t9, %lo(D_802B9EB4)($at) +/* 11A4F8 802B0EE8 8C399EB4 */ lw $t9, %lo(jpt_802B9EB4)($at) /* 11A4FC 802B0EEC 03200008 */ jr $t9 /* 11A500 802B0EF0 00000000 */ nop glabel L802B0EF4 diff --git a/asm/non_matchings/code_actors/func_80296A50.s b/asm/non_matchings/code_actors/func_80296A50.s index de3c9ffed..b037793c3 100644 --- a/asm/non_matchings/code_actors/func_80296A50.s +++ b/asm/non_matchings/code_actors/func_80296A50.s @@ -73,9 +73,9 @@ glabel func_80296A50 /* 100168 80296B58 2D810008 */ sltiu $at, $t4, 8 /* 10016C 80296B5C 10200013 */ beqz $at, .L80296BAC /* 100170 80296B60 000C6080 */ sll $t4, $t4, 2 -/* 100174 80296B64 3C01802C */ lui $at, %hi(D_802B9500) +/* 100174 80296B64 3C01802C */ lui $at, %hi(jpt_802B9500) /* 100178 80296B68 002C0821 */ addu $at, $at, $t4 -/* 10017C 80296B6C 8C2C9500 */ lw $t4, %lo(D_802B9500)($at) +/* 10017C 80296B6C 8C2C9500 */ lw $t4, %lo(jpt_802B9500)($at) /* 100180 80296B70 01800008 */ jr $t4 /* 100184 80296B74 00000000 */ nop glabel L80296B78 @@ -166,9 +166,9 @@ glabel L80296BAC /* 1002AC 80296C9C 2F010008 */ sltiu $at, $t8, 8 /* 1002B0 80296CA0 10200013 */ beqz $at, .L80296CF0 /* 1002B4 80296CA4 0018C080 */ sll $t8, $t8, 2 -/* 1002B8 80296CA8 3C01802C */ lui $at, %hi(D_802B9520) +/* 1002B8 80296CA8 3C01802C */ lui $at, %hi(jpt_802B9520) /* 1002BC 80296CAC 00380821 */ addu $at, $at, $t8 -/* 1002C0 80296CB0 8C389520 */ lw $t8, %lo(D_802B9520)($at) +/* 1002C0 80296CB0 8C389520 */ lw $t8, %lo(jpt_802B9520)($at) /* 1002C4 80296CB4 03000008 */ jr $t8 /* 1002C8 80296CB8 00000000 */ nop glabel L80296CBC diff --git a/asm/non_matchings/code_actors/func_80296D10.s b/asm/non_matchings/code_actors/func_80296D10.s index 3121d4e4e..0852838b2 100644 --- a/asm/non_matchings/code_actors/func_80296D10.s +++ b/asm/non_matchings/code_actors/func_80296D10.s @@ -32,9 +32,9 @@ glabel func_80296D10 /* 100398 80296D88 2F21002C */ sltiu $at, $t9, 0x2c /* 10039C 80296D8C 10200123 */ beqz $at, .L8029721C /* 1003A0 80296D90 0019C880 */ sll $t9, $t9, 2 -/* 1003A4 80296D94 3C01802C */ lui $at, %hi(D_802B9540) +/* 1003A4 80296D94 3C01802C */ lui $at, %hi(jpt_802B9540) /* 1003A8 80296D98 00390821 */ addu $at, $at, $t9 -/* 1003AC 80296D9C 8C399540 */ lw $t9, %lo(D_802B9540)($at) +/* 1003AC 80296D9C 8C399540 */ lw $t9, %lo(jpt_802B9540)($at) /* 1003B0 80296DA0 03200008 */ jr $t9 /* 1003B4 80296DA4 00000000 */ nop glabel L80296DA8 diff --git a/asm/non_matchings/code_actors/func_80297A50.s b/asm/non_matchings/code_actors/func_80297A50.s index 256794784..50a541155 100644 --- a/asm/non_matchings/code_actors/func_80297A50.s +++ b/asm/non_matchings/code_actors/func_80297A50.s @@ -42,9 +42,9 @@ glabel func_80297A50 /* 101100 80297AF0 2D010005 */ sltiu $at, $t0, 5 /* 101104 80297AF4 1020003C */ beqz $at, .L80297BE8 /* 101108 80297AF8 00084080 */ sll $t0, $t0, 2 -/* 10110C 80297AFC 3C01802C */ lui $at, %hi(D_802B95FC) +/* 10110C 80297AFC 3C01802C */ lui $at, %hi(jpt_802B95FC) /* 101110 80297B00 00280821 */ addu $at, $at, $t0 -/* 101114 80297B04 8C2895FC */ lw $t0, %lo(D_802B95FC)($at) +/* 101114 80297B04 8C2895FC */ lw $t0, %lo(jpt_802B95FC)($at) /* 101118 80297B08 01000008 */ jr $t0 /* 10111C 80297B0C 00000000 */ nop glabel L80297B10 diff --git a/asm/non_matchings/code_actors/func_802986B4.s b/asm/non_matchings/code_actors/func_802986B4.s index c02d2d4e6..6a91fae63 100644 --- a/asm/non_matchings/code_actors/func_802986B4.s +++ b/asm/non_matchings/code_actors/func_802986B4.s @@ -139,9 +139,9 @@ glabel func_802986B4 /* 101EE0 802988D0 2D810005 */ sltiu $at, $t4, 5 /* 101EE4 802988D4 1020002D */ beqz $at, .L8029898C /* 101EE8 802988D8 000C6080 */ sll $t4, $t4, 2 -/* 101EEC 802988DC 3C01802C */ lui $at, %hi(D_802B9634) +/* 101EEC 802988DC 3C01802C */ lui $at, %hi(jpt_802B9634) /* 101EF0 802988E0 002C0821 */ addu $at, $at, $t4 -/* 101EF4 802988E4 8C2C9634 */ lw $t4, %lo(D_802B9634)($at) +/* 101EF4 802988E4 8C2C9634 */ lw $t4, %lo(jpt_802B9634)($at) /* 101EF8 802988E8 01800008 */ jr $t4 /* 101EFC 802988EC 00000000 */ nop glabel L802988F0 diff --git a/asm/non_matchings/code_actors/func_8029AC18.s b/asm/non_matchings/code_actors/func_8029AC18.s index 9d70ec68a..cb7b8ea90 100644 --- a/asm/non_matchings/code_actors/func_8029AC18.s +++ b/asm/non_matchings/code_actors/func_8029AC18.s @@ -53,9 +53,9 @@ glabel func_8029AC18 /* 1042F4 8029ACE4 2D410008 */ sltiu $at, $t2, 8 /* 1042F8 8029ACE8 10200045 */ beqz $at, .L8029AE00 /* 1042FC 8029ACEC 000A5080 */ sll $t2, $t2, 2 -/* 104300 8029ACF0 3C01802C */ lui $at, %hi(D_802B96BC) +/* 104300 8029ACF0 3C01802C */ lui $at, %hi(jpt_802B96BC) /* 104304 8029ACF4 002A0821 */ addu $at, $at, $t2 -/* 104308 8029ACF8 8C2A96BC */ lw $t2, %lo(D_802B96BC)($at) +/* 104308 8029ACF8 8C2A96BC */ lw $t2, %lo(jpt_802B96BC)($at) /* 10430C 8029ACFC 01400008 */ jr $t2 /* 104310 8029AD00 00000000 */ nop glabel L8029AD04 diff --git a/asm/non_matchings/code_actors/func_8029DB44.s b/asm/non_matchings/code_actors/func_8029DB44.s index 93f875e31..224de4bc6 100644 --- a/asm/non_matchings/code_actors/func_8029DB44.s +++ b/asm/non_matchings/code_actors/func_8029DB44.s @@ -24,9 +24,9 @@ glabel func_8029DB44 /* 1071AC 8029DB9C 2F210014 */ sltiu $at, $t9, 0x14 /* 1071B0 8029DBA0 10200166 */ beqz $at, .L8029E13C /* 1071B4 8029DBA4 0019C880 */ sll $t9, $t9, 2 -/* 1071B8 8029DBA8 3C01802C */ lui $at, %hi(D_802B97AC) +/* 1071B8 8029DBA8 3C01802C */ lui $at, %hi(jpt_802B97AC) /* 1071BC 8029DBAC 00390821 */ addu $at, $at, $t9 -/* 1071C0 8029DBB0 8C3997AC */ lw $t9, %lo(D_802B97AC)($at) +/* 1071C0 8029DBB0 8C3997AC */ lw $t9, %lo(jpt_802B97AC)($at) /* 1071C4 8029DBB4 03200008 */ jr $t9 /* 1071C8 8029DBB8 00000000 */ nop glabel L8029DBBC diff --git a/asm/non_matchings/code_actors/func_8029E158.s b/asm/non_matchings/code_actors/func_8029E158.s index 8755849e7..6a48c44a7 100644 --- a/asm/non_matchings/code_actors/func_8029E158.s +++ b/asm/non_matchings/code_actors/func_8029E158.s @@ -144,9 +144,9 @@ glabel func_8029E158 /* 1079A0 8029E390 2DC10013 */ sltiu $at, $t6, 0x13 /* 1079A4 8029E394 10200105 */ beqz $at, .L8029E7AC /* 1079A8 8029E398 000E7080 */ sll $t6, $t6, 2 -/* 1079AC 8029E39C 3C01802C */ lui $at, %hi(D_802B97FC) +/* 1079AC 8029E39C 3C01802C */ lui $at, %hi(jpt_802B97FC) /* 1079B0 8029E3A0 002E0821 */ addu $at, $at, $t6 -/* 1079B4 8029E3A4 8C2E97FC */ lw $t6, %lo(D_802B97FC)($at) +/* 1079B4 8029E3A4 8C2E97FC */ lw $t6, %lo(jpt_802B97FC)($at) /* 1079B8 8029E3A8 01C00008 */ jr $t6 /* 1079BC 8029E3AC 00000000 */ nop glabel L8029E3B0 diff --git a/asm/non_matchings/code_actors/func_8029E890.s b/asm/non_matchings/code_actors/func_8029E890.s index 2c7022e32..23a962db9 100644 --- a/asm/non_matchings/code_actors/func_8029E890.s +++ b/asm/non_matchings/code_actors/func_8029E890.s @@ -48,9 +48,9 @@ glabel func_8029E890 /* 107F50 8029E940 2DA10008 */ sltiu $at, $t5, 8 /* 107F54 8029E944 10200051 */ beqz $at, .L8029EA8C /* 107F58 8029E948 000D6880 */ sll $t5, $t5, 2 -/* 107F5C 8029E94C 3C01802C */ lui $at, %hi(D_802B9848) +/* 107F5C 8029E94C 3C01802C */ lui $at, %hi(jpt_802B9848) /* 107F60 8029E950 002D0821 */ addu $at, $at, $t5 -/* 107F64 8029E954 8C2D9848 */ lw $t5, %lo(D_802B9848)($at) +/* 107F64 8029E954 8C2D9848 */ lw $t5, %lo(jpt_802B9848)($at) /* 107F68 8029E958 01A00008 */ jr $t5 /* 107F6C 8029E95C 00000000 */ nop glabel L8029E960 @@ -180,9 +180,9 @@ glabel L8029EA8C /* 108124 8029EB14 2DA10008 */ sltiu $at, $t5, 8 /* 108128 8029EB18 10200051 */ beqz $at, .L8029EC60 /* 10812C 8029EB1C 000D6880 */ sll $t5, $t5, 2 -/* 108130 8029EB20 3C01802C */ lui $at, %hi(D_802B9868) +/* 108130 8029EB20 3C01802C */ lui $at, %hi(jpt_802B9868) /* 108134 8029EB24 002D0821 */ addu $at, $at, $t5 -/* 108138 8029EB28 8C2D9868 */ lw $t5, %lo(D_802B9868)($at) +/* 108138 8029EB28 8C2D9868 */ lw $t5, %lo(jpt_802B9868)($at) /* 10813C 8029EB2C 01A00008 */ jr $t5 /* 108140 8029EB30 00000000 */ nop glabel L8029EB34 diff --git a/asm/non_matchings/code_actors/func_8029FDC8.s b/asm/non_matchings/code_actors/func_8029FDC8.s index c48f2f1b8..c21f01459 100644 --- a/asm/non_matchings/code_actors/func_8029FDC8.s +++ b/asm/non_matchings/code_actors/func_8029FDC8.s @@ -23,9 +23,9 @@ glabel func_8029FDC8 /* 109428 8029FE18 2DC10006 */ sltiu $at, $t6, 6 /* 10942C 8029FE1C 102000AE */ beqz $at, .L802A00D8 /* 109430 8029FE20 000E7080 */ sll $t6, $t6, 2 -/* 109434 8029FE24 3C01802C */ lui $at, %hi(D_802B98B4) +/* 109434 8029FE24 3C01802C */ lui $at, %hi(jpt_802B98B4) /* 109438 8029FE28 002E0821 */ addu $at, $at, $t6 -/* 10943C 8029FE2C 8C2E98B4 */ lw $t6, %lo(D_802B98B4)($at) +/* 10943C 8029FE2C 8C2E98B4 */ lw $t6, %lo(jpt_802B98B4)($at) /* 109440 8029FE30 01C00008 */ jr $t6 /* 109444 8029FE34 00000000 */ nop glabel L8029FE38 @@ -110,9 +110,9 @@ glabel L8029FE88 /* 109564 8029FF54 2C61000A */ sltiu $at, $v1, 0xa /* 109568 8029FF58 1020005F */ beqz $at, .L802A00D8 /* 10956C 8029FF5C 00034080 */ sll $t0, $v1, 2 -/* 109570 8029FF60 3C01802C */ lui $at, %hi(D_802B98CC) +/* 109570 8029FF60 3C01802C */ lui $at, %hi(jpt_802B98CC) /* 109574 8029FF64 00280821 */ addu $at, $at, $t0 -/* 109578 8029FF68 8C2898CC */ lw $t0, %lo(D_802B98CC)($at) +/* 109578 8029FF68 8C2898CC */ lw $t0, %lo(jpt_802B98CC)($at) /* 10957C 8029FF6C 01000008 */ jr $t0 /* 109580 8029FF70 00000000 */ nop glabel L8029FF74 @@ -149,9 +149,9 @@ glabel L8029FFB4 /* 1095F4 8029FFE4 2C61000A */ sltiu $at, $v1, 0xa /* 1095F8 8029FFE8 1020003B */ beqz $at, .L802A00D8 /* 1095FC 8029FFEC 00036880 */ sll $t5, $v1, 2 -/* 109600 8029FFF0 3C01802C */ lui $at, %hi(D_802B98F4) +/* 109600 8029FFF0 3C01802C */ lui $at, %hi(jpt_802B98F4) /* 109604 8029FFF4 002D0821 */ addu $at, $at, $t5 -/* 109608 8029FFF8 8C2D98F4 */ lw $t5, %lo(D_802B98F4)($at) +/* 109608 8029FFF8 8C2D98F4 */ lw $t5, %lo(jpt_802B98F4)($at) /* 10960C 8029FFFC 01A00008 */ jr $t5 /* 109610 802A0000 00000000 */ nop glabel L802A0004 diff --git a/asm/non_matchings/code_actors/func_802A0450.s b/asm/non_matchings/code_actors/func_802A0450.s index e1547e0ad..75af82bed 100644 --- a/asm/non_matchings/code_actors/func_802A0450.s +++ b/asm/non_matchings/code_actors/func_802A0450.s @@ -17,9 +17,9 @@ glabel func_802A0450 /* 109A9C 802A048C 1020022C */ beqz $at, .L802A0D40 /* 109AA0 802A0490 00184403 */ sra $t0, $t8, 0x10 /* 109AA4 802A0494 000B5880 */ sll $t3, $t3, 2 -/* 109AA8 802A0498 3C01802C */ lui $at, %hi(D_802B991C) +/* 109AA8 802A0498 3C01802C */ lui $at, %hi(jpt_802B991C) /* 109AAC 802A049C 002B0821 */ addu $at, $at, $t3 -/* 109AB0 802A04A0 8C2B991C */ lw $t3, %lo(D_802B991C)($at) +/* 109AB0 802A04A0 8C2B991C */ lw $t3, %lo(jpt_802B991C)($at) /* 109AB4 802A04A4 01600008 */ jr $t3 /* 109AB8 802A04A8 00000000 */ nop glabel L802A04AC diff --git a/asm/non_matchings/code_actors/func_802A3008.s b/asm/non_matchings/code_actors/func_802A3008.s index 136e8a08a..b1e1141fa 100644 --- a/asm/non_matchings/code_actors/func_802A3008.s +++ b/asm/non_matchings/code_actors/func_802A3008.s @@ -115,9 +115,9 @@ glabel func_802A3008 /* 10C7D4 802A31C4 2DA1002C */ sltiu $at, $t5, 0x2c /* 10C7D8 802A31C8 102000C2 */ beqz $at, .L802A34D4 /* 10C7DC 802A31CC 000D6880 */ sll $t5, $t5, 2 -/* 10C7E0 802A31D0 3C01802C */ lui $at, %hi(D_802B9A44) +/* 10C7E0 802A31D0 3C01802C */ lui $at, %hi(jpt_802B9A44) /* 10C7E4 802A31D4 002D0821 */ addu $at, $at, $t5 -/* 10C7E8 802A31D8 8C2D9A44 */ lw $t5, %lo(D_802B9A44)($at) +/* 10C7E8 802A31D8 8C2D9A44 */ lw $t5, %lo(jpt_802B9A44)($at) /* 10C7EC 802A31DC 01A00008 */ jr $t5 /* 10C7F0 802A31E0 00000000 */ nop glabel L802A31E4 diff --git a/asm/non_matchings/code_actors/place_segment_06.s b/asm/non_matchings/code_actors/place_segment_06.s index 1e6578beb..eb0c687f8 100644 --- a/asm/non_matchings/code_actors/place_segment_06.s +++ b/asm/non_matchings/code_actors/place_segment_06.s @@ -67,9 +67,9 @@ glabel place_segment_06 /* 106C94 8029D684 468021A0 */ cvt.s.w $f6, $f4 /* 106C98 8029D688 1020002C */ beqz $at, .L8029D73C /* 106C9C 8029D68C E7A60090 */ swc1 $f6, 0x90($sp) -/* 106CA0 8029D690 3C01802C */ lui $at, %hi(D_802B977C) +/* 106CA0 8029D690 3C01802C */ lui $at, %hi(jpt_802B977C) /* 106CA4 8029D694 002B0821 */ addu $at, $at, $t3 -/* 106CA8 8029D698 8C2B977C */ lw $t3, %lo(D_802B977C)($at) +/* 106CA8 8029D698 8C2B977C */ lw $t3, %lo(jpt_802B977C)($at) /* 106CAC 8029D69C 01600008 */ jr $t3 /* 106CB0 8029D6A0 00000000 */ nop glabel L8029D6A4 diff --git a/asm/non_matchings/code_actors/update_simple_objects.s b/asm/non_matchings/code_actors/update_simple_objects.s index 2521c2848..b2bb7d0f2 100644 --- a/asm/non_matchings/code_actors/update_simple_objects.s +++ b/asm/non_matchings/code_actors/update_simple_objects.s @@ -13,9 +13,9 @@ glabel update_simple_objects /* 10CB80 802A3570 2F01002C */ sltiu $at, $t8, 0x2c /* 10CB84 802A3574 1020005E */ beqz $at, .L802A36F0 /* 10CB88 802A3578 0018C080 */ sll $t8, $t8, 2 -/* 10CB8C 802A357C 3C01802C */ lui $at, %hi(D_802B9AF4) +/* 10CB8C 802A357C 3C01802C */ lui $at, %hi(jpt_802B9AF4) /* 10CB90 802A3580 00380821 */ addu $at, $at, $t8 -/* 10CB94 802A3584 8C389AF4 */ lw $t8, %lo(D_802B9AF4)($at) +/* 10CB94 802A3584 8C389AF4 */ lw $t8, %lo(jpt_802B9AF4)($at) /* 10CB98 802A3588 03000008 */ jr $t8 /* 10CB9C 802A358C 00000000 */ nop glabel L802A3590 diff --git a/asm/non_matchings/crash_screen/crash_screen_draw_info.s b/asm/non_matchings/crash_screen/crash_screen_draw_info.s new file mode 100644 index 000000000..443833306 --- /dev/null +++ b/asm/non_matchings/crash_screen/crash_screen_draw_info.s @@ -0,0 +1,146 @@ +glabel crash_screen_draw_info +/* 004E98 80004298 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 004E9C 8000429C AFB50028 */ sw $s5, 0x28($sp) +/* 004EA0 800042A0 AFB30020 */ sw $s3, 0x20($sp) +/* 004EA4 800042A4 00A09825 */ move $s3, $a1 +/* 004EA8 800042A8 0080A825 */ move $s5, $a0 +/* 004EAC 800042AC 3C09800E */ lui $t1, %hi(D_800DC670) # $t1, 0x800e +/* 004EB0 800042B0 AFBF002C */ sw $ra, 0x2c($sp) +/* 004EB4 800042B4 AFB40024 */ sw $s4, 0x24($sp) +/* 004EB8 800042B8 AFB2001C */ sw $s2, 0x1c($sp) +/* 004EBC 800042BC AFB10018 */ sw $s1, 0x18($sp) +/* 004EC0 800042C0 AFB00014 */ sw $s0, 0x14($sp) +/* 004EC4 800042C4 2529C670 */ addiu $t1, %lo(D_800DC670) # addiu $t1, $t1, -0x3990 +/* 004EC8 800042C8 24040001 */ li $a0, 1 +/* 004ECC 800042CC 24050078 */ li $a1, 120 +/* 004ED0 800042D0 00004025 */ move $t0, $zero +/* 004ED4 800042D4 240A0018 */ li $t2, 24 +/* 004ED8 800042D8 8D2E0000 */ lw $t6, ($t1) +.L800042DC: +/* 004EDC 800042DC 00003025 */ move $a2, $zero +/* 004EE0 800042E0 01CA0019 */ multu $t6, $t2 +/* 004EE4 800042E4 00007812 */ mflo $t7 +/* 004EE8 800042E8 01E81021 */ addu $v0, $t7, $t0 +/* 004EEC 800042EC 24420030 */ addiu $v0, $v0, 0x30 +/* 004EF0 800042F0 0002C080 */ sll $t8, $v0, 2 +/* 004EF4 800042F4 0302C021 */ addu $t8, $t8, $v0 +/* 004EF8 800042F8 0018C9C0 */ sll $t9, $t8, 7 +/* 004EFC 800042FC 02B93821 */ addu $a3, $s5, $t9 +.L80004300: +/* 004F00 80004300 00001825 */ move $v1, $zero +/* 004F04 80004304 00E01025 */ move $v0, $a3 +.L80004308: +/* 004F08 80004308 24630004 */ addiu $v1, $v1, 4 +/* 004F0C 8000430C A44400CA */ sh $a0, 0xca($v0) +/* 004F10 80004310 A44400CC */ sh $a0, 0xcc($v0) +/* 004F14 80004314 A44400CE */ sh $a0, 0xce($v0) +/* 004F18 80004318 24420008 */ addiu $v0, $v0, 8 +/* 004F1C 8000431C 1465FFFA */ bne $v1, $a1, .L80004308 +/* 004F20 80004320 A44400C0 */ sh $a0, 0xc0($v0) +/* 004F24 80004324 24C60001 */ addiu $a2, $a2, 1 +/* 004F28 80004328 28C10010 */ slti $at, $a2, 0x10 +/* 004F2C 8000432C 1420FFF4 */ bnez $at, .L80004300 +/* 004F30 80004330 24E70280 */ addiu $a3, $a3, 0x280 +/* 004F34 80004334 25080014 */ addiu $t0, $t0, 0x14 +/* 004F38 80004338 2901003C */ slti $at, $t0, 0x3c +/* 004F3C 8000433C 5420FFE7 */ bnel $at, $zero, .L800042DC +/* 004F40 80004340 8D2E0000 */ lw $t6, ($t1) +/* 004F44 80004344 8D2B0000 */ lw $t3, ($t1) +/* 004F48 80004348 8E670014 */ lw $a3, 0x14($s3) +/* 004F4C 8000434C 02A02025 */ move $a0, $s5 +/* 004F50 80004350 016A0019 */ multu $t3, $t2 +/* 004F54 80004354 30EC000F */ andi $t4, $a3, 0xf +/* 004F58 80004358 01803825 */ move $a3, $t4 +/* 004F5C 8000435C 2405006C */ li $a1, 108 +/* 004F60 80004360 00001012 */ mflo $v0 +/* 004F64 80004364 24500035 */ addiu $s0, $v0, 0x35 +/* 004F68 80004368 0C001030 */ jal crash_screen_draw_glyph +/* 004F6C 8000436C 02003025 */ move $a2, $s0 +/* 004F70 80004370 02A02025 */ move $a0, $s5 +/* 004F74 80004374 24050074 */ li $a1, 116 +/* 004F78 80004378 02003025 */ move $a2, $s0 +/* 004F7C 8000437C 0C001030 */ jal crash_screen_draw_glyph +/* 004F80 80004380 24070010 */ li $a3, 16 +/* 004F84 80004384 26720020 */ addiu $s2, $s3, 0x20 +/* 004F88 80004388 8E5400FC */ lw $s4, 0xfc($s2) +/* 004F8C 8000438C 241100B4 */ li $s1, 180 +.L80004390: +/* 004F90 80004390 02A02025 */ move $a0, $s5 +/* 004F94 80004394 02202825 */ move $a1, $s1 +/* 004F98 80004398 02003025 */ move $a2, $s0 +/* 004F9C 8000439C 0C001030 */ jal crash_screen_draw_glyph +/* 004FA0 800043A0 3287000F */ andi $a3, $s4, 0xf +/* 004FA4 800043A4 2631FFF8 */ addiu $s1, $s1, -8 +/* 004FA8 800043A8 2A21007C */ slti $at, $s1, 0x7c +/* 004FAC 800043AC 00146902 */ srl $t5, $s4, 4 +/* 004FB0 800043B0 1020FFF7 */ beqz $at, .L80004390 +/* 004FB4 800043B4 01A0A025 */ move $s4, $t5 +/* 004FB8 800043B8 8E510100 */ lw $s1, 0x100($s2) +/* 004FBC 800043BC 02A02025 */ move $a0, $s5 +/* 004FC0 800043C0 240500BC */ li $a1, 188 +/* 004FC4 800043C4 00117082 */ srl $t6, $s1, 2 +/* 004FC8 800043C8 31D1001F */ andi $s1, $t6, 0x1f +/* 004FCC 800043CC 02003025 */ move $a2, $s0 +/* 004FD0 800043D0 0C001030 */ jal crash_screen_draw_glyph +/* 004FD4 800043D4 24070010 */ li $a3, 16 +/* 004FD8 800043D8 02A02025 */ move $a0, $s5 +/* 004FDC 800043DC 240500C4 */ li $a1, 196 +/* 004FE0 800043E0 02003025 */ move $a2, $s0 +/* 004FE4 800043E4 0C001030 */ jal crash_screen_draw_glyph +/* 004FE8 800043E8 00113902 */ srl $a3, $s1, 4 +/* 004FEC 800043EC 02A02025 */ move $a0, $s5 +/* 004FF0 800043F0 240500CC */ li $a1, 204 +/* 004FF4 800043F4 02003025 */ move $a2, $s0 +/* 004FF8 800043F8 0C001030 */ jal crash_screen_draw_glyph +/* 004FFC 800043FC 3227000F */ andi $a3, $s1, 0xf +/* 005000 80004400 8E5400E4 */ lw $s4, 0xe4($s2) +/* 005004 80004404 241100B4 */ li $s1, 180 +.L80004408: +/* 005008 80004408 02A02025 */ move $a0, $s5 +/* 00500C 8000440C 02202825 */ move $a1, $s1 +/* 005010 80004410 24060049 */ li $a2, 73 +/* 005014 80004414 0C001030 */ jal crash_screen_draw_glyph +/* 005018 80004418 3287000F */ andi $a3, $s4, 0xf +/* 00501C 8000441C 2631FFF8 */ addiu $s1, $s1, -8 +/* 005020 80004420 2A21007C */ slti $at, $s1, 0x7c +/* 005024 80004424 00145902 */ srl $t3, $s4, 4 +/* 005028 80004428 1020FFF7 */ beqz $at, .L80004408 +/* 00502C 8000442C 0160A025 */ move $s4, $t3 +/* 005030 80004430 8E4200FC */ lw $v0, 0xfc($s2) +/* 005034 80004434 2401FFFC */ li $at, -4 +/* 005038 80004438 241100B4 */ li $s1, 180 +/* 00503C 8000443C 00416024 */ and $t4, $v0, $at +/* 005040 80004440 3C018000 */ lui $at, (0x80000001 >> 16) # lui $at, 0x8000 +/* 005044 80004444 34210001 */ ori $at, (0x80000001 & 0xFFFF) # ori $at, $at, 1 +/* 005048 80004448 0181082B */ sltu $at, $t4, $at +/* 00504C 8000444C 14200006 */ bnez $at, .L80004468 +/* 005050 80004450 3C01803F */ lui $at, (0x803FFF7F >> 16) # lui $at, 0x803f +/* 005054 80004454 3421FF7F */ ori $at, (0x803FFF7F & 0xFFFF) # ori $at, $at, 0xff7f +/* 005058 80004458 0181082B */ sltu $at, $t4, $at +/* 00505C 8000445C 10200002 */ beqz $at, .L80004468 +/* 005060 80004460 00000000 */ nop +/* 005064 80004464 8D940000 */ lw $s4, ($t4) +.L80004468: +/* 005068 80004468 02A02025 */ move $a0, $s5 +/* 00506C 8000446C 02202825 */ move $a1, $s1 +/* 005070 80004470 2406005D */ li $a2, 93 +/* 005074 80004474 0C001030 */ jal crash_screen_draw_glyph +/* 005078 80004478 3287000F */ andi $a3, $s4, 0xf +/* 00507C 8000447C 2631FFF8 */ addiu $s1, $s1, -8 +/* 005080 80004480 2A21007C */ slti $at, $s1, 0x7c +/* 005084 80004484 00146902 */ srl $t5, $s4, 4 +/* 005088 80004488 1020FFF7 */ beqz $at, .L80004468 +/* 00508C 8000448C 01A0A025 */ move $s4, $t5 +/* 005090 80004490 0C033624 */ jal osWritebackDCacheAll +/* 005094 80004494 00000000 */ nop +/* 005098 80004498 0C033684 */ jal osViSwapBuffer +/* 00509C 8000449C 02A02025 */ move $a0, $s5 +/* 0050A0 800044A0 8FBF002C */ lw $ra, 0x2c($sp) +/* 0050A4 800044A4 8FB00014 */ lw $s0, 0x14($sp) +/* 0050A8 800044A8 8FB10018 */ lw $s1, 0x18($sp) +/* 0050AC 800044AC 8FB2001C */ lw $s2, 0x1c($sp) +/* 0050B0 800044B0 8FB30020 */ lw $s3, 0x20($sp) +/* 0050B4 800044B4 8FB40024 */ lw $s4, 0x24($sp) +/* 0050B8 800044B8 8FB50028 */ lw $s5, 0x28($sp) +/* 0050BC 800044BC 03E00008 */ jr $ra +/* 0050C0 800044C0 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/non_matchings/crash_screen/crash_screen_draw_square.s b/asm/non_matchings/crash_screen/crash_screen_draw_square.s new file mode 100644 index 000000000..8fc7e89b5 --- /dev/null +++ b/asm/non_matchings/crash_screen/crash_screen_draw_square.s @@ -0,0 +1,100 @@ +glabel crash_screen_draw_square +/* 004D44 80004144 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 004D48 80004148 AFB40028 */ sw $s4, 0x28($sp) +/* 004D4C 8000414C AFB30024 */ sw $s3, 0x24($sp) +/* 004D50 80004150 AFB20020 */ sw $s2, 0x20($sp) +/* 004D54 80004154 AFB00018 */ sw $s0, 0x18($sp) +/* 004D58 80004158 00809825 */ move $s3, $a0 +/* 004D5C 8000415C AFBF002C */ sw $ra, 0x2c($sp) +/* 004D60 80004160 AFB1001C */ sw $s1, 0x1c($sp) +/* 004D64 80004164 2410002E */ li $s0, 46 +/* 004D68 80004168 24120028 */ li $s2, 40 +/* 004D6C 8000416C 2414002C */ li $s4, 44 +/* 004D70 80004170 240D0006 */ li $t5, 6 +/* 004D74 80004174 240C0006 */ li $t4, 6 +/* 004D78 80004178 240B0006 */ li $t3, 6 +/* 004D7C 8000417C 240A0006 */ li $t2, 6 +/* 004D80 80004180 24090006 */ li $t1, 6 +/* 004D84 80004184 3407FFFF */ li $a3, 65535 +/* 004D88 80004188 3406F801 */ li $a2, 63489 +.L8000418C: +/* 004D8C 8000418C 0250082A */ slt $at, $s2, $s0 +/* 004D90 80004190 10200032 */ beqz $at, .L8000425C +/* 004D94 80004194 02408825 */ move $s1, $s2 +/* 004D98 80004198 0250082A */ slt $at, $s2, $s0 +.L8000419C: +/* 004D9C 8000419C 1020002C */ beqz $at, .L80004250 +/* 004DA0 800041A0 02401825 */ move $v1, $s2 +/* 004DA4 800041A4 00117080 */ sll $t6, $s1, 2 +/* 004DA8 800041A8 01D17021 */ addu $t6, $t6, $s1 +/* 004DAC 800041AC 02122023 */ subu $a0, $s0, $s2 +/* 004DB0 800041B0 30880003 */ andi $t0, $a0, 3 +/* 004DB4 800041B4 000E79C0 */ sll $t7, $t6, 7 +/* 004DB8 800041B8 1100000C */ beqz $t0, .L800041EC +/* 004DBC 800041BC 026FF821 */ addu $ra, $s3, $t7 +/* 004DC0 800041C0 0003C040 */ sll $t8, $v1, 1 +/* 004DC4 800041C4 03F81021 */ addu $v0, $ra, $t8 +/* 004DC8 800041C8 01122821 */ addu $a1, $t0, $s2 +.L800041CC: +/* 004DCC 800041CC 15240003 */ bne $t1, $a0, .L800041DC +/* 004DD0 800041D0 24630001 */ addiu $v1, $v1, 1 +/* 004DD4 800041D4 10000002 */ b .L800041E0 +/* 004DD8 800041D8 A4460000 */ sh $a2, ($v0) +.L800041DC: +/* 004DDC 800041DC A4470000 */ sh $a3, ($v0) +.L800041E0: +/* 004DE0 800041E0 14A3FFFA */ bne $a1, $v1, .L800041CC +/* 004DE4 800041E4 24420002 */ addiu $v0, $v0, 2 +/* 004DE8 800041E8 10700019 */ beq $v1, $s0, .L80004250 +.L800041EC: +/* 004DEC 800041EC 00032840 */ sll $a1, $v1, 1 +/* 004DF0 800041F0 03E51021 */ addu $v0, $ra, $a1 +/* 004DF4 800041F4 00104040 */ sll $t0, $s0, 1 +.L800041F8: +/* 004DF8 800041F8 15440003 */ bne $t2, $a0, .L80004208 +/* 004DFC 800041FC 24A50008 */ addiu $a1, $a1, 8 +/* 004E00 80004200 10000002 */ b .L8000420C +/* 004E04 80004204 A4460000 */ sh $a2, ($v0) +.L80004208: +/* 004E08 80004208 A4470000 */ sh $a3, ($v0) +.L8000420C: +/* 004E0C 8000420C 55640004 */ bnel $t3, $a0, .L80004220 +/* 004E10 80004210 A4470002 */ sh $a3, 2($v0) +/* 004E14 80004214 10000002 */ b .L80004220 +/* 004E18 80004218 A4460002 */ sh $a2, 2($v0) +/* 004E1C 8000421C A4470002 */ sh $a3, 2($v0) +.L80004220: +/* 004E20 80004220 55840004 */ bnel $t4, $a0, .L80004234 +/* 004E24 80004224 A4470004 */ sh $a3, 4($v0) +/* 004E28 80004228 10000002 */ b .L80004234 +/* 004E2C 8000422C A4460004 */ sh $a2, 4($v0) +/* 004E30 80004230 A4470004 */ sh $a3, 4($v0) +.L80004234: +/* 004E34 80004234 55A40004 */ bnel $t5, $a0, .L80004248 +/* 004E38 80004238 A4470006 */ sh $a3, 6($v0) +/* 004E3C 8000423C 10000002 */ b .L80004248 +/* 004E40 80004240 A4460006 */ sh $a2, 6($v0) +/* 004E44 80004244 A4470006 */ sh $a3, 6($v0) +.L80004248: +/* 004E48 80004248 14A8FFEB */ bne $a1, $t0, .L800041F8 +/* 004E4C 8000424C 24420008 */ addiu $v0, $v0, 8 +.L80004250: +/* 004E50 80004250 26310001 */ addiu $s1, $s1, 1 +/* 004E54 80004254 5630FFD1 */ bnel $s1, $s0, .L8000419C +/* 004E58 80004258 0250082A */ slt $at, $s2, $s0 +.L8000425C: +/* 004E5C 8000425C 2610FFFF */ addiu $s0, $s0, -1 +/* 004E60 80004260 1690FFCA */ bne $s4, $s0, .L8000418C +/* 004E64 80004264 26520001 */ addiu $s2, $s2, 1 +/* 004E68 80004268 0C033624 */ jal osWritebackDCacheAll +/* 004E6C 8000426C 00000000 */ nop +/* 004E70 80004270 0C033684 */ jal osViSwapBuffer +/* 004E74 80004274 02602025 */ move $a0, $s3 +/* 004E78 80004278 8FBF002C */ lw $ra, 0x2c($sp) +/* 004E7C 8000427C 8FB00018 */ lw $s0, 0x18($sp) +/* 004E80 80004280 8FB1001C */ lw $s1, 0x1c($sp) +/* 004E84 80004284 8FB20020 */ lw $s2, 0x20($sp) +/* 004E88 80004288 8FB30024 */ lw $s3, 0x24($sp) +/* 004E8C 8000428C 8FB40028 */ lw $s4, 0x28($sp) +/* 004E90 80004290 03E00008 */ jr $ra +/* 004E94 80004294 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/non_matchings/crash_screen/create_debug_thread.s b/asm/non_matchings/crash_screen/create_debug_thread.s new file mode 100644 index 000000000..88185252a --- /dev/null +++ b/asm/non_matchings/crash_screen/create_debug_thread.s @@ -0,0 +1,25 @@ +glabel create_debug_thread +/* 0052B8 800046B8 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 0052BC 800046BC AFBF001C */ sw $ra, 0x1c($sp) +/* 0052C0 800046C0 3C048016 */ lui $a0, %hi(D_80162D40) # $a0, 0x8016 +/* 0052C4 800046C4 3C058016 */ lui $a1, %hi(D_80162D58) # $a1, 0x8016 +/* 0052C8 800046C8 24A52D58 */ addiu $a1, %lo(D_80162D58) # addiu $a1, $a1, 0x2d58 +/* 0052CC 800046CC 24842D40 */ addiu $a0, %lo(D_80162D40) # addiu $a0, $a0, 0x2d40 +/* 0052D0 800046D0 0C033358 */ jal osCreateMesgQueue +/* 0052D4 800046D4 24060001 */ li $a2, 1 +/* 0052D8 800046D8 3C0E8016 */ lui $t6, %hi(D_80162D40) # $t6, 0x8016 +/* 0052DC 800046DC 25CE2D40 */ addiu $t6, %lo(D_80162D40) # addiu $t6, $t6, 0x2d40 +/* 0052E0 800046E0 3C048016 */ lui $a0, %hi(D_80162790) # $a0, 0x8016 +/* 0052E4 800046E4 3C068000 */ lui $a2, %hi(thread9_crash_screen) # $a2, 0x8000 +/* 0052E8 800046E8 240F007F */ li $t7, 127 +/* 0052EC 800046EC AFAF0014 */ sw $t7, 0x14($sp) +/* 0052F0 800046F0 24C64530 */ addiu $a2, %lo(thread9_crash_screen) # addiu $a2, $a2, 0x4530 +/* 0052F4 800046F4 24842790 */ addiu $a0, %lo(D_80162790) # addiu $a0, $a0, 0x2790 +/* 0052F8 800046F8 AFAE0010 */ sw $t6, 0x10($sp) +/* 0052FC 800046FC 24050009 */ li $a1, 9 +/* 005300 80004700 0C032FDC */ jal osCreateThread +/* 005304 80004704 00003825 */ move $a3, $zero +/* 005308 80004708 8FBF001C */ lw $ra, 0x1c($sp) +/* 00530C 8000470C 27BD0020 */ addiu $sp, $sp, 0x20 +/* 005310 80004710 03E00008 */ jr $ra +/* 005314 80004714 00000000 */ nop diff --git a/asm/non_matchings/crash_screen/func_800046AC.s b/asm/non_matchings/crash_screen/func_800046AC.s new file mode 100644 index 000000000..8b1233fe6 --- /dev/null +++ b/asm/non_matchings/crash_screen/func_800046AC.s @@ -0,0 +1,4 @@ +glabel func_800046AC +/* 0052AC 800046AC 3C018016 */ lui $at, %hi(pFramebuffer) # 0x8016 +/* 0052B0 800046B0 03E00008 */ jr $ra +/* 0052B4 800046B4 AC242D5C */ sw $a0, %lo(pFramebuffer)($at) # 0x2d5c($at) diff --git a/asm/non_matchings/crash_screen/get_faulted_thread.s b/asm/non_matchings/crash_screen/get_faulted_thread.s new file mode 100644 index 000000000..655d59009 --- /dev/null +++ b/asm/non_matchings/crash_screen/get_faulted_thread.s @@ -0,0 +1,33 @@ +glabel get_faulted_thread +/* 0050C4 800044C4 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 0050C8 800044C8 AFBF0014 */ sw $ra, 0x14($sp) +/* 0050CC 800044CC 0C03384C */ jal __osGetCurrFaultedThread +/* 0050D0 800044D0 00000000 */ nop +/* 0050D4 800044D4 8C4E0004 */ lw $t6, 4($v0) +/* 0050D8 800044D8 2404FFFF */ li $a0, -1 +/* 0050DC 800044DC 00401825 */ move $v1, $v0 +/* 0050E0 800044E0 108E0010 */ beq $a0, $t6, .L80004524 +/* 0050E4 800044E4 8FBF0014 */ lw $ra, 0x14($sp) +/* 0050E8 800044E8 8C420004 */ lw $v0, 4($v0) +.L800044EC: +/* 0050EC 800044EC 18400009 */ blez $v0, .L80004514 +/* 0050F0 800044F0 28410080 */ slti $at, $v0, 0x80 +/* 0050F4 800044F4 50200008 */ beql $at, $zero, .L80004518 +/* 0050F8 800044F8 8C63000C */ lw $v1, 0xc($v1) +/* 0050FC 800044FC 946F0012 */ lhu $t7, 0x12($v1) +/* 005100 80004500 31F80003 */ andi $t8, $t7, 3 +/* 005104 80004504 53000004 */ beql $t8, $zero, .L80004518 +/* 005108 80004508 8C63000C */ lw $v1, 0xc($v1) +/* 00510C 8000450C 10000006 */ b .L80004528 +/* 005110 80004510 00601025 */ move $v0, $v1 +.L80004514: +/* 005114 80004514 8C63000C */ lw $v1, 0xc($v1) +.L80004518: +/* 005118 80004518 8C620004 */ lw $v0, 4($v1) +/* 00511C 8000451C 1482FFF3 */ bne $a0, $v0, .L800044EC +/* 005120 80004520 00000000 */ nop +.L80004524: +/* 005124 80004524 00001025 */ move $v0, $zero +.L80004528: +/* 005128 80004528 03E00008 */ jr $ra +/* 00512C 8000452C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/crash_screen/start_debug_thread.s b/asm/non_matchings/crash_screen/start_debug_thread.s new file mode 100644 index 000000000..a32edd5b4 --- /dev/null +++ b/asm/non_matchings/crash_screen/start_debug_thread.s @@ -0,0 +1,10 @@ +glabel start_debug_thread +/* 005318 80004718 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 00531C 8000471C AFBF0014 */ sw $ra, 0x14($sp) +/* 005320 80004720 3C048016 */ lui $a0, %hi(D_80162790) # $a0, 0x8016 +/* 005324 80004724 0C0330D8 */ jal osStartThread +/* 005328 80004728 24842790 */ addiu $a0, %lo(D_80162790) # addiu $a0, $a0, 0x2790 +/* 00532C 8000472C 8FBF0014 */ lw $ra, 0x14($sp) +/* 005330 80004730 27BD0018 */ addiu $sp, $sp, 0x18 +/* 005334 80004734 03E00008 */ jr $ra +/* 005338 80004738 00000000 */ nop diff --git a/asm/non_matchings/crash_screen/thread9_crash_screen.s b/asm/non_matchings/crash_screen/thread9_crash_screen.s new file mode 100644 index 000000000..144d00be5 --- /dev/null +++ b/asm/non_matchings/crash_screen/thread9_crash_screen.s @@ -0,0 +1,101 @@ +glabel thread9_crash_screen +/* 005130 80004530 27BDFFB8 */ addiu $sp, $sp, -0x48 +/* 005134 80004534 AFB70030 */ sw $s7, 0x30($sp) +/* 005138 80004538 3C178016 */ lui $s7, %hi(D_80162D40) # $s7, 0x8016 +/* 00513C 8000453C 26F72D40 */ addiu $s7, %lo(D_80162D40) # addiu $s7, $s7, 0x2d40 +/* 005140 80004540 AFBF0034 */ sw $ra, 0x34($sp) +/* 005144 80004544 AFA40048 */ sw $a0, 0x48($sp) +/* 005148 80004548 AFB6002C */ sw $s6, 0x2c($sp) +/* 00514C 8000454C AFB50028 */ sw $s5, 0x28($sp) +/* 005150 80004550 AFB40024 */ sw $s4, 0x24($sp) +/* 005154 80004554 AFB30020 */ sw $s3, 0x20($sp) +/* 005158 80004558 AFB2001C */ sw $s2, 0x1c($sp) +/* 00515C 8000455C AFB10018 */ sw $s1, 0x18($sp) +/* 005160 80004560 AFB00014 */ sw $s0, 0x14($sp) +/* 005164 80004564 2404000C */ li $a0, 12 +/* 005168 80004568 02E02825 */ move $a1, $s7 +/* 00516C 8000456C 0C033380 */ jal osSetEventMesg +/* 005170 80004570 24060010 */ li $a2, 16 +/* 005174 80004574 2404000A */ li $a0, 10 +/* 005178 80004578 02E02825 */ move $a1, $s7 +/* 00517C 8000457C 0C033380 */ jal osSetEventMesg +/* 005180 80004580 24060010 */ li $a2, 16 +/* 005184 80004584 3C108016 */ lui $s0, %hi(D_80162D60) # $s0, 0x8016 +/* 005188 80004588 26102D60 */ addiu $s0, %lo(D_80162D60) # addiu $s0, $s0, 0x2d60 +/* 00518C 8000458C 3C158016 */ lui $s5, %hi(pFramebuffer) # $s5, 0x8016 +/* 005190 80004590 3C14800E */ lui $s4, %hi(D_800DC670) # $s4, 0x800e +/* 005194 80004594 3C12800E */ lui $s2, %hi(D_800DC4BC) # $s2, 0x800e +/* 005198 80004598 3C11800E */ lui $s1, %hi(D_800DC6FC) # $s1, 0x800e +/* 00519C 8000459C AE000000 */ sw $zero, ($s0) +/* 0051A0 800045A0 2631C6FC */ addiu $s1, %lo(D_800DC6FC) # addiu $s1, $s1, -0x3904 +/* 0051A4 800045A4 2652C4BC */ addiu $s2, %lo(D_800DC4BC) # addiu $s2, $s2, -0x3b44 +/* 0051A8 800045A8 2694C670 */ addiu $s4, %lo(D_800DC670) # addiu $s4, $s4, -0x3990 +/* 0051AC 800045AC 26B52D5C */ addiu $s5, %lo(pFramebuffer) # addiu $s5, $s5, 0x2d5c +/* 0051B0 800045B0 27B60044 */ addiu $s6, $sp, 0x44 +/* 0051B4 800045B4 3413FFFF */ li $s3, 65535 +.L800045B8: +/* 0051B8 800045B8 02E02025 */ move $a0, $s7 +.L800045BC: +/* 0051BC 800045BC 02C02825 */ move $a1, $s6 +/* 0051C0 800045C0 0C0335D4 */ jal osRecvMesg +/* 0051C4 800045C4 24060001 */ li $a2, 1 +/* 0051C8 800045C8 0C001131 */ jal get_faulted_thread +/* 0051CC 800045CC 00000000 */ nop +/* 0051D0 800045D0 3C018016 */ lui $at, %hi(D_80162D64) # $at, 0x8016 +/* 0051D4 800045D4 1040FFF8 */ beqz $v0, .L800045B8 +/* 0051D8 800045D8 AC222D64 */ sw $v0, %lo(D_80162D64)($at) +/* 0051DC 800045DC 8E820000 */ lw $v0, ($s4) +/* 0051E0 800045E0 5440001F */ bnel $v0, $zero, .L80004660 +/* 0051E4 800045E4 28410005 */ slti $at, $v0, 5 +/* 0051E8 800045E8 0C001051 */ jal crash_screen_draw_square +/* 0051EC 800045EC 8EA40000 */ lw $a0, ($s5) +.L800045F0: +/* 0051F0 800045F0 0C00028A */ jal read_controllers +/* 0051F4 800045F4 00000000 */ nop +/* 0051F8 800045F8 8E4E0000 */ lw $t6, ($s2) +/* 0051FC 800045FC 95C20006 */ lhu $v0, 6($t6) +/* 005200 80004600 1040FFFB */ beqz $v0, .L800045F0 +/* 005204 80004604 00000000 */ nop +/* 005208 80004608 8E030000 */ lw $v1, ($s0) +/* 00520C 8000460C 00037840 */ sll $t7, $v1, 1 +/* 005210 80004610 022FC021 */ addu $t8, $s1, $t7 +/* 005214 80004614 97190000 */ lhu $t9, ($t8) +/* 005218 80004618 24680001 */ addiu $t0, $v1, 1 +/* 00521C 8000461C 54590004 */ bnel $v0, $t9, .L80004630 +/* 005220 80004620 AE000000 */ sw $zero, ($s0) +/* 005224 80004624 10000002 */ b .L80004630 +/* 005228 80004628 AE080000 */ sw $t0, ($s0) +/* 00522C 8000462C AE000000 */ sw $zero, ($s0) +.L80004630: +/* 005230 80004630 8E090000 */ lw $t1, ($s0) +/* 005234 80004634 00095040 */ sll $t2, $t1, 1 +/* 005238 80004638 022A5821 */ addu $t3, $s1, $t2 +/* 00523C 8000463C 956C0000 */ lhu $t4, ($t3) +/* 005240 80004640 166CFFEB */ bne $s3, $t4, .L800045F0 +/* 005244 80004644 00000000 */ nop +/* 005248 80004648 3C058016 */ lui $a1, %hi(D_80162D64) # $a1, 0x8016 +/* 00524C 8000464C 8CA52D64 */ lw $a1, %lo(D_80162D64)($a1) +/* 005250 80004650 0C0010A6 */ jal crash_screen_draw_info +/* 005254 80004654 8EA40000 */ lw $a0, ($s5) +/* 005258 80004658 8E820000 */ lw $v0, ($s4) +/* 00525C 8000465C 28410005 */ slti $at, $v0, 5 +.L80004660: +/* 005260 80004660 5020FFD6 */ beql $at, $zero, .L800045BC +/* 005264 80004664 02E02025 */ move $a0, $s7 +/* 005268 80004668 244D0001 */ addiu $t5, $v0, 1 +/* 00526C 8000466C 1000FFD2 */ b .L800045B8 +/* 005270 80004670 AE8D0000 */ sw $t5, ($s4) +/* 005274 80004674 00000000 */ nop +/* 005278 80004678 00000000 */ nop +/* 00527C 8000467C 00000000 */ nop +/* 005280 80004680 8FBF0034 */ lw $ra, 0x34($sp) +/* 005284 80004684 8FB00014 */ lw $s0, 0x14($sp) +/* 005288 80004688 8FB10018 */ lw $s1, 0x18($sp) +/* 00528C 8000468C 8FB2001C */ lw $s2, 0x1c($sp) +/* 005290 80004690 8FB30020 */ lw $s3, 0x20($sp) +/* 005294 80004694 8FB40024 */ lw $s4, 0x24($sp) +/* 005298 80004698 8FB50028 */ lw $s5, 0x28($sp) +/* 00529C 8000469C 8FB6002C */ lw $s6, 0x2c($sp) +/* 0052A0 800046A0 8FB70030 */ lw $s7, 0x30($sp) +/* 0052A4 800046A4 03E00008 */ jr $ra +/* 0052A8 800046A8 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/non_matchings/math_util/func_802B53C8.s b/asm/non_matchings/math_util/func_802B53C8.s new file mode 100644 index 000000000..78481d4aa --- /dev/null +++ b/asm/non_matchings/math_util/func_802B53C8.s @@ -0,0 +1,40 @@ +glabel func_802B53C8 +/* 11E9D8 802B53C8 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11E9DC 802B53CC 00801825 */ move $v1, $a0 +/* 11E9E0 802B53D0 44810000 */ mtc1 $at, $f0 +/* 11E9E4 802B53D4 44801000 */ mtc1 $zero, $f2 +/* 11E9E8 802B53D8 24040001 */ li $a0, 1 +/* 11E9EC 802B53DC 00001025 */ move $v0, $zero +/* 11E9F0 802B53E0 24070004 */ li $a3, 4 +/* 11E9F4 802B53E4 24060003 */ li $a2, 3 +/* 11E9F8 802B53E8 24050002 */ li $a1, 2 +.L802B53EC: +/* 11E9FC 802B53EC 54400004 */ bnel $v0, $zero, .L802B5400 +/* 11EA00 802B53F0 E4620000 */ swc1 $f2, ($v1) +/* 11EA04 802B53F4 10000002 */ b .L802B5400 +/* 11EA08 802B53F8 E4600000 */ swc1 $f0, ($v1) +/* 11EA0C 802B53FC E4620000 */ swc1 $f2, ($v1) +.L802B5400: +/* 11EA10 802B5400 54440004 */ bnel $v0, $a0, .L802B5414 +/* 11EA14 802B5404 E4620004 */ swc1 $f2, 4($v1) +/* 11EA18 802B5408 10000002 */ b .L802B5414 +/* 11EA1C 802B540C E4600004 */ swc1 $f0, 4($v1) +/* 11EA20 802B5410 E4620004 */ swc1 $f2, 4($v1) +.L802B5414: +/* 11EA24 802B5414 54450004 */ bnel $v0, $a1, .L802B5428 +/* 11EA28 802B5418 E4620008 */ swc1 $f2, 8($v1) +/* 11EA2C 802B541C 10000002 */ b .L802B5428 +/* 11EA30 802B5420 E4600008 */ swc1 $f0, 8($v1) +/* 11EA34 802B5424 E4620008 */ swc1 $f2, 8($v1) +.L802B5428: +/* 11EA38 802B5428 54460004 */ bnel $v0, $a2, .L802B543C +/* 11EA3C 802B542C E462000C */ swc1 $f2, 0xc($v1) +/* 11EA40 802B5430 10000002 */ b .L802B543C +/* 11EA44 802B5434 E460000C */ swc1 $f0, 0xc($v1) +/* 11EA48 802B5438 E462000C */ swc1 $f2, 0xc($v1) +.L802B543C: +/* 11EA4C 802B543C 24420001 */ addiu $v0, $v0, 1 +/* 11EA50 802B5440 1447FFEA */ bne $v0, $a3, .L802B53EC +/* 11EA54 802B5444 24630010 */ addiu $v1, $v1, 0x10 +/* 11EA58 802B5448 03E00008 */ jr $ra +/* 11EA5C 802B544C 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5450.s b/asm/non_matchings/math_util/func_802B5450.s new file mode 100644 index 000000000..a1de14713 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5450.s @@ -0,0 +1,54 @@ +glabel func_802B5450 +/* 11EA60 802B5450 C4C40000 */ lwc1 $f4, ($a2) +/* 11EA64 802B5454 C4860030 */ lwc1 $f6, 0x30($a0) +/* 11EA68 802B5458 46062200 */ add.s $f8, $f4, $f6 +/* 11EA6C 802B545C E4A80030 */ swc1 $f8, 0x30($a1) +/* 11EA70 802B5460 C4900034 */ lwc1 $f16, 0x34($a0) +/* 11EA74 802B5464 C4CA0004 */ lwc1 $f10, 4($a2) +/* 11EA78 802B5468 46105480 */ add.s $f18, $f10, $f16 +/* 11EA7C 802B546C E4B20034 */ swc1 $f18, 0x34($a1) +/* 11EA80 802B5470 C4860038 */ lwc1 $f6, 0x38($a0) +/* 11EA84 802B5474 C4C40008 */ lwc1 $f4, 8($a2) +/* 11EA88 802B5478 46062200 */ add.s $f8, $f4, $f6 +/* 11EA8C 802B547C E4A80038 */ swc1 $f8, 0x38($a1) +/* 11EA90 802B5480 C48A003C */ lwc1 $f10, 0x3c($a0) +/* 11EA94 802B5484 E4AA003C */ swc1 $f10, 0x3c($a1) +/* 11EA98 802B5488 C4900000 */ lwc1 $f16, ($a0) +/* 11EA9C 802B548C E4B00000 */ swc1 $f16, ($a1) +/* 11EAA0 802B5490 C4920004 */ lwc1 $f18, 4($a0) +/* 11EAA4 802B5494 E4B20004 */ swc1 $f18, 4($a1) +/* 11EAA8 802B5498 C4840008 */ lwc1 $f4, 8($a0) +/* 11EAAC 802B549C E4A40008 */ swc1 $f4, 8($a1) +/* 11EAB0 802B54A0 C486000C */ lwc1 $f6, 0xc($a0) +/* 11EAB4 802B54A4 E4A6000C */ swc1 $f6, 0xc($a1) +/* 11EAB8 802B54A8 C4880010 */ lwc1 $f8, 0x10($a0) +/* 11EABC 802B54AC E4A80010 */ swc1 $f8, 0x10($a1) +/* 11EAC0 802B54B0 C48A0014 */ lwc1 $f10, 0x14($a0) +/* 11EAC4 802B54B4 E4AA0014 */ swc1 $f10, 0x14($a1) +/* 11EAC8 802B54B8 C4900018 */ lwc1 $f16, 0x18($a0) +/* 11EACC 802B54BC E4B00018 */ swc1 $f16, 0x18($a1) +/* 11EAD0 802B54C0 C492001C */ lwc1 $f18, 0x1c($a0) +/* 11EAD4 802B54C4 E4B2001C */ swc1 $f18, 0x1c($a1) +/* 11EAD8 802B54C8 C4840020 */ lwc1 $f4, 0x20($a0) +/* 11EADC 802B54CC E4A40020 */ swc1 $f4, 0x20($a1) +/* 11EAE0 802B54D0 C4860024 */ lwc1 $f6, 0x24($a0) +/* 11EAE4 802B54D4 E4A60024 */ swc1 $f6, 0x24($a1) +/* 11EAE8 802B54D8 C4880028 */ lwc1 $f8, 0x28($a0) +/* 11EAEC 802B54DC E4A80028 */ swc1 $f8, 0x28($a1) +/* 11EAF0 802B54E0 C48A002C */ lwc1 $f10, 0x2c($a0) +/* 11EAF4 802B54E4 03E00008 */ jr $ra +/* 11EAF8 802B54E8 E4AA002C */ swc1 $f10, 0x2c($a1) + +/* 11EAFC 802B54EC C4C40000 */ lwc1 $f4, ($a2) +/* 11EB00 802B54F0 C4860030 */ lwc1 $f6, 0x30($a0) +/* 11EB04 802B54F4 46062200 */ add.s $f8, $f4, $f6 +/* 11EB08 802B54F8 E4A80030 */ swc1 $f8, 0x30($a1) +/* 11EB0C 802B54FC C4900034 */ lwc1 $f16, 0x34($a0) +/* 11EB10 802B5500 C4CA0004 */ lwc1 $f10, 4($a2) +/* 11EB14 802B5504 46105480 */ add.s $f18, $f10, $f16 +/* 11EB18 802B5508 E4B20034 */ swc1 $f18, 0x34($a1) +/* 11EB1C 802B550C C4860038 */ lwc1 $f6, 0x38($a0) +/* 11EB20 802B5510 C4C40008 */ lwc1 $f4, 8($a2) +/* 11EB24 802B5514 46062200 */ add.s $f8, $f4, $f6 +/* 11EB28 802B5518 03E00008 */ jr $ra +/* 11EB2C 802B551C E4A80038 */ swc1 $f8, 0x38($a1) diff --git a/asm/non_matchings/math_util/func_802B5520.s b/asm/non_matchings/math_util/func_802B5520.s new file mode 100644 index 000000000..15fe2c046 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5520.s @@ -0,0 +1,18 @@ +glabel func_802B5520 +/* 11EB30 802B5520 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 11EB34 802B5524 AFBF0014 */ sw $ra, 0x14($sp) +/* 11EB38 802B5528 AFA40018 */ sw $a0, 0x18($sp) +/* 11EB3C 802B552C 0C0AD4F2 */ jal func_802B53C8 +/* 11EB40 802B5530 AFA5001C */ sw $a1, 0x1c($sp) +/* 11EB44 802B5534 8FA5001C */ lw $a1, 0x1c($sp) +/* 11EB48 802B5538 8FA40018 */ lw $a0, 0x18($sp) +/* 11EB4C 802B553C C4A40000 */ lwc1 $f4, ($a1) +/* 11EB50 802B5540 E4840030 */ swc1 $f4, 0x30($a0) +/* 11EB54 802B5544 C4A60004 */ lwc1 $f6, 4($a1) +/* 11EB58 802B5548 E4860034 */ swc1 $f6, 0x34($a0) +/* 11EB5C 802B554C C4A80008 */ lwc1 $f8, 8($a1) +/* 11EB60 802B5550 E4880038 */ swc1 $f8, 0x38($a0) +/* 11EB64 802B5554 8FBF0014 */ lw $ra, 0x14($sp) +/* 11EB68 802B5558 27BD0018 */ addiu $sp, $sp, 0x18 +/* 11EB6C 802B555C 03E00008 */ jr $ra +/* 11EB70 802B5560 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5564.s b/asm/non_matchings/math_util/func_802B5564.s new file mode 100644 index 000000000..e6271e25f --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5564.s @@ -0,0 +1,148 @@ +glabel func_802B5564 +/* 11EB74 802B5564 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 11EB78 802B5568 44867000 */ mtc1 $a2, $f14 +/* 11EB7C 802B556C AFBF0014 */ sw $ra, 0x14($sp) +/* 11EB80 802B5570 AFA7003C */ sw $a3, 0x3c($sp) +/* 11EB84 802B5574 AFA40030 */ sw $a0, 0x30($sp) +/* 11EB88 802B5578 AFA50034 */ sw $a1, 0x34($sp) +/* 11EB8C 802B557C 0C0AD4F2 */ jal func_802B53C8 +/* 11EB90 802B5580 E7AE0038 */ swc1 $f14, 0x38($sp) +/* 11EB94 802B5584 C7AE0038 */ lwc1 $f14, 0x38($sp) +/* 11EB98 802B5588 3C01802C */ lui $at, %hi(D_802B9FB0) +/* 11EB9C 802B558C D4269FB0 */ ldc1 $f6, %lo(D_802B9FB0)($at) +/* 11EBA0 802B5590 46007121 */ cvt.d.s $f4, $f14 +/* 11EBA4 802B5594 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 11EBA8 802B5598 46262202 */ mul.d $f8, $f4, $f6 +/* 11EBAC 802B559C 44815000 */ mtc1 $at, $f10 +/* 11EBB0 802B55A0 462043A0 */ cvt.s.d $f14, $f8 +/* 11EBB4 802B55A4 460A7303 */ div.s $f12, $f14, $f10 +/* 11EBB8 802B55A8 0C0358AC */ jal cosf +/* 11EBBC 802B55AC E7AC001C */ swc1 $f12, 0x1c($sp) +/* 11EBC0 802B55B0 C7AC001C */ lwc1 $f12, 0x1c($sp) +/* 11EBC4 802B55B4 0C03583C */ jal sinf +/* 11EBC8 802B55B8 E7A00020 */ swc1 $f0, 0x20($sp) +/* 11EBCC 802B55BC C7A40020 */ lwc1 $f4, 0x20($sp) +/* 11EBD0 802B55C0 C7A6003C */ lwc1 $f6, 0x3c($sp) +/* 11EBD4 802B55C4 C7AE0040 */ lwc1 $f14, 0x40($sp) +/* 11EBD8 802B55C8 46002083 */ div.s $f2, $f4, $f0 +/* 11EBDC 802B55CC C7B00044 */ lwc1 $f16, 0x44($sp) +/* 11EBE0 802B55D0 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +/* 11EBE4 802B55D4 44812000 */ mtc1 $at, $f4 +/* 11EBE8 802B55D8 46107480 */ add.s $f18, $f14, $f16 +/* 11EBEC 802B55DC 8FA20030 */ lw $v0, 0x30($sp) +/* 11EBF0 802B55E0 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 11EBF4 802B55E4 46107301 */ sub.s $f12, $f14, $f16 +/* 11EBF8 802B55E8 8FA50034 */ lw $a1, 0x34($sp) +/* 11EBFC 802B55EC E444002C */ swc1 $f4, 0x2c($v0) +/* 11EC00 802B55F0 00001825 */ move $v1, $zero +/* 11EC04 802B55F4 24040004 */ li $a0, 4 +/* 11EC08 802B55F8 460C9283 */ div.s $f10, $f18, $f12 +/* 11EC0C 802B55FC E4420014 */ swc1 $f2, 0x14($v0) +/* 11EC10 802B5600 46061203 */ div.s $f8, $f2, $f6 +/* 11EC14 802B5604 44813000 */ mtc1 $at, $f6 +/* 11EC18 802B5608 E44A0028 */ swc1 $f10, 0x28($v0) +/* 11EC1C 802B560C E4480000 */ swc1 $f8, ($v0) +/* 11EC20 802B5610 460E3202 */ mul.s $f8, $f6, $f14 +/* 11EC24 802B5614 44803000 */ mtc1 $zero, $f6 +/* 11EC28 802B5618 00000000 */ nop +/* 11EC2C 802B561C E446003C */ swc1 $f6, 0x3c($v0) +/* 11EC30 802B5620 46104282 */ mul.s $f10, $f8, $f16 +/* 11EC34 802B5624 460C5103 */ div.s $f4, $f10, $f12 +/* 11EC38 802B5628 E4440038 */ swc1 $f4, 0x38($v0) +/* 11EC3C 802B562C C7A00048 */ lwc1 $f0, 0x48($sp) +/* 11EC40 802B5630 C4460000 */ lwc1 $f6, ($v0) +/* 11EC44 802B5634 24630001 */ addiu $v1, $v1, 1 +/* 11EC48 802B5638 C4500004 */ lwc1 $f16, 4($v0) +/* 11EC4C 802B563C 46003282 */ mul.s $f10, $f6, $f0 +/* 11EC50 802B5640 C44C0008 */ lwc1 $f12, 8($v0) +/* 11EC54 802B5644 10640010 */ beq $v1, $a0, .L802B5688 +/* 11EC58 802B5648 C44E000C */ lwc1 $f14, 0xc($v0) +.L802B564C: +/* 11EC5C 802B564C 46008202 */ mul.s $f8, $f16, $f0 +/* 11EC60 802B5650 C4460010 */ lwc1 $f6, 0x10($v0) +/* 11EC64 802B5654 C4500014 */ lwc1 $f16, 0x14($v0) +/* 11EC68 802B5658 46006102 */ mul.s $f4, $f12, $f0 +/* 11EC6C 802B565C C44C0018 */ lwc1 $f12, 0x18($v0) +/* 11EC70 802B5660 24630001 */ addiu $v1, $v1, 1 +/* 11EC74 802B5664 46007082 */ mul.s $f2, $f14, $f0 +/* 11EC78 802B5668 C44E001C */ lwc1 $f14, 0x1c($v0) +/* 11EC7C 802B566C E44A0000 */ swc1 $f10, ($v0) +/* 11EC80 802B5670 46003282 */ mul.s $f10, $f6, $f0 +/* 11EC84 802B5674 E4480004 */ swc1 $f8, 4($v0) +/* 11EC88 802B5678 E4440008 */ swc1 $f4, 8($v0) +/* 11EC8C 802B567C 24420010 */ addiu $v0, $v0, 0x10 +/* 11EC90 802B5680 1464FFF2 */ bne $v1, $a0, .L802B564C +/* 11EC94 802B5684 E442FFFC */ swc1 $f2, -4($v0) +.L802B5688: +/* 11EC98 802B5688 46008202 */ mul.s $f8, $f16, $f0 +/* 11EC9C 802B568C 24420010 */ addiu $v0, $v0, 0x10 +/* 11ECA0 802B5690 E44AFFF0 */ swc1 $f10, -0x10($v0) +/* 11ECA4 802B5694 46006102 */ mul.s $f4, $f12, $f0 +/* 11ECA8 802B5698 00000000 */ nop +/* 11ECAC 802B569C 46007082 */ mul.s $f2, $f14, $f0 +/* 11ECB0 802B56A0 E448FFF4 */ swc1 $f8, -0xc($v0) +/* 11ECB4 802B56A4 E444FFF8 */ swc1 $f4, -8($v0) +/* 11ECB8 802B56A8 E442FFFC */ swc1 $f2, -4($v0) +/* 11ECBC 802B56AC 10A00035 */ beqz $a1, .L802B5784 +/* 11ECC0 802B56B0 3C014000 */ li $at, 0x40000000 # 2.000000 +/* 11ECC4 802B56B4 44814800 */ mtc1 $at, $f9 +/* 11ECC8 802B56B8 44804000 */ mtc1 $zero, $f8 +/* 11ECCC 802B56BC 46009021 */ cvt.d.s $f0, $f18 +/* 11ECD0 802B56C0 340EFFFF */ li $t6, 65535 +/* 11ECD4 802B56C4 4628003E */ c.le.d $f0, $f8 +/* 11ECD8 802B56C8 3C014100 */ li $at, 0x41000000 # 8.000000 +/* 11ECDC 802B56CC 45020004 */ bc1fl .L802B56E0 +/* 11ECE0 802B56D0 44815800 */ mtc1 $at, $f11 +/* 11ECE4 802B56D4 1000002B */ b .L802B5784 +/* 11ECE8 802B56D8 A4AE0000 */ sh $t6, ($a1) +/* 11ECEC 802B56DC 44815800 */ mtc1 $at, $f11 +.L802B56E0: +/* 11ECF0 802B56E0 44805000 */ mtc1 $zero, $f10 +/* 11ECF4 802B56E4 24180001 */ li $t8, 1 +/* 11ECF8 802B56E8 3C0141E0 */ li $at, 0x41E00000 # 28.000000 +/* 11ECFC 802B56EC 46205103 */ div.d $f4, $f10, $f0 +/* 11ED00 802B56F0 24080001 */ li $t0, 1 +/* 11ED04 802B56F4 444FF800 */ cfc1 $t7, $31 +/* 11ED08 802B56F8 44D8F800 */ ctc1 $t8, $31 +/* 11ED0C 802B56FC 00000000 */ nop +/* 11ED10 802B5700 462021A4 */ cvt.w.d $f6, $f4 +/* 11ED14 802B5704 4458F800 */ cfc1 $t8, $31 +/* 11ED18 802B5708 00000000 */ nop +/* 11ED1C 802B570C 33180078 */ andi $t8, $t8, 0x78 +/* 11ED20 802B5710 53000014 */ beql $t8, $zero, .L802B5764 +/* 11ED24 802B5714 44183000 */ mfc1 $t8, $f6 +/* 11ED28 802B5718 44813800 */ mtc1 $at, $f7 +/* 11ED2C 802B571C 44803000 */ mtc1 $zero, $f6 +/* 11ED30 802B5720 24180001 */ li $t8, 1 +/* 11ED34 802B5724 46262181 */ sub.d $f6, $f4, $f6 +/* 11ED38 802B5728 44D8F800 */ ctc1 $t8, $31 +/* 11ED3C 802B572C 00000000 */ nop +/* 11ED40 802B5730 462031A4 */ cvt.w.d $f6, $f6 +/* 11ED44 802B5734 4458F800 */ cfc1 $t8, $31 +/* 11ED48 802B5738 00000000 */ nop +/* 11ED4C 802B573C 33180078 */ andi $t8, $t8, 0x78 +/* 11ED50 802B5740 17000005 */ bnez $t8, .L802B5758 +/* 11ED54 802B5744 00000000 */ nop +/* 11ED58 802B5748 44183000 */ mfc1 $t8, $f6 +/* 11ED5C 802B574C 3C018000 */ lui $at, 0x8000 +/* 11ED60 802B5750 10000007 */ b .L802B5770 +/* 11ED64 802B5754 0301C025 */ or $t8, $t8, $at +.L802B5758: +/* 11ED68 802B5758 10000005 */ b .L802B5770 +/* 11ED6C 802B575C 2418FFFF */ li $t8, -1 +/* 11ED70 802B5760 44183000 */ mfc1 $t8, $f6 +.L802B5764: +/* 11ED74 802B5764 00000000 */ nop +/* 11ED78 802B5768 0700FFFB */ bltz $t8, .L802B5758 +/* 11ED7C 802B576C 00000000 */ nop +.L802B5770: +/* 11ED80 802B5770 44CFF800 */ ctc1 $t7, $31 +/* 11ED84 802B5774 3319FFFF */ andi $t9, $t8, 0xffff +/* 11ED88 802B5778 1F200002 */ bgtz $t9, .L802B5784 +/* 11ED8C 802B577C A4B80000 */ sh $t8, ($a1) +/* 11ED90 802B5780 A4A80000 */ sh $t0, ($a1) +.L802B5784: +/* 11ED94 802B5784 8FBF0014 */ lw $ra, 0x14($sp) +/* 11ED98 802B5788 27BD0030 */ addiu $sp, $sp, 0x30 +/* 11ED9C 802B578C 03E00008 */ jr $ra +/* 11EDA0 802B5790 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5794.s b/asm/non_matchings/math_util/func_802B5794.s new file mode 100644 index 000000000..732a9d933 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5794.s @@ -0,0 +1,147 @@ +glabel func_802B5794 +/* 11EDA4 802B5794 27BDFFA8 */ addiu $sp, $sp, -0x58 +/* 11EDA8 802B5798 F7BC0028 */ sdc1 $f28, 0x28($sp) +/* 11EDAC 802B579C F7BA0020 */ sdc1 $f26, 0x20($sp) +/* 11EDB0 802B57A0 F7B80018 */ sdc1 $f24, 0x18($sp) +/* 11EDB4 802B57A4 F7B60010 */ sdc1 $f22, 0x10($sp) +/* 11EDB8 802B57A8 F7B40008 */ sdc1 $f20, 8($sp) +/* 11EDBC 802B57AC C4A60000 */ lwc1 $f6, ($a1) +/* 11EDC0 802B57B0 C4C40000 */ lwc1 $f4, ($a2) +/* 11EDC4 802B57B4 C4AA0004 */ lwc1 $f10, 4($a1) +/* 11EDC8 802B57B8 C4C80004 */ lwc1 $f8, 4($a2) +/* 11EDCC 802B57BC 46062301 */ sub.s $f12, $f4, $f6 +/* 11EDD0 802B57C0 C4A60008 */ lwc1 $f6, 8($a1) +/* 11EDD4 802B57C4 C4C40008 */ lwc1 $f4, 8($a2) +/* 11EDD8 802B57C8 460A4381 */ sub.s $f14, $f8, $f10 +/* 11EDDC 802B57CC 460C6202 */ mul.s $f8, $f12, $f12 +/* 11EDE0 802B57D0 3C01BFF0 */ li $at, 0xBFF00000 # -1.875000 +/* 11EDE4 802B57D4 46062081 */ sub.s $f2, $f4, $f6 +/* 11EDE8 802B57D8 460E7282 */ mul.s $f10, $f14, $f14 +/* 11EDEC 802B57DC 44814800 */ mtc1 $at, $f9 +/* 11EDF0 802B57E0 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11EDF4 802B57E4 46021182 */ mul.s $f6, $f2, $f2 +/* 11EDF8 802B57E8 4480D000 */ mtc1 $zero, $f26 +/* 11EDFC 802B57EC 00000000 */ nop +/* 11EE00 802B57F0 4600D606 */ mov.s $f24, $f26 +/* 11EE04 802B57F4 460A4100 */ add.s $f4, $f8, $f10 +/* 11EE08 802B57F8 44804000 */ mtc1 $zero, $f8 +/* 11EE0C 802B57FC 46062000 */ add.s $f0, $f4, $f6 +/* 11EE10 802B5800 44813000 */ mtc1 $at, $f6 +/* 11EE14 802B5804 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 +/* 11EE18 802B5808 46000004 */ sqrt.s $f0, $f0 +/* 11EE1C 802B580C 460002A1 */ cvt.d.s $f10, $f0 +/* 11EE20 802B5810 462A4103 */ div.d $f4, $f8, $f10 +/* 11EE24 802B5814 46202420 */ cvt.s.d $f16, $f4 +/* 11EE28 802B5818 46106302 */ mul.s $f12, $f12, $f16 +/* 11EE2C 802B581C 00000000 */ nop +/* 11EE30 802B5820 46107382 */ mul.s $f14, $f14, $f16 +/* 11EE34 802B5824 00000000 */ nop +/* 11EE38 802B5828 46101082 */ mul.s $f2, $f2, $f16 +/* 11EE3C 802B582C 00000000 */ nop +/* 11EE40 802B5830 460C3202 */ mul.s $f8, $f6, $f12 +/* 11EE44 802B5834 44814800 */ mtc1 $at, $f9 +/* 11EE48 802B5838 46021282 */ mul.s $f10, $f2, $f2 +/* 11EE4C 802B583C 4608D401 */ sub.s $f16, $f26, $f8 +/* 11EE50 802B5840 44804000 */ mtc1 $zero, $f8 +/* 11EE54 802B5844 461A5100 */ add.s $f4, $f10, $f26 +/* 11EE58 802B5848 46108182 */ mul.s $f6, $f16, $f16 +/* 11EE5C 802B584C 46062000 */ add.s $f0, $f4, $f6 +/* 11EE60 802B5850 46000004 */ sqrt.s $f0, $f0 +/* 11EE64 802B5854 460002A1 */ cvt.d.s $f10, $f0 +/* 11EE68 802B5858 462A4103 */ div.d $f4, $f8, $f10 +/* 11EE6C 802B585C 462025A0 */ cvt.s.d $f22, $f4 +/* 11EE70 802B5860 46161702 */ mul.s $f28, $f2, $f22 +/* 11EE74 802B5864 00000000 */ nop +/* 11EE78 802B5868 46168482 */ mul.s $f18, $f16, $f22 +/* 11EE7C 802B586C 00000000 */ nop +/* 11EE80 802B5870 46127182 */ mul.s $f6, $f14, $f18 +/* 11EE84 802B5874 E7B20030 */ swc1 $f18, 0x30($sp) +/* 11EE88 802B5878 C7A40030 */ lwc1 $f4, 0x30($sp) +/* 11EE8C 802B587C 461A1202 */ mul.s $f8, $f2, $f26 +/* 11EE90 802B5880 46083501 */ sub.s $f20, $f6, $f8 +/* 11EE94 802B5884 461C1282 */ mul.s $f10, $f2, $f28 +/* 11EE98 802B5888 00000000 */ nop +/* 11EE9C 802B588C 46046182 */ mul.s $f6, $f12, $f4 +/* 11EEA0 802B5890 00000000 */ nop +/* 11EEA4 802B5894 461A6202 */ mul.s $f8, $f12, $f26 +/* 11EEA8 802B5898 00000000 */ nop +/* 11EEAC 802B589C 461C7102 */ mul.s $f4, $f14, $f28 +/* 11EEB0 802B58A0 46065401 */ sub.s $f16, $f10, $f6 +/* 11EEB4 802B58A4 4614A282 */ mul.s $f10, $f20, $f20 +/* 11EEB8 802B58A8 44815800 */ mtc1 $at, $f11 +/* 11EEBC 802B58AC 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11EEC0 802B58B0 46108182 */ mul.s $f6, $f16, $f16 +/* 11EEC4 802B58B4 46044481 */ sub.s $f18, $f8, $f4 +/* 11EEC8 802B58B8 46129102 */ mul.s $f4, $f18, $f18 +/* 11EECC 802B58BC 46065200 */ add.s $f8, $f10, $f6 +/* 11EED0 802B58C0 44805000 */ mtc1 $zero, $f10 +/* 11EED4 802B58C4 46044000 */ add.s $f0, $f8, $f4 +/* 11EED8 802B58C8 46000004 */ sqrt.s $f0, $f0 +/* 11EEDC 802B58CC 460001A1 */ cvt.d.s $f6, $f0 +/* 11EEE0 802B58D0 46265203 */ div.d $f8, $f10, $f6 +/* 11EEE4 802B58D4 462045A0 */ cvt.s.d $f22, $f8 +/* 11EEE8 802B58D8 4616A502 */ mul.s $f20, $f20, $f22 +/* 11EEEC 802B58DC 00000000 */ nop +/* 11EEF0 802B58E0 46168102 */ mul.s $f4, $f16, $f22 +/* 11EEF4 802B58E4 00000000 */ nop +/* 11EEF8 802B58E8 46169282 */ mul.s $f10, $f18, $f22 +/* 11EEFC 802B58EC E7A4004C */ swc1 $f4, 0x4c($sp) +/* 11EF00 802B58F0 E7AA0048 */ swc1 $f10, 0x48($sp) +/* 11EF04 802B58F4 E49C0000 */ swc1 $f28, ($a0) +/* 11EF08 802B58F8 E4980010 */ swc1 $f24, 0x10($a0) +/* 11EF0C 802B58FC C7A60030 */ lwc1 $f6, 0x30($sp) +/* 11EF10 802B5900 E4860020 */ swc1 $f6, 0x20($a0) +/* 11EF14 802B5904 C4A80008 */ lwc1 $f8, 8($a1) +/* 11EF18 802B5908 C7A40030 */ lwc1 $f4, 0x30($sp) +/* 11EF1C 802B590C C4A60000 */ lwc1 $f6, ($a1) +/* 11EF20 802B5910 46044282 */ mul.s $f10, $f8, $f4 +/* 11EF24 802B5914 C4A40004 */ lwc1 $f4, 4($a1) +/* 11EF28 802B5918 461C3202 */ mul.s $f8, $f6, $f28 +/* 11EF2C 802B591C 00000000 */ nop +/* 11EF30 802B5920 461A2182 */ mul.s $f6, $f4, $f26 +/* 11EF34 802B5924 46064100 */ add.s $f4, $f8, $f6 +/* 11EF38 802B5928 46045200 */ add.s $f8, $f10, $f4 +/* 11EF3C 802B592C 46004187 */ neg.s $f6, $f8 +/* 11EF40 802B5930 E4860030 */ swc1 $f6, 0x30($a0) +/* 11EF44 802B5934 C7B00048 */ lwc1 $f16, 0x48($sp) +/* 11EF48 802B5938 C7A0004C */ lwc1 $f0, 0x4c($sp) +/* 11EF4C 802B593C E4940004 */ swc1 $f20, 4($a0) +/* 11EF50 802B5940 E4900024 */ swc1 $f16, 0x24($a0) +/* 11EF54 802B5944 E4800014 */ swc1 $f0, 0x14($a0) +/* 11EF58 802B5948 C4AA0000 */ lwc1 $f10, ($a1) +/* 11EF5C 802B594C C4A80004 */ lwc1 $f8, 4($a1) +/* 11EF60 802B5950 46145102 */ mul.s $f4, $f10, $f20 +/* 11EF64 802B5954 00000000 */ nop +/* 11EF68 802B5958 46004182 */ mul.s $f6, $f8, $f0 +/* 11EF6C 802B595C C4A80008 */ lwc1 $f8, 8($a1) +/* 11EF70 802B5960 E48C0008 */ swc1 $f12, 8($a0) +/* 11EF74 802B5964 E48E0018 */ swc1 $f14, 0x18($a0) +/* 11EF78 802B5968 E4820028 */ swc1 $f2, 0x28($a0) +/* 11EF7C 802B596C 46062280 */ add.s $f10, $f4, $f6 +/* 11EF80 802B5970 46104102 */ mul.s $f4, $f8, $f16 +/* 11EF84 802B5974 460A2180 */ add.s $f6, $f4, $f10 +/* 11EF88 802B5978 46003207 */ neg.s $f8, $f6 +/* 11EF8C 802B597C E4880034 */ swc1 $f8, 0x34($a0) +/* 11EF90 802B5980 C4A40000 */ lwc1 $f4, ($a1) +/* 11EF94 802B5984 C4A60004 */ lwc1 $f6, 4($a1) +/* 11EF98 802B5988 460C2282 */ mul.s $f10, $f4, $f12 +/* 11EF9C 802B598C 00000000 */ nop +/* 11EFA0 802B5990 460E3202 */ mul.s $f8, $f6, $f14 +/* 11EFA4 802B5994 C4A60008 */ lwc1 $f6, 8($a1) +/* 11EFA8 802B5998 E49A000C */ swc1 $f26, 0xc($a0) +/* 11EFAC 802B599C E49A001C */ swc1 $f26, 0x1c($a0) +/* 11EFB0 802B59A0 E49A002C */ swc1 $f26, 0x2c($a0) +/* 11EFB4 802B59A4 46085100 */ add.s $f4, $f10, $f8 +/* 11EFB8 802B59A8 46023282 */ mul.s $f10, $f6, $f2 +/* 11EFBC 802B59AC 46045200 */ add.s $f8, $f10, $f4 +/* 11EFC0 802B59B0 44815000 */ mtc1 $at, $f10 +/* 11EFC4 802B59B4 46004187 */ neg.s $f6, $f8 +/* 11EFC8 802B59B8 E48A003C */ swc1 $f10, 0x3c($a0) +/* 11EFCC 802B59BC E4860038 */ swc1 $f6, 0x38($a0) +/* 11EFD0 802B59C0 D7BC0028 */ ldc1 $f28, 0x28($sp) +/* 11EFD4 802B59C4 D7BA0020 */ ldc1 $f26, 0x20($sp) +/* 11EFD8 802B59C8 D7B80018 */ ldc1 $f24, 0x18($sp) +/* 11EFDC 802B59CC D7B60010 */ ldc1 $f22, 0x10($sp) +/* 11EFE0 802B59D0 D7B40008 */ ldc1 $f20, 8($sp) +/* 11EFE4 802B59D4 03E00008 */ jr $ra +/* 11EFE8 802B59D8 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/asm/non_matchings/math_util/func_802B59DC.s b/asm/non_matchings/math_util/func_802B59DC.s new file mode 100644 index 000000000..8ac866d86 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B59DC.s @@ -0,0 +1,27 @@ +glabel func_802B59DC +/* 11EFEC 802B59DC 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 11EFF0 802B59E0 AFB00018 */ sw $s0, 0x18($sp) +/* 11EFF4 802B59E4 00808025 */ move $s0, $a0 +/* 11EFF8 802B59E8 AFBF001C */ sw $ra, 0x1c($sp) +/* 11EFFC 802B59EC 30A4FFFF */ andi $a0, $a1, 0xffff +/* 11F000 802B59F0 AFA50034 */ sw $a1, 0x34($sp) +/* 11F004 802B59F4 0C0AE006 */ jal func_802B8018 +/* 11F008 802B59F8 AFA40024 */ sw $a0, 0x24($sp) +/* 11F00C 802B59FC 8FA40024 */ lw $a0, 0x24($sp) +/* 11F010 802B5A00 0C0AE00E */ jal func_802B8038 +/* 11F014 802B5A04 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F018 802B5A08 02002025 */ move $a0, $s0 +/* 11F01C 802B5A0C 0C0AD4F2 */ jal func_802B53C8 +/* 11F020 802B5A10 E7A00028 */ swc1 $f0, 0x28($sp) +/* 11F024 802B5A14 C7A0002C */ lwc1 $f0, 0x2c($sp) +/* 11F028 802B5A18 C7A20028 */ lwc1 $f2, 0x28($sp) +/* 11F02C 802B5A1C 46000107 */ neg.s $f4, $f0 +/* 11F030 802B5A20 E6000018 */ swc1 $f0, 0x18($s0) +/* 11F034 802B5A24 E6040024 */ swc1 $f4, 0x24($s0) +/* 11F038 802B5A28 E6020014 */ swc1 $f2, 0x14($s0) +/* 11F03C 802B5A2C E6020028 */ swc1 $f2, 0x28($s0) +/* 11F040 802B5A30 8FBF001C */ lw $ra, 0x1c($sp) +/* 11F044 802B5A34 8FB00018 */ lw $s0, 0x18($sp) +/* 11F048 802B5A38 27BD0030 */ addiu $sp, $sp, 0x30 +/* 11F04C 802B5A3C 03E00008 */ jr $ra +/* 11F050 802B5A40 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5A44.s b/asm/non_matchings/math_util/func_802B5A44.s new file mode 100644 index 000000000..76cd58f1c --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5A44.s @@ -0,0 +1,27 @@ +glabel func_802B5A44 +/* 11F054 802B5A44 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 11F058 802B5A48 AFB00018 */ sw $s0, 0x18($sp) +/* 11F05C 802B5A4C 00808025 */ move $s0, $a0 +/* 11F060 802B5A50 AFBF001C */ sw $ra, 0x1c($sp) +/* 11F064 802B5A54 30A4FFFF */ andi $a0, $a1, 0xffff +/* 11F068 802B5A58 AFA50034 */ sw $a1, 0x34($sp) +/* 11F06C 802B5A5C 0C0AE006 */ jal func_802B8018 +/* 11F070 802B5A60 AFA40024 */ sw $a0, 0x24($sp) +/* 11F074 802B5A64 8FA40024 */ lw $a0, 0x24($sp) +/* 11F078 802B5A68 0C0AE00E */ jal func_802B8038 +/* 11F07C 802B5A6C E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F080 802B5A70 02002025 */ move $a0, $s0 +/* 11F084 802B5A74 0C0AD4F2 */ jal func_802B53C8 +/* 11F088 802B5A78 E7A00028 */ swc1 $f0, 0x28($sp) +/* 11F08C 802B5A7C C7A0002C */ lwc1 $f0, 0x2c($sp) +/* 11F090 802B5A80 C7A20028 */ lwc1 $f2, 0x28($sp) +/* 11F094 802B5A84 46000107 */ neg.s $f4, $f0 +/* 11F098 802B5A88 E6000020 */ swc1 $f0, 0x20($s0) +/* 11F09C 802B5A8C E6040008 */ swc1 $f4, 8($s0) +/* 11F0A0 802B5A90 E6020000 */ swc1 $f2, ($s0) +/* 11F0A4 802B5A94 E6020028 */ swc1 $f2, 0x28($s0) +/* 11F0A8 802B5A98 8FBF001C */ lw $ra, 0x1c($sp) +/* 11F0AC 802B5A9C 8FB00018 */ lw $s0, 0x18($sp) +/* 11F0B0 802B5AA0 27BD0030 */ addiu $sp, $sp, 0x30 +/* 11F0B4 802B5AA4 03E00008 */ jr $ra +/* 11F0B8 802B5AA8 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5AAC.s b/asm/non_matchings/math_util/func_802B5AAC.s new file mode 100644 index 000000000..4d57e6148 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5AAC.s @@ -0,0 +1,27 @@ +glabel func_802B5AAC +/* 11F0BC 802B5AAC 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 11F0C0 802B5AB0 AFB00018 */ sw $s0, 0x18($sp) +/* 11F0C4 802B5AB4 00808025 */ move $s0, $a0 +/* 11F0C8 802B5AB8 AFBF001C */ sw $ra, 0x1c($sp) +/* 11F0CC 802B5ABC 30A4FFFF */ andi $a0, $a1, 0xffff +/* 11F0D0 802B5AC0 AFA50034 */ sw $a1, 0x34($sp) +/* 11F0D4 802B5AC4 0C0AE006 */ jal func_802B8018 +/* 11F0D8 802B5AC8 AFA40024 */ sw $a0, 0x24($sp) +/* 11F0DC 802B5ACC 8FA40024 */ lw $a0, 0x24($sp) +/* 11F0E0 802B5AD0 0C0AE00E */ jal func_802B8038 +/* 11F0E4 802B5AD4 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F0E8 802B5AD8 02002025 */ move $a0, $s0 +/* 11F0EC 802B5ADC 0C0AD4F2 */ jal func_802B53C8 +/* 11F0F0 802B5AE0 E7A00028 */ swc1 $f0, 0x28($sp) +/* 11F0F4 802B5AE4 C7A0002C */ lwc1 $f0, 0x2c($sp) +/* 11F0F8 802B5AE8 C7A20028 */ lwc1 $f2, 0x28($sp) +/* 11F0FC 802B5AEC 46000107 */ neg.s $f4, $f0 +/* 11F100 802B5AF0 E6000004 */ swc1 $f0, 4($s0) +/* 11F104 802B5AF4 E6040010 */ swc1 $f4, 0x10($s0) +/* 11F108 802B5AF8 E6020000 */ swc1 $f2, ($s0) +/* 11F10C 802B5AFC E6020014 */ swc1 $f2, 0x14($s0) +/* 11F110 802B5B00 8FBF001C */ lw $ra, 0x1c($sp) +/* 11F114 802B5B04 8FB00018 */ lw $s0, 0x18($sp) +/* 11F118 802B5B08 27BD0030 */ addiu $sp, $sp, 0x30 +/* 11F11C 802B5B0C 03E00008 */ jr $ra +/* 11F120 802B5B10 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5B14.s b/asm/non_matchings/math_util/func_802B5B14.s new file mode 100644 index 000000000..7d34bd440 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5B14.s @@ -0,0 +1,103 @@ +glabel func_802B5B14 +/* 11F124 802B5B14 27BDFF78 */ addiu $sp, $sp, -0x88 +/* 11F128 802B5B18 AFB10020 */ sw $s1, 0x20($sp) +/* 11F12C 802B5B1C 00808825 */ move $s1, $a0 +/* 11F130 802B5B20 AFBF0024 */ sw $ra, 0x24($sp) +/* 11F134 802B5B24 AFB0001C */ sw $s0, 0x1c($sp) +/* 11F138 802B5B28 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 11F13C 802B5B2C 00A08025 */ move $s0, $a1 +/* 11F140 802B5B30 0C0AE006 */ jal func_802B8018 +/* 11F144 802B5B34 94A40000 */ lhu $a0, ($a1) +/* 11F148 802B5B38 E7A00038 */ swc1 $f0, 0x38($sp) +/* 11F14C 802B5B3C 0C0AE00E */ jal func_802B8038 +/* 11F150 802B5B40 96040000 */ lhu $a0, ($s0) +/* 11F154 802B5B44 46000506 */ mov.s $f20, $f0 +/* 11F158 802B5B48 0C0AE006 */ jal func_802B8018 +/* 11F15C 802B5B4C 96040002 */ lhu $a0, 2($s0) +/* 11F160 802B5B50 96040002 */ lhu $a0, 2($s0) +/* 11F164 802B5B54 0C0AE00E */ jal func_802B8038 +/* 11F168 802B5B58 E7A00030 */ swc1 $f0, 0x30($sp) +/* 11F16C 802B5B5C 96040004 */ lhu $a0, 4($s0) +/* 11F170 802B5B60 0C0AE006 */ jal func_802B8018 +/* 11F174 802B5B64 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F178 802B5B68 96040004 */ lhu $a0, 4($s0) +/* 11F17C 802B5B6C 0C0AE00E */ jal func_802B8038 +/* 11F180 802B5B70 E7A00028 */ swc1 $f0, 0x28($sp) +/* 11F184 802B5B74 C7AE0030 */ lwc1 $f14, 0x30($sp) +/* 11F188 802B5B78 C7A80038 */ lwc1 $f8, 0x38($sp) +/* 11F18C 802B5B7C C7B0002C */ lwc1 $f16, 0x2c($sp) +/* 11F190 802B5B80 C6240000 */ lwc1 $f4, ($s1) +/* 11F194 802B5B84 460E4302 */ mul.s $f12, $f8, $f14 +/* 11F198 802B5B88 C7A20028 */ lwc1 $f2, 0x28($sp) +/* 11F19C 802B5B8C E7A4003C */ swc1 $f4, 0x3c($sp) +/* 11F1A0 802B5B90 46008282 */ mul.s $f10, $f16, $f0 +/* 11F1A4 802B5B94 C6260004 */ lwc1 $f6, 4($s1) +/* 11F1A8 802B5B98 46026102 */ mul.s $f4, $f12, $f2 +/* 11F1AC 802B5B9C E7A60040 */ swc1 $f6, 0x40($sp) +/* 11F1B0 802B5BA0 46045180 */ add.s $f6, $f10, $f4 +/* 11F1B4 802B5BA4 46008287 */ neg.s $f10, $f16 +/* 11F1B8 802B5BA8 E7A60048 */ swc1 $f6, 0x48($sp) +/* 11F1BC 802B5BAC 46025102 */ mul.s $f4, $f10, $f2 +/* 11F1C0 802B5BB0 00000000 */ nop +/* 11F1C4 802B5BB4 46006282 */ mul.s $f10, $f12, $f0 +/* 11F1C8 802B5BB8 460A2100 */ add.s $f4, $f4, $f10 +/* 11F1CC 802B5BBC 460EA282 */ mul.s $f10, $f20, $f14 +/* 11F1D0 802B5BC0 E7A40058 */ swc1 $f4, 0x58($sp) +/* 11F1D4 802B5BC4 4602A102 */ mul.s $f4, $f20, $f2 +/* 11F1D8 802B5BC8 E7AA0068 */ swc1 $f10, 0x68($sp) +/* 11F1DC 802B5BCC 4600A282 */ mul.s $f10, $f20, $f0 +/* 11F1E0 802B5BD0 E7A4004C */ swc1 $f4, 0x4c($sp) +/* 11F1E4 802B5BD4 46104482 */ mul.s $f18, $f8, $f16 +/* 11F1E8 802B5BD8 46004107 */ neg.s $f4, $f8 +/* 11F1EC 802B5BDC E7AA005C */ swc1 $f10, 0x5c($sp) +/* 11F1F0 802B5BE0 46007287 */ neg.s $f10, $f14 +/* 11F1F4 802B5BE4 E7A4006C */ swc1 $f4, 0x6c($sp) +/* 11F1F8 802B5BE8 46005102 */ mul.s $f4, $f10, $f0 +/* 11F1FC 802B5BEC 00000000 */ nop +/* 11F200 802B5BF0 46029202 */ mul.s $f8, $f18, $f2 +/* 11F204 802B5BF4 46082280 */ add.s $f10, $f4, $f8 +/* 11F208 802B5BF8 46027102 */ mul.s $f4, $f14, $f2 +/* 11F20C 802B5BFC 00000000 */ nop +/* 11F210 802B5C00 46009202 */ mul.s $f8, $f18, $f0 +/* 11F214 802B5C04 E7AA0050 */ swc1 $f10, 0x50($sp) +/* 11F218 802B5C08 46082100 */ add.s $f4, $f4, $f8 +/* 11F21C 802B5C0C 4610A202 */ mul.s $f8, $f20, $f16 +/* 11F220 802B5C10 E7A40060 */ swc1 $f4, 0x60($sp) +/* 11F224 802B5C14 C7A4003C */ lwc1 $f4, 0x3c($sp) +/* 11F228 802B5C18 E7A80070 */ swc1 $f8, 0x70($sp) +/* 11F22C 802B5C1C 46062202 */ mul.s $f8, $f4, $f6 +/* 11F230 802B5C20 C7A6004C */ lwc1 $f6, 0x4c($sp) +/* 11F234 802B5C24 C7A40040 */ lwc1 $f4, 0x40($sp) +/* 11F238 802B5C28 46062182 */ mul.s $f6, $f4, $f6 +/* 11F23C 802B5C2C 46064200 */ add.s $f8, $f8, $f6 +/* 11F240 802B5C30 46045182 */ mul.s $f6, $f10, $f4 +/* 11F244 802B5C34 46083280 */ add.s $f10, $f6, $f8 +/* 11F248 802B5C38 E62A0000 */ swc1 $f10, ($s1) +/* 11F24C 802B5C3C C7A4003C */ lwc1 $f4, 0x3c($sp) +/* 11F250 802B5C40 C7A60058 */ lwc1 $f6, 0x58($sp) +/* 11F254 802B5C44 C7AA0040 */ lwc1 $f10, 0x40($sp) +/* 11F258 802B5C48 46062202 */ mul.s $f8, $f4, $f6 +/* 11F25C 802B5C4C C7A4005C */ lwc1 $f4, 0x5c($sp) +/* 11F260 802B5C50 46045182 */ mul.s $f6, $f10, $f4 +/* 11F264 802B5C54 46064100 */ add.s $f4, $f8, $f6 +/* 11F268 802B5C58 C7A80060 */ lwc1 $f8, 0x60($sp) +/* 11F26C 802B5C5C 460A4182 */ mul.s $f6, $f8, $f10 +/* 11F270 802B5C60 46043200 */ add.s $f8, $f6, $f4 +/* 11F274 802B5C64 E6280004 */ swc1 $f8, 4($s1) +/* 11F278 802B5C68 C7A60068 */ lwc1 $f6, 0x68($sp) +/* 11F27C 802B5C6C C7AA003C */ lwc1 $f10, 0x3c($sp) +/* 11F280 802B5C70 C7A80040 */ lwc1 $f8, 0x40($sp) +/* 11F284 802B5C74 46065102 */ mul.s $f4, $f10, $f6 +/* 11F288 802B5C78 C7AA006C */ lwc1 $f10, 0x6c($sp) +/* 11F28C 802B5C7C 460A4182 */ mul.s $f6, $f8, $f10 +/* 11F290 802B5C80 46062280 */ add.s $f10, $f4, $f6 +/* 11F294 802B5C84 C7A40070 */ lwc1 $f4, 0x70($sp) +/* 11F298 802B5C88 46082182 */ mul.s $f6, $f4, $f8 +/* 11F29C 802B5C8C 460A3100 */ add.s $f4, $f6, $f10 +/* 11F2A0 802B5C90 E6240008 */ swc1 $f4, 8($s1) +/* 11F2A4 802B5C94 8FBF0024 */ lw $ra, 0x24($sp) +/* 11F2A8 802B5C98 8FB10020 */ lw $s1, 0x20($sp) +/* 11F2AC 802B5C9C 8FB0001C */ lw $s0, 0x1c($sp) +/* 11F2B0 802B5CA0 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 11F2B4 802B5CA4 03E00008 */ jr $ra +/* 11F2B8 802B5CA8 27BD0088 */ addiu $sp, $sp, 0x88 diff --git a/asm/non_matchings/math_util/func_802B5CAC.s b/asm/non_matchings/math_util/func_802B5CAC.s new file mode 100644 index 000000000..539add980 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5CAC.s @@ -0,0 +1,34 @@ +glabel func_802B5CAC +/* 11F2BC 802B5CAC 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 11F2C0 802B5CB0 AFA40030 */ sw $a0, 0x30($sp) +/* 11F2C4 802B5CB4 AFBF0014 */ sw $ra, 0x14($sp) +/* 11F2C8 802B5CB8 30A4FFFF */ andi $a0, $a1, 0xffff +/* 11F2CC 802B5CBC AFA50034 */ sw $a1, 0x34($sp) +/* 11F2D0 802B5CC0 AFA60038 */ sw $a2, 0x38($sp) +/* 11F2D4 802B5CC4 0C0AE006 */ jal func_802B8018 +/* 11F2D8 802B5CC8 AFA4001C */ sw $a0, 0x1c($sp) +/* 11F2DC 802B5CCC 8FA4001C */ lw $a0, 0x1c($sp) +/* 11F2E0 802B5CD0 0C0AE00E */ jal func_802B8038 +/* 11F2E4 802B5CD4 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F2E8 802B5CD8 97A40032 */ lhu $a0, 0x32($sp) +/* 11F2EC 802B5CDC E7A00028 */ swc1 $f0, 0x28($sp) +/* 11F2F0 802B5CE0 0C0AE006 */ jal func_802B8018 +/* 11F2F4 802B5CE4 AFA4001C */ sw $a0, 0x1c($sp) +/* 11F2F8 802B5CE8 8FA4001C */ lw $a0, 0x1c($sp) +/* 11F2FC 802B5CEC 0C0AE00E */ jal func_802B8038 +/* 11F300 802B5CF0 E7A00024 */ swc1 $f0, 0x24($sp) +/* 11F304 802B5CF4 C7A20028 */ lwc1 $f2, 0x28($sp) +/* 11F308 802B5CF8 C7A40024 */ lwc1 $f4, 0x24($sp) +/* 11F30C 802B5CFC 8FA20038 */ lw $v0, 0x38($sp) +/* 11F310 802B5D00 46041182 */ mul.s $f6, $f2, $f4 +/* 11F314 802B5D04 00000000 */ nop +/* 11F318 802B5D08 46001282 */ mul.s $f10, $f2, $f0 +/* 11F31C 802B5D0C E4460000 */ swc1 $f6, ($v0) +/* 11F320 802B5D10 C7A8002C */ lwc1 $f8, 0x2c($sp) +/* 11F324 802B5D14 46005407 */ neg.s $f16, $f10 +/* 11F328 802B5D18 E4480004 */ swc1 $f8, 4($v0) +/* 11F32C 802B5D1C E4500008 */ swc1 $f16, 8($v0) +/* 11F330 802B5D20 8FBF0014 */ lw $ra, 0x14($sp) +/* 11F334 802B5D24 27BD0030 */ addiu $sp, $sp, 0x30 +/* 11F338 802B5D28 03E00008 */ jr $ra +/* 11F33C 802B5D2C 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5D30.s b/asm/non_matchings/math_util/func_802B5D30.s new file mode 100644 index 000000000..47ae94dcd --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5D30.s @@ -0,0 +1,14 @@ +glabel func_802B5D30 +/* 11F340 802B5D30 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 11F344 802B5D34 AFBF0014 */ sw $ra, 0x14($sp) +/* 11F348 802B5D38 AFA40018 */ sw $a0, 0x18($sp) +/* 11F34C 802B5D3C AFA5001C */ sw $a1, 0x1c($sp) +/* 11F350 802B5D40 00C03825 */ move $a3, $a2 +/* 11F354 802B5D44 87A6001E */ lh $a2, 0x1e($sp) +/* 11F358 802B5D48 87A5001A */ lh $a1, 0x1a($sp) +/* 11F35C 802B5D4C 0C0AD759 */ jal func_802B5D64 +/* 11F360 802B5D50 3C040900 */ lui $a0, 0x900 +/* 11F364 802B5D54 8FBF0014 */ lw $ra, 0x14($sp) +/* 11F368 802B5D58 27BD0018 */ addiu $sp, $sp, 0x18 +/* 11F36C 802B5D5C 03E00008 */ jr $ra +/* 11F370 802B5D60 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B5D64.s b/asm/non_matchings/math_util/func_802B5D64.s new file mode 100644 index 000000000..c1f53ca03 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5D64.s @@ -0,0 +1,108 @@ +glabel func_802B5D64 +/* 11F374 802B5D64 0004CE02 */ srl $t9, $a0, 0x18 +/* 11F378 802B5D68 27BDFFA8 */ addiu $sp, $sp, -0x58 +/* 11F37C 802B5D6C 00194080 */ sll $t0, $t9, 2 +/* 11F380 802B5D70 3C098015 */ lui $t1, %hi(gSegmentTable) +/* 11F384 802B5D74 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff +/* 11F388 802B5D78 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 11F38C 802B5D7C 01284821 */ addu $t1, $t1, $t0 +/* 11F390 802B5D80 8D290258 */ lw $t1, %lo(gSegmentTable)($t1) +/* 11F394 802B5D84 00815024 */ and $t2, $a0, $at +/* 11F398 802B5D88 AFB00014 */ sw $s0, 0x14($sp) +/* 11F39C 802B5D8C AFA40058 */ sw $a0, 0x58($sp) +/* 11F3A0 802B5D90 AFBF001C */ sw $ra, 0x1c($sp) +/* 11F3A4 802B5D94 AFB10018 */ sw $s1, 0x18($sp) +/* 11F3A8 802B5D98 3C018000 */ lui $at, 0x8000 +/* 11F3AC 802B5D9C 30C4FFFF */ andi $a0, $a2, 0xffff +/* 11F3B0 802B5DA0 012A8021 */ addu $s0, $t1, $t2 +/* 11F3B4 802B5DA4 00E08825 */ move $s1, $a3 +/* 11F3B8 802B5DA8 AFA5005C */ sw $a1, 0x5c($sp) +/* 11F3BC 802B5DAC AFA60060 */ sw $a2, 0x60($sp) +/* 11F3C0 802B5DB0 02018021 */ addu $s0, $s0, $at +/* 11F3C4 802B5DB4 0C0AE006 */ jal func_802B8018 +/* 11F3C8 802B5DB8 AFA40020 */ sw $a0, 0x20($sp) +/* 11F3CC 802B5DBC 8FA40020 */ lw $a0, 0x20($sp) +/* 11F3D0 802B5DC0 0C0AE00E */ jal func_802B8038 +/* 11F3D4 802B5DC4 E7A00048 */ swc1 $f0, 0x48($sp) +/* 11F3D8 802B5DC8 97A4005E */ lhu $a0, 0x5e($sp) +/* 11F3DC 802B5DCC E7A00044 */ swc1 $f0, 0x44($sp) +/* 11F3E0 802B5DD0 0C0AE006 */ jal func_802B8018 +/* 11F3E4 802B5DD4 AFA40020 */ sw $a0, 0x20($sp) +/* 11F3E8 802B5DD8 8FA40020 */ lw $a0, 0x20($sp) +/* 11F3EC 802B5DDC 0C0AE00E */ jal func_802B8038 +/* 11F3F0 802B5DE0 E7A00040 */ swc1 $f0, 0x40($sp) +/* 11F3F4 802B5DE4 C7AC0044 */ lwc1 $f12, 0x44($sp) +/* 11F3F8 802B5DE8 C7A40040 */ lwc1 $f4, 0x40($sp) +/* 11F3FC 802B5DEC 3C0142F0 */ li $at, 0x42F00000 # 120.000000 +/* 11F400 802B5DF0 44811000 */ mtc1 $at, $f2 +/* 11F404 802B5DF4 46046182 */ mul.s $f6, $f12, $f4 +/* 11F408 802B5DF8 C7B00048 */ lwc1 $f16, 0x48($sp) +/* 11F40C 802B5DFC 3C01C2F0 */ li $at, 0xC2F00000 # -120.000000 +/* 11F410 802B5E00 00001025 */ move $v0, $zero +/* 11F414 802B5E04 32240003 */ andi $a0, $s1, 3 +/* 11F418 802B5E08 46023202 */ mul.s $f8, $f6, $f2 +/* 11F41C 802B5E0C 00000000 */ nop +/* 11F420 802B5E10 46101482 */ mul.s $f18, $f2, $f16 +/* 11F424 802B5E14 00000000 */ nop +/* 11F428 802B5E18 46006182 */ mul.s $f6, $f12, $f0 +/* 11F42C 802B5E1C 4600428D */ trunc.w.s $f10, $f8 +/* 11F430 802B5E20 44814000 */ mtc1 $at, $f8 +/* 11F434 802B5E24 4600910D */ trunc.w.s $f4, $f18 +/* 11F438 802B5E28 440C5000 */ mfc1 $t4, $f10 +/* 11F43C 802B5E2C 46083282 */ mul.s $f10, $f6, $f8 +/* 11F440 802B5E30 440E2000 */ mfc1 $t6, $f4 +/* 11F444 802B5E34 A3AC002C */ sb $t4, 0x2c($sp) +/* 11F448 802B5E38 A3AE002D */ sb $t6, 0x2d($sp) +/* 11F44C 802B5E3C 4600540D */ trunc.w.s $f16, $f10 +/* 11F450 802B5E40 44198000 */ mfc1 $t9, $f16 +/* 11F454 802B5E44 1A200029 */ blez $s1, .L802B5EEC +/* 11F458 802B5E48 A3B9002E */ sb $t9, 0x2e($sp) +/* 11F45C 802B5E4C 1080000C */ beqz $a0, .L802B5E80 +/* 11F460 802B5E50 00801825 */ move $v1, $a0 +.L802B5E54: +/* 11F464 802B5E54 83A8002C */ lb $t0, 0x2c($sp) +/* 11F468 802B5E58 24420001 */ addiu $v0, $v0, 1 +/* 11F46C 802B5E5C 26100018 */ addiu $s0, $s0, 0x18 +/* 11F470 802B5E60 A208FFF8 */ sb $t0, -8($s0) +/* 11F474 802B5E64 83B8002D */ lb $t8, 0x2d($sp) +/* 11F478 802B5E68 A218FFF9 */ sb $t8, -7($s0) +/* 11F47C 802B5E6C 83A9002E */ lb $t1, 0x2e($sp) +/* 11F480 802B5E70 1462FFF8 */ bne $v1, $v0, .L802B5E54 +/* 11F484 802B5E74 A209FFFA */ sb $t1, -6($s0) +/* 11F488 802B5E78 5051001D */ beql $v0, $s1, .L802B5EF0 +/* 11F48C 802B5E7C 8FBF001C */ lw $ra, 0x1c($sp) +.L802B5E80: +/* 11F490 802B5E80 83AA002C */ lb $t2, 0x2c($sp) +/* 11F494 802B5E84 24420004 */ addiu $v0, $v0, 4 +/* 11F498 802B5E88 26100060 */ addiu $s0, $s0, 0x60 +/* 11F49C 802B5E8C A20AFFB0 */ sb $t2, -0x50($s0) +/* 11F4A0 802B5E90 83AB002D */ lb $t3, 0x2d($sp) +/* 11F4A4 802B5E94 A20BFFB1 */ sb $t3, -0x4f($s0) +/* 11F4A8 802B5E98 83AC002E */ lb $t4, 0x2e($sp) +/* 11F4AC 802B5E9C A20CFFB2 */ sb $t4, -0x4e($s0) +/* 11F4B0 802B5EA0 83AD002C */ lb $t5, 0x2c($sp) +/* 11F4B4 802B5EA4 A20DFFC8 */ sb $t5, -0x38($s0) +/* 11F4B8 802B5EA8 83AE002D */ lb $t6, 0x2d($sp) +/* 11F4BC 802B5EAC A20EFFC9 */ sb $t6, -0x37($s0) +/* 11F4C0 802B5EB0 83AF002E */ lb $t7, 0x2e($sp) +/* 11F4C4 802B5EB4 A20FFFCA */ sb $t7, -0x36($s0) +/* 11F4C8 802B5EB8 83B9002C */ lb $t9, 0x2c($sp) +/* 11F4CC 802B5EBC A219FFE0 */ sb $t9, -0x20($s0) +/* 11F4D0 802B5EC0 83A8002D */ lb $t0, 0x2d($sp) +/* 11F4D4 802B5EC4 A208FFE1 */ sb $t0, -0x1f($s0) +/* 11F4D8 802B5EC8 83B8002E */ lb $t8, 0x2e($sp) +/* 11F4DC 802B5ECC A218FFE2 */ sb $t8, -0x1e($s0) +/* 11F4E0 802B5ED0 83A9002C */ lb $t1, 0x2c($sp) +/* 11F4E4 802B5ED4 A209FFF8 */ sb $t1, -8($s0) +/* 11F4E8 802B5ED8 83AA002D */ lb $t2, 0x2d($sp) +/* 11F4EC 802B5EDC A20AFFF9 */ sb $t2, -7($s0) +/* 11F4F0 802B5EE0 83AB002E */ lb $t3, 0x2e($sp) +/* 11F4F4 802B5EE4 1451FFE6 */ bne $v0, $s1, .L802B5E80 +/* 11F4F8 802B5EE8 A20BFFFA */ sb $t3, -6($s0) +.L802B5EEC: +/* 11F4FC 802B5EEC 8FBF001C */ lw $ra, 0x1c($sp) +.L802B5EF0: +/* 11F500 802B5EF0 8FB00014 */ lw $s0, 0x14($sp) +/* 11F504 802B5EF4 8FB10018 */ lw $s1, 0x18($sp) +/* 11F508 802B5EF8 03E00008 */ jr $ra +/* 11F50C 802B5EFC 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/asm/non_matchings/math_util/func_802B5F00.s b/asm/non_matchings/math_util/func_802B5F00.s new file mode 100644 index 000000000..3ae69a334 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5F00.s @@ -0,0 +1,30 @@ +glabel func_802B5F00 +/* 11F510 802B5F00 44856000 */ mtc1 $a1, $f12 +/* 11F514 802B5F04 C4840000 */ lwc1 $f4, ($a0) +/* 11F518 802B5F08 C4880010 */ lwc1 $f8, 0x10($a0) +/* 11F51C 802B5F0C C4900020 */ lwc1 $f16, 0x20($a0) +/* 11F520 802B5F10 460C2182 */ mul.s $f6, $f4, $f12 +/* 11F524 802B5F14 C4840004 */ lwc1 $f4, 4($a0) +/* 11F528 802B5F18 460C4282 */ mul.s $f10, $f8, $f12 +/* 11F52C 802B5F1C C4880014 */ lwc1 $f8, 0x14($a0) +/* 11F530 802B5F20 460C8482 */ mul.s $f18, $f16, $f12 +/* 11F534 802B5F24 E4860000 */ swc1 $f6, ($a0) +/* 11F538 802B5F28 C4900024 */ lwc1 $f16, 0x24($a0) +/* 11F53C 802B5F2C 460C2182 */ mul.s $f6, $f4, $f12 +/* 11F540 802B5F30 E48A0010 */ swc1 $f10, 0x10($a0) +/* 11F544 802B5F34 C4840008 */ lwc1 $f4, 8($a0) +/* 11F548 802B5F38 460C4282 */ mul.s $f10, $f8, $f12 +/* 11F54C 802B5F3C E4920020 */ swc1 $f18, 0x20($a0) +/* 11F550 802B5F40 C4880018 */ lwc1 $f8, 0x18($a0) +/* 11F554 802B5F44 460C8482 */ mul.s $f18, $f16, $f12 +/* 11F558 802B5F48 E4860004 */ swc1 $f6, 4($a0) +/* 11F55C 802B5F4C C4900028 */ lwc1 $f16, 0x28($a0) +/* 11F560 802B5F50 460C2182 */ mul.s $f6, $f4, $f12 +/* 11F564 802B5F54 E48A0014 */ swc1 $f10, 0x14($a0) +/* 11F568 802B5F58 460C4282 */ mul.s $f10, $f8, $f12 +/* 11F56C 802B5F5C E4920024 */ swc1 $f18, 0x24($a0) +/* 11F570 802B5F60 460C8482 */ mul.s $f18, $f16, $f12 +/* 11F574 802B5F64 E4860008 */ swc1 $f6, 8($a0) +/* 11F578 802B5F68 E48A0018 */ swc1 $f10, 0x18($a0) +/* 11F57C 802B5F6C 03E00008 */ jr $ra +/* 11F580 802B5F70 E4920028 */ swc1 $f18, 0x28($a0) diff --git a/asm/non_matchings/math_util/func_802B5F74.s b/asm/non_matchings/math_util/func_802B5F74.s new file mode 100644 index 000000000..76005715c --- /dev/null +++ b/asm/non_matchings/math_util/func_802B5F74.s @@ -0,0 +1,81 @@ +glabel func_802B5F74 +/* 11F584 802B5F74 27BDFFC0 */ addiu $sp, $sp, -0x40 +/* 11F588 802B5F78 AFB0001C */ sw $s0, 0x1c($sp) +/* 11F58C 802B5F7C 00808025 */ move $s0, $a0 +/* 11F590 802B5F80 AFBF0024 */ sw $ra, 0x24($sp) +/* 11F594 802B5F84 AFB10020 */ sw $s1, 0x20($sp) +/* 11F598 802B5F88 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 11F59C 802B5F8C AFA50044 */ sw $a1, 0x44($sp) +/* 11F5A0 802B5F90 00C08825 */ move $s1, $a2 +/* 11F5A4 802B5F94 0C0AE006 */ jal func_802B8018 +/* 11F5A8 802B5F98 94C40000 */ lhu $a0, ($a2) +/* 11F5AC 802B5F9C E7A0003C */ swc1 $f0, 0x3c($sp) +/* 11F5B0 802B5FA0 0C0AE00E */ jal func_802B8038 +/* 11F5B4 802B5FA4 96240000 */ lhu $a0, ($s1) +/* 11F5B8 802B5FA8 46000506 */ mov.s $f20, $f0 +/* 11F5BC 802B5FAC 0C0AE006 */ jal func_802B8018 +/* 11F5C0 802B5FB0 96240002 */ lhu $a0, 2($s1) +/* 11F5C4 802B5FB4 96240002 */ lhu $a0, 2($s1) +/* 11F5C8 802B5FB8 0C0AE00E */ jal func_802B8038 +/* 11F5CC 802B5FBC E7A00034 */ swc1 $f0, 0x34($sp) +/* 11F5D0 802B5FC0 96240004 */ lhu $a0, 4($s1) +/* 11F5D4 802B5FC4 0C0AE006 */ jal func_802B8018 +/* 11F5D8 802B5FC8 E7A00030 */ swc1 $f0, 0x30($sp) +/* 11F5DC 802B5FCC 96240004 */ lhu $a0, 4($s1) +/* 11F5E0 802B5FD0 0C0AE00E */ jal func_802B8038 +/* 11F5E4 802B5FD4 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F5E8 802B5FD8 C7AE0034 */ lwc1 $f14, 0x34($sp) +/* 11F5EC 802B5FDC C7B2003C */ lwc1 $f18, 0x3c($sp) +/* 11F5F0 802B5FE0 C7B00030 */ lwc1 $f16, 0x30($sp) +/* 11F5F4 802B5FE4 C7A2002C */ lwc1 $f2, 0x2c($sp) +/* 11F5F8 802B5FE8 460E9302 */ mul.s $f12, $f18, $f14 +/* 11F5FC 802B5FEC 46008287 */ neg.s $f10, $f16 +/* 11F600 802B5FF0 8FA20044 */ lw $v0, 0x44($sp) +/* 11F604 802B5FF4 46008102 */ mul.s $f4, $f16, $f0 +/* 11F608 802B5FF8 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11F60C 802B5FFC 46026182 */ mul.s $f6, $f12, $f2 +/* 11F610 802B6000 46062200 */ add.s $f8, $f4, $f6 +/* 11F614 802B6004 46025102 */ mul.s $f4, $f10, $f2 +/* 11F618 802B6008 00000000 */ nop +/* 11F61C 802B600C 46006182 */ mul.s $f6, $f12, $f0 +/* 11F620 802B6010 E6080000 */ swc1 $f8, ($s0) +/* 11F624 802B6014 460EA282 */ mul.s $f10, $f20, $f14 +/* 11F628 802B6018 46062200 */ add.s $f8, $f4, $f6 +/* 11F62C 802B601C 4602A182 */ mul.s $f6, $f20, $f2 +/* 11F630 802B6020 E60A0020 */ swc1 $f10, 0x20($s0) +/* 11F634 802B6024 46009287 */ neg.s $f10, $f18 +/* 11F638 802B6028 E6080010 */ swc1 $f8, 0x10($s0) +/* 11F63C 802B602C 4600A202 */ mul.s $f8, $f20, $f0 +/* 11F640 802B6030 C4440000 */ lwc1 $f4, ($v0) +/* 11F644 802B6034 E60A0024 */ swc1 $f10, 0x24($s0) +/* 11F648 802B6038 46109302 */ mul.s $f12, $f18, $f16 +/* 11F64C 802B603C E6060004 */ swc1 $f6, 4($s0) +/* 11F650 802B6040 E6040030 */ swc1 $f4, 0x30($s0) +/* 11F654 802B6044 46007187 */ neg.s $f6, $f14 +/* 11F658 802B6048 E6080014 */ swc1 $f8, 0x14($s0) +/* 11F65C 802B604C 46003202 */ mul.s $f8, $f6, $f0 +/* 11F660 802B6050 C4440004 */ lwc1 $f4, 4($v0) +/* 11F664 802B6054 46026282 */ mul.s $f10, $f12, $f2 +/* 11F668 802B6058 E6040034 */ swc1 $f4, 0x34($s0) +/* 11F66C 802B605C 46027182 */ mul.s $f6, $f14, $f2 +/* 11F670 802B6060 460A4100 */ add.s $f4, $f8, $f10 +/* 11F674 802B6064 46006202 */ mul.s $f8, $f12, $f0 +/* 11F678 802B6068 44800000 */ mtc1 $zero, $f0 +/* 11F67C 802B606C E6040008 */ swc1 $f4, 8($s0) +/* 11F680 802B6070 4610A102 */ mul.s $f4, $f20, $f16 +/* 11F684 802B6074 46083280 */ add.s $f10, $f6, $f8 +/* 11F688 802B6078 44814000 */ mtc1 $at, $f8 +/* 11F68C 802B607C E6040028 */ swc1 $f4, 0x28($s0) +/* 11F690 802B6080 E60A0018 */ swc1 $f10, 0x18($s0) +/* 11F694 802B6084 C4460008 */ lwc1 $f6, 8($v0) +/* 11F698 802B6088 E600000C */ swc1 $f0, 0xc($s0) +/* 11F69C 802B608C E600001C */ swc1 $f0, 0x1c($s0) +/* 11F6A0 802B6090 E600002C */ swc1 $f0, 0x2c($s0) +/* 11F6A4 802B6094 E608003C */ swc1 $f8, 0x3c($s0) +/* 11F6A8 802B6098 E6060038 */ swc1 $f6, 0x38($s0) +/* 11F6AC 802B609C 8FBF0024 */ lw $ra, 0x24($sp) +/* 11F6B0 802B60A0 8FB10020 */ lw $s1, 0x20($sp) +/* 11F6B4 802B60A4 8FB0001C */ lw $s0, 0x1c($sp) +/* 11F6B8 802B60A8 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 11F6BC 802B60AC 03E00008 */ jr $ra +/* 11F6C0 802B60B0 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/non_matchings/math_util/func_802B60B4.s b/asm/non_matchings/math_util/func_802B60B4.s new file mode 100644 index 000000000..e0aae1b7b --- /dev/null +++ b/asm/non_matchings/math_util/func_802B60B4.s @@ -0,0 +1,89 @@ +glabel func_802B60B4 +/* 11F6C4 802B60B4 27BDFFC0 */ addiu $sp, $sp, -0x40 +/* 11F6C8 802B60B8 AFB0001C */ sw $s0, 0x1c($sp) +/* 11F6CC 802B60BC 00808025 */ move $s0, $a0 +/* 11F6D0 802B60C0 AFBF0024 */ sw $ra, 0x24($sp) +/* 11F6D4 802B60C4 AFB10020 */ sw $s1, 0x20($sp) +/* 11F6D8 802B60C8 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 11F6DC 802B60CC AFA50044 */ sw $a1, 0x44($sp) +/* 11F6E0 802B60D0 00C08825 */ move $s1, $a2 +/* 11F6E4 802B60D4 0C0AE006 */ jal func_802B8018 +/* 11F6E8 802B60D8 94C40000 */ lhu $a0, ($a2) +/* 11F6EC 802B60DC E7A0003C */ swc1 $f0, 0x3c($sp) +/* 11F6F0 802B60E0 0C0AE00E */ jal func_802B8038 +/* 11F6F4 802B60E4 96240000 */ lhu $a0, ($s1) +/* 11F6F8 802B60E8 46000506 */ mov.s $f20, $f0 +/* 11F6FC 802B60EC 0C0AE006 */ jal func_802B8018 +/* 11F700 802B60F0 96240002 */ lhu $a0, 2($s1) +/* 11F704 802B60F4 96240002 */ lhu $a0, 2($s1) +/* 11F708 802B60F8 0C0AE00E */ jal func_802B8038 +/* 11F70C 802B60FC E7A00034 */ swc1 $f0, 0x34($sp) +/* 11F710 802B6100 96240004 */ lhu $a0, 4($s1) +/* 11F714 802B6104 0C0AE006 */ jal func_802B8018 +/* 11F718 802B6108 E7A00030 */ swc1 $f0, 0x30($sp) +/* 11F71C 802B610C 96240004 */ lhu $a0, 4($s1) +/* 11F720 802B6110 0C0AE00E */ jal func_802B8038 +/* 11F724 802B6114 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F728 802B6118 C7AE0034 */ lwc1 $f14, 0x34($sp) +/* 11F72C 802B611C C7B2003C */ lwc1 $f18, 0x3c($sp) +/* 11F730 802B6120 C7B00030 */ lwc1 $f16, 0x30($sp) +/* 11F734 802B6124 C7A2002C */ lwc1 $f2, 0x2c($sp) +/* 11F738 802B6128 460E9302 */ mul.s $f12, $f18, $f14 +/* 11F73C 802B612C 46008287 */ neg.s $f10, $f16 +/* 11F740 802B6130 8FA20044 */ lw $v0, 0x44($sp) +/* 11F744 802B6134 46008102 */ mul.s $f4, $f16, $f0 +/* 11F748 802B6138 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11F74C 802B613C 46026182 */ mul.s $f6, $f12, $f2 +/* 11F750 802B6140 46062200 */ add.s $f8, $f4, $f6 +/* 11F754 802B6144 46025102 */ mul.s $f4, $f10, $f2 +/* 11F758 802B6148 00000000 */ nop +/* 11F75C 802B614C 46006182 */ mul.s $f6, $f12, $f0 +/* 11F760 802B6150 E6080000 */ swc1 $f8, ($s0) +/* 11F764 802B6154 460EA282 */ mul.s $f10, $f20, $f14 +/* 11F768 802B6158 46062200 */ add.s $f8, $f4, $f6 +/* 11F76C 802B615C E60A0008 */ swc1 $f10, 8($s0) +/* 11F770 802B6160 E6080004 */ swc1 $f8, 4($s0) +/* 11F774 802B6164 844E0000 */ lh $t6, ($v0) +/* 11F778 802B6168 4602A202 */ mul.s $f8, $f20, $f2 +/* 11F77C 802B616C 448E2000 */ mtc1 $t6, $f4 +/* 11F780 802B6170 4600A282 */ mul.s $f10, $f20, $f0 +/* 11F784 802B6174 E6080010 */ swc1 $f8, 0x10($s0) +/* 11F788 802B6178 46109302 */ mul.s $f12, $f18, $f16 +/* 11F78C 802B617C E60A0014 */ swc1 $f10, 0x14($s0) +/* 11F790 802B6180 46007287 */ neg.s $f10, $f14 +/* 11F794 802B6184 468021A0 */ cvt.s.w $f6, $f4 +/* 11F798 802B6188 46009107 */ neg.s $f4, $f18 +/* 11F79C 802B618C E606000C */ swc1 $f6, 0xc($s0) +/* 11F7A0 802B6190 E6040018 */ swc1 $f4, 0x18($s0) +/* 11F7A4 802B6194 844F0002 */ lh $t7, 2($v0) +/* 11F7A8 802B6198 46005102 */ mul.s $f4, $f10, $f0 +/* 11F7AC 802B619C 448F3000 */ mtc1 $t7, $f6 +/* 11F7B0 802B61A0 00000000 */ nop +/* 11F7B4 802B61A4 46803220 */ cvt.s.w $f8, $f6 +/* 11F7B8 802B61A8 46026182 */ mul.s $f6, $f12, $f2 +/* 11F7BC 802B61AC 00000000 */ nop +/* 11F7C0 802B61B0 46027282 */ mul.s $f10, $f14, $f2 +/* 11F7C4 802B61B4 E608001C */ swc1 $f8, 0x1c($s0) +/* 11F7C8 802B61B8 46062200 */ add.s $f8, $f4, $f6 +/* 11F7CC 802B61BC 46006102 */ mul.s $f4, $f12, $f0 +/* 11F7D0 802B61C0 44800000 */ mtc1 $zero, $f0 +/* 11F7D4 802B61C4 E6080020 */ swc1 $f8, 0x20($s0) +/* 11F7D8 802B61C8 4610A202 */ mul.s $f8, $f20, $f16 +/* 11F7DC 802B61CC 46045180 */ add.s $f6, $f10, $f4 +/* 11F7E0 802B61D0 E6080028 */ swc1 $f8, 0x28($s0) +/* 11F7E4 802B61D4 E6060024 */ swc1 $f6, 0x24($s0) +/* 11F7E8 802B61D8 84580004 */ lh $t8, 4($v0) +/* 11F7EC 802B61DC 44813000 */ mtc1 $at, $f6 +/* 11F7F0 802B61E0 E6000030 */ swc1 $f0, 0x30($s0) +/* 11F7F4 802B61E4 44985000 */ mtc1 $t8, $f10 +/* 11F7F8 802B61E8 E6000034 */ swc1 $f0, 0x34($s0) +/* 11F7FC 802B61EC E6000038 */ swc1 $f0, 0x38($s0) +/* 11F800 802B61F0 46805120 */ cvt.s.w $f4, $f10 +/* 11F804 802B61F4 E606003C */ swc1 $f6, 0x3c($s0) +/* 11F808 802B61F8 E604002C */ swc1 $f4, 0x2c($s0) +/* 11F80C 802B61FC 8FBF0024 */ lw $ra, 0x24($sp) +/* 11F810 802B6200 8FB10020 */ lw $s1, 0x20($sp) +/* 11F814 802B6204 8FB0001C */ lw $s0, 0x1c($sp) +/* 11F818 802B6208 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 11F81C 802B620C 03E00008 */ jr $ra +/* 11F820 802B6210 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/non_matchings/math_util/func_802B6214.s b/asm/non_matchings/math_util/func_802B6214.s new file mode 100644 index 000000000..6fd81ffa6 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6214.s @@ -0,0 +1,89 @@ +glabel func_802B6214 +/* 11F824 802B6214 27BDFFC0 */ addiu $sp, $sp, -0x40 +/* 11F828 802B6218 AFB0001C */ sw $s0, 0x1c($sp) +/* 11F82C 802B621C 00808025 */ move $s0, $a0 +/* 11F830 802B6220 AFBF0024 */ sw $ra, 0x24($sp) +/* 11F834 802B6224 AFB10020 */ sw $s1, 0x20($sp) +/* 11F838 802B6228 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 11F83C 802B622C AFA50044 */ sw $a1, 0x44($sp) +/* 11F840 802B6230 00C08825 */ move $s1, $a2 +/* 11F844 802B6234 0C0AE006 */ jal func_802B8018 +/* 11F848 802B6238 94C40000 */ lhu $a0, ($a2) +/* 11F84C 802B623C E7A0003C */ swc1 $f0, 0x3c($sp) +/* 11F850 802B6240 0C0AE00E */ jal func_802B8038 +/* 11F854 802B6244 96240000 */ lhu $a0, ($s1) +/* 11F858 802B6248 46000506 */ mov.s $f20, $f0 +/* 11F85C 802B624C 0C0AE006 */ jal func_802B8018 +/* 11F860 802B6250 96240002 */ lhu $a0, 2($s1) +/* 11F864 802B6254 96240002 */ lhu $a0, 2($s1) +/* 11F868 802B6258 0C0AE00E */ jal func_802B8038 +/* 11F86C 802B625C E7A00034 */ swc1 $f0, 0x34($sp) +/* 11F870 802B6260 96240004 */ lhu $a0, 4($s1) +/* 11F874 802B6264 0C0AE006 */ jal func_802B8018 +/* 11F878 802B6268 E7A00030 */ swc1 $f0, 0x30($sp) +/* 11F87C 802B626C 96240004 */ lhu $a0, 4($s1) +/* 11F880 802B6270 0C0AE00E */ jal func_802B8038 +/* 11F884 802B6274 E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11F888 802B6278 C7AE0034 */ lwc1 $f14, 0x34($sp) +/* 11F88C 802B627C C7B2003C */ lwc1 $f18, 0x3c($sp) +/* 11F890 802B6280 C7B00030 */ lwc1 $f16, 0x30($sp) +/* 11F894 802B6284 C7A2002C */ lwc1 $f2, 0x2c($sp) +/* 11F898 802B6288 460E9302 */ mul.s $f12, $f18, $f14 +/* 11F89C 802B628C 46008287 */ neg.s $f10, $f16 +/* 11F8A0 802B6290 8FA20044 */ lw $v0, 0x44($sp) +/* 11F8A4 802B6294 46008102 */ mul.s $f4, $f16, $f0 +/* 11F8A8 802B6298 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11F8AC 802B629C 46026182 */ mul.s $f6, $f12, $f2 +/* 11F8B0 802B62A0 46062200 */ add.s $f8, $f4, $f6 +/* 11F8B4 802B62A4 46025102 */ mul.s $f4, $f10, $f2 +/* 11F8B8 802B62A8 00000000 */ nop +/* 11F8BC 802B62AC 46006182 */ mul.s $f6, $f12, $f0 +/* 11F8C0 802B62B0 E6080000 */ swc1 $f8, ($s0) +/* 11F8C4 802B62B4 460EA282 */ mul.s $f10, $f20, $f14 +/* 11F8C8 802B62B8 46062200 */ add.s $f8, $f4, $f6 +/* 11F8CC 802B62BC E60A0020 */ swc1 $f10, 0x20($s0) +/* 11F8D0 802B62C0 E6080010 */ swc1 $f8, 0x10($s0) +/* 11F8D4 802B62C4 844E0000 */ lh $t6, ($v0) +/* 11F8D8 802B62C8 4602A202 */ mul.s $f8, $f20, $f2 +/* 11F8DC 802B62CC 448E2000 */ mtc1 $t6, $f4 +/* 11F8E0 802B62D0 4600A282 */ mul.s $f10, $f20, $f0 +/* 11F8E4 802B62D4 E6080004 */ swc1 $f8, 4($s0) +/* 11F8E8 802B62D8 46109302 */ mul.s $f12, $f18, $f16 +/* 11F8EC 802B62DC E60A0014 */ swc1 $f10, 0x14($s0) +/* 11F8F0 802B62E0 46007287 */ neg.s $f10, $f14 +/* 11F8F4 802B62E4 468021A0 */ cvt.s.w $f6, $f4 +/* 11F8F8 802B62E8 46009107 */ neg.s $f4, $f18 +/* 11F8FC 802B62EC E6060030 */ swc1 $f6, 0x30($s0) +/* 11F900 802B62F0 E6040024 */ swc1 $f4, 0x24($s0) +/* 11F904 802B62F4 844F0002 */ lh $t7, 2($v0) +/* 11F908 802B62F8 46005102 */ mul.s $f4, $f10, $f0 +/* 11F90C 802B62FC 448F3000 */ mtc1 $t7, $f6 +/* 11F910 802B6300 00000000 */ nop +/* 11F914 802B6304 46803220 */ cvt.s.w $f8, $f6 +/* 11F918 802B6308 46026182 */ mul.s $f6, $f12, $f2 +/* 11F91C 802B630C 00000000 */ nop +/* 11F920 802B6310 46027282 */ mul.s $f10, $f14, $f2 +/* 11F924 802B6314 E6080034 */ swc1 $f8, 0x34($s0) +/* 11F928 802B6318 46062200 */ add.s $f8, $f4, $f6 +/* 11F92C 802B631C 46006102 */ mul.s $f4, $f12, $f0 +/* 11F930 802B6320 44800000 */ mtc1 $zero, $f0 +/* 11F934 802B6324 E6080008 */ swc1 $f8, 8($s0) +/* 11F938 802B6328 4610A202 */ mul.s $f8, $f20, $f16 +/* 11F93C 802B632C 46045180 */ add.s $f6, $f10, $f4 +/* 11F940 802B6330 E6080028 */ swc1 $f8, 0x28($s0) +/* 11F944 802B6334 E6060018 */ swc1 $f6, 0x18($s0) +/* 11F948 802B6338 84580004 */ lh $t8, 4($v0) +/* 11F94C 802B633C 44813000 */ mtc1 $at, $f6 +/* 11F950 802B6340 E600000C */ swc1 $f0, 0xc($s0) +/* 11F954 802B6344 44985000 */ mtc1 $t8, $f10 +/* 11F958 802B6348 E600001C */ swc1 $f0, 0x1c($s0) +/* 11F95C 802B634C E600002C */ swc1 $f0, 0x2c($s0) +/* 11F960 802B6350 46805120 */ cvt.s.w $f4, $f10 +/* 11F964 802B6354 E606003C */ swc1 $f6, 0x3c($s0) +/* 11F968 802B6358 E6040038 */ swc1 $f4, 0x38($s0) +/* 11F96C 802B635C 8FBF0024 */ lw $ra, 0x24($sp) +/* 11F970 802B6360 8FB10020 */ lw $s1, 0x20($sp) +/* 11F974 802B6364 8FB0001C */ lw $s0, 0x1c($sp) +/* 11F978 802B6368 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 11F97C 802B636C 03E00008 */ jr $ra +/* 11F980 802B6370 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/non_matchings/math_util/func_802B6374.s b/asm/non_matchings/math_util/func_802B6374.s new file mode 100644 index 000000000..2553fbcdb --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6374.s @@ -0,0 +1,18 @@ +glabel func_802B6374 +/* 11F984 802B6374 C48C0000 */ lwc1 $f12, ($a0) +/* 11F988 802B6378 C48E0004 */ lwc1 $f14, 4($a0) +/* 11F98C 802B637C C4820008 */ lwc1 $f2, 8($a0) +/* 11F990 802B6380 460C6102 */ mul.s $f4, $f12, $f12 +/* 11F994 802B6384 00000000 */ nop +/* 11F998 802B6388 460E7182 */ mul.s $f6, $f14, $f14 +/* 11F99C 802B638C 46062200 */ add.s $f8, $f4, $f6 +/* 11F9A0 802B6390 46021282 */ mul.s $f10, $f2, $f2 +/* 11F9A4 802B6394 46085000 */ add.s $f0, $f10, $f8 +/* 11F9A8 802B6398 46000004 */ sqrt.s $f0, $f0 +/* 11F9AC 802B639C 46006403 */ div.s $f16, $f12, $f0 +/* 11F9B0 802B63A0 46007483 */ div.s $f18, $f14, $f0 +/* 11F9B4 802B63A4 E4900000 */ swc1 $f16, ($a0) +/* 11F9B8 802B63A8 46001103 */ div.s $f4, $f2, $f0 +/* 11F9BC 802B63AC E4920004 */ swc1 $f18, 4($a0) +/* 11F9C0 802B63B0 03E00008 */ jr $ra +/* 11F9C4 802B63B4 E4840008 */ swc1 $f4, 8($a0) diff --git a/asm/non_matchings/math_util/func_802B63B8.s b/asm/non_matchings/math_util/func_802B63B8.s new file mode 100644 index 000000000..df865c6b1 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B63B8.s @@ -0,0 +1,32 @@ +glabel func_802B63B8 +/* 11F9C8 802B63B8 C48C0000 */ lwc1 $f12, ($a0) +/* 11F9CC 802B63BC C4A40000 */ lwc1 $f4, ($a1) +/* 11F9D0 802B63C0 C48E0004 */ lwc1 $f14, 4($a0) +/* 11F9D4 802B63C4 C4A80004 */ lwc1 $f8, 4($a1) +/* 11F9D8 802B63C8 460C2182 */ mul.s $f6, $f4, $f12 +/* 11F9DC 802B63CC C4820008 */ lwc1 $f2, 8($a0) +/* 11F9E0 802B63D0 460E4282 */ mul.s $f10, $f8, $f14 +/* 11F9E4 802B63D4 C4A80008 */ lwc1 $f8, 8($a1) +/* 11F9E8 802B63D8 460A3100 */ add.s $f4, $f6, $f10 +/* 11F9EC 802B63DC 46081182 */ mul.s $f6, $f2, $f8 +/* 11F9F0 802B63E0 C4AA000C */ lwc1 $f10, 0xc($a1) +/* 11F9F4 802B63E4 460C5202 */ mul.s $f8, $f10, $f12 +/* 11F9F8 802B63E8 46043000 */ add.s $f0, $f6, $f4 +/* 11F9FC 802B63EC C4A60010 */ lwc1 $f6, 0x10($a1) +/* 11FA00 802B63F0 460E3102 */ mul.s $f4, $f6, $f14 +/* 11FA04 802B63F4 C4A60014 */ lwc1 $f6, 0x14($a1) +/* 11FA08 802B63F8 46044280 */ add.s $f10, $f8, $f4 +/* 11FA0C 802B63FC 46061202 */ mul.s $f8, $f2, $f6 +/* 11FA10 802B6400 C4A40018 */ lwc1 $f4, 0x18($a1) +/* 11FA14 802B6404 460C2182 */ mul.s $f6, $f4, $f12 +/* 11FA18 802B6408 460A4400 */ add.s $f16, $f8, $f10 +/* 11FA1C 802B640C C4A8001C */ lwc1 $f8, 0x1c($a1) +/* 11FA20 802B6410 460E4282 */ mul.s $f10, $f8, $f14 +/* 11FA24 802B6414 C4A80020 */ lwc1 $f8, 0x20($a1) +/* 11FA28 802B6418 E4800000 */ swc1 $f0, ($a0) +/* 11FA2C 802B641C E4900004 */ swc1 $f16, 4($a0) +/* 11FA30 802B6420 460A3100 */ add.s $f4, $f6, $f10 +/* 11FA34 802B6424 46081182 */ mul.s $f6, $f2, $f8 +/* 11FA38 802B6428 46043480 */ add.s $f18, $f6, $f4 +/* 11FA3C 802B642C 03E00008 */ jr $ra +/* 11FA40 802B6430 E4920008 */ swc1 $f18, 8($a0) diff --git a/asm/non_matchings/math_util/func_802B6434.s b/asm/non_matchings/math_util/func_802B6434.s new file mode 100644 index 000000000..4ce5059ed --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6434.s @@ -0,0 +1,32 @@ +glabel func_802B6434 +/* 11FA44 802B6434 C48C0000 */ lwc1 $f12, ($a0) +/* 11FA48 802B6438 C4A40000 */ lwc1 $f4, ($a1) +/* 11FA4C 802B643C C48E0004 */ lwc1 $f14, 4($a0) +/* 11FA50 802B6440 C4A80004 */ lwc1 $f8, 4($a1) +/* 11FA54 802B6444 460C2182 */ mul.s $f6, $f4, $f12 +/* 11FA58 802B6448 C4820008 */ lwc1 $f2, 8($a0) +/* 11FA5C 802B644C 460E4282 */ mul.s $f10, $f8, $f14 +/* 11FA60 802B6450 C4A80008 */ lwc1 $f8, 8($a1) +/* 11FA64 802B6454 460A3100 */ add.s $f4, $f6, $f10 +/* 11FA68 802B6458 46081182 */ mul.s $f6, $f2, $f8 +/* 11FA6C 802B645C C4AA0010 */ lwc1 $f10, 0x10($a1) +/* 11FA70 802B6460 460C5202 */ mul.s $f8, $f10, $f12 +/* 11FA74 802B6464 46043000 */ add.s $f0, $f6, $f4 +/* 11FA78 802B6468 C4A60014 */ lwc1 $f6, 0x14($a1) +/* 11FA7C 802B646C 460E3102 */ mul.s $f4, $f6, $f14 +/* 11FA80 802B6470 C4A60018 */ lwc1 $f6, 0x18($a1) +/* 11FA84 802B6474 46044280 */ add.s $f10, $f8, $f4 +/* 11FA88 802B6478 46061202 */ mul.s $f8, $f2, $f6 +/* 11FA8C 802B647C C4A40020 */ lwc1 $f4, 0x20($a1) +/* 11FA90 802B6480 460C2182 */ mul.s $f6, $f4, $f12 +/* 11FA94 802B6484 460A4400 */ add.s $f16, $f8, $f10 +/* 11FA98 802B6488 C4A80024 */ lwc1 $f8, 0x24($a1) +/* 11FA9C 802B648C 460E4282 */ mul.s $f10, $f8, $f14 +/* 11FAA0 802B6490 C4A80028 */ lwc1 $f8, 0x28($a1) +/* 11FAA4 802B6494 E4800000 */ swc1 $f0, ($a0) +/* 11FAA8 802B6498 E4900004 */ swc1 $f16, 4($a0) +/* 11FAAC 802B649C 460A3100 */ add.s $f4, $f6, $f10 +/* 11FAB0 802B64A0 46081182 */ mul.s $f6, $f2, $f8 +/* 11FAB4 802B64A4 46043480 */ add.s $f18, $f6, $f4 +/* 11FAB8 802B64A8 03E00008 */ jr $ra +/* 11FABC 802B64AC E4920008 */ swc1 $f18, 8($a0) diff --git a/asm/non_matchings/math_util/func_802B64B0.s b/asm/non_matchings/math_util/func_802B64B0.s new file mode 100644 index 000000000..bcf5e8493 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B64B0.s @@ -0,0 +1,6 @@ +glabel func_802B64B0 +/* 11FAC0 802B64B0 AFA40000 */ sw $a0, ($sp) +/* 11FAC4 802B64B4 AFA50004 */ sw $a1, 4($sp) +/* 11FAC8 802B64B8 AFA60008 */ sw $a2, 8($sp) +/* 11FACC 802B64BC 03E00008 */ jr $ra +/* 11FAD0 802B64C0 AFA7000C */ sw $a3, 0xc($sp) diff --git a/asm/non_matchings/math_util/func_802B64C4.s b/asm/non_matchings/math_util/func_802B64C4.s new file mode 100644 index 000000000..a4950ed98 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B64C4.s @@ -0,0 +1,32 @@ +glabel func_802B64C4 +/* 11FAD4 802B64C4 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 11FAD8 802B64C8 00803025 */ move $a2, $a0 +/* 11FADC 802B64CC AFBF0014 */ sw $ra, 0x14($sp) +/* 11FAE0 802B64D0 30A4FFFF */ andi $a0, $a1, 0xffff +/* 11FAE4 802B64D4 AFA50034 */ sw $a1, 0x34($sp) +/* 11FAE8 802B64D8 AFA40018 */ sw $a0, 0x18($sp) +/* 11FAEC 802B64DC 0C0AE006 */ jal func_802B8018 +/* 11FAF0 802B64E0 AFA60030 */ sw $a2, 0x30($sp) +/* 11FAF4 802B64E4 8FA40018 */ lw $a0, 0x18($sp) +/* 11FAF8 802B64E8 0C0AE00E */ jal func_802B8038 +/* 11FAFC 802B64EC E7A0002C */ swc1 $f0, 0x2c($sp) +/* 11FB00 802B64F0 8FA60030 */ lw $a2, 0x30($sp) +/* 11FB04 802B64F4 C7B0002C */ lwc1 $f16, 0x2c($sp) +/* 11FB08 802B64F8 C4C20000 */ lwc1 $f2, ($a2) +/* 11FB0C 802B64FC C4CC0008 */ lwc1 $f12, 8($a2) +/* 11FB10 802B6500 C4CE0004 */ lwc1 $f14, 4($a2) +/* 11FB14 802B6504 46020102 */ mul.s $f4, $f0, $f2 +/* 11FB18 802B6508 E4CE0004 */ swc1 $f14, 4($a2) +/* 11FB1C 802B650C 460C8182 */ mul.s $f6, $f16, $f12 +/* 11FB20 802B6510 00000000 */ nop +/* 11FB24 802B6514 46028282 */ mul.s $f10, $f16, $f2 +/* 11FB28 802B6518 00000000 */ nop +/* 11FB2C 802B651C 460C0482 */ mul.s $f18, $f0, $f12 +/* 11FB30 802B6520 46062201 */ sub.s $f8, $f4, $f6 +/* 11FB34 802B6524 E4C80000 */ swc1 $f8, ($a2) +/* 11FB38 802B6528 46125100 */ add.s $f4, $f10, $f18 +/* 11FB3C 802B652C E4C40008 */ swc1 $f4, 8($a2) +/* 11FB40 802B6530 8FBF0014 */ lw $ra, 0x14($sp) +/* 11FB44 802B6534 27BD0030 */ addiu $sp, $sp, 0x30 +/* 11FB48 802B6538 03E00008 */ jr $ra +/* 11FB4C 802B653C 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B6540.s b/asm/non_matchings/math_util/func_802B6540.s new file mode 100644 index 000000000..ceb876ffe --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6540.s @@ -0,0 +1,249 @@ +glabel func_802B6540 +/* 11FB50 802B6540 27BDFF50 */ addiu $sp, $sp, -0xb0 +/* 11FB54 802B6544 AFB00020 */ sw $s0, 0x20($sp) +/* 11FB58 802B6548 00808025 */ move $s0, $a0 +/* 11FB5C 802B654C 97A400C2 */ lhu $a0, 0xc2($sp) +/* 11FB60 802B6550 AFBF0024 */ sw $ra, 0x24($sp) +/* 11FB64 802B6554 AFA500B4 */ sw $a1, 0xb4($sp) +/* 11FB68 802B6558 AFA600B8 */ sw $a2, 0xb8($sp) +/* 11FB6C 802B655C AFA700BC */ sw $a3, 0xbc($sp) +/* 11FB70 802B6560 0C0AE006 */ jal func_802B8018 +/* 11FB74 802B6564 AFA40038 */ sw $a0, 0x38($sp) +/* 11FB78 802B6568 8FA40038 */ lw $a0, 0x38($sp) +/* 11FB7C 802B656C 0C0AE00E */ jal func_802B8038 +/* 11FB80 802B6570 E7A00040 */ swc1 $f0, 0x40($sp) +/* 11FB84 802B6574 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11FB88 802B6578 44816000 */ mtc1 $at, $f12 +/* 11FB8C 802B657C C7A600B8 */ lwc1 $f6, 0xb8($sp) +/* 11FB90 802B6580 44807000 */ mtc1 $zero, $f14 +/* 11FB94 802B6584 C7A20040 */ lwc1 $f2, 0x40($sp) +/* 11FB98 802B6588 460C3032 */ c.eq.s $f6, $f12 +/* 11FB9C 802B658C E7A0008C */ swc1 $f0, 0x8c($sp) +/* 11FBA0 802B6590 46001107 */ neg.s $f4, $f2 +/* 11FBA4 802B6594 E7A000AC */ swc1 $f0, 0xac($sp) +/* 11FBA8 802B6598 E7A40094 */ swc1 $f4, 0x94($sp) +/* 11FBAC 802B659C E7AC009C */ swc1 $f12, 0x9c($sp) +/* 11FBB0 802B65A0 E7AE00A8 */ swc1 $f14, 0xa8($sp) +/* 11FBB4 802B65A4 E7AE00A0 */ swc1 $f14, 0xa0($sp) +/* 11FBB8 802B65A8 E7A200A4 */ swc1 $f2, 0xa4($sp) +/* 11FBBC 802B65AC E7AE0098 */ swc1 $f14, 0x98($sp) +/* 11FBC0 802B65B0 45000018 */ bc1f .L802B6614 +/* 11FBC4 802B65B4 E7AE0090 */ swc1 $f14, 0x90($sp) +/* 11FBC8 802B65B8 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11FBCC 802B65BC 44810000 */ mtc1 $at, $f0 +/* 11FBD0 802B65C0 44801000 */ mtc1 $zero, $f2 +/* 11FBD4 802B65C4 00002025 */ move $a0, $zero +/* 11FBD8 802B65C8 27A70068 */ addiu $a3, $sp, 0x68 +/* 11FBDC 802B65CC 24090003 */ li $t1, 3 +/* 11FBE0 802B65D0 2406000C */ li $a2, 12 +.L802B65D4: +/* 11FBE4 802B65D4 00042880 */ sll $a1, $a0, 2 +/* 11FBE8 802B65D8 00001025 */ move $v0, $zero +/* 11FBEC 802B65DC 00E01825 */ move $v1, $a3 +.L802B65E0: +/* 11FBF0 802B65E0 54A20004 */ bnel $a1, $v0, .L802B65F4 +/* 11FBF4 802B65E4 E4620000 */ swc1 $f2, ($v1) +/* 11FBF8 802B65E8 10000002 */ b .L802B65F4 +/* 11FBFC 802B65EC E4600000 */ swc1 $f0, ($v1) +/* 11FC00 802B65F0 E4620000 */ swc1 $f2, ($v1) +.L802B65F4: +/* 11FC04 802B65F4 24420004 */ addiu $v0, $v0, 4 +/* 11FC08 802B65F8 1446FFF9 */ bne $v0, $a2, .L802B65E0 +/* 11FC0C 802B65FC 24630004 */ addiu $v1, $v1, 4 +/* 11FC10 802B6600 24840001 */ addiu $a0, $a0, 1 +/* 11FC14 802B6604 1489FFF3 */ bne $a0, $t1, .L802B65D4 +/* 11FC18 802B6608 24E7000C */ addiu $a3, $a3, 0xc +/* 11FC1C 802B660C 10000041 */ b .L802B6714 +/* 11FC20 802B6610 C7AA008C */ lwc1 $f10, 0x8c($sp) +.L802B6614: +/* 11FC24 802B6614 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +/* 11FC28 802B6618 44816000 */ mtc1 $at, $f12 +/* 11FC2C 802B661C C7A800B8 */ lwc1 $f8, 0xb8($sp) +/* 11FC30 802B6620 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11FC34 802B6624 00002025 */ move $a0, $zero +/* 11FC38 802B6628 460C4032 */ c.eq.s $f8, $f12 +/* 11FC3C 802B662C 27A70068 */ addiu $a3, $sp, 0x68 +/* 11FC40 802B6630 24090003 */ li $t1, 3 +/* 11FC44 802B6634 45000014 */ bc1f .L802B6688 +/* 11FC48 802B6638 00000000 */ nop +/* 11FC4C 802B663C 44801000 */ mtc1 $zero, $f2 +/* 11FC50 802B6640 44810000 */ mtc1 $at, $f0 +/* 11FC54 802B6644 2406000C */ li $a2, 12 +.L802B6648: +/* 11FC58 802B6648 00001025 */ move $v0, $zero +/* 11FC5C 802B664C 00E01825 */ move $v1, $a3 +/* 11FC60 802B6650 00042880 */ sll $a1, $a0, 2 +.L802B6654: +/* 11FC64 802B6654 54A20004 */ bnel $a1, $v0, .L802B6668 +/* 11FC68 802B6658 E4620000 */ swc1 $f2, ($v1) +/* 11FC6C 802B665C 10000002 */ b .L802B6668 +/* 11FC70 802B6660 E4600000 */ swc1 $f0, ($v1) +/* 11FC74 802B6664 E4620000 */ swc1 $f2, ($v1) +.L802B6668: +/* 11FC78 802B6668 24420004 */ addiu $v0, $v0, 4 +/* 11FC7C 802B666C 1446FFF9 */ bne $v0, $a2, .L802B6654 +/* 11FC80 802B6670 24630004 */ addiu $v1, $v1, 4 +/* 11FC84 802B6674 24840001 */ addiu $a0, $a0, 1 +/* 11FC88 802B6678 1489FFF3 */ bne $a0, $t1, .L802B6648 +/* 11FC8C 802B667C 24E7000C */ addiu $a3, $a3, 0xc +/* 11FC90 802B6680 10000023 */ b .L802B6710 +/* 11FC94 802B6684 E7AC0078 */ swc1 $f12, 0x78($sp) +.L802B6688: +/* 11FC98 802B6688 0C0ADF3A */ jal func_802B7CE8 +/* 11FC9C 802B668C C7AC00B8 */ lwc1 $f12, 0xb8($sp) +/* 11FCA0 802B6690 3C014334 */ li $at, 0x43340000 # 180.000000 +/* 11FCA4 802B6694 44815000 */ mtc1 $at, $f10 +/* 11FCA8 802B6698 3C01802C */ lui $at, %hi(D_802B9FB8) +/* 11FCAC 802B669C D4269FB8 */ ldc1 $f6, %lo(D_802B9FB8)($at) +/* 11FCB0 802B66A0 460A0482 */ mul.s $f18, $f0, $f10 +/* 11FCB4 802B66A4 C7AC00B4 */ lwc1 $f12, 0xb4($sp) +/* 11FCB8 802B66A8 3C01802C */ lui $at, %hi(D_802B9FC0) +/* 11FCBC 802B66AC D42A9FC0 */ ldc1 $f10, %lo(D_802B9FC0)($at) +/* 11FCC0 802B66B0 C7B000BC */ lwc1 $f16, 0xbc($sp) +/* 11FCC4 802B66B4 44807000 */ mtc1 $zero, $f14 +/* 11FCC8 802B66B8 27A40068 */ addiu $a0, $sp, 0x68 +/* 11FCCC 802B66BC 46009121 */ cvt.d.s $f4, $f18 +/* 11FCD0 802B66C0 44077000 */ mfc1 $a3, $f14 +/* 11FCD4 802B66C4 46262203 */ div.d $f8, $f4, $f6 +/* 11FCD8 802B66C8 460C6182 */ mul.s $f6, $f12, $f12 +/* 11FCDC 802B66CC 46285481 */ sub.d $f18, $f10, $f8 +/* 11FCE0 802B66D0 46108282 */ mul.s $f10, $f16, $f16 +/* 11FCE4 802B66D4 46209107 */ neg.d $f4, $f18 +/* 11FCE8 802B66D8 46008487 */ neg.s $f18, $f16 +/* 11FCEC 802B66DC 462020A0 */ cvt.s.d $f2, $f4 +/* 11FCF0 802B66E0 460A3000 */ add.s $f0, $f6, $f10 +/* 11FCF4 802B66E4 4600120D */ trunc.w.s $f8, $f2 +/* 11FCF8 802B66E8 46000004 */ sqrt.s $f0, $f0 +/* 11FCFC 802B66EC 44054000 */ mfc1 $a1, $f8 +/* 11FD00 802B66F0 00000000 */ nop +/* 11FD04 802B66F4 00057C00 */ sll $t7, $a1, 0x10 +/* 11FD08 802B66F8 000F2C03 */ sra $a1, $t7, 0x10 +/* 11FD0C 802B66FC 46009103 */ div.s $f4, $f18, $f0 +/* 11FD10 802B6700 46006183 */ div.s $f6, $f12, $f0 +/* 11FD14 802B6704 44062000 */ mfc1 $a2, $f4 +/* 11FD18 802B6708 0C0ADAA1 */ jal func_802B6A84 +/* 11FD1C 802B670C E7A60010 */ swc1 $f6, 0x10($sp) +.L802B6710: +/* 11FD20 802B6710 C7AA008C */ lwc1 $f10, 0x8c($sp) +.L802B6714: +/* 11FD24 802B6714 C7A80068 */ lwc1 $f8, 0x68($sp) +/* 11FD28 802B6718 C7A40090 */ lwc1 $f4, 0x90($sp) +/* 11FD2C 802B671C C7A60074 */ lwc1 $f6, 0x74($sp) +/* 11FD30 802B6720 46085482 */ mul.s $f18, $f10, $f8 +/* 11FD34 802B6724 00000000 */ nop +/* 11FD38 802B6728 46062282 */ mul.s $f10, $f4, $f6 +/* 11FD3C 802B672C C7A60094 */ lwc1 $f6, 0x94($sp) +/* 11FD40 802B6730 C7A40080 */ lwc1 $f4, 0x80($sp) +/* 11FD44 802B6734 460A9200 */ add.s $f8, $f18, $f10 +/* 11FD48 802B6738 46062482 */ mul.s $f18, $f4, $f6 +/* 11FD4C 802B673C 46089280 */ add.s $f10, $f18, $f8 +/* 11FD50 802B6740 E60A0000 */ swc1 $f10, ($s0) +/* 11FD54 802B6744 C7A40098 */ lwc1 $f4, 0x98($sp) +/* 11FD58 802B6748 C7A60068 */ lwc1 $f6, 0x68($sp) +/* 11FD5C 802B674C C7A8009C */ lwc1 $f8, 0x9c($sp) +/* 11FD60 802B6750 C7AA0074 */ lwc1 $f10, 0x74($sp) +/* 11FD64 802B6754 46062482 */ mul.s $f18, $f4, $f6 +/* 11FD68 802B6758 00000000 */ nop +/* 11FD6C 802B675C 460A4102 */ mul.s $f4, $f8, $f10 +/* 11FD70 802B6760 C7AA00A0 */ lwc1 $f10, 0xa0($sp) +/* 11FD74 802B6764 C7A80080 */ lwc1 $f8, 0x80($sp) +/* 11FD78 802B6768 46049180 */ add.s $f6, $f18, $f4 +/* 11FD7C 802B676C 460A4482 */ mul.s $f18, $f8, $f10 +/* 11FD80 802B6770 46069100 */ add.s $f4, $f18, $f6 +/* 11FD84 802B6774 E604000C */ swc1 $f4, 0xc($s0) +/* 11FD88 802B6778 C7A800A4 */ lwc1 $f8, 0xa4($sp) +/* 11FD8C 802B677C C7AA0068 */ lwc1 $f10, 0x68($sp) +/* 11FD90 802B6780 C7A600A8 */ lwc1 $f6, 0xa8($sp) +/* 11FD94 802B6784 C7A40074 */ lwc1 $f4, 0x74($sp) +/* 11FD98 802B6788 460A4482 */ mul.s $f18, $f8, $f10 +/* 11FD9C 802B678C 00000000 */ nop +/* 11FDA0 802B6790 46043202 */ mul.s $f8, $f6, $f4 +/* 11FDA4 802B6794 C7A400AC */ lwc1 $f4, 0xac($sp) +/* 11FDA8 802B6798 C7A60080 */ lwc1 $f6, 0x80($sp) +/* 11FDAC 802B679C 46089280 */ add.s $f10, $f18, $f8 +/* 11FDB0 802B67A0 46043482 */ mul.s $f18, $f6, $f4 +/* 11FDB4 802B67A4 460A9200 */ add.s $f8, $f18, $f10 +/* 11FDB8 802B67A8 E6080018 */ swc1 $f8, 0x18($s0) +/* 11FDBC 802B67AC C7A6008C */ lwc1 $f6, 0x8c($sp) +/* 11FDC0 802B67B0 C7A4006C */ lwc1 $f4, 0x6c($sp) +/* 11FDC4 802B67B4 C7AA0090 */ lwc1 $f10, 0x90($sp) +/* 11FDC8 802B67B8 C7A80078 */ lwc1 $f8, 0x78($sp) +/* 11FDCC 802B67BC 46043482 */ mul.s $f18, $f6, $f4 +/* 11FDD0 802B67C0 00000000 */ nop +/* 11FDD4 802B67C4 46085182 */ mul.s $f6, $f10, $f8 +/* 11FDD8 802B67C8 C7A80094 */ lwc1 $f8, 0x94($sp) +/* 11FDDC 802B67CC C7AA0084 */ lwc1 $f10, 0x84($sp) +/* 11FDE0 802B67D0 46069100 */ add.s $f4, $f18, $f6 +/* 11FDE4 802B67D4 46085482 */ mul.s $f18, $f10, $f8 +/* 11FDE8 802B67D8 46049180 */ add.s $f6, $f18, $f4 +/* 11FDEC 802B67DC E6060004 */ swc1 $f6, 4($s0) +/* 11FDF0 802B67E0 C7AA0098 */ lwc1 $f10, 0x98($sp) +/* 11FDF4 802B67E4 C7A8006C */ lwc1 $f8, 0x6c($sp) +/* 11FDF8 802B67E8 C7A4009C */ lwc1 $f4, 0x9c($sp) +/* 11FDFC 802B67EC C7A60078 */ lwc1 $f6, 0x78($sp) +/* 11FE00 802B67F0 46085482 */ mul.s $f18, $f10, $f8 +/* 11FE04 802B67F4 00000000 */ nop +/* 11FE08 802B67F8 46062282 */ mul.s $f10, $f4, $f6 +/* 11FE0C 802B67FC C7A600A0 */ lwc1 $f6, 0xa0($sp) +/* 11FE10 802B6800 C7A40084 */ lwc1 $f4, 0x84($sp) +/* 11FE14 802B6804 460A9200 */ add.s $f8, $f18, $f10 +/* 11FE18 802B6808 46062482 */ mul.s $f18, $f4, $f6 +/* 11FE1C 802B680C 46089280 */ add.s $f10, $f18, $f8 +/* 11FE20 802B6810 E60A0010 */ swc1 $f10, 0x10($s0) +/* 11FE24 802B6814 C7A400A4 */ lwc1 $f4, 0xa4($sp) +/* 11FE28 802B6818 C7A6006C */ lwc1 $f6, 0x6c($sp) +/* 11FE2C 802B681C C7A800A8 */ lwc1 $f8, 0xa8($sp) +/* 11FE30 802B6820 C7AA0078 */ lwc1 $f10, 0x78($sp) +/* 11FE34 802B6824 46062482 */ mul.s $f18, $f4, $f6 +/* 11FE38 802B6828 00000000 */ nop +/* 11FE3C 802B682C 460A4102 */ mul.s $f4, $f8, $f10 +/* 11FE40 802B6830 C7AA00AC */ lwc1 $f10, 0xac($sp) +/* 11FE44 802B6834 C7A80084 */ lwc1 $f8, 0x84($sp) +/* 11FE48 802B6838 46049180 */ add.s $f6, $f18, $f4 +/* 11FE4C 802B683C 460A4482 */ mul.s $f18, $f8, $f10 +/* 11FE50 802B6840 46069100 */ add.s $f4, $f18, $f6 +/* 11FE54 802B6844 E604001C */ swc1 $f4, 0x1c($s0) +/* 11FE58 802B6848 C7AA0070 */ lwc1 $f10, 0x70($sp) +/* 11FE5C 802B684C C7A8008C */ lwc1 $f8, 0x8c($sp) +/* 11FE60 802B6850 C7A4007C */ lwc1 $f4, 0x7c($sp) +/* 11FE64 802B6854 C7A60090 */ lwc1 $f6, 0x90($sp) +/* 11FE68 802B6858 460A4482 */ mul.s $f18, $f8, $f10 +/* 11FE6C 802B685C 00000000 */ nop +/* 11FE70 802B6860 46043202 */ mul.s $f8, $f6, $f4 +/* 11FE74 802B6864 C7A40094 */ lwc1 $f4, 0x94($sp) +/* 11FE78 802B6868 C7A60088 */ lwc1 $f6, 0x88($sp) +/* 11FE7C 802B686C 46089280 */ add.s $f10, $f18, $f8 +/* 11FE80 802B6870 46043482 */ mul.s $f18, $f6, $f4 +/* 11FE84 802B6874 460A9200 */ add.s $f8, $f18, $f10 +/* 11FE88 802B6878 E6080008 */ swc1 $f8, 8($s0) +/* 11FE8C 802B687C C7A40070 */ lwc1 $f4, 0x70($sp) +/* 11FE90 802B6880 C7A60098 */ lwc1 $f6, 0x98($sp) +/* 11FE94 802B6884 C7A8007C */ lwc1 $f8, 0x7c($sp) +/* 11FE98 802B6888 C7AA009C */ lwc1 $f10, 0x9c($sp) +/* 11FE9C 802B688C 46043482 */ mul.s $f18, $f6, $f4 +/* 11FEA0 802B6890 00000000 */ nop +/* 11FEA4 802B6894 46085182 */ mul.s $f6, $f10, $f8 +/* 11FEA8 802B6898 C7A800A0 */ lwc1 $f8, 0xa0($sp) +/* 11FEAC 802B689C C7AA0088 */ lwc1 $f10, 0x88($sp) +/* 11FEB0 802B68A0 46069100 */ add.s $f4, $f18, $f6 +/* 11FEB4 802B68A4 46085482 */ mul.s $f18, $f10, $f8 +/* 11FEB8 802B68A8 46049180 */ add.s $f6, $f18, $f4 +/* 11FEBC 802B68AC E6060014 */ swc1 $f6, 0x14($s0) +/* 11FEC0 802B68B0 C7A80070 */ lwc1 $f8, 0x70($sp) +/* 11FEC4 802B68B4 C7AA00A4 */ lwc1 $f10, 0xa4($sp) +/* 11FEC8 802B68B8 C7A6007C */ lwc1 $f6, 0x7c($sp) +/* 11FECC 802B68BC C7A400A8 */ lwc1 $f4, 0xa8($sp) +/* 11FED0 802B68C0 46085482 */ mul.s $f18, $f10, $f8 +/* 11FED4 802B68C4 00000000 */ nop +/* 11FED8 802B68C8 46062282 */ mul.s $f10, $f4, $f6 +/* 11FEDC 802B68CC C7A600AC */ lwc1 $f6, 0xac($sp) +/* 11FEE0 802B68D0 C7A40088 */ lwc1 $f4, 0x88($sp) +/* 11FEE4 802B68D4 460A9200 */ add.s $f8, $f18, $f10 +/* 11FEE8 802B68D8 46062482 */ mul.s $f18, $f4, $f6 +/* 11FEEC 802B68DC 46089280 */ add.s $f10, $f18, $f8 +/* 11FEF0 802B68E0 E60A0020 */ swc1 $f10, 0x20($s0) +/* 11FEF4 802B68E4 8FBF0024 */ lw $ra, 0x24($sp) +/* 11FEF8 802B68E8 8FB00020 */ lw $s0, 0x20($sp) +/* 11FEFC 802B68EC 27BD00B0 */ addiu $sp, $sp, 0xb0 +/* 11FF00 802B68F0 03E00008 */ jr $ra +/* 11FF04 802B68F4 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B68F8.s b/asm/non_matchings/math_util/func_802B68F8.s new file mode 100644 index 000000000..e4e14df19 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B68F8.s @@ -0,0 +1,110 @@ +glabel func_802B68F8 +/* 11FF08 802B68F8 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11FF0C 802B68FC 44866000 */ mtc1 $a2, $f12 +/* 11FF10 802B6900 44812000 */ mtc1 $at, $f4 +/* 11FF14 802B6904 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 11FF18 802B6908 44857000 */ mtc1 $a1, $f14 +/* 11FF1C 802B690C 46046032 */ c.eq.s $f12, $f4 +/* 11FF20 802B6910 AFBF001C */ sw $ra, 0x1c($sp) +/* 11FF24 802B6914 AFA40020 */ sw $a0, 0x20($sp) +/* 11FF28 802B6918 AFA7002C */ sw $a3, 0x2c($sp) +/* 11FF2C 802B691C 45000018 */ bc1f .L802B6980 +/* 11FF30 802B6920 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +/* 11FF34 802B6924 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11FF38 802B6928 44810000 */ mtc1 $at, $f0 +/* 11FF3C 802B692C 44801000 */ mtc1 $zero, $f2 +/* 11FF40 802B6930 00002025 */ move $a0, $zero +/* 11FF44 802B6934 8FA70020 */ lw $a3, 0x20($sp) +/* 11FF48 802B6938 24090003 */ li $t1, 3 +/* 11FF4C 802B693C 2406000C */ li $a2, 12 +.L802B6940: +/* 11FF50 802B6940 00042880 */ sll $a1, $a0, 2 +/* 11FF54 802B6944 00001025 */ move $v0, $zero +/* 11FF58 802B6948 00E01825 */ move $v1, $a3 +.L802B694C: +/* 11FF5C 802B694C 54A20004 */ bnel $a1, $v0, .L802B6960 +/* 11FF60 802B6950 E4620000 */ swc1 $f2, ($v1) +/* 11FF64 802B6954 10000002 */ b .L802B6960 +/* 11FF68 802B6958 E4600000 */ swc1 $f0, ($v1) +/* 11FF6C 802B695C E4620000 */ swc1 $f2, ($v1) +.L802B6960: +/* 11FF70 802B6960 24420004 */ addiu $v0, $v0, 4 +/* 11FF74 802B6964 1446FFF9 */ bne $v0, $a2, .L802B694C +/* 11FF78 802B6968 24630004 */ addiu $v1, $v1, 4 +/* 11FF7C 802B696C 24840001 */ addiu $a0, $a0, 1 +/* 11FF80 802B6970 1489FFF3 */ bne $a0, $t1, .L802B6940 +/* 11FF84 802B6974 24E7000C */ addiu $a3, $a3, 0xc +/* 11FF88 802B6978 1000003F */ b .L802B6A78 +/* 11FF8C 802B697C 8FBF001C */ lw $ra, 0x1c($sp) +.L802B6980: +/* 11FF90 802B6980 44818000 */ mtc1 $at, $f16 +/* 11FF94 802B6984 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 11FF98 802B6988 00002025 */ move $a0, $zero +/* 11FF9C 802B698C 46106032 */ c.eq.s $f12, $f16 +/* 11FFA0 802B6990 8FA70020 */ lw $a3, 0x20($sp) +/* 11FFA4 802B6994 24090003 */ li $t1, 3 +/* 11FFA8 802B6998 45000015 */ bc1f .L802B69F0 +/* 11FFAC 802B699C 00000000 */ nop +/* 11FFB0 802B69A0 44801000 */ mtc1 $zero, $f2 +/* 11FFB4 802B69A4 44810000 */ mtc1 $at, $f0 +/* 11FFB8 802B69A8 2406000C */ li $a2, 12 +.L802B69AC: +/* 11FFBC 802B69AC 00001025 */ move $v0, $zero +/* 11FFC0 802B69B0 00E01825 */ move $v1, $a3 +/* 11FFC4 802B69B4 00042880 */ sll $a1, $a0, 2 +.L802B69B8: +/* 11FFC8 802B69B8 54A20004 */ bnel $a1, $v0, .L802B69CC +/* 11FFCC 802B69BC E4620000 */ swc1 $f2, ($v1) +/* 11FFD0 802B69C0 10000002 */ b .L802B69CC +/* 11FFD4 802B69C4 E4600000 */ swc1 $f0, ($v1) +/* 11FFD8 802B69C8 E4620000 */ swc1 $f2, ($v1) +.L802B69CC: +/* 11FFDC 802B69CC 24420004 */ addiu $v0, $v0, 4 +/* 11FFE0 802B69D0 1446FFF9 */ bne $v0, $a2, .L802B69B8 +/* 11FFE4 802B69D4 24630004 */ addiu $v1, $v1, 4 +/* 11FFE8 802B69D8 24840001 */ addiu $a0, $a0, 1 +/* 11FFEC 802B69DC 1489FFF3 */ bne $a0, $t1, .L802B69AC +/* 11FFF0 802B69E0 24E7000C */ addiu $a3, $a3, 0xc +/* 11FFF4 802B69E4 8FAE0020 */ lw $t6, 0x20($sp) +/* 11FFF8 802B69E8 10000022 */ b .L802B6A74 +/* 11FFFC 802B69EC E5D00010 */ swc1 $f16, 0x10($t6) +.L802B69F0: +/* 120000 802B69F0 0C0ADF3A */ jal func_802B7CE8 +/* 120004 802B69F4 E7AE0024 */ swc1 $f14, 0x24($sp) +/* 120008 802B69F8 3C014334 */ li $at, 0x43340000 # 180.000000 +/* 12000C 802B69FC 44813000 */ mtc1 $at, $f6 +/* 120010 802B6A00 3C01802C */ lui $at, %hi(D_802B9FC8) +/* 120014 802B6A04 D4329FC8 */ ldc1 $f18, %lo(D_802B9FC8)($at) +/* 120018 802B6A08 46060202 */ mul.s $f8, $f0, $f6 +/* 12001C 802B6A0C C7AE0024 */ lwc1 $f14, 0x24($sp) +/* 120020 802B6A10 3C01802C */ lui $at, %hi(D_802B9FD0) +/* 120024 802B6A14 D4269FD0 */ ldc1 $f6, %lo(D_802B9FD0)($at) +/* 120028 802B6A18 C7AC002C */ lwc1 $f12, 0x2c($sp) +/* 12002C 802B6A1C 8FA40020 */ lw $a0, 0x20($sp) +/* 120030 802B6A20 24070000 */ li $a3, 0 +/* 120034 802B6A24 460042A1 */ cvt.d.s $f10, $f8 +/* 120038 802B6A28 46325103 */ div.d $f4, $f10, $f18 +/* 12003C 802B6A2C 460E7482 */ mul.s $f18, $f14, $f14 +/* 120040 802B6A30 46243201 */ sub.d $f8, $f6, $f4 +/* 120044 802B6A34 460C6182 */ mul.s $f6, $f12, $f12 +/* 120048 802B6A38 46204287 */ neg.d $f10, $f8 +/* 12004C 802B6A3C 46006207 */ neg.s $f8, $f12 +/* 120050 802B6A40 462050A0 */ cvt.s.d $f2, $f10 +/* 120054 802B6A44 46069000 */ add.s $f0, $f18, $f6 +/* 120058 802B6A48 4600110D */ trunc.w.s $f4, $f2 +/* 12005C 802B6A4C 46000004 */ sqrt.s $f0, $f0 +/* 120060 802B6A50 44052000 */ mfc1 $a1, $f4 +/* 120064 802B6A54 00000000 */ nop +/* 120068 802B6A58 0005C400 */ sll $t8, $a1, 0x10 +/* 12006C 802B6A5C 00182C03 */ sra $a1, $t8, 0x10 +/* 120070 802B6A60 46004283 */ div.s $f10, $f8, $f0 +/* 120074 802B6A64 46007483 */ div.s $f18, $f14, $f0 +/* 120078 802B6A68 44065000 */ mfc1 $a2, $f10 +/* 12007C 802B6A6C 0C0ADAA1 */ jal func_802B6A84 +/* 120080 802B6A70 E7B20010 */ swc1 $f18, 0x10($sp) +.L802B6A74: +/* 120084 802B6A74 8FBF001C */ lw $ra, 0x1c($sp) +.L802B6A78: +/* 120088 802B6A78 27BD0020 */ addiu $sp, $sp, 0x20 +/* 12008C 802B6A7C 03E00008 */ jr $ra +/* 120090 802B6A80 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B6A84.s b/asm/non_matchings/math_util/func_802B6A84.s new file mode 100644 index 000000000..2683f448e --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6A84.s @@ -0,0 +1,80 @@ +glabel func_802B6A84 +/* 120094 802B6A84 27BDFFA8 */ addiu $sp, $sp, -0x58 +/* 120098 802B6A88 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 12009C 802B6A8C 4486A000 */ mtc1 $a2, $f20 +/* 1200A0 802B6A90 00803025 */ move $a2, $a0 +/* 1200A4 802B6A94 F7B60018 */ sdc1 $f22, 0x18($sp) +/* 1200A8 802B6A98 AFA40058 */ sw $a0, 0x58($sp) +/* 1200AC 802B6A9C 4487B000 */ mtc1 $a3, $f22 +/* 1200B0 802B6AA0 AFBF0024 */ sw $ra, 0x24($sp) +/* 1200B4 802B6AA4 30A4FFFF */ andi $a0, $a1, 0xffff +/* 1200B8 802B6AA8 AFA5005C */ sw $a1, 0x5c($sp) +/* 1200BC 802B6AAC AFA40034 */ sw $a0, 0x34($sp) +/* 1200C0 802B6AB0 0C0AE006 */ jal func_802B8018 +/* 1200C4 802B6AB4 AFA60058 */ sw $a2, 0x58($sp) +/* 1200C8 802B6AB8 8FA40034 */ lw $a0, 0x34($sp) +/* 1200CC 802B6ABC 0C0AE00E */ jal func_802B8038 +/* 1200D0 802B6AC0 E7A00054 */ swc1 $f0, 0x54($sp) +/* 1200D4 802B6AC4 4614A302 */ mul.s $f12, $f20, $f20 +/* 1200D8 802B6AC8 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 1200DC 802B6ACC 44812000 */ mtc1 $at, $f4 +/* 1200E0 802B6AD0 8FA60058 */ lw $a2, 0x58($sp) +/* 1200E4 802B6AD4 C7B20054 */ lwc1 $f18, 0x54($sp) +/* 1200E8 802B6AD8 460C2181 */ sub.s $f6, $f4, $f12 +/* 1200EC 802B6ADC 44812000 */ mtc1 $at, $f4 +/* 1200F0 802B6AE0 46003202 */ mul.s $f8, $f6, $f0 +/* 1200F4 802B6AE4 46002181 */ sub.s $f6, $f4, $f0 +/* 1200F8 802B6AE8 460C4280 */ add.s $f10, $f8, $f12 +/* 1200FC 802B6AEC E4CA0000 */ swc1 $f10, ($a2) +/* 120100 802B6AF0 C7A80068 */ lwc1 $f8, 0x68($sp) +/* 120104 802B6AF4 E7A60034 */ swc1 $f6, 0x34($sp) +/* 120108 802B6AF8 4608B282 */ mul.s $f10, $f22, $f8 +/* 12010C 802B6AFC 00000000 */ nop +/* 120110 802B6B00 46065082 */ mul.s $f2, $f10, $f6 +/* 120114 802B6B04 44815000 */ mtc1 $at, $f10 +/* 120118 802B6B08 4612A382 */ mul.s $f14, $f20, $f18 +/* 12011C 802B6B0C 00000000 */ nop +/* 120120 802B6B10 4616B402 */ mul.s $f16, $f22, $f22 +/* 120124 802B6B14 460E1101 */ sub.s $f4, $f2, $f14 +/* 120128 802B6B18 46105181 */ sub.s $f6, $f10, $f16 +/* 12012C 802B6B1C E4C4001C */ swc1 $f4, 0x1c($a2) +/* 120130 802B6B20 46027200 */ add.s $f8, $f14, $f2 +/* 120134 802B6B24 46003102 */ mul.s $f4, $f6, $f0 +/* 120138 802B6B28 E4C80014 */ swc1 $f8, 0x14($a2) +/* 12013C 802B6B2C 4612B282 */ mul.s $f10, $f22, $f18 +/* 120140 802B6B30 46102200 */ add.s $f8, $f4, $f16 +/* 120144 802B6B34 E4C80010 */ swc1 $f8, 0x10($a2) +/* 120148 802B6B38 C7A60068 */ lwc1 $f6, 0x68($sp) +/* 12014C 802B6B3C C7A80034 */ lwc1 $f8, 0x34($sp) +/* 120150 802B6B40 E7AA002C */ swc1 $f10, 0x2c($sp) +/* 120154 802B6B44 46143102 */ mul.s $f4, $f6, $f20 +/* 120158 802B6B48 C7A6002C */ lwc1 $f6, 0x2c($sp) +/* 12015C 802B6B4C 46082282 */ mul.s $f10, $f4, $f8 +/* 120160 802B6B50 460A3100 */ add.s $f4, $f6, $f10 +/* 120164 802B6B54 E7AA0030 */ swc1 $f10, 0x30($sp) +/* 120168 802B6B58 E4C40018 */ swc1 $f4, 0x18($a2) +/* 12016C 802B6B5C C7B00068 */ lwc1 $f16, 0x68($sp) +/* 120170 802B6B60 C7A6002C */ lwc1 $f6, 0x2c($sp) +/* 120174 802B6B64 C7A80030 */ lwc1 $f8, 0x30($sp) +/* 120178 802B6B68 46108302 */ mul.s $f12, $f16, $f16 +/* 12017C 802B6B6C 44812000 */ mtc1 $at, $f4 +/* 120180 802B6B70 46064281 */ sub.s $f10, $f8, $f6 +/* 120184 802B6B74 E4CA0008 */ swc1 $f10, 8($a2) +/* 120188 802B6B78 460C2201 */ sub.s $f8, $f4, $f12 +/* 12018C 802B6B7C 46004182 */ mul.s $f6, $f8, $f0 +/* 120190 802B6B80 460C3280 */ add.s $f10, $f6, $f12 +/* 120194 802B6B84 4616A102 */ mul.s $f4, $f20, $f22 +/* 120198 802B6B88 E4CA0020 */ swc1 $f10, 0x20($a2) +/* 12019C 802B6B8C C7A80034 */ lwc1 $f8, 0x34($sp) +/* 1201A0 802B6B90 46082082 */ mul.s $f2, $f4, $f8 +/* 1201A4 802B6B94 00000000 */ nop +/* 1201A8 802B6B98 46128382 */ mul.s $f14, $f16, $f18 +/* 1201AC 802B6B9C 460E1181 */ sub.s $f6, $f2, $f14 +/* 1201B0 802B6BA0 46027280 */ add.s $f10, $f14, $f2 +/* 1201B4 802B6BA4 E4C6000C */ swc1 $f6, 0xc($a2) +/* 1201B8 802B6BA8 E4CA0004 */ swc1 $f10, 4($a2) +/* 1201BC 802B6BAC 8FBF0024 */ lw $ra, 0x24($sp) +/* 1201C0 802B6BB0 D7B60018 */ ldc1 $f22, 0x18($sp) +/* 1201C4 802B6BB4 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 1201C8 802B6BB8 03E00008 */ jr $ra +/* 1201CC 802B6BBC 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/asm/non_matchings/math_util/func_802B6BC0.s b/asm/non_matchings/math_util/func_802B6BC0.s new file mode 100644 index 000000000..de6553179 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6BC0.s @@ -0,0 +1,105 @@ +glabel func_802B6BC0 +/* 1201D0 802B6BC0 27BDFFC0 */ addiu $sp, $sp, -0x40 +/* 1201D4 802B6BC4 44867000 */ mtc1 $a2, $f14 +/* 1201D8 802B6BC8 00803025 */ move $a2, $a0 +/* 1201DC 802B6BCC AFA40040 */ sw $a0, 0x40($sp) +/* 1201E0 802B6BD0 AFBF001C */ sw $ra, 0x1c($sp) +/* 1201E4 802B6BD4 30A4FFFF */ andi $a0, $a1, 0xffff +/* 1201E8 802B6BD8 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 1201EC 802B6BDC AFA50044 */ sw $a1, 0x44($sp) +/* 1201F0 802B6BE0 AFA7004C */ sw $a3, 0x4c($sp) +/* 1201F4 802B6BE4 AFA4002C */ sw $a0, 0x2c($sp) +/* 1201F8 802B6BE8 AFA60040 */ sw $a2, 0x40($sp) +/* 1201FC 802B6BEC 0C0AE006 */ jal func_802B8018 +/* 120200 802B6BF0 E7AE0048 */ swc1 $f14, 0x48($sp) +/* 120204 802B6BF4 8FA4002C */ lw $a0, 0x2c($sp) +/* 120208 802B6BF8 0C0AE00E */ jal func_802B8038 +/* 12020C 802B6BFC E7A0003C */ swc1 $f0, 0x3c($sp) +/* 120210 802B6C00 C7AE0048 */ lwc1 $f14, 0x48($sp) +/* 120214 802B6C04 C7B40050 */ lwc1 $f20, 0x50($sp) +/* 120218 802B6C08 46000486 */ mov.s $f18, $f0 +/* 12021C 802B6C0C 460E7102 */ mul.s $f4, $f14, $f14 +/* 120220 802B6C10 44801000 */ mtc1 $zero, $f2 +/* 120224 802B6C14 8FA60040 */ lw $a2, 0x40($sp) +/* 120228 802B6C18 4614A182 */ mul.s $f6, $f20, $f20 +/* 12022C 802B6C1C C7B0003C */ lwc1 $f16, 0x3c($sp) +/* 120230 802B6C20 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 120234 802B6C24 46062000 */ add.s $f0, $f4, $f6 +/* 120238 802B6C28 46000004 */ sqrt.s $f0, $f0 +/* 12023C 802B6C2C 46020032 */ c.eq.s $f0, $f2 +/* 120240 802B6C30 00000000 */ nop +/* 120244 802B6C34 45030039 */ bc1tl .L802B6D1C +/* 120248 802B6C38 44810000 */ mtc1 $at, $f0 +/* 12024C 802B6C3C 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 120250 802B6C40 44814000 */ mtc1 $at, $f8 +/* 120254 802B6C44 C7A4004C */ lwc1 $f4, 0x4c($sp) +/* 120258 802B6C48 4600A287 */ neg.s $f10, $f20 +/* 12025C 802B6C4C 46004303 */ div.s $f12, $f8, $f0 +/* 120260 802B6C50 E7AA002C */ swc1 $f10, 0x2c($sp) +/* 120264 802B6C54 C7A8002C */ lwc1 $f8, 0x2c($sp) +/* 120268 802B6C58 46048182 */ mul.s $f6, $f16, $f4 +/* 12026C 802B6C5C E7A60028 */ swc1 $f6, 0x28($sp) +/* 120270 802B6C60 C7A40028 */ lwc1 $f4, 0x28($sp) +/* 120274 802B6C64 46124282 */ mul.s $f10, $f8, $f18 +/* 120278 802B6C68 E7AC0030 */ swc1 $f12, 0x30($sp) +/* 12027C 802B6C6C 460E2182 */ mul.s $f6, $f4, $f14 +/* 120280 802B6C70 46065201 */ sub.s $f8, $f10, $f6 +/* 120284 802B6C74 460C4102 */ mul.s $f4, $f8, $f12 +/* 120288 802B6C78 E4C40000 */ swc1 $f4, ($a2) +/* 12028C 802B6C7C C7AA004C */ lwc1 $f10, 0x4c($sp) +/* 120290 802B6C80 460A9182 */ mul.s $f6, $f18, $f10 +/* 120294 802B6C84 E7A60024 */ swc1 $f6, 0x24($sp) +/* 120298 802B6C88 4610A202 */ mul.s $f8, $f20, $f16 +/* 12029C 802B6C8C C7A40024 */ lwc1 $f4, 0x24($sp) +/* 1202A0 802B6C90 460E2282 */ mul.s $f10, $f4, $f14 +/* 1202A4 802B6C94 460A4181 */ sub.s $f6, $f8, $f10 +/* 1202A8 802B6C98 46007207 */ neg.s $f8, $f14 +/* 1202AC 802B6C9C 460C3102 */ mul.s $f4, $f6, $f12 +/* 1202B0 802B6CA0 E4C80018 */ swc1 $f8, 0x18($a2) +/* 1202B4 802B6CA4 46008282 */ mul.s $f10, $f16, $f0 +/* 1202B8 802B6CA8 00000000 */ nop +/* 1202BC 802B6CAC 46009182 */ mul.s $f6, $f18, $f0 +/* 1202C0 802B6CB0 E4C4000C */ swc1 $f4, 0xc($a2) +/* 1202C4 802B6CB4 E4CA0004 */ swc1 $f10, 4($a2) +/* 1202C8 802B6CB8 460E9282 */ mul.s $f10, $f18, $f14 +/* 1202CC 802B6CBC E4C60010 */ swc1 $f6, 0x10($a2) +/* 1202D0 802B6CC0 C7A4004C */ lwc1 $f4, 0x4c($sp) +/* 1202D4 802B6CC4 C7A00030 */ lwc1 $f0, 0x30($sp) +/* 1202D8 802B6CC8 46002207 */ neg.s $f8, $f4 +/* 1202DC 802B6CCC E4C8001C */ swc1 $f8, 0x1c($a2) +/* 1202E0 802B6CD0 C7A60028 */ lwc1 $f6, 0x28($sp) +/* 1202E4 802B6CD4 46143102 */ mul.s $f4, $f6, $f20 +/* 1202E8 802B6CD8 46045201 */ sub.s $f8, $f10, $f4 +/* 1202EC 802B6CDC 46008287 */ neg.s $f10, $f16 +/* 1202F0 802B6CE0 46004182 */ mul.s $f6, $f8, $f0 +/* 1202F4 802B6CE4 E4C60008 */ swc1 $f6, 8($a2) +/* 1202F8 802B6CE8 460E5102 */ mul.s $f4, $f10, $f14 +/* 1202FC 802B6CEC C7A80024 */ lwc1 $f8, 0x24($sp) +/* 120300 802B6CF0 46144182 */ mul.s $f6, $f8, $f20 +/* 120304 802B6CF4 46062281 */ sub.s $f10, $f4, $f6 +/* 120308 802B6CF8 46005202 */ mul.s $f8, $f10, $f0 +/* 12030C 802B6CFC E4C80014 */ swc1 $f8, 0x14($a2) +/* 120310 802B6D00 C7A4002C */ lwc1 $f4, 0x2c($sp) +/* 120314 802B6D04 E4C2000C */ swc1 $f2, 0xc($a2) +/* 120318 802B6D08 E4C20018 */ swc1 $f2, 0x18($a2) +/* 12031C 802B6D0C E4C20024 */ swc1 $f2, 0x24($a2) +/* 120320 802B6D10 1000000C */ b .L802B6D44 +/* 120324 802B6D14 E4C40020 */ swc1 $f4, 0x20($a2) +/* 120328 802B6D18 44810000 */ mtc1 $at, $f0 +.L802B6D1C: +/* 12032C 802B6D1C E4C20004 */ swc1 $f2, 4($a2) +/* 120330 802B6D20 E4C2001C */ swc1 $f2, 0x1c($a2) +/* 120334 802B6D24 E4C20008 */ swc1 $f2, 8($a2) +/* 120338 802B6D28 E4C20014 */ swc1 $f2, 0x14($a2) +/* 12033C 802B6D2C E4C2000C */ swc1 $f2, 0xc($a2) +/* 120340 802B6D30 E4C20018 */ swc1 $f2, 0x18($a2) +/* 120344 802B6D34 E4C20024 */ swc1 $f2, 0x24($a2) +/* 120348 802B6D38 E4C00000 */ swc1 $f0, ($a2) +/* 12034C 802B6D3C E4C00010 */ swc1 $f0, 0x10($a2) +/* 120350 802B6D40 E4C00020 */ swc1 $f0, 0x20($a2) +.L802B6D44: +/* 120354 802B6D44 8FBF001C */ lw $ra, 0x1c($sp) +/* 120358 802B6D48 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 12035C 802B6D4C 27BD0040 */ addiu $sp, $sp, 0x40 +/* 120360 802B6D50 03E00008 */ jr $ra +/* 120364 802B6D54 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B6D58.s b/asm/non_matchings/math_util/func_802B6D58.s new file mode 100644 index 000000000..29e18ea37 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B6D58.s @@ -0,0 +1,304 @@ +glabel func_802B6D58 +/* 120368 802B6D58 27BDFFC0 */ addiu $sp, $sp, -0x40 +/* 12036C 802B6D5C AFB0001C */ sw $s0, 0x1c($sp) +/* 120370 802B6D60 00808025 */ move $s0, $a0 +/* 120374 802B6D64 AFBF0024 */ sw $ra, 0x24($sp) +/* 120378 802B6D68 AFB10020 */ sw $s1, 0x20($sp) +/* 12037C 802B6D6C F7B40010 */ sdc1 $f20, 0x10($sp) +/* 120380 802B6D70 AFA50044 */ sw $a1, 0x44($sp) +/* 120384 802B6D74 24040001 */ li $a0, 1 +/* 120388 802B6D78 444EF800 */ cfc1 $t6, $31 +/* 12038C 802B6D7C 44C4F800 */ ctc1 $a0, $31 +/* 120390 802B6D80 C4C40000 */ lwc1 $f4, ($a2) +/* 120394 802B6D84 00C08825 */ move $s1, $a2 +/* 120398 802B6D88 460021A4 */ cvt.w.s $f6, $f4 +/* 12039C 802B6D8C 4444F800 */ cfc1 $a0, $31 +/* 1203A0 802B6D90 00000000 */ nop +/* 1203A4 802B6D94 30840078 */ andi $a0, $a0, 0x78 +/* 1203A8 802B6D98 10800012 */ beqz $a0, .L802B6DE4 +/* 1203AC 802B6D9C 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 1203B0 802B6DA0 44813000 */ mtc1 $at, $f6 +/* 1203B4 802B6DA4 24040001 */ li $a0, 1 +/* 1203B8 802B6DA8 46062181 */ sub.s $f6, $f4, $f6 +/* 1203BC 802B6DAC 44C4F800 */ ctc1 $a0, $31 +/* 1203C0 802B6DB0 00000000 */ nop +/* 1203C4 802B6DB4 460031A4 */ cvt.w.s $f6, $f6 +/* 1203C8 802B6DB8 4444F800 */ cfc1 $a0, $31 +/* 1203CC 802B6DBC 00000000 */ nop +/* 1203D0 802B6DC0 30840078 */ andi $a0, $a0, 0x78 +/* 1203D4 802B6DC4 14800005 */ bnez $a0, .L802B6DDC +/* 1203D8 802B6DC8 00000000 */ nop +/* 1203DC 802B6DCC 44043000 */ mfc1 $a0, $f6 +/* 1203E0 802B6DD0 3C018000 */ lui $at, 0x8000 +/* 1203E4 802B6DD4 10000007 */ b .L802B6DF4 +/* 1203E8 802B6DD8 00812025 */ or $a0, $a0, $at +.L802B6DDC: +/* 1203EC 802B6DDC 10000005 */ b .L802B6DF4 +/* 1203F0 802B6DE0 2404FFFF */ li $a0, -1 +.L802B6DE4: +/* 1203F4 802B6DE4 44043000 */ mfc1 $a0, $f6 +/* 1203F8 802B6DE8 00000000 */ nop +/* 1203FC 802B6DEC 0480FFFB */ bltz $a0, .L802B6DDC +/* 120400 802B6DF0 00000000 */ nop +.L802B6DF4: +/* 120404 802B6DF4 44CEF800 */ ctc1 $t6, $31 +/* 120408 802B6DF8 308FFFFF */ andi $t7, $a0, 0xffff +/* 12040C 802B6DFC 0C0AE006 */ jal func_802B8018 +/* 120410 802B6E00 01E02025 */ move $a0, $t7 +/* 120414 802B6E04 E7A0003C */ swc1 $f0, 0x3c($sp) +/* 120418 802B6E08 4458F800 */ cfc1 $t8, $31 +/* 12041C 802B6E0C 24040001 */ li $a0, 1 +/* 120420 802B6E10 44C4F800 */ ctc1 $a0, $31 +/* 120424 802B6E14 C6280000 */ lwc1 $f8, ($s1) +/* 120428 802B6E18 460042A4 */ cvt.w.s $f10, $f8 +/* 12042C 802B6E1C 4444F800 */ cfc1 $a0, $31 +/* 120430 802B6E20 00000000 */ nop +/* 120434 802B6E24 30840078 */ andi $a0, $a0, 0x78 +/* 120438 802B6E28 10800012 */ beqz $a0, .L802B6E74 +/* 12043C 802B6E2C 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 120440 802B6E30 44815000 */ mtc1 $at, $f10 +/* 120444 802B6E34 24040001 */ li $a0, 1 +/* 120448 802B6E38 460A4281 */ sub.s $f10, $f8, $f10 +/* 12044C 802B6E3C 44C4F800 */ ctc1 $a0, $31 +/* 120450 802B6E40 00000000 */ nop +/* 120454 802B6E44 460052A4 */ cvt.w.s $f10, $f10 +/* 120458 802B6E48 4444F800 */ cfc1 $a0, $31 +/* 12045C 802B6E4C 00000000 */ nop +/* 120460 802B6E50 30840078 */ andi $a0, $a0, 0x78 +/* 120464 802B6E54 14800005 */ bnez $a0, .L802B6E6C +/* 120468 802B6E58 00000000 */ nop +/* 12046C 802B6E5C 44045000 */ mfc1 $a0, $f10 +/* 120470 802B6E60 3C018000 */ lui $at, 0x8000 +/* 120474 802B6E64 10000007 */ b .L802B6E84 +/* 120478 802B6E68 00812025 */ or $a0, $a0, $at +.L802B6E6C: +/* 12047C 802B6E6C 10000005 */ b .L802B6E84 +/* 120480 802B6E70 2404FFFF */ li $a0, -1 +.L802B6E74: +/* 120484 802B6E74 44045000 */ mfc1 $a0, $f10 +/* 120488 802B6E78 00000000 */ nop +/* 12048C 802B6E7C 0480FFFB */ bltz $a0, .L802B6E6C +/* 120490 802B6E80 00000000 */ nop +.L802B6E84: +/* 120494 802B6E84 44D8F800 */ ctc1 $t8, $31 +/* 120498 802B6E88 3099FFFF */ andi $t9, $a0, 0xffff +/* 12049C 802B6E8C 0C0AE00E */ jal func_802B8038 +/* 1204A0 802B6E90 03202025 */ move $a0, $t9 +/* 1204A4 802B6E94 46000506 */ mov.s $f20, $f0 +/* 1204A8 802B6E98 4448F800 */ cfc1 $t0, $31 +/* 1204AC 802B6E9C 24040001 */ li $a0, 1 +/* 1204B0 802B6EA0 44C4F800 */ ctc1 $a0, $31 +/* 1204B4 802B6EA4 C6240004 */ lwc1 $f4, 4($s1) +/* 1204B8 802B6EA8 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 1204BC 802B6EAC 460021A4 */ cvt.w.s $f6, $f4 +/* 1204C0 802B6EB0 4444F800 */ cfc1 $a0, $31 +/* 1204C4 802B6EB4 00000000 */ nop +/* 1204C8 802B6EB8 30840078 */ andi $a0, $a0, 0x78 +/* 1204CC 802B6EBC 50800013 */ beql $a0, $zero, .L802B6F0C +/* 1204D0 802B6EC0 44043000 */ mfc1 $a0, $f6 +/* 1204D4 802B6EC4 44813000 */ mtc1 $at, $f6 +/* 1204D8 802B6EC8 24040001 */ li $a0, 1 +/* 1204DC 802B6ECC 46062181 */ sub.s $f6, $f4, $f6 +/* 1204E0 802B6ED0 44C4F800 */ ctc1 $a0, $31 +/* 1204E4 802B6ED4 00000000 */ nop +/* 1204E8 802B6ED8 460031A4 */ cvt.w.s $f6, $f6 +/* 1204EC 802B6EDC 4444F800 */ cfc1 $a0, $31 +/* 1204F0 802B6EE0 00000000 */ nop +/* 1204F4 802B6EE4 30840078 */ andi $a0, $a0, 0x78 +/* 1204F8 802B6EE8 14800005 */ bnez $a0, .L802B6F00 +/* 1204FC 802B6EEC 00000000 */ nop +/* 120500 802B6EF0 44043000 */ mfc1 $a0, $f6 +/* 120504 802B6EF4 3C018000 */ lui $at, 0x8000 +/* 120508 802B6EF8 10000007 */ b .L802B6F18 +/* 12050C 802B6EFC 00812025 */ or $a0, $a0, $at +.L802B6F00: +/* 120510 802B6F00 10000005 */ b .L802B6F18 +/* 120514 802B6F04 2404FFFF */ li $a0, -1 +/* 120518 802B6F08 44043000 */ mfc1 $a0, $f6 +.L802B6F0C: +/* 12051C 802B6F0C 00000000 */ nop +/* 120520 802B6F10 0480FFFB */ bltz $a0, .L802B6F00 +/* 120524 802B6F14 00000000 */ nop +.L802B6F18: +/* 120528 802B6F18 44C8F800 */ ctc1 $t0, $31 +/* 12052C 802B6F1C 3089FFFF */ andi $t1, $a0, 0xffff +/* 120530 802B6F20 0C0AE006 */ jal func_802B8018 +/* 120534 802B6F24 01202025 */ move $a0, $t1 +/* 120538 802B6F28 46000386 */ mov.s $f14, $f0 +/* 12053C 802B6F2C 444AF800 */ cfc1 $t2, $31 +/* 120540 802B6F30 24040001 */ li $a0, 1 +/* 120544 802B6F34 44C4F800 */ ctc1 $a0, $31 +/* 120548 802B6F38 C6280004 */ lwc1 $f8, 4($s1) +/* 12054C 802B6F3C 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 120550 802B6F40 460042A4 */ cvt.w.s $f10, $f8 +/* 120554 802B6F44 4444F800 */ cfc1 $a0, $31 +/* 120558 802B6F48 00000000 */ nop +/* 12055C 802B6F4C 30840078 */ andi $a0, $a0, 0x78 +/* 120560 802B6F50 50800013 */ beql $a0, $zero, .L802B6FA0 +/* 120564 802B6F54 44045000 */ mfc1 $a0, $f10 +/* 120568 802B6F58 44815000 */ mtc1 $at, $f10 +/* 12056C 802B6F5C 24040001 */ li $a0, 1 +/* 120570 802B6F60 460A4281 */ sub.s $f10, $f8, $f10 +/* 120574 802B6F64 44C4F800 */ ctc1 $a0, $31 +/* 120578 802B6F68 00000000 */ nop +/* 12057C 802B6F6C 460052A4 */ cvt.w.s $f10, $f10 +/* 120580 802B6F70 4444F800 */ cfc1 $a0, $31 +/* 120584 802B6F74 00000000 */ nop +/* 120588 802B6F78 30840078 */ andi $a0, $a0, 0x78 +/* 12058C 802B6F7C 14800005 */ bnez $a0, .L802B6F94 +/* 120590 802B6F80 00000000 */ nop +/* 120594 802B6F84 44045000 */ mfc1 $a0, $f10 +/* 120598 802B6F88 3C018000 */ lui $at, 0x8000 +/* 12059C 802B6F8C 10000007 */ b .L802B6FAC +/* 1205A0 802B6F90 00812025 */ or $a0, $a0, $at +.L802B6F94: +/* 1205A4 802B6F94 10000005 */ b .L802B6FAC +/* 1205A8 802B6F98 2404FFFF */ li $a0, -1 +/* 1205AC 802B6F9C 44045000 */ mfc1 $a0, $f10 +.L802B6FA0: +/* 1205B0 802B6FA0 00000000 */ nop +/* 1205B4 802B6FA4 0480FFFB */ bltz $a0, .L802B6F94 +/* 1205B8 802B6FA8 00000000 */ nop +.L802B6FAC: +/* 1205BC 802B6FAC 44CAF800 */ ctc1 $t2, $31 +/* 1205C0 802B6FB0 308BFFFF */ andi $t3, $a0, 0xffff +/* 1205C4 802B6FB4 01602025 */ move $a0, $t3 +/* 1205C8 802B6FB8 0C0AE00E */ jal func_802B8038 +/* 1205CC 802B6FBC E7AE0034 */ swc1 $f14, 0x34($sp) +/* 1205D0 802B6FC0 46000406 */ mov.s $f16, $f0 +/* 1205D4 802B6FC4 444CF800 */ cfc1 $t4, $31 +/* 1205D8 802B6FC8 24040001 */ li $a0, 1 +/* 1205DC 802B6FCC 44C4F800 */ ctc1 $a0, $31 +/* 1205E0 802B6FD0 C6240008 */ lwc1 $f4, 8($s1) +/* 1205E4 802B6FD4 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 1205E8 802B6FD8 460021A4 */ cvt.w.s $f6, $f4 +/* 1205EC 802B6FDC 4444F800 */ cfc1 $a0, $31 +/* 1205F0 802B6FE0 00000000 */ nop +/* 1205F4 802B6FE4 30840078 */ andi $a0, $a0, 0x78 +/* 1205F8 802B6FE8 50800013 */ beql $a0, $zero, .L802B7038 +/* 1205FC 802B6FEC 44043000 */ mfc1 $a0, $f6 +/* 120600 802B6FF0 44813000 */ mtc1 $at, $f6 +/* 120604 802B6FF4 24040001 */ li $a0, 1 +/* 120608 802B6FF8 46062181 */ sub.s $f6, $f4, $f6 +/* 12060C 802B6FFC 44C4F800 */ ctc1 $a0, $31 +/* 120610 802B7000 00000000 */ nop +/* 120614 802B7004 460031A4 */ cvt.w.s $f6, $f6 +/* 120618 802B7008 4444F800 */ cfc1 $a0, $31 +/* 12061C 802B700C 00000000 */ nop +/* 120620 802B7010 30840078 */ andi $a0, $a0, 0x78 +/* 120624 802B7014 14800005 */ bnez $a0, .L802B702C +/* 120628 802B7018 00000000 */ nop +/* 12062C 802B701C 44043000 */ mfc1 $a0, $f6 +/* 120630 802B7020 3C018000 */ lui $at, 0x8000 +/* 120634 802B7024 10000007 */ b .L802B7044 +/* 120638 802B7028 00812025 */ or $a0, $a0, $at +.L802B702C: +/* 12063C 802B702C 10000005 */ b .L802B7044 +/* 120640 802B7030 2404FFFF */ li $a0, -1 +/* 120644 802B7034 44043000 */ mfc1 $a0, $f6 +.L802B7038: +/* 120648 802B7038 00000000 */ nop +/* 12064C 802B703C 0480FFFB */ bltz $a0, .L802B702C +/* 120650 802B7040 00000000 */ nop +.L802B7044: +/* 120654 802B7044 44CCF800 */ ctc1 $t4, $31 +/* 120658 802B7048 308DFFFF */ andi $t5, $a0, 0xffff +/* 12065C 802B704C 01A02025 */ move $a0, $t5 +/* 120660 802B7050 0C0AE006 */ jal func_802B8018 +/* 120664 802B7054 E7B00030 */ swc1 $f16, 0x30($sp) +/* 120668 802B7058 46000086 */ mov.s $f2, $f0 +/* 12066C 802B705C 444EF800 */ cfc1 $t6, $31 +/* 120670 802B7060 24040001 */ li $a0, 1 +/* 120674 802B7064 44C4F800 */ ctc1 $a0, $31 +/* 120678 802B7068 C6280008 */ lwc1 $f8, 8($s1) +/* 12067C 802B706C 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 120680 802B7070 460042A4 */ cvt.w.s $f10, $f8 +/* 120684 802B7074 4444F800 */ cfc1 $a0, $31 +/* 120688 802B7078 00000000 */ nop +/* 12068C 802B707C 30840078 */ andi $a0, $a0, 0x78 +/* 120690 802B7080 50800013 */ beql $a0, $zero, .L802B70D0 +/* 120694 802B7084 44045000 */ mfc1 $a0, $f10 +/* 120698 802B7088 44815000 */ mtc1 $at, $f10 +/* 12069C 802B708C 24040001 */ li $a0, 1 +/* 1206A0 802B7090 460A4281 */ sub.s $f10, $f8, $f10 +/* 1206A4 802B7094 44C4F800 */ ctc1 $a0, $31 +/* 1206A8 802B7098 00000000 */ nop +/* 1206AC 802B709C 460052A4 */ cvt.w.s $f10, $f10 +/* 1206B0 802B70A0 4444F800 */ cfc1 $a0, $31 +/* 1206B4 802B70A4 00000000 */ nop +/* 1206B8 802B70A8 30840078 */ andi $a0, $a0, 0x78 +/* 1206BC 802B70AC 14800005 */ bnez $a0, .L802B70C4 +/* 1206C0 802B70B0 00000000 */ nop +/* 1206C4 802B70B4 44045000 */ mfc1 $a0, $f10 +/* 1206C8 802B70B8 3C018000 */ lui $at, 0x8000 +/* 1206CC 802B70BC 10000007 */ b .L802B70DC +/* 1206D0 802B70C0 00812025 */ or $a0, $a0, $at +.L802B70C4: +/* 1206D4 802B70C4 10000005 */ b .L802B70DC +/* 1206D8 802B70C8 2404FFFF */ li $a0, -1 +/* 1206DC 802B70CC 44045000 */ mfc1 $a0, $f10 +.L802B70D0: +/* 1206E0 802B70D0 00000000 */ nop +/* 1206E4 802B70D4 0480FFFB */ bltz $a0, .L802B70C4 +/* 1206E8 802B70D8 00000000 */ nop +.L802B70DC: +/* 1206EC 802B70DC 44CEF800 */ ctc1 $t6, $31 +/* 1206F0 802B70E0 308FFFFF */ andi $t7, $a0, 0xffff +/* 1206F4 802B70E4 01E02025 */ move $a0, $t7 +/* 1206F8 802B70E8 0C0AE00E */ jal func_802B8038 +/* 1206FC 802B70EC E7A2002C */ swc1 $f2, 0x2c($sp) +/* 120700 802B70F0 C7AE0034 */ lwc1 $f14, 0x34($sp) +/* 120704 802B70F4 C7B2003C */ lwc1 $f18, 0x3c($sp) +/* 120708 802B70F8 C7B00030 */ lwc1 $f16, 0x30($sp) +/* 12070C 802B70FC C7A2002C */ lwc1 $f2, 0x2c($sp) +/* 120710 802B7100 460E9302 */ mul.s $f12, $f18, $f14 +/* 120714 802B7104 46008287 */ neg.s $f10, $f16 +/* 120718 802B7108 8FA20044 */ lw $v0, 0x44($sp) +/* 12071C 802B710C 46008102 */ mul.s $f4, $f16, $f0 +/* 120720 802B7110 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 120724 802B7114 46026182 */ mul.s $f6, $f12, $f2 +/* 120728 802B7118 46062200 */ add.s $f8, $f4, $f6 +/* 12072C 802B711C 46025102 */ mul.s $f4, $f10, $f2 +/* 120730 802B7120 00000000 */ nop +/* 120734 802B7124 46006182 */ mul.s $f6, $f12, $f0 +/* 120738 802B7128 E6080000 */ swc1 $f8, ($s0) +/* 12073C 802B712C 460EA282 */ mul.s $f10, $f20, $f14 +/* 120740 802B7130 46062200 */ add.s $f8, $f4, $f6 +/* 120744 802B7134 4602A182 */ mul.s $f6, $f20, $f2 +/* 120748 802B7138 E60A0020 */ swc1 $f10, 0x20($s0) +/* 12074C 802B713C 46009287 */ neg.s $f10, $f18 +/* 120750 802B7140 E6080010 */ swc1 $f8, 0x10($s0) +/* 120754 802B7144 4600A202 */ mul.s $f8, $f20, $f0 +/* 120758 802B7148 C4440000 */ lwc1 $f4, ($v0) +/* 12075C 802B714C E60A0024 */ swc1 $f10, 0x24($s0) +/* 120760 802B7150 46109302 */ mul.s $f12, $f18, $f16 +/* 120764 802B7154 E6060004 */ swc1 $f6, 4($s0) +/* 120768 802B7158 E6040030 */ swc1 $f4, 0x30($s0) +/* 12076C 802B715C 46007187 */ neg.s $f6, $f14 +/* 120770 802B7160 E6080014 */ swc1 $f8, 0x14($s0) +/* 120774 802B7164 46003202 */ mul.s $f8, $f6, $f0 +/* 120778 802B7168 C4440004 */ lwc1 $f4, 4($v0) +/* 12077C 802B716C 46026282 */ mul.s $f10, $f12, $f2 +/* 120780 802B7170 E6040034 */ swc1 $f4, 0x34($s0) +/* 120784 802B7174 46027182 */ mul.s $f6, $f14, $f2 +/* 120788 802B7178 460A4100 */ add.s $f4, $f8, $f10 +/* 12078C 802B717C 46006202 */ mul.s $f8, $f12, $f0 +/* 120790 802B7180 44800000 */ mtc1 $zero, $f0 +/* 120794 802B7184 E6040008 */ swc1 $f4, 8($s0) +/* 120798 802B7188 4610A102 */ mul.s $f4, $f20, $f16 +/* 12079C 802B718C 46083280 */ add.s $f10, $f6, $f8 +/* 1207A0 802B7190 44814000 */ mtc1 $at, $f8 +/* 1207A4 802B7194 E6040028 */ swc1 $f4, 0x28($s0) +/* 1207A8 802B7198 E60A0018 */ swc1 $f10, 0x18($s0) +/* 1207AC 802B719C C4460008 */ lwc1 $f6, 8($v0) +/* 1207B0 802B71A0 E600000C */ swc1 $f0, 0xc($s0) +/* 1207B4 802B71A4 E600001C */ swc1 $f0, 0x1c($s0) +/* 1207B8 802B71A8 E600002C */ swc1 $f0, 0x2c($s0) +/* 1207BC 802B71AC E608003C */ swc1 $f8, 0x3c($s0) +/* 1207C0 802B71B0 E6060038 */ swc1 $f6, 0x38($s0) +/* 1207C4 802B71B4 8FBF0024 */ lw $ra, 0x24($sp) +/* 1207C8 802B71B8 8FB10020 */ lw $s1, 0x20($sp) +/* 1207CC 802B71BC 8FB0001C */ lw $s0, 0x1c($sp) +/* 1207D0 802B71C0 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 1207D4 802B71C4 03E00008 */ jr $ra +/* 1207D8 802B71C8 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/non_matchings/math_util/func_802B71CC.s b/asm/non_matchings/math_util/func_802B71CC.s new file mode 100644 index 000000000..37563dac9 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B71CC.s @@ -0,0 +1,268 @@ +glabel func_802B71CC +/* 1207DC 802B71CC 27BDFFA0 */ addiu $sp, $sp, -0x60 +/* 1207E0 802B71D0 AFBF001C */ sw $ra, 0x1c($sp) +/* 1207E4 802B71D4 AFB00018 */ sw $s0, 0x18($sp) +/* 1207E8 802B71D8 C4C60000 */ lwc1 $f6, ($a2) +/* 1207EC 802B71DC C4A40000 */ lwc1 $f4, ($a1) +/* 1207F0 802B71E0 C4D00010 */ lwc1 $f16, 0x10($a2) +/* 1207F4 802B71E4 C4AA0004 */ lwc1 $f10, 4($a1) +/* 1207F8 802B71E8 46062202 */ mul.s $f8, $f4, $f6 +/* 1207FC 802B71EC C4A60008 */ lwc1 $f6, 8($a1) +/* 120800 802B71F0 46105482 */ mul.s $f18, $f10, $f16 +/* 120804 802B71F4 C4CA0020 */ lwc1 $f10, 0x20($a2) +/* 120808 802B71F8 460A3402 */ mul.s $f16, $f6, $f10 +/* 12080C 802B71FC C4A6000C */ lwc1 $f6, 0xc($a1) +/* 120810 802B7200 46124100 */ add.s $f4, $f8, $f18 +/* 120814 802B7204 C4D20030 */ lwc1 $f18, 0x30($a2) +/* 120818 802B7208 46069282 */ mul.s $f10, $f18, $f6 +/* 12081C 802B720C 46102200 */ add.s $f8, $f4, $f16 +/* 120820 802B7210 46085100 */ add.s $f4, $f10, $f8 +/* 120824 802B7214 E7A40020 */ swc1 $f4, 0x20($sp) +/* 120828 802B7218 C4D20004 */ lwc1 $f18, 4($a2) +/* 12082C 802B721C C4B00000 */ lwc1 $f16, ($a1) +/* 120830 802B7220 C4C80014 */ lwc1 $f8, 0x14($a2) +/* 120834 802B7224 C4AA0004 */ lwc1 $f10, 4($a1) +/* 120838 802B7228 46128182 */ mul.s $f6, $f16, $f18 +/* 12083C 802B722C C4B20008 */ lwc1 $f18, 8($a1) +/* 120840 802B7230 46085102 */ mul.s $f4, $f10, $f8 +/* 120844 802B7234 C4CA0024 */ lwc1 $f10, 0x24($a2) +/* 120848 802B7238 460A9202 */ mul.s $f8, $f18, $f10 +/* 12084C 802B723C C4B2000C */ lwc1 $f18, 0xc($a1) +/* 120850 802B7240 46043400 */ add.s $f16, $f6, $f4 +/* 120854 802B7244 C4C40034 */ lwc1 $f4, 0x34($a2) +/* 120858 802B7248 46122282 */ mul.s $f10, $f4, $f18 +/* 12085C 802B724C 46088180 */ add.s $f6, $f16, $f8 +/* 120860 802B7250 46065400 */ add.s $f16, $f10, $f6 +/* 120864 802B7254 E7B00024 */ swc1 $f16, 0x24($sp) +/* 120868 802B7258 C4C40008 */ lwc1 $f4, 8($a2) +/* 12086C 802B725C C4A80000 */ lwc1 $f8, ($a1) +/* 120870 802B7260 C4C60018 */ lwc1 $f6, 0x18($a2) +/* 120874 802B7264 C4AA0004 */ lwc1 $f10, 4($a1) +/* 120878 802B7268 46044482 */ mul.s $f18, $f8, $f4 +/* 12087C 802B726C C4A40008 */ lwc1 $f4, 8($a1) +/* 120880 802B7270 46065402 */ mul.s $f16, $f10, $f6 +/* 120884 802B7274 C4CA0028 */ lwc1 $f10, 0x28($a2) +/* 120888 802B7278 460A2182 */ mul.s $f6, $f4, $f10 +/* 12088C 802B727C C4A4000C */ lwc1 $f4, 0xc($a1) +/* 120890 802B7280 46109200 */ add.s $f8, $f18, $f16 +/* 120894 802B7284 C4D00038 */ lwc1 $f16, 0x38($a2) +/* 120898 802B7288 46048282 */ mul.s $f10, $f16, $f4 +/* 12089C 802B728C 46064480 */ add.s $f18, $f8, $f6 +/* 1208A0 802B7290 46125200 */ add.s $f8, $f10, $f18 +/* 1208A4 802B7294 E7A80028 */ swc1 $f8, 0x28($sp) +/* 1208A8 802B7298 C4D0000C */ lwc1 $f16, 0xc($a2) +/* 1208AC 802B729C C4A60000 */ lwc1 $f6, ($a1) +/* 1208B0 802B72A0 C4D2001C */ lwc1 $f18, 0x1c($a2) +/* 1208B4 802B72A4 C4AA0004 */ lwc1 $f10, 4($a1) +/* 1208B8 802B72A8 46103102 */ mul.s $f4, $f6, $f16 +/* 1208BC 802B72AC C4B00008 */ lwc1 $f16, 8($a1) +/* 1208C0 802B72B0 46125202 */ mul.s $f8, $f10, $f18 +/* 1208C4 802B72B4 C4CA002C */ lwc1 $f10, 0x2c($a2) +/* 1208C8 802B72B8 460A8482 */ mul.s $f18, $f16, $f10 +/* 1208CC 802B72BC C4B0000C */ lwc1 $f16, 0xc($a1) +/* 1208D0 802B72C0 46082180 */ add.s $f6, $f4, $f8 +/* 1208D4 802B72C4 C4C8003C */ lwc1 $f8, 0x3c($a2) +/* 1208D8 802B72C8 46104282 */ mul.s $f10, $f8, $f16 +/* 1208DC 802B72CC 46123100 */ add.s $f4, $f6, $f18 +/* 1208E0 802B72D0 46045180 */ add.s $f6, $f10, $f4 +/* 1208E4 802B72D4 E7A6002C */ swc1 $f6, 0x2c($sp) +/* 1208E8 802B72D8 C4C80000 */ lwc1 $f8, ($a2) +/* 1208EC 802B72DC C4B20010 */ lwc1 $f18, 0x10($a1) +/* 1208F0 802B72E0 C4C40010 */ lwc1 $f4, 0x10($a2) +/* 1208F4 802B72E4 C4AA0014 */ lwc1 $f10, 0x14($a1) +/* 1208F8 802B72E8 46089402 */ mul.s $f16, $f18, $f8 +/* 1208FC 802B72EC C4A80018 */ lwc1 $f8, 0x18($a1) +/* 120900 802B72F0 46045182 */ mul.s $f6, $f10, $f4 +/* 120904 802B72F4 C4CA0020 */ lwc1 $f10, 0x20($a2) +/* 120908 802B72F8 460A4102 */ mul.s $f4, $f8, $f10 +/* 12090C 802B72FC C4A8001C */ lwc1 $f8, 0x1c($a1) +/* 120910 802B7300 46068480 */ add.s $f18, $f16, $f6 +/* 120914 802B7304 C4C60030 */ lwc1 $f6, 0x30($a2) +/* 120918 802B7308 46083282 */ mul.s $f10, $f6, $f8 +/* 12091C 802B730C 46049400 */ add.s $f16, $f18, $f4 +/* 120920 802B7310 46105480 */ add.s $f18, $f10, $f16 +/* 120924 802B7314 E7B20030 */ swc1 $f18, 0x30($sp) +/* 120928 802B7318 C4C60004 */ lwc1 $f6, 4($a2) +/* 12092C 802B731C C4A40010 */ lwc1 $f4, 0x10($a1) +/* 120930 802B7320 C4D00014 */ lwc1 $f16, 0x14($a2) +/* 120934 802B7324 C4AA0014 */ lwc1 $f10, 0x14($a1) +/* 120938 802B7328 46062202 */ mul.s $f8, $f4, $f6 +/* 12093C 802B732C C4A60018 */ lwc1 $f6, 0x18($a1) +/* 120940 802B7330 46105482 */ mul.s $f18, $f10, $f16 +/* 120944 802B7334 C4CA0024 */ lwc1 $f10, 0x24($a2) +/* 120948 802B7338 460A3402 */ mul.s $f16, $f6, $f10 +/* 12094C 802B733C C4A6001C */ lwc1 $f6, 0x1c($a1) +/* 120950 802B7340 46124100 */ add.s $f4, $f8, $f18 +/* 120954 802B7344 C4D20034 */ lwc1 $f18, 0x34($a2) +/* 120958 802B7348 46069282 */ mul.s $f10, $f18, $f6 +/* 12095C 802B734C 46102200 */ add.s $f8, $f4, $f16 +/* 120960 802B7350 46085100 */ add.s $f4, $f10, $f8 +/* 120964 802B7354 E7A40034 */ swc1 $f4, 0x34($sp) +/* 120968 802B7358 C4D20008 */ lwc1 $f18, 8($a2) +/* 12096C 802B735C C4B00010 */ lwc1 $f16, 0x10($a1) +/* 120970 802B7360 C4C80018 */ lwc1 $f8, 0x18($a2) +/* 120974 802B7364 C4AA0014 */ lwc1 $f10, 0x14($a1) +/* 120978 802B7368 46128182 */ mul.s $f6, $f16, $f18 +/* 12097C 802B736C C4B20018 */ lwc1 $f18, 0x18($a1) +/* 120980 802B7370 46085102 */ mul.s $f4, $f10, $f8 +/* 120984 802B7374 C4CA0028 */ lwc1 $f10, 0x28($a2) +/* 120988 802B7378 460A9202 */ mul.s $f8, $f18, $f10 +/* 12098C 802B737C C4B2001C */ lwc1 $f18, 0x1c($a1) +/* 120990 802B7380 46043400 */ add.s $f16, $f6, $f4 +/* 120994 802B7384 C4C40038 */ lwc1 $f4, 0x38($a2) +/* 120998 802B7388 46122282 */ mul.s $f10, $f4, $f18 +/* 12099C 802B738C 46088180 */ add.s $f6, $f16, $f8 +/* 1209A0 802B7390 46065400 */ add.s $f16, $f10, $f6 +/* 1209A4 802B7394 E7B00038 */ swc1 $f16, 0x38($sp) +/* 1209A8 802B7398 C4C4000C */ lwc1 $f4, 0xc($a2) +/* 1209AC 802B739C C4A80010 */ lwc1 $f8, 0x10($a1) +/* 1209B0 802B73A0 C4C6001C */ lwc1 $f6, 0x1c($a2) +/* 1209B4 802B73A4 C4AA0014 */ lwc1 $f10, 0x14($a1) +/* 1209B8 802B73A8 46044482 */ mul.s $f18, $f8, $f4 +/* 1209BC 802B73AC C4A40018 */ lwc1 $f4, 0x18($a1) +/* 1209C0 802B73B0 46065402 */ mul.s $f16, $f10, $f6 +/* 1209C4 802B73B4 C4CA002C */ lwc1 $f10, 0x2c($a2) +/* 1209C8 802B73B8 460A2182 */ mul.s $f6, $f4, $f10 +/* 1209CC 802B73BC C4A4001C */ lwc1 $f4, 0x1c($a1) +/* 1209D0 802B73C0 46109200 */ add.s $f8, $f18, $f16 +/* 1209D4 802B73C4 C4D0003C */ lwc1 $f16, 0x3c($a2) +/* 1209D8 802B73C8 46048282 */ mul.s $f10, $f16, $f4 +/* 1209DC 802B73CC 46064480 */ add.s $f18, $f8, $f6 +/* 1209E0 802B73D0 46125200 */ add.s $f8, $f10, $f18 +/* 1209E4 802B73D4 E7A8003C */ swc1 $f8, 0x3c($sp) +/* 1209E8 802B73D8 C4D00000 */ lwc1 $f16, ($a2) +/* 1209EC 802B73DC C4A60020 */ lwc1 $f6, 0x20($a1) +/* 1209F0 802B73E0 C4D20010 */ lwc1 $f18, 0x10($a2) +/* 1209F4 802B73E4 C4AA0024 */ lwc1 $f10, 0x24($a1) +/* 1209F8 802B73E8 46103102 */ mul.s $f4, $f6, $f16 +/* 1209FC 802B73EC C4B00028 */ lwc1 $f16, 0x28($a1) +/* 120A00 802B73F0 46125202 */ mul.s $f8, $f10, $f18 +/* 120A04 802B73F4 C4CA0020 */ lwc1 $f10, 0x20($a2) +/* 120A08 802B73F8 460A8482 */ mul.s $f18, $f16, $f10 +/* 120A0C 802B73FC C4B0002C */ lwc1 $f16, 0x2c($a1) +/* 120A10 802B7400 46082180 */ add.s $f6, $f4, $f8 +/* 120A14 802B7404 C4C80030 */ lwc1 $f8, 0x30($a2) +/* 120A18 802B7408 46104282 */ mul.s $f10, $f8, $f16 +/* 120A1C 802B740C 46123100 */ add.s $f4, $f6, $f18 +/* 120A20 802B7410 46045180 */ add.s $f6, $f10, $f4 +/* 120A24 802B7414 E7A60040 */ swc1 $f6, 0x40($sp) +/* 120A28 802B7418 C4C80004 */ lwc1 $f8, 4($a2) +/* 120A2C 802B741C C4B20020 */ lwc1 $f18, 0x20($a1) +/* 120A30 802B7420 C4C40014 */ lwc1 $f4, 0x14($a2) +/* 120A34 802B7424 C4AA0024 */ lwc1 $f10, 0x24($a1) +/* 120A38 802B7428 46089402 */ mul.s $f16, $f18, $f8 +/* 120A3C 802B742C C4A80028 */ lwc1 $f8, 0x28($a1) +/* 120A40 802B7430 46045182 */ mul.s $f6, $f10, $f4 +/* 120A44 802B7434 C4CA0024 */ lwc1 $f10, 0x24($a2) +/* 120A48 802B7438 460A4102 */ mul.s $f4, $f8, $f10 +/* 120A4C 802B743C C4A8002C */ lwc1 $f8, 0x2c($a1) +/* 120A50 802B7440 46068480 */ add.s $f18, $f16, $f6 +/* 120A54 802B7444 C4C60034 */ lwc1 $f6, 0x34($a2) +/* 120A58 802B7448 46083282 */ mul.s $f10, $f6, $f8 +/* 120A5C 802B744C 46049400 */ add.s $f16, $f18, $f4 +/* 120A60 802B7450 46105480 */ add.s $f18, $f10, $f16 +/* 120A64 802B7454 E7B20044 */ swc1 $f18, 0x44($sp) +/* 120A68 802B7458 C4C60008 */ lwc1 $f6, 8($a2) +/* 120A6C 802B745C C4A40020 */ lwc1 $f4, 0x20($a1) +/* 120A70 802B7460 C4D00018 */ lwc1 $f16, 0x18($a2) +/* 120A74 802B7464 C4AA0024 */ lwc1 $f10, 0x24($a1) +/* 120A78 802B7468 46062202 */ mul.s $f8, $f4, $f6 +/* 120A7C 802B746C C4A60028 */ lwc1 $f6, 0x28($a1) +/* 120A80 802B7470 46105482 */ mul.s $f18, $f10, $f16 +/* 120A84 802B7474 C4CA0028 */ lwc1 $f10, 0x28($a2) +/* 120A88 802B7478 460A3402 */ mul.s $f16, $f6, $f10 +/* 120A8C 802B747C C4A6002C */ lwc1 $f6, 0x2c($a1) +/* 120A90 802B7480 46124100 */ add.s $f4, $f8, $f18 +/* 120A94 802B7484 C4D20038 */ lwc1 $f18, 0x38($a2) +/* 120A98 802B7488 46069282 */ mul.s $f10, $f18, $f6 +/* 120A9C 802B748C 46102200 */ add.s $f8, $f4, $f16 +/* 120AA0 802B7490 46085100 */ add.s $f4, $f10, $f8 +/* 120AA4 802B7494 E7A40048 */ swc1 $f4, 0x48($sp) +/* 120AA8 802B7498 C4D2000C */ lwc1 $f18, 0xc($a2) +/* 120AAC 802B749C C4B00020 */ lwc1 $f16, 0x20($a1) +/* 120AB0 802B74A0 C4C8001C */ lwc1 $f8, 0x1c($a2) +/* 120AB4 802B74A4 C4AA0024 */ lwc1 $f10, 0x24($a1) +/* 120AB8 802B74A8 46128182 */ mul.s $f6, $f16, $f18 +/* 120ABC 802B74AC C4B20028 */ lwc1 $f18, 0x28($a1) +/* 120AC0 802B74B0 46085102 */ mul.s $f4, $f10, $f8 +/* 120AC4 802B74B4 C4CA002C */ lwc1 $f10, 0x2c($a2) +/* 120AC8 802B74B8 460A9202 */ mul.s $f8, $f18, $f10 +/* 120ACC 802B74BC C4B2002C */ lwc1 $f18, 0x2c($a1) +/* 120AD0 802B74C0 46043400 */ add.s $f16, $f6, $f4 +/* 120AD4 802B74C4 C4C4003C */ lwc1 $f4, 0x3c($a2) +/* 120AD8 802B74C8 46122282 */ mul.s $f10, $f4, $f18 +/* 120ADC 802B74CC 46088180 */ add.s $f6, $f16, $f8 +/* 120AE0 802B74D0 46065400 */ add.s $f16, $f10, $f6 +/* 120AE4 802B74D4 E7B0004C */ swc1 $f16, 0x4c($sp) +/* 120AE8 802B74D8 C4A80030 */ lwc1 $f8, 0x30($a1) +/* 120AEC 802B74DC C4C40000 */ lwc1 $f4, ($a2) +/* 120AF0 802B74E0 C4AA0034 */ lwc1 $f10, 0x34($a1) +/* 120AF4 802B74E4 C4C60010 */ lwc1 $f6, 0x10($a2) +/* 120AF8 802B74E8 46044482 */ mul.s $f18, $f8, $f4 +/* 120AFC 802B74EC C4A40038 */ lwc1 $f4, 0x38($a1) +/* 120B00 802B74F0 46065402 */ mul.s $f16, $f10, $f6 +/* 120B04 802B74F4 C4CA0020 */ lwc1 $f10, 0x20($a2) +/* 120B08 802B74F8 460A2182 */ mul.s $f6, $f4, $f10 +/* 120B0C 802B74FC C4A4003C */ lwc1 $f4, 0x3c($a1) +/* 120B10 802B7500 46109200 */ add.s $f8, $f18, $f16 +/* 120B14 802B7504 C4D00030 */ lwc1 $f16, 0x30($a2) +/* 120B18 802B7508 46048282 */ mul.s $f10, $f16, $f4 +/* 120B1C 802B750C 46064480 */ add.s $f18, $f8, $f6 +/* 120B20 802B7510 46125200 */ add.s $f8, $f10, $f18 +/* 120B24 802B7514 E7A80050 */ swc1 $f8, 0x50($sp) +/* 120B28 802B7518 C4A60030 */ lwc1 $f6, 0x30($a1) +/* 120B2C 802B751C C4D00004 */ lwc1 $f16, 4($a2) +/* 120B30 802B7520 C4AA0034 */ lwc1 $f10, 0x34($a1) +/* 120B34 802B7524 C4D20014 */ lwc1 $f18, 0x14($a2) +/* 120B38 802B7528 46103102 */ mul.s $f4, $f6, $f16 +/* 120B3C 802B752C C4B00038 */ lwc1 $f16, 0x38($a1) +/* 120B40 802B7530 46125202 */ mul.s $f8, $f10, $f18 +/* 120B44 802B7534 C4CA0024 */ lwc1 $f10, 0x24($a2) +/* 120B48 802B7538 460A8482 */ mul.s $f18, $f16, $f10 +/* 120B4C 802B753C C4B0003C */ lwc1 $f16, 0x3c($a1) +/* 120B50 802B7540 46082180 */ add.s $f6, $f4, $f8 +/* 120B54 802B7544 C4C80034 */ lwc1 $f8, 0x34($a2) +/* 120B58 802B7548 46104282 */ mul.s $f10, $f8, $f16 +/* 120B5C 802B754C 46123100 */ add.s $f4, $f6, $f18 +/* 120B60 802B7550 46045180 */ add.s $f6, $f10, $f4 +/* 120B64 802B7554 E7A60054 */ swc1 $f6, 0x54($sp) +/* 120B68 802B7558 C4B20030 */ lwc1 $f18, 0x30($a1) +/* 120B6C 802B755C C4C80008 */ lwc1 $f8, 8($a2) +/* 120B70 802B7560 C4AA0034 */ lwc1 $f10, 0x34($a1) +/* 120B74 802B7564 C4C40018 */ lwc1 $f4, 0x18($a2) +/* 120B78 802B7568 46089402 */ mul.s $f16, $f18, $f8 +/* 120B7C 802B756C C4A80038 */ lwc1 $f8, 0x38($a1) +/* 120B80 802B7570 46045182 */ mul.s $f6, $f10, $f4 +/* 120B84 802B7574 C4CA0028 */ lwc1 $f10, 0x28($a2) +/* 120B88 802B7578 460A4102 */ mul.s $f4, $f8, $f10 +/* 120B8C 802B757C C4A8003C */ lwc1 $f8, 0x3c($a1) +/* 120B90 802B7580 46068480 */ add.s $f18, $f16, $f6 +/* 120B94 802B7584 C4C60038 */ lwc1 $f6, 0x38($a2) +/* 120B98 802B7588 46083282 */ mul.s $f10, $f6, $f8 +/* 120B9C 802B758C 46049400 */ add.s $f16, $f18, $f4 +/* 120BA0 802B7590 46105480 */ add.s $f18, $f10, $f16 +/* 120BA4 802B7594 E7B20058 */ swc1 $f18, 0x58($sp) +/* 120BA8 802B7598 C4C6000C */ lwc1 $f6, 0xc($a2) +/* 120BAC 802B759C C4A40030 */ lwc1 $f4, 0x30($a1) +/* 120BB0 802B75A0 C4D0001C */ lwc1 $f16, 0x1c($a2) +/* 120BB4 802B75A4 C4AA0034 */ lwc1 $f10, 0x34($a1) +/* 120BB8 802B75A8 46062202 */ mul.s $f8, $f4, $f6 +/* 120BBC 802B75AC C4A60038 */ lwc1 $f6, 0x38($a1) +/* 120BC0 802B75B0 46105482 */ mul.s $f18, $f10, $f16 +/* 120BC4 802B75B4 C4CA002C */ lwc1 $f10, 0x2c($a2) +/* 120BC8 802B75B8 460A3402 */ mul.s $f16, $f6, $f10 +/* 120BCC 802B75BC C4A6003C */ lwc1 $f6, 0x3c($a1) +/* 120BD0 802B75C0 27A50020 */ addiu $a1, $sp, 0x20 +/* 120BD4 802B75C4 46124100 */ add.s $f4, $f8, $f18 +/* 120BD8 802B75C8 C4D2003C */ lwc1 $f18, 0x3c($a2) +/* 120BDC 802B75CC 24060010 */ li $a2, 16 +/* 120BE0 802B75D0 46069282 */ mul.s $f10, $f18, $f6 +/* 120BE4 802B75D4 46102200 */ add.s $f8, $f4, $f16 +/* 120BE8 802B75D8 46085100 */ add.s $f4, $f10, $f8 +/* 120BEC 802B75DC 0C0AD4E6 */ jal func_802B5398 +/* 120BF0 802B75E0 E7A4005C */ swc1 $f4, 0x5c($sp) +/* 120BF4 802B75E4 8FBF001C */ lw $ra, 0x1c($sp) +/* 120BF8 802B75E8 8FB00018 */ lw $s0, 0x18($sp) +/* 120BFC 802B75EC 27BD0060 */ addiu $sp, $sp, 0x60 +/* 120C00 802B75F0 03E00008 */ jr $ra +/* 120C04 802B75F4 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B75F8.s b/asm/non_matchings/math_util/func_802B75F8.s new file mode 100644 index 000000000..23100371b --- /dev/null +++ b/asm/non_matchings/math_util/func_802B75F8.s @@ -0,0 +1,105 @@ +glabel func_802B75F8 +/* 120C08 802B75F8 3C014780 */ li $at, 0x47800000 # 65536.000000 +/* 120C0C 802B75FC 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 120C10 802B7600 00801025 */ move $v0, $a0 +/* 120C14 802B7604 24830020 */ addiu $v1, $a0, 0x20 +/* 120C18 802B7608 00A03025 */ move $a2, $a1 +/* 120C1C 802B760C 44810000 */ mtc1 $at, $f0 +/* 120C20 802B7610 24050010 */ li $a1, 16 +/* 120C24 802B7614 27A40014 */ addiu $a0, $sp, 0x14 +/* 120C28 802B7618 00003825 */ move $a3, $zero +/* 120C2C 802B761C C4D00000 */ lwc1 $f16, ($a2) +/* 120C30 802B7620 24E70004 */ addiu $a3, $a3, 4 +/* 120C34 802B7624 46008482 */ mul.s $f18, $f16, $f0 +/* 120C38 802B7628 50E5002F */ beql $a3, $a1, .L802B76E8 +/* 120C3C 802B762C 4600940D */ trunc.w.s $f16, $f18 +/* 120C40 802B7630 4600940D */ trunc.w.s $f16, $f18 +.L802B7634: +/* 120C44 802B7634 24E70004 */ addiu $a3, $a3, 4 +/* 120C48 802B7638 24C60010 */ addiu $a2, $a2, 0x10 +/* 120C4C 802B763C 24420008 */ addiu $v0, $v0, 8 +/* 120C50 802B7640 440F8000 */ mfc1 $t7, $f16 +/* 120C54 802B7644 24630008 */ addiu $v1, $v1, 8 +/* 120C58 802B7648 AFAF0014 */ sw $t7, 0x14($sp) +/* 120C5C 802B764C 84980000 */ lh $t8, ($a0) +/* 120C60 802B7650 A458FFF8 */ sh $t8, -8($v0) +/* 120C64 802B7654 84990002 */ lh $t9, 2($a0) +/* 120C68 802B7658 A479FFF8 */ sh $t9, -8($v1) +/* 120C6C 802B765C C4D0FFF4 */ lwc1 $f16, -0xc($a2) +/* 120C70 802B7660 46008402 */ mul.s $f16, $f16, $f0 +/* 120C74 802B7664 4600840D */ trunc.w.s $f16, $f16 +/* 120C78 802B7668 44098000 */ mfc1 $t1, $f16 +/* 120C7C 802B766C 00000000 */ nop +/* 120C80 802B7670 AFA90014 */ sw $t1, 0x14($sp) +/* 120C84 802B7674 848A0000 */ lh $t2, ($a0) +/* 120C88 802B7678 A44AFFFA */ sh $t2, -6($v0) +/* 120C8C 802B767C 848B0002 */ lh $t3, 2($a0) +/* 120C90 802B7680 A46BFFFA */ sh $t3, -6($v1) +/* 120C94 802B7684 C4D0FFF8 */ lwc1 $f16, -8($a2) +/* 120C98 802B7688 46008402 */ mul.s $f16, $f16, $f0 +/* 120C9C 802B768C 4600840D */ trunc.w.s $f16, $f16 +/* 120CA0 802B7690 440D8000 */ mfc1 $t5, $f16 +/* 120CA4 802B7694 00000000 */ nop +/* 120CA8 802B7698 AFAD0014 */ sw $t5, 0x14($sp) +/* 120CAC 802B769C 848E0000 */ lh $t6, ($a0) +/* 120CB0 802B76A0 A44EFFFC */ sh $t6, -4($v0) +/* 120CB4 802B76A4 848F0002 */ lh $t7, 2($a0) +/* 120CB8 802B76A8 A46FFFFC */ sh $t7, -4($v1) +/* 120CBC 802B76AC C4D0FFFC */ lwc1 $f16, -4($a2) +/* 120CC0 802B76B0 46008402 */ mul.s $f16, $f16, $f0 +/* 120CC4 802B76B4 4600840D */ trunc.w.s $f16, $f16 +/* 120CC8 802B76B8 44198000 */ mfc1 $t9, $f16 +/* 120CCC 802B76BC 00000000 */ nop +/* 120CD0 802B76C0 AFB90014 */ sw $t9, 0x14($sp) +/* 120CD4 802B76C4 84880000 */ lh $t0, ($a0) +/* 120CD8 802B76C8 A448FFFE */ sh $t0, -2($v0) +/* 120CDC 802B76CC 84890002 */ lh $t1, 2($a0) +/* 120CE0 802B76D0 A469FFFE */ sh $t1, -2($v1) +/* 120CE4 802B76D4 C4D00000 */ lwc1 $f16, ($a2) +/* 120CE8 802B76D8 46008482 */ mul.s $f18, $f16, $f0 +/* 120CEC 802B76DC 54E5FFD5 */ bnel $a3, $a1, .L802B7634 +/* 120CF0 802B76E0 4600940D */ trunc.w.s $f16, $f18 +/* 120CF4 802B76E4 4600940D */ trunc.w.s $f16, $f18 +.L802B76E8: +/* 120CF8 802B76E8 24C60010 */ addiu $a2, $a2, 0x10 +/* 120CFC 802B76EC 24420008 */ addiu $v0, $v0, 8 +/* 120D00 802B76F0 24630008 */ addiu $v1, $v1, 8 +/* 120D04 802B76F4 440F8000 */ mfc1 $t7, $f16 +/* 120D08 802B76F8 00000000 */ nop +/* 120D0C 802B76FC AFAF0014 */ sw $t7, 0x14($sp) +/* 120D10 802B7700 84980000 */ lh $t8, ($a0) +/* 120D14 802B7704 A458FFF8 */ sh $t8, -8($v0) +/* 120D18 802B7708 84990002 */ lh $t9, 2($a0) +/* 120D1C 802B770C A479FFF8 */ sh $t9, -8($v1) +/* 120D20 802B7710 C4D0FFF4 */ lwc1 $f16, -0xc($a2) +/* 120D24 802B7714 46008402 */ mul.s $f16, $f16, $f0 +/* 120D28 802B7718 4600840D */ trunc.w.s $f16, $f16 +/* 120D2C 802B771C 44098000 */ mfc1 $t1, $f16 +/* 120D30 802B7720 00000000 */ nop +/* 120D34 802B7724 AFA90014 */ sw $t1, 0x14($sp) +/* 120D38 802B7728 848A0000 */ lh $t2, ($a0) +/* 120D3C 802B772C A44AFFFA */ sh $t2, -6($v0) +/* 120D40 802B7730 848B0002 */ lh $t3, 2($a0) +/* 120D44 802B7734 A46BFFFA */ sh $t3, -6($v1) +/* 120D48 802B7738 C4D0FFF8 */ lwc1 $f16, -8($a2) +/* 120D4C 802B773C 46008402 */ mul.s $f16, $f16, $f0 +/* 120D50 802B7740 4600840D */ trunc.w.s $f16, $f16 +/* 120D54 802B7744 440D8000 */ mfc1 $t5, $f16 +/* 120D58 802B7748 00000000 */ nop +/* 120D5C 802B774C AFAD0014 */ sw $t5, 0x14($sp) +/* 120D60 802B7750 848E0000 */ lh $t6, ($a0) +/* 120D64 802B7754 A44EFFFC */ sh $t6, -4($v0) +/* 120D68 802B7758 848F0002 */ lh $t7, 2($a0) +/* 120D6C 802B775C A46FFFFC */ sh $t7, -4($v1) +/* 120D70 802B7760 C4D0FFFC */ lwc1 $f16, -4($a2) +/* 120D74 802B7764 46008402 */ mul.s $f16, $f16, $f0 +/* 120D78 802B7768 4600840D */ trunc.w.s $f16, $f16 +/* 120D7C 802B776C 44198000 */ mfc1 $t9, $f16 +/* 120D80 802B7770 00000000 */ nop +/* 120D84 802B7774 AFB90014 */ sw $t9, 0x14($sp) +/* 120D88 802B7778 84880000 */ lh $t0, ($a0) +/* 120D8C 802B777C A448FFFE */ sh $t0, -2($v0) +/* 120D90 802B7780 84890002 */ lh $t1, 2($a0) +/* 120D94 802B7784 A469FFFE */ sh $t1, -2($v1) +/* 120D98 802B7788 03E00008 */ jr $ra +/* 120D9C 802B778C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/math_util/func_802B7790.s b/asm/non_matchings/math_util/func_802B7790.s new file mode 100644 index 000000000..1616e2de7 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7790.s @@ -0,0 +1,47 @@ +glabel func_802B7790 +/* 120DA0 802B7790 44802000 */ mtc1 $zero, $f4 +/* 120DA4 802B7794 3C03802C */ lui $v1, %hi(D_802BF370) # 0x802c +/* 120DA8 802B7798 46047032 */ c.eq.s $f14, $f4 +/* 120DAC 802B779C 00000000 */ nop +/* 120DB0 802B77A0 45020004 */ bc1fl .L802B77B4 +/* 120DB4 802B77A4 460E6003 */ div.s $f0, $f12, $f14 +/* 120DB8 802B77A8 03E00008 */ jr $ra +/* 120DBC 802B77AC 9462F370 */ lhu $v0, %lo(D_802BF370)($v1) # -0xc90 + +/* 120DC0 802B77B0 460E6003 */ div.s $f0, $f12, $f14 +.L802B77B4: +/* 120DC4 802B77B4 3C01802C */ lui $at, %hi(D_802B9FD8) # $at, 0x802c +/* 120DC8 802B77B8 C4269FD8 */ lwc1 $f6, %lo(D_802B9FD8)($at) +/* 120DCC 802B77BC 3C014480 */ li $at, 0x44800000 # 1024.000000 +/* 120DD0 802B77C0 4600303C */ c.lt.s $f6, $f0 +/* 120DD4 802B77C4 00000000 */ nop +/* 120DD8 802B77C8 4502000C */ bc1fl .L802B77FC +/* 120DDC 802B77CC 44815000 */ mtc1 $at, $f10 +/* 120DE0 802B77D0 44804000 */ mtc1 $zero, $f8 +/* 120DE4 802B77D4 00000000 */ nop +/* 120DE8 802B77D8 460C403C */ c.lt.s $f8, $f12 +/* 120DEC 802B77DC 00000000 */ nop +/* 120DF0 802B77E0 45000003 */ bc1f .L802B77F0 +/* 120DF4 802B77E4 00000000 */ nop +/* 120DF8 802B77E8 03E00008 */ jr $ra +/* 120DFC 802B77EC 24024000 */ li $v0, 16384 + +.L802B77F0: +/* 120E00 802B77F0 03E00008 */ jr $ra +/* 120E04 802B77F4 3402C000 */ li $v0, 49152 + +/* 120E08 802B77F8 44815000 */ mtc1 $at, $f10 +.L802B77FC: +/* 120E0C 802B77FC 3C013F00 */ li $at, 0x3F000000 # 0.500000 +/* 120E10 802B7800 44819000 */ mtc1 $at, $f18 +/* 120E14 802B7804 460A0402 */ mul.s $f16, $f0, $f10 +/* 120E18 802B7808 3C03802C */ lui $v1, %hi(D_802BF370) # 0x802c +/* 120E1C 802B780C 46128100 */ add.s $f4, $f16, $f18 +/* 120E20 802B7810 4600218D */ trunc.w.s $f6, $f4 +/* 120E24 802B7814 440F3000 */ mfc1 $t7, $f6 +/* 120E28 802B7818 00000000 */ nop +/* 120E2C 802B781C 000FC040 */ sll $t8, $t7, 1 +/* 120E30 802B7820 00781821 */ addu $v1, $v1, $t8 +/* 120E34 802B7824 9463F370 */ lhu $v1, %lo(D_802BF370)($v1) # -0xc90 +/* 120E38 802B7828 03E00008 */ jr $ra +/* 120E3C 802B782C 00601025 */ move $v0, $v1 diff --git a/asm/non_matchings/math_util/func_802B7830.s b/asm/non_matchings/math_util/func_802B7830.s new file mode 100644 index 000000000..2eac79eb2 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7830.s @@ -0,0 +1,107 @@ +glabel func_802B7830 +/* 120E40 802B7830 44800000 */ mtc1 $zero, $f0 +/* 120E44 802B7834 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 120E48 802B7838 F7B60018 */ sdc1 $f22, 0x18($sp) +/* 120E4C 802B783C 460C003E */ c.le.s $f0, $f12 +/* 120E50 802B7840 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 120E54 802B7844 46007506 */ mov.s $f20, $f14 +/* 120E58 802B7848 46006586 */ mov.s $f22, $f12 +/* 120E5C 802B784C 45000029 */ bc1f .L802B78F4 +/* 120E60 802B7850 AFBF0024 */ sw $ra, 0x24($sp) +/* 120E64 802B7854 460E003E */ c.le.s $f0, $f14 +/* 120E68 802B7858 00000000 */ nop +/* 120E6C 802B785C 45020012 */ bc1fl .L802B78A8 +/* 120E70 802B7860 4600A507 */ neg.s $f20, $f20 +/* 120E74 802B7864 460E603E */ c.le.s $f12, $f14 +/* 120E78 802B7868 00000000 */ nop +/* 120E7C 802B786C 45020006 */ bc1fl .L802B7888 +/* 120E80 802B7870 4600A306 */ mov.s $f12, $f20 +/* 120E84 802B7874 0C0ADDE4 */ jal func_802B7790 +/* 120E88 802B7878 00000000 */ nop +/* 120E8C 802B787C 10000048 */ b .L802B79A0 +/* 120E90 802B7880 3043FFFF */ andi $v1, $v0, 0xffff +/* 120E94 802B7884 4600A306 */ mov.s $f12, $f20 +.L802B7888: +/* 120E98 802B7888 0C0ADDE4 */ jal func_802B7790 +/* 120E9C 802B788C 4600B386 */ mov.s $f14, $f22 +/* 120EA0 802B7890 240E4000 */ li $t6, 16384 +/* 120EA4 802B7894 01C21823 */ subu $v1, $t6, $v0 +/* 120EA8 802B7898 306FFFFF */ andi $t7, $v1, 0xffff +/* 120EAC 802B789C 10000040 */ b .L802B79A0 +/* 120EB0 802B78A0 01E01825 */ move $v1, $t7 +/* 120EB4 802B78A4 4600A507 */ neg.s $f20, $f20 +.L802B78A8: +/* 120EB8 802B78A8 4616A03C */ c.lt.s $f20, $f22 +/* 120EBC 802B78AC 00000000 */ nop +/* 120EC0 802B78B0 45020009 */ bc1fl .L802B78D8 +/* 120EC4 802B78B4 4600B306 */ mov.s $f12, $f22 +/* 120EC8 802B78B8 4600A306 */ mov.s $f12, $f20 +/* 120ECC 802B78BC 0C0ADDE4 */ jal func_802B7790 +/* 120ED0 802B78C0 4600B386 */ mov.s $f14, $f22 +/* 120ED4 802B78C4 24434000 */ addiu $v1, $v0, 0x4000 +/* 120ED8 802B78C8 3078FFFF */ andi $t8, $v1, 0xffff +/* 120EDC 802B78CC 10000034 */ b .L802B79A0 +/* 120EE0 802B78D0 03001825 */ move $v1, $t8 +/* 120EE4 802B78D4 4600B306 */ mov.s $f12, $f22 +.L802B78D8: +/* 120EE8 802B78D8 0C0ADDE4 */ jal func_802B7790 +/* 120EEC 802B78DC 4600A386 */ mov.s $f14, $f20 +/* 120EF0 802B78E0 34198000 */ li $t9, 32768 +/* 120EF4 802B78E4 03221823 */ subu $v1, $t9, $v0 +/* 120EF8 802B78E8 3068FFFF */ andi $t0, $v1, 0xffff +/* 120EFC 802B78EC 1000002C */ b .L802B79A0 +/* 120F00 802B78F0 01001825 */ move $v1, $t0 +.L802B78F4: +/* 120F04 802B78F4 4600A03C */ c.lt.s $f20, $f0 +/* 120F08 802B78F8 4600B587 */ neg.s $f22, $f22 +/* 120F0C 802B78FC 45020017 */ bc1fl .L802B795C +/* 120F10 802B7900 4616A03C */ c.lt.s $f20, $f22 +/* 120F14 802B7904 4600A507 */ neg.s $f20, $f20 +/* 120F18 802B7908 4614B03E */ c.le.s $f22, $f20 +/* 120F1C 802B790C 00000000 */ nop +/* 120F20 802B7910 4502000A */ bc1fl .L802B793C +/* 120F24 802B7914 4600A306 */ mov.s $f12, $f20 +/* 120F28 802B7918 4600B306 */ mov.s $f12, $f22 +/* 120F2C 802B791C 0C0ADDE4 */ jal func_802B7790 +/* 120F30 802B7920 4600A386 */ mov.s $f14, $f20 +/* 120F34 802B7924 34018000 */ li $at, 32768 +/* 120F38 802B7928 00411821 */ addu $v1, $v0, $at +/* 120F3C 802B792C 3069FFFF */ andi $t1, $v1, 0xffff +/* 120F40 802B7930 1000001B */ b .L802B79A0 +/* 120F44 802B7934 01201825 */ move $v1, $t1 +/* 120F48 802B7938 4600A306 */ mov.s $f12, $f20 +.L802B793C: +/* 120F4C 802B793C 0C0ADDE4 */ jal func_802B7790 +/* 120F50 802B7940 4600B386 */ mov.s $f14, $f22 +/* 120F54 802B7944 340AC000 */ li $t2, 49152 +/* 120F58 802B7948 01421823 */ subu $v1, $t2, $v0 +/* 120F5C 802B794C 306BFFFF */ andi $t3, $v1, 0xffff +/* 120F60 802B7950 10000013 */ b .L802B79A0 +/* 120F64 802B7954 01601825 */ move $v1, $t3 +/* 120F68 802B7958 4616A03C */ c.lt.s $f20, $f22 +.L802B795C: +/* 120F6C 802B795C 00000000 */ nop +/* 120F70 802B7960 4502000A */ bc1fl .L802B798C +/* 120F74 802B7964 4600B306 */ mov.s $f12, $f22 +/* 120F78 802B7968 4600A306 */ mov.s $f12, $f20 +/* 120F7C 802B796C 0C0ADDE4 */ jal func_802B7790 +/* 120F80 802B7970 4600B386 */ mov.s $f14, $f22 +/* 120F84 802B7974 3401C000 */ li $at, 49152 +/* 120F88 802B7978 00411821 */ addu $v1, $v0, $at +/* 120F8C 802B797C 306CFFFF */ andi $t4, $v1, 0xffff +/* 120F90 802B7980 10000007 */ b .L802B79A0 +/* 120F94 802B7984 01801825 */ move $v1, $t4 +/* 120F98 802B7988 4600B306 */ mov.s $f12, $f22 +.L802B798C: +/* 120F9C 802B798C 0C0ADDE4 */ jal func_802B7790 +/* 120FA0 802B7990 4600A386 */ mov.s $f14, $f20 +/* 120FA4 802B7994 00021823 */ negu $v1, $v0 +/* 120FA8 802B7998 306DFFFF */ andi $t5, $v1, 0xffff +/* 120FAC 802B799C 01A01825 */ move $v1, $t5 +.L802B79A0: +/* 120FB0 802B79A0 8FBF0024 */ lw $ra, 0x24($sp) +/* 120FB4 802B79A4 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 120FB8 802B79A8 D7B60018 */ ldc1 $f22, 0x18($sp) +/* 120FBC 802B79AC 27BD0028 */ addiu $sp, $sp, 0x28 +/* 120FC0 802B79B0 03E00008 */ jr $ra +/* 120FC4 802B79B4 00601025 */ move $v0, $v1 diff --git a/asm/non_matchings/math_util/func_802B79B8.s b/asm/non_matchings/math_util/func_802B79B8.s new file mode 100644 index 000000000..32229f546 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B79B8.s @@ -0,0 +1,16 @@ +glabel func_802B79B8 +/* 120FC8 802B79B8 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 120FCC 802B79BC AFBF0014 */ sw $ra, 0x14($sp) +/* 120FD0 802B79C0 0C0ADE0C */ jal func_802B7830 +/* 120FD4 802B79C4 00000000 */ nop +/* 120FD8 802B79C8 44822000 */ mtc1 $v0, $f4 +/* 120FDC 802B79CC 8FBF0014 */ lw $ra, 0x14($sp) +/* 120FE0 802B79D0 04410005 */ bgez $v0, .L802B79E8 +/* 120FE4 802B79D4 46802020 */ cvt.s.w $f0, $f4 +/* 120FE8 802B79D8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 +/* 120FEC 802B79DC 44813000 */ mtc1 $at, $f6 +/* 120FF0 802B79E0 00000000 */ nop +/* 120FF4 802B79E4 46060000 */ add.s $f0, $f0, $f6 +.L802B79E8: +/* 120FF8 802B79E8 03E00008 */ jr $ra +/* 120FFC 802B79EC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/math_util/func_802B79F0.s b/asm/non_matchings/math_util/func_802B79F0.s new file mode 100644 index 000000000..7678f9c11 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B79F0.s @@ -0,0 +1,98 @@ +glabel func_802B79F0 +/* 121000 802B79F0 46007021 */ cvt.d.s $f0, $f14 +/* 121004 802B79F4 460E6403 */ div.s $f16, $f12, $f14 +/* 121008 802B79F8 00001025 */ move $v0, $zero +/* 12100C 802B79FC 46200085 */ abs.d $f2, $f0 +/* 121010 802B7A00 46006021 */ cvt.d.s $f0, $f12 +/* 121014 802B7A04 46200005 */ abs.d $f0, $f0 +/* 121018 802B7A08 4620103C */ c.lt.d $f2, $f0 +/* 12101C 802B7A0C 00000000 */ nop +/* 121020 802B7A10 45000002 */ bc1f .L802B7A1C +/* 121024 802B7A14 00000000 */ nop +/* 121028 802B7A18 24020001 */ li $v0, 1 +.L802B7A1C: +/* 12102C 802B7A1C 10400002 */ beqz $v0, .L802B7A28 +/* 121030 802B7A20 00000000 */ nop +/* 121034 802B7A24 460C7403 */ div.s $f16, $f14, $f12 +.L802B7A28: +/* 121038 802B7A28 46108002 */ mul.s $f0, $f16, $f16 +/* 12103C 802B7A2C 3C01802C */ lui $at, %hi(D_802B9FDC) # $at, 0x802c +/* 121040 802B7A30 C4249FDC */ lwc1 $f4, %lo(D_802B9FDC)($at) +/* 121044 802B7A34 3C01802C */ lui $at, %hi(D_802B9FE0) # $at, 0x802c +/* 121048 802B7A38 C4269FE0 */ lwc1 $f6, %lo(D_802B9FE0)($at) +/* 12104C 802B7A3C 3C01802C */ lui $at, %hi(D_802B9FE4) # $at, 0x802c +/* 121050 802B7A40 46000082 */ mul.s $f2, $f0, $f0 +/* 121054 802B7A44 00000000 */ nop +/* 121058 802B7A48 46060202 */ mul.s $f8, $f0, $f6 +/* 12105C 802B7A4C C4269FE4 */ lwc1 $f6, %lo(D_802B9FE4)($at) +/* 121060 802B7A50 3C01802C */ lui $at, %hi(D_802B9FE8) # $at, 0x802c +/* 121064 802B7A54 46082280 */ add.s $f10, $f4, $f8 +/* 121068 802B7A58 C4289FE8 */ lwc1 $f8, %lo(D_802B9FE8)($at) +/* 12106C 802B7A5C 3C01802C */ lui $at, %hi(D_802B9FEC) # $at, 0x802c +/* 121070 802B7A60 460A1482 */ mul.s $f18, $f2, $f10 +/* 121074 802B7A64 46069100 */ add.s $f4, $f18, $f6 +/* 121078 802B7A68 46080282 */ mul.s $f10, $f0, $f8 +/* 12107C 802B7A6C 460A2480 */ add.s $f18, $f4, $f10 +/* 121080 802B7A70 46021182 */ mul.s $f6, $f2, $f2 +/* 121084 802B7A74 C4249FEC */ lwc1 $f4, %lo(D_802B9FEC)($at) +/* 121088 802B7A78 3C01802C */ lui $at, %hi(D_802B9FF0) # $at, 0x802c +/* 12108C 802B7A7C C42A9FF0 */ lwc1 $f10, %lo(D_802B9FF0)($at) +/* 121090 802B7A80 3C01802C */ lui $at, %hi(D_802B9FF4) # $at, 0x802c +/* 121094 802B7A84 46069202 */ mul.s $f8, $f18, $f6 +/* 121098 802B7A88 00000000 */ nop +/* 12109C 802B7A8C 460A0482 */ mul.s $f18, $f0, $f10 +/* 1210A0 802B7A90 46122180 */ add.s $f6, $f4, $f18 +/* 1210A4 802B7A94 C4329FF4 */ lwc1 $f18, %lo(D_802B9FF4)($at) +/* 1210A8 802B7A98 3C01802C */ lui $at, %hi(D_802B9FF8) # $at, 0x802c +/* 1210AC 802B7A9C 46023282 */ mul.s $f10, $f6, $f2 +/* 1210B0 802B7AA0 460A4100 */ add.s $f4, $f8, $f10 +/* 1210B4 802B7AA4 C4289FF8 */ lwc1 $f8, %lo(D_802B9FF8)($at) +/* 1210B8 802B7AA8 46080282 */ mul.s $f10, $f0, $f8 +/* 1210BC 802B7AAC 46122180 */ add.s $f6, $f4, $f18 +/* 1210C0 802B7AB0 46008482 */ mul.s $f18, $f16, $f0 +/* 1210C4 802B7AB4 460A3100 */ add.s $f4, $f6, $f10 +/* 1210C8 802B7AB8 46122202 */ mul.s $f8, $f4, $f18 +/* 1210CC 802B7ABC 10400013 */ beqz $v0, .L802B7B0C +/* 1210D0 802B7AC0 46088400 */ add.s $f16, $f16, $f8 +/* 1210D4 802B7AC4 44800000 */ mtc1 $zero, $f0 +/* 1210D8 802B7AC8 3C01802C */ lui $at, %hi(D_802BA008) +/* 1210DC 802B7ACC 4600603C */ c.lt.s $f12, $f0 +/* 1210E0 802B7AD0 00000000 */ nop +/* 1210E4 802B7AD4 45000008 */ bc1f .L802B7AF8 +/* 1210E8 802B7AD8 00000000 */ nop +/* 1210EC 802B7ADC 3C01802C */ lui $at, %hi(D_802BA000) +/* 1210F0 802B7AE0 D422A000 */ ldc1 $f2, %lo(D_802BA000)($at) +/* 1210F4 802B7AE4 460081A1 */ cvt.d.s $f6, $f16 +/* 1210F8 802B7AE8 46201087 */ neg.d $f2, $f2 +/* 1210FC 802B7AEC 46261281 */ sub.d $f10, $f2, $f6 +/* 121100 802B7AF0 03E00008 */ jr $ra +/* 121104 802B7AF4 46205020 */ cvt.s.d $f0, $f10 + +.L802B7AF8: +/* 121108 802B7AF8 D422A008 */ ldc1 $f2, %lo(D_802BA008)($at) +/* 12110C 802B7AFC 460081A1 */ cvt.d.s $f6, $f16 +/* 121110 802B7B00 46261281 */ sub.d $f10, $f2, $f6 +/* 121114 802B7B04 03E00008 */ jr $ra +/* 121118 802B7B08 46205020 */ cvt.s.d $f0, $f10 + +.L802B7B0C: +/* 12111C 802B7B0C 44800000 */ mtc1 $zero, $f0 +/* 121120 802B7B10 00000000 */ nop +/* 121124 802B7B14 460E003E */ c.le.s $f0, $f14 +/* 121128 802B7B18 00000000 */ nop +/* 12112C 802B7B1C 45020004 */ bc1fl .L802B7B30 +/* 121130 802B7B20 4600603C */ c.lt.s $f12, $f0 +/* 121134 802B7B24 03E00008 */ jr $ra +/* 121138 802B7B28 46008006 */ mov.s $f0, $f16 + +/* 12113C 802B7B2C 4600603C */ c.lt.s $f12, $f0 +.L802B7B30: +/* 121140 802B7B30 3C01802C */ lui $at, %hi(D_802BA010) # $at, 0x802c +/* 121144 802B7B34 C42EA010 */ lwc1 $f14, %lo(D_802BA010)($at) +/* 121148 802B7B38 45000002 */ bc1f .L802B7B44 +/* 12114C 802B7B3C 460E8080 */ add.s $f2, $f16, $f14 +/* 121150 802B7B40 460E8081 */ sub.s $f2, $f16, $f14 +.L802B7B44: +/* 121154 802B7B44 46001006 */ mov.s $f0, $f2 +/* 121158 802B7B48 03E00008 */ jr $ra +/* 12115C 802B7B4C 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B7B50.s b/asm/non_matchings/math_util/func_802B7B50.s new file mode 100644 index 000000000..ebc07a81a --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7B50.s @@ -0,0 +1,54 @@ +glabel func_802B7B50 +/* 121160 802B7B50 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 121164 802B7B54 AFBF0014 */ sw $ra, 0x14($sp) +/* 121168 802B7B58 0C0ADE6E */ jal func_802B79B8 +/* 12116C 802B7B5C 00000000 */ nop +/* 121170 802B7B60 3C014700 */ li $at, 0x47000000 # 32768.000000 +/* 121174 802B7B64 44812000 */ mtc1 $at, $f4 +/* 121178 802B7B68 3C01802C */ lui $at, %hi(D_802BA018) +/* 12117C 802B7B6C D42AA018 */ ldc1 $f10, %lo(D_802BA018)($at) +/* 121180 802B7B70 46040182 */ mul.s $f6, $f0, $f4 +/* 121184 802B7B74 24020001 */ li $v0, 1 +/* 121188 802B7B78 8FBF0014 */ lw $ra, 0x14($sp) +/* 12118C 802B7B7C 27BD0018 */ addiu $sp, $sp, 0x18 +/* 121190 802B7B80 3C0141E0 */ li $at, 0x41E00000 # 28.000000 +/* 121194 802B7B84 46003221 */ cvt.d.s $f8, $f6 +/* 121198 802B7B88 462A4403 */ div.d $f16, $f8, $f10 +/* 12119C 802B7B8C 444EF800 */ cfc1 $t6, $31 +/* 1211A0 802B7B90 44C2F800 */ ctc1 $v0, $31 +/* 1211A4 802B7B94 00000000 */ nop +/* 1211A8 802B7B98 462084A4 */ cvt.w.d $f18, $f16 +/* 1211AC 802B7B9C 4442F800 */ cfc1 $v0, $31 +/* 1211B0 802B7BA0 00000000 */ nop +/* 1211B4 802B7BA4 30420078 */ andi $v0, $v0, 0x78 +/* 1211B8 802B7BA8 50400014 */ beql $v0, $zero, .L802B7BFC +/* 1211BC 802B7BAC 44029000 */ mfc1 $v0, $f18 +/* 1211C0 802B7BB0 44819800 */ mtc1 $at, $f19 +/* 1211C4 802B7BB4 44809000 */ mtc1 $zero, $f18 +/* 1211C8 802B7BB8 24020001 */ li $v0, 1 +/* 1211CC 802B7BBC 46328481 */ sub.d $f18, $f16, $f18 +/* 1211D0 802B7BC0 44C2F800 */ ctc1 $v0, $31 +/* 1211D4 802B7BC4 00000000 */ nop +/* 1211D8 802B7BC8 462094A4 */ cvt.w.d $f18, $f18 +/* 1211DC 802B7BCC 4442F800 */ cfc1 $v0, $31 +/* 1211E0 802B7BD0 00000000 */ nop +/* 1211E4 802B7BD4 30420078 */ andi $v0, $v0, 0x78 +/* 1211E8 802B7BD8 14400005 */ bnez $v0, .L802B7BF0 +/* 1211EC 802B7BDC 00000000 */ nop +/* 1211F0 802B7BE0 44029000 */ mfc1 $v0, $f18 +/* 1211F4 802B7BE4 3C018000 */ lui $at, 0x8000 +/* 1211F8 802B7BE8 10000007 */ b .L802B7C08 +/* 1211FC 802B7BEC 00411025 */ or $v0, $v0, $at +.L802B7BF0: +/* 121200 802B7BF0 10000005 */ b .L802B7C08 +/* 121204 802B7BF4 2402FFFF */ li $v0, -1 +/* 121208 802B7BF8 44029000 */ mfc1 $v0, $f18 +.L802B7BFC: +/* 12120C 802B7BFC 00000000 */ nop +/* 121210 802B7C00 0440FFFB */ bltz $v0, .L802B7BF0 +/* 121214 802B7C04 00000000 */ nop +.L802B7C08: +/* 121218 802B7C08 44CEF800 */ ctc1 $t6, $31 +/* 12121C 802B7C0C 304FFFFF */ andi $t7, $v0, 0xffff +/* 121220 802B7C10 03E00008 */ jr $ra +/* 121224 802B7C14 01E01025 */ move $v0, $t7 diff --git a/asm/non_matchings/math_util/func_802B7C18.s b/asm/non_matchings/math_util/func_802B7C18.s new file mode 100644 index 000000000..ab3749280 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7C18.s @@ -0,0 +1,11 @@ +glabel func_802B7C18 +/* 121228 802B7C18 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 12122C 802B7C1C 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 121230 802B7C20 AFBF0014 */ sw $ra, 0x14($sp) +/* 121234 802B7C24 44817000 */ mtc1 $at, $f14 +/* 121238 802B7C28 0C0ADE6E */ jal func_802B79B8 +/* 12123C 802B7C2C 00000000 */ nop +/* 121240 802B7C30 8FBF0014 */ lw $ra, 0x14($sp) +/* 121244 802B7C34 27BD0018 */ addiu $sp, $sp, 0x18 +/* 121248 802B7C38 03E00008 */ jr $ra +/* 12124C 802B7C3C 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B7C40.s b/asm/non_matchings/math_util/func_802B7C40.s new file mode 100644 index 000000000..4a52c6e4a --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7C40.s @@ -0,0 +1,12 @@ +glabel func_802B7C40 +/* 121250 802B7C40 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 121254 802B7C44 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 121258 802B7C48 AFBF0014 */ sw $ra, 0x14($sp) +/* 12125C 802B7C4C 44817000 */ mtc1 $at, $f14 +/* 121260 802B7C50 0C0ADE0C */ jal func_802B7830 +/* 121264 802B7C54 00000000 */ nop +/* 121268 802B7C58 8FBF0014 */ lw $ra, 0x14($sp) +/* 12126C 802B7C5C 00027400 */ sll $t6, $v0, 0x10 +/* 121270 802B7C60 000E1403 */ sra $v0, $t6, 0x10 +/* 121274 802B7C64 03E00008 */ jr $ra +/* 121278 802B7C68 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/math_util/func_802B7C6C.s b/asm/non_matchings/math_util/func_802B7C6C.s new file mode 100644 index 000000000..be56a55b8 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7C6C.s @@ -0,0 +1,16 @@ +glabel func_802B7C6C +/* 12127C 802B7C6C 460C6182 */ mul.s $f6, $f12, $f12 +/* 121280 802B7C70 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 +/* 121284 802B7C74 44812800 */ mtc1 $at, $f5 +/* 121288 802B7C78 44802000 */ mtc1 $zero, $f4 +/* 12128C 802B7C7C 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 121290 802B7C80 AFBF0014 */ sw $ra, 0x14($sp) +/* 121294 802B7C84 46003221 */ cvt.d.s $f8, $f6 +/* 121298 802B7C88 46282281 */ sub.d $f10, $f4, $f8 +/* 12129C 802B7C8C 46205020 */ cvt.s.d $f0, $f10 +/* 1212A0 802B7C90 0C0ADE6E */ jal func_802B79B8 +/* 1212A4 802B7C94 46000384 */ sqrt.s $f14, $f0 +/* 1212A8 802B7C98 8FBF0014 */ lw $ra, 0x14($sp) +/* 1212AC 802B7C9C 27BD0018 */ addiu $sp, $sp, 0x18 +/* 1212B0 802B7CA0 03E00008 */ jr $ra +/* 1212B4 802B7CA4 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B7CA8.s b/asm/non_matchings/math_util/func_802B7CA8.s new file mode 100644 index 000000000..13377eec2 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7CA8.s @@ -0,0 +1,17 @@ +glabel func_802B7CA8 +/* 1212B8 802B7CA8 460C6182 */ mul.s $f6, $f12, $f12 +/* 1212BC 802B7CAC 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 +/* 1212C0 802B7CB0 44812800 */ mtc1 $at, $f5 +/* 1212C4 802B7CB4 44802000 */ mtc1 $zero, $f4 +/* 1212C8 802B7CB8 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 1212CC 802B7CBC AFBF0014 */ sw $ra, 0x14($sp) +/* 1212D0 802B7CC0 46003221 */ cvt.d.s $f8, $f6 +/* 1212D4 802B7CC4 46282281 */ sub.d $f10, $f4, $f8 +/* 1212D8 802B7CC8 46205020 */ cvt.s.d $f0, $f10 +/* 1212DC 802B7CCC 0C0ADE0C */ jal func_802B7830 +/* 1212E0 802B7CD0 46000384 */ sqrt.s $f14, $f0 +/* 1212E4 802B7CD4 8FBF0014 */ lw $ra, 0x14($sp) +/* 1212E8 802B7CD8 00027400 */ sll $t6, $v0, 0x10 +/* 1212EC 802B7CDC 000E1403 */ sra $v0, $t6, 0x10 +/* 1212F0 802B7CE0 03E00008 */ jr $ra +/* 1212F4 802B7CE4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/math_util/func_802B7CE8.s b/asm/non_matchings/math_util/func_802B7CE8.s new file mode 100644 index 000000000..31221db0d --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7CE8.s @@ -0,0 +1,17 @@ +glabel func_802B7CE8 +/* 1212F8 802B7CE8 460C6182 */ mul.s $f6, $f12, $f12 +/* 1212FC 802B7CEC 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 +/* 121300 802B7CF0 44812800 */ mtc1 $at, $f5 +/* 121304 802B7CF4 44802000 */ mtc1 $zero, $f4 +/* 121308 802B7CF8 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 12130C 802B7CFC AFBF0014 */ sw $ra, 0x14($sp) +/* 121310 802B7D00 46006386 */ mov.s $f14, $f12 +/* 121314 802B7D04 46003221 */ cvt.d.s $f8, $f6 +/* 121318 802B7D08 46282281 */ sub.d $f10, $f4, $f8 +/* 12131C 802B7D0C 46205020 */ cvt.s.d $f0, $f10 +/* 121320 802B7D10 0C0ADE6E */ jal func_802B79B8 +/* 121324 802B7D14 46000304 */ sqrt.s $f12, $f0 +/* 121328 802B7D18 8FBF0014 */ lw $ra, 0x14($sp) +/* 12132C 802B7D1C 27BD0018 */ addiu $sp, $sp, 0x18 +/* 121330 802B7D20 03E00008 */ jr $ra +/* 121334 802B7D24 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B7D28.s b/asm/non_matchings/math_util/func_802B7D28.s new file mode 100644 index 000000000..4ca43ada9 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7D28.s @@ -0,0 +1,28 @@ +glabel func_802B7D28 +/* 121338 802B7D28 460C6182 */ mul.s $f6, $f12, $f12 +/* 12133C 802B7D2C 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 +/* 121340 802B7D30 44812800 */ mtc1 $at, $f5 +/* 121344 802B7D34 44802000 */ mtc1 $zero, $f4 +/* 121348 802B7D38 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 12134C 802B7D3C AFBF0014 */ sw $ra, 0x14($sp) +/* 121350 802B7D40 46006386 */ mov.s $f14, $f12 +/* 121354 802B7D44 46003221 */ cvt.d.s $f8, $f6 +/* 121358 802B7D48 46282281 */ sub.d $f10, $f4, $f8 +/* 12135C 802B7D4C 46205020 */ cvt.s.d $f0, $f10 +/* 121360 802B7D50 0C0ADE6E */ jal func_802B79B8 +/* 121364 802B7D54 46000304 */ sqrt.s $f12, $f0 +/* 121368 802B7D58 3C014700 */ li $at, 0x47000000 # 32768.000000 +/* 12136C 802B7D5C 44818000 */ mtc1 $at, $f16 +/* 121370 802B7D60 3C01802C */ lui $at, %hi(D_802BA020) +/* 121374 802B7D64 D424A020 */ ldc1 $f4, %lo(D_802BA020)($at) +/* 121378 802B7D68 46100482 */ mul.s $f18, $f0, $f16 +/* 12137C 802B7D6C 8FBF0014 */ lw $ra, 0x14($sp) +/* 121380 802B7D70 27BD0018 */ addiu $sp, $sp, 0x18 +/* 121384 802B7D74 460091A1 */ cvt.d.s $f6, $f18 +/* 121388 802B7D78 46243203 */ div.d $f8, $f6, $f4 +/* 12138C 802B7D7C 4620428D */ trunc.w.d $f10, $f8 +/* 121390 802B7D80 44025000 */ mfc1 $v0, $f10 +/* 121394 802B7D84 00000000 */ nop +/* 121398 802B7D88 00027C00 */ sll $t7, $v0, 0x10 +/* 12139C 802B7D8C 03E00008 */ jr $ra +/* 1213A0 802B7D90 000F1403 */ sra $v0, $t7, 0x10 diff --git a/asm/non_matchings/math_util/func_802B7F34.s b/asm/non_matchings/math_util/func_802B7F34.s new file mode 100644 index 000000000..0b66a88d0 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7F34.s @@ -0,0 +1,19 @@ +glabel func_802B7F34 +/* 121544 802B7F34 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 121548 802B7F38 E7AC0018 */ swc1 $f12, 0x18($sp) +/* 12154C 802B7F3C C7B20018 */ lwc1 $f18, 0x18($sp) +/* 121550 802B7F40 E7AE001C */ swc1 $f14, 0x1c($sp) +/* 121554 802B7F44 C7B0001C */ lwc1 $f16, 0x1c($sp) +/* 121558 802B7F48 AFA60020 */ sw $a2, 0x20($sp) +/* 12155C 802B7F4C C7AA0020 */ lwc1 $f10, 0x20($sp) +/* 121560 802B7F50 AFA70024 */ sw $a3, 0x24($sp) +/* 121564 802B7F54 C7A80024 */ lwc1 $f8, 0x24($sp) +/* 121568 802B7F58 46125301 */ sub.s $f12, $f10, $f18 +/* 12156C 802B7F5C AFBF0014 */ sw $ra, 0x14($sp) +/* 121570 802B7F60 0C0ADE0C */ jal func_802B7830 +/* 121574 802B7F64 46104381 */ sub.s $f14, $f8, $f16 +/* 121578 802B7F68 8FBF0014 */ lw $ra, 0x14($sp) +/* 12157C 802B7F6C 00027400 */ sll $t6, $v0, 0x10 +/* 121580 802B7F70 000E1403 */ sra $v0, $t6, 0x10 +/* 121584 802B7F74 03E00008 */ jr $ra +/* 121588 802B7F78 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/math_util/func_802B7F7C.s b/asm/non_matchings/math_util/func_802B7F7C.s new file mode 100644 index 000000000..5bb53610c --- /dev/null +++ b/asm/non_matchings/math_util/func_802B7F7C.s @@ -0,0 +1,40 @@ +glabel func_802B7F7C +/* 12158C 802B7F7C 27BDFFD0 */ addiu $sp, $sp, -0x30 +/* 121590 802B7F80 AFBF0014 */ sw $ra, 0x14($sp) +/* 121594 802B7F84 AFA60038 */ sw $a2, 0x38($sp) +/* 121598 802B7F88 C4840004 */ lwc1 $f4, 4($a0) +/* 12159C 802B7F8C C48E0000 */ lwc1 $f14, ($a0) +/* 1215A0 802B7F90 E7A40028 */ swc1 $f4, 0x28($sp) +/* 1215A4 802B7F94 C4A60004 */ lwc1 $f6, 4($a1) +/* 1215A8 802B7F98 C48C0008 */ lwc1 $f12, 8($a0) +/* 1215AC 802B7F9C C4A20000 */ lwc1 $f2, ($a1) +/* 1215B0 802B7FA0 E7A6001C */ swc1 $f6, 0x1c($sp) +/* 1215B4 802B7FA4 C4A00008 */ lwc1 $f0, 8($a1) +/* 1215B8 802B7FA8 44071000 */ mfc1 $a3, $f2 +/* 1215BC 802B7FAC E7AE002C */ swc1 $f14, 0x2c($sp) +/* 1215C0 802B7FB0 44060000 */ mfc1 $a2, $f0 +/* 1215C4 802B7FB4 E7AC0024 */ swc1 $f12, 0x24($sp) +/* 1215C8 802B7FB8 E7A20020 */ swc1 $f2, 0x20($sp) +/* 1215CC 802B7FBC 0C0ADFCD */ jal func_802B7F34 +/* 1215D0 802B7FC0 E7A00018 */ swc1 $f0, 0x18($sp) +/* 1215D4 802B7FC4 8FAE0038 */ lw $t6, 0x38($sp) +/* 1215D8 802B7FC8 C7A00018 */ lwc1 $f0, 0x18($sp) +/* 1215DC 802B7FCC A5C20002 */ sh $v0, 2($t6) +/* 1215E0 802B7FD0 44070000 */ mfc1 $a3, $f0 +/* 1215E4 802B7FD4 8FA6001C */ lw $a2, 0x1c($sp) +/* 1215E8 802B7FD8 C7AE0024 */ lwc1 $f14, 0x24($sp) +/* 1215EC 802B7FDC 0C0ADFCD */ jal func_802B7F34 +/* 1215F0 802B7FE0 C7AC0028 */ lwc1 $f12, 0x28($sp) +/* 1215F4 802B7FE4 8FAF0038 */ lw $t7, 0x38($sp) +/* 1215F8 802B7FE8 A5E20000 */ sh $v0, ($t7) +/* 1215FC 802B7FEC 8FA7001C */ lw $a3, 0x1c($sp) +/* 121600 802B7FF0 8FA60020 */ lw $a2, 0x20($sp) +/* 121604 802B7FF4 C7AE0028 */ lwc1 $f14, 0x28($sp) +/* 121608 802B7FF8 0C0ADFCD */ jal func_802B7F34 +/* 12160C 802B7FFC C7AC002C */ lwc1 $f12, 0x2c($sp) +/* 121610 802B8000 8FB80038 */ lw $t8, 0x38($sp) +/* 121614 802B8004 A7020004 */ sh $v0, 4($t8) +/* 121618 802B8008 8FBF0014 */ lw $ra, 0x14($sp) +/* 12161C 802B800C 27BD0030 */ addiu $sp, $sp, 0x30 +/* 121620 802B8010 03E00008 */ jr $ra +/* 121624 802B8014 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B8018.s b/asm/non_matchings/math_util/func_802B8018.s new file mode 100644 index 000000000..0dffe06c0 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B8018.s @@ -0,0 +1,9 @@ +glabel func_802B8018 +/* 121628 802B8018 308EFFFF */ andi $t6, $a0, 0xffff +/* 12162C 802B801C 000E7903 */ sra $t7, $t6, 4 +/* 121630 802B8020 000FC080 */ sll $t8, $t7, 2 +/* 121634 802B8024 3C01802C */ lui $at, %hi(D_802BA370) +/* 121638 802B8028 00380821 */ addu $at, $at, $t8 +/* 12163C 802B802C AFA40000 */ sw $a0, ($sp) +/* 121640 802B8030 03E00008 */ jr $ra +/* 121644 802B8034 C420A370 */ lwc1 $f0, %lo(D_802BA370)($at) diff --git a/asm/non_matchings/math_util/func_802B8038.s b/asm/non_matchings/math_util/func_802B8038.s new file mode 100644 index 000000000..0593e959b --- /dev/null +++ b/asm/non_matchings/math_util/func_802B8038.s @@ -0,0 +1,9 @@ +glabel func_802B8038 +/* 121648 802B8038 308EFFFF */ andi $t6, $a0, 0xffff +/* 12164C 802B803C 000E7903 */ sra $t7, $t6, 4 +/* 121650 802B8040 000FC080 */ sll $t8, $t7, 2 +/* 121654 802B8044 3C01802C */ lui $at, %hi(D_802BB370) +/* 121658 802B8048 00380821 */ addu $at, $at, $t8 +/* 12165C 802B804C AFA40000 */ sw $a0, ($sp) +/* 121660 802B8050 03E00008 */ jr $ra +/* 121664 802B8054 C420B370 */ lwc1 $f0, %lo(D_802BB370)($at) diff --git a/asm/non_matchings/math_util/func_802B8058.s b/asm/non_matchings/math_util/func_802B8058.s new file mode 100644 index 000000000..715ea6855 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B8058.s @@ -0,0 +1,38 @@ +glabel func_802B8058 +/* 121668 802B8058 3083FFFF */ andi $v1, $a0, 0xffff +/* 12166C 802B805C 30AFFFFF */ andi $t7, $a1, 0xffff +/* 121670 802B8060 AFA60008 */ sw $a2, 8($sp) +/* 121674 802B8064 30D8FFFF */ andi $t8, $a2, 0xffff +/* 121678 802B8068 01E3082A */ slt $at, $t7, $v1 +/* 12167C 802B806C 03003025 */ move $a2, $t8 +/* 121680 802B8070 AFA40000 */ sw $a0, ($sp) +/* 121684 802B8074 AFA50004 */ sw $a1, 4($sp) +/* 121688 802B8078 1020000B */ beqz $at, .L802B80A8 +/* 12168C 802B807C 01E01025 */ move $v0, $t7 +/* 121690 802B8080 01F8082A */ slt $at, $t7, $t8 +/* 121694 802B8084 14200003 */ bnez $at, .L802B8094 +/* 121698 802B8088 03002025 */ move $a0, $t8 +/* 12169C 802B808C 03E00008 */ jr $ra +/* 1216A0 802B8090 00001025 */ move $v0, $zero + +.L802B8094: +/* 1216A4 802B8094 0083082A */ slt $at, $a0, $v1 +/* 1216A8 802B8098 5420000B */ bnel $at, $zero, .L802B80C8 +/* 1216AC 802B809C 24020001 */ li $v0, 1 +/* 1216B0 802B80A0 03E00008 */ jr $ra +/* 1216B4 802B80A4 00001025 */ move $v0, $zero + +.L802B80A8: +/* 1216B8 802B80A8 0046082A */ slt $at, $v0, $a2 +/* 1216BC 802B80AC 14200005 */ bnez $at, .L802B80C4 +/* 1216C0 802B80B0 00C3082A */ slt $at, $a2, $v1 +/* 1216C4 802B80B4 54200004 */ bnel $at, $zero, .L802B80C8 +/* 1216C8 802B80B8 24020001 */ li $v0, 1 +/* 1216CC 802B80BC 03E00008 */ jr $ra +/* 1216D0 802B80C0 00001025 */ move $v0, $zero + +.L802B80C4: +/* 1216D4 802B80C4 24020001 */ li $v0, 1 +.L802B80C8: +/* 1216D8 802B80C8 03E00008 */ jr $ra +/* 1216DC 802B80CC 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B80D0.s b/asm/non_matchings/math_util/func_802B80D0.s new file mode 100644 index 000000000..355176ec4 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B80D0.s @@ -0,0 +1,227 @@ +glabel func_802B80D0 +/* 1216E0 802B80D0 27BDFFA0 */ addiu $sp, $sp, -0x60 +/* 1216E4 802B80D4 AFBF001C */ sw $ra, 0x1c($sp) +/* 1216E8 802B80D8 F7B40010 */ sdc1 $f20, 0x10($sp) +/* 1216EC 802B80DC AFA60068 */ sw $a2, 0x68($sp) +/* 1216F0 802B80E0 C4860000 */ lwc1 $f6, ($a0) +/* 1216F4 802B80E4 C4A40000 */ lwc1 $f4, ($a1) +/* 1216F8 802B80E8 C7AC0074 */ lwc1 $f12, 0x74($sp) +/* 1216FC 802B80EC 44877000 */ mtc1 $a3, $f14 +/* 121700 802B80F0 46062001 */ sub.s $f0, $f4, $f6 +/* 121704 802B80F4 97A7006A */ lhu $a3, 0x6a($sp) +/* 121708 802B80F8 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +/* 12170C 802B80FC 46000002 */ mul.s $f0, $f0, $f0 +/* 121710 802B8100 4600603C */ c.lt.s $f12, $f0 +/* 121714 802B8104 00000000 */ nop +/* 121718 802B8108 45020005 */ bc1fl .L802B8120 +/* 12171C 802B810C C4A80008 */ lwc1 $f8, 8($a1) +/* 121720 802B8110 44810000 */ mtc1 $at, $f0 +/* 121724 802B8114 100000BB */ b .L802B8404 +/* 121728 802B8118 8FBF001C */ lw $ra, 0x1c($sp) +/* 12172C 802B811C C4A80008 */ lwc1 $f8, 8($a1) +.L802B8120: +/* 121730 802B8120 C48A0008 */ lwc1 $f10, 8($a0) +/* 121734 802B8124 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +/* 121738 802B8128 460A4081 */ sub.s $f2, $f8, $f10 +/* 12173C 802B812C 46021082 */ mul.s $f2, $f2, $f2 +/* 121740 802B8130 4602603C */ c.lt.s $f12, $f2 +/* 121744 802B8134 00000000 */ nop +/* 121748 802B8138 45020005 */ bc1fl .L802B8150 +/* 12174C 802B813C 46020500 */ add.s $f20, $f0, $f2 +/* 121750 802B8140 44810000 */ mtc1 $at, $f0 +/* 121754 802B8144 100000AF */ b .L802B8404 +/* 121758 802B8148 8FBF001C */ lw $ra, 0x1c($sp) +/* 12175C 802B814C 46020500 */ add.s $f20, $f0, $f2 +.L802B8150: +/* 121760 802B8150 460EA03C */ c.lt.s $f20, $f14 +/* 121764 802B8154 00000000 */ nop +/* 121768 802B8158 45020004 */ bc1fl .L802B816C +/* 12176C 802B815C 4614603C */ c.lt.s $f12, $f20 +/* 121770 802B8160 100000A7 */ b .L802B8400 +/* 121774 802B8164 4600A006 */ mov.s $f0, $f20 +/* 121778 802B8168 4614603C */ c.lt.s $f12, $f20 +.L802B816C: +/* 12177C 802B816C 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +/* 121780 802B8170 45020005 */ bc1fl .L802B8188 +/* 121784 802B8174 A7A7006A */ sh $a3, 0x6a($sp) +/* 121788 802B8178 44810000 */ mtc1 $at, $f0 +/* 12178C 802B817C 100000A1 */ b .L802B8404 +/* 121790 802B8180 8FBF001C */ lw $ra, 0x1c($sp) +/* 121794 802B8184 A7A7006A */ sh $a3, 0x6a($sp) +.L802B8188: +/* 121798 802B8188 0C0AD489 */ jal func_802B5224 +/* 12179C 802B818C E7AE006C */ swc1 $f14, 0x6c($sp) +/* 1217A0 802B8190 C7AE006C */ lwc1 $f14, 0x6c($sp) +/* 1217A4 802B8194 44808000 */ mtc1 $zero, $f16 +/* 1217A8 802B8198 97A7006A */ lhu $a3, 0x6a($sp) +/* 1217AC 802B819C 3046FFFF */ andi $a2, $v0, 0xffff +/* 1217B0 802B81A0 46107032 */ c.eq.s $f14, $f16 +/* 1217B4 802B81A4 C7B20070 */ lwc1 $f18, 0x70($sp) +/* 1217B8 802B81A8 C7A60070 */ lwc1 $f6, 0x70($sp) +/* 1217BC 802B81AC 24030001 */ li $v1, 1 +/* 1217C0 802B81B0 4502003C */ bc1fl .L802B82A4 +/* 1217C4 802B81B4 444AF800 */ cfc1 $t2, $31 +/* 1217C8 802B81B8 444EF800 */ cfc1 $t6, $31 +/* 1217CC 802B81BC 24030001 */ li $v1, 1 +/* 1217D0 802B81C0 44C3F800 */ ctc1 $v1, $31 +/* 1217D4 802B81C4 00E01025 */ move $v0, $a3 +/* 1217D8 802B81C8 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 1217DC 802B81CC 46009124 */ cvt.w.s $f4, $f18 +/* 1217E0 802B81D0 4443F800 */ cfc1 $v1, $31 +/* 1217E4 802B81D4 00000000 */ nop +/* 1217E8 802B81D8 30630078 */ andi $v1, $v1, 0x78 +/* 1217EC 802B81DC 50600013 */ beql $v1, $zero, .L802B822C +/* 1217F0 802B81E0 44032000 */ mfc1 $v1, $f4 +/* 1217F4 802B81E4 44812000 */ mtc1 $at, $f4 +/* 1217F8 802B81E8 24030001 */ li $v1, 1 +/* 1217FC 802B81EC 46049101 */ sub.s $f4, $f18, $f4 +/* 121800 802B81F0 44C3F800 */ ctc1 $v1, $31 +/* 121804 802B81F4 00000000 */ nop +/* 121808 802B81F8 46002124 */ cvt.w.s $f4, $f4 +/* 12180C 802B81FC 4443F800 */ cfc1 $v1, $31 +/* 121810 802B8200 00000000 */ nop +/* 121814 802B8204 30630078 */ andi $v1, $v1, 0x78 +/* 121818 802B8208 14600005 */ bnez $v1, .L802B8220 +/* 12181C 802B820C 00000000 */ nop +/* 121820 802B8210 44032000 */ mfc1 $v1, $f4 +/* 121824 802B8214 3C018000 */ lui $at, 0x8000 +/* 121828 802B8218 10000007 */ b .L802B8238 +/* 12182C 802B821C 00611825 */ or $v1, $v1, $at +.L802B8220: +/* 121830 802B8220 10000005 */ b .L802B8238 +/* 121834 802B8224 2403FFFF */ li $v1, -1 +/* 121838 802B8228 44032000 */ mfc1 $v1, $f4 +.L802B822C: +/* 12183C 802B822C 00000000 */ nop +/* 121840 802B8230 0460FFFB */ bltz $v1, .L802B8220 +/* 121844 802B8234 00000000 */ nop +.L802B8238: +/* 121848 802B8238 00607825 */ move $t7, $v1 +/* 12184C 802B823C 000FC080 */ sll $t8, $t7, 2 +/* 121850 802B8240 030FC023 */ subu $t8, $t8, $t7 +/* 121854 802B8244 0018C0C0 */ sll $t8, $t8, 3 +/* 121858 802B8248 030FC023 */ subu $t8, $t8, $t7 +/* 12185C 802B824C 0018C080 */ sll $t8, $t8, 2 +/* 121860 802B8250 030FC023 */ subu $t8, $t8, $t7 +/* 121864 802B8254 0018C040 */ sll $t8, $t8, 1 +/* 121868 802B8258 3303FFFF */ andi $v1, $t8, 0xffff +/* 12186C 802B825C 00432021 */ addu $a0, $v0, $v1 +/* 121870 802B8260 00432823 */ subu $a1, $v0, $v1 +/* 121874 802B8264 30A9FFFF */ andi $t1, $a1, 0xffff +/* 121878 802B8268 3088FFFF */ andi $t0, $a0, 0xffff +/* 12187C 802B826C 44CEF800 */ ctc1 $t6, $31 +/* 121880 802B8270 01002025 */ move $a0, $t0 +/* 121884 802B8274 0C0AE016 */ jal func_802B8058 +/* 121888 802B8278 01202825 */ move $a1, $t1 +/* 12188C 802B827C 24010001 */ li $at, 1 +/* 121890 802B8280 54410004 */ bnel $v0, $at, .L802B8294 +/* 121894 802B8284 3C01BF80 */ lui $at, 0xbf80 +/* 121898 802B8288 1000005D */ b .L802B8400 +/* 12189C 802B828C 4600A006 */ mov.s $f0, $f20 +/* 1218A0 802B8290 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +.L802B8294: +/* 1218A4 802B8294 44810000 */ mtc1 $at, $f0 +/* 1218A8 802B8298 1000005A */ b .L802B8404 +/* 1218AC 802B829C 8FBF001C */ lw $ra, 0x1c($sp) +/* 1218B0 802B82A0 444AF800 */ cfc1 $t2, $31 +.L802B82A4: +/* 1218B4 802B82A4 44C3F800 */ ctc1 $v1, $31 +/* 1218B8 802B82A8 00E01025 */ move $v0, $a3 +/* 1218BC 802B82AC 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 +/* 1218C0 802B82B0 46003224 */ cvt.w.s $f8, $f6 +/* 1218C4 802B82B4 4443F800 */ cfc1 $v1, $31 +/* 1218C8 802B82B8 00000000 */ nop +/* 1218CC 802B82BC 30630078 */ andi $v1, $v1, 0x78 +/* 1218D0 802B82C0 50600013 */ beql $v1, $zero, .L802B8310 +/* 1218D4 802B82C4 44034000 */ mfc1 $v1, $f8 +/* 1218D8 802B82C8 44814000 */ mtc1 $at, $f8 +/* 1218DC 802B82CC 24030001 */ li $v1, 1 +/* 1218E0 802B82D0 46083201 */ sub.s $f8, $f6, $f8 +/* 1218E4 802B82D4 44C3F800 */ ctc1 $v1, $31 +/* 1218E8 802B82D8 00000000 */ nop +/* 1218EC 802B82DC 46004224 */ cvt.w.s $f8, $f8 +/* 1218F0 802B82E0 4443F800 */ cfc1 $v1, $31 +/* 1218F4 802B82E4 00000000 */ nop +/* 1218F8 802B82E8 30630078 */ andi $v1, $v1, 0x78 +/* 1218FC 802B82EC 14600005 */ bnez $v1, .L802B8304 +/* 121900 802B82F0 00000000 */ nop +/* 121904 802B82F4 44034000 */ mfc1 $v1, $f8 +/* 121908 802B82F8 3C018000 */ lui $at, 0x8000 +/* 12190C 802B82FC 10000007 */ b .L802B831C +/* 121910 802B8300 00611825 */ or $v1, $v1, $at +.L802B8304: +/* 121914 802B8304 10000005 */ b .L802B831C +/* 121918 802B8308 2403FFFF */ li $v1, -1 +/* 12191C 802B830C 44034000 */ mfc1 $v1, $f8 +.L802B8310: +/* 121920 802B8310 00000000 */ nop +/* 121924 802B8314 0460FFFB */ bltz $v1, .L802B8304 +/* 121928 802B8318 00000000 */ nop +.L802B831C: +/* 12192C 802B831C 00605825 */ move $t3, $v1 +/* 121930 802B8320 000B6080 */ sll $t4, $t3, 2 +/* 121934 802B8324 018B6023 */ subu $t4, $t4, $t3 +/* 121938 802B8328 000C60C0 */ sll $t4, $t4, 3 +/* 12193C 802B832C 018B6023 */ subu $t4, $t4, $t3 +/* 121940 802B8330 000C6080 */ sll $t4, $t4, 2 +/* 121944 802B8334 018B6023 */ subu $t4, $t4, $t3 +/* 121948 802B8338 000C6040 */ sll $t4, $t4, 1 +/* 12194C 802B833C 3183FFFF */ andi $v1, $t4, 0xffff +/* 121950 802B8340 00432021 */ addu $a0, $v0, $v1 +/* 121954 802B8344 00432823 */ subu $a1, $v0, $v1 +/* 121958 802B8348 30AFFFFF */ andi $t7, $a1, 0xffff +/* 12195C 802B834C 308EFFFF */ andi $t6, $a0, 0xffff +/* 121960 802B8350 44CAF800 */ ctc1 $t2, $31 +/* 121964 802B8354 01C02025 */ move $a0, $t6 +/* 121968 802B8358 AFAE0024 */ sw $t6, 0x24($sp) +/* 12196C 802B835C 01E02825 */ move $a1, $t7 +/* 121970 802B8360 AFAF0020 */ sw $t7, 0x20($sp) +/* 121974 802B8364 A7A6005E */ sh $a2, 0x5e($sp) +/* 121978 802B8368 0C0AE016 */ jal func_802B8058 +/* 12197C 802B836C E7AE006C */ swc1 $f14, 0x6c($sp) +/* 121980 802B8370 24010001 */ li $at, 1 +/* 121984 802B8374 14410003 */ bne $v0, $at, .L802B8384 +/* 121988 802B8378 C7AE006C */ lwc1 $f14, 0x6c($sp) +/* 12198C 802B837C 10000020 */ b .L802B8400 +/* 121990 802B8380 4600A006 */ mov.s $f0, $f20 +.L802B8384: +/* 121994 802B8384 0C0ADF2A */ jal func_802B7CA8 +/* 121998 802B8388 46147303 */ div.s $f12, $f14, $f20 +/* 12199C 802B838C 97A7005E */ lhu $a3, 0x5e($sp) +/* 1219A0 802B8390 A7A2005A */ sh $v0, 0x5a($sp) +/* 1219A4 802B8394 97A40026 */ lhu $a0, 0x26($sp) +/* 1219A8 802B8398 00E23021 */ addu $a2, $a3, $v0 +/* 1219AC 802B839C 30D9FFFF */ andi $t9, $a2, 0xffff +/* 1219B0 802B83A0 03203025 */ move $a2, $t9 +/* 1219B4 802B83A4 97A50022 */ lhu $a1, 0x22($sp) +/* 1219B8 802B83A8 0C0AE016 */ jal func_802B8058 +/* 1219BC 802B83AC AFA70028 */ sw $a3, 0x28($sp) +/* 1219C0 802B83B0 24010001 */ li $at, 1 +/* 1219C4 802B83B4 14410003 */ bne $v0, $at, .L802B83C4 +/* 1219C8 802B83B8 8FA70028 */ lw $a3, 0x28($sp) +/* 1219CC 802B83BC 10000010 */ b .L802B8400 +/* 1219D0 802B83C0 4600A006 */ mov.s $f0, $f20 +.L802B83C4: +/* 1219D4 802B83C4 97A8005A */ lhu $t0, 0x5a($sp) +/* 1219D8 802B83C8 97A40026 */ lhu $a0, 0x26($sp) +/* 1219DC 802B83CC 97A50022 */ lhu $a1, 0x22($sp) +/* 1219E0 802B83D0 00E83023 */ subu $a2, $a3, $t0 +/* 1219E4 802B83D4 30C9FFFF */ andi $t1, $a2, 0xffff +/* 1219E8 802B83D8 0C0AE016 */ jal func_802B8058 +/* 1219EC 802B83DC 01203025 */ move $a2, $t1 +/* 1219F0 802B83E0 24010001 */ li $at, 1 +/* 1219F4 802B83E4 54410004 */ bnel $v0, $at, .L802B83F8 +/* 1219F8 802B83E8 3C01BF80 */ lui $at, 0xbf80 +/* 1219FC 802B83EC 10000004 */ b .L802B8400 +/* 121A00 802B83F0 4600A006 */ mov.s $f0, $f20 +/* 121A04 802B83F4 3C01BF80 */ li $at, 0xBF800000 # -1.000000 +.L802B83F8: +/* 121A08 802B83F8 44810000 */ mtc1 $at, $f0 +/* 121A0C 802B83FC 00000000 */ nop +.L802B8400: +/* 121A10 802B8400 8FBF001C */ lw $ra, 0x1c($sp) +.L802B8404: +/* 121A14 802B8404 D7B40010 */ ldc1 $f20, 0x10($sp) +/* 121A18 802B8408 27BD0060 */ addiu $sp, $sp, 0x60 +/* 121A1C 802B840C 03E00008 */ jr $ra +/* 121A20 802B8410 00000000 */ nop diff --git a/asm/non_matchings/math_util/func_802B8414.s b/asm/non_matchings/math_util/func_802B8414.s new file mode 100644 index 000000000..f0350d36a --- /dev/null +++ b/asm/non_matchings/math_util/func_802B8414.s @@ -0,0 +1,133 @@ +glabel func_802B8414 +/* 121A24 802B8414 0004CE02 */ srl $t9, $a0, 0x18 +/* 121A28 802B8418 27BDFFA8 */ addiu $sp, $sp, -0x58 +/* 121A2C 802B841C 00194080 */ sll $t0, $t9, 2 +/* 121A30 802B8420 3C098015 */ lui $t1, %hi(gSegmentTable) +/* 121A34 802B8424 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff +/* 121A38 802B8428 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff +/* 121A3C 802B842C 01284821 */ addu $t1, $t1, $t0 +/* 121A40 802B8430 8D290258 */ lw $t1, %lo(gSegmentTable)($t1) +/* 121A44 802B8434 00815024 */ and $t2, $a0, $at +/* 121A48 802B8438 AFB00014 */ sw $s0, 0x14($sp) +/* 121A4C 802B843C AFA40058 */ sw $a0, 0x58($sp) +/* 121A50 802B8440 AFBF001C */ sw $ra, 0x1c($sp) +/* 121A54 802B8444 AFB10018 */ sw $s1, 0x18($sp) +/* 121A58 802B8448 3C018000 */ lui $at, 0x8000 +/* 121A5C 802B844C 30E4FFFF */ andi $a0, $a3, 0xffff +/* 121A60 802B8450 012A8021 */ addu $s0, $t1, $t2 +/* 121A64 802B8454 00A08825 */ move $s1, $a1 +/* 121A68 802B8458 AFA60060 */ sw $a2, 0x60($sp) +/* 121A6C 802B845C AFA70064 */ sw $a3, 0x64($sp) +/* 121A70 802B8460 02018021 */ addu $s0, $s0, $at +/* 121A74 802B8464 0C0AE006 */ jal func_802B8018 +/* 121A78 802B8468 AFA40020 */ sw $a0, 0x20($sp) +/* 121A7C 802B846C 0C0AE00E */ jal func_802B8038 +/* 121A80 802B8470 8FA40020 */ lw $a0, 0x20($sp) +/* 121A84 802B8474 97A40062 */ lhu $a0, 0x62($sp) +/* 121A88 802B8478 0C0AE006 */ jal func_802B8018 +/* 121A8C 802B847C AFA40020 */ sw $a0, 0x20($sp) +/* 121A90 802B8480 0C0AE00E */ jal func_802B8038 +/* 121A94 802B8484 8FA40020 */ lw $a0, 0x20($sp) +/* 121A98 802B8488 3C0142FE */ li $at, 0x42FE0000 # 127.000000 +/* 121A9C 802B848C 44810000 */ mtc1 $at, $f0 +/* 121AA0 802B8490 44801000 */ mtc1 $zero, $f2 +/* 121AA4 802B8494 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 121AA8 802B8498 44812000 */ mtc1 $at, $f4 +/* 121AAC 802B849C E7A20040 */ swc1 $f2, 0x40($sp) +/* 121AB0 802B84A0 E7A20044 */ swc1 $f2, 0x44($sp) +/* 121AB4 802B84A4 E7A40048 */ swc1 $f4, 0x48($sp) +/* 121AB8 802B84A8 C6280000 */ lwc1 $f8, ($s1) +/* 121ABC 802B84AC C7A60040 */ lwc1 $f6, 0x40($sp) +/* 121AC0 802B84B0 C6320010 */ lwc1 $f18, 0x10($s1) +/* 121AC4 802B84B4 C7B00044 */ lwc1 $f16, 0x44($sp) +/* 121AC8 802B84B8 46083282 */ mul.s $f10, $f6, $f8 +/* 121ACC 802B84BC 8FA40068 */ lw $a0, 0x68($sp) +/* 121AD0 802B84C0 00001025 */ move $v0, $zero +/* 121AD4 802B84C4 46128202 */ mul.s $f8, $f16, $f18 +/* 121AD8 802B84C8 30850003 */ andi $a1, $a0, 3 +/* 121ADC 802B84CC 46085480 */ add.s $f18, $f10, $f8 +/* 121AE0 802B84D0 C62A0020 */ lwc1 $f10, 0x20($s1) +/* 121AE4 802B84D4 46045202 */ mul.s $f8, $f10, $f4 +/* 121AE8 802B84D8 46124280 */ add.s $f10, $f8, $f18 +/* 121AEC 802B84DC 46005202 */ mul.s $f8, $f10, $f0 +/* 121AF0 802B84E0 4600448D */ trunc.w.s $f18, $f8 +/* 121AF4 802B84E4 440C9000 */ mfc1 $t4, $f18 +/* 121AF8 802B84E8 00000000 */ nop +/* 121AFC 802B84EC A3AC003C */ sb $t4, 0x3c($sp) +/* 121B00 802B84F0 C62A0004 */ lwc1 $f10, 4($s1) +/* 121B04 802B84F4 C6320014 */ lwc1 $f18, 0x14($s1) +/* 121B08 802B84F8 460A3202 */ mul.s $f8, $f6, $f10 +/* 121B0C 802B84FC 00000000 */ nop +/* 121B10 802B8500 46128282 */ mul.s $f10, $f16, $f18 +/* 121B14 802B8504 460A4480 */ add.s $f18, $f8, $f10 +/* 121B18 802B8508 C6280024 */ lwc1 $f8, 0x24($s1) +/* 121B1C 802B850C 46044282 */ mul.s $f10, $f8, $f4 +/* 121B20 802B8510 46125200 */ add.s $f8, $f10, $f18 +/* 121B24 802B8514 46004282 */ mul.s $f10, $f8, $f0 +/* 121B28 802B8518 4600548D */ trunc.w.s $f18, $f10 +/* 121B2C 802B851C 440E9000 */ mfc1 $t6, $f18 +/* 121B30 802B8520 00000000 */ nop +/* 121B34 802B8524 A3AE003D */ sb $t6, 0x3d($sp) +/* 121B38 802B8528 C6280008 */ lwc1 $f8, 8($s1) +/* 121B3C 802B852C C6320018 */ lwc1 $f18, 0x18($s1) +/* 121B40 802B8530 46083282 */ mul.s $f10, $f6, $f8 +/* 121B44 802B8534 00000000 */ nop +/* 121B48 802B8538 46128182 */ mul.s $f6, $f16, $f18 +/* 121B4C 802B853C C6300028 */ lwc1 $f16, 0x28($s1) +/* 121B50 802B8540 46048482 */ mul.s $f18, $f16, $f4 +/* 121B54 802B8544 46065200 */ add.s $f8, $f10, $f6 +/* 121B58 802B8548 46089280 */ add.s $f10, $f18, $f8 +/* 121B5C 802B854C 46005182 */ mul.s $f6, $f10, $f0 +/* 121B60 802B8550 4600340D */ trunc.w.s $f16, $f6 +/* 121B64 802B8554 44198000 */ mfc1 $t9, $f16 +/* 121B68 802B8558 18800029 */ blez $a0, .L802B8600 +/* 121B6C 802B855C A3B9003E */ sb $t9, 0x3e($sp) +/* 121B70 802B8560 10A0000C */ beqz $a1, .L802B8594 +/* 121B74 802B8564 00A01825 */ move $v1, $a1 +.L802B8568: +/* 121B78 802B8568 83A8003C */ lb $t0, 0x3c($sp) +/* 121B7C 802B856C 24420001 */ addiu $v0, $v0, 1 +/* 121B80 802B8570 26100018 */ addiu $s0, $s0, 0x18 +/* 121B84 802B8574 A208FFF8 */ sb $t0, -8($s0) +/* 121B88 802B8578 83B8003D */ lb $t8, 0x3d($sp) +/* 121B8C 802B857C A218FFF9 */ sb $t8, -7($s0) +/* 121B90 802B8580 83A9003E */ lb $t1, 0x3e($sp) +/* 121B94 802B8584 1462FFF8 */ bne $v1, $v0, .L802B8568 +/* 121B98 802B8588 A209FFFA */ sb $t1, -6($s0) +/* 121B9C 802B858C 5044001D */ beql $v0, $a0, .L802B8604 +/* 121BA0 802B8590 8FBF001C */ lw $ra, 0x1c($sp) +.L802B8594: +/* 121BA4 802B8594 83AA003C */ lb $t2, 0x3c($sp) +/* 121BA8 802B8598 24420004 */ addiu $v0, $v0, 4 +/* 121BAC 802B859C 26100060 */ addiu $s0, $s0, 0x60 +/* 121BB0 802B85A0 A20AFFB0 */ sb $t2, -0x50($s0) +/* 121BB4 802B85A4 83AB003D */ lb $t3, 0x3d($sp) +/* 121BB8 802B85A8 A20BFFB1 */ sb $t3, -0x4f($s0) +/* 121BBC 802B85AC 83AC003E */ lb $t4, 0x3e($sp) +/* 121BC0 802B85B0 A20CFFB2 */ sb $t4, -0x4e($s0) +/* 121BC4 802B85B4 83AD003C */ lb $t5, 0x3c($sp) +/* 121BC8 802B85B8 A20DFFC8 */ sb $t5, -0x38($s0) +/* 121BCC 802B85BC 83AE003D */ lb $t6, 0x3d($sp) +/* 121BD0 802B85C0 A20EFFC9 */ sb $t6, -0x37($s0) +/* 121BD4 802B85C4 83AF003E */ lb $t7, 0x3e($sp) +/* 121BD8 802B85C8 A20FFFCA */ sb $t7, -0x36($s0) +/* 121BDC 802B85CC 83B9003C */ lb $t9, 0x3c($sp) +/* 121BE0 802B85D0 A219FFE0 */ sb $t9, -0x20($s0) +/* 121BE4 802B85D4 83A8003D */ lb $t0, 0x3d($sp) +/* 121BE8 802B85D8 A208FFE1 */ sb $t0, -0x1f($s0) +/* 121BEC 802B85DC 83B8003E */ lb $t8, 0x3e($sp) +/* 121BF0 802B85E0 A218FFE2 */ sb $t8, -0x1e($s0) +/* 121BF4 802B85E4 83A9003C */ lb $t1, 0x3c($sp) +/* 121BF8 802B85E8 A209FFF8 */ sb $t1, -8($s0) +/* 121BFC 802B85EC 83AA003D */ lb $t2, 0x3d($sp) +/* 121C00 802B85F0 A20AFFF9 */ sb $t2, -7($s0) +/* 121C04 802B85F4 83AB003E */ lb $t3, 0x3e($sp) +/* 121C08 802B85F8 1444FFE6 */ bne $v0, $a0, .L802B8594 +/* 121C0C 802B85FC A20BFFFA */ sb $t3, -6($s0) +.L802B8600: +/* 121C10 802B8600 8FBF001C */ lw $ra, 0x1c($sp) +.L802B8604: +/* 121C14 802B8604 8FB00014 */ lw $s0, 0x14($sp) +/* 121C18 802B8608 8FB10018 */ lw $s1, 0x18($sp) +/* 121C1C 802B860C 03E00008 */ jr $ra +/* 121C20 802B8610 27BD0058 */ addiu $sp, $sp, 0x58 diff --git a/asm/non_matchings/math_util/func_802B8614.s b/asm/non_matchings/math_util/func_802B8614.s new file mode 100644 index 000000000..7a0b9a876 --- /dev/null +++ b/asm/non_matchings/math_util/func_802B8614.s @@ -0,0 +1,96 @@ +glabel func_802B8614 +/* 121C24 802B8614 27BDFF60 */ addiu $sp, $sp, -0xa0 +/* 121C28 802B8618 F7BE0030 */ sdc1 $f30, 0x30($sp) +/* 121C2C 802B861C F7BC0028 */ sdc1 $f28, 0x28($sp) +/* 121C30 802B8620 F7BA0020 */ sdc1 $f26, 0x20($sp) +/* 121C34 802B8624 F7B80018 */ sdc1 $f24, 0x18($sp) +/* 121C38 802B8628 F7B60010 */ sdc1 $f22, 0x10($sp) +/* 121C3C 802B862C F7B40008 */ sdc1 $f20, 8($sp) +/* 121C40 802B8630 C48401B0 */ lwc1 $f4, 0x1b0($a0) +/* 121C44 802B8634 4480E000 */ mtc1 $zero, $f28 +/* 121C48 802B8638 4480E800 */ mtc1 $zero, $f29 +/* 121C4C 802B863C 460021A1 */ cvt.d.s $f6, $f4 +/* 121C50 802B8640 F7A60078 */ sdc1 $f6, 0x78($sp) +/* 121C54 802B8644 C48801C0 */ lwc1 $f8, 0x1c0($a0) +/* 121C58 802B8648 463CE032 */ c.eq.d $f28, $f28 +/* 121C5C 802B864C 460042A1 */ cvt.d.s $f10, $f8 +/* 121C60 802B8650 F7AA0070 */ sdc1 $f10, 0x70($sp) +/* 121C64 802B8654 C48401B8 */ lwc1 $f4, 0x1b8($a0) +/* 121C68 802B8658 460021A1 */ cvt.d.s $f6, $f4 +/* 121C6C 802B865C F7A60068 */ sdc1 $f6, 0x68($sp) +/* 121C70 802B8660 C48A01A8 */ lwc1 $f10, 0x1a8($a0) +/* 121C74 802B8664 C4880198 */ lwc1 $f8, 0x198($a0) +/* 121C78 802B8668 46005121 */ cvt.d.s $f4, $f10 +/* 121C7C 802B866C 460047A1 */ cvt.d.s $f30, $f8 +/* 121C80 802B8670 F7A40058 */ sdc1 $f4, 0x58($sp) +/* 121C84 802B8674 C48601A0 */ lwc1 $f6, 0x1a0($a0) +/* 121C88 802B8678 46003221 */ cvt.d.s $f8, $f6 +/* 121C8C 802B867C F7A80050 */ sdc1 $f8, 0x50($sp) +/* 121C90 802B8680 C48A01E0 */ lwc1 $f10, 0x1e0($a0) +/* 121C94 802B8684 46005121 */ cvt.d.s $f4, $f10 +/* 121C98 802B8688 F7A40048 */ sdc1 $f4, 0x48($sp) +/* 121C9C 802B868C C48601F0 */ lwc1 $f6, 0x1f0($a0) +/* 121CA0 802B8690 46003221 */ cvt.d.s $f8, $f6 +/* 121CA4 802B8694 D7A60058 */ ldc1 $f6, 0x58($sp) +/* 121CA8 802B8698 F7A80040 */ sdc1 $f8, 0x40($sp) +/* 121CAC 802B869C C48A01E8 */ lwc1 $f10, 0x1e8($a0) +/* 121CB0 802B86A0 D7A80070 */ ldc1 $f8, 0x70($sp) +/* 121CB4 802B86A4 46005121 */ cvt.d.s $f4, $f10 +/* 121CB8 802B86A8 46283081 */ sub.d $f2, $f6, $f8 +/* 121CBC 802B86AC F7A40038 */ sdc1 $f4, 0x38($sp) +/* 121CC0 802B86B0 46202286 */ mov.d $f10, $f4 +/* 121CC4 802B86B4 D7A40050 */ ldc1 $f4, 0x50($sp) +/* 121CC8 802B86B8 D7A80068 */ ldc1 $f8, 0x68($sp) +/* 121CCC 802B86BC 46245301 */ sub.d $f12, $f10, $f4 +/* 121CD0 802B86C0 D7AA0040 */ ldc1 $f10, 0x40($sp) +/* 121CD4 802B86C4 46282381 */ sub.d $f14, $f4, $f8 +/* 121CD8 802B86C8 462C1102 */ mul.d $f4, $f2, $f12 +/* 121CDC 802B86CC 46265401 */ sub.d $f16, $f10, $f6 +/* 121CE0 802B86D0 D7AA0048 */ ldc1 $f10, 0x48($sp) +/* 121CE4 802B86D4 D7A60078 */ ldc1 $f6, 0x78($sp) +/* 121CE8 802B86D8 46307202 */ mul.d $f8, $f14, $f16 +/* 121CEC 802B86DC 463E5481 */ sub.d $f18, $f10, $f30 +/* 121CF0 802B86E0 4626F501 */ sub.d $f20, $f30, $f6 +/* 121CF4 802B86E4 46282581 */ sub.d $f22, $f4, $f8 +/* 121CF8 802B86E8 46327102 */ mul.d $f4, $f14, $f18 +/* 121CFC 802B86EC 00000000 */ nop +/* 121D00 802B86F0 462CA202 */ mul.d $f8, $f20, $f12 +/* 121D04 802B86F4 00000000 */ nop +/* 121D08 802B86F8 4630A282 */ mul.d $f10, $f20, $f16 +/* 121D0C 802B86FC 00000000 */ nop +/* 121D10 802B8700 46321182 */ mul.d $f6, $f2, $f18 +/* 121D14 802B8704 46282601 */ sub.d $f24, $f4, $f8 +/* 121D18 802B8708 45000008 */ bc1f .L802B872C +/* 121D1C 802B870C 46265681 */ sub.d $f26, $f10, $f6 +/* 121D20 802B8710 44800000 */ mtc1 $zero, $f0 +/* 121D24 802B8714 3C013F80 */ li $at, 0x3F800000 # 1.000000 +/* 121D28 802B8718 44814000 */ mtc1 $at, $f8 +/* 121D2C 802B871C E4800058 */ swc1 $f0, 0x58($a0) +/* 121D30 802B8720 E4800060 */ swc1 $f0, 0x60($a0) +/* 121D34 802B8724 10000010 */ b .L802B8768 +/* 121D38 802B8728 E488005C */ swc1 $f8, 0x5c($a0) +.L802B872C: +/* 121D3C 802B872C 4620B2A0 */ cvt.s.d $f10, $f22 +/* 121D40 802B8730 460051A1 */ cvt.d.s $f6, $f10 +/* 121D44 802B8734 4620C2A0 */ cvt.s.d $f10, $f24 +/* 121D48 802B8738 463C3103 */ div.d $f4, $f6, $f28 +/* 121D4C 802B873C 460051A1 */ cvt.d.s $f6, $f10 +/* 121D50 802B8740 4620D2A0 */ cvt.s.d $f10, $f26 +/* 121D54 802B8744 46202220 */ cvt.s.d $f8, $f4 +/* 121D58 802B8748 463C3103 */ div.d $f4, $f6, $f28 +/* 121D5C 802B874C E4880058 */ swc1 $f8, 0x58($a0) +/* 121D60 802B8750 460051A1 */ cvt.d.s $f6, $f10 +/* 121D64 802B8754 46202220 */ cvt.s.d $f8, $f4 +/* 121D68 802B8758 463C3103 */ div.d $f4, $f6, $f28 +/* 121D6C 802B875C E488005C */ swc1 $f8, 0x5c($a0) +/* 121D70 802B8760 46202220 */ cvt.s.d $f8, $f4 +/* 121D74 802B8764 E4880060 */ swc1 $f8, 0x60($a0) +.L802B8768: +/* 121D78 802B8768 D7B40008 */ ldc1 $f20, 8($sp) +/* 121D7C 802B876C D7B60010 */ ldc1 $f22, 0x10($sp) +/* 121D80 802B8770 D7B80018 */ ldc1 $f24, 0x18($sp) +/* 121D84 802B8774 D7BA0020 */ ldc1 $f26, 0x20($sp) +/* 121D88 802B8778 D7BC0028 */ ldc1 $f28, 0x28($sp) +/* 121D8C 802B877C D7BE0030 */ ldc1 $f30, 0x30($sp) +/* 121D90 802B8780 03E00008 */ jr $ra +/* 121D94 802B8784 27BD00A0 */ addiu $sp, $sp, 0xa0 diff --git a/asm/non_matchings/math_util/random_int.s b/asm/non_matchings/math_util/random_int.s new file mode 100644 index 000000000..b3d04297d --- /dev/null +++ b/asm/non_matchings/math_util/random_int.s @@ -0,0 +1,70 @@ +glabel random_int +/* 121444 802B7E34 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 121448 802B7E38 AFBF0014 */ sw $ra, 0x14($sp) +/* 12144C 802B7E3C 0C0ADF65 */ jal random_u16 +/* 121450 802B7E40 AFA40018 */ sw $a0, 0x18($sp) +/* 121454 802B7E44 44822000 */ mtc1 $v0, $f4 +/* 121458 802B7E48 97AE001A */ lhu $t6, 0x1a($sp) +/* 12145C 802B7E4C 04410005 */ bgez $v0, .L802B7E64 +/* 121460 802B7E50 468021A0 */ cvt.s.w $f6, $f4 +/* 121464 802B7E54 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 +/* 121468 802B7E58 44814000 */ mtc1 $at, $f8 +/* 12146C 802B7E5C 00000000 */ nop +/* 121470 802B7E60 46083180 */ add.s $f6, $f6, $f8 +.L802B7E64: +/* 121474 802B7E64 3C01802C */ lui $at, %hi(D_802BA028) +/* 121478 802B7E68 D430A028 */ ldc1 $f16, %lo(D_802BA028)($at) +/* 12147C 802B7E6C 448E2000 */ mtc1 $t6, $f4 +/* 121480 802B7E70 460032A1 */ cvt.d.s $f10, $f6 +/* 121484 802B7E74 8FBF0014 */ lw $ra, 0x14($sp) +/* 121488 802B7E78 46305483 */ div.d $f18, $f10, $f16 +/* 12148C 802B7E7C 05C10006 */ bgez $t6, .L802B7E98 +/* 121490 802B7E80 46802221 */ cvt.d.w $f8, $f4 +/* 121494 802B7E84 3C0141F0 */ li $at, 0x41F00000 # 30.000000 +/* 121498 802B7E88 44813800 */ mtc1 $at, $f7 +/* 12149C 802B7E8C 44803000 */ mtc1 $zero, $f6 +/* 1214A0 802B7E90 00000000 */ nop +/* 1214A4 802B7E94 46264200 */ add.d $f8, $f8, $f6 +.L802B7E98: +/* 1214A8 802B7E98 46289282 */ mul.d $f10, $f18, $f8 +/* 1214AC 802B7E9C 24020001 */ li $v0, 1 +/* 1214B0 802B7EA0 27BD0018 */ addiu $sp, $sp, 0x18 +/* 1214B4 802B7EA4 3C0141E0 */ li $at, 0x41E00000 # 28.000000 +/* 1214B8 802B7EA8 444FF800 */ cfc1 $t7, $31 +/* 1214BC 802B7EAC 44C2F800 */ ctc1 $v0, $31 +/* 1214C0 802B7EB0 00000000 */ nop +/* 1214C4 802B7EB4 46205424 */ cvt.w.d $f16, $f10 +/* 1214C8 802B7EB8 4442F800 */ cfc1 $v0, $31 +/* 1214CC 802B7EBC 00000000 */ nop +/* 1214D0 802B7EC0 30420078 */ andi $v0, $v0, 0x78 +/* 1214D4 802B7EC4 50400014 */ beql $v0, $zero, .L802B7F18 +/* 1214D8 802B7EC8 44028000 */ mfc1 $v0, $f16 +/* 1214DC 802B7ECC 44818800 */ mtc1 $at, $f17 +/* 1214E0 802B7ED0 44808000 */ mtc1 $zero, $f16 +/* 1214E4 802B7ED4 24020001 */ li $v0, 1 +/* 1214E8 802B7ED8 46305401 */ sub.d $f16, $f10, $f16 +/* 1214EC 802B7EDC 44C2F800 */ ctc1 $v0, $31 +/* 1214F0 802B7EE0 00000000 */ nop +/* 1214F4 802B7EE4 46208424 */ cvt.w.d $f16, $f16 +/* 1214F8 802B7EE8 4442F800 */ cfc1 $v0, $31 +/* 1214FC 802B7EEC 00000000 */ nop +/* 121500 802B7EF0 30420078 */ andi $v0, $v0, 0x78 +/* 121504 802B7EF4 14400005 */ bnez $v0, .L802B7F0C +/* 121508 802B7EF8 00000000 */ nop +/* 12150C 802B7EFC 44028000 */ mfc1 $v0, $f16 +/* 121510 802B7F00 3C018000 */ lui $at, 0x8000 +/* 121514 802B7F04 10000007 */ b .L802B7F24 +/* 121518 802B7F08 00411025 */ or $v0, $v0, $at +.L802B7F0C: +/* 12151C 802B7F0C 10000005 */ b .L802B7F24 +/* 121520 802B7F10 2402FFFF */ li $v0, -1 +/* 121524 802B7F14 44028000 */ mfc1 $v0, $f16 +.L802B7F18: +/* 121528 802B7F18 00000000 */ nop +/* 12152C 802B7F1C 0440FFFB */ bltz $v0, .L802B7F0C +/* 121530 802B7F20 00000000 */ nop +.L802B7F24: +/* 121534 802B7F24 44CFF800 */ ctc1 $t7, $31 +/* 121538 802B7F28 3058FFFF */ andi $t8, $v0, 0xffff +/* 12153C 802B7F2C 03E00008 */ jr $ra +/* 121540 802B7F30 03001025 */ move $v0, $t8 diff --git a/asm/non_matchings/math_util/random_u16.s b/asm/non_matchings/math_util/random_u16.s new file mode 100644 index 000000000..e3a5b4479 --- /dev/null +++ b/asm/non_matchings/math_util/random_u16.s @@ -0,0 +1,45 @@ +glabel random_u16 +/* 1213A4 802B7D94 3C06802C */ lui $a2, %hi(D_802BA290) # $a2, 0x802c +/* 1213A8 802B7D98 24C6A290 */ addiu $a2, %lo(D_802BA290) # addiu $a2, $a2, -0x5d70 +/* 1213AC 802B7D9C 94C20000 */ lhu $v0, ($a2) +/* 1213B0 802B7DA0 2401560A */ li $at, 22026 +/* 1213B4 802B7DA4 54410004 */ bnel $v0, $at, .L802B7DB8 +/* 1213B8 802B7DA8 00027A00 */ sll $t7, $v0, 8 +/* 1213BC 802B7DAC A4C00000 */ sh $zero, ($a2) +/* 1213C0 802B7DB0 3002FFFF */ andi $v0, $zero, 0xffff +/* 1213C4 802B7DB4 00027A00 */ sll $t7, $v0, 8 +.L802B7DB8: +/* 1213C8 802B7DB8 01E2C026 */ xor $t8, $t7, $v0 +/* 1213CC 802B7DBC 330500FF */ andi $a1, $t8, 0xff +/* 1213D0 802B7DC0 3308FF00 */ andi $t0, $t8, 0xff00 +/* 1213D4 802B7DC4 00084A03 */ sra $t1, $t0, 8 +/* 1213D8 802B7DC8 0005CA00 */ sll $t9, $a1, 8 +/* 1213DC 802B7DCC 03296021 */ addu $t4, $t9, $t1 +/* 1213E0 802B7DD0 00055840 */ sll $t3, $a1, 1 +/* 1213E4 802B7DD4 016C1826 */ xor $v1, $t3, $t4 +/* 1213E8 802B7DD8 306DFFFF */ andi $t5, $v1, 0xffff +/* 1213EC 802B7DDC 31AE0001 */ andi $t6, $t5, 1 +/* 1213F0 802B7DE0 A4CC0000 */ sh $t4, ($a2) +/* 1213F4 802B7DE4 15C0000C */ bnez $t6, .L802B7E18 +/* 1213F8 802B7DE8 01A02025 */ move $a0, $t5 +/* 1213FC 802B7DEC 000D1043 */ sra $v0, $t5, 1 +/* 121400 802B7DF0 384FFF80 */ xori $t7, $v0, 0xff80 +/* 121404 802B7DF4 31E2FFFF */ andi $v0, $t7, 0xffff +/* 121408 802B7DF8 3401AA55 */ li $at, 43605 +/* 12140C 802B7DFC 14410003 */ bne $v0, $at, .L802B7E0C +/* 121410 802B7E00 38481FF4 */ xori $t0, $v0, 0x1ff4 +/* 121414 802B7E04 10000009 */ b .L802B7E2C +/* 121418 802B7E08 A4C00000 */ sh $zero, ($a2) +.L802B7E0C: +/* 12141C 802B7E0C 3C01802C */ lui $at, %hi(D_802BA290) # $at, 0x802c +/* 121420 802B7E10 10000006 */ b .L802B7E2C +/* 121424 802B7E14 A428A290 */ sh $t0, %lo(D_802BA290)($at) +.L802B7E18: +/* 121428 802B7E18 0004C843 */ sra $t9, $a0, 1 +/* 12142C 802B7E1C 3B2AFF80 */ xori $t2, $t9, 0xff80 +/* 121430 802B7E20 394B8180 */ xori $t3, $t2, 0x8180 +/* 121434 802B7E24 3C01802C */ lui $at, %hi(D_802BA290) # $at, 0x802c +/* 121438 802B7E28 A42BA290 */ sh $t3, %lo(D_802BA290)($at) +.L802B7E2C: +/* 12143C 802B7E2C 03E00008 */ jr $ra +/* 121440 802B7E30 94C20000 */ lhu $v0, ($a2) diff --git a/asm/non_matchings/memory/display_list_unpack.s b/asm/non_matchings/memory/display_list_unpack.s index cb683e34f..3b724fc48 100644 --- a/asm/non_matchings/memory/display_list_unpack.s +++ b/asm/non_matchings/memory/display_list_unpack.s @@ -46,9 +46,9 @@ glabel L802A9B74 /* 1131A8 802A9B98 5020FFF7 */ beql $at, $zero, .L802A9B78 /* 1131AC 802A9B9C 8CE30000 */ lw $v1, ($a3) /* 1131B0 802A9BA0 00046880 */ sll $t5, $a0, 2 -/* 1131B4 802A9BA4 3C01802C */ lui $at, %hi(D_802B9C94) +/* 1131B4 802A9BA4 3C01802C */ lui $at, %hi(jpt_802B9C94) /* 1131B8 802A9BA8 002D0821 */ addu $at, $at, $t5 -/* 1131BC 802A9BAC 8C2D9C94 */ lw $t5, %lo(D_802B9C94)($at) +/* 1131BC 802A9BAC 8C2D9C94 */ lw $t5, %lo(jpt_802B9C94)($at) /* 1131C0 802A9BB0 01A00008 */ jr $t5 /* 1131C4 802A9BB4 00000000 */ nop glabel L802A9BB8 diff --git a/asm/non_matchings/memory/func_802A8F80.s b/asm/non_matchings/memory/func_802A8F80.s index ff1f3502e..e76fd9098 100644 --- a/asm/non_matchings/memory/func_802A8F80.s +++ b/asm/non_matchings/memory/func_802A8F80.s @@ -18,9 +18,9 @@ glabel func_802A8F80 /* 1125D0 802A8FC0 10200034 */ beqz $at, .L802A9094 /* 1125D4 802A8FC4 AF0D0004 */ sw $t5, 4($t8) /* 1125D8 802A8FC8 000E7080 */ sll $t6, $t6, 2 -/* 1125DC 802A8FCC 3C01802C */ lui $at, %hi(D_802B9C30) +/* 1125DC 802A8FCC 3C01802C */ lui $at, %hi(jpt_802B9C30) /* 1125E0 802A8FD0 002E0821 */ addu $at, $at, $t6 -/* 1125E4 802A8FD4 8C2E9C30 */ lw $t6, %lo(D_802B9C30)($at) +/* 1125E4 802A8FD4 8C2E9C30 */ lw $t6, %lo(jpt_802B9C30)($at) /* 1125E8 802A8FD8 01C00008 */ jr $t6 /* 1125EC 802A8FDC 00000000 */ nop glabel L802A8FE0 diff --git a/asm/non_matchings/memory/func_802A91E4.s b/asm/non_matchings/memory/func_802A91E4.s index 50ac7df5e..3fb0a21db 100644 --- a/asm/non_matchings/memory/func_802A91E4.s +++ b/asm/non_matchings/memory/func_802A91E4.s @@ -21,9 +21,9 @@ glabel func_802A91E4 /* 112840 802A9230 1020002D */ beqz $at, .L802A92E8 /* 112844 802A9234 ADCF0004 */ sw $t7, 4($t6) /* 112848 802A9238 0019C880 */ sll $t9, $t9, 2 -/* 11284C 802A923C 3C01802C */ lui $at, %hi(D_802B9C7C) +/* 11284C 802A923C 3C01802C */ lui $at, %hi(jpt_802B9C7C) /* 112850 802A9240 00390821 */ addu $at, $at, $t9 -/* 112854 802A9244 8C399C7C */ lw $t9, %lo(D_802B9C7C)($at) +/* 112854 802A9244 8C399C7C */ lw $t9, %lo(jpt_802B9C7C)($at) /* 112858 802A9248 03200008 */ jr $t9 /* 11285C 802A924C 00000000 */ nop glabel L802A9250 diff --git a/asm/os/__osException.s b/asm/os/__osException.s index a72356e94..97181ebb8 100644 --- a/asm/os/__osException.s +++ b/asm/os/__osException.s @@ -153,9 +153,9 @@ glabel __osException /* 0D1FC8 800D13C8 3C01800F */ lui $at, %hi(D_800F3A00) # 0x800f /* 0D1FCC 800D13CC 002A0821 */ addu $at, $at, $t2 /* 0D1FD0 800D13D0 902A3A00 */ lbu $t2, %lo(D_800F3A00)($at) # 0x3a00($at) -/* 0D1FD4 800D13D4 3C01800F */ lui $at, %hi(D_800F3A20) +/* 0D1FD4 800D13D4 3C01800F */ lui $at, %hi(jpt_800F3A20) /* 0D1FD8 800D13D8 002A0821 */ addu $at, $at, $t2 -/* 0D1FDC 800D13DC 8C2A3A20 */ lw $t2, %lo(D_800F3A20)($at) +/* 0D1FDC 800D13DC 8C2A3A20 */ lw $t2, %lo(jpt_800F3A20)($at) /* 0D1FE0 800D13E0 01400008 */ jr $t2 /* 0D1FE4 800D13E4 00000000 */ nop glabel L800D13E8 diff --git a/data/data_0DD0A0_3.s b/data/data_0DD0A0_3.s index eb8f8dcba..5199424ac 100644 --- a/data/data_0DD0A0_3.s +++ b/data/data_0DD0A0_3.s @@ -1066,7 +1066,7 @@ glabel D_800ED000 glabel D_800ED004 .float 0.01 -glabel D_800ED008 +glabel jpt_800ED008 .word L8000E1F4, L8000E45C, L8000E618, L8000E968 .word L8000E634 @@ -1125,7 +1125,7 @@ glabel D_800ED070 glabel D_800ED078 .double 0.05 -glabel D_800ED080 +glabel jpt_800ED080 .word L80011BE8, L80011C04, L80011C3C, L80011C54 .word L80011C70, L80011C8C, L80011C9C, L80011CB0 .word L80011CD4, L80011D2C, L80011CC0 @@ -1136,7 +1136,7 @@ glabel D_800ED0AC glabel D_800ED0B0 .float 0.6 -glabel D_800ED0B4 +glabel jpt_800ED0B4 .word L80011DC4, L80011E20, L80011DF4, L80011DF4 .word L80011DF4, L80011E20, L80011E20, L80011E20 .word L80011E20, L80011E20, L80011E20 @@ -1376,7 +1376,7 @@ glabel D_800ED318 glabel D_800ED320 .double 0.2 -glabel D_800ED328 +glabel jpt_800ED328 .word L80019928, L80019A08, L8001993C, L80019954 .word L800199B4, L800199D4, L8001996C, L80019990 .word L80019A48, L800199F4, L80019AE8 @@ -1386,11 +1386,11 @@ glabel D_800ED328 .word L80019A68, L80019A88, L80019A28, L80019AA8 .word L80019AC8 -glabel D_800ED36C +glabel jpt_800ED36C .word L8001A25C, L8001A274, L8001A28C .word L8001A2A4, L8001A2BC, L8001A2D4 -glabel D_800ED384 +glabel jpt_800ED384 .word L8001A998 .word L8001AA10, L8001A9B0, L8001A9B0, L8001A9E0 .word L8001A9E0, L8001A9C8, L8001A9C8, L8001AA40 @@ -1399,7 +1399,7 @@ glabel D_800ED384 .word L8001A9F8, L8001AA88, L8001AA88, L8001AA58 .word L8001AA58, L8001AA28, L8001AA70, L8001AA70 -glabel D_800ED3C8 +glabel jpt_800ED3C8 .word L8001ABB0, L8001ABCC, L8001ABCC, L8001ABCC .word L8001ABCC, L8001ABCC, L8001ABCC @@ -1407,7 +1407,7 @@ glabel D_800ED3C8 .word L8001ABB8 .word L8001ABA0, L8001ABC0, L8001ABA8, L8001ABC8 .word L8001ABCC, L8001ABCC, L8001ABCC -glabel D_800ED404 +glabel jpt_800ED404 .word L8001ACAC .word L8001AD64, L8001AF34, L8001AFD8, L8001B4AC .word L8001B528, L8001B5B8, L8001B630, L8001B6AC @@ -1422,7 +1422,7 @@ glabel D_800ED404 glabel D_800ED498 .double 0.4 -glabel D_800ED4A0 +glabel jpt_800ED4A0 .word L8001B970, L8001B988, L8001B9A0, L8001B9B8 .word L8001B9D0 @@ -1455,7 +1455,7 @@ glabel D_800ED4D4 .word 0x00000000, 0x00000000 -glabel D_800ED4E0 +glabel jpt_800ED4E0 .word L8001C524, L8001C524, L8001C9CC, L8001C524 .word L8001C9CC, L8001C9CC, L8001C9CC, L8001C9CC .word L8001C524, L8001C524, L8001C524 @@ -1547,7 +1547,7 @@ glabel D_800ED5C8 glabel D_800ED5D0 .double 0.15 -glabel D_800ED5D8 # jump table +glabel jpt_800ED5D8 # jump table .word L8001F4E0, L8001F54C, L8001F5DC, L8001F654 .word L8001F6D8 @@ -1663,14 +1663,14 @@ glabel D_800ED6E0 .word 0x00000000, 0x00000000 -glabel D_800ED6F0 +glabel jpt_800ED6F0 .word L80027F38, L80027FC0, L80028048, L800280D0 .word L80028854, L80028854, L80028854, L80028854 .word L80028158, L80028854, L800281E0, L80028854 .word L8002825C, L80028854, L80028854, L80028854 .word L80028854, L80028854, L800282E4 -glabel D_800ED73C +glabel jpt_800ED73C .word L80028424 .word L800284AC, L80028534, L800285BC, L80028854 .word L80028854, L80028854, L80028854, L80028644 @@ -2422,14 +2422,14 @@ glabel D_800EDE58 glabel D_800EDE5C .float 28210.0 -glabel D_800EDE60 +glabel jpt_800EDE60 .word L8003C12C, L8003C12C, L8003C12C, L8003C12C .word L8003C12C, L8003C12C, L8003C12C, L8003C12C .word L8003C12C, L8003C12C, L8003C12C, L8003C12C .word L8003C12C, L8003C12C, L8003C12C, L8003C1B4 .word L8003C1B4, L8003C1B4, L8003C12C, L8003C1B4 -glabel D_800EDE80 +glabel jpt_800EDE80 .word L8003C1F0, L8003C1F0, L8003C1F0, L8003C1F0 .word L8003C1F0, L8003C1F0, L8003C1F0, L8003C1F0 .word L8003C1F0, L8003C1F0, L8003C1F0, L8003C1F0 @@ -2501,7 +2501,7 @@ glabel D_800EDF80 glabel D_800EDF88 .float 0.835699975 -glabel D_800EDF8C +glabel jpt_800EDF8C .word L8003F59C, L8003F5D0, L8003F604, L8003F6D4 .word L8003F6D4, L8003F6D4, L8003F5D0, L8003F6D4 .word L8003F638, L8003F6D4, L8003F6D4, L8003F6D4 @@ -2552,14 +2552,14 @@ glabel D_800EE040 glabel D_800EE048 .double 0.8 -glabel D_800EE050 +glabel jpt_800EE050 .word L80050C50, L80050A88, L80050AC0, L80050B1C .word L80050BA8 glabel D_800EE064 .float 0.6 -glabel D_800EE068 +glabel jpt_800EE068 .word L80053520, L80053574, L800535C8, L8005361C .word L80053670 @@ -2571,38 +2571,38 @@ glabel D_800EE080 glabel D_800EE088 .double 0.8 -glabel D_800EE090 +glabel jpt_800EE090 .word L80057D14, L80057D28, L80057D3C, L80057D50 .word L80057D64, L80057DC0, L80057DC0, L80057DC0 .word L80057D78, L80057D8C, L80057DA0, L80057DB4 -glabel D_800EE0C0 +glabel jpt_800EE0C0 .word L80058038, L80058048, L80058058, L80058068 .word L80058078 -glabel D_800EE0D4 +glabel jpt_800EE0D4 .word L80058100, L80058110, L80058120, L80058130 .word L80058140, L80058150, L80058160, L80058170 .word L80058180, L80058190, L800581A0, L800581B0 -glabel D_800EE104 +glabel jpt_800EE104 .word L800585A8, L800585B8, L800585C8, L800585D8 .word L800585E8, L80058630, L80058630, L80058630 .word L800585F8, L80058608, L80058618, L80058628 -glabel D_800EE134 +glabel jpt_800EE134 .word L80058B00, L80058B00, L8005892C, L80058944 .word L80058980, L800589AC, L800589D0, L80058B00 .word L80058A38, L80058A58, L80058B00, L80058A7C .word L80058A8C, L80058AB8, L80058B00, L80058B00 .word L80058B00, L80058B00, L80058AE4 -glabel D_800EE180 +glabel jpt_800EE180 .word L80058C88, L80058C98, L80058CB8, L80058CD8 .word L80058CF8, L80058DA4, L80058DA4, L80058DA4 .word L80058D18, L80058D38, L80058D58, L80058D78 -glabel D_800EE1B0 +glabel jpt_800EE1B0 .word L80058E1C, L80058E2C, L80058E4C, L80058E6C .word L80058E8C, L80058F38, L80058F38, L80058F38 .word L80058EAC, L80058ECC, L80058EEC, L80058F0C @@ -2610,54 +2610,54 @@ glabel D_800EE1B0 glabel D_800EE1E0 .float 0.6 -glabel D_800EE1E4 +glabel jpt_800EE1E4 .word L8005A950, L8005A950, L8005A77C, L8005A794 .word L8005A7EC, L8005A818, L8005A844, L8005A950 .word L8005A89C, L8005A8BC, L8005A950, L8005A8E0 .word L8005A8F0, L8005A91C, L8005A950, L8005A950 .word L8005A950, L8005A950, L8005A948 -glabel D_800EE230 +glabel jpt_800EE230 .word L8005AD64, L8005AB98, L8005ABE0, L8005AC20 .word L8005AC60, L8005ACA0, L8005ACE0, L8005AD20 .word L8005AD60 -glabel D_800EE254 +glabel jpt_800EE254 .word L8005AF2C, L8005ADF4, L8005AE20, L8005AE4C .word L8005AE78, L8005AEA4, L8005AED0, L8005AEFC .word L8005AF28 -glabel D_800EE278 +glabel jpt_800EE278 .word L8005B088, L8005AF50, L8005AF7C, L8005AFA8 .word L8005AFD4, L8005B000, L8005B02C, L8005B058 .word L8005B084 -glabel D_800EE29C +glabel jpt_800EE29C .word L8005B1E4, L8005B0AC, L8005B0D8, L8005B104 .word L8005B130, L8005B15C, L8005B188, L8005B1B4 .word L8005B1E0 -glabel D_800EE2C0 +glabel jpt_800EE2C0 .word L8005B378, L8005B240, L8005B26C, L8005B298 .word L8005B2C4, L8005B2F0, L8005B31C, L8005B348 .word L8005B374 -glabel D_800EE2E4 +glabel jpt_800EE2E4 .word L8005B4D4, L8005B39C, L8005B3C8, L8005B3F4 .word L8005B420, L8005B44C, L8005B478, L8005B4A4 .word L8005B4D0 -glabel D_800EE308 +glabel jpt_800EE308 .word L8005B630, L8005B4F8, L8005B524, L8005B550 .word L8005B57C, L8005B5A8, L8005B5D4, L8005B600 .word L8005B62C -glabel D_800EE32C +glabel jpt_800EE32C .word L8005B78C, L8005B654, L8005B680, L8005B6AC .word L8005B6D8, L8005B704, L8005B730, L8005B75C .word L8005B788 -glabel D_800EE350 +glabel jpt_800EE350 .word L8005BB2C, L8005BB40, L8005BB54, L8005BB84 .word L8005BB98, L8005BBC8, L8005BBDC, L8005BC0C .word L8005BC20, L8005BC50, L8005BC64, L8005BCF0 @@ -2674,7 +2674,7 @@ glabel D_800EE350 .word L8005C1F8, L8005C228, L8005C23C, L8005C26C .word L8005C280 -glabel D_800EE434 +glabel jpt_800EE434 .word L8005C290, L8005B974, L8005B988, L8005B9D0 .word L8005B9E4, L8005BA08, L8005BA1C, L8005C290 .word L8005C290, L8005C290, L8005C290, L8005C290 @@ -2687,7 +2687,7 @@ glabel D_800EE434 glabel D_800EE4A8 .double 268.8 -glabel D_800EE4B0 +glabel jpt_800EE4B0 .word L8005E870, L8005DBD8, L8005E25C, L8005E870 .word L8005E6F0, L8005E870, L8005E0DC, L8005DEF0 .word L8005EA7C, L8005E3DC, L8005E6F0, L8005EA7C @@ -2701,13 +2701,13 @@ glabel D_800EE4E8 glabel D_800EE4F0 .double 0.04 -glabel D_800EE4F8 +glabel jpt_800EE4F8 .word L8005F7E0, L8005EE2C, L8005F380, L8005F7E0 .word L8005F6C8, L8005F7E0, L8005F268, L8005F0DC .word L8005F8F4, L8005F498, L8005F6C8, L8005F8F4 .word L8005F5B0 -glabel D_800EE52C +glabel jpt_800EE52C .word L800603C8, L8005F9A0, L8005FF28, L800603C8 .word L800602A0, L800603C8, L8005FE00, L8005FC60 .word L800604EC, L80060050, L800602A0, L800604EC @@ -2757,7 +2757,7 @@ glabel D_800EE5C0 glabel D_800EE5C4 .float 0.4 -glabel D_800EE5C8 +glabel jpt_800EE5C8 .word L80062810, L80062528, L800626E0, L80062810 .word L800627C4, L80062810, L80062694, L80062648 .word L8006285C, L8006272C, L800627C4, L8006285C @@ -3021,35 +3021,35 @@ glabel D_800EE858 glabel D_800EE860 .float 0.3 -glabel D_800EE864 +glabel jpt_800EE864 .word L8006C734, L8006C750, L8006C76C, L8006C788 .word L8006C7A4, L8006C9A4, L8006C9A4, L8006C9A4 .word L8006C7C0, L8006C9A4, L8006C7DC -glabel D_800EE890 +glabel jpt_800EE890 .word L8006CA50, L8006CA74, L8006CA98, L8006CABC .word L8006CAE0, L8006CB04, L8006CB28, L8006CB4C .word L8006CB70 -glabel D_800EE8B4 +glabel jpt_800EE8B4 .word L8006CF38, L8006D184, L8006CF4C, L8006D184 .word L8006CF60, L8006CF74, L8006CF88 -glabel D_800EE8D0 +glabel jpt_800EE8D0 .word L8006D200, L8006D22C, L8006D258, L8006D284 .word L8006D2B0 -glabel D_800EE8E4 +glabel jpt_800EE8E4 .word L8006D628, L8006D69C, L8006D720, L8006D794 .word L8006D808, L8006D87C, L8006D8F0, L8006D964 .word L8006D628 -glabel D_800EE908 +glabel jpt_800EE908 .word L8006D9F8, L8006DA6C, L8006DA6C, L8006DA6C .word L8006DA6C, L8006DBC8, L8006DBC8, L8006DBC8 .word L8006DAE0, L8006DBC8, L8006DB54 -glabel D_800EE934 +glabel jpt_800EE934 .word L8006DED0, L8006DF00, L8006DF30, L8006DF60 .word L8006DF90 @@ -3059,7 +3059,7 @@ glabel D_800EE948 glabel D_800EE94C .float 1.6 -glabel D_800EE950 +glabel jpt_800EE950 .word L8006F0E4, L8006F174, L8006F1AC, L8006F1E4 .word L8006F248, L8006F2A4, L8006F2FC, L8006F360 .word L8006F3E8, L8006F470, L8006F4D4, L8006F50C @@ -3126,13 +3126,13 @@ glabel D_800EE9E8 glabel D_800EE9EC .float 0.0257 -glabel D_800EE9F0 +glabel jpt_800EE9F0 .word L800705A0, L800706EC, L800706EC, L800706EC .word L800705B4, L800705C8, L80070640, L80070654 .word L80070668, L8007067C, L80070690, L800706A4 .word L800706B8, L800706CC, L800706E0 -glabel D_800EEA2C +glabel jpt_800EEA2C .word L800707CC .word L80071400, L80070848, L80070AA8, L80070B30 .word L80070C60, L80070DD8, L80070F10, L80070F8C @@ -3188,11 +3188,11 @@ glabel D_800EEAE0 glabel D_800EEAE8 .float 0.1 -glabel D_800EEAEC +glabel jpt_800EEAEC .word L80076524, L8007641C, L8007642C, L80076450 .word L80076514 -glabel D_800EEB00 +glabel jpt_800EEB00 .word L80076AD8, L80076A28, L80076A38 .word L80076A5C, L80076AC8 @@ -3248,18 +3248,18 @@ glabel D_800EEB78 glabel D_800EEB80 .double -0.6 -glabel D_800EEB88 +glabel jpt_800EEB88 .word L80078AFC, L80078B38, L80078B74, L80078BB0 .word L80078BEC -glabel D_800EEB9C +glabel jpt_800EEB9C .word L80078CA4, L80078CDC, L80078D14 .word L80078D54, L80078D8C glabel D_800EEBB0 .double 1.7578125 -glabel D_800EEBB8 +glabel jpt_800EEBB8 .word L80078E70, L80078F54, L80078F54, L80078F54 .word L80078E84, L80078E98, L80078EA8, L80078EBC .word L80078ED0, L80078EE4, L80078EF8, L80078F0C @@ -3268,7 +3268,7 @@ glabel D_800EEBB8 glabel D_800EEBF4 .float 0.15 -glabel D_800EEBF8 +glabel jpt_800EEBF8 .word L8007962C, L800793C8, L800793D8, L80079424 .word L80079454, L8007948C, L8007949C, L800794C0 .word L800794FC, L80079520, L80079548, L80079580 @@ -3280,18 +3280,18 @@ glabel D_800EEC38 glabel D_800EEC3C .float 0.15 -glabel D_800EEC40 +glabel jpt_800EEC40 .word L8007979C, L80079740, L80079750, L8007976C .word L80079794 glabel D_800EEC54 .float 0.15 -glabel D_800EEC58 +glabel jpt_800EEC58 .word L80079D04, L80079C4C, L80079C6C, L80079C84 .word L80079CB8, L80079CD8 -glabel D_800EEC70 +glabel jpt_800EEC70 .word L80079E5C, L80079E88, L80079EAC, L80079F2C .word L80079F40, L80079F9C, L80079FD4, L80079FE8 @@ -3301,7 +3301,7 @@ glabel D_800EEC90 glabel D_800EEC94 .float 0.15 -glabel D_800EEC98 +glabel jpt_800EEC98 .word L8007A218, L8007A168, L8007A178, L8007A194 .word L8007A1A4, L8007A1CC, L8007A1DC, L8007A204 @@ -3311,7 +3311,7 @@ glabel D_800EECB8 glabel D_800EECBC .float 0.15 -glabel D_800EECC0 +glabel jpt_800EECC0 .word L8007A3E0, L8007A330, L8007A340, L8007A35C .word L8007A36C, L8007A394, L8007A3A4, L8007A3CC @@ -3321,21 +3321,21 @@ glabel D_800EECE0 glabel D_800EECE4 .float 0.15 -glabel D_800EECE8 +glabel jpt_800EECE8 .word L8007A5C0, L8007A554, L8007A568, L8007A58C .word L8007A5B8 -glabel D_800EECFC +glabel jpt_800EECFC .word L8007AA30, L8007A9A0, L8007A9B8 .word L8007A9D0, L8007A9E0, L8007A9F8, L8007AA10 .word L8007AA28 -glabel D_800EED1C +glabel jpt_800EED1C .word L8007ABE8, L8007AABC, L8007AAE8 .word L8007AB14, L8007AB40, L8007AB6C, L8007AB98 .word L8007ABC4 -glabel D_800EED3C +glabel jpt_800EED3C .word L8007B998, L8007B41C, L8007B430 .word L8007B5A4, L8007B5D0, L8007B5FC, L8007B628 .word L8007B680, L8007B998, L8007B6A8, L8007B6D4 @@ -3360,11 +3360,11 @@ glabel D_800EEE10 glabel D_800EEE18 .double 55.0 -glabel D_800EEE20 +glabel jpt_800EEE20 .word L8007BFA0, L8007BF0C, L8007BF1C, L8007BF4C .word L8007BF68, L8007BF8C -glabel D_800EEE38 +glabel jpt_800EEE38 .word L8007C220, L8007C000 .word L8007C040, L8007C060, L8007C0BC, L8007C0F8 .word L8007C180, L8007C1B0, L8007C214 @@ -3403,18 +3403,18 @@ glabel D_800EEE9C glabel D_800EEEA0 .float 0.15 -glabel D_800EEEA4 +glabel jpt_800EEEA4 .word L8007C798, L8007C704, L8007C734, L8007C764 .word L8007C780 glabel D_800EEEB8 .float 0.15 -glabel D_800EEEBC +glabel jpt_800EEEBC .word L8007CF70, L8007CF2C, L8007CF3C, L8007CF50 .word L8007CF64 -glabel D_800EEED0 +glabel jpt_800EEED0 .word L8007D05C, L8007CFB8, L8007CFE4 .word L8007D038, L8007D054 @@ -3463,38 +3463,38 @@ glabel D_800EEF44 glabel D_800EEF48 .float -1765.0 -glabel D_800EEF4C +glabel jpt_800EEF4C .word L8007E198, L8007E058, L8007E198, L8007E068 .word L8007E084, L8007E154, L8007E180 glabel D_800EEF68 .float -1371.0 -glabel D_800EEF6C +glabel jpt_800EEF6C .word L8007E4B4, L8007E42C, L8007E4B4, L8007E43C .word L8007E454, L8007E4A8 -glabel D_800EEF84 +glabel jpt_800EEF84 .word L8007E8CC, L8007E8F4 .word L8007E908, L8007E930, L8007E98C, L8007E9B4 .word L8007EA44, L8007EA80, L8007EB88 -glabel D_800EEFA8 +glabel jpt_800EEFA8 .word L8007E6E0 .word L8007E748, L8007E82C, L8007E844, L8007E85C -glabel D_800EEFBC +glabel jpt_800EEFBC .word L8007EE24, L8007EDBC, L8007EDCC, L8007EDE0 .word L8007EDF4 -glabel D_800EEFD0 +glabel jpt_800EEFD0 .word L8007F26C, L8007F008, L8007F05C .word L8007F084, L8007F26C, L8007F0B8, L8007F0E4 .word L8007F10C, L8007F26C, L8007F144, L8007F170 .word L8007F198, L8007F26C, L8007F1D0, L8007F200 .word L8007F228, L8007F26C, L8007F260 -glabel D_800EF018 +glabel jpt_800EF018 .word L8007F530 .word L8007F2CC, L8007F320, L8007F348, L8007F530 .word L8007F37C, L8007F3A8, L8007F3D0, L8007F530 @@ -3502,7 +3502,7 @@ glabel D_800EF018 .word L8007F494, L8007F4C0, L8007F4E8, L8007F530 .word L8007F524 -glabel D_800EF060 +glabel jpt_800EF060 .word L8007FE94, L8007FBBC, L8007FBE4 .word L8007FE94, L8007FDE0, L8007FE4C @@ -3512,11 +3512,11 @@ glabel D_800EF078 glabel D_800EF080 .double 1000.0 -glabel D_800EF088 +glabel jpt_800EF088 .word L80080294, L80080248, L80080258, L8008026C .word L80080280 -glabel D_800EF09C +glabel jpt_800EF09C .word L80080500, L80080454, L80080464 .word L800804AC, L800804E4 @@ -3532,7 +3532,7 @@ glabel D_800EF0C0 glabel D_800EF0C8 .float 0.025 -glabel D_800EF0CC +glabel jpt_800EF0CC .word L80081318, L80081328, L80081338, L80081348 .word L80081368, L80081358 @@ -3554,7 +3554,7 @@ glabel D_800EF100 glabel D_800EF108 .float 0.15 -glabel D_800EF10C +glabel jpt_800EF10C .word L80081A74, L80081970, L8008199C, L800819B0 .word L800819D8, L800819F8, L80081A74, L80081A74 .word L80081A74, L80081A74, L80081A08 @@ -3562,7 +3562,7 @@ glabel D_800EF10C glabel D_800EF138 .double 0.184 -glabel D_800EF140 +glabel jpt_800EF140 .word L80081D0C, L80081B70, L80081B80, L80081BC4 .word L80081C0C, L80081D0C, L80081D0C, L80081D0C .word L80081D0C, L80081D0C, L80081C44 @@ -3591,7 +3591,7 @@ glabel D_800EF198 glabel D_800EF1A0 .float 0.15 -glabel D_800EF1A4 +glabel jpt_800EF1A4 .word L80082C84, L80082CFC, L80082D38, L80082D68 .word L80082D94 @@ -3608,7 +3608,7 @@ glabel D_800EF1C0 glabel D_800EF1C8 .double 0.1 -glabel D_800EF1D0 +glabel jpt_800EF1D0 .word L80083368, L80083298, L800832EC, L80083300 .word L8008334C @@ -3629,7 +3629,7 @@ glabel D_800EF200 glabel D_800EF208 .float 0.1 -glabel D_800EF20C +glabel jpt_800EF20C .word L80083A3C, L80083998, L800839A8, L800839BC .word L80083A3C, L80083A3C, L80083A3C, L80083A3C .word L80083A3C, L80083A3C, L800839D0, L800839EC @@ -3640,7 +3640,7 @@ glabel D_800EF20C glabel D_800EF260 .float 0.1 -glabel D_800EF264 +glabel jpt_800EF264 .word L80083D30, L80083C54, L80083C64, L80083D30 .word L80083D30, L80083D30, L80083D30, L80083D30 .word L80083D30, L80083D30, L80083C78, L80083C9C @@ -3687,7 +3687,7 @@ glabel D_800EF2F0 glabel D_800EF2F8 .float 0.08 -glabel D_800EF2FC +glabel jpt_800EF2FC .word L80084848, L80084904, L80084968, L800849CC .word L80084A30, L80084A94 @@ -3721,18 +3721,18 @@ glabel D_800EF350 glabel D_800EF358 .float 0.04 -glabel D_800EF35C +glabel jpt_800EF35C .word L80084C80, L80084BCC, L80084BDC, L80084C48 .word L80084C6C -glabel D_800EF370 +glabel jpt_800EF370 .word L80085000, L80084D7C, L80084DBC .word L80084E5C, L80084F10, L80084F3C, L80084FAC glabel D_800EF38C .float 0.4 -glabel D_800EF390 +glabel jpt_800EF390 .word L80085104, L80085114, L80085124, L80085138 .word L8008514C, L80085160 @@ -3743,7 +3743,7 @@ glabel D_800EF3A8 glabel D_800EF3B0 .double -1250.0 -glabel D_800EF3B8 +glabel jpt_800EF3B8 .word L80085588, L800855BC, L80085600, L80085614 .word L8008565C, L80085670, L800856B4, L800856FC .word L80085710 @@ -3758,7 +3758,7 @@ glabel D_800EF3E0 glabel D_800EF3E8 .double -1431.0 -glabel D_800EF3F0 +glabel jpt_800EF3F0 .word L80085DA8, L80085CE0, L80085CF0, L80085D18 .word L80085D38, L80085D48, L80085D70, L80085D80 .word L80085DA0 @@ -3768,14 +3768,14 @@ glabel D_800EF3F0 glabel D_800EF418 .double 799.0 -glabel D_800EF420 +glabel jpt_800EF420 .word L80085EE8, L80085E78, L80085E88, L80085EB0 .word L80085ED0, L80085EE0 glabel D_800EF438 .double -2013.0 -glabel D_800EF440 +glabel jpt_800EF440 .word L80086064, L80085FB4, L80085FC4, L80085FEC .word L80085FFC, L80086014, L80086024, L8008604C .word L8008605C @@ -3788,7 +3788,7 @@ glabel D_800EF468 glabel D_800EF470 .float 0.005 -glabel D_800EF474 +glabel jpt_800EF474 .word L80086BB0, L80086990, L800869A0, L80086A04 .word L80086A18, L80086AFC, L80086B6C, L80086B8C @@ -3863,7 +3863,7 @@ glabel D_800EF508 glabel D_800EF510 .double 10000.0 -glabel D_800EF518 +glabel jpt_800EF518 .word L8008C1A8, L8008C040, L8008C060, L8008C088 .word L8008C0B0, L8008C0F8, L8008C140, L8008C168 @@ -3915,19 +3915,19 @@ glabel D_800EF5A0 glabel D_800EF5A8 .double 0.05 -glabel D_800EF5B0 +glabel jpt_800EF5B0 .word L8008FF40, L8008FFB8, L80090010, L80090028 .word L80090140, L80090084, L80090140, L80090140 .word L80090140, L80090140, L80090140, L80090010 .word L80090140, L80090138, L80090138, L80090138 .word L800900E0, L80090138 -glabel D_800EF5F8 +glabel jpt_800EF5F8 .word L80090474, L80090698, L80090698, L80090698 .word L80090698, L80090698, L80090698, L80090698 .word L80090698, L80090698, L80090698, L80090580 .word L800905C4, L8009060C, L80090698, L80090650 -glabel D_800EF638 +glabel jpt_800EF638 .word L800909D0, L80090B80, L80090C84, L80090CDC .word L80090E08 @@ -3942,7 +3942,7 @@ glabel D_800EF658 glabel D_800EF65C .float -1820.0 -glabel D_800EF660 +glabel jpt_800EF660 .word L8009117C, L80091184, L80091158, L80091158 .word L80091158, L80091158 @@ -5601,19 +5601,19 @@ glabel D_800F0CC8 glabel D_800F0CD0 .double 0.6931471805599453 -glabel D_800F0CD8 +glabel jpt_800F0CD8 .word L800926B8, L800926D4, L80092704, L80092734 .word L80092764, L80092794, L800927EC, L80092844 .word L8009289C, L800928CC, L80092938, L800929A4 .word L800929FC, L80092A2C, L80092A70, L80092B04 .word L80092B5C, L80092BA0, L80092C5C -glabel D_800F0D24 +glabel jpt_800F0D24 .word L80092D58, L80092DE4, L80092D58, L80092D38 .word L80092D48, L80092DE4, L80092DE4, L80092DE4 .word L80092DE4, L80092DE4, L80092D58 -glabel D_800F0D50 +glabel jpt_800F0D50 .word L80092D88, L80092DB8, L80092DE0, L80092DA8 .word L80092DE0, L80092DE0, L80092DA0, L80092DD0 .word L80092DE0, L80092DC0, L80092DC8, L80092DD8 @@ -5623,7 +5623,7 @@ glabel D_800F0D50 .word L80092DE0, L80092DE0, L80092DE0, L80092DE0 .word L80092DE0, L80092DE0, L80092D98 -glabel D_800F0DCC +glabel jpt_800F0DCC .word L80092F44, L80092F4C, L80092F44, L80092F54 .word L8009302C, L8009302C, L8009302C, L8009302C .word L80092F5C, L8009302C, L8009302C, L8009302C @@ -5640,7 +5640,7 @@ glabel D_800F0DCC .word L8009302C, L8009302C, L8009302C, L8009302C .word L8009302C, L8009302C, L80092F7C, L80092F84 -glabel D_800F0EBC +glabel jpt_800F0EBC .word L80092FDC, L80092FD4, L8009302C, L8009302C .word L8009302C, L8009302C, L8009302C, L8009302C .word L8009302C, L8009302C, L8009302C, L80092FE4 @@ -5655,44 +5655,44 @@ glabel D_800F0EBC .word L8009302C, L80092FEC, L8009302C, L80092FF4 .word L80092FFC, L80093004, L8009302C, L80093014 -glabel D_800F0F8C +glabel jpt_800F0F8C .word L80093AAC, L80093AC4, L80093AC4, L80093AC4 .word L80093AC4, L80093B34, L80093B34, L80093B34 .word L80093B00, L80093B00, L80093B00, L80093B00 -glabel D_800F0FBC +glabel jpt_800F0FBC .word L80093BC4, L80093BE4, L80093BD4, L80093BD4 .word L80093BE4, L80093C0C, L80093C0C, L80093C0C .word L80093BD4, L80093BE4, L80093BF4, L80093C04 -glabel D_800F0FEC +glabel jpt_800F0FEC .word L80094BE8, L80094BE8, L80094BE8, L80094BE8 .word L80094BE8, L80094BD0, L80094BE8, L80094BE8 .word L80094BE8 -glabel D_800F1010 +glabel jpt_800F1010 .word L80095530, L80095530, L80095530, L80095530 .word L80095530, L80094CE4, L80094D28, L80094EAC .word L80094F18, L80094F34, L80094FF0, L80095094 .word L800951E8, L8009531C -glabel D_800F1048 +glabel jpt_800F1048 .word L80095600, L8009561C, L80095638, L80095654 .word L80095670, L8009568C -glabel D_800F1060 +glabel jpt_800F1060 .word L8009BB00, L8009BB14, L8009BB28, L8009BB44 .word L8009BB64 glabel D_800F1074 .float 0.457 -glabel D_800F1078 +glabel jpt_800F1078 .word L8009CBD4, L8009CB6C, L8009CB7C, L8009CB8C .word L8009CB9C, L8009CBAC, L8009CBD4, L8009CBBC .word L8009CBCC -glabel D_800F109C +glabel jpt_800F109C .word L8009D06C, L8009D07C, L8009D08C, L8009D09C .word L8009D0AC, L8009D0AC, L8009D0AC, L8009D0AC .word L8009D0AC, L8009D0AC, L8009D07C, L8009D08C @@ -5703,19 +5703,19 @@ glabel D_800F109C .word L8009D0AC, L8009D0AC, L8009D07C, L8009D08C .word L8009D09C -glabel D_800F1120 +glabel jpt_800F1120 .word L8009D0FC, L8009D11C, L8009D138, L8009D154 .word L8009D170 -glabel D_800F1134 +glabel jpt_800F1134 .word L8009D1DC, L8009D214, L8009D22C, L8009D4D8 .word L8009D50C -glabel D_800F1148 +glabel jpt_800F1148 .word L8009D280, L8009D2C8, L8009D318, L8009D364 .word L8009D3C4, L8009D414 -glabel D_800F1160 +glabel jpt_800F1160 .word L8009F5D0, L8009F5D0, L8009F5D0, L8009F5D0 .word L8009F5D0, L8009F5D0, L8009F5D0, L8009F5D0 .word L8009F5D0, L8009F5D0, L8009F5D0, L8009F5D0 @@ -5733,7 +5733,7 @@ glabel D_800F1160 .word L8009F5D0, L8009F5D0, L8009F5D0, L8009F5D0 .word L8009F5D0, L8009F5D0, L8009F5D0 -glabel D_800F125C +glabel jpt_800F125C .word L8009EF08, L8009EF08, L8009EF08, L8009EF08 .word L8009EF08, L8009F5D0, L8009EF08, L8009EF08 .word L8009EF08, L8009EF08, L8009EF08, L8009EF00 @@ -5778,7 +5778,7 @@ glabel D_800F125C .word L8009F5D0, L8009F5D0, L8009F5D0, L8009F5D0 .word L8009E774, L8009E800 -glabel D_800F1504 +glabel jpt_800F1504 .word L8009ECAC, L8009ECD4, L8009ED08, L8009F5D0 .word L8009F5D0, L8009F5D0, L8009F5D0, L8009F5D0 .word L8009F5D0, L8009ED9C, L8009EDC8, L8009EDC8 @@ -5797,7 +5797,7 @@ glabel D_800F1504 glabel D_800F15E0 .float 750.0 -glabel D_800F15E4 +glabel jpt_800F15E4 .word L800A08BC, L800A08BC, L800A08BC, L800A08BC .word L800A08BC, L800A08BC, L800A08BC, L800A08BC .word L800A08BC, L800A08BC, L800A08BC, L800A08BC @@ -5815,11 +5815,11 @@ glabel D_800F15E4 .word L800A08BC, L800A08BC, L800A08BC, L800A08BC .word L800A08BC, L800A08BC, L800A08BC -glabel D_800F16E0 +glabel jpt_800F16E0 .word L800A07FC, L800A080C, L800A081C, L800A082C .word L800A083C, L800A084C -glabel D_800F16F8 +glabel jpt_800F16F8 .word L800A0240, L800A0280, L800A0280, L800A0280 .word L800A0280, L800A08C4, L800A01F8, L800A01F8 .word L800A01F8, L800A01F8, L800A01F8, L800A02A4 @@ -5869,7 +5869,7 @@ glabel D_800F16F8 .word L800A08C4, L800A08C4, L800A08C4, L800A08C4 .word L800A07EC -glabel D_800F19EC +glabel jpt_800F19EC .word L8009F844, L8009F874, L8009F8B8, L8009FB24 .word L8009F904, L800A08C4, L800A08C4, L800A08C4 .word L800A08C4, L8009FD14, L8009FD34, L8009FD34 @@ -5891,7 +5891,7 @@ glabel D_800F1AC8 glabel D_800F1ACC .float 0.9 -glabel D_800F1AD0 +glabel jpt_800F1AD0 .word L8009FF0C, L8009FF0C, L8009FF0C, L8009FF0C .word L8009FF50, L8009FF50, L8009FF90, L8009FF90 @@ -5907,22 +5907,22 @@ glabel D_800F1AF8 glabel D_800F1AFC .float 0.55 -glabel D_800F1B00 +glabel jpt_800F1B00 .word L800A0FE0, L800A103C, L800A0FE0, L800A0FE0 .word L800A103C glabel D_800F1B14 .float 0.65 -glabel D_800F1B18 +glabel jpt_800F1B18 .word L800A12F0, L800A1310, L800A12F0, L800A1310 .word L800A12F0 -glabel D_800F1B2C +glabel jpt_800F1B2C .word L800A139C, L800A13E0, L800A139C, L800A13E0 .word L800A139C -glabel D_800F1B40 +glabel jpt_800F1B40 .word L800A1470, L800A14A8, L800A1470, L800A1470 .word L800A14A8 @@ -5932,7 +5932,7 @@ glabel D_800F1B54 glabel D_800F1B58 .float 0.65 -glabel D_800F1B5C +glabel jpt_800F1B5C .word L800A2054, L800A2054, L800A2054, L800A2054 .word L800A2C7C, L800A2C7C, L800A2C7C, L800A2C7C .word L800A2C7C, L800A2118, L800A2118, L800A21E4 @@ -5971,7 +5971,7 @@ glabel D_800F1C40 glabel D_800F1C44 .float 0.6 -glabel D_800F1C48 +glabel jpt_800F1C48 .word L800A2CA0, L800A2CA0, L800A2CBC, L800A2CBC .word L800A2CBC, L800A2CBC, L800A2CBC, L800A2CBC .word L800A2CBC, L800A2CBC, L800A2CA0, L800A2CA0 @@ -6026,7 +6026,7 @@ glabel D_800F1CC8 glabel D_800F1CCC .float 0.6 -glabel D_800F1CD0 +glabel jpt_800F1CD0 .word L800A3FA4, L800A4478, L800A4478, L800A4478 .word L800A3FA4, L800A3FA4, L800A3FA4, L800A3FA4 .word L800A3FA4, L800A3FA4, L800A40C4, L800A40C4 @@ -6051,7 +6051,7 @@ glabel D_800F1D54 glabel D_800F1D58 .float 0.67 -glabel D_800F1D5C +glabel jpt_800F1D5C .word L800A449C, L800A449C, L800A449C, L800A449C .word L800A449C, L800A449C, L800A4528, L800A4528 .word L800A4528, L800A4528, L800A4528, L800A4528 @@ -6078,7 +6078,7 @@ glabel D_800F1DD4 glabel D_800F1DD8 .float 0.8 -glabel D_800F1DDC +glabel jpt_800F1DDC .word L800A5940, L800A5F90, L800A5F90, L800A5F90 .word L800A5F90, L800A5F90, L800A5F90, L800A5F90 .word L800A5F90, L800A5F90, L800A5940, L800A5940 @@ -6112,7 +6112,7 @@ glabel D_800F1E94 glabel D_800F1E98 .float 0.8 -glabel D_800F1E9C +glabel jpt_800F1E9C .word L800A5FB4, L800A5FB4, L800A5FB4, L800A5FB4 .word L800A5FB4, L800A5FB4, L800A6014, L800A6014 .word L800A6014, L800A6014, L800A6014, L800A6014 @@ -6155,7 +6155,7 @@ glabel D_800F1F30 glabel D_800F1F34 .float 1.2 -glabel D_800F1F38 +glabel jpt_800F1F38 .word L800A8164, L800A8164, L800A8164, L800A8164 .word L800A8164, L800A8164, L800A8164, L800A8164 .word L800A8164, L800A8164, L800A8164, L800A8164 @@ -6173,11 +6173,11 @@ glabel D_800F1F38 .word L800A8164, L800A8164, L800A8164, L800A8164 .word L800A8164, L800A8164, L800A8164 -glabel D_800F2034 +glabel jpt_800F2034 .word L800A8134, L800A8144, L800A8144, L800A8144 .word L800A8144, L800A8154 -glabel D_800F204C +glabel jpt_800F204C .word L800A7F20, L800A7F20, L800A7F20, L800A7F20 .word L800A816C, L800A7F74, L800A7F74, L800A7F74 .word L800A7F74, L800A816C, L800A7F10, L800A8014 @@ -6226,7 +6226,7 @@ glabel D_800F204C .word L800A816C, L800A816C, L800A816C, L800A816C .word L800A816C, L800A816C, L800A816C, L800A8124 -glabel D_800F233C +glabel jpt_800F233C .word L800A816C, L800A816C, L800A816C, L800A816C .word L800A816C, L800A7D30, L800A816C, L800A816C .word L800A816C, L800A816C, L800A7D8C, L800A7E00 @@ -6256,15 +6256,15 @@ glabel D_800F2430 glabel D_800F2438 .double 0.3 -glabel D_800F2440 +glabel jpt_800F2440 .word L800A7DC8, L800A7DC8, L800A7DC8, L800A7DD8 .word L800A7DD8, L800A7DD8, L800A7DD8, L800A7DD8 -glabel D_800F2460 +glabel jpt_800F2460 .word L800A7E2C, L800A7E2C, L800A7E2C, L800A7E3C .word L800A7E3C, L800A7E3C, L800A7E3C, L800A7E3C -glabel D_800F2480 +glabel jpt_800F2480 .word L800A7EB4, L800A7EB4, L800A7EB4, L800A7EB4 .word L800A7EB4, L800A7EB4, L800A7EB4, L800A7EB4 @@ -6292,67 +6292,67 @@ glabel D_800F24B8 glabel D_800F24C0 .double 127.0 -glabel D_800F24C8 +glabel jpt_800F24C8 .word L800A9748, L800A9748, L800A9770, L800A9750 .word L800A9750, L800A9758, L800A9760, L800A9768 -glabel D_800F24E8 +glabel jpt_800F24E8 .word L800A9BC8, L800A9BD8, L800A9C28, L800A9C30 .word L800A9BEC -glabel D_800F24FC +glabel jpt_800F24FC .word L800A9C6C, L800A9CD0, L800A9D4C, L800A9D2C .word L800A9CA4 -glabel D_800F2510 +glabel jpt_800F2510 .word L800A9E48, L800A9E48, L800A9DB0, L800A9DF0 .word L800A9E48 -glabel D_800F2524 +glabel jpt_800F2524 .word L800A9E88, L800A9E88, L800A9E88, L800A9E88 .word L800A9EA0, L800A9EA0, L800A9EBC, L800A9EBC -glabel D_800F2544 +glabel jpt_800F2544 .word L800A9F7C, L800A9F7C, L800A9F7C, L800A9FD8 .word L800A9FD8 -glabel D_800F2558 +glabel jpt_800F2558 .word L800AA09C, L800AA09C, L800AA09C, L800AA09C .word L800AA09C -glabel D_800F256C +glabel jpt_800F256C .word L800AA198, L800AA198, L800AA198, L800AA198 .word L800AA198 -glabel D_800F2580 +glabel jpt_800F2580 .word L800AA328, L800AA328, L800AA328, L800AA328 .word L800AA334, L800AA334, L800AA334, L800AA334 -glabel D_800F25A0 +glabel jpt_800F25A0 .word L800AA6F4, L800AA7CC, L800AA8A4, L800AA8F0 .word L800AA9C4, L800AA9C4 -glabel D_800F25B8 +glabel jpt_800F25B8 .word L800AAB28, L800AAAD4, L800AAB80, L800AAACC .word L800AAB5C -glabel D_800F25CC +glabel jpt_800F25CC .word L800AAC10, L800AABB4, L800AABCC, L800AABD8 .word L800AAC10 -glabel D_800F25E0 +glabel jpt_800F25E0 .word L800AAC50, L800AACF0, L800AAD14, L800AACF0 .word L800AAD14 -glabel D_800F25F4 +glabel jpt_800F25F4 .word L800AB090, L800AB044, L800AB088, L800AB090 .word L800AB04C -glabel D_800F2608 +glabel jpt_800F2608 .word L800AB0BC, L800AB114, L800AB15C, L800AB13C .word L800AB0E8 -glabel D_800F261C +glabel jpt_800F261C .word L800AB1B8, L800AB250, L800AB1E4, L800AB1F8 .word L800AB250 @@ -6389,7 +6389,7 @@ glabel D_800F2678 glabel D_800F2680 .double 0.002 -glabel D_800F2688 +glabel jpt_800F2688 .word L800AC488, L800AC4EC, L800AC580, L800AC5D0 .word L800AC5D0, L800AC5D0, L800AC5D0, L800AC738 .word L800AC78C, L800AC7CC, L800AC878, L800AC8A0 @@ -6404,7 +6404,7 @@ glabel D_800F26C8 glabel D_800F26D0 .double 4.2 -glabel D_800F26D8 +glabel jpt_800F26D8 .word L800ACC84, L800ACCF4, L800ACD20, L800ACF2C .word L800ACF2C, L800ACF2C, L800ACF2C, L800ACF2C .word L800ACF2C, L800ACF2C, L800ACD68, L800ACD68 @@ -6419,28 +6419,28 @@ glabel D_800F2718 glabel D_800F2720 .double 4.2 -glabel D_800F2728 +glabel jpt_800F2728 .word L800ACF94, L800ACFB8, L800AD01C, L800AD128 .word L800AD190 -glabel D_800F273C +glabel jpt_800F273C .word L800AD1D8, L800AD208, L800AD234, L800AD254 .word L800AD298 -glabel D_800F2750 +glabel jpt_800F2750 .word L800AD31C, L800AD380, L800ADF34, L800ADF34 .word L800ADF34, L800AD438, L800AD438, L800AD438 .word L800AD438, L800AD438, L800AD438 -glabel D_800F277C +glabel jpt_800F277C .word L800AD8E8, L800AD8E8, L800AD8E8, L800AD8E8 .word L800AD8E8, L800AD8E8, L800AD954, L800AD954 -glabel D_800F279C +glabel jpt_800F279C .word L800ADB5C, L800ADBA4, L800ADBA4, L800ADF34 .word L800ADF34, L800ADF34, L800ADD64, L800AD8E8 -glabel D_800F27BC +glabel jpt_800F27BC .word L800ADF34, L800ADF34, L800ADF34, L800ADE14 .word L800ADF30 @@ -6453,7 +6453,7 @@ glabel D_800F27D8 glabel D_800F27E0 .double 4.2 -glabel D_800F27E8 +glabel jpt_800F27E8 .word L800AD728, L800AD728, L800AD718, L800AD764 .word L800AD738, L800AD758, L800AD758, L800AD758 .word L800AD758, L800AD758, L800AD758, L800AD758 @@ -6485,11 +6485,11 @@ glabel D_800F2858 glabel D_800F2860 .double 4.2 -glabel D_800F2868 +glabel jpt_800F2868 .word L800ADE80, L800ADEA0, L800ADEB0, L800ADEC0 .word L800ADED0 -glabel D_800F287C +glabel jpt_800F287C .word L800ADF84, L800AE208, L800AE208, L800AE208 .word L800AE208, L800AE208, L800AE208, L800AE208 .word L800AE208, L800AE208, L800AE208, L800ADFA0 @@ -6512,7 +6512,7 @@ glabel D_800F2938 glabel D_800F2940 .double 4.2 -glabel D_800F2948 +glabel jpt_800F2948 .word L800AE260, L800AE2C8, L800AEC40, L800AEC40 .word L800AEC40, L800AEC40, L800AEC40, L800AEC40 .word L800AEC40, L800AEC40, L800AEC40, L800AE2E8 @@ -6534,7 +6534,7 @@ glabel D_800F29F8 glabel D_800F2A00 .double 4.2 -glabel D_800F2A08 +glabel jpt_800F2A08 .word L800AE560, L800AE560, L800AE550, L800AE59C .word L800AE570, L800AE590, L800AE590, L800AE590 .word L800AE590, L800AE590, L800AE590, L800AE590 @@ -6566,19 +6566,19 @@ glabel D_800F2A78 glabel D_800F2A80 .double 4.2 -glabel D_800F2A88 +glabel jpt_800F2A88 .word L800AEC88, L800AECE4, L800AED10, L800AED50 .word L800AED34 -glabel D_800F2A9C +glabel jpt_800F2A9C .word L800AF038, L800AF0BC, L800AF0BC, L800AF0BC .word L800AF0BC, L800AF0FC, L800AF178, L800AF198 -glabel D_800F2ABC +glabel jpt_800F2ABC .word L800AF2C8, L800AF2F4, L800AF34C, L800AF408 .word L800AF46C -glabel D_800F2AD0 +glabel jpt_800F2AD0 .word L800AF530, L800AF59C, L800AF62C, L800AF6D4 .word L800AF6F0 @@ -6593,7 +6593,7 @@ glabel D_800F2AF0 glabel D_800F2AF8 .double 0.4 -glabel D_800F2B00 +glabel jpt_800F2B00 .word L800AF794, L800AF800, L800AF890, L800AF938 .word L800AF954 @@ -6678,13 +6678,13 @@ glabel D_800F2C0C .asciiz "pak2_ghost_kart=%d\n" .balign 4 -glabel D_800F2C20 +glabel jpt_800F2C20 .word L800B04B8, L800B04D0, L800B04E8, L800B0500 .word L800B0510, L800B043C, L800B0454, L800B046C .word L800B0484, L800B049C, L800B04B8, L800B04D0 .word L800B04E8, L800B0500 -glabel D_800F2C58 +glabel jpt_800F2C58 .word L800B05E0, L800B05E0 .word L800B05E0, L800B05E0, L800B13A0, L800B13A0 .word L800B13A0, L800B13A0, L800B13A0, L800B0AF4 @@ -6708,7 +6708,7 @@ glabel D_800F2D28 glabel D_800F2D30 .double 4.2 -glabel D_800F2D38 # jump table +glabel jpt_800F2D38 # jump table .word L800B0948, L800B096C, L800B0980, L800B09C0 .word L800B09C0, L800B09A0 @@ -6751,22 +6751,22 @@ glabel D_800F2DA8 glabel D_800F2DB0 .double 4.2 -glabel D_800F2DB8 +glabel jpt_800F2DB8 .word L800B1CE8, L800B1D34, L800B1F78, L800B1F2C .word L800B1D84, L800B1FE8, L800B1FF4, L800B20D4 .word L800B20D4, L800B20D4 -glabel D_800F2DE0 +glabel jpt_800F2DE0 .word L800B2178, L800B21CC .word L800B2240, L800B231C, L800B2414, L800B24DC .word L800B2604 -glabel D_800F2DFC +glabel jpt_800F2DFC .word L800B2A6C, L800B3468, L800B3468, L800B2AA4 .word L800B2D30, L800B2F70, L800B32B4 .word L800B32B4, L800B2F70 -glabel D_800F2E20 +glabel jpt_800F2E20 .word L800B4070, L800B4100 .word L800B4230, L800B43B0, L800B4494, L800B4014 .word L800B4024, L800B4030, L800B4040, L800B4054 @@ -6786,7 +6786,7 @@ glabel D_800F2E74 # u8* ext_name param to osPfsFindFile glabel D_800F2E80 .float 262159.0 -glabel D_800F2E84 +glabel jpt_800F2E84 .word L800BA210, L800BA1E4, L800BA14C, L800BA094 .word L800BA050 @@ -6835,7 +6835,7 @@ glabel D_800F2ED0 .word 0x00000000, 0x00000000, 0x00000000 -glabel D_800F2EE0 +glabel jpt_800F2EE0 .word L800BE60C, L800BE618, L800BE62C, L800BE638 .word L800BE794, L800BE864, L800BE7C4, L800BE7C4 .word L800BE844 @@ -6847,12 +6847,12 @@ glabel D_800F2F08 .float 0.00001 .word 0x00000000 -glabel D_800F2F10 +glabel jpt_800F2F10 .word L800BF3E8, L800BF600, L800BF600, L800BF380 .word L800BF348, L800BF600, L800BF600, L800BF3C8 .word L800BF308, L800BF600, L800BF600, L800BF2D0 -glabel D_800F2F40 +glabel jpt_800F2F40 .word L800BF408, L800BF450, L800BF4B0, L800BF478 .word L800BF478, L800BF4C4, L800BF534, L800BF5BC .word L800BF450, L800BF408, L800BF5C4, L800BF5F0 @@ -6866,7 +6866,7 @@ glabel D_800F2F74 glabel D_800F2F78 .float 16129.0 -glabel D_800F2F7C +glabel jpt_800F2F7C .word L800BFA20, L800BFA28, L800BFA20, L800BFA28 .word L800BFA20 @@ -6890,7 +6890,7 @@ glabel D_800F2F7C -glabel D_800F2F90 +glabel jpt_800F2F90 .word L800C0124, L800C0078, L800C0140, L800C0150 .word L800C0094, L800C035C, L800C03B4, L800C03EC .word L800C03EC, L800C0438, L800C0448, L800C03EC @@ -6908,7 +6908,7 @@ glabel D_800F2F90 .word L800BFFA0, L800BFFA0, L800BFFA0, L800BFED4 .word L800BFEB4, L800C0880, L800BFE7C -glabel D_800F308C +glabel jpt_800F308C .word L800C0684, L800BFE40, L800BFE40, L800BFE40 .word L800BFE40, L800BFE40, L800BFE40, L800BFE40 .word L800BFE40, L800BFE40, L800BFE40, L800BFE40 @@ -6955,7 +6955,7 @@ glabel D_800F308C .word L800BFE40, L800BFE40, L800BFE40, L800BFE40 .word L800C077C -glabel D_800F3350 +glabel jpt_800F3350 .word L800C0FF4, L800C0FE4, L800C0AE8, L800C0AE8 .word L800C0FD4, L800C0AE8, L800C0AE8, L800C0AE8 .word L800C0FC4, L800C0F98, L800C0F98, L800C0F88 @@ -6971,7 +6971,7 @@ glabel D_800F3350 .word L800C0BD4, L800C0C54, L800C0C54, L800C0C54 .word L800C0B90, L800C0AE8, L800C0AE8, L800C0AE8 -glabel D_800F3430 +glabel jpt_800F3430 .word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8 .word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8 .word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8 @@ -7003,7 +7003,7 @@ glabel D_800F3430 glabel D_800F35C0 .float 3.333333333 -glabel D_800F35C4 +glabel jpt_800F35C4 .word L800C1A34, L800C1A34, L800C1A34, L800C1A34 .word L800C1AEC, L800C1A34 @@ -7019,20 +7019,20 @@ glabel D_800F35E4 glabel D_800F35E8 .float 0.85 -glabel D_800F35EC +glabel jpt_800F35EC .word L800C2A80, L800C2AB8, L800C2AD8, L800C2CDC .word L800C2E40, L800C2F04, L800C3008, L800C3118 .word L800C3154, L800C31E4, L800C3218, L800C32B8 .word L800C32EC, L800C3430, L800C3390, L800C33E0 -glabel D_800F362C +glabel jpt_800F362C .word L800C3DEC, L800C3E10, L800C3E30, L800C3E70 .word L800C3E98, L800C3EBC, L800C3F04 glabel D_800F3648 .float 100000.0 -glabel D_800F364C +glabel jpt_800F364C .word L800C423C, L800C4268, L800C42A4, L800C42C8 .word L800C42FC, L800C4330 @@ -7072,7 +7072,7 @@ glabel D_800F368C glabel D_800F3690 .float 0.4 -glabel D_800F3694 +glabel jpt_800F3694 .word L800C6544, L800C6618, L800C64E4, L800C65B8 .word L800C65B8, L800C65B8, L800C65B8, L800C65B8 .word L800C65B8, L800C65B8, L800C65B8, L800C65B8 @@ -7115,7 +7115,7 @@ glabel D_800F3734 glabel D_800F3738 .float 0.95 -glabel D_800F373C +glabel jpt_800F373C .word L800C69C8, L800C6A0C, L800C6910, L800C6C74 .word L800C6CB8, L800C6CFC, L800C6D40, L800C6D84 .word L800C6DC8, L800C6E0C, L800C6E50, L800C6E94 @@ -7128,24 +7128,24 @@ glabel D_800F373C glabel D_800F37B8 .float 3500.0 -glabel D_800F37BC +glabel jpt_800F37BC .word L800C718C, L800C7198, L800C71B0, L800C71BC .word L800C71A4, L800C71F4, L800C71F4, L800C71C8 .word L800C71F4, L800C71F4, L800C71F4, L800C71F4 .word L800C71EC, L800C71F4, L800C71D4, L800C71E0 -glabel D_800F37FC +glabel jpt_800F37FC .word L800C7238, L800C7244, L800C725C, L800C7268 .word L800C7250, L800C7294, L800C7294, L800C7274 .word L800C7294, L800C7294, L800C7294, L800C7294 .word L800C7290, L800C7294, L800C7280, L800C7288 -glabel D_800F383C +glabel jpt_800F383C .word L800C72F8, L800C72B8, L800C742C, L800C73B8 .word L800C7378, L800C742C, L800C7338, L800C7428 .word L800C742C, L800C7418, L800C7420 -glabel D_800F3868 +glabel jpt_800F3868 .word L800C7494, L800C7454, L800C75C8, L800C7554 .word L800C7514, L800C75C8, L800C74D4, L800C75C4 .word L800C75C8, L800C75B4, L800C75BC @@ -7177,7 +7177,7 @@ glabel D_800F38B0 glabel D_800F38B4 .float 0.85 -glabel D_800F38B8 +glabel jpt_800F38B8 .word L800C9560, L800C9560, L800C95BC, L800C9618 .word L800C9674, L800C96D0, L800C95BC, L800C96D0 @@ -7283,7 +7283,7 @@ glabel D_800F3958 glabel D_800F395C .float 4805.0 -glabel D_800F3960 +glabel jpt_800F3960 .word L800C9B3C, L800C9B3C, L800C9B68, L800C9B94 .word L800C9BC0, L800C9BEC, L800C9B68, L800C9BEC @@ -7331,7 +7331,7 @@ glabel D_800F39B4 .balign 16 -glabel D_800F39C0 +glabel jpt_800F39C0 .word L800CBE60, L800CBE78, L800CBE90, L800CBEA8 .word L800CBEC0, L800CBECC, L800CBF08, L800CBEEC diff --git a/data/data_0DD0A0_3_1.s b/data/data_0DD0A0_3_1.s index 7c35f4fc0..51784a754 100644 --- a/data/data_0DD0A0_3_1.s +++ b/data/data_0DD0A0_3_1.s @@ -13,7 +13,7 @@ glabel D_800F3A00 .byte 0x00, 0x04, 0x08, 0x08, 0x0c, 0x0c, 0x0c, 0x0c .byte 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 -glabel D_800F3A20 +glabel jpt_800F3A20 .word L800D1668, L800D1630, L800D1610, L800D1474 .word L800D1420, L800D15B4, L800D13E8, L800D13F4 .word L800D1400 diff --git a/data/data_121DA0_2.s b/data/data_121DA0_2.s index acf8f8d22..9a635b88b 100644 --- a/data/data_121DA0_2.s +++ b/data/data_121DA0_2.s @@ -46,6 +46,6 @@ glabel D_802B91C8 .word 0x00000000, 0x00000000, 0x00000000, 0x00000000 .word 0x00000000, 0x00000000 -#glabel D_802B91E0 +#glabel jpt_802B91E0 #.word L8028E6BC, L8028E958, L8028EAB0, L8028EC28 #.word L8028EC04, L8028E714, L8028E838, L8028EBAC diff --git a/data/data_121DA0_2_1.s b/data/data_121DA0_2_1.s index dc75c4c66..c2a38f91b 100644 --- a/data/data_121DA0_2_1.s +++ b/data/data_121DA0_2_1.s @@ -8,7 +8,7 @@ #glabel D_802B9200 #.float 1.33333337 -#glabel D_802B9204 +#glabel jpt_802B9204 #.word L8028ECE0, L8028ED10, L8028ED40, L8028ED50 #.word L8028ED00, L8028ED60, L8028ED30, L8028ECE0 #.word L8028ECE0, L8028ED00, L8028ECF0, L8028ED20 @@ -20,7 +20,7 @@ #glabel D_802B9254 #.float 0.01666666 -#glabel D_802B9258 +#glabel jpt_802B9258 #.word L8028F4CC, L8028F4CC, L8028F4B0, L8028F4B0 #.word L8028F4B0, L8028F4D4, L8028F4B0 @@ -30,7 +30,7 @@ #glabel D_802B9278 #.float 0.028 -#glabel D_802B927C +#glabel jpt_802B927C #.word L8028FD10, L8028FE90, L8028FFE4, L8029003C #.word L80290088, L80290200, L802902CC, L80290304 @@ -53,56 +53,56 @@ glabel D_802B92B0 .word 0x00000000, 0x00000000 -glabel D_802B92C0 +glabel jpt_802B92C0 .word L80291488, L802914F4, L80292454, L80292454 .word L80291600, L80292454, L80292454, L80292454 .word L80292454, L80292454, L80291870, L80291A6C .word L80291B28, L80292454, L80292454, L80292454 .word L80291D4C -glabel D_802B9304 +glabel jpt_802B9304 .word L802916DC, L802916DC, L80291730, L80291730 .word L80291730, L80291730, L80291730, L802916DC .word L802916DC, L802916DC, L80291730, L80291730 .word L80291730, L80291730, L80291730, L802916DC -glabel D_802B9344 +glabel jpt_802B9344 .word L8029217C, L80292400, L80292400, L80292400 .word L80292400, L80292400, L80292400, L80292400 .word L80292400, L80292400, L80292400, L80292400 .word L802921A0, L802922A0, L80292400, L80292400 .word L80292358, L802923C0, L802923E0 -glabel D_802B9390 +glabel jpt_802B9390 .word L802925EC, L802925EC, L80292610, L80292628 .word L80292660, L80292660, L80292694, L802926C4 .word L802926C4, L802926D8, L802926F4, L80292730 .word L80292750, L80292750, L80292758, L80292758 .word L802925EC -glabel D_802B93D4 +glabel jpt_802B93D4 .word L80293D24, L80293D74, L80293DCC, L80293E24 .word L80293E80, L80293ED8 -glabel D_802B93EC +glabel jpt_802B93EC .word L80294DD8, L80294E28, L80294E7C, L80294ED0 .word L80294F28, L80294F7C -glabel D_802B9404 +glabel jpt_802B9404 .word L802956C4, L802956F0, L8029571C, L80295748 .word L80295774, L802957A0, L802957CC, L802957F8 .word L80295824, L80295850, L8029587C, L802958A8 .word L802958D4, L80295900, L8029592C, L80295958 .word L80295984, L802959B0, L802959DC, L80295A08 -glabel D_802B9454 +glabel jpt_802B9454 .word L80295AAC, L80295ABC, L80295ACC, L80295ADC .word L80295AEC, L80295AFC, L80295B0C, L80295B1C .word L80295B2C, L80295B3C, L80295B4C, L80295B5C .word L80295B6C, L80295B7C, L80295B8C, L80295B9C .word L80295BAC, L80295BBC, L80295BCC, L80295BDC -glabel D_802B94A4 +glabel jpt_802B94A4 .word L80295E3C, L80295EB0, L80295FA4, L80295FE8 .word L8029604C, L802960A0, L802960C8, L80296164 .word L8029618C, L802961C8, L80296204, L8029627C @@ -117,15 +117,15 @@ glabel D_802B94F8 .word 0 -glabel D_802B9500 +glabel jpt_802B9500 .word L80296B78, L80296B78, L80296B78, L80296B78 .word L80296BAC, L80296B88, L80296B78, L80296B78 -glabel D_802B9520 +glabel jpt_802B9520 .word L80296CBC, L80296CBC, L80296CBC, L80296CBC .word L80296CF0, L80296CCC, L80296CBC, L80296CBC -glabel D_802B9540 +glabel jpt_802B9540 .word L80296F28, L80296F6C, L80296F9C, L80296E40 .word L80296E6C, L80296E88, L80296ED8, L80296DDC .word L802971FC, L8029721C, L802971D8, L8029716C @@ -147,7 +147,7 @@ glabel D_802B95F4 glabel D_802B95F8 .float 4000000.0 -glabel D_802B95FC +glabel jpt_802B95FC .word L80297B10, L80297B3C, L80297B68, L80297B94 .word L80297BC0 @@ -175,7 +175,7 @@ glabel D_802B962C glabel D_802B9630 .float 4000000.0 -glabel D_802B9634 +glabel jpt_802B9634 .word L802988F0, L80298910, L80298930, L80298950 .word L80298970 @@ -266,7 +266,7 @@ glabel D_802B96B4 glabel D_802B96B8 .float 4000000.0 -glabel D_802B96BC +glabel jpt_802B96BC .word L8029AD04, L8029AD24, L8029AD44, L8029AD64 .word L8029AD84, L8029ADA4, L8029ADC4, L8029ADE4 @@ -386,30 +386,30 @@ glabel D_802B9774 glabel D_802B9778 .float -1.2 -glabel D_802B977C +glabel jpt_802B977C .word L8029D6A4, L8029D73C, L8029D6AC, L8029D73C .word L8029D6B4, L8029D6BC, L8029D73C, L8029D6C4 .word L8029D6F0, L8029D6F8, L8029D73C, L8029D700 -glabel D_802B97AC +glabel jpt_802B97AC .word L8029DBBC, L8029DC88, L8029DCA8, L8029DCC8 .word L8029DCDC, L8029DD40, L8029DD60, L8029DDA8 .word L8029DDD4, L8029DDF4, L8029DE28, L8029DE3C .word L8029DFD4, L8029DFE8, L8029DFFC, L8029E0D0 .word L8029E0E4, L8029E0F8, L8029E10C, L8029E130 -glabel D_802B97FC +glabel jpt_802B97FC .word L8029E3B0, L8029E7AC, L8029E488, L8029E7AC .word L8029E4A4, L8029E4C0, L8029E7AC, L8029E4F0 .word L8029E5DC, L8029E60C, L8029E7AC, L8029E704 .word L8029E7AC, L8029E7AC, L8029E7AC, L8029E7AC .word L8029E7AC, L8029E7AC, L8029E770 -glabel D_802B9848 +glabel jpt_802B9848 .word L8029E960, L8029E960, L8029E960, L8029E960 .word L8029EA8C, L8029E968, L8029E960, L8029E960 -glabel D_802B9868 +glabel jpt_802B9868 .word L8029EB34, L8029EB34, L8029EB34, L8029EB34 .word L8029EC60, L8029EB3C, L8029EB34, L8029EB34 @@ -446,21 +446,21 @@ glabel D_802B98AC glabel D_802B98B0 .float 0.1 -glabel D_802B98B4 +glabel jpt_802B98B4 .word L8029FE48, L802A00D8, L8029FE38, L8029FE38 .word L8029FE88, L802A00D8 -glabel D_802B98CC +glabel jpt_802B98CC .word L8029FFB4, L8029FFB4, L8029FF74, L8029FF74 .word L8029FF74, L8029FF74, L802A00D8, L802A00D8 .word L8029FF74, L8029FF74 -glabel D_802B98F4 +glabel jpt_802B98F4 .word L802A0030, L802A0030, L802A0004, L802A0004 .word L802A0004, L802A0004, L802A0058, L802A00D8 .word L802A0004, L802A0004 -glabel D_802B991C +glabel jpt_802B991C .word L802A09B0, L802A09B0, L802A09B0, L802A09D4 .word L802A04E0, L802A063C, L802A0858, L802A04AC .word L802A0968, L802A0D40, L802A0CBC, L802A0AA4 @@ -569,7 +569,7 @@ glabel D_802B9A3C glabel D_802B9A40 .float 250000.0 -glabel D_802B9A44 +glabel jpt_802B9A44 .word L802A31E4, L802A31FC, L802A3214, L802A32EC .word L802A3318, L802A3330, L802A3348, L802A34C0 .word L802A3378, L802A34D4, L802A34D4, L802A34D4 @@ -582,7 +582,7 @@ glabel D_802B9A44 .word L802A3440, L802A34AC, L802A3470, L802A3484 .word L802A3360, L802A34D4, L802A3498, L802A3300 -glabel D_802B9AF4 +glabel jpt_802B9AF4 .word L802A36D8, L802A36D8, L802A36D8, L802A3590 .word L802A35E0, L802A35A0, L802A35B0, L802A36E8 .word L802A3660, L802A36F0, L802A3630, L802A3650 @@ -642,18 +642,18 @@ glabel D_802B9C28 .word 0 -glabel D_802B9C30 +glabel jpt_802B9C30 .word L802A8FE0, L802A9014, L802A902C, L802A9044 .word L802A9060, L802A907C, L802A9094, L802A9094 .word L802A9094, L802A9094, L802A9094, L802A9094 .word L802A9094, L802A9094, L802A9094, L802A9094 .word L802A9094, L802A9094, L802A8FF8 -glabel D_802B9C7C +glabel jpt_802B9C7C .word L802A9250, L802A9268, L802A9280, L802A9298 .word L802A92B4, L802A92D0 -glabel D_802B9C94 +glabel jpt_802B9C94 .word L802A9BB8, L802A9BDC, L802A9C00 .word L802A9C24, L802A9C48, L802A9C6C, L802A9C90 .word L802A9CB4, L802A9CD8, L802A9CFC, L802A9D20 @@ -778,15 +778,15 @@ glabel D_802B9E88 glabel D_802B9E90 .double 0.015 -glabel D_802B9E98 +glabel jpt_802B9E98 .word L802B0A88, L802B0AB0, L802B0AF8, L802B0B40 .word L802B0B84, L802B0BCC, L802B0C70 -glabel D_802B9EB4 +glabel jpt_802B9EB4 .word L802B0EF4, L802B0F60, L802B1050, L802B1154 .word L802B11FC -glabel D_802B9EC8 +glabel jpt_802B9EC8 .word L802B2094, L802B237C, L802B25A0, L802B2718 .word L802B28E8, L802B285C @@ -805,17 +805,17 @@ glabel D_802B9EEC glabel D_802B9EF0 .float 0.3 -glabel D_802B9EF4 +glabel jpt_802B9EF4 .word L802B2B0C, L802B2B20, L802B2B4C, L802B2B78 .word L802B2BA4 -glabel D_802B9F08 +glabel jpt_802B9F08 .word L802B301C, L802B302C, L802B2FEC, L802B30BC .word L802B2FFC, L802B30CC, L802B300C, L802B309C .word L802B30AC, L802B308C, L802B307C, L802B303C .word L802B304C, L802B305C, L802B306C -glabel D_802B9F44 +glabel jpt_802B9F44 .word L802B33CC, L802B3614, L802B382C, L802B3B30 .word L802B3974, L802B3AC4 @@ -831,7 +831,7 @@ glabel D_802B9F64 glabel D_802B9F68 .float 25000000.0 -glabel D_802B9F6C +glabel jpt_802B9F6C .word L802B4324, L802B44B0, L802B4750, L802B4A9C .word L802B4AD8, L802B4B18, L802B4B94, L802B4CE4 .word L802B4D58, L802B4DE8 diff --git a/src/audio/effects.c b/src/audio/effects.c index 230180a2d..c436bdb09 100644 --- a/src/audio/effects.c +++ b/src/audio/effects.c @@ -313,15 +313,121 @@ GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE5BC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800BE5E0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_803B7088; -Unable to determine jump table for jr instruction at func_800BE5E0.s line 11. +f32 func_800BE5E0(void *arg0) { + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f2; + f32 temp_f6; + s16 temp_a2; + s16 temp_v1_3; + u8 temp_v0; + u8 temp_v1; + void *temp_v1_2; + s16 phi_a2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = arg0->unk1; + temp_v0 = arg0->unk0; + switch (temp_v1) { + case 0: + return 0.0f; + case 1: + if ((temp_v0 & 0x40) != 0) { + arg0->unk1 = 5; + } else { + case 2: + arg0->unk2 = 0; + arg0->unk1 = 3; + case 3: +loop_6: + temp_v1_2 = arg0->unk20 + (arg0->unk2 * 4); + arg0->unk4 = temp_v1_2->unk0; + temp_a2 = arg0->unk4; + if (temp_a2 != -3) { + if (temp_a2 != -2) { + if (temp_a2 != -1) { + if (temp_a2 == 0) { + arg0->unk1 = 0; + } else { + if (temp_a2 >= 4) { + arg0->unk4 = ((temp_a2 * D_803B7088.unkC) / D_803B7088.unk0) / 4; + } + phi_a2 = arg0->unk4; + if (arg0->unk4 == 0) { + arg0->unk4 = 1; + phi_a2 = arg0->unk4; + } + temp_v1_3 = arg0->unk2; + arg0->unk1 = 4; + temp_f6 = (arg0->unk20 + (temp_v1_3 * 4))->unk2; + arg0->unk2 = temp_v1_3 + 1; + arg0->unk18 = temp_f6 / 32767.0f; + temp_f0 = arg0->unk18; + arg0->unk18 = temp_f0 * temp_f0; + arg0->unkC = (arg0->unk18 - arg0->unk14) / phi_a2; + } + } else { + arg0->unk1 = 5; + } + } else { + arg0->unk2 = temp_v1_2->unk2; + goto loop_6; + } + } else { + arg0->unk1 = 1; + } + if (arg0->unk1 == 4) { + case 4: + arg0->unk4 = arg0->unk4 - 1; + arg0->unk14 = arg0->unk14 + arg0->unkC; + if (arg0->unk4 <= 0) { + arg0->unk1 = 3; + } + } + } + default: +block_30: + if ((temp_v0 & 0x20) != 0) { + arg0->unk1 = 6; + arg0->unk0 = temp_v0 & 0xFFDF; + } + if ((temp_v0 & 0x10) != 0) { + arg0->unk1 = 7; + arg0->unk0 = temp_v0 & 0xFFEF; + } + temp_f2 = arg0->unk14; + if (temp_f2 < 0.0f) { + return 0.0f; + } + if (temp_f2 > 1.0f) { + return 1.0f; + } + return temp_f2; + case 6: + case 7: + temp_f0_2 = arg0->unk8; + arg0->unk14 = arg0->unk14 - arg0->unk10; + if ((temp_f0_2 != 0.0f) && (temp_v1 == 6)) { + if (arg0->unk14 < temp_f0_2) { + arg0->unk14 = temp_f0_2; + arg0->unk4 = 0x80; + arg0->unk1 = 8; + } + } else if (arg0->unk14 < 0.00001f) { + arg0->unk14 = 0.0f; + arg0->unk1 = 0; + } + goto block_30; + case 8: + arg0->unk4 = arg0->unk4 - 1; + if (arg0->unk4 == 0) { + arg0->unk1 = 7; + } + goto block_30; + } +} #else GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE5E0.s") #endif diff --git a/src/audio/external.c b/src/audio/external.c index f0677bc1b..e98223df5 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -239,15 +239,60 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C1934.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C19D0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800CBB88(s32, f32); /* extern */ +? func_800CBBE8(s32, s8); /* extern */ +extern ? D_8018EF18; +extern ? D_80191420; +extern ? D_80192C48; -Unable to determine jump table for jr instruction at func_800C19D0.s line 25. +void func_800C19D0(u8 arg0, u8 arg1, u8 arg2) { + f32 sp3C; + s8 sp3B; + f32 sp34; + s8 sp33; + u32 temp_t6; + void *temp_s0; + void *temp_s0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0 & 0xFF; + sp3B = 0; + sp33 = 0x40; + sp3C = 1.0f; + sp34 = 1.0f; + switch (temp_t6) { + case 0: + case 1: + case 2: + case 3: + case 5: + temp_s0 = (temp_t6 * 0x3C0) + (arg1 * 0x30) + &D_80191420; + arg0 = temp_t6; + temp_s0->unk1C = sqrtf(temp_s0->unk1C, arg1); + sp3C = *(&D_80192C48 + (arg0 * 0x10)) * (func_800C1480(arg0, arg1) * *temp_s0->unk14); + sp3B = func_800C15D0(arg0, arg1, arg2); + sp34 = *temp_s0->unk10 * func_800C1934(arg0, arg1); + sp33 = func_800C16E8(*temp_s0->unk0, *temp_s0->unk8, temp_s0->unkC); + break; + } + temp_s0_2 = (arg2 * 0xC) + &D_8018EF18; + if (sp3C != temp_s0_2->unk0) { + func_800CBBE8(((arg2 & 0xFF) << 8) | 0x6020000 | 3, sp3C * 127.0f); + temp_s0_2->unk0 = sp3C; + } + if (sp3B != temp_s0_2->unk8) { + func_800CBBE8((arg2 << 8) | 0x5020000, sp3B); + temp_s0_2->unk8 = sp3B; + } + if (sp34 != temp_s0_2->unk4) { + func_800CBB88((arg2 << 8) | 0x4020000, sp34); + temp_s0_2->unk4 = sp34; + } + if (sp33 != temp_s0_2->unk9) { + func_800CBBE8((arg2 << 8) | 0x3020000, sp33); + temp_s0_2->unk9 = sp33; + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C19D0.s") #endif @@ -824,15 +869,388 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C29B4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C2A2C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C13FC(s32, s32); /* extern */ +? func_800C284C(u8, u8, u8, u32); /* extern */ +? func_800C29B4(u8, s32); /* extern */ +? func_800C5C40(); /* extern */ +? func_800CBBB8(?, u8); /* extern */ +? func_800CBBE8(s32, s8, s8, s32); /* extern */ +extern ? D_80192CA8; +extern ? D_80192CC6; +extern ? D_801930D0; +static ? D_800EA1F0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C2A2C.s line 21. +void func_800C2A2C(u32 arg0, void *arg2) { + u8 sp5B; + u32 sp4C; + s32 sp48; + s32 sp44; + s32 sp3C; + u8 *sp34; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f16; + f32 temp_f2; + f32 temp_f8; + s32 temp_a0; + s32 temp_a0_4; + s32 temp_a0_5; + s32 temp_a1; + s32 temp_a2_3; + s32 temp_a2_4; + s32 temp_a3; + s32 temp_a3_3; + s32 temp_t0; + s32 temp_t6_2; + s32 temp_t7_2; + s32 temp_t8_2; + s32 temp_t8_3; + s32 temp_t8_4; + s32 temp_t8_5; + s32 temp_t8_6; + s32 temp_t8_8; + s32 temp_v0; + s32 temp_v0_10; + s32 temp_v0_2; + s32 temp_v0_4; + s32 temp_v1; + s32 temp_v1_2; + s32 temp_v1_3; + s32 temp_v1_4; + s8 temp_a2_5; + u32 temp_a3_2; + u32 temp_t6; + u32 temp_t6_3; + u32 temp_t7; + u32 temp_t8; + u32 temp_t8_7; + u32 temp_t9_2; + u8 *temp_t4; + u8 *temp_t4_2; + u8 temp_t0_2; + u8 temp_t1; + u8 temp_t1_2; + u8 temp_t9; + void *temp_a0_2; + void *temp_a0_3; + void *temp_a1_2; + void *temp_a1_3; + void *temp_a2; + void *temp_a2_2; + void *temp_v0_11; + void *temp_v0_3; + void *temp_v0_5; + void *temp_v0_6; + void *temp_v0_7; + void *temp_v0_8; + void *temp_v0_9; + void *temp_v1_5; + s32 phi_v1; + s32 phi_v1_2; + s32 phi_v1_3; + s32 phi_t0; + u8 phi_t3; + s32 phi_v0; + s32 phi_v1_4; + s32 phi_v1_5; + s32 phi_v1_6; + s32 phi_t0_2; + s32 phi_v0_2; + s32 phi_v1_7; + s32 phi_a1; + f32 phi_f8; + s32 phi_v1_8; + u32 phi_a1_2; + s32 phi_a1_3; + f32 phi_f16; + s32 phi_a3; + u32 phi_a0; + u8 phi_v1_9; + s8 phi_a2; + s32 phi_t0_3; + s32 phi_t0_4; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t8 = (arg0 >> 0x1C) & 0xFF; + temp_t6 = (arg0 & 0xF000000) >> 0x18; + temp_a1 = temp_t6 & 0xFF; + switch (temp_t8) { + case 0: + func_800C284C(temp_t6 & 0xFF, arg0 & 0xFF, ((arg0 & 0xFF00) >> 8) & 0xFF, ((arg0 & 0xFF0000) >> 0xD) & 0xFFFF); + return; + case 1: + func_800C29B4(temp_t6 & 0xFF, ((arg0 & 0xFF0000) >> 0xD) & 0xFFFF); + return; + case 2: + temp_t8_2 = temp_t6 & 0xFF; + temp_t4 = &D_80192CC6 + temp_t8_2; + sp3C = temp_t8_2; + temp_t1 = *temp_t4; + phi_v1 = 0; + phi_t3 = temp_t1; + if (temp_t1 > 0) { + temp_a0 = arg0 & 0xFF; + sp48 = temp_a0; +loop_6: + if (temp_a0 == *((temp_t8_2 * 0xA) + &D_80192CA8 + (phi_v1 * 2))) { + if (phi_v1 == 0) { + func_800C284C(unksp3F, unksp4B, ((arg0 & 0xFF00) >> 8) & 0xFF, ((arg0 & 0xFF0000) >> 0xD) & 0xFFFF); + return; + } + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + } + temp_t6_2 = (phi_v1 + 1) & 0xFF; + phi_v1 = temp_t6_2; + if (temp_t6_2 >= *(&D_80192CC6 + temp_a1)) { + goto block_11; + } + goto loop_6; + } +block_11: + temp_t0 = temp_t1 & 0xFF; + phi_v1_2 = 0; + phi_t0 = temp_t0; + phi_t0_3 = temp_t0; + if (temp_t1 > 0) { + do { + phi_v1_3 = phi_v1_2; + if ((((arg0 & 0xFF00) >> 8) & 0xFF) >= ((sp3C * 0xA) + &D_80192CA8 + (phi_v1_2 * 2))->unk1) { + phi_v1_3 = temp_t1 & 0xFF; + phi_t0_3 = phi_v1_2 & 0xFF; + } + temp_t8_3 = (phi_v1_3 + 1) & 0xFF; + phi_v1_2 = temp_t8_3; + phi_t0 = phi_t0_3; + } while (temp_t8_3 < *(&D_80192CC6 + temp_a1)); + } + if ((phi_t0 != temp_t1) || (phi_t0 == 0)) { + temp_a2 = (sp3C * 0xA) + &D_80192CA8; + if (temp_t1 < 5) { + temp_t9 = temp_t1 + 1; + *temp_t4 = temp_t9; + phi_t3 = temp_t9 & 0xFF; + } + temp_v0 = (phi_t3 - 1) & 0xFF; + phi_v0 = temp_v0; + phi_v1_4 = temp_v0; + if (phi_t0 != temp_v0) { + do { + temp_a1_2 = temp_a2 + (phi_v0 * 2); + temp_a0_2 = temp_a2 + (phi_v1_4 * 2); + temp_a0_2->unk1 = temp_a1_2->unk-1; + temp_v0_2 = (phi_v1_4 - 1) & 0xFF; + temp_a0_2->unk0 = temp_a1_2->unk-2; + phi_v0 = temp_v0_2; + phi_v1_4 = temp_v0_2; + } while (phi_t0 != temp_v0_2); + } + temp_v0_3 = temp_a2 + (phi_t0 * 2); + temp_v0_3->unk1 = ((arg0 & 0xFF00) >> 8) & 0xFF; + temp_v0_3->unk0 = arg0 & 0xFF; + } + if (phi_t0 == 0) { + func_800C284C(unksp3F, arg0 & 0xFF, ((arg0 & 0xFF00) >> 8) & 0xFF, ((arg0 & 0xFF0000) >> 0xD) & 0xFFFF); + return; + } + default: + return; + case 3: + temp_t8_4 = temp_t6 & 0xFF; + temp_t4_2 = &D_80192CC6 + temp_t8_4; + sp3C = temp_t8_4; + temp_t1_2 = *temp_t4_2; + phi_v1_5 = 0; + phi_t0_2 = temp_t1_2; + phi_t0_4 = temp_t1_2; + if (temp_t1_2 > 0) { + do { + phi_v1_6 = phi_v1_5; + if ((arg0 & 0xFF) == *((temp_t8_4 * 0xA) + &D_80192CA8 + (phi_v1_5 * 2))) { + phi_v1_6 = temp_t1_2 & 0xFF; + phi_t0_4 = phi_v1_5 & 0xFF; + } + temp_t8_5 = (phi_v1_6 + 1) & 0xFF; + phi_v1_5 = temp_t8_5; + phi_t0_2 = phi_t0_4; + } while (temp_t8_5 < *(&D_80192CC6 + temp_a1)); + } + if (phi_t0_2 != temp_t1_2) { + temp_a3 = temp_t1_2 - 1; + temp_v1 = phi_t0_2 & 0xFF; + phi_v1_7 = temp_v1; + if (phi_t0_2 < temp_a3) { + temp_a2_2 = (sp3C * 0xA) + &D_80192CA8; + phi_v0_2 = temp_v1; + do { + temp_a1_3 = temp_a2_2 + (phi_v0_2 * 2); + temp_a0_3 = temp_a2_2 + (phi_v1_7 * 2); + temp_a0_3->unk1 = temp_a1_3->unk3; + temp_v0_4 = (phi_v1_7 + 1) & 0xFF; + temp_a0_3->unk0 = temp_a1_3->unk2; + phi_v0_2 = temp_v0_4; + phi_v1_7 = temp_v0_4; + } while (temp_v0_4 < temp_a3); + } + *temp_t4_2 = temp_t1_2 - 1; + } + if ((phi_t0_2 == 0) && (temp_a3_2 = ((arg0 & 0xFF0000) >> 0xD) & 0xFFFF, sp4C = temp_a3_2, sp34 = temp_t4_2, func_800C29B4(unksp3F, temp_a3_2 & 0xFFFF), (*temp_t4_2 != 0))) { + temp_v0_5 = (sp3C * 0xA) + &D_80192CA8; + func_800C284C(sp3C, temp_v0_5->unk0, temp_v0_5->unk1, temp_a3_2); + return; + } + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + case 4: + temp_t9_2 = (arg0 & 0xFF0000) >> 0xF; + temp_v1_2 = temp_t9_2 & 0xFF; + phi_a1 = temp_t9_2 & 0xFF; + if (temp_v1_2 == 0) { + phi_a1 = (temp_v1_2 + 1) & 0xFF; + } + temp_v0_6 = &D_801930D0 + ((temp_t6 & 0xFF) * 0x24C); + temp_f2 = temp_v0_6->unk0; + temp_f0 = (arg0 & 0xFF) / 127.0f; + temp_v0_6->unk4 = temp_f0; + if (temp_f2 != temp_f0) { + temp_f8 = phi_a1; + phi_f8 = temp_f8; + if (phi_a1 < 0) { + phi_f8 = temp_f8 + 4294967296.0f; + } + temp_v0_6->unkC = phi_a1; + temp_v0_6->unk8 = (temp_f2 - temp_v0_6->unk4) / phi_f8; + return; + } + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + case 5: + temp_t7 = (arg0 & 0xFF0000) >> 0xF; + temp_v1_3 = temp_t7 & 0xFF; + phi_a1_2 = temp_t7 & 0xFF; + if (temp_v1_3 == 0) { + phi_a1_2 = (temp_v1_3 + 1) & 0xFF; + } + temp_a2_3 = temp_t6 & 0xFF; + temp_f0_2 = (arg0 & 0xFFFF) / 1000.0f; + phi_v1_8 = 0; + do { + temp_v0_7 = (temp_a2_3 * 0x24C) + &D_801930D0 + (phi_v1_8 << 5); + temp_t8_6 = (phi_v1_8 + 1) & 0xFF; + temp_v0_7->unk58 = temp_f0_2; + temp_v0_7->unk60 = phi_a1_2; + temp_v0_7->unk5C = (temp_v0_7->unk54 - temp_f0_2) / phi_a1_2; + phi_v1_8 = temp_t8_6; + } while (temp_t8_6 < 0x10); + (&D_801930D0 + (temp_a2_3 * 0x24C))->unk244 = 0xFFFF; + return; + case 6: + temp_t8_7 = (arg0 & 0xFF0000) >> 0xF; + temp_v1_4 = temp_t8_7 & 0xFF; + phi_a1_3 = temp_t8_7 & 0xFF; + if (temp_v1_4 == 0) { + phi_a1_3 = (temp_v1_4 + 1) & 0xFF; + } + temp_a3_3 = temp_t6 & 0xFF; + temp_a2_4 = ((arg0 & 0xF00) >> 8) & 0xFF; + temp_a0_4 = temp_a2_4 << 5; + temp_v0_8 = &D_801930D0 + (temp_a3_3 * 0x24C) + temp_a0_4; + temp_f0_3 = (arg0 & 0xFF) / 127.0f; + temp_v0_8->unk48 = temp_f0_3; + if (temp_v0_8->unk44 != temp_f0_3) { + temp_v0_9 = &D_801930D0 + (temp_a3_3 * 0x24C); + temp_v1_5 = temp_v0_9 + temp_a0_4; + temp_f16 = phi_a1_3; + phi_f16 = temp_f16; + if (phi_a1_3 < 0) { + phi_f16 = temp_f16 + 4294967296.0f; + } + temp_v1_5->unk50 = phi_a1_3; + temp_v1_5->unk4C = (temp_v1_5->unk44 - temp_v1_5->unk48) / phi_f16; + temp_v0_9->unk244 = temp_v0_9->unk244 | (1 << temp_a2_4); + return; + } + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + case 7: + func_800CBBE8(((temp_t6 & 0xFF) << 0x10) | 0x46000000 | ((((arg0 & 0xFF0000) >> 0x10) & 0xFF) << 8), arg0); + return; + case 8: + temp_v0_10 = temp_t6 & 0xFF; + temp_a2_5 = ((arg0 & 0xF00) >> 8) & 0xFF; + if (((&D_801930D0 + (temp_v0_10 * 0x24C))->unk24A & (1 << temp_a2_5)) == 0) { + func_800CBBE8(((temp_v0_10 & 0xFF) << 0x10) | 0x6000000 | ((temp_a2_5 & 0xFF) << 8) | (((arg0 & 0xFF0000) >> 0x10) & 0xFF), arg0, temp_a2_5); + return; + } + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + case 9: + (&D_801930D0 + ((temp_t6 & 0xFF) * 0x24C))->unk24A = arg0; + return; + case 10: + sp48 = ((temp_t6 & 0xFF) << 0x10) | 0x8000000; + phi_a3 = arg0 & 0xFFFF; + phi_a0 = 1; + phi_v1_9 = 0; + do { + if ((phi_a3 & phi_a0) != 0) { + phi_a2 = 1; + } else { + phi_a2 = 0; + } + sp4C = phi_a0; + sp5B = phi_v1_9; + sp44 = phi_a3; + func_800CBBE8(sp48 | ((phi_v1_9 & 0xFF) << 8), phi_a2, phi_a2, phi_a3); + temp_t8_8 = (phi_v1_9 + 1) & 0xFF; + phi_a0 = (phi_a0 * 2) & 0xFFFF; + phi_v1_9 = temp_t8_8; + } while (temp_t8_8 < 0x10); + return; + case 11: + (&D_801930D0 + ((temp_t6 & 0xFF) * 0x24C))->unk14 = arg0; + return; + case 12: + if ((((arg0 & 0xF00000) >> 0x14) & 0xFF) != 0xF) { + temp_v0_11 = &D_801930D0 + ((temp_t6 & 0xFF) * 0x24C); + temp_t0_2 = temp_v0_11->unk41; + temp_v0_11->unk41 = temp_t0_2 + 1; + if (temp_t0_2 < 5) { + (temp_v0_11 + (temp_t0_2 * 4))->unk2C = arg0; + temp_v0_11->unk40 = 2; + return; + } + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + } + (&D_801930D0 + ((temp_t6 & 0xFF) * 0x24C))->unk41 = 0; + return; + case 14: + temp_t7_2 = ((arg0 & 0xF00) >> 8) & 0xFF; + if (temp_t7_2 != 0) { + if (temp_t7_2 != 1) { + return; + } + D_800EA1EC = arg0 & 1; + return; + } + func_800CBBB8(0xF0000000, *(&D_800EA1F0 + (arg0 & 0xFF))); + return; + case 15: + temp_t6_3 = (arg0 & 0xFF00) >> 8; + D_800EA1C0 = temp_t6_3; + temp_a0_5 = arg0 & 0xFF; + sp48 = temp_a0_5; + sp4C = temp_t6_3; + func_800C13FC(temp_a0_5, temp_a1); + *D_800EA1F4 = sp48; + func_800CBBE8(0x46020000, sp4C); + func_800C5C40(); + /* Duplicate return node #76. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C2A2C.s") #endif @@ -996,15 +1414,299 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C36C4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C3724: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C3448(s32, s8, s32); /* extern */ +? func_800C36C4(s32, ?, ?, ?); /* extern */ +? func_800CBB88(s32, f32, s32); /* extern */ +? func_800CBBB8(s32, s32); /* extern */ +extern ? D_801930D0; +extern ? D_803B1510; -Unable to determine jump table for jr instruction at func_800C3724.s line 476. +void func_800C3724(void) { + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f16; + f32 temp_f2; + f32 temp_f6; + f32 temp_f8; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_a1; + s32 temp_a2; + s32 temp_a2_2; + s32 temp_a2_3; + s32 temp_a3; + s32 temp_a3_2; + s32 temp_lo; + s32 temp_s1; + s32 temp_t2_3; + s32 temp_t3; + s32 temp_t4_2; + s32 temp_t5_3; + s32 temp_t7_2; + s32 temp_t7_3; + s32 temp_t9_2; + s32 temp_v0_7; + s32 temp_v1; + s8 temp_a1_3; + u16 temp_t2_2; + u16 temp_t4; + u16 temp_t5; + u16 temp_t7; + u16 temp_v0; + u16 temp_v0_2; + u16 temp_v0_3; + u16 temp_v1_2; + u16 temp_v1_4; + u32 temp_t5_2; + u32 temp_t9; + u8 temp_t2; + u8 temp_v0_6; + u8 temp_v1_6; + void *temp_a1_2; + void *temp_s0; + void *temp_s0_2; + void *temp_s0_3; + void *temp_s3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v1_3; + void *temp_v1_5; + s32 phi_s5; + s32 phi_s2; + f32 phi_f0; + f32 phi_f6; + s32 phi_a2; + s32 phi_a2_2; + f32 phi_f0_2; + s32 phi_t0; + f32 phi_f8; + s32 phi_s0; + s32 phi_s0_2; + s32 phi_s2_2; + s32 phi_v1; + f32 phi_f16; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_s5 = 0; + do { + temp_s3 = &D_801930D0 + (phi_s5 * 0x24C); + if (temp_s3->unk12 != 0) { + phi_s2 = 0; + phi_f0 = 1.0f; + do { + temp_t2 = (&D_801930D0 + (phi_s5 * 0x24C) + phi_s2)->unkE; + temp_f6 = temp_t2; + phi_f6 = temp_f6; + if (temp_t2 < 0) { + phi_f6 = temp_f6 + 4294967296.0f; + } + temp_t3 = (phi_s2 + 1) & 0xFF; + temp_f0 = phi_f0 * (phi_f6 / 127.0f); + phi_s2 = temp_t3; + phi_f0 = temp_f0; + } while (temp_t3 < 3); + func_800C3448((temp_s3->unk11 << 0x10) | 0x40000000 | (phi_s5 << 0x18) | ((temp_f0 * 127.0f) & 0xFF)); + temp_s3->unk12 = 0; + } + temp_v0 = temp_s3->unkC; + temp_t4 = temp_v0 - 1; + if (temp_v0 != 0) { + temp_s3->unkC = temp_t4; + if ((temp_t4 & 0xFFFF) != 0) { + temp_s3->unk0 = temp_s3->unk0 - temp_s3->unk8; + } else { + temp_s3->unk0 = temp_s3->unk4; + } + func_800CBB88(((phi_s5 & 0xFF) << 0x10) | 0x41000000, temp_s3->unk0); + } + temp_a1 = temp_s3->unk14; + if (temp_a1 != 0) { + temp_t9 = (temp_a1 & 0xFF0000) >> 0xF; + temp_a0 = temp_a1 & 0xFFF; + temp_a3 = temp_t9 & 0xFF; + temp_a2 = temp_a0 & 0xFFFF; + phi_a2 = temp_a2; + phi_t0 = temp_t9 & 0xFF; + phi_a2 = temp_a2; + if (temp_a3 == 0) { + phi_t0 = (temp_a3 + 1) & 0xFF; + } + temp_a1_2 = (phi_s5 * 0x148) + &D_803B1510; + if ((temp_a1_2->unk0 >> 0x1F) != 0) { + temp_t9_2 = ((temp_a1 & 0xF000) >> 0xC) & 0xFF; + temp_lo = temp_a1_2->unk8 / 48; + temp_a3_2 = temp_lo & 0xFFFF; + if (temp_t9_2 != 1) { + temp_v1 = temp_a0 & 0xFFFF; + if (temp_t9_2 != 2) { + if (temp_t9_2 != 3) { + if (temp_t9_2 != 4) { + + } else { + temp_v0_2 = temp_s3->unk18; + phi_a2 = temp_a3_2 & 0xFFFF; + if (temp_v0_2 != 0) { + phi_a2 = temp_v0_2 & 0xFFFF; + } + } + } else { + temp_f16 = temp_a3_2; + phi_f16 = temp_f16; + if (temp_a3_2 < 0) { + phi_f16 = temp_f16 + 4294967296.0f; + } + phi_a2 = (phi_f16 * ((temp_a0 & 0xFFFF) / 100.0f)) & 0xFFFF; + } + } else if (temp_v1 < temp_a3_2) { + phi_a2 = (temp_a3_2 - temp_v1) & 0xFFFF; + } + } else { + phi_a2 = (temp_a0 + temp_a3_2) & 0xFFFF; + } + temp_f2 = temp_lo; + phi_a2_2 = phi_a2; + if (phi_a2 >= 0x12D) { + phi_a2_2 = 0x12C; + } + if (temp_s3->unk18 == 0) { + temp_s3->unk18 = temp_a3_2; + } + temp_f0_2 = phi_a2_2; + phi_f0_2 = temp_f0_2; + if (phi_a2_2 < 0) { + phi_f0_2 = temp_f0_2 + 4294967296.0f; + } + temp_s3->unk20 = phi_f0_2; + temp_s3->unk1C = temp_f2; + temp_f8 = phi_t0; + phi_f8 = temp_f8; + if (phi_t0 < 0) { + phi_f8 = temp_f8 + 4294967296.0f; + } + temp_s3->unk28 = phi_t0; + temp_s3->unk24 = (temp_f2 - phi_f0_2) / phi_f8; + } + temp_s3->unk14 = 0; + } + temp_v0_3 = temp_s3->unk28; + temp_t7 = temp_v0_3 - 1; + if (temp_v0_3 != 0) { + temp_s3->unk28 = temp_t7; + if ((temp_t7 & 0xFFFF) != 0) { + temp_s3->unk1C = temp_s3->unk1C - temp_s3->unk24; + } else { + temp_s3->unk1C = temp_s3->unk20; + } + func_800CBBB8(((phi_s5 & 0xFF) << 0x10) | 0x47000000, temp_s3->unk1C); + } + if (temp_s3->unk246 != 0) { + phi_s0 = 0; + do { + temp_a0_2 = phi_s0 << 5; + temp_v0_4 = &D_801930D0 + (phi_s5 * 0x24C) + temp_a0_2; + temp_v1_2 = temp_v0_4->unk50; + temp_t5 = temp_v1_2 - 1; + if (temp_v1_2 != 0) { + temp_v0_4->unk50 = temp_t5; + temp_a2_2 = ((phi_s5 & 0xFF) << 0x10) | 0x1000000; + if ((temp_t5 & 0xFFFF) != 0) { + temp_v0_4->unk44 = temp_v0_4->unk44 - temp_v0_4->unk4C; + } else { + temp_v1_3 = temp_s3 + temp_a0_2; + temp_v1_3->unk44 = temp_v1_3->unk48; + temp_s3->unk246 = temp_s3->unk246 ^ (1 << phi_s0); + } + func_800CBB88(temp_a2_2 | ((phi_s0 & 0xFF) << 8), temp_v0_4->unk44, temp_a2_2); + } + temp_t7_2 = (phi_s0 + 1) & 0xFF; + phi_s0 = temp_t7_2; + } while (temp_t7_2 < 0x10); + } + if (temp_s3->unk244 != 0) { + phi_s0_2 = 0; + do { + temp_a0_3 = phi_s0_2 << 5; + temp_v0_5 = &D_801930D0 + (phi_s5 * 0x24C) + temp_a0_3; + temp_v1_4 = temp_v0_5->unk60; + temp_t2_2 = temp_v1_4 - 1; + if (temp_v1_4 != 0) { + temp_v0_5->unk60 = temp_t2_2; + temp_a2_3 = ((phi_s5 & 0xFF) << 0x10) | 0x4000000; + if ((temp_t2_2 & 0xFFFF) != 0) { + temp_v0_5->unk54 = temp_v0_5->unk54 - temp_v0_5->unk5C; + } else { + temp_v1_5 = temp_s3 + temp_a0_3; + temp_v1_5->unk54 = temp_v1_5->unk58; + temp_s3->unk244 = temp_s3->unk244 ^ (1 << phi_s0_2); + } + func_800CBB88(temp_a2_3 | ((phi_s0_2 & 0xFF) << 8), temp_v0_5->unk54, temp_a2_3); + } + temp_t4_2 = (phi_s0_2 + 1) & 0xFF; + phi_s0_2 = temp_t4_2; + } while (temp_t4_2 < 0x10); + } + temp_v0_6 = temp_s3->unk41; + if (temp_v0_6 != 0) { + temp_v1_6 = temp_s3->unk40; + if (temp_v1_6 != 0) { + temp_s3->unk40 = temp_v1_6 - 1; + } else { + phi_s2_2 = 0; + if ((*(&D_803B1510 + (phi_s5 * 0x148)) >> 0x1F) == 0) { + phi_v1 = temp_v0_6; + if (temp_v0_6 > 0) { + do { + temp_v0_7 = (&D_801930D0 + (phi_s5 * 0x24C) + (phi_s2_2 * 4))->unk2C; + temp_t5_2 = ((temp_v0_7 & 0xF00000) >> 0x14) & 0xFF; + temp_t2_3 = temp_v0_7 & 0xFF; + temp_s1 = ((temp_v0_7 & 0xF0000) >> 0x10) & 0xFF; + temp_a1_3 = ((temp_v0_7 & 0xFF00) >> 8) & 0xFF; + switch (temp_t5_2) { + case 0: + temp_s0 = &D_801930D0 + (temp_s1 * 0x24C); + temp_s0->unk12 = 1; + temp_s0->unkF = 0x7F; +block_76: + phi_v1 = temp_s3->unk41; + break; + case 1: + func_800C3448(temp_s3->unk248 | 0x30000000 | (phi_s5 << 0x18), temp_a1_3, temp_t2_3); + goto block_76; + case 2: + temp_s0_2 = &D_801930D0 + (temp_s1 * 0x24C); + func_800C3448(temp_s0_2->unk248 | (temp_s1 << 0x18) | 0x10000, temp_a1_3, temp_t2_3); + temp_s0_2->unk12 = 1; + temp_s0_2->unkF = 0x7F; + goto block_76; + case 3: + func_800C3448((temp_s1 << 0x18) | 0xB0003000 | (temp_a1_3 << 0x10) | temp_t2_3, temp_a1_3, temp_t2_3); + goto block_76; + case 4: + func_800C3448((temp_s1 << 0x18) | 0xB0004000 | (temp_t2_3 << 0x10), temp_a1_3, temp_t2_3); + goto block_76; + case 5: + temp_s0_3 = &D_801930D0 + (temp_s1 * 0x24C); + func_800C3448((temp_s0_3->unk42 << 0x10) | (temp_s1 << 0x18) | (temp_v0_7 & 0xFFFF), temp_a1_3, temp_t2_3); + func_800C36C4(temp_s1 & 0xFF, 1, 0x7F, 0); + temp_s0_3->unk42 = 0; + goto block_76; + case 6: + temp_s3->unk42 = temp_a1_3; + goto block_76; + } + temp_t5_3 = (phi_s2_2 + 1) & 0xFF; + phi_s2_2 = temp_t5_3; + } while (temp_t5_3 < phi_v1); + } + temp_s3->unk41 = 0; + } + } + } + temp_t7_3 = (phi_s5 + 1) & 0xFF; + phi_s5 = temp_t7_3; + } while (temp_t7_3 < 3); +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C3724.s") #endif @@ -1125,15 +1827,79 @@ GLOBAL_ASM("asm/non_matchings/audio/external/play_sound.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C41CC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_8018FC20; +static u8 D_800EA1B8 = 0; /* const */ +static ? D_800EA1C8; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C41CC.s line 29. +void func_800C41CC(s32 arg0, void *arg1) { + u32 temp_t6; + u8 temp_t8; + u8 temp_v0; + void *temp_a0; + void *temp_a0_2; + void *temp_a0_3; + void *temp_a0_4; + void *temp_v1; + u8 phi_v0; + s32 phi_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + unksp-10.unk10 = arg0; + temp_v0 = D_800EA1BC; + temp_t6 = arg0 & 0xFF; + phi_v0 = temp_v0; + if (D_800EA1B8 != temp_v0) { + do { + phi_v1 = 0; + switch (temp_t6) { + case 0: + if ((arg1->unk24 & 0xF0000000) == (*(&D_8018FC20 + (phi_v0 * 0x18)) & 0xF0000000)) { +block_18: + phi_v1 = 1; + } + break; + case 1: + temp_a0 = &D_8018FC20 + (phi_v0 * 0x18); + if (((arg1->unk24 & 0xF0000000) == (temp_a0->unk0 & 0xF0000000)) && (arg1->unk0 == temp_a0->unk4)) { + goto block_18; + } + break; + case 2: + if (arg1->unk0 == (&D_8018FC20 + (phi_v0 * 0x18))->unk4) { + goto block_18; + } + break; + case 3: + temp_a0_2 = &D_8018FC20 + (phi_v0 * 0x18); + if ((arg1->unk0 == temp_a0_2->unk4) && (arg1->unk24 == temp_a0_2->unk0)) { + goto block_18; + } + break; + case 4: + temp_a0_3 = &D_8018FC20 + (phi_v0 * 0x18); + if ((arg1->unkC == temp_a0_3->unk8) && (arg1->unk24 == temp_a0_3->unk0)) { + goto block_18; + } + break; + case 5: + if (arg1->unk24 == *(&D_8018FC20 + (phi_v0 * 0x18))) { + goto block_18; + } + break; + } + if (phi_v1 != 0) { + temp_a0_4 = &D_8018FC20 + (phi_v0 * 0x18); + temp_v1 = temp_a0_4->unk4; + temp_a0_4->unk0 = 0; + if (&D_800EA1C8 != temp_v1) { + temp_v1->unk4 = 100000.0f; + } + } + temp_t8 = (phi_v0 + 1) & 0xFF; + phi_v0 = temp_t8; + } while (D_800EA1B8 != temp_t8); + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C41CC.s") #endif @@ -2682,15 +3448,96 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C6108.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C64A0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +static ? D_800E9E24; /* unable to generate initializer; const */ +static ? D_800E9E34; /* unable to generate initializer; const */ +static ? D_800E9E54; /* unable to generate initializer; const */ +static ? D_800E9E74; /* unable to generate initializer; const */ +static ? D_800E9EF4; /* unable to generate initializer; const */ +static ? D_800E9F04; /* unable to generate initializer; const */ +static ? D_800E9F24; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C64A0.s line 17. +void func_800C64A0(s32 playerId) { + f32 *temp_v1; + f32 *temp_v1_2; + f32 *temp_v1_3; + f32 *temp_v1_4; + s32 temp_t6; + s32 temp_t7; + s32 temp_v0; + f32 *phi_v1; + Player *phi_a1; + f32 phi_f16; + f32 *phi_v1_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = playerId & 0xFF; + temp_v0 = temp_t6 * 4; + unksp-10.unk10 = playerId; + temp_t7 = *(&D_800E9E74 + temp_v0); + switch (temp_t7) { + case 3: + temp_v1 = temp_v0 + &D_800E9EF4; + *temp_v1 = (gPlayers[temp_t6].unk_094 / 5.0f) + 0.2f; + phi_v1 = temp_v1; + phi_a1 = &gPlayers[temp_t6]; + break; + case 1: + case 13: + case 14: + case 17: + temp_v1_2 = temp_v0 + &D_800E9EF4; + *temp_v1_2 = ((*(&D_800E9E54 + temp_v0) - 3500.0f) / 3000.0f) + 0.4f; + phi_v1 = temp_v1_2; + phi_a1 = &gPlayers[temp_t6]; + break; + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 22: + case 23: + case 24: + case 29: + case 30: + case 31: + temp_v1_3 = temp_v0 + &D_800E9EF4; + *temp_v1_3 = (gPlayers[temp_t6].unk_094 / 5.0f) + 0.2f; + phi_v1 = temp_v1_3; + phi_a1 = &gPlayers[temp_t6]; + break; + default: + temp_v1_4 = temp_v0 + &D_800E9EF4; + *temp_v1_4 = 1.0f; + phi_v1 = temp_v1_4; + phi_a1 = &gPlayers[temp_t6]; + break; + } + if (*phi_v1 > 1.0f) { + *phi_v1 = 1.0f; + } + if (*phi_v1 < 0.0f) { + *phi_v1 = 0.0f; + } + if ((phi_a1->unk_044 & 0x20) == 0x20) { + phi_f16 = 0.56f - (*(&D_800E9E24 + temp_v0) * 0.06f); + phi_v1_2 = temp_v0 + &D_800E9F04; + } else { + phi_f16 = (*(&D_800E9E34 + temp_v0) / 50.0f) + 0.25f; + phi_v1_2 = temp_v0 + &D_800E9F04; + } + *phi_v1_2 = phi_f16; + if (*(&D_800E9F24 + temp_t6) != 0) { + *phi_v1_2 = 0.0f; + } + if (*phi_v1_2 > 0.9f) { + *phi_v1_2 = 0.9f; + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C64A0.s") #endif @@ -2734,29 +3581,403 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C6758.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C683C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C5578(void *, s32, u8); /* extern */ +? play_sound(?, void *, u8, ? *, ? *, void *); /* extern */ +static ? D_800E9E74; /* unable to generate initializer; const */ +static ? D_800E9E84; /* unable to generate initializer; const */ +static ? D_800E9E94; /* unable to generate initializer; const */ +static ? D_800E9EF4; /* unable to generate initializer; const */ +static ? D_800E9F14; /* unable to generate initializer; const */ +static ? D_800E9F7C; /* unable to generate initializer; const */ +static ? D_800EA0EC; /* unable to generate initializer; const */ +static ? D_800EA1D4; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C683C.s line 53. +void func_800C683C(u8 arg0) { + s32 sp4C; + s32 *sp40; + s32 *temp_s1; + s32 *temp_s2; + s32 *temp_t0; + s32 temp_t6; + s32 temp_v0; + u8 temp_a2; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_a2 = arg0 & 0xFF; + if (D_800EA108 == 0) { + temp_v0 = temp_a2 * 4; + if (*(&D_800EA0EC + temp_a2) == 0) { + temp_t0 = temp_v0 + &D_800E9E84; + sp40 = temp_t0; + temp_s2 = temp_v0 + &D_800E9E74; + if (*temp_s2 != *temp_t0) { + temp_s0 = (temp_a2 * 0x3C) + &D_800E9F7C; + temp_s1 = temp_v0 + &D_800E9E94; + sp4C = temp_v0; + arg0 = temp_a2; + func_800C5578(temp_s0, *temp_s1, temp_a2); + temp_t6 = *temp_s2; + switch (temp_t6) { + case 3: + play_sound(0x100F908, temp_s0, arg0, temp_v0 + &D_800E9F14, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F908; + break; + case 18: + play_sound(0x100F81D, temp_s0, arg0, &D_800EA1D4, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F81D; + break; + case 19: + play_sound(0x100F822, temp_s0, arg0, &D_800EA1D4, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F822; + break; + case 1: + play_sound(0x100F009, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F009; + break; + case 2: + play_sound(0x100F40A, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F40A; + break; + case 17: + play_sound(0x100F01E, temp_s0, arg0, temp_v0 + &D_800E9F14, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F01E; + break; + case 15: + play_sound(0x100F01F, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F01F; + break; + case 16: + play_sound(0x100F021, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F021; + break; + case 20: + play_sound(0x100F027, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F027; + break; + case 25: + play_sound(0x100F020, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F020; + break; + case 26: + play_sound(0x100F023, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F023; + break; + case 27: + play_sound(0x1008046, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x1008046; + break; + case 28: + play_sound(0x100F025, temp_s0, arg0, temp_v0 + &D_800E9F14, &D_800EA1D4, temp_s0 + 0x14); + *temp_s1 = 0x100F025; + break; + case 4: + play_sound(0x100F00B, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F00B; + break; + case 5: + play_sound(0x100F00C, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F00C; + break; + case 6: + play_sound(0x100F00D, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F00D; + break; + case 7: + play_sound(0x100F00E, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F00E; + break; + case 8: + play_sound(0x100F00F, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F00F; + break; + case 9: + play_sound(0x100F010, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F010; + break; + case 10: + case 14: + play_sound(0x100F011, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F011; + break; + case 11: + play_sound(0x100F012, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F012; + break; + case 12: + play_sound(0x100F013, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F013; + break; + case 29: + play_sound(0x100F048, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F048; + break; + case 30: + play_sound(0x100F049, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F049; + break; + case 31: + play_sound(0x100F04A, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F04A; + break; + case 13: + case 22: + play_sound(0x100F029, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F029; + break; + case 23: + play_sound(0x100F02A, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F02A; + break; + case 24: + play_sound(0x100F02B, temp_s0, arg0, &D_800EA1D4, temp_v0 + &D_800E9EF4, temp_s0 + 0x14); + *temp_s1 = 0x100F02B; + break; + default: + func_800C5578(temp_s0, *temp_s1, arg0); + break; + } + } + *sp40 = *temp_s2; + } + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C683C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C70A8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +static ? D_800E9E54; /* unable to generate initializer; const */ +static ? D_800E9E74; /* unable to generate initializer; const */ +static ? D_800E9F74; /* unable to generate initializer; const */ +static ? D_800EA0EC; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C70A8.s line 279. +void func_800C70A8(s32 playerId) { + s32 *temp_v0; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a1; + s32 temp_t1; + s32 temp_v1; + u8 temp_t2; + u8 temp_t7; + u8 temp_t9; + s32 phi_t1; + Player *phi_v1; + s32 phi_a0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_a1 = playerId & 0xFF; + unksp-10.unk10 = playerId; + temp_v1 = temp_a1 * 4; + if (*(&D_800EA0EC + temp_a1) == 0) { + temp_v0 = temp_v1 + &D_800E9E74; + *temp_v0 = 0; + if ((*(&D_800E9E54 + temp_v1) > 3500.0f) || (temp_a0 = gPlayers[temp_a1].unk_0BC, temp_t1 = temp_a0 & 0x10, phi_t1 = temp_t1, phi_v1 = &gPlayers[temp_a1], phi_a0 = temp_a0, (temp_t1 == 0x10))) { + temp_t7 = gPlayers[temp_a1].unk_1D4; + temp_a0_2 = gPlayers[temp_a1].unk_0BC; + *temp_v0 = 1; + phi_t1 = temp_a0_2 & 0x10; + phi_v1 = &gPlayers[temp_a1]; + phi_a0 = temp_a0_2; + switch (temp_t7) { /* switch 1 */ + case 2: /* switch 1 */ + *temp_v0 = 0xD; + break; + case 3: /* switch 1 */ + *temp_v0 = 0xE; + break; + case 6: /* switch 1 */ + *temp_v0 = 0x11; + break; + case 4: /* switch 1 */ + *temp_v0 = 0xF; + break; + case 5: /* switch 1 */ + *temp_v0 = 0x10; + break; + case 9: /* switch 1 */ + *temp_v0 = 0x14; + break; + case 16: /* switch 1 */ + *temp_v0 = 0x19; + break; + case 17: /* switch 1 */ + *temp_v0 = 0x1A; + break; + case 14: /* switch 1 */ + *temp_v0 = 0x1B; + break; + } + } + temp_t2 = phi_v1->unk_1D4; + if (phi_t1 == 0x10) { + *temp_v0 = 2; + switch (temp_t2) { /* switch 2 */ + case 2: /* switch 2 */ + *temp_v0 = 0xD; + break; + case 3: /* switch 2 */ + *temp_v0 = 0xE; + break; + case 6: /* switch 2 */ + *temp_v0 = 0x11; + break; + case 4: /* switch 2 */ + *temp_v0 = 0xF; + break; + case 5: /* switch 2 */ + *temp_v0 = 0x10; + break; + case 9: /* switch 2 */ + *temp_v0 = 0x14; + break; + case 16: /* switch 2 */ + *temp_v0 = 0x19; + break; + case 17: /* switch 2 */ + *temp_v0 = 0x1A; + break; + case 14: /* switch 2 */ + *temp_v0 = 0x1B; + break; + } + } + switch (temp_t2) { /* switch 3 */ + case 8: /* switch 3 */ + if (*temp_v0 == 6) { + *temp_v0 = 4; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 5; + } else { + *temp_v0 = 4; + } + break; + case 7: /* switch 3 */ + if (*temp_v0 == 0xC) { + *temp_v0 = 0xA; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 0xB; + } else { + *temp_v0 = 0xA; + } + break; + case 13: /* switch 3 */ + if (*temp_v0 == 0x18) { + *temp_v0 = 0x16; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 0x17; + } else { + *temp_v0 = 0x16; + } + break; + case 11: /* switch 3 */ + if (*temp_v0 == 0x1F) { + *temp_v0 = 0x1D; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 0x1E; + } else { + *temp_v0 = 0x1D; + } + break; + case 10: /* switch 3 */ + if (*(&D_800E9F74 + temp_a1) == 0) { + if (*temp_v0 == 9) { + *temp_v0 = 7; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 8; + } else { + *temp_v0 = 7; + } + } else { + *temp_v0 = 0x1C; + } + break; + case 16: /* switch 3 */ + *temp_v0 = 0x19; + break; + case 17: /* switch 3 */ + *temp_v0 = 0x1A; + break; + case 14: /* switch 3 */ + *temp_v0 = 0x1B; + break; + } + temp_t9 = phi_v1->unk_1EC; + switch (temp_t9) { /* switch 4 */ + case 8: /* switch 4 */ + if (*temp_v0 == 5) { + *temp_v0 = 4; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 6; + } else { + *temp_v0 = 4; + } + break; + case 7: /* switch 4 */ + if (*temp_v0 == 0xB) { + *temp_v0 = 0xA; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 0xC; + } else { + *temp_v0 = 0xA; + } + break; + case 13: /* switch 4 */ + if (*temp_v0 == 0x17) { + *temp_v0 = 0x16; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 0x18; + } else { + *temp_v0 = 0x16; + } + break; + case 11: /* switch 4 */ + if (*temp_v0 == 0x1E) { + *temp_v0 = 0x1D; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 0x1F; + } else { + *temp_v0 = 0x1D; + } + break; + case 10: /* switch 4 */ + if (*(&D_800E9F74 + temp_a1) == 0) { + if (*temp_v0 == 8) { + *temp_v0 = 7; + } else if (D_800EA1C0 == 0) { + *temp_v0 = 9; + } else { + *temp_v0 = 7; + } + } else { + *temp_v0 = 0x1C; + } + break; + case 16: /* switch 4 */ + *temp_v0 = 0x19; + break; + case 17: /* switch 4 */ + *temp_v0 = 0x1A; + break; + case 14: /* switch 4 */ + *temp_v0 = 0x1B; + break; + } + if (((phi_v1->unk_094 < 0.5f) || ((phi_a0 & 8) == 8)) && (*temp_v0 != 0x1C)) { + *temp_v0 = 0; + } + if ((((phi_a0 & 0x4000) == 0x4000) && ((phi_v1->unk_000 & 0x2000) != 0x2000)) || ((phi_a0 & 0x800) == 0x800) || ((phi_a0 & 0x80) == 0x80) || ((phi_a0 & 0x40) == 0x40) || ((phi_v1->unk_044 & 0x4000) == 0x4000)) { + *temp_v0 = 0x12; + } + if ((((phi_a0 & 0x20) == 0x20) && ((phi_v1->unk_000 & 0x2000) != 0x2000)) || ((phi_a0 & 0x800) == 0x800)) { + *temp_v0 = 0x13; + } + if (phi_v1->unk_20C != 0.0f) { + *temp_v0 = 3; + } + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C70A8.s") #endif @@ -3870,15 +5091,117 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C92CC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C94A4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? play_sound(s32, void *, s32, void *, void *, void *); /* extern */ +static ? D_800E9F74; /* unable to generate initializer; const */ +static ? D_800E9F7C; /* unable to generate initializer; const */ +static ? D_800EA0EC; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C94A4.s line 48. +void func_800C94A4(s32 playerId) { + s32 temp_a0; + s32 temp_a2; + u16 temp_v1_2; + u8 *temp_v1; + u8 temp_v0; + u8 temp_v0_2; + void *temp_a1; + f32 phi_f6; + s32 phi_a0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_a2 = playerId & 0xFF; + if (D_800EA108 == 0) { + temp_v1 = temp_a2 + &D_800EA0EC; + temp_v0 = *temp_v1; + if (temp_v0 != 0) { + if (temp_v0 == 2) { + *temp_v1 = 1; + goto block_4; + } + } else { +block_4: + temp_a1 = (temp_a2 * 0x3C) + &D_800E9F7C; + temp_a1->unkC = 1.0f; + temp_a1->unk10 = 0.0f; + temp_v1_2 = *(&gPlayers->characterId + (temp_a2 * 0xDD8)); + switch (temp_v1_2) { + case 0: + case 1: + temp_a1->unk18 = 2.8f; + temp_a1->unk20 = 0.35f; + temp_a1->unk1C = 3844.0f; + temp_a1->unk28 = 0.35f; + temp_a1->unk24 = -0.8f; + temp_a1->unk2C = 1568.9796f; + temp_a1->unk30 = 1067.7778f; + phi_f6 = 2766.065f; +block_11: + temp_a1->unk34 = phi_f6; + break; + case 2: + case 6: + temp_a1->unk18 = 3.2f; + temp_a1->unk20 = 0.6f; + temp_a1->unk1C = 3844.0f; + temp_a1->unk28 = 0.6f; + temp_a1->unk24 = -1.7f; + temp_a1->unk2C = 1478.4615f; + temp_a1->unk30 = 784.4898f; + phi_f6 = 12813.335f; + goto block_11; + case 3: + temp_a1->unk18 = 2.8f; + temp_a1->unk20 = 0.6f; + temp_a1->unk1C = 3844.0f; + temp_a1->unk28 = 0.6f; + temp_a1->unk24 = -0.6f; + temp_a1->unk2C = 1747.2728f; + temp_a1->unk30 = 1130.5883f; + phi_f6 = 3844.001f; + goto block_11; + case 4: + temp_a1->unk18 = 2.0f; + temp_a1->unk20 = 0.2f; + temp_a1->unk1C = 3844.0f; + temp_a1->unk28 = 0.2f; + temp_a1->unk24 = -0.4f; + temp_a1->unk2C = 2135.5557f; + temp_a1->unk30 = 1601.6666f; + phi_f6 = 3203.333f; + goto block_11; + case 5: + case 7: + temp_a1->unk18 = 2.4f; + temp_a1->unk20 = 0.4f; + temp_a1->unk1C = 3844.0f; + temp_a1->unk28 = 0.4f; + temp_a1->unk24 = -0.8f; + temp_a1->unk2C = 1922.0f; + temp_a1->unk30 = 1201.25f; + phi_f6 = 4805.0f; + goto block_11; + } + temp_v0_2 = *(&D_800E9F74 + temp_a2); + temp_a0 = temp_v1_2 + 0x104FF00; + phi_a0 = temp_a0; + if (temp_v0_2 != 0) { + if (temp_v0_2 != 1) { + if (temp_v0_2 != 2) { + + } else if (D_800EA1C0 == 0) { + phi_a0 = temp_a0 + 0x36; + } else { + phi_a0 = temp_a0 + 0x3E; + } + } else { + phi_a0 = temp_a0 + 0x2E; + } + } else if (D_800EA1C0 != 0) { + phi_a0 = temp_a0 + 0x14; + } + play_sound(phi_a0, temp_a1, temp_a2, temp_a1 + 0xC, temp_a1 + 0x10, temp_a1 + 0x14); + } + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C94A4.s") #endif @@ -3973,15 +5296,95 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C99E0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C9A88: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? play_sound(s32, void *, s32, void *, void *, void *); /* extern */ +static ? D_800EA06C; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800C9A88.s line 46. +void func_800C9A88(s32 playerId) { + void *sp64; + f32 *temp_v0_3; + f32 *temp_v0_6; + s32 temp_s1; + s32 temp_s3; + s32 temp_t6; + u16 temp_t0; + u8 temp_v0; + u8 temp_v0_7; + void *temp_v0_2; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_8; + void *temp_v0_9; + f32 phi_f10; + f32 *phi_v0; + s32 phi_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s3 = playerId & 0xFF; + if (D_800EA108 == 0) { + temp_v0 = D_800EA0F0; + if (temp_v0 != 0) { + if (temp_v0 == 2) { + D_800EA0F0 = 1; + goto block_4; + } + } else { +block_4: + temp_t0 = gPlayers[temp_s3].characterId; + switch (temp_t0) { + case 0: + case 1: + temp_v0_2 = (temp_s3 * 0x10) + &D_800EA06C; + temp_v0_2->unk0 = 0.35f; + temp_v0_2->unk4 = 1568.9796f; + break; + case 2: + case 6: + temp_v0_3 = (temp_s3 * 0x10) + &D_800EA06C; + *temp_v0_3 = 0.6f; + phi_f10 = 1478.4615f; + phi_v0 = temp_v0_3; +block_11: + phi_v0->unk4 = phi_f10; + break; + case 3: + temp_v0_4 = (temp_s3 * 0x10) + &D_800EA06C; + temp_v0_4->unk0 = 0.6f; + temp_v0_4->unk4 = 1747.2728f; + break; + case 4: + temp_v0_5 = (temp_s3 * 0x10) + &D_800EA06C; + temp_v0_5->unk0 = 0.2f; + temp_v0_5->unk4 = 2135.5557f; + break; + case 5: + case 7: + temp_v0_6 = (temp_s3 * 0x10) + &D_800EA06C; + *temp_v0_6 = 0.4f; + phi_f10 = 1922.0f; + phi_v0 = temp_v0_6; + goto block_11; + } + temp_v0_7 = D_800EA1C0; + if (temp_v0_7 < 2) { + phi_s0 = 0; + if (temp_v0_7 >= 0) { + sp64 = &gPlayers[temp_s3]; + do { + temp_s1 = sp64->unk254 + 0x31028000; + temp_v0_8 = func_800C1C88(temp_s3 & 0xFF, &gPlayers[temp_s3].posX, &gPlayers[temp_s3].unk_034, &gPlayers[temp_s3].unk_098, phi_s0, temp_s1); + if (temp_v0_8 != 0) { + temp_v0_8->unk34 = 40.0f; + temp_v0_9 = (temp_s3 * 0x10) + &D_800EA06C; + play_sound(temp_s1, temp_v0_8 + 0x18, phi_s0 & 0xFF, temp_v0_8 + 0x2C, temp_v0_9 + 8, temp_v0_9 + 0xC); + } + temp_t6 = (phi_s0 + 1) & 0xFF; + phi_s0 = temp_t6; + } while (temp_t6 < (D_800EA1C0 + 1)); + } + } + } + } +} #else GLOBAL_ASM("asm/non_matchings/audio/external/func_800C9A88.s") #endif diff --git a/src/audio/heap.c b/src/audio/heap.c index e0c51a67c..2f5e9d08f 100644 --- a/src/audio/heap.c +++ b/src/audio/heap.c @@ -849,15 +849,117 @@ GLOBAL_ASM("asm/non_matchings/audio/heap/func_800B9FB8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800BA00C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800B9FB8(); /* extern */ +? func_800BA250(); /* extern */ +? func_800BEF2C(? *); /* extern */ +extern ? D_803B1510; +extern ? D_803B1A30; +extern ? D_803B7088; -Unable to determine jump table for jr instruction at func_800BA00C.s line 17. +s32 func_800BA00C(void) { + ? *temp_s0; + s32 *temp_v1; + s32 temp_a0; + s32 temp_a2; + s32 temp_v0; + s32 temp_v0_4; + s32 temp_v0_5; + s32 temp_v0_6; + u8 temp_t6; + void *temp_v0_2; + void *temp_v0_3; + ? *phi_s0; + s32 phi_v1; + s32 phi_a0; + s32 phi_a2; + s32 *phi_v1_2; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = D_803B0500; + switch (temp_t6) { + case 5: + phi_s0 = &D_803B1510; + do { + func_800BEF2C(phi_s0); + temp_s0 = phi_s0 + 0x148; + phi_s0 = temp_s0; + } while (temp_s0 != &D_803B1A30); + D_803B0504 = 4; + D_803B0500 += -1; + break; + case 4: + temp_v0 = D_803B0504; + if (temp_v0 != 0) { + D_803B0504 = temp_v0 - 1; + func_800B9FB8(); + } else { + temp_a2 = D_803B70B0; + phi_v1 = 0; + phi_a0 = 0; + phi_a2 = temp_a2; + if (temp_a2 > 0) { + do { + temp_a0 = phi_a0 + 1; + temp_v0_2 = D_803B1508 + phi_v1; + phi_a0 = temp_a0; + if (((temp_v0_2->unkB0 >> 0x1F) != 0) && (temp_v0_2->unk59 != 0)) { + temp_v0_2->unk68 = D_803B7088.unk18; + temp_v0_3 = D_803B1508 + phi_v1; + temp_v0_3->unk58 = temp_v0_3->unk58 | 0x10; + phi_a2 = D_803B70B0; + } + phi_v1 += 0xC0; + } while (temp_a0 < phi_a2); + } + D_803B0504 = 0x10; + D_803B0500 += -1; + } + break; + case 3: + temp_v0_4 = D_803B0504; + phi_v1_2 = &D_803B7180; + if (temp_v0_4 != 0) { + D_803B0504 = temp_v0_4 - 1; + func_800B9FB8(); + } else { + do { + phi_v0 = 0; +loop_18: + *(*phi_v1_2 + phi_v0) = 0; + (*phi_v1_2 + phi_v0)->unk2 = 0; + (*phi_v1_2 + phi_v0)->unk4 = 0; + temp_v0_5 = phi_v0 + 8; + (*phi_v1_2 + phi_v0)->unk6 = 0; + phi_v0 = temp_v0_5; + if (temp_v0_5 != 0xA00) { + goto loop_18; + } + temp_v1 = phi_v1_2 + 4; + phi_v1_2 = temp_v1; + } while (temp_v1 != &D_803B718C); + D_803B0504 = 4; + D_803B0500 += -1; + } + break; + case 2: + temp_v0_6 = D_803B0504; + if (temp_v0_6 != 0) { + D_803B0504 = temp_v0_6 - 1; + } else { + D_803B0500 += -1; + } + break; + case 1: + func_800BA250(); + D_803B0500 = 0; + break; + } + if (D_803B0500 < 3) { + return 0; + } + return 1; +} #else GLOBAL_ASM("asm/non_matchings/audio/heap/func_800BA00C.s") #endif diff --git a/src/audio/port_eu.c b/src/audio/port_eu.c index 311d2f16c..d261572fb 100644 --- a/src/audio/port_eu.c +++ b/src/audio/port_eu.c @@ -407,15 +407,108 @@ GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBC24.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800CBCB0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800CB818(void *); /* extern */ +extern ? D_80193820; +extern ? D_803B1510; +extern ? D_803B5EF0; -Unable to determine jump table for jr instruction at func_800CBCB0.s line 116. +void func_800CBCB0(u32 arg0) { + s32 temp_s1; + s32 temp_t1; + s32 temp_t8; + u8 temp_a0; + u8 temp_a1; + u8 temp_v0; + u8 temp_v1_2; + void *temp_s0; + void *temp_v0_2; + void *temp_v1; + s32 phi_v0; + s32 phi_s1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t8 = arg0 & 0xFF; + temp_s1 = (arg0 >> 8) & 0xFF; + phi_v0 = temp_s1; + phi_s1 = temp_s1; + if (temp_t8 != temp_s1) { + do { + temp_s0 = &D_80193820 + ((phi_v0 & 0xFF) * 8); + temp_a0 = temp_s0->unk0; + temp_t1 = (phi_s1 + 1) & 0xFF; + phi_s1 = temp_t1; + if ((temp_a0 & 0xF0) == 0xF0) { + func_800CB818(temp_s0); + } else { + temp_v0 = temp_s0->unk1; + if (temp_v0 < 4) { + temp_v1 = &D_803B1510 + (temp_v0 * 0x148); + if ((temp_a0 & 0x80) != 0) { + func_800CB818(temp_s0); + } else if ((temp_a0 & 0x40) != 0) { + if (temp_a0 != 0x41) { + if (temp_a0 != 0x46) { + if (temp_a0 != 0x47) { + if (temp_a0 != 0x48) { + + } else { + temp_v1->unkC = temp_s0->unk4; + } + } else { + temp_v1->unk8 = temp_s0->unk4 * 0x30; + } + } else { + (temp_v1 + temp_s0->unk3)->unk7 = temp_s0->unk4; + } + } else { + temp_v1->unk0 = temp_v1->unk0 | 4; + temp_v1->unk28 = temp_s0->unk4; + } + } else if ((temp_v1->unk0 >> 0x1F) != 0) { + temp_a1 = temp_s0->unk2; + if (temp_a1 < 0x10) { + temp_v0_2 = (temp_v1 + (temp_a1 * 4))->unk30; + if (temp_v0_2 != &D_803B5EF0) { + switch (temp_a0) { + case 1: + temp_v0_2->unk1 = temp_v0_2->unk1 | 0x40; + temp_v0_2->unk20 = temp_s0->unk4; + break; + case 2: + temp_v0_2->unk1 = temp_v0_2->unk1 | 0x40; + temp_v0_2->unk24 = temp_s0->unk4; + break; + case 3: + temp_v0_2->unk1 = temp_v0_2->unk1 | 0x20; + temp_v0_2->unk9 = temp_s0->unk4; + break; + case 4: + temp_v0_2->unk1 = temp_v0_2->unk1 | 0x80; + temp_v0_2->unk30 = temp_s0->unk4; + break; + case 5: + temp_v0_2->unk4 = temp_s0->unk4; + break; + case 6: + temp_v1_2 = temp_s0->unk3; + if (temp_v1_2 < 8) { + (temp_v0_2 + temp_v1_2)->unk58 = temp_s0->unk4; + } + break; + case 8: + temp_v0_2->unk0 = ((temp_s0->unk4 * 0x10) & 0x10) | (temp_v0_2->unk0 & 0xFFEF); + break; + } + } + } + } + } + } + temp_s0->unk0 = 0; + phi_v0 = temp_t1; + } while (temp_t8 != temp_t1); + } +} #else GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBCB0.s") #endif diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c index 0679521b0..8ba7ec12a 100644 --- a/src/audio/seqplayer.c +++ b/src/audio/seqplayer.c @@ -534,15 +534,485 @@ GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF14C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800BF190: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800BD120(void *, s32); /* extern */ +? func_800BD264(void *, void *); /* extern */ +? func_800BE4D4(void *); /* extern */ +? func_800BEB18(void *, s32); /* extern */ -Unable to determine jump table for jr instruction at func_800BF190.s line 611. +void func_800BF190(void *arg0) { + void *sp68; + s32 sp44; + f32 temp_f0; + f32 temp_f2; + s16 temp_a0_3; + s16 temp_a0_4; + s16 temp_s3; + s16 temp_s3_2; + s16 temp_s3_3; + s16 temp_s3_4; + s16 temp_s3_6; + s16 temp_v0_10; + s16 temp_v0_12; + s16 temp_v0_13; + s16 temp_v0_7; + s16 temp_v1; + s32 temp_a1; + s32 temp_s2; + s32 temp_t4_2; + s32 temp_t5; + s32 temp_t6; + s32 temp_t8; + s32 temp_v0_11; + s32 temp_v0_17; + s32 temp_v0_19; + s32 temp_v0_3; + s32 temp_v0_4; + s32 temp_v0_6; + s32 temp_v0_8; + s32 temp_v1_12; + s32 temp_v1_6; + s32 temp_v1_7; + s32 temp_v1_8; + u16 temp_v0_14; + u32 temp_v0; + u32 temp_v0_20; + u8 *temp_t2; + u8 *temp_t6_2; + u8 *temp_v1_10; + u8 *temp_v1_11; + u8 *temp_v1_4; + u8 *temp_v1_5; + u8 *temp_v1_9; + u8 temp_a0; + u8 temp_a0_2; + u8 temp_a0_5; + u8 temp_a2; + u8 temp_a2_2; + u8 temp_a2_3; + u8 temp_s3_5; + u8 temp_t4; + u8 temp_v0_16; + u8 temp_v0_9; + u8 temp_v1_2; + u8 temp_v1_3; + void *temp_a0_6; + void *temp_a0_7; + void *temp_s0; + void *temp_s4; + void *temp_v0_15; + void *temp_v0_18; + void *temp_v0_2; + void *temp_v0_5; + void *temp_v1_13; + u8 phi_s2; + s32 phi_a2; + s32 phi_a2_2; + s16 phi_a0; + u8 phi_v0; + s32 phi_s2_2; + s32 phi_a0_2; + s32 phi_a2_3; + f32 phi_f0; + f32 phi_f0_2; + f32 phi_f4; + s32 phi_s2_3; + s16 phi_s3; + s16 phi_s3_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp44 = 1; + temp_v0 = arg0->unk0; + if ((temp_v0 >> 0x1F) != 0) { + temp_v1 = arg0->unk38; + if (temp_v1 >= 2) { + arg0->unk38 = temp_v1 - 1; + if (((temp_v0 * 4) >= 0) && (arg0->unk3A >= arg0->unk38)) { + func_800BD120(); + arg0->unk0 = arg0->unk0 | 0x20; + return; + } + /* Duplicate return node #139. Try simplifying control flow for better match */ + return; + } + if ((temp_v0 * 8) >= 0) { + func_800BD120(arg0); + } + temp_t8 = arg0->unk8 & ~0x80; + if ((temp_t8 == 1) || (temp_t8 == 2)) { + arg0->unk8 = 0; + } + temp_v0_2 = arg0->unk4C; + temp_s0 = arg0 + 0x50; + temp_s4 = temp_v0_2->unk44; + arg0->unk0 = arg0->unk0 | 4; + sp68 = temp_v0_2; + phi_s3_2 = sp4A; +loop_11: + temp_v0_3 = func_800BF108(temp_s0, MIPS2C_ERROR(Read from unset register $a1)); + temp_s2 = temp_v0_3 & 0xFF; + phi_s3 = phi_s3_2; + if (temp_v0_3 >= 0xC1) { + if (temp_v0_3 >= 0xCD) { + switch (temp_v0_3) { /* switch 1 */ + case 0xFF: /* switch 1 */ + temp_v1_2 = temp_s0->unk18; + if (temp_v1_2 == 0) { + func_800BEB18(arg0, temp_v0_3); + return; + } + temp_t4 = (temp_v1_2 - 1) & 0xFF; + temp_s0->unk18 = temp_t4; + temp_s0->unk0 = (temp_s0 + (temp_t4 * 4))->unk4; + goto loop_11; + case 0xFC: /* switch 1 */ + temp_v0_4 = func_800BF11C(temp_s0, temp_v0_3); + temp_t5 = temp_v0_4 & 0xFFFF; + (temp_s0 + (temp_s0->unk18 * 4))->unk4 = temp_s0->unk0; + temp_s0->unk18 = temp_s0->unk18 + 1; + temp_s0->unk0 = temp_s4->unk14 + temp_t5; + phi_s3_2 = temp_v0_4 & 0xFFFF; + goto loop_11; + case 0xF8: /* switch 1 */ + (temp_s0 + temp_s0->unk18)->unk14 = func_800BF108(temp_s0, temp_v0_3); + (temp_s0 + (temp_s0->unk18 * 4))->unk4 = temp_s0->unk0; + temp_s0->unk18 = temp_s0->unk18 + 1; + goto loop_11; + case 0xF7: /* switch 1 */ + temp_v0_5 = temp_s0 + temp_s0->unk18; + temp_v0_5->unk13 = temp_v0_5->unk13 - 1; + temp_v1_3 = temp_s0->unk18; + if ((temp_s0 + temp_v1_3)->unk13 != 0) { + temp_s0->unk0 = *(temp_s0 + (temp_v1_3 * 4)); + } else { + temp_s0->unk18 = temp_v1_3 - 1; + } + goto loop_11; + case 0xFB: /* switch 1 */ + temp_v0_6 = func_800BF11C(temp_s0, temp_v0_3); + temp_s3 = temp_v0_6 & 0xFFFF; + temp_s0->unk0 = temp_s4->unk14 + (temp_v0_6 & 0xFFFF); + phi_s3_2 = temp_s3; + goto loop_11; + case 0xF4: /* switch 1 */ + temp_s0->unk0 = temp_s0->unk0 + func_800BF108(temp_s0, temp_v0_3); + goto loop_11; + } + } else { + switch (temp_v0_3) { /* switch 2 */ + case 0xC1: /* switch 2 */ + case 0xCA: /* switch 2 */ + temp_v1_4 = temp_s0->unk0; + temp_a0 = *temp_v1_4; + temp_s0->unk0 = temp_v1_4 + 1; + if (temp_v0_3 == 0xC1) { + arg0->unk28 = (temp_a0 * temp_a0) / 16129.0f; + } else { + arg0->unk5 = temp_a0; + } + break; + case 0xC2: /* switch 2 */ + case 0xC9: /* switch 2 */ + temp_v1_5 = temp_s0->unk0; + temp_a0_2 = *temp_v1_5; + temp_s0->unk0 = temp_v1_5 + 1; + if (temp_v0_3 == 0xC9) { + arg0->unk3 = temp_a0_2; + } else { + arg0->unk22 = temp_a0_2; + } + break; + case 0xC4: /* switch 2 */ + case 0xC5: /* switch 2 */ + if (temp_v0_3 == 0xC4) { + arg0->unk0 = arg0->unk0 | 0x10; + } else { + arg0->unk0 = arg0->unk0 & 0xFFEF; + } + func_800BD120(arg0, temp_v0_3); + break; + case 0xC3: /* switch 2 */ + temp_v0_7 = func_800BF14C(temp_s0, temp_v0_3); + temp_s3_2 = temp_v0_7 & 0xFFFF; + arg0->unk34 = temp_v0_7; + phi_s3_2 = temp_s3_2; + break; + case 0xC6: /* switch 2 */ + temp_v0_8 = func_800BF108(temp_s0, temp_v0_3); + if (temp_v0_8 >= 0x7F) { + if (temp_v0_8 == 0x7F) { + arg0->unk1 = 0; + } else { + arg0->unk1 = temp_v0_8; + arg0->unk44 = 0; + } + if (temp_v0_8 == 0xFF) { + arg0->unk18 = 0; + } + } else { + temp_v0_9 = func_800BFC68(sp68, temp_v0_8 & 0xFF & 0xFF, arg0 + 0x44, arg0 + 0x18); + arg0->unk1 = temp_v0_9; + if (temp_v0_9 == 0) { + arg0->unk1 = 0xFF; + } + } + break; + case 0xC7: /* switch 2 */ + arg0->unk8 = func_800BF108(temp_s0, temp_v0_3); + temp_t6 = (func_800BF108(temp_s0, MIPS2C_ERROR(Read from unset register $a1)) + sp68->unk1E + arg0->unk22 + temp_s4->unkC) & 0xFF; + phi_s2 = temp_t6; + if (temp_t6 >= 0x80) { + phi_s2 = 0; + } + arg0->unk4 = phi_s2; + if ((arg0->unk8 & 0x80) != 0) { + arg0->unk20 = *temp_s0->unk0; + temp_s0->unk0 = temp_s0->unk0 + 1; + } else { + temp_v0_10 = func_800BF14C(temp_s0, MIPS2C_ERROR(Read from unset register $a1)); + temp_s3_3 = temp_v0_10 & 0xFFFF; + arg0->unk20 = temp_v0_10; + phi_s3_2 = temp_s3_3; + } + break; + case 0xC8: /* switch 2 */ + arg0->unk8 = 0; + break; + case 0xCB: /* switch 2 */ + temp_v0_11 = func_800BF11C(temp_s0, temp_v0_3); + temp_s3_4 = temp_v0_11 & 0xFFFF; + arg0->unk1C = temp_s4->unk14 + (temp_v0_11 & 0xFFFF); + arg0->unk18 = func_800BF108(temp_s0, MIPS2C_ERROR(Read from unset register $a1)); + phi_s3_2 = temp_s3_4; + break; + case 0xCC: /* switch 2 */ + arg0->unk0 = arg0->unk0 | 2; + break; + default: /* switch 2 */ + default: /* switch 1 */ + temp_v1_6 = temp_v0_3 & 0xF0; + if (temp_v1_6 != 0xD0) { + if (temp_v1_6 != 0xE0) { + + } else { + arg0->unk3 = *(temp_s4->unk90 + (temp_v0_3 & 0xF)); + } + } else { + temp_s3_5 = *(temp_s4->unk8C + (temp_v0_3 & 0xF)); + arg0->unk28 = (temp_s3_5 * temp_s3_5) / 16129.0f; + phi_s3_2 = temp_s3_5; + } + break; + } + goto loop_11; + } + } else { + temp_v1_7 = temp_v0_3 & 0xC0; + if (temp_v0_3 == 0xC0) { + arg0->unk38 = func_800BF14C(temp_s0, temp_v0_3); + arg0->unk0 = arg0->unk0 | 0x20; + goto block_119; + } + arg0->unk0 = arg0->unk0 & 0xFFDF; + if (((sp68->unk0 << 6) >> 0x1F) == 1) { + temp_v1_8 = temp_v0_3 & 0xC0; + if (temp_v1_8 != 0) { + if (temp_v1_8 != 0x40) { + phi_a0 = phi_s3_2; + if (temp_v1_8 != 0x80) { + phi_a2 = sp34; + } else { + temp_v1_9 = temp_s0->unk0; + temp_a2 = *temp_v1_9; + temp_t2 = temp_v1_9 + 1; + temp_s0->unk0 = temp_t2; + arg0->unk3 = *temp_t2; + temp_s0->unk0 = temp_s0->unk0 + 1; + phi_a2 = temp_a2; + phi_a0 = arg0->unk36; + } + } else { + temp_v0_12 = func_800BF14C(temp_s0, temp_v0_3); + temp_v1_10 = temp_s0->unk0; + temp_a0_3 = temp_v0_12 & 0xFFFF; + temp_a2_2 = *temp_v1_10; + temp_s0->unk0 = temp_v1_10 + 1; + arg0->unk3 = 0; + arg0->unk36 = temp_v0_12; + phi_a2 = temp_a2_2; + phi_a0 = temp_a0_3; + } + } else { + temp_v0_13 = func_800BF14C(temp_s0, temp_v0_3); + temp_v1_11 = temp_s0->unk0; + temp_a0_4 = temp_v0_13 & 0xFFFF; + temp_a2_3 = *temp_v1_11; + temp_t6_2 = temp_v1_11 + 1; + temp_s0->unk0 = temp_t6_2; + arg0->unk3 = *temp_t6_2; + temp_s0->unk0 = temp_s0->unk0 + 1; + arg0->unk36 = temp_v0_13; + phi_a2 = temp_a2_3; + phi_a0 = temp_a0_4; + } + phi_a2_2 = phi_a2; + if ((phi_a2 >= 0x80) || (phi_a2 < 0)) { + phi_a2_2 = 0x7F; + } + temp_f0 = phi_a2_2; + arg0->unk28 = (temp_f0 * temp_f0) / 16129.0f; + phi_s2_2 = (temp_s2 - (temp_s2 & 0xC0)) & 0xFF; + } else { + if (temp_v1_7 != 0) { + if (temp_v1_7 != 0x40) { + if (temp_v1_7 != 0x80) { + + } else { + phi_s3 = arg0->unk36; + } + } else { + phi_s3 = arg0->unk34; + } + } else { + temp_v0_14 = func_800BF14C(temp_s0, temp_v0_3); + temp_s3_6 = temp_v0_14 & 0xFFFF; + arg0->unk36 = temp_v0_14; + phi_s3 = temp_s3_6; + } + phi_a0 = phi_s3; + phi_s2_2 = (temp_s2 - (temp_s2 & 0xC0)) & 0xFF; + } + arg0->unk38 = phi_a0; + arg0->unk3A = (arg0->unk3 * phi_a0) >> 8; + if ((((temp_s4->unk0 * 4) < 0) && ((sp68->unk3 & 0x40) != 0)) || (temp_v1_12 = sp68->unk0, ((temp_v1_12 * 8) < 0))) { + arg0->unk0 = arg0->unk0 | 0x20; + goto block_119; + } + temp_a0_5 = arg0->unk1; + phi_v0 = temp_a0_5; + if (temp_a0_5 == 0xFF) { + if ((temp_v1_12 * 0x10) < 0) { + phi_v0 = sp68->unk1C; + goto block_88; + } + /* Duplicate return node #139. Try simplifying control flow for better match */ + return; + } +block_88: + if (phi_v0 == 0) { + temp_v0_15 = func_800BC9F8(sp68->unk6, (phi_s2_2 + sp68->unk1E + arg0->unk22) & 0xFF); + temp_v1_13 = temp_v0_15 + 4; + if (temp_v0_15 == 0) { + arg0->unk0 = arg0->unk0 | 0x20; + arg0->unk3C = arg0->unk38; + return; + } + arg0->unk1C = temp_v0_15->unkC; + arg0->unk18 = temp_v0_15->unk0; + if ((arg0->unk0 << 6) >= 0) { + arg0->unk5 = temp_v0_15->unk1; + } + arg0->unk48 = temp_v1_13; + phi_f4 = temp_v1_13->unk4; + goto block_117; + } + temp_a1 = (phi_s2_2 + temp_s4->unkC + sp68->unk1E + arg0->unk22) & 0xFF; + if (temp_a1 >= 0x80) { + arg0->unk0 = arg0->unk0 | 0x20; + } else { + if (temp_a0_5 == 0xFF) { + phi_a0_2 = sp68->unk40; + } else { + phi_a0_2 = arg0->unk44; + } + if (arg0->unk8 != 0) { + temp_v0_16 = arg0->unk4; + phi_a2_3 = temp_v0_16; + if (temp_v0_16 < temp_a1) { + phi_a2_3 = temp_a1; + } + if (phi_a0_2 != 0) { + temp_v0_17 = func_800BC90C(phi_a0_2, phi_a2_3, phi_a2_3); + sp44 = temp_v0_17 == arg0->unk48; + arg0->unk48 = temp_v0_17; + phi_f0 = temp_v0_17->unk4; + } else { + arg0->unk48 = NULL; + phi_f0 = 1.0f; + } + temp_f2 = gNoteFrequencies[temp_a1] * phi_f0; + temp_t4_2 = arg0->unk8 & ~0x80; + switch (temp_t4_2) { /* switch 3 */ + case 1: /* switch 3 */ + case 3: /* switch 3 */ + case 5: /* switch 3 */ + phi_f0_2 = gNoteFrequencies[arg0->unk4] * phi_f0; + break; + default: /* switch 3 */ + phi_f0_2 = temp_f2; + break; + } + temp_v0_18 = arg0 + 8; + temp_v0_18->unkC = (temp_f2 / phi_f0_2) - 1.0f; + if ((arg0->unk8 & 0x80) != 0) { + temp_v0_18->unk8 = (temp_s4->unk8 * 32512.0f) / (arg0->unk38 * D_803B70B4 * arg0->unk20); + } else { + temp_v0_18->unk8 = 127.0f / arg0->unk20; + } + temp_v0_18->unk4 = 0.0f; + arg0->unk24 = phi_f0_2; + if ((arg0->unk8 & ~0x80) == 5) { + arg0->unk4 = temp_a1; + } + } else if (phi_a0_2 != 0) { + temp_v0_19 = func_800BC90C(phi_a0_2, temp_a1, MIPS2C_ERROR(Read from unset register $a2)); + sp44 = temp_v0_19 == arg0->unk48; + arg0->unk48 = temp_v0_19; + arg0->unk24 = gNoteFrequencies[temp_a1] * temp_v0_19->unk4; + } else { + arg0->unk48 = NULL; + phi_f4 = gNoteFrequencies[temp_a1]; +block_117: + arg0->unk24 = phi_f4; + } + } + arg0->unk3C = arg0->unk38; +block_119: + temp_v0_20 = arg0->unk0; + if (((temp_v0_20 * 4) >> 0x1F) == 1) { + if ((arg0->unk40 != 0) || ((temp_v0_20 * 8) < 0)) { + func_800BD120(arg0); + return; + } + /* Duplicate return node #139. Try simplifying control flow for better match */ + return; + } + phi_s2_3 = 0; + if ((temp_v0_20 * 8) >= 0) { + phi_s2_3 = 1; + } else { + temp_a0_6 = arg0->unk40; + if ((temp_a0_6 == 0) || (arg0->unk2 == 0)) { + phi_s2_3 = 1; + } else if (sp44 == 0) { + func_800BD120(arg0); + phi_s2_3 = 1; + } else if (arg0 != temp_a0_6->unk44) { + phi_s2_3 = 1; + } else if (arg0->unk48 == 0) { + func_800BD264(temp_a0_6, arg0); + } + } + if (phi_s2_3 != 0) { + arg0->unk40 = func_800BDA44(arg0); + } + temp_a0_7 = arg0->unk40; + if ((temp_a0_7 != 0) && (arg0 == temp_a0_7->unk44)) { + func_800BE4D4(temp_a0_7); + } + /* Duplicate return node #139. Try simplifying control flow for better match */ + } + } +} #else GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF190.s") #endif @@ -610,29 +1080,803 @@ GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFD6C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800BFD90: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_800B9A90(?, ?, u8, u16); /* extern */ +? func_800BD418(void *); /* extern */ +? func_800BD578(void *, s32); /* extern */ +? func_800BEB54(void *, s32); /* extern */ +? func_800BEBA4(void *); /* extern */ +? func_800BEE88(s32 *, s32, s32); /* extern */ +? func_800BF190(s32); /* extern */ +? func_800BFCD8(void *, s32); /* extern */ +? func_800BFD6C(void *, s32); /* extern */ -Unable to determine jump table for jr instruction at func_800BFD90.s line 639. +void func_800BFD90(void *arg0) { + u8 sp55; + u16 sp52; + s32 sp34; + f32 temp_f18; + f32 temp_f6; + f32 temp_f8; + s16 temp_v1_5; + s32 *temp_s4; + s32 *temp_v1_10; + s32 temp_a0; + s32 temp_a0_4; + s32 temp_a0_5; + s32 temp_a1_2; + s32 temp_a1_3; + s32 temp_s0; + s32 temp_s0_2; + s32 temp_s0_6; + s32 temp_s0_7; + s32 temp_t3; + s32 temp_v0_2; + s32 temp_v1_11; + s32 temp_v1_3; + s32 temp_v1_6; + s8 *temp_v0_4; + s8 temp_s3; + s8 temp_v0_5; + s8 temp_v1_4; + u16 temp_a3; + u16 temp_a3_2; + u16 temp_t5; + u16 temp_v0_6; + u16 temp_v1; + u32 temp_t6; + u32 temp_v0; + u8 *temp_v1_8; + u8 temp_a0_2; + u8 temp_a0_3; + u8 temp_s0_4; + u8 temp_s0_5; + u8 temp_t0; + u8 temp_t7; + void *temp_a1; + void *temp_s0_3; + void *temp_s1; + void *temp_v0_3; + void *temp_v1_12; + void *temp_v1_2; + void *temp_v1_7; + void *temp_v1_9; + void *phi_s1; + s32 phi_s0; + u16 phi_v0; + s32 phi_s3; + void *phi_s1_2; + s32 phi_s0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk0; + if ((temp_v0 >> 0x1F) != 0) { + phi_s0 = 0; + phi_s0_2 = 0; + if ((temp_v0 * 4) < 0) { + phi_s1 = arg0; + do { + temp_a0 = phi_s1->unk48; + if (temp_a0 != 0) { + func_800BF190(temp_a0); + } + temp_s0 = phi_s0 + 4; + phi_s1 += 4; + phi_s0 = temp_s0; + } while (temp_s0 != 0x10); + return; + } + temp_s4 = arg0->unk44; + if (((temp_s4->unk0 * 4) >= 0) || ((arg0->unk3 & 0x80) == 0)) { + temp_v1 = arg0->unk1A; + temp_s1 = arg0 + 0x60; + phi_v0 = temp_v1; + if (temp_v1 != 0) { + temp_t5 = temp_v1 - 1; + arg0->unk1A = temp_t5; + phi_v0 = temp_t5 & 0xFFFF; + } + phi_s3 = sp4B; + if (phi_v0 == 0) { + default: /* switch 2 */ + default: /* switch 1 */ +loop_12: + temp_v0_2 = func_800BF108(temp_s1); + temp_s0_2 = temp_v0_2 & 0xFF; + if (temp_v0_2 >= 0xC1) { + switch (temp_v0_2) { /* switch 1 */ + case 0xFF: /* switch 1 */ + temp_a0_2 = temp_s1->unk18; + if (temp_a0_2 == 0) { + func_800BEBA4(arg0); + } else { + temp_t7 = (temp_a0_2 - 1) & 0xFF; + temp_s1->unk18 = temp_t7; + temp_s1->unk0 = (temp_s1 + (temp_t7 * 4))->unk4; + goto loop_12; + } + break; + case 0xFD: /* switch 1 */ + arg0->unk1A = func_800BF14C(temp_s1); + break; + case 0xEA: /* switch 1 */ + arg0->unk0 = arg0->unk0 | 0x20; + break; + case 0xFC: /* switch 1 */ + temp_t3 = func_800BF11C(temp_s1) & 0xFFFF; + (temp_s1 + (temp_s1->unk18 * 4))->unk4 = temp_s1->unk0; + temp_s1->unk18 = temp_s1->unk18 + 1; + temp_s1->unk0 = temp_s4->unk14 + temp_t3; + goto loop_12; + case 0xF8: /* switch 1 */ + (temp_s1 + temp_s1->unk18)->unk14 = func_800BF108(temp_s1); + (temp_s1 + (temp_s1->unk18 * 4))->unk4 = temp_s1->unk0; + temp_s1->unk18 = temp_s1->unk18 + 1; + goto loop_12; + case 0xF7: /* switch 1 */ + temp_v0_3 = temp_s1 + temp_s1->unk18; + temp_v0_3->unk13 = temp_v0_3->unk13 - 1; + temp_a0_3 = temp_s1->unk18; + if ((temp_s1 + temp_a0_3)->unk13 != 0) { + temp_s1->unk0 = *(temp_s1 + (temp_a0_3 * 4)); + } else { + temp_s1->unk18 = temp_a0_3 - 1; + } + goto loop_12; + case 0xF6: /* switch 1 */ + temp_s1->unk18 = temp_s1->unk18 - 1; + goto loop_12; + case 0xF5: /* switch 1 */ + case 0xF9: /* switch 1 */ + case 0xFA: /* switch 1 */ + case 0xFB: /* switch 1 */ + if (((temp_s0_2 != 0xFA) || (phi_s3 == 0)) && ((temp_s0_2 != 0xF9) || (phi_s3 < 0)) && ((temp_s0_2 != 0xF5) || (phi_s3 >= 0))) { + temp_s1->unk0 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF); + } + goto loop_12; + case 0xF2: /* switch 1 */ + case 0xF3: /* switch 1 */ + case 0xF4: /* switch 1 */ + if (((temp_s0_2 != 0xF3) || (phi_s3 == 0)) && ((temp_s0_2 != 0xF2) || (phi_s3 < 0))) { + temp_s1->unk0 = temp_s1->unk0 + func_800BF108(temp_s1); + } + goto loop_12; + case 0xF1: /* switch 1 */ + temp_s0_3 = arg0 + 0x84; + func_800BD418(temp_s0_3); + func_800BD578(temp_s0_3, func_800BF108(temp_s1)); + goto loop_12; + case 0xF0: /* switch 1 */ + func_800BD418(arg0 + 0x84); + goto loop_12; + case 0xC2: /* switch 1 */ + arg0->unk34 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF); + goto loop_12; + case 0xC5: /* switch 1 */ + if (phi_s3 != -1) { + temp_v1_2 = arg0->unk34 + (phi_s3 * 2); + arg0->unk34 = temp_s4->unk14 + ((temp_v1_2->unk1 + (temp_v1_2->unk0 << 8)) & 0xFFFF); + } + goto loop_12; + case 0xEB: /* switch 1 */ + temp_v1_3 = D_803B7078; + temp_a3 = *(temp_v1_3 + (temp_s4->unk4 * 2)); + temp_s0_4 = *(((temp_a3 + *(temp_a3 + temp_v1_3)) - func_800BF108(temp_s1)) + temp_v1_3); + if (func_800B9A90(1, 2, temp_s0_4, temp_a3) != 0) { + arg0->unk6 = temp_s0_4; + } + /* fallthrough */ + case 0xC1: /* switch 1 */ + func_800BFCD8(arg0, func_800BF108(temp_s1) & 0xFF); + goto loop_12; + case 0xC3: /* switch 1 */ + arg0->unk0 = arg0->unk0 & 0xFFFD; + goto loop_12; + case 0xC4: /* switch 1 */ + arg0->unk0 = arg0->unk0 | 2; + goto loop_12; + case 0xDF: /* switch 1 */ + func_800BFD6C(arg0, func_800BF108(temp_s1) & 0xFF); + arg0->unk1 = arg0->unk1 | 0x40; + goto loop_12; + case 0xE0: /* switch 1 */ + temp_f6 = func_800BF108(temp_s1); + arg0->unk1 = arg0->unk1 | 0x40; + arg0->unk20 = temp_f6 * 0.0078125f; + goto loop_12; + case 0xDE: /* switch 1 */ + temp_f18 = func_800BF11C(temp_s1) & 0xFFFF; + arg0->unk1 = arg0->unk1 | 0x80; + arg0->unk30 = temp_f18 / 32768.0f; + goto loop_12; + case 0xD3: /* switch 1 */ + temp_f8 = gPitchBendFrequencyScale[(func_800BF108(temp_s1) + 0x7F) & 0xFF]; + arg0->unk1 = arg0->unk1 | 0x80; + arg0->unk30 = temp_f8; + goto loop_12; + case 0xDD: /* switch 1 */ + arg0->unk9 = func_800BF108(temp_s1); + arg0->unk1 = arg0->unk1 | 0x20; + goto loop_12; + case 0xDC: /* switch 1 */ + arg0->unkA = func_800BF108(temp_s1); + arg0->unk1 = arg0->unk1 | 0x20; + goto loop_12; + case 0xDB: /* switch 1 */ + temp_v0_4 = temp_s1->unk0; + temp_v1_4 = *temp_v0_4; + temp_s1->unk0 = temp_v0_4 + 1; + arg0->unk1E = temp_v1_4; + goto loop_12; + case 0xDA: /* switch 1 */ + arg0->unk80 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF); + goto loop_12; + case 0xD9: /* switch 1 */ + arg0->unk7C = func_800BF108(temp_s1); + goto loop_12; + case 0xD8: /* switch 1 */ + arg0->unk12 = func_800BF108(temp_s1) * 8; + arg0->unkE = 0; + arg0->unk16 = 0; + goto loop_12; + case 0xD7: /* switch 1 */ + temp_v1_5 = func_800BF108(temp_s1) << 5; + arg0->unk10 = temp_v1_5; + arg0->unkC = temp_v1_5; + arg0->unk14 = 0; + goto loop_12; + case 0xE2: /* switch 1 */ + arg0->unkE = func_800BF108(temp_s1) * 8; + arg0->unk12 = func_800BF108(temp_s1) * 8; + arg0->unk16 = func_800BF108(temp_s1) * 0x10; + goto loop_12; + case 0xE1: /* switch 1 */ + arg0->unkC = func_800BF108(temp_s1) << 5; + arg0->unk10 = func_800BF108(temp_s1) << 5; + arg0->unk14 = func_800BF108(temp_s1) * 0x10; + goto loop_12; + case 0xE3: /* switch 1 */ + arg0->unk18 = func_800BF108(temp_s1) * 0x10; + goto loop_12; + case 0xD4: /* switch 1 */ + arg0->unk4 = func_800BF108(temp_s1); + goto loop_12; + case 0xC6: /* switch 1 */ + temp_v1_6 = D_803B7078; + temp_a3_2 = *(temp_v1_6 + (temp_s4->unk4 * 2)); + temp_s0_5 = *(((temp_a3_2 + *(temp_a3_2 + temp_v1_6)) - func_800BF108(temp_s1)) + temp_v1_6); + if (func_800B9A90(1, 2, temp_s0_5, temp_a3_2) != 0) { + arg0->unk6 = temp_s0_5; + } + goto loop_12; + case 0xC7: /* switch 1 */ + sp34 = phi_s3 & 0xFF; + temp_s0_6 = func_800BF108(temp_s1) & 0xFF; + *(temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF)) = sp34 + temp_s0_6; + goto loop_12; + case 0xC8: /* switch 1 */ + case 0xC9: /* switch 1 */ + case 0xCC: /* switch 1 */ + temp_v0_5 = func_800BF108(temp_s1); + if (temp_s0_2 == 0xC8) { + phi_s3 = phi_s3 - temp_v0_5; + } else if (temp_s0_2 == 0xCC) { + phi_s3 = temp_v0_5; + } else { + phi_s3 = phi_s3 & temp_v0_5; + } + goto loop_12; + case 0xCA: /* switch 1 */ + arg0->unk3 = func_800BF108(temp_s1); + goto loop_12; + case 0xCB: /* switch 1 */ + phi_s3 = *(temp_s4->unk14 + ((func_800BF11C(temp_s1) & 0xFFFF) + phi_s3)); + goto loop_12; + case 0xD0: /* switch 1 */ + arg0->unk0 = ((func_800BF108(temp_s1) * 4) & 4) | (arg0->unk0 & 0xFFFB); + goto loop_12; + case 0xD1: /* switch 1 */ + arg0->unk2 = func_800BF108(temp_s1); + goto loop_12; + case 0xD2: /* switch 1 */ + arg0->unk7D = func_800BF108(temp_s1); + goto loop_12; + case 0xE5: /* switch 1 */ + arg0->unk7 = func_800BF108(temp_s1); + goto loop_12; + case 0xE4: /* switch 1 */ + if (phi_s3 != -1) { + (temp_s1 + (temp_s1->unk18 * 4))->unk4 = temp_s1->unk0; + temp_v1_7 = arg0->unk34 + (phi_s3 * 2); + temp_s1->unk18 = temp_s1->unk18 + 1; + temp_s1->unk0 = temp_s4->unk14 + ((temp_v1_7->unk1 + (temp_v1_7->unk0 << 8)) & 0xFFFF); + } + goto loop_12; + case 0xE6: /* switch 1 */ + arg0->unk8 = func_800BF108(temp_s1); + goto loop_12; + case 0xE7: /* switch 1 */ + temp_v1_8 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF); + temp_v1_9 = temp_v1_8 + 7; + arg0->unk3 = *temp_v1_8; + arg0->unk2 = temp_v1_9->unk-6; + arg0->unk5 = temp_v1_9->unk-5; + arg0->unk1E = temp_v1_9->unk-4; + arg0->unk9 = temp_v1_9->unk-3; + arg0->unkA = temp_v1_9->unk-2; + arg0->unk4 = temp_v1_9->unk-1; + arg0->unk1 = arg0->unk1 | 0x20; + arg0->unk7 = temp_v1_9->unk0; + goto loop_12; + case 0xE8: /* switch 1 */ + arg0->unk3 = func_800BF108(temp_s1); + arg0->unk2 = func_800BF108(temp_s1); + arg0->unk5 = func_800BF108(temp_s1); + arg0->unk1E = func_800BF108(temp_s1); + arg0->unk9 = func_800BF108(temp_s1); + arg0->unkA = func_800BF108(temp_s1); + arg0->unk4 = func_800BF108(temp_s1); + arg0->unk7 = func_800BF108(temp_s1); + arg0->unk1 = arg0->unk1 | 0x20; + goto loop_12; + case 0xEC: /* switch 1 */ + arg0->unk12 = 0; + arg0->unkE = 0; + arg0->unk16 = 0; + arg0->unk10 = 0; + arg0->unkC = 0; + arg0->unk14 = 0; + arg0->unk30 = 1.0f; + goto loop_12; + case 0xE9: /* switch 1 */ + arg0->unk5 = func_800BF108(temp_s1); + goto loop_12; + case 0xEF: /* switch 1 */ + func_800BF11C(temp_s1); + func_800BF108(temp_s1); + goto loop_12; + } + } else { + temp_t6 = temp_v0_2 & 0xF0; + temp_a0_4 = temp_v0_2 & 0xF; + temp_t0 = temp_a0_4 & 0xFF; + switch (temp_t6) { /* switch 2 */ + case 0x0: /* switch 2 */ + temp_v1_10 = (arg0 + ((temp_a0_4 & 0xFF) * 4))->unk48; + if (temp_v1_10 != 0) { + phi_s3 = (*temp_v1_10 * 2) >> 0x1F; + } else { + phi_s3 = -1; + } + goto loop_12; + case 0x70: /* switch 2 */ + (arg0 + (temp_a0_4 & 0xFF))->unk58 = phi_s3; + goto loop_12; + case 0x80: /* switch 2 */ + temp_v1_11 = temp_a0_4 & 0xFF; + temp_a1 = arg0 + temp_v1_11; + temp_s3 = temp_a1->unk58; + phi_s3 = temp_s3; + if (temp_v1_11 < 4) { + temp_a1->unk58 = -1; + } + goto loop_12; + case 0x50: /* switch 2 */ + phi_s3 = phi_s3 - (arg0 + (temp_a0_4 & 0xFF))->unk58; + goto loop_12; + case 0x60: /* switch 2 */ + arg0->unk1A = temp_a0_4 & 0xFF; + break; + case 0x90: /* switch 2 */ + temp_v0_6 = func_800BF11C(temp_s1); + temp_a1_2 = temp_s0_2 & 0xF; + sp34 = temp_a1_2; + sp52 = temp_v0_6; + if (func_800BEA10(arg0, temp_a1_2, temp_a1_2) == 0) { + (arg0 + (sp34 * 4))->unk48->unk50 = temp_s4->unk14 + sp52; + } + goto loop_12; + case 0xA0: /* switch 2 */ + func_800BEB54(arg0, temp_s0_2 & 0xF); + goto loop_12; + case 0xB0: /* switch 2 */ + if (phi_s3 != -1) { + temp_a1_3 = temp_s0_2 & 0xF; + sp34 = temp_a1_3; + if (func_800BEA10(arg0, temp_a1_3, temp_a1_3) != -1) { + temp_v1_12 = arg0->unk34 + (phi_s3 * 2); + (arg0 + (sp34 * 4))->unk48->unk50 = temp_s4->unk14 + ((temp_v1_12->unk1 + (temp_v1_12->unk0 << 8)) & 0xFFFF); + } + } + goto loop_12; + case 0x10: /* switch 2 */ + func_800BEE88(temp_s4, temp_s0_2 & 0xF, temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF)); + goto loop_12; + case 0x20: /* switch 2 */ + func_800BEBA4(temp_s4[temp_s0_2 & 0xF].unk30); + goto loop_12; + case 0x30: /* switch 2 */ + sp55 = temp_t0; + (temp_s4[temp_t0].unk30 + func_800BF108(temp_s1))->unk58 = phi_s3; + goto loop_12; + case 0x40: /* switch 2 */ + sp55 = temp_t0; + phi_s3 = (temp_s4[temp_t0].unk30 + func_800BF108(temp_s1))->unk58; + goto loop_12; + } + } + } + phi_s1_2 = arg0; + do { + temp_a0_5 = phi_s1_2->unk48; + if (temp_a0_5 != 0) { + func_800BF190(temp_a0_5); + } + temp_s0_7 = phi_s0_2 + 4; + phi_s1_2 += 4; + phi_s0_2 = temp_s0_7; + } while (temp_s0_7 != 0x10); + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + } +} #else GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFD90.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800C08CC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800BAB58(void *, void *, void *, void *, void *); /* extern */ +? func_800BB584(u8, void *, void *); /* extern */ +? func_800BD418(void *); /* extern */ +? func_800BD578(void *, s8); /* extern */ +? func_800BEC8C(void *, s32); /* extern */ +? func_800BEDB8(void *, s32); /* extern */ +? func_800BEE88(void *, s32, s32); /* extern */ +? func_800BEF2C(void *, u8, s32); /* extern */ +? func_800BFD90(s32); /* extern */ +s32 osRecvMesg(void *, ?, ?); /* extern */ +extern ? D_803B03C0; +extern ? D_803B0400; +extern ? D_803B5EF0; -Unable to determine jump table for jr instruction at func_800C08CC.s line 530. +void func_800C08CC(void *arg0) { + void *sp38; + s32 sp34; + void *sp30; + f32 temp_f16; + s16 temp_v1_3; + s16 temp_v1_5; + s32 temp_a0_6; + s32 temp_s2; + s32 temp_t2_2; + s32 temp_v0_13; + s32 temp_v0_5; + s32 temp_v0_7; + s32 temp_v1_4; + s32 temp_v1_8; + s8 temp_v0_12; + s8 temp_v0_6; + s8 temp_v0_9; + u16 temp_a0_2; + u16 temp_t2; + u16 temp_v0_10; + u16 temp_v0_11; + u16 temp_v1_7; + u32 temp_v0; + u8 *temp_v0_2; + u8 *temp_v0_3; + u8 *temp_v0_4; + u8 *temp_v1; + u8 *temp_v1_2; + u8 temp_a0; + u8 temp_a0_3; + u8 temp_a0_4; + u8 temp_a1_2; + u8 temp_s2_2; + u8 temp_t9; + u8 temp_v1_6; + void *temp_a0_5; + void *temp_a1; + void *temp_a2; + void *temp_s0; + void *temp_s0_2; + void *temp_v0_8; + u8 phi_a0; + u8 *phi_v0; + s32 phi_s3; + s16 phi_v0_2; + void *phi_v1; + s32 phi_v0_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk0; + if ((temp_v0 >> 0x1F) != 0) { + if (((temp_v0 * 0x10) >> 0x1F) == 1) { + temp_s0 = arg0 + 0x108; + if (osRecvMesg(temp_s0, 0, 0) != -1) { + temp_a1 = arg0 + 0x13C; + temp_a2 = arg0 + 0x144; + if (arg0->unk144 == 0) { + arg0->unk0 = arg0->unk0 & 0xFFF7; + func_800BB584(arg0->unk6, temp_a1, temp_a2); + temp_v0_2 = arg0->unk6 + &D_803B03C0; + if (*temp_v0_2 != 5) { + *temp_v0_2 = 2; + return; + } + /* Duplicate return node #110. Try simplifying control flow for better match */ + return; + } + func_800BAB58(arg0 + 0x140, temp_a1, temp_a2, temp_s0, arg0 + 0x124); + return; + } + /* Duplicate return node #110. Try simplifying control flow for better match */ + return; + } + if (((temp_v0 * 8) >> 0x1F) == 1) { + if (osRecvMesg(arg0 + 0xD4, 0, 0) != -1) { + arg0->unk0 = arg0->unk0 & 0xFFEF; + temp_v1 = arg0->unk4 + &D_803B0400; + if (*temp_v1 != 5) { + *temp_v1 = 2; + } + goto block_11; + } + /* Duplicate return node #110. Try simplifying control flow for better match */ + return; + } +block_11: + temp_v1_2 = arg0->unk4 + &D_803B0400; + temp_a1_2 = *temp_v1_2; + if ((temp_a1_2 < 2) || (temp_v0_3 = arg0->unk5 + &D_803B03C0, temp_a0 = *temp_v0_3, phi_a0 = temp_a0, phi_v0 = temp_v0_3, ((temp_a0 < 2) != 0))) { + func_800BEF2C(arg0, temp_a1_2, 5); + return; + } + if (temp_a1_2 != 5) { + *temp_v1_2 = 2; + temp_v0_4 = arg0->unk5 + &D_803B03C0; + phi_a0 = *temp_v0_4; + phi_v0 = temp_v0_4; + } + if (phi_a0 != 5) { + *phi_v0 = 2; + } + if (((arg0->unk0 * 4) >= 0) || ((arg0->unk3 & 0x80) == 0)) { + temp_t2 = arg0->unkA + arg0->unk8; + arg0->unkA = temp_t2; + temp_v1_3 = D_803B70B4; + temp_v0_5 = temp_t2 & 0xFFFF; + if (temp_v0_5 >= temp_v1_3) { + temp_a0_2 = arg0->unkE; + arg0->unkA = temp_v0_5 - temp_v1_3; + if (temp_a0_2 >= 2) { + arg0->unkE = temp_a0_2 - 1; + } else { + temp_s0_2 = arg0 + 0x70; + arg0->unk0 = arg0->unk0 | 4; + phi_s3 = sp58; +loop_24: + temp_v0_6 = func_800BF108(temp_s0_2); + temp_s2 = temp_v0_6 & 0xFF; + if (temp_v0_6 == 0xFF) { + temp_a0_3 = temp_s0_2->unk18; + if (temp_a0_3 == 0) { + func_800BEF2C(arg0); + } else { + temp_t9 = (temp_a0_3 - 1) & 0xFF; + temp_s0_2->unk18 = temp_t9; + temp_s0_2->unk0 = (temp_s0_2 + (temp_t9 * 4))->unk4; + goto block_28; + } + } else { +block_28: + temp_v1_4 = temp_v0_6 & 0xFF; + temp_v0_7 = temp_v1_4 & 0xF0; + if (temp_v1_4 == 0xFD) { + arg0->unkE = func_800BF14C(temp_s0_2); + } else if (temp_v1_4 == 0xFE) { + arg0->unkE = 1; + } else { + if (temp_v1_4 >= 0xC0) { + switch (temp_v1_4) { /* switch 1 */ + case 0xFC: /* switch 1 */ + temp_t2_2 = func_800BF11C(temp_s0_2) & 0xFFFF; + (temp_s0_2 + (temp_s0_2->unk18 * 4))->unk4 = temp_s0_2->unk0; + temp_s0_2->unk18 = temp_s0_2->unk18 + 1; + temp_s0_2->unk0 = arg0->unk14 + temp_t2_2; + break; + case 0xF8: /* switch 1 */ + (temp_s0_2 + temp_s0_2->unk18)->unk14 = func_800BF108(temp_s0_2); + (temp_s0_2 + (temp_s0_2->unk18 * 4))->unk4 = temp_s0_2->unk0; + temp_s0_2->unk18 = temp_s0_2->unk18 + 1; + break; + case 0xF7: /* switch 1 */ + temp_v0_8 = temp_s0_2 + temp_s0_2->unk18; + temp_v0_8->unk13 = temp_v0_8->unk13 - 1; + temp_a0_4 = temp_s0_2->unk18; + if ((temp_s0_2 + temp_a0_4)->unk13 != 0) { + temp_s0_2->unk0 = *(temp_s0_2 + (temp_a0_4 * 4)); + } else { + temp_s0_2->unk18 = temp_a0_4 - 1; + } + break; + case 0xF5: /* switch 1 */ + case 0xF9: /* switch 1 */ + case 0xFA: /* switch 1 */ + case 0xFB: /* switch 1 */ + if (((temp_s2 != 0xFA) || (phi_s3 == 0)) && ((temp_s2 != 0xF9) || (phi_s3 < 0)) && ((temp_s2 != 0xF5) || (phi_s3 >= 0))) { + temp_s0_2->unk0 = arg0->unk14 + (func_800BF11C(temp_s0_2) & 0xFFFF); + } + break; + case 0xF2: /* switch 1 */ + case 0xF3: /* switch 1 */ + case 0xF4: /* switch 1 */ + if (((temp_s2 != 0xF3) || (phi_s3 == 0)) && ((temp_s2 != 0xF2) || (phi_s3 < 0))) { + temp_s0_2->unk0 = temp_s0_2->unk0 + func_800BF108(temp_s0_2); + } + break; + case 0xF1: /* switch 1 */ + temp_a0_5 = arg0 + 0x94; + sp38 = temp_a0_5; + func_800BD418(temp_a0_5); + func_800BD578(temp_a0_5, func_800BF108(temp_s0_2)); + break; + case 0xF0: /* switch 1 */ + func_800BD418(arg0 + 0x94); + break; + case 0xDF: /* switch 1 */ + arg0->unkC = 0; + /* fallthrough */ + case 0xDE: /* switch 1 */ + arg0->unkC = arg0->unkC + func_800BF108(temp_s0_2); + break; + case 0xDC: /* switch 1 */ + case 0xDD: /* switch 1 */ + temp_v0_9 = func_800BF108(temp_s0_2); + if (temp_s2 == 0xDD) { + arg0->unk8 = (temp_v0_9 & 0xFF) * 0x30; + } else { + arg0->unk8 = arg0->unk8 + (temp_v0_9 * 0x30); + } + temp_v1_5 = D_803B70B4; + temp_v0_10 = arg0->unk8; + phi_v0_2 = temp_v0_10; + if (temp_v1_5 < temp_v0_10) { + arg0->unk8 = temp_v1_5; + phi_v0_2 = temp_v1_5 & 0xFFFF; + } + if (phi_v0_2 <= 0) { + arg0->unk8 = 1; + } + break; + case 0xDA: /* switch 1 */ + temp_s2_2 = func_800BF108(temp_s0_2) & 0xFF; + temp_v0_11 = func_800BF11C(temp_s0_2); + if ((temp_s2_2 != 0) && (temp_s2_2 != 1)) { + if (temp_s2_2 != 2) { + + } else { + temp_f16 = temp_v0_11 & 0xFFFF; + arg0->unk10 = temp_v0_11; + arg0->unk1 = temp_s2_2; + arg0->unk1C = (0.0f - arg0->unk18) / temp_f16; + } + } else if (arg0->unk1 != 2) { + arg0->unk12 = temp_v0_11; + arg0->unk1 = temp_s2_2; + } + break; + case 0xDB: /* switch 1 */ + temp_v0_12 = func_800BF108(temp_s0_2); + temp_v1_6 = arg0->unk1; + if (temp_v1_6 != 0) { + if (temp_v1_6 != 1) { + if (temp_v1_6 != 2) { + + } + } else { + arg0->unk1 = 0; + arg0->unk18 = 0.0f; + goto block_76; + } + } else { +block_76: + temp_v1_7 = arg0->unk12; + arg0->unk10 = temp_v1_7; + if (temp_v1_7 != 0) { + arg0->unk1C = ((temp_v0_12 / 127.0f) - arg0->unk18) / (temp_v1_7 & 0xFFFF); + } else { + arg0->unk18 = temp_v0_12 / 127.0f; + } + } + break; + case 0xD9: /* switch 1 */ + arg0->unk28 = func_800BF108(temp_s0_2) / 127.0f; + break; + case 0xD7: /* switch 1 */ + func_800BEC8C(arg0, func_800BF11C(temp_s0_2) & 0xFFFF); + break; + case 0xD6: /* switch 1 */ + func_800BEDB8(arg0, func_800BF11C(temp_s0_2) & 0xFFFF); + break; + case 0xD5: /* switch 1 */ + arg0->unk24 = func_800BF108(temp_s0_2) / 127.0f; + break; + case 0xD4: /* switch 1 */ + arg0->unk0 = arg0->unk0 | 0x20; + break; + case 0xD3: /* switch 1 */ + arg0->unk3 = func_800BF108(temp_s0_2); + break; + case 0xD1: /* switch 1 */ + case 0xD2: /* switch 1 */ + temp_v1_8 = arg0->unk14 + (func_800BF11C(temp_s0_2) & 0xFFFF); + if (temp_s2 == 0xD2) { + arg0->unk8C = temp_v1_8; + } else { + arg0->unk90 = temp_v1_8; + } + break; + case 0xD0: /* switch 1 */ + arg0->unk2 = func_800BF108(temp_s0_2); + break; + case 0xCC: /* switch 1 */ + phi_s3 = func_800BF108(temp_s0_2); + break; + case 0xC9: /* switch 1 */ + phi_s3 &= func_800BF108(temp_s0_2); + break; + case 0xC8: /* switch 1 */ + phi_s3 -= func_800BF108(temp_s0_2); + break; + } + } else if (temp_v0_7 >= 0x11) { + if (temp_v0_7 >= 0x21) { + switch (temp_v0_7) { /* switch 2 */ + case 0x50: /* switch 2 */ + phi_s3 -= arg0->unk7; + break; + case 0x70: /* switch 2 */ + arg0->unk7 = phi_s3; + break; + case 0x80: /* switch 2 */ + phi_s3 = arg0->unk7; + break; + case 0x90: /* switch 2 */ + func_800BEE88(arg0, temp_s2 & 0xF, arg0->unk14 + (func_800BF11C(temp_s0_2) & 0xFFFF)); + break; + } + } else if (temp_v0_7 != 0x20) { + + } + } else if (temp_v0_7 != 0) { + if (temp_v0_7 != 0x10) { + + } + } else { + phi_s3 = (*(arg0 + ((temp_v1_4 & 0xF) * 4))->unk30 * 2) >> 0x1F; + } + goto loop_24; + } + } + } + phi_v1 = arg0; + phi_v0_3 = 0; + do { + temp_a0_6 = phi_v1->unk30; + if ((&D_803B5EF0 != temp_a0_6) == 1) { + sp34 = phi_v0_3; + sp30 = phi_v1; + func_800BFD90(temp_a0_6); + } + temp_v0_13 = phi_v0_3 + 4; + phi_v1 += 4; + phi_v0_3 = temp_v0_13; + } while (temp_v0_13 != 0x40); + } + } + /* Duplicate return node #110. Try simplifying control flow for better match */ + } +} #else GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C08CC.s") #endif diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index fa567ffa4..18d60090a 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -5341,15 +5341,413 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000DD78.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8000DF8C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 func_802ABE30(f32, ?, void *, f32, u16); /* extern */ +? func_802ADDC8(void *, ?, f32, f32, f32); /* extern */ +s32 func_802B5224(? *, ? *, ? *, u16); /* extern */ +f32 func_802B8018(s32, s32, s32); /* extern */ +f32 func_802B8038(s32, s32, s32, s32); /* extern */ +f32 sqrtf(f32, f32, ? *, ? *); /* extern */ +extern ? D_80162FB0; +extern ? D_80162FC0; +extern ? D_80163DE8; +extern ? D_80164038; +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8000DF8C.s line 162. +void func_8000DF8C(s32 arg0, f32 arg1, s32 arg2, s32 arg3) { + f32 sp118; + f32 sp114; + void *sp110; + f32 sp108; + f32 spF8; + f32 spF0; + u16 spCA; + f32 spC4; + u16 spC2; + f32 spAC; + f32 spA0; + f32 sp94; + f32 sp88; + u16 sp7E; + u16 sp7C; + s32 sp4C; + s32 sp48; + s32 sp44; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f0_5; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f12_3; + f32 temp_f12_4; + f32 temp_f12_5; + f32 temp_f12_6; + f32 temp_f14; + f32 temp_f14_2; + f32 temp_f16; + f32 temp_f16_2; + f32 temp_f18; + f32 temp_f18_2; + f32 temp_f18_3; + f32 temp_f20; + f32 temp_f20_2; + f32 temp_f20_3; + f32 temp_f20_4; + f32 temp_f20_5; + f32 temp_f22; + f32 temp_f22_2; + f32 temp_f22_3; + f32 temp_f24; + f32 temp_f24_2; + f32 temp_f24_3; + f32 temp_f2; + f32 temp_f2_2; + f32 temp_f2_3; + f32 temp_f2_4; + f32 temp_f2_5; + f32 temp_f6; + f64 temp_f10; + f64 temp_f4; + f64 temp_f8; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_a0_4; + s32 temp_a3_2; + s32 temp_t0; + s32 temp_t2; + s32 temp_t2_2; + s32 temp_t4; + s32 temp_t6; + s32 temp_t7; + s32 temp_t7_2; + s32 temp_t9_2; + s32 temp_v0_3; + s8 temp_v1; + u16 temp_a3; + u16 temp_s1; + u16 temp_t9; + u16 temp_v0_5; + void *temp_a0_5; + void *temp_s0; + void *temp_v0; + void *temp_v0_2; + void *temp_v0_4; + void *temp_v0_6; + void *temp_v0_7; + void *temp_v1_2; + void *temp_v1_3; + Player *phi_v0; + s32 phi_a0; + s32 phi_v1; + s32 phi_s1; + s32 phi_a1; + s32 phi_a2; + s32 phi_a3; + f32 phi_f22; + f32 phi_f24; + f32 phi_f20; + s32 phi_s1_2; + f32 phi_f12; + f32 phi_f20_2; + f32 phi_f18; + f32 phi_f22_2; + f32 phi_f24_2; + f32 phi_f20_3; + u16 phi_s1_3; + s32 phi_s1_4; + f32 phi_f6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0x54) + &D_80163DE8; + temp_t9 = temp_s0->unk44; + temp_t2 = temp_t9 & 0xFFFF; + sp4C = temp_t2; + sp7E = temp_t9; + phi_a1 = (bitwise s32) arg1; + phi_a2 = arg2; + phi_a3 = arg3; + if ((temp_t2 != 0) && ((temp_s0->unk4A != 1) || (gCurrentCourseId == 0x14))) { + temp_f22 = temp_s0->unk0; + temp_f20 = temp_s0->unk4; + temp_f24 = temp_s0->unk8; + spCA = temp_s0->unk42; + spC4 = temp_s0->unk3C; + spC2 = temp_s0->unk40; + sp7C = temp_s0->unk46; + temp_s1 = temp_s0->unk48; + phi_s1 = temp_s1; + phi_f22_2 = temp_f22; + phi_f24_2 = temp_f24; + phi_f20_2 = temp_f20; + phi_f22_2 = temp_f22; + phi_f24_2 = temp_f24; + phi_s1_4 = temp_s1; + if ((sp4C != 0) && (sp4C != 4)) { + if (gCurrentCourseId == 0x14) { + if (D_8016347E == 1) { + temp_v0 = D_800DC4E8; + temp_f0 = temp_f22 - temp_v0->unk14; + temp_f2 = temp_f20 - temp_v0->unk18; + temp_f12 = temp_f24 - temp_v0->unk1C; + if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2) + (temp_f12 * temp_f12)) < 25.0f) { + sp7E = 4; + temp_v0->unkC = temp_v0->unkC | 0x400000; + temp_v0->unk0 = temp_v0->unk0 & ~0x2000; + sp4C = 4; + phi_s1 = 0; + phi_a1 = 0x400000; + } + } + } else { + temp_v1 = D_8018EDF3; + phi_a0 = 0; + phi_v1 = temp_v1; + if (temp_v1 > 0) { + phi_v0 = gPlayers; + phi_a2 = 0x80000000; + phi_a3 = 5; + do { + temp_a0 = phi_a0 + 1; + phi_a0 = temp_a0; + if ((phi_v0->unk_0BC & 0x80000000) == 0) { + temp_f0_2 = temp_f22 - phi_v0->posX; + temp_f2_2 = temp_f20 - phi_v0->posY; + temp_f12_2 = temp_f24 - phi_v0->posZ; + if (((temp_f0_2 * temp_f0_2) + (temp_f2_2 * temp_f2_2) + (temp_f12_2 * temp_f12_2)) < 25.0f) { + sp7E = 4; + phi_s1_4 = 0; + if (gCurrentCourseId == 5) { + phi_v0->unk_00C |= 0x1000000; + } else { + phi_v0->unk_00C |= 0x400000; + } + phi_v1 = D_8018EDF3; + } + } + phi_v0 += 0xDD8; + phi_s1 = phi_s1_4; + } while (temp_a0 < phi_v1); + sp4C = sp7E; + phi_a1 = 0x400000; + } + } + } + phi_s1_2 = phi_s1; + phi_s1_2 = phi_s1; + switch (sp4C) { + case 1: + temp_t4 = ((phi_s1 + 0x164) % 360) & 0xFFFF; + temp_t6 = ((temp_t4 * 0xFFFF) / 360) & 0xFFFF; + sp48 = temp_t4; + sp44 = temp_t6; + sp118 = func_802B8038(temp_t6, phi_a1, phi_a2, phi_a3) * 25.0; + temp_f0_3 = func_802B8018(sp44); + temp_v0_2 = D_80164550 + (spCA * 8); + temp_f20_2 = temp_s0->unk50 + 3.5f; + temp_t7 = ((((sp48 + 1) % 360) * 0xFFFF) / 360) & 0xFFFF; + temp_f22_2 = temp_v0_2->unk0 + sp118; + D_80162FB0.unk4 = temp_f20_2; + D_80162FB0.unk0 = temp_f22_2; + sp44 = temp_t7; + sp110 = temp_v0_2; + temp_f24_2 = temp_v0_2->unk4 + (temp_f0_3 * 25.0); + D_80162FB0.unk8 = temp_f24_2; + sp118 = func_802B8038(temp_t7) * 25.0; + temp_f10 = func_802B8018(sp44); + D_80162FC0.unk0 = temp_v0_2->unk0 + sp118; + D_80162FC0.unk4 = temp_v0_2->unk2; + D_80162FC0.unk8 = temp_v0_2->unk4 + (temp_f10 * 25.0); + spC2 = (func_802B5224(&D_80162FB0, &D_80162FC0, &D_80162FB0) * 0xFFFF) / 65520; + phi_s1_2 = temp_t4; + phi_f20_2 = temp_f20_2; + phi_f22_2 = temp_f22_2; + phi_f24_2 = temp_f24_2; + break; + case 2: + temp_v0_3 = ((phi_s1 + 4) % 360) & 0xFFFF; + temp_a0_2 = ((temp_v0_3 * 0xFFFF) / 360) & 0xFFFF; + sp44 = temp_a0_2; + sp48 = temp_v0_3; + sp118 = func_802B8038(temp_a0_2, phi_a1, phi_a2, phi_a3) * 25.0; + temp_v0_4 = D_80164550 + (spCA * 8); + temp_f22_3 = temp_v0_4->unk0 + sp118; + temp_f20_3 = temp_s0->unk50 + 3.5f; + temp_f4 = func_802B8018(temp_a0_2) * 25.0; + temp_a0_3 = ((((sp48 + 1) % 360) * 0xFFFF) / 360) & 0xFFFF; + D_80162FB0.unk0 = temp_f22_3; + D_80162FB0.unk4 = temp_f20_3; + sp44 = temp_a0_3; + sp110 = temp_v0_4; + temp_f24_3 = temp_v0_4->unk4 + temp_f4; + D_80162FB0.unk8 = temp_f24_3; + sp118 = func_802B8038(temp_a0_3) * 25.0; + temp_f8 = func_802B8018(temp_a0_3); + D_80162FC0.unk0 = temp_v0_4->unk0 + sp118; + D_80162FC0.unk4 = temp_v0_4->unk2; + D_80162FC0.unk8 = temp_v0_4->unk4 + (temp_f8 * 25.0); + spC2 = (func_802B5224(&D_80162FB0, &D_80162FC0, &D_80162FB0) * 0xFFFF) / 65520; + phi_s1_2 = temp_v0_3; + phi_f20_2 = temp_f20_3; + phi_f22_2 = temp_f22_3; + phi_f24_2 = temp_f24_3; + default: +block_42: + break; + case 3: + spC2 = 0; + phi_f20_2 = temp_s0->unk50 + 3.5f; + break; + case 5: + if ((D_8016347C == 0) || (D_8016443E < 5)) { + + } else { + temp_v0_5 = func_8000D2B4(temp_f22, temp_f20, (bitwise s32) temp_f24, (bitwise f32) spCA, 4e-45.0f); + temp_a0_4 = temp_v0_5 & 0xFFFF; + spCA = temp_v0_5; + if ((temp_a0_4 < 0) || (D_801645CE < temp_a0_4)) { + spCA = 0; + } + if (spCA < 0x1A) { + temp_a3 = D_801645CE; + temp_t0 = D_8016455C; + temp_v0_6 = (((spCA + 1) % temp_a3) * 8) + temp_t0; + D_80162FB0.unk0 = temp_v0_6->unk0; + temp_v1_2 = (((spCA + 2) % temp_a3) * 8) + temp_t0; + D_80162FB0.unk4 = temp_v0_6->unk2; + D_80162FB0.unk8 = temp_v0_6->unk4; + D_80162FC0.unk0 = temp_v1_2->unk0; + D_80162FC0.unk4 = temp_v1_2->unk2; + D_80162FC0.unk8 = temp_v1_2->unk4; + spC2 = (func_802B5224(&D_80162FB0, &D_80162FC0, &D_80162FB0, temp_a3) * 0xFFFF) / 65520; + } else { + D_80162FB0.unk0 = temp_f22; + D_80162FB0.unk4 = temp_f20; + D_80162FB0.unk8 = temp_f24; + D_80162FC0.unk0 = -2409.197f; + D_80162FC0.unk4 = 0.0f; + D_80162FC0.unk8 = -355.254f; + spC2 = (func_802B5224(&D_80162FB0, &D_80162FC0, &D_80162FB0) * 0xFFFF) / 65520; + } + temp_f14 = ((D_80162FC0.unk0 + D_80162FB0.unk0) * 0.5f) - temp_f22; + spF8 = temp_f14; + temp_f16 = ((D_80162FC0.unk8 + D_80162FB0.unk8) * 0.5f) - temp_f24; + spF0 = temp_f16; + temp_f0_4 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16), temp_f14, &D_80162FC0, &D_80162FB0); + if (temp_f0_4 > 0.01f) { + temp_f2_3 = temp_s0->unk3C; + phi_f22 = temp_f22 + ((temp_f2_3 * temp_f14) / temp_f0_4); + phi_f24 = temp_f24 + ((temp_f2_3 * temp_f16) / temp_f0_4); + } else { + phi_f22 = temp_f22 + (temp_f14 / 5.0f); + phi_f24 = temp_f24 + (temp_f16 / 5.0f); + } + temp_a0_5 = (arg0 << 6) + &D_80164038; + sp48 = temp_a0_5; + temp_f20_4 = func_802ABE30(phi_f22, 0x44FA0000, temp_a0_5, phi_f24, temp_a0_5->unkA) + 3.5f; + phi_f20 = temp_f20_4; + phi_f22_2 = phi_f22; + phi_f24_2 = phi_f24; + if (temp_f20_4 < -1000.0) { + phi_f20 = temp_s0->unk4; + } + func_802ADDC8(temp_a0_5, 0x41200000, phi_f22, phi_f20, phi_f24); + phi_f20_2 = phi_f20; + } + goto block_42; + case 4: + temp_a3_2 = D_80164550; + temp_v0_7 = temp_a3_2 + (spCA * 8); + D_80162FB0.unk0 = temp_v0_7->unk0; + D_80162FB0.unk4 = temp_v0_7->unk2; + D_80162FB0.unk8 = temp_v0_7->unk4; + temp_v1_3 = (((spCA + 1) % D_801645C8) * 8) + temp_a3_2; + D_80162FC0.unk0 = temp_v1_3->unk0; + D_80162FC0.unk4 = temp_v1_3->unk2; + temp_f6 = phi_s1; + D_80162FC0.unk8 = temp_v1_3->unk4; + phi_f6 = temp_f6; + if (phi_s1 < 0) { + phi_f6 = temp_f6 + 4294967296.0f; + } + spC2 = (func_802B5224(&D_80162FB0, &D_80162FC0, &D_80162FB0, temp_a3_2) * 0xFFFF) / 65520; + phi_f20_2 = temp_f20 + (3.0f - (phi_f6 * 0.3f)); + goto block_42; + } + phi_f20_3 = phi_f20_2; + phi_s1_3 = phi_s1_2; + if (sp4C == 4) { + temp_f12_3 = phi_s1_2; + phi_f12 = temp_f12_3; + if (phi_s1_2 < 0) { + phi_f12 = temp_f12_3 + 4294967296.0f; + } + sp4C = (bitwise s32) phi_f12; + temp_t7_2 = (0xFFFF - spC2) & 0xFFFF; + sp108 = 2.0f * phi_f12; + sp48 = temp_t7_2; + sp118 = func_802B8038((bitwise s32) phi_f12, temp_t7_2) * phi_f12; + temp_t9_2 = (phi_s1_2 + 1) & 0xFFFF; + temp_f18 = func_802B8018((bitwise s32) phi_f12, sp48) * phi_f12; + temp_f2_4 = (phi_f20_2 - 2.3f) + (sp108 / 3.0f); + spAC = temp_f2_4; + spA0 = temp_f2_4; + sp94 = temp_f2_4; + sp88 = temp_f2_4; + phi_f18 = temp_f18; + phi_s1_3 = temp_t9_2; + if (temp_t9_2 >= 0x1F) { + sp7E = 0; + phi_f18 = temp_f18; + } + } else { + temp_t2_2 = (0xFFFF - spC2) & 0xFFFF; + sp48 = temp_t2_2; + sp118 = func_802B8038(temp_t2_2) * 1.5f; + temp_f18_2 = func_802B8018(sp48) * 1.5f; + temp_f16_2 = phi_f20_2 - 2.3f; + temp_f12_4 = (sp7C % 3) * 0.15f; + temp_f14_2 = temp_f16_2 - temp_f12_4; + sp114 = temp_f18_2; + temp_f12_5 = temp_f16_2 + temp_f12_4; + spAC = temp_f14_2; + sp94 = temp_f14_2; + spA0 = temp_f12_5; + sp88 = temp_f12_5; + sp4C = sp7C; + temp_f18_3 = temp_f18_2; + temp_f20_5 = phi_f20_2 + func_802B8018((bitwise s32) temp_f12_5, (bitwise s32) temp_f14_2, ((sp7C * 0x13FFEC) / 360) & 0xFFFF); + sp7C = (sp7C + 1) % 18; + phi_f18 = temp_f18_3; + phi_f20_3 = temp_f20_5; + } + temp_f12_6 = -phi_f18; + temp_f0_5 = phi_f18 + sp118; + temp_s0->unkC = (sp118 - phi_f18) + phi_f22_2; + temp_s0->unk18 = temp_f0_5 + phi_f22_2; + temp_s0->unk10 = spAC; + temp_s0->unk14 = temp_f0_5 + phi_f24_2; + temp_f2_5 = -sp118; + temp_s0->unk1C = spA0; + temp_s0->unk20 = (phi_f18 - sp118) + phi_f24_2; + temp_s0->unk24 = (temp_f2_5 - phi_f18) + phi_f22_2; + temp_s0->unk2C = temp_f12_6 + sp118 + phi_f24_2; + temp_s0->unk28 = sp94; + temp_s0->unk30 = temp_f2_5 + phi_f18 + phi_f22_2; + temp_s0->unk0 = phi_f22_2; + temp_s0->unk38 = (temp_f12_6 - sp118) + phi_f24_2; + temp_s0->unk4 = phi_f20_3; + temp_s0->unk8 = phi_f24_2; + temp_s0->unk34 = sp88; + temp_s0->unk42 = spCA; + temp_s0->unk3C = spC4; + temp_s0->unk40 = spC2; + temp_s0->unk44 = sp7E; + temp_s0->unk48 = phi_s1_3; + temp_s0->unk46 = sp7C; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000DF8C.s") #endif @@ -7485,29 +7883,149 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011AE4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80011B14: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80011AB8(u16, u16 *); /* extern */ +? func_80011EC0(s32, u16); /* extern */ +? func_8002AA50(void *, u16, u16 *); /* extern */ +extern ? D_80162EB8; +extern ? D_801630E8; +extern ? D_801631E0; +extern ? D_801632B8; +extern ? D_801632D0; +extern ? D_801632E8; +extern ? D_80163350; +extern ? D_801633F8; +extern ? D_801634FC; +extern ? D_80164438; +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80011B14.s line 55. +void func_80011B14(s32 arg0, void *arg1) { + u16 sp2E; + s32 sp1C; + s16 temp_t1; + s32 temp_t3; + s32 temp_v1; + u16 *temp_a3; + u16 temp_a2; + void *temp_t0; + void *temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = arg0 * 2; + temp_a3 = temp_v1 + &D_801632B8; + temp_a2 = *temp_a3; + temp_t0 = *(&D_80162EB8 + (gCurrentCourseId * 4)); + temp_t6 = (temp_a2 * 8) + temp_t0; + D_801632B0 = temp_t6; + sp2E = *(&D_80164438 + temp_v1); + temp_t1 = temp_t6->unk0; + temp_t3 = temp_t6->unk4; + if ((temp_t1 == -1) && (temp_t6->unk2 == -1)) { + D_801632B0 = temp_t0; + func_80011AB8(temp_a2, temp_a3); + return; + } + if (sp2E == temp_t1) { + *(&D_801632E8 + temp_v1) = 2; + *(&D_801632D0 + temp_v1) = temp_a2; + *temp_a3 = temp_a2 + 1; + switch (temp_t3) { + case 1: + func_80011EC0(arg1->unk7C >> 0x10, sp2E); + return; + case 2: + sp1C = temp_v1; + func_8002AA50(arg1, temp_a2, temp_a3); + arg1->unkBC = arg1->unkBC & ~0x10; + *(&D_801630E8 + temp_v1) = 0; + return; + case 3: + *(&D_801634FC + (arg0 * 0x10)) = 0.0f; + return; + case 4: + *(&D_801634FC + (arg0 * 0x10)) = -0.6f; + return; + case 5: + *(&D_801634FC + (arg0 * 0x10)) = 0.6f; + return; + case 6: + *(&D_80163350 + temp_v1) = 0; + return; + case 7: + *(&D_80163350 + temp_v1) = 1; + return; + case 8: + *(&D_80163350 + temp_v1) = 2; + return; + case 11: + *(&D_80163350 + temp_v1) = 3; + return; + case 9: + *(&D_801633F8 + temp_v1) = 1; + *(&D_801631E0 + temp_v1) = 0; + gPlayers[arg0].unk_0BC &= -0x1001; + return; + case 10: + *(&D_801633F8 + temp_v1) = 0; + /* Duplicate return node #17. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011B14.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80011D48: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_80162EB8; +extern ? D_801630E8; +extern ? D_801632D0; +extern ? D_801632E8; +extern ? D_801634F8; +extern ? D_80164438; +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80011D48.s line 31. +void func_80011D48(s32 arg0, void *arg1) { + s32 temp_a2; + s32 temp_v0; + void *temp_t3; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0 * 2; + temp_t3 = (*(&D_801632D0 + temp_v0) * 8) + *(&D_80162EB8 + (gCurrentCourseId * 4)); + D_801632B0 = temp_t3; + temp_a2 = temp_t3->unk4; + if (*(&D_80164438 + temp_v0) >= temp_t3->unk2) { + switch (temp_a2) { + case 1: + arg1->unkBC = arg1->unkBC & ~0x10; + *(&D_801630E8 + temp_v0) = 0; + *(&D_801632E8 + temp_v0) = 1; + return; + case 3: + case 4: + case 5: + temp_v1 = (arg0 * 0x10) + &D_801634F8; + temp_v1->unk4 = temp_v1->unkC; + *(&D_801632E8 + temp_v0) = 1; + return; + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + *(&D_801632E8 + temp_v0) = 1; + /* Duplicate return node #6. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011D48.s") #endif @@ -11265,15 +11783,99 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80019760.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80019890: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80015314(?, s32); /* extern */ +? func_80015544(?, s32, u16); /* extern */ +? func_80015A9C(?, s32, s16); /* extern */ +? func_800162CC(?, s32, s16); /* extern */ +? func_80016C3C(?, s32); /* extern */ +? func_80017720(?, s32, s16); /* extern */ +? func_80017F10(?, s32, s16); /* extern */ +? func_80018718(?, s32, s16); /* extern */ +? func_80019118(?, s32, s16); /* extern */ +? func_8001969C(?, s32, s16); /* extern */ +extern ? D_80163DD8; +extern ? D_801645B0; +extern ? D_80164668; +extern ? D_80164680; +extern ? D_801646C0; -Unable to determine jump table for jr instruction at func_80019890.s line 38. +void func_80019890(s16 arg0, s32 cameraId) { + void *sp28; + s32 sp24; + u16 *sp20; + Camera *temp_t6; + s32 temp_t0; + u16 *temp_t4; + u16 temp_s1; + u16 temp_t5; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = camera1; + sp28 = temp_t6; + sp28 = &temp_t6[cameraId]; + temp_t6[cameraId].unkAE = arg0; + temp_t0 = cameraId * 2; + temp_t4 = temp_t0 + &D_80164680; + *(&D_801646C0 + temp_t0) = 0; + sp24 = temp_t0; + sp20 = temp_t4; + temp_t5 = *temp_t4; + temp_s1 = *(&D_801645B0 + (arg0 * 2)); + switch (temp_t5) { + case 0: + func_80015314(0, cameraId); + break; + case 2: + func_80015544(0xBF800000, cameraId, temp_s1); + break; + case 3: + func_80015544(0x3F800000, cameraId, temp_s1); + break; + case 6: + func_80015A9C(0xBF19999A, cameraId, temp_s1); + break; + case 7: + func_80015A9C(0x3F19999A, cameraId, temp_s1); + break; + case 4: + func_800162CC(0xBF800000, cameraId, temp_s1); + break; + case 5: + func_800162CC(0x3F800000, cameraId, temp_s1); + break; + case 9: + func_80016C3C(0, cameraId); + break; + case 1: + func_80017720(0, cameraId, temp_s1); + break; + case 14: + func_80017F10(0, cameraId, temp_s1); + break; + case 8: + func_80018718(0, cameraId, temp_s1); + break; + case 12: + func_80019118(0xBF800000, cameraId, temp_s1); + break; + case 13: + func_80019118(0x3F800000, cameraId, temp_s1); + break; + case 15: + func_8001969C(0xBF800000, cameraId, temp_s1); + break; + case 16: + func_8001969C(0x3F800000, cameraId, temp_s1); + break; + default: + func_80015314(0, cameraId); + break; + } + *(&D_80164668 + sp24) = func_8000BD94(sp28->unk0, sp28->unk4, sp28->unk8, temp_s1); + if (*sp20 == 9) { + *(&D_80163DD8 + (cameraId * 4)) = temp_s1; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80019890.s") #endif @@ -11631,15 +12233,44 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001A124.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8001A220: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +u32 random_int(?); /* extern */ +extern ? D_80164680; -Unable to determine jump table for jr instruction at func_8001A220.s line 15. +void func_8001A220(s32 arg0, s32 arg1) { + u32 temp_v0; + s16 phi_t9; + s16 *phi_at; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = random_int(6); + switch (temp_v0) { + case 0: + *(&D_80164680 + (arg1 * 2)) = 4; + return; + case 1: + phi_t9 = 5; + phi_at = &D_80164680 + (arg1 * 2); +block_9: + *phi_at = phi_t9; + return; + case 2: + *(&D_80164680 + (arg1 * 2)) = 6; + return; + case 3: + *(&D_80164680 + (arg1 * 2)) = 7; + return; + case 4: + *(&D_80164680 + (arg1 * 2)) = 8; + return; + case 5: + *(&D_80164680 + (arg1 * 2)) = 1; + return; + default: + phi_t9 = 8; + phi_at = &D_80164680 + (arg1 * 2); + goto block_9; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001A220.s") #endif @@ -11764,15 +12395,193 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001A518.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8001A588: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800151A4(void *, s32); /* extern */ +? func_80015390(void *, u16 *, s8, s32); /* extern */ +? func_8001577C(void *, u16 *, s8, s32); /* extern */ +? func_80015C94(void *, u16 *, s8, s32); /* extern */ +? func_80016494(void *, u16 *, s8, s32); /* extern */ +? func_80017054(void *, u16 *, s8, s32); /* extern */ +? func_800178F4(void *, u16 *, s8, s32); /* extern */ +? func_800180F0(void *, u16 *, s8, s32); /* extern */ +? func_800188F4(void *, u16 *, s8, s32); /* extern */ +? func_8001933C(void *, u16 *, s8, s32); /* extern */ +? func_80019760(void *, u16 *, s8, s32); /* extern */ +? func_80019890(s32, s32); /* extern */ +? func_80019C50(s32); /* extern */ +? func_80019D2C(void *, u16 *, s32, s32); /* extern */ +? func_80019FB4(s32); /* extern */ +? func_8001A124(?, s32, s32); /* extern */ +? func_8001A220(?, s32, s32); /* extern */ +? func_8001A3D8(s32, ?, s16, s32); /* extern */ +? func_8001A450(s32, s32, s32, s32); /* extern */ +? func_8001A518(s32, s32, ?, s32); /* extern */ +extern ? D_801643B8; +extern ? D_80164680; +extern ? D_801646C0; +extern ? D_801646D0; -Unable to determine jump table for jr instruction at func_8001A588.s line 282. +void func_8001A588(s32 arg0, void *arg1, u16 *arg2, s8 arg3, s32 cameraId) { + s32 sp44; + s16 *sp24; + f64 temp_f0; + f64 temp_f2; + s16 *temp_t8; + s16 temp_v0_7; + s16 temp_v1; + s32 temp_s0; + s32 temp_v0; + s32 temp_v0_2; + s32 temp_v1_2; + u16 temp_t3; + u16 temp_v0_3; + u32 temp_t1; + u32 temp_t4; + u32 temp_v0_5; + u32 temp_v0_6; + void *temp_v0_4; + s32 phi_s0; + u32 *phi_t0; + s32 phi_s0_2; + s32 phi_s0_3; + s32 phi_v1; + s32 phi_a3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_s0 = arg1->unkAE; + if (gModeSelection == 1) { + phi_s0 = 0; + } + func_80019FB4(cameraId); + temp_f0 = arg1->unk0; + phi_s0_2 = phi_s0; + if ((temp_f0 * 10.0) == (arg1->unkC * 10.0)) { + temp_f2 = arg1->unk8; + if ((temp_f2 * 10.0) == (arg1->unk14 * 10.0)) { + arg1->unk0 = temp_f0 + 100.0; + arg1->unk8 = temp_f2 + 100.0; + } + } + temp_v0 = gModeSelection; + if ((temp_v0 != 3) && (*(&D_80164680 + (cameraId * 2)) == -1) && ((*arg2 & 0x800) != 0) && (D_801646CC == 0) && (D_801646C8 == 0)) { + if (temp_v0 == 2) { + func_8001A220(0, phi_s0, cameraId); + } else { + func_8001A124(0, phi_s0, cameraId); + } + func_80019890(phi_s0, cameraId); + } + temp_v0_2 = cameraId * 2; + temp_t8 = temp_v0_2 + &D_80164680; + sp24 = temp_t8; + temp_v1 = *temp_t8; + if ((temp_v1 == 0xE) || (temp_v1 == 0)) { + func_80019D2C(arg1, arg2, cameraId, cameraId); + } else { + *(&D_801646C0 + temp_v0_2) = 0; + func_800151A4(arg1, cameraId); + } + temp_v0_3 = D_801646CC; + phi_t0 = &D_801646C8; + phi_a3 = cameraId; + if (temp_v0_3 != 1) { + if (temp_v0_3 != 2) { + temp_v0_4 = (cameraId * 8) + &D_801646D0; + if (temp_v0_4->unk0 == 1) { + temp_v0_4->unk0 = 0; + *(&cameras->unkAE + (cameraId * 0xB8)) = temp_v0_4->unk4; + func_8001A3D8(cameraId, 0, temp_v0_4->unk2, cameraId); + goto block_47; + } + } else { + temp_t4 = D_801646C8 + 1; + D_801646C8 = temp_t4; + if (temp_t4 >= 0xFB) { + D_801646C8 = 0; + } + if ((cameraId == 0) && (D_801646C8 == 0xA)) { + func_8001A450(phi_s0, cameraId, phi_s0, cameraId); + goto block_47; + } + } + } else { + temp_t1 = D_801646C8 + 1; + D_801646C8 = temp_t1; + if (temp_t1 >= 0x1F5) { + D_801646C8 = 0; + } + if ((cameraId == 0) && ((temp_v0_5 = D_801646C8, (temp_v0_5 == 0xA)) || (temp_v0_5 == 0xB))) { + func_8001A518(phi_s0, *(&D_801643B8 + (phi_s0 * 4)), 0, cameraId); + phi_t0 = &D_801646C8; + } + phi_a3 = cameraId; + if ((gModeSelection != 1) && (cameraId == 1) && ((temp_v0_6 = *phi_t0, (temp_v0_6 == 0x104)) || (temp_v0_6 == 0x105))) { + phi_v1 = 0; + if (D_8018EDF3 == 2) { + func_8001A518(phi_s0, *(&D_801643B8 + (phi_s0 * 4)), 1, cameraId); + } else { + sp44 = phi_s0; +loop_34: + temp_s0 = phi_s0_2 + 1; + temp_v1_2 = phi_v1 + 1; + phi_s0_3 = temp_s0; + phi_v1 = temp_v1_2; + if (temp_s0 >= 8) { + phi_s0_3 = 1; + } + temp_v0_7 = gPlayers[phi_s0_3].unk_0CA; + phi_s0_2 = phi_s0_3; + if ((((temp_v0_7 & 2) != 0) || ((temp_v0_7 & 8) != 0)) && (temp_v1_2 != 8)) { + goto loop_34; + } + func_8001A450(sp44, cameraId, phi_s0_3, cameraId); + } +block_47: + phi_a3 = cameraId; + } + } + func_80019C50(phi_a3); + temp_t3 = *sp24; + switch (temp_t3) { + case 0: + func_80015390(arg1, arg2, arg3, cameraId); + return; + case 2: + case 3: + func_8001577C(arg1, arg2, arg3, cameraId); + return; + case 6: + case 7: + func_80015C94(arg1, arg2, arg3, cameraId); + return; + case 4: + case 5: + func_80016494(arg1, arg2, arg3, cameraId); + return; + case 9: + func_80017054(arg1, arg2, arg3, cameraId); + return; + case 1: + func_800178F4(arg1, arg2, arg3, cameraId); + return; + case 14: + func_800180F0(arg1, arg2, arg3, cameraId); + return; + case 8: + func_800188F4(arg1, arg2, arg3, cameraId); + return; + case 12: + case 13: + func_8001933C(arg1, arg2, arg3, cameraId); + return; + case 15: + case 16: + func_80019760(arg1, arg2, arg3, cameraId); + return; + default: + func_80015390(arg1, arg2, arg3, cameraId); + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001A588.s") #endif @@ -11835,15 +12644,35 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001AB00.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8001AB74: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8001AB74(s32 arg0, s16 *arg1, s32 arg2) { + s32 phi_v0; -Unable to determine jump table for jr instruction at func_8001AB74.s line 11. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_v0 = -1; + switch (arg2) { + case 9: + phi_v0 = 0xD; + break; + case 11: + phi_v0 = 0x1B; + break; + case 1: + phi_v0 = 1; + break; + case 8: + phi_v0 = 0x16; + break; + case 10: + phi_v0 = 0x19; + break; + case 12: + phi_v0 = 0x1D; + break; + } + if (phi_v0 >= 0) { + *arg1 = phi_v0; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001AB74.s") #endif @@ -11873,15 +12702,507 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001ABEC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8001AC10: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80007BF8(u16, u16, ?, ?, s32); /* extern */ +? func_8001AB74(s32, void *, s32); /* extern */ +? func_8001ABE0(s32, void *); /* extern */ +? func_8001ABEC(void *, s16); /* extern */ +s32 func_8007AF78(s16, s16, ? *); /* extern */ +? func_8009E5BC(); /* extern */ +? func_800C92CC(s32, ?, s32, void *); /* extern */ +? func_800C98B8(u16 *, u16 *, ?); /* extern */ +? func_800CAC60(s32); /* extern */ +? func_800CAD40(u8, s16); /* extern */ +? func_802A1064(void *, s16); /* extern */ +? func_802B0648(void *, s32, s32, void *); /* extern */ +s16 func_802B2D70(u16 *, s16, ? *); /* extern */ +? func_802B2EBC(u16 *, s16); /* extern */ +s32 random_int(?, s16); /* extern */ +extern ? D_8015F9B8; +extern ? D_801631E0; +extern ? D_801642D8; +extern ? D_801643B8; +extern ? D_80164438; +extern ? D_80164450; +extern ? D_80164550; +extern ? D_801645C8; -Unable to determine jump table for jr instruction at func_8001AC10.s line 39. +void func_8001AC10(s32 playerId, s32 *arg2) { + u16 *sp2C; + void *sp28; + s16 temp_a1; + s16 temp_a2; + s16 temp_v1_2; + s16 temp_v1_3; + s16 temp_v1_4; + s16 temp_v1_5; + s16 temp_v1_6; + s16 temp_v1_7; + s16 temp_v1_8; + s16 temp_v1_9; + s32 temp_a0; + s32 temp_t7; + s32 temp_v0; + s32 temp_v1; + u16 *temp_t9; + u16 temp_v0_2; + void *temp_a3; + void *temp_a3_10; + void *temp_a3_11; + void *temp_a3_12; + void *temp_a3_13; + void *temp_a3_2; + void *temp_a3_3; + void *temp_a3_4; + void *temp_a3_5; + void *temp_a3_6; + void *temp_a3_7; + void *temp_a3_8; + void *temp_a3_9; + void *temp_s0; + void *temp_v0_3; + s32 phi_v1; + s16 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t9 = (playerId * 0xDD8) + D_800DC4DC; + sp2C = temp_t9; + if ((gModeSelection != 1) && (D_801646CC != 1) && ((*temp_t9 & 0x800) == 0)) { + temp_s0 = (playerId * 0x10) + &D_801642D8; + temp_a1 = temp_s0->unk0; + switch (temp_a1) { /* switch 1 */ + case 0: /* switch 1 */ + temp_s0->unk2 = -1; + temp_v0 = playerId * 4; + if ((((playerId * 0x14) + 0x64) < *(&D_80164450 + temp_v0)) && (temp_s0->unk4 >= 0x259) && (temp_s0->unk6 < 3) && (temp_v1 = lapCount[playerId], ((temp_v1 < 3) != 0))) { + func_8001AB74(playerId, temp_s0, func_8007AF78(temp_v1, (&D_801643B8 + temp_v0)->unk2, &D_801643B8)); + } else { + func_8001ABE0(playerId, temp_s0); + } + default: /* switch 1 */ +block_194: + break; + case 1: /* switch 1 */ + if ((lapCount[playerId] > 0) && (temp_v1_2 = D_80163478, temp_a0 = *(&D_801643B8 + (temp_v1_2 * 4)), ((temp_a0 < *(&D_801643B8 + (playerId * 4))) != 0)) && (temp_a0 == 0)) { + temp_v0_2 = sp2C->unk254; + if (temp_v0_2 != 4) { + if (temp_v0_2 != 6) { + if (func_80007BF8(*(&D_80164438 + (playerId * 2)), *(&D_80164438 + (temp_v1_2 * 2)), 0xA, 2, D_80164430) > 0) { + temp_s0->unk0 = 0x22; + } + } else if (func_80007BF8(*(&D_80164438 + (playerId * 2)), *(&D_80164438 + (temp_v1_2 * 2)), 4, 2, D_80164430) > 0) { + temp_s0->unk0 = 0x22; + } + } else if (func_80007BF8(*(&D_80164438 + (playerId * 2)), *(&D_80164438 + (temp_v1_2 * 2)), 0x28, 2, D_80164430) > 0) { + temp_s0->unk0 = 0x22; + } + } else if (temp_a1 == 1) { + temp_s0->unk2 = func_802B2D70(sp2C, temp_a1, &D_801643B8); + temp_v1_3 = temp_s0->unk2; + if ((temp_v1_3 >= 0) && (temp_v1_3 < 0x64)) { + sp2C->unkC = sp2C->unkC | 0x40000; + temp_s0->unk0 = 2; + temp_s0->unk4 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + temp_s0->unkE = (random_int(3) * 0x14) + 0xA; + } else { + temp_s0->unk0 = 0; + temp_s0->unk4 = 0; + } + } + goto block_194; + case 2: /* switch 1 */ + temp_a3 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3->unk2 & 0x8000) == 0) || (temp_a3->unk0 != 6) || (temp_a3->unk6 != 0) || (playerId != temp_a3->unk10)) { + temp_s0->unk0 = 0; + temp_s0->unk4 = 0; + sp2C->unkC = sp2C->unkC & 0xFFFBFFFF; + goto block_194; + } + if (temp_s0->unkE < temp_s0->unk4) { + temp_s0->unk0 = 3; + goto block_194; + } + break; + case 3: /* switch 1 */ + temp_a3_2 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_2->unk2 & 0x8000) == 0) || (temp_a3_2->unk0 != 6) || (temp_a3_2->unk6 != 0) || (playerId != temp_a3_2->unk10)) { + if (playerId != temp_a3_2->unk10) { + + } + } else { + temp_a3_2->unk6 = 1; + temp_a3_2->unk24 = 0.0f; + temp_a3_2->unk28 = 0.0f; + temp_a3_2->unk2C = 0.0f; + if (*(&D_801631E0 + (playerId * 2)) == 1) { + sp28 = temp_a3_2; + temp_a3_2->unk1C = func_802AE1C0(sp2C->unk14, sp2C->unk18 + 30.0, (bitwise s16) sp2C->unk1C, (bitwise f32) temp_a3_2) + (temp_a3_2->unkC + 1.0f); + } + } + sp2C->unkC = sp2C->unkC & 0xFFFBFFFF; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + case 34: /* switch 1 */ + temp_s0->unk2 = func_802B2D70(sp2C, temp_a1); + temp_v1_4 = temp_s0->unk2; + if ((temp_v1_4 >= 0) && (temp_v1_4 < 0x64)) { + temp_a3_3 = (temp_v1_4 * 0x70) + &D_8015F9B8; + temp_a3_3->unk6 = 4; + sp2C->unkC = sp2C->unkC | 0x40000; + temp_s0->unk0 = 0x23; + temp_s0->unk4 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + temp_a2 = D_80163478; + temp_t7 = temp_a2 * 2; + temp_v0_3 = (((*(&D_80164438 + temp_t7) + 0x1E) % *(&D_801645C8 + ((&D_801645B0)[temp_a2] * 2))) * 8) + *(&D_80164550 + (D_801645B0 * 4)); + temp_a3_3->unk24 = (temp_v0_3->unk0 - sp2C->unk14) / 20.0; + temp_a3_3->unk28 = ((temp_v0_3->unk2 - sp2C->unk18) / 20.0) + 4.0; + temp_a3_3->unk2C = (temp_v0_3->unk4 - sp2C->unk1C) / 20.0; + temp_a3_3->unk1C = sp2C->unk18; + func_800C92CC(playerId & 0xFF, 0x29008009, temp_t7, temp_a3_3); + func_800C98B8(sp2C + 0x14, sp2C + 0x34, 0x19018014); + } else { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + } + goto block_194; + case 35: /* switch 1 */ + temp_a3_4 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_4->unk2 & 0x8000) == 0) || (temp_a3_4->unk0 != 6) || (temp_a3_4->unk6 != 4) || (playerId != temp_a3_4->unk10)) { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + sp2C->unkC = sp2C->unkC & 0xFFFBFFFF; + goto block_194; + } + temp_a3_4->unk18 = temp_a3_4->unk18 + temp_a3_4->unk24; + temp_a3_4->unk28 = temp_a3_4->unk28 - 0.4; + temp_a3_4->unk20 = temp_a3_4->unk20 + temp_a3_4->unk2C; + temp_a3_4->unk1C = temp_a3_4->unk1C + temp_a3_4->unk28; + if (temp_s0->unk4 >= 0x15) { + temp_s0->unk0 = 0x24; + goto block_194; + } + break; + case 36: /* switch 1 */ + temp_a3_5 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_5->unk2 & 0x8000) == 0) || (temp_a3_5->unk0 != 6) || (temp_a3_5->unk6 != 4) || (playerId != temp_a3_5->unk10)) { + if (playerId != temp_a3_5->unk10) { + + } + } else { + temp_a3_5->unk6 = 1; + temp_a3_5->unk24 = 0.0f; + temp_a3_5->unk28 = 0.0f; + temp_a3_5->unk2C = 0.0f; + sp28 = temp_a3_5; + temp_a3_5->unk1C = func_802AE1C0(temp_a3_5->unk18, temp_a3_5->unk1C + 30.0, temp_a3_5->unk20, (bitwise f32) temp_a3_5) + (temp_a3_5->unkC + 1.0f); + } + sp2C->unkC = sp2C->unkC & 0xFFFBFFFF; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + case 4: /* switch 1 */ + if (D_80150110 < 0x50) { + temp_s0->unk2 = func_802B1C9C(sp2C, temp_a1); + temp_v1_5 = temp_s0->unk2; + if ((temp_v1_5 >= 0) && (temp_v1_5 < 0x64)) { + temp_s0->unk0 = 5; + temp_s0->unk4 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + temp_s0->unkE = (random_int(3) * 0x14) + 0xA; + } else { + goto block_71; + } + } else { +block_71: + temp_s0->unk0 = 0; + } + goto block_194; + case 5: /* switch 1 */ + temp_a3_6 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_6->unk2 & 0x8000) == 0) || (temp_a3_6->unk0 != 7) || (temp_a3_6->unk6 != 0) || (playerId != temp_a3_6->unk14)) { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + } + if (temp_s0->unkE < temp_s0->unk4) { + temp_s0->unk4 = 0; + temp_s0->unk0 = 6; + goto block_194; + } + break; + case 6: /* switch 1 */ + temp_a3_7 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_7->unk2 & 0x8000) == 0) || (temp_a3_7->unk0 != 7) || (temp_a3_7->unk6 != 0) || (playerId != temp_a3_7->unk14)) { + temp_s0->unk0 = 0; + temp_s0->unk4 = 0; + } else { + temp_a3_7->unk6 = 1; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + } + goto block_194; + case 7: /* switch 1 */ + if (D_80150110 < 0x50) { + temp_s0->unk2 = func_802B1E48(sp2C, temp_a1); + temp_v1_6 = temp_s0->unk2; + if ((temp_v1_6 >= 0) && (temp_v1_6 < 0x64)) { + temp_s0->unk0 = 8; + temp_s0->unk4 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + temp_s0->unkE = (random_int(3) * 0x14) + 0xA; + } else { + goto block_92; + } + } else { +block_92: + temp_s0->unk0 = 0; + } + goto block_194; + case 8: /* switch 1 */ + temp_a3_8 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_8->unk2 & 0x8000) == 0) || (temp_a3_8->unk0 != 8) || (temp_a3_8->unk6 != 0) || (playerId != temp_a3_8->unk14)) { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + } + if (temp_s0->unkE < temp_s0->unk4) { + temp_s0->unk0 = 9; + goto block_194; + } + break; + case 9: /* switch 1 */ + func_8001ABEC(temp_s0, temp_a1); + temp_a3_9 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_9->unk2 & 0x8000) == 0) || (temp_a3_9->unk0 != 8) || (temp_a3_9->unk6 != 0) || (playerId != temp_a3_9->unk14)) { + temp_s0->unk0 = 0; + temp_s0->unk4 = 0; + } else { + temp_a3_9->unk6 = 1; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + } + goto block_194; + case 10: /* switch 1 */ + if (D_80150110 < 0x50) { + temp_s0->unk2 = func_802B17F4(sp2C, temp_a1); + temp_v1_7 = temp_s0->unk2; + if ((temp_v1_7 >= 0) && (temp_v1_7 < 0x64)) { + temp_s0->unk0 = 0xB; + temp_s0->unk4 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + temp_s0->unkE = (random_int(3) * 0x14) + 0x3C; + } else { + goto block_113; + } + } else { +block_113: + temp_s0->unk0 = 0; + } + goto block_194; + case 11: /* switch 1 */ + temp_a3_10 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (temp_a3_10->unk6 == 6) { + phi_v1 = 0; + if (temp_a3_10->unk1A != -1) { + phi_v1 = 1; + } + if (temp_a3_10->unk18 != -1) { + phi_v1 = 1; + } + if (temp_a3_10->unk16 != -1) { + phi_v1 = 1; + } + if (temp_a3_10->unk14 != -1) { + phi_v1 = 1; + } + if (temp_a3_10->unk12 != -1) { + phi_v1 = 1; + } + if ((temp_a3_10->unk0 != 0xE) || (phi_v1 == 0)) { + temp_s0->unk0 = 0; + goto block_131; + } + if (temp_s0->unkE < temp_s0->unk4) { + temp_s0->unk0 = 0xC; + temp_s0->unk8 = 0; +block_131: + temp_s0->unk4 = 0; + } + } + goto block_194; + case 12: /* switch 1 */ + if ((temp_s0->unk4 % 10) == 0) { + temp_v1_8 = temp_s0->unk8; + if (temp_v1_8 < 5) { + temp_a3_11 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + phi_v0 = 0; + switch (temp_v1_8) { /* switch 2 */ + case 0: /* switch 2 */ + if (temp_a3_11->unk1A != -1) { +block_146: + phi_v0 = 1; + } + break; + case 1: /* switch 2 */ + if (temp_a3_11->unk18 != -1) { + goto block_146; + } + break; + case 2: /* switch 2 */ + if (temp_a3_11->unk16 != -1) { + goto block_146; + } + break; + case 3: /* switch 2 */ + if (temp_a3_11->unk14 != -1) { + goto block_146; + } + break; + case 4: /* switch 2 */ + if (temp_a3_11->unk12 != -1) { + goto block_146; + } + break; + } + if ((temp_a3_11->unk0 == 0xE) && (temp_a3_11->unk6 == 6) && (phi_v0 == 1)) { + func_802B0648(temp_a3_11, 0xE, 6, temp_a3_11); + } + temp_s0->unk8 = temp_s0->unk8 + 1; + } else { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + } + goto block_194; + } + break; + case 13: /* switch 1 */ + temp_s0->unk2 = func_802B2C40(sp2C, temp_a1); + temp_v1_9 = temp_s0->unk2; + if ((temp_v1_9 >= 0) && (temp_v1_9 < 0x64)) { + temp_s0->unk0 = 0xE; + temp_s0->unk4 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + temp_s0->unkE = (random_int(3, 0xE) * 0x14) + 0xA; + } else { + temp_s0->unk0 = 0; + } + goto block_194; + case 14: /* switch 1 */ + temp_a3_12 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_12->unk2 & 0x8000) == 0) || (temp_a3_12->unk0 != 0xD) || (temp_a3_12->unk6 != 0) || (playerId != temp_a3_12->unk24)) { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + } + if (temp_s0->unkE < temp_s0->unk4) { + temp_s0->unk0 = 0xF; + goto block_194; + } + break; + case 15: /* switch 1 */ + temp_a3_13 = (temp_s0->unk2 * 0x70) + &D_8015F9B8; + if (((temp_a3_13->unk2 & 0x8000) == 0) || (temp_a3_13->unk0 != 0xD) || (temp_a3_13->unk6 != 0) || (playerId != temp_a3_13->unk24)) { + if (playerId != temp_a3_13->unk10) { + + } + } else { + sp28 = temp_a3_13; + func_802A1064(temp_a3_13, temp_a1); + if (*(&D_801631E0 + (playerId * 2)) == 1) { + sp28 = temp_a3_13; + temp_a3_13->unk1C = func_802AE1C0(temp_a3_13->unk18, temp_a3_13->unk1C + 30.0, temp_a3_13->unk20, (bitwise f32) temp_a3_13) + temp_a3_13->unkC; + } + } + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + case 22: /* switch 1 */ + func_802B2EBC(sp2C, temp_a1); + func_800CAC60(playerId & 0xFF); + func_8009E5BC(); + temp_s0->unk4 = 0; + temp_s0->unk0 = 0x17; + temp_s0->unk6 = temp_s0->unk6 + 1; + goto block_194; + case 23: /* switch 1 */ + if (temp_s0->unk4 >= 0xF1) { + func_800CAD40(playerId, temp_a1); + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + goto block_194; + } + break; + case 25: /* switch 1 */ + sp2C->unkC = sp2C->unkC | 0x2000; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0x1A; + temp_s0->unk6 = temp_s0->unk6 + 1; + goto block_194; + case 26: /* switch 1 */ + if ((sp2C->unkBC & 0x200) == 0) { + temp_s0->unk0 = 0; + } + temp_s0->unk4 = 0; + goto block_194; + case 27: /* switch 1 */ + sp2C->unkC = sp2C->unkC | 0x800; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0x1C; + temp_s0->unk6 = temp_s0->unk6 + 1; + goto block_194; + case 28: /* switch 1 */ + if ((sp2C->unkBC << 0) >= 0) { + temp_s0->unk0 = 0; + } + temp_s0->unk4 = 0; + goto block_194; + case 29: /* switch 1 */ + sp2C->unkC = sp2C->unkC | 0x200; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + temp_s0->unk6 = temp_s0->unk6 + 1; + goto block_194; + case 30: /* switch 1 */ + if (temp_s0->unk4 >= 0x3D) { + sp2C->unkC = sp2C->unkC | 0x200; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0x1D; + goto block_194; + } + break; + case 31: /* switch 1 */ + if (temp_s0->unk4 >= 0x3D) { + sp2C->unkC = sp2C->unkC | 0x200; + temp_s0->unk4 = 0; + temp_s0->unk0 = 0x1E; + goto block_194; + } + break; + case 32: /* switch 1 */ + temp_s0->unk4 = 0; + temp_s0->unk0 = 0x21; + temp_s0->unkE = 0x258; + goto block_194; + case 33: /* switch 1 */ + if ((temp_s0->unk4 % 60) == 0) { + sp2C->unkC = sp2C->unkC | 0x200; + if (temp_s0->unkE < temp_s0->unk4) { + temp_s0->unk4 = 0; + temp_s0->unk0 = 0; + } + } + break; + } + if (temp_s0->unk4 < 0x2710) { + temp_s0->unk4 = temp_s0->unk4 + 1; + } + if ((sp2C->unkBC & 0x80002200) != 0) { + temp_s0->unk4 = 0; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001AC10.s") #endif diff --git a/src/code_8001C4D0.c b/src/code_8001C4D0.c index e8eb98572..c5317521e 100644 --- a/src/code_8001C4D0.c +++ b/src/code_8001C4D0.c @@ -22,15 +22,204 @@ extern Player *D_800DC4E8; #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8001C4D0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80014DE4(s32, s32, s32, Camera *); /* extern */ +? func_802B7F7C(Camera *, f32 *, s16 *, Camera *); /* extern */ +extern ? D_80150130; +extern ? D_80152300; +extern ? D_80164498; +extern ? D_80164678; +extern ? D_801649D8; +extern ? D_801649E8; +extern ? D_801649F8; +extern ? D_80164A08; +extern ? D_80164A18; +extern ? D_80164A38; +extern ? D_80164A48; +extern ? D_80164A78; +extern ? D_80164A90; +extern ? D_80164AA0; +static ? D_800DDB30; /* unable to generate initializer */ +static s32 D_800ED50C = 0x4139999A; /* const */ +static s32 D_800ED510 = 0x4199999A; /* const */ +static s32 D_800ED514 = 0x4139999A; /* const */ +static s32 D_800ED518 = 0x4199999A; /* const */ +static s32 D_800ED51C = 0x4119999A; /* const */ +static s32 D_800ED520 = 0x4139999A; /* const */ +static s32 D_800ED524 = 0x4199999A; /* const */ -Unable to determine jump table for jr instruction at func_8001C4D0.s line 21. +void func_8001C4D0(f32 x, f32 y, f32 z, s16 rot, u32 arg4, s32 cameraId) { + void *sp30; + s32 sp2C; + s32 sp28; + f32 *sp24; + f32 *sp20; + f32 *sp1C; + f32 *temp_t1; + f32 *temp_t2; + f32 *temp_t3; + f32 *temp_v0_2; + f32 *temp_v0_3; + f32 *temp_v0_4; + f32 *temp_v0_5; + s16 *temp_a0; + s32 temp_t6; + s32 temp_t6_2; + s32 temp_v0; + void *temp_v1; + f32 *phi_v0; + s16 phi_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = cameraId * 2; + *(&D_80152300 + temp_t6) = arg4; + switch (arg4) { + case 0: + case 1: + case 3: + case 8: + case 9: + case 10: + D_80164A89 = 0; + cameras[cameraId].posX = x; + cameras[cameraId].posY = y; + cameras[cameraId].posZ = z; + cameras[cameraId].rotZ = 0; + cameras[cameraId].unk2 = 150.0f; + cameras[cameraId].unk1 = y - 3.0; + cameras[cameraId].unk = 0.0f; + cameras[cameraId].angleX = 0.0f; + cameras[cameraId].angleZ = 0.0f; + cameras[cameraId].angleY = 1.0f; + cameras[cameraId].unkB0 = 0; + cameras[cameraId].unk25 = (bitwise s32) 0.0f; + cameras[cameraId].unkAE = cameraId; + temp_t6_2 = cameraId * 4; + *(&D_801649D8 + temp_t6_2) = 20.0f; + *(&D_801649E8 + temp_t6_2) = 10.0f; + *(&D_801649F8 + temp_t6_2) = 7.0f; + D_80164A2C = 0; + D_80164A30 = 30.0f; + temp_t1 = temp_t6_2 + &D_80164A38; + temp_t2 = temp_t6_2 + &D_80164A48; + *temp_t1 = 0.0f; + *temp_t2 = 0.0f; + *(&D_80164A90 + temp_t6_2) = 0.0f; + *(&D_80164AA0 + temp_t6_2) = 0.0f; + temp_t3 = temp_t6_2 + &D_80164A78; + *temp_t3 = *(&D_800DDB30 + (D_800DC52C * 4)); + *(&D_80164A18 + temp_t6_2) = 0; + *(&D_80164A08 + temp_t6_2) = 0; + *(&D_80164498 + temp_t6_2) = 0.0f; + cameras[cameraId].unk24_and_a_half = 0; + cameras[cameraId].unk22 = 0.0f; + temp_v1 = D_800DC4DC + (cameraId * 0xDD8); + cameras[cameraId].unk2C = temp_v1->unk2E; + cameras[cameraId].unk28 = temp_v1->unk2E; + temp_v0 = D_800DC52C; + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 2) { + if (temp_v0 != 3) { + + } else if (gModeSelection == 3) { + cameras[cameraId].unk4 = (bitwise s32) 0.0f; + cameras[cameraId].unk7 = (bitwise s32) 0.0f; + cameras[cameraId].unk8 = (bitwise s32) 0.0f; + cameras[cameraId].unk5 = 0x4139999A; + cameras[cameraId].unk6 = -0x3DE60000; + cameras[cameraId].unk9 = 0x4199999A; + } else { + cameras[cameraId].unk4 = (bitwise s32) 0.0f; + cameras[cameraId].unk7 = (bitwise s32) 0.0f; + cameras[cameraId].unk8 = (bitwise s32) 0.0f; + cameras[cameraId].unk5 = 0x41100000; + cameras[cameraId].unk6 = -0x3DE00000; + cameras[cameraId].unk9 = 0x41900000; + } + } else { + goto block_7; + } + } else if (gModeSelection == 3) { + cameras[cameraId].unk4 = (bitwise s32) 0.0f; + cameras[cameraId].unk7 = (bitwise s32) 0.0f; + cameras[cameraId].unk8 = (bitwise s32) 0.0f; + cameras[cameraId].unk5 = 0x4139999A; + cameras[cameraId].unk6 = -0x3DE60000; + cameras[cameraId].unk9 = 0x4199999A; + } else { + cameras[cameraId].unk4 = (bitwise s32) 0.0f; + cameras[cameraId].unk7 = (bitwise s32) 0.0f; + cameras[cameraId].unk8 = (bitwise s32) 0.0f; + cameras[cameraId].unk9 = (bitwise s32) 30.0f; + cameras[cameraId].unk5 = 0x4119999A; + cameras[cameraId].unk6 = -0x3DF40000; + } + } else { +block_7: + if (gModeSelection == 3) { + cameras[cameraId].unk4 = (bitwise s32) 0.0f; + cameras[cameraId].unk7 = (bitwise s32) 0.0f; + cameras[cameraId].unk8 = (bitwise s32) 0.0f; + cameras[cameraId].unk5 = 0x4139999A; + cameras[cameraId].unk6 = -0x3DE60000; + cameras[cameraId].unk9 = 0x4199999A; + D_80164A88 = 0; + } else { + cameras[cameraId].unk4 = (bitwise s32) 0.0f; + cameras[cameraId].unk7 = (bitwise s32) 0.0f; + cameras[cameraId].unk8 = (bitwise s32) 0.0f; + cameras[cameraId].unk5 = 0x41180000; + cameras[cameraId].unk6 = -0x3DB80000; + cameras[cameraId].unk9 = 0x428C0000; + } + } + sp28 = temp_t6_2; + sp2C = temp_t6; + sp30 = &cameras[cameraId]; + sp24 = temp_t1; + sp20 = temp_t2; + sp1C = temp_t3; + func_80014DE4(cameraId, temp_t6_2, temp_t6, &cameras[cameraId]); + temp_a0 = temp_t6 + &D_80164678; + if (*temp_a0 == 0) { + if (D_80164A28 == 1) { + temp_v0_2 = temp_t6_2 + &D_80150130; + *temp_v0_2 = 80.0f; + phi_v0 = temp_v0_2; + } else { + temp_v0_3 = temp_t6_2 + &D_80150130; + *temp_v0_3 = 40.0f; + phi_v0 = temp_v0_3; + } + cameras[cameraId].unk30 = *phi_v0; + } + phi_v1 = *temp_a0; + if (*temp_a0 == 1) { + temp_v0_4 = temp_t6_2 + &D_80150130; + if (D_80164A28 == 1) { + *temp_v0_4 = 100.0f; + } else { + *temp_v0_4 = 60.0f; + } + cameras[cameraId].unk30 = *temp_v0_4; + phi_v1 = *temp_a0; + } + if (phi_v1 == 2) { + temp_v0_5 = temp_t6_2 + &D_80150130; + if (D_80164A28 == 1) { + *temp_v0_5 = 100.0f; + } else { + *temp_v0_5 = 60.0f; + } + cameras[cameraId].unk30 = *temp_v0_5; + *temp_t1 = 20.0f; + *temp_t2 = 1.5f; + *temp_t3 = 1.0f; + } + break; + } + func_802B7F7C(&cameras[cameraId], &cameras[cameraId].unk, &cameras[cameraId].rotX, &cameras[cameraId]); +} #else GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001C4D0.s") #endif @@ -1191,15 +1380,188 @@ GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001EE98.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8001F394: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(f32, f32 *, ?, ?, s32); /* extern */ +extern ? D_80164498; +extern ? D_80164A08; -Unable to determine jump table for jr instruction at func_8001F394.s line 94. +void func_8001F394(Player *player, f32 *arg1) { + s32 playerId; + s32 sp1C; + f32 *temp_a0; + f32 *temp_a0_2; + f32 *temp_a0_3; + f32 *temp_a0_4; + f32 *temp_a0_5; + f32 *temp_a0_6; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f0_5; + f32 temp_f0_6; + s32 *temp_v1; + s32 temp_t3; + s32 temp_v0; + s32 temp_v0_2; + s32 temp_v0_3; + s32 temp_v0_4; + s32 temp_v0_5; + f32 *phi_a0; + f32 phi_f2; + f32 phi_f0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (player == D_800DC4DC) { + playerId = 0; + } + if (player == D_800DC4E0) { + playerId = 1; + } + if (player == D_800DC4E4) { + playerId = 2; + } + if (player == D_800DC4E8) { + playerId = 3; + } + temp_t3 = playerId * 4; + temp_v1 = temp_t3 + &D_80164A08; + if (*temp_v1 == 0) { + if (player->unk_00C & 0x40000) { + *temp_v1 = 1; + } + if ((player->unk_0BC & 0x2000) == 0x2000) { + *temp_v1 = 2; + } + if ((player->unk_0BC & 0x100000) == 0x100000) { + *temp_v1 = 3; + } + if ((player->unk_00C & 0x100) == 0x100) { + *temp_v1 = 4; + } + temp_v0 = player->unk_0BC; + if (((temp_v0 & 0x80) == 0x80) || ((temp_v0 & 0x40) == 0x40)) { + *temp_v1 = 5; + } + *(&D_80164498 + temp_t3) = 0.0f; + } + switch (*temp_v1) { + case 1: + temp_a0 = temp_t3 + &D_80164498; + phi_a0 = temp_a0; + if (player->unk_00C & 0x40000) { + sp1C = temp_t3; + func_800225CC(0.0f, temp_a0, 0x41A00000, 0x3E4CCCCD, temp_t3); + } else { + temp_f0 = *temp_a0; + if (temp_f0 > 1.0f) { + *temp_a0 = temp_f0 - 1.0f; + } else { + *temp_v1 = 0; +block_51: + *phi_a0 = 0.0f; + } + } + break; + case 2: + if ((player->unk_0BC & 0x2000) == 0x2000) { + if (player->unk_0DC != 0) { + sp1C = temp_t3; + func_800225CC(0.0f, temp_t3 + &D_80164498, 0x41000000, 0x3E4CCCCD, temp_t3); + } + } else { + temp_a0_2 = temp_t3 + &D_80164498; + temp_f0_2 = *temp_a0_2; + phi_a0 = temp_a0_2; + if (temp_f0_2 > 1.0f) { + *temp_a0_2 = temp_f0_2 - 2.0f; + } else { + *temp_v1 = 0; + goto block_51; + } + } + break; + case 3: + temp_v0_2 = player->unk_0BC; + temp_a0_3 = temp_t3 + &D_80164498; + phi_a0 = temp_a0_3; + if (((temp_v0_2 & 0x100000) == 0x100000) && ((temp_v0_2 & 8) == 8)) { + sp1C = temp_t3; + func_800225CC(0.0f, temp_a0_3, 0x41A00000, 0x3DCCCCCD, temp_t3); + } else { + temp_f0_3 = *temp_a0_3; + if (temp_f0_3 > 1.0f) { + *temp_a0_3 = temp_f0_3 - 1.0f; + } else { + *temp_v1 = 0; + goto block_51; + } + } + break; + case 4: + temp_a0_4 = temp_t3 + &D_80164498; + phi_a0 = temp_a0_4; + if ((player->unk_00C & 0x100) == 0x100) { + sp1C = temp_t3; + func_800225CC(0.0f, temp_a0_4, 0x41C80000, 0x3F800000, temp_t3); + } else { + temp_f0_4 = *temp_a0_4; + if (temp_f0_4 > 1.0f) { + *temp_a0_4 = temp_f0_4 - 2.0f; + } else { + *temp_v1 = 0; + goto block_51; + } + } + break; + case 5: + temp_v0_3 = player->unk_0BC; + temp_a0_5 = temp_t3 + &D_80164498; + phi_a0 = temp_a0_5; + if (((temp_v0_3 & 0x80) == 0x80) || ((temp_v0_3 & 0x40) == 0x40)) { + sp1C = temp_t3; + func_800225CC(0.0f, temp_a0_5, 0x41900000, 0x3E4CCCCD, temp_t3); + } else { + temp_f0_5 = *temp_a0_5; + if (temp_f0_5 > 1.0f) { + *temp_a0_5 = temp_f0_5 - 2.0f; + } else { + *temp_v1 = 0; + goto block_51; + } + } + break; + } + temp_v0_4 = D_800DC52C; + if (temp_v0_4 != 0) { + if ((temp_v0_4 != 1) && (temp_v0_4 != 2) && (temp_v0_4 != 3)) { + phi_f2 = sp34; + } else { + phi_f0 = func_80014EE4(*arg1, playerId, MIPS2C_ERROR(Read from unset register $a2)); + goto block_66; + } + } else { + temp_v0_5 = D_80164A28; + if (temp_v0_5 == 1) { + *(&D_80164498 + (playerId * 4)) = 40.0f; + } + temp_a0_6 = (playerId * 4) + &D_80164498; + if (temp_v0_5 == 2) { + temp_f0_6 = *temp_a0_6; + if (temp_f0_6 >= 0.0f) { + *temp_a0_6 = temp_f0_6 - 0.8; + } + if (*temp_a0_6 <= 0.0f) { + D_80164A28 = 0; + *temp_a0_6 = 0.0f; + } + } + phi_f0 = func_80014EE4(*arg1, playerId, MIPS2C_ERROR(Read from unset register $a2)); +block_66: + phi_f2 = phi_f0; + } + *arg1 = phi_f2; + cameras[playerId].unk30 = phi_f2; +} #else GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001F394.s") #endif diff --git a/src/code_80027D00.c b/src/code_80027D00.c index 8fc55ecbc..0c4c74190 100644 --- a/src/code_80027D00.c +++ b/src/code_80027D00.c @@ -98,15 +98,462 @@ GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80027DA8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80027EDC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C8F80(s32, ?, s8); /* extern */ +? func_800C9018(s32, ?, s8); /* extern */ +? func_800CA288(s32, ?, s8); /* extern */ +? func_800CA2B8(s32, s8); /* extern */ +? func_800CA2E4(s32, ?, s8); /* extern */ +? func_800CA30C(s32, s8); /* extern */ +extern ? D_80164438; +extern ? D_80165300; +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80027EDC.s line 369. +void func_80027EDC(u16 *arg0, s8 arg1) { + s16 *sp1C; + s16 *temp_v0_10; + s16 *temp_v0_12; + s16 *temp_v0_13; + s16 *temp_v0_15; + s16 *temp_v0_16; + s16 *temp_v0_17; + s16 *temp_v0_18; + s16 *temp_v0_20; + s16 *temp_v0_21; + s16 *temp_v0_23; + s16 *temp_v0_24; + s16 *temp_v0_25; + s16 *temp_v0_27; + s16 *temp_v0_28; + s16 *temp_v0_30; + s16 *temp_v0_31; + s16 *temp_v0_33; + s16 *temp_v0_34; + s16 *temp_v0_36; + s16 *temp_v0_37; + s16 *temp_v0_39; + s16 *temp_v0_3; + s16 *temp_v0_40; + s16 *temp_v0_41; + s16 *temp_v0_42; + s16 *temp_v0_44; + s16 *temp_v0_45; + s16 *temp_v0_47; + s16 *temp_v0_48; + s16 *temp_v0_4; + s16 *temp_v0_6; + s16 *temp_v0_7; + s16 *temp_v0_9; + s16 temp_a0; + s16 temp_v0_11; + s16 temp_v0_14; + s16 temp_v0_19; + s16 temp_v0_22; + s16 temp_v0_26; + s16 temp_v0_29; + s16 temp_v0_2; + s16 temp_v0_32; + s16 temp_v0_35; + s16 temp_v0_38; + s16 temp_v0_43; + s16 temp_v0_46; + s16 temp_v0_5; + s16 temp_v0_8; + s32 temp_a0_2; + s32 temp_t2; + s32 temp_t6; + s32 temp_v1; + s32 temp_v1_10; + s32 temp_v1_11; + s32 temp_v1_12; + s32 temp_v1_13; + s32 temp_v1_14; + 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; + s8 temp_a2; + u16 temp_t5; + u16 temp_t9; + u16 temp_v0; + s16 phi_a0; + s8 phi_a2; + s16 *phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = *arg0; + temp_a2 = arg1; + phi_a2 = temp_a2; + if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { + temp_t9 = gCurrentCourseId; + switch (temp_t9) { /* switch 1 */ + case 0: /* switch 1 */ + temp_v1 = temp_a2 * 2; + temp_v0_2 = *(&D_80164438 + temp_v1); + if ((temp_v0_2 >= 0x19B) && (temp_v0_2 < 0x1B9)) { + temp_v0_3 = temp_v1 + &D_80165300; + if (*temp_v0_3 != 1) { + sp1C = temp_v0_3; + func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1 + &D_80165300) = 1; + return; + } + temp_v0_4 = temp_v1 + &D_80165300; + if (*temp_v0_4 != 0) { + sp1C = temp_v0_4; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_4; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 1: /* switch 1 */ + temp_v1_2 = temp_a2 * 2; + temp_v0_5 = *(&D_80164438 + temp_v1_2); + if ((temp_v0_5 >= 0xA0) && (temp_v0_5 < 0xB4)) { + temp_v0_6 = temp_v1_2 + &D_80165300; + if (*temp_v0_6 != 1) { + sp1C = temp_v0_6; + func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_2 + &D_80165300) = 1; + return; + } + temp_v0_7 = temp_v1_2 + &D_80165300; + if (*temp_v0_7 != 0) { + sp1C = temp_v0_7; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_7; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 2: /* switch 1 */ + temp_v1_3 = temp_a2 * 2; + temp_v0_8 = *(&D_80164438 + temp_v1_3); + if ((temp_v0_8 >= 0x29) && (temp_v0_8 < 0x1D2)) { + temp_v0_9 = temp_v1_3 + &D_80165300; + if (*temp_v0_9 != 1) { + sp1C = temp_v0_9; + func_800CA288(temp_a2 & 0xFF, 0x41, temp_a2); + } + *(temp_v1_3 + &D_80165300) = 1; + return; + } + temp_v0_10 = temp_v1_3 + &D_80165300; + if (*temp_v0_10 != 0) { + sp1C = temp_v0_10; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_10; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 3: /* switch 1 */ + temp_v1_4 = temp_a2 * 2; + temp_v0_11 = *(&D_80164438 + temp_v1_4); + if ((temp_v0_11 >= 0x180) && (temp_v0_11 < 0x1E1)) { + temp_v0_12 = temp_v1_4 + &D_80165300; + if (*temp_v0_12 != 1) { + sp1C = temp_v0_12; + func_800CA288(temp_a2 & 0xFF, 0x41, temp_a2); + } + *(temp_v1_4 + &D_80165300) = 1; + return; + } + temp_v0_13 = temp_v1_4 + &D_80165300; + if (*temp_v0_13 != 0) { + sp1C = temp_v0_13; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_13; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 8: /* switch 1 */ + temp_v1_5 = temp_a2 * 2; + temp_v0_14 = *(&D_80164438 + temp_v1_5); + if ((temp_v0_14 >= 0x145) && (temp_v0_14 < 0x18B)) { + temp_v0_15 = temp_v1_5 + &D_80165300; + if (*temp_v0_15 != 1) { + sp1C = temp_v0_15; + func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_5 + &D_80165300) = 1; + return; + } + temp_v0_16 = temp_v1_5 + &D_80165300; + if (*temp_v0_16 != 0) { + sp1C = temp_v0_16; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_16; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 10: /* switch 1 */ + if ((temp_v0 & 0x800) != 0x800) { + temp_t6 = temp_a2 * 2; + temp_v0_17 = temp_t6 + &D_80165300; + if (*temp_v0_17 != 1) { + sp1C = temp_v0_17; + func_800CA288(temp_a2 & 0xFF, 0x1E, temp_a2); + } + *(temp_t6 + &D_80165300) = 1; + return; + } + temp_v0_18 = (temp_a2 * 2) + &D_80165300; + if (*temp_v0_18 != 0) { + sp1C = temp_v0_18; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_18; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 12: /* switch 1 */ + temp_v1_6 = temp_a2 * 2; + temp_v0_19 = *(&D_80164438 + temp_v1_6); + if ((temp_v0_19 >= 0x11C) && (temp_v0_19 < 0x209)) { + temp_v0_20 = temp_v1_6 + &D_80165300; + if (*temp_v0_20 != 1) { + sp1C = temp_v0_20; + func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_6 + &D_80165300) = 1; + return; + } + temp_v0_21 = temp_v1_6 + &D_80165300; + if (*temp_v0_21 != 0) { + sp1C = temp_v0_21; + func_800CA2B8(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_21; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 18: /* switch 1 */ + temp_v1_7 = temp_a2 * 2; + temp_v0_22 = *(&D_80164438 + temp_v1_7); + if (((temp_v0_22 >= 0) && (temp_v0_22 < 0x65)) || ((temp_v0_22 >= 0x14A) && (temp_v0_22 < 0x21F))) { + temp_v0_25 = temp_v1_7 + &D_80165300; + if (*temp_v0_25 != 2) { + sp1C = temp_v0_25; + func_800C8F80(temp_a2 & 0xFF, 0x170802D, temp_a2); + } + *(temp_v1_7 + &D_80165300) = 2; + return; + } + if ((temp_v0_22 >= 0x288) && (temp_v0_22 < 0x305)) { + temp_v0_23 = temp_v1_7 + &D_80165300; + if (*temp_v0_23 != 1) { + sp1C = temp_v0_23; + func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_7 + &D_80165300) = 1; + return; + } + temp_v0_24 = temp_v1_7 + &D_80165300; + temp_a0 = *temp_v0_24; + phi_a0 = temp_a0; + if (temp_a0 != 0) { + if (temp_a0 == 1) { + temp_a0_2 = temp_a2 & 0xFF; + sp1C = temp_v0_24; + arg1 = temp_a2; + func_800CA2B8(temp_a0_2, temp_a2); + phi_a0 = *temp_v0_24; + phi_a2 = arg1; + } + if (phi_a0 == 2) { + sp1C = temp_v1_7 + &D_80165300; + func_800C9018(phi_a2 & 0xFF, 0x170802D, phi_a2); + } + phi_v0 = temp_v1_7 + &D_80165300; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + } + } else { + temp_t5 = gCurrentCourseId; + switch (temp_t5) { /* switch 2 */ + case 0: /* switch 2 */ + temp_v1_8 = temp_a2 * 2; + temp_v0_26 = *(&D_80164438 + temp_v1_8); + if ((temp_v0_26 >= 0x19B) && (temp_v0_26 < 0x1B9)) { + temp_v0_27 = temp_v1_8 + &D_80165300; + if (*temp_v0_27 != 1) { + sp1C = temp_v0_27; + func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_8 + &D_80165300) = 1; + return; + } + temp_v0_28 = temp_v1_8 + &D_80165300; + if (*temp_v0_28 != 0) { + sp1C = temp_v0_28; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_28; +block_127: + *phi_v0 = 0; + } + default: /* switch 2 */ + default: /* switch 1 */ + return; + case 1: /* switch 2 */ + temp_v1_9 = temp_a2 * 2; + temp_v0_29 = *(&D_80164438 + temp_v1_9); + if ((temp_v0_29 >= 0xA0) && (temp_v0_29 < 0xB4)) { + temp_v0_30 = temp_v1_9 + &D_80165300; + if (*temp_v0_30 != 1) { + sp1C = temp_v0_30; + func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_9 + &D_80165300) = 1; + return; + } + temp_v0_31 = temp_v1_9 + &D_80165300; + if (*temp_v0_31 != 0) { + sp1C = temp_v0_31; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_31; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 2: /* switch 2 */ + temp_v1_10 = temp_a2 * 2; + temp_v0_32 = *(&D_80164438 + temp_v1_10); + if ((temp_v0_32 >= 0x29) && (temp_v0_32 < 0x1D2)) { + temp_v0_33 = temp_v1_10 + &D_80165300; + if (*temp_v0_33 != 1) { + sp1C = temp_v0_33; + func_800CA2E4(temp_a2 & 0xFF, 0x41, temp_a2); + } + *(temp_v1_10 + &D_80165300) = 1; + return; + } + temp_v0_34 = temp_v1_10 + &D_80165300; + if (*temp_v0_34 != 0) { + sp1C = temp_v0_34; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_34; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 3: /* switch 2 */ + temp_v1_11 = temp_a2 * 2; + temp_v0_35 = *(&D_80164438 + temp_v1_11); + if ((temp_v0_35 >= 0x180) && (temp_v0_35 < 0x1E1)) { + temp_v0_36 = temp_v1_11 + &D_80165300; + if (*temp_v0_36 != 1) { + sp1C = temp_v0_36; + func_800CA2E4(temp_a2 & 0xFF, 0x41, temp_a2); + } + *(temp_v1_11 + &D_80165300) = 1; + return; + } + temp_v0_37 = temp_v1_11 + &D_80165300; + if (*temp_v0_37 != 0) { + sp1C = temp_v0_37; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_37; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 8: /* switch 2 */ + temp_v1_12 = temp_a2 * 2; + temp_v0_38 = *(&D_80164438 + temp_v1_12); + if ((temp_v0_38 >= 0x145) && (temp_v0_38 < 0x18B)) { + temp_v0_39 = temp_v1_12 + &D_80165300; + if (*temp_v0_39 != 1) { + sp1C = temp_v0_39; + func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_12 + &D_80165300) = 1; + return; + } + temp_v0_40 = temp_v1_12 + &D_80165300; + if (*temp_v0_40 != 0) { + sp1C = temp_v0_40; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_40; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 10: /* switch 2 */ + if ((temp_v0 & 0x800) != 0x800) { + temp_t2 = temp_a2 * 2; + temp_v0_41 = temp_t2 + &D_80165300; + if (*temp_v0_41 != 1) { + sp1C = temp_v0_41; + func_800CA2E4(temp_a2 & 0xFF, 0x1E, temp_a2); + } + *(temp_t2 + &D_80165300) = 1; + return; + } + temp_v0_42 = (temp_a2 * 2) + &D_80165300; + if (*temp_v0_42 != 0) { + sp1C = temp_v0_42; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_42; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 12: /* switch 2 */ + temp_v1_13 = temp_a2 * 2; + temp_v0_43 = *(&D_80164438 + temp_v1_13); + if ((temp_v0_43 >= 0x11C) && (temp_v0_43 < 0x209)) { + temp_v0_44 = temp_v1_13 + &D_80165300; + if (*temp_v0_44 != 1) { + sp1C = temp_v0_44; + func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_13 + &D_80165300) = 1; + return; + } + temp_v0_45 = temp_v1_13 + &D_80165300; + if (*temp_v0_45 != 0) { + sp1C = temp_v0_45; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_45; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + case 18: /* switch 2 */ + temp_v1_14 = temp_a2 * 2; + temp_v0_46 = *(&D_80164438 + temp_v1_14); + if ((temp_v0_46 >= 0x288) && (temp_v0_46 < 0x305)) { + temp_v0_47 = temp_v1_14 + &D_80165300; + if (*temp_v0_47 != 1) { + sp1C = temp_v0_47; + func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); + } + *(temp_v1_14 + &D_80165300) = 1; + return; + } + temp_v0_48 = temp_v1_14 + &D_80165300; + if (*temp_v0_48 != 0) { + sp1C = temp_v0_48; + func_800CA30C(temp_a2 & 0xFF, temp_a2); + phi_v0 = temp_v0_48; + goto block_127; + } + /* Duplicate return node #128. Try simplifying control flow for better match */ + return; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80027EDC.s") #endif diff --git a/src/code_8003DC40.c b/src/code_8003DC40.c index dae20a944..312aef32f 100644 --- a/src/code_8003DC40.c +++ b/src/code_8003DC40.c @@ -240,15 +240,61 @@ GLOBAL_ASM("asm/non_matchings/code_8003DC40/func_8003F138.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8003F46C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8002A5F4(void *, f32, ?, f32); /* extern */ +? func_8003E048(Player *, void *, f32 *, f32 *, f32 *, f32 *); /* extern */ +? func_8003E37C(Player *, void *, f32 *, f32 *, f32 *, f32 *); /* extern */ +? func_8003E6EC(Player *, void *, f32 *, f32 *, f32 *, f32 *); /* extern */ +? func_8003E9EC(Player *, void *, f32 *, f32 *, f32 *, f32 *); /* extern */ +? func_8003EE2C(Player *, void *, f32 *, f32 *, f32 *, f32 *); /* extern */ +? func_8003F138(Player *, void *, f32 *, f32 *, f32 *, f32 *); /* extern */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8003F46C.s line 77. +void func_8003F46C(Player *arg0, void *arg1, s32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7, f32 *arg6, f32 *arg7) { + u16 temp_t9; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + arg1->unk0 = -arg0->unk_140; + arg1->unk4 = -arg0->unk_144; + arg1->unk8 = -arg0->unk_148; + if ((arg0->unk_144 < 0.0f) && ((arg0->unk_0CA & 2) == 0)) { + *arg7 += arg1->unk0 * arg0->unk_124 * 1.0f; + *arg6 += arg1->unk4 * arg0->unk_124 * 1.0f; + *arg7 += arg1->unk8 * arg0->unk_124 * 1.0f; + func_8002A5F4(arg1, *arg6, 0x3F99999A, 0.0f); + arg0->kartHopJerk = 0.0f; + arg0->kartHopAcceleration = 0.0f; + arg0->kartHopVelocity = 0.0f; + return; + } + temp_t9 = gCurrentCourseId; + switch (temp_t9) { + case 0: + func_8003E048(arg0, arg1, arg6, arg7, arg6, arg7); + break; + case 1: + case 6: + func_8003E37C(arg0, arg1, arg6, arg7, arg6, arg7); + break; + case 2: + func_8003E6EC(arg0, arg1, arg6, arg7, arg6, arg7); + break; + case 8: + func_8003E9EC(arg0, arg1, arg6, arg7, arg6, arg7); + break; + case 14: + func_8003EE2C(arg0, arg1, arg6, arg7, arg6, arg7); + break; + case 18: + func_8003F138(arg0, arg1, arg6, arg7, arg6, arg7); + break; + default: + func_8003E048(arg0, arg1, arg6, arg7, arg6, arg7); + break; + } + if (arg0->unk_0BC & 0x10000) { + arg0->unk_DAC = 0.5f; + } +} #else GLOBAL_ASM("asm/non_matchings/code_8003DC40/func_8003F46C.s") #endif diff --git a/src/code_800431B0.c b/src/code_800431B0.c index 147451d40..1e0fecb78 100644 --- a/src/code_800431B0.c +++ b/src/code_800431B0.c @@ -6185,15 +6185,105 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800507D8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800508C0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8004C024(s16, ?, s16, s32, s32, s32, s32); /* extern */ +? func_8004C148(?, s16, s16, s32, s32, s32, s32); /* extern */ -Unable to determine jump table for jr instruction at func_800508C0.s line 125. +void func_800508C0(void) { + s32 sp54; + s32 sp50; + u32 sp4C; + s32 sp48; + u16 sp42; + u16 sp40; + u16 sp3E; + s32 temp_v1; + s16 phi_s0; + u16 phi_s0_2; + s32 phi_s1; + s32 phi_s2; + u16 phi_s0_3; + s32 phi_s1_2; + s32 phi_s2_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (gModeSelection == 1) { + phi_s0 = D_80164378; + } else { + phi_s0 = D_80164360; + } + temp_v1 = lapCount[phi_s0]; + sp4C = func_80050644(phi_s0 & 0xFFFF, &sp54, &sp50); + if (temp_v1 > 0) { + if (temp_v1 == 1) { + phi_s0_2 = 0; + phi_s1 = 0; + phi_s2 = 0xFF; + } else { + if (temp_v1 == 2) { + phi_s1 = 0xFF; + } else { + phi_s1 = 0; + } + phi_s0_2 = 0xFF; + phi_s2 = 0; + } + sp48 = temp_v1; + func_8004C024(0x20, 0x12, 0x104, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); + func_8004C148(0x124, 0x12, 0xCC, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); + func_8004C024(0x20, 0xDE, 0x104, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); + func_8004C148(0x20, 0x12, 0xCC, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); + sp42 = phi_s0_2; + sp40 = phi_s1; + sp3E = phi_s2; + } + phi_s0_3 = sp42; + phi_s1_2 = sp40; + phi_s2_2 = sp3E; + if ((lapCount[phi_s0] >= 0) && (lapCount[phi_s0] < 3)) { + if (lapCount[phi_s0] != 0) { + if (lapCount[phi_s0] != 1) { + if (lapCount[phi_s0] != 2) { + + } else { + phi_s1_2 = 0; + goto block_20; + } + } else { + phi_s1_2 = 0xFF; +block_20: + phi_s0_3 = 0xFF; + phi_s2_2 = 0; + } + } else { + phi_s0_3 = 0; + phi_s1_2 = 0; + phi_s2_2 = 0xFF; + } + switch (sp4C) { + case 1: + func_8004C024(0x20, 0x12, sp54, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + return; + case 2: + func_8004C024(0x20, 0x12, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C148(0x124, 0x12, sp50, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + return; + case 3: + func_8004C024(0x20, 0x12, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C148(0x124, 0x12, 0xCC, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C024(sp54 + 0x20, 0xDE, 0x104 - sp54, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + return; + case 4: + func_8004C024(0x20, 0x12, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C148(0x124, 0x12, 0xCC, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C024(0x20, 0xDE, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C148(0x20, sp50 + 0x12, 0xCC - sp50, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800508C0.s") #endif @@ -7765,15 +7855,88 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800534A4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800534E8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_80165CBC; +static ? D_800E4638; /* unable to generate initializer; const */ +static ? D_800E4640; /* unable to generate initializer; const */ +static ? D_800E4650; /* unable to generate initializer; const */ +static ? D_800E4658; /* unable to generate initializer; const */ +static ? D_800E4668; /* unable to generate initializer; const */ +static ? D_800E4670; /* unable to generate initializer; const */ +static ? D_800E4680; /* unable to generate initializer; const */ +static ? D_800E4688; /* unable to generate initializer; const */ +static ? D_800E4698; /* unable to generate initializer; const */ +static ? D_800E46A0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800534E8.s line 14. +void func_800534E8(s32 arg0) { + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = *(&D_80165CBC + (arg0 * 0xE0)); + switch (temp_t7) { + case 0: + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w0 = 0x3860010; + temp_v0->words.w1 = &D_800E4640; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0x3880010; + temp_v0_2->words.w1 = &D_800E4638; + return; + case 1: + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w0 = 0x3860010; + temp_v0_3->words.w1 = &D_800E4658; + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0x3880010; + temp_v0_4->words.w1 = &D_800E4650; + return; + case 2: + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w0 = 0x3860010; + temp_v0_5->words.w1 = &D_800E4670; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w0 = 0x3880010; + temp_v0_6->words.w1 = &D_800E4668; + return; + case 3: + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w0 = 0x3860010; + temp_v0_7->words.w1 = &D_800E4688; + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w0 = 0x3880010; + temp_v0_8->words.w1 = &D_800E4680; + return; + case 4: + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w0 = 0x3860010; + temp_v0_9->words.w1 = &D_800E46A0; + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + temp_v0_10->words.w0 = 0x3880010; + temp_v0_10->words.w1 = &D_800E4698; + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800534E8.s") #endif diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 42bdf2789..cb16d2761 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -21,15 +21,45 @@ void func_80057C60(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80057CE4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802A3730(s32); /* extern */ -Unable to determine jump table for jr instruction at func_80057CE4.s line 12. +void func_80057CE4(void) { + u32 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = D_8018D21C; + switch (temp_t6) { + case 0: + func_802A3730(D_800DC5EC); + return; + case 1: + func_802A3730(D_800DC5EC); + return; + case 2: + func_802A3730(D_800DC5F0); + return; + case 3: + func_802A3730(D_800DC5EC); + return; + case 4: + func_802A3730(D_800DC5F0); + return; + case 8: + func_802A3730(D_800DC5EC); + return; + case 9: + func_802A3730(D_800DC5F0); + return; + case 10: + func_802A3730(D_800DC5F4); + return; + case 11: + func_802A3730(D_800DC5F8); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80057CE4.s") #endif @@ -61,29 +91,100 @@ void func_80057DD0(void) { //#endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80057FC4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80041EF4(Gfx **); /* extern */ +? func_80051EBC(); /* extern */ +? func_80051EF8(); /* extern */ +? func_80051F9C(); /* extern */ +? func_80052044(); /* extern */ +? func_80052080(); /* extern */ +extern ? D_0D0076F8; -Unable to determine jump table for jr instruction at func_80057FC4.s line 29. +void func_80057FC4(u32 arg0) { + Gfx *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if ((D_801657B0 == 0) && (temp_v1 = gDisplayListHead, gDisplayListHead = temp_v1 + 8, temp_v1->words.w0 = 0x6000000, temp_v1->words.w1 = &D_0D0076F8, func_80041EF4(&gDisplayListHead), (D_801657C8 == 0))) { + switch (arg0) { + case 0: + func_80051EBC(); + return; + case 1: + func_80051EF8(); + return; + case 2: + func_80051F9C(); + return; + case 3: + func_80052044(); + return; + case 4: + func_80052080(); + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80057FC4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80058090: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800581C8(Gfx **, u32); /* extern */ +? func_800582CC(Gfx **, u32); /* extern */ +? func_80058394(Gfx **, u32); /* extern */ +? func_8005845C(Gfx **, u32); /* extern */ +extern ? D_0D0076F8; -Unable to determine jump table for jr instruction at func_80058090.s line 28. +void func_80058090(u32 arg0) { + Gfx *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if ((D_801657B0 == 0) && (temp_v1 = gDisplayListHead, gDisplayListHead = temp_v1 + 8, temp_v1->words.w0 = 0x6000000, temp_v1->words.w1 = &D_0D0076F8, (D_8018D22C == 0))) { + switch (arg0) { + case 0: + func_800581C8(&gDisplayListHead, arg0); + return; + case 1: + func_800581C8(&gDisplayListHead, arg0); + return; + case 2: + func_800582CC(&gDisplayListHead, arg0); + return; + case 3: + func_800581C8(&gDisplayListHead, arg0); + return; + case 4: + func_800582CC(&gDisplayListHead, arg0); + return; + case 5: + func_800581C8(&gDisplayListHead, arg0); + return; + case 6: + func_800582CC(&gDisplayListHead, arg0); + return; + case 7: + func_80058394(&gDisplayListHead, arg0); + return; + case 8: + func_800581C8(&gDisplayListHead, arg0); + return; + case 9: + func_800582CC(&gDisplayListHead, arg0); + return; + case 10: + func_80058394(&gDisplayListHead, arg0); + return; + case 11: + func_8005845C(&gDisplayListHead, arg0); + /* Duplicate return node #16. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80058090.s") #endif @@ -146,18 +247,55 @@ void func_8005845C(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80058538: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80058640(Gfx **, u32); /* extern */ +? func_800586FC(Gfx **, u32); /* extern */ +? func_800587A4(Gfx **, u32); /* extern */ +? func_8005884C(Gfx **, u32); /* extern */ +extern ? D_0D0076F8; -Unable to determine jump table for jr instruction at func_80058538.s line 28. +void func_80058538(u32 arg0) { + Gfx *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if ((D_801657B0 == 0) && (temp_v1 = gDisplayListHead, gDisplayListHead = temp_v1 + 8, temp_v1->words.w0 = 0x6000000, temp_v1->words.w1 = &D_0D0076F8, (D_8018D22C == 0))) { + switch (arg0) { + case 0: + func_80058640(&gDisplayListHead, arg0); + return; + case 1: + func_80058640(&gDisplayListHead, arg0); + return; + case 2: + func_800586FC(&gDisplayListHead, arg0); + return; + case 3: + func_80058640(&gDisplayListHead, arg0); + return; + case 4: + func_800586FC(&gDisplayListHead, arg0); + return; + case 8: + func_80058640(&gDisplayListHead, arg0); + return; + case 9: + func_800586FC(&gDisplayListHead, arg0); + return; + case 10: + func_800587A4(&gDisplayListHead, arg0); + return; + case 11: + func_8005884C(&gDisplayListHead, arg0); + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80058538.s") #endif + void func_80058B58(s32 arg0); void func_80058640(void) { @@ -191,15 +329,119 @@ void func_8005884C(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800588F4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80051638(s32); /* extern */ +? func_8005217C(s32); /* extern */ +? func_800524B4(s32); /* extern */ +? func_80052590(s32); /* extern */ +? func_800527D8(s32); /* extern */ +? func_80052E30(s32); /* extern */ +? func_8005327C(s32); /* extern */ +? func_80053870(s32); /* extern */ +? func_80053E6C(s32); /* extern */ +? func_800541BC(s32); /* extern */ +? func_80054414(s32); /* extern */ +? func_80054664(s32); /* extern */ +? func_80054938(s32); /* extern */ +? func_800550A4(s32); /* extern */ +? func_80055228(s32); /* extern */ +? func_80055380(s32); /* extern */ +? func_80055528(s32); /* extern */ +? func_8005568C(s32); /* extern */ +? func_8005592C(s32); /* extern */ +? func_80055C38(s32); /* extern */ +? func_80055E68(s32); /* extern */ +? func_80056188(s32); /* extern */ +? func_80056AC0(s32); /* extern */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_800588F4.s line 14. +void func_800588F4(s32 arg0) { + s32 temp_v0; + s8 temp_v0_2; + u16 temp_t6; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = gCurrentCourseId; + switch (temp_t6) { + case 2: + func_80053870(arg0); + func_80054664(arg0); + break; + case 3: + if (D_800DC50C != 9) { + func_800527D8(arg0); + func_80052590(arg0); + func_8005217C(arg0); + func_800524B4(arg0); + } + break; + case 4: + func_80055228(arg0); + if (D_800DC50C != 9) { + func_8005568C(arg0); + } + break; + case 5: + if (D_800DC50C != 9) { + func_8005327C(arg0); + } + break; + case 6: + temp_v0 = D_800DC50C; + phi_v0 = temp_v0; + if (temp_v0 != 9) { + func_80055528(arg0); + phi_v0 = D_800DC50C; + } + if (phi_v0 != 9) { + temp_v0_2 = D_8018EDF3; + if ((temp_v0_2 == 1) || (temp_v0_2 == 2)) { + func_80055380(arg0); + } + } else { + func_80055380(arg0); + } + break; + case 8: + if (D_80165898 != 0) { + func_80055E68(arg0); + } + break; + case 9: + if (D_800DC50C != 9) { + func_800550A4(arg0); + } + break; + case 11: + func_800541BC(arg0); + break; + case 12: + if (D_800DC50C != 9) { + func_80052E30(arg0); + } + func_8005592C(arg0); + break; + case 13: + if (D_800DC50C != 9) { + func_80056188(arg0); + func_80055C38(arg0); + } + break; + case 18: + if (D_800DC50C != 9) { + func_80054414(arg0); + } + break; + } + func_80054938(arg0); + func_80051638(arg0); + if (D_80165730 != 0) { + func_80053E6C(arg0); + } + if (gModeSelection == 3) { + func_80056AC0(arg0); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800588F4.s") #endif @@ -243,29 +485,181 @@ void func_80058BF4(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80058C20: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80058F48(Gfx **); /* extern */ +? func_80059358(Gfx **); /* extern */ +? func_800593F0(Gfx **); /* extern */ +? func_800594F0(Gfx **); /* extern */ +? func_80059528(Gfx **); /* extern */ +? func_800596A8(Gfx **); /* extern */ +? func_80059710(Gfx **); /* extern */ +? func_80059750(Gfx **); /* extern */ +? func_800597B8(Gfx **); /* extern */ +extern ? D_0D0076F8; -Unable to determine jump table for jr instruction at func_80058C20.s line 26. +void func_80058C20(u32 arg0) { + Gfx *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_8018D21C = arg0; + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->words.w0 = 0x6000000; + temp_v1->words.w1 = &D_0D0076F8; + if (D_8018D22C == 0) { + switch (arg0) { + case 0: + func_80058F48(&gDisplayListHead); + return; + case 1: + if (D_800DC51C == 0) { + func_80059358(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 2: + if (D_800DC51C == 0) { + func_800593F0(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 3: + if (D_800DC51C == 0) { + func_800594F0(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 4: + if (D_800DC51C == 0) { + func_80059528(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 8: + if (D_800DC51C == 0) { + func_800596A8(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 9: + if (D_800DC51C == 0) { + func_80059710(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 10: + if (D_800DC51C == 0) { + func_80059750(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 11: + if ((D_800DC51C == 0) && (gPlayerCountSelection1 == 4)) { + func_800597B8(&gDisplayListHead); + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80058C20.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80058DB4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80058F78(Gfx **); /* extern */ +? func_80059360(Gfx **); /* extern */ +? func_800593F8(Gfx **); /* extern */ +? func_800594F8(Gfx **); /* extern */ +? func_80059530(Gfx **); /* extern */ +? func_800596D8(Gfx **); /* extern */ +? func_80059718(Gfx **); /* extern */ +? func_80059780(Gfx **); /* extern */ +? func_800597E8(Gfx **); /* extern */ +extern ? D_0D0076F8; -Unable to determine jump table for jr instruction at func_80058DB4.s line 26. +void func_80058DB4(u32 arg0) { + Gfx *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_8018D21C = arg0; + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->words.w0 = 0x6000000; + temp_v1->words.w1 = &D_0D0076F8; + if (D_8018D22C == 0) { + switch (arg0) { + case 0: + func_80058F78(&gDisplayListHead); + return; + case 1: + if (D_800DC51C == 0) { + func_80059360(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 2: + if (D_800DC51C == 0) { + func_800593F8(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 3: + if (D_800DC51C == 0) { + func_800594F8(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 4: + if (D_800DC51C == 0) { + func_80059530(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 8: + if (D_800DC51C == 0) { + func_800596D8(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 9: + if (D_800DC51C == 0) { + func_80059718(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 10: + if (D_800DC51C == 0) { + func_80059780(&gDisplayListHead); + return; + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + case 11: + if ((D_800DC51C == 0) && (gPlayerCountSelection1 == 4)) { + func_800597E8(&gDisplayListHead); + } + /* Duplicate return node #21. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80058DB4.s") #endif @@ -1401,15 +1795,112 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005A71C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8005A74C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80074EE8(); /* extern */ +? func_80075838(); /* extern */ +? func_80075CA8(); /* extern */ +? func_80076B84(); /* extern */ +? func_80076F2C(); /* extern */ +? func_80077C9C(); /* extern */ +? func_80078838(); /* extern */ +? func_8007C2F8(?); /* extern */ +? func_8007C340(); /* extern */ +? func_8007DB44(); /* extern */ +? func_8007E1AC(); /* extern */ +? func_8007E4C4(); /* extern */ +? func_80081208(); /* extern */ +? func_800821FC(); /* extern */ +? func_80082870(); /* extern */ +? func_80082E5C(); /* extern */ +? func_80083080(); /* extern */ +? func_800834B8(); /* extern */ +? func_80083D60(); /* extern */ +? func_800842C8(); /* extern */ +? func_80085214(); /* extern */ +? func_800857C0(); /* extern */ +? func_80085AA8(); /* extern */ +? func_800861E0(); /* extern */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8005A74C.s line 12. +void func_8005A74C(void) { + s8 temp_v0; + u16 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = gCurrentCourseId; + switch (temp_t6) { + case 2: + func_80081208(); + func_80076B84(); + break; + case 3: + if (D_800DC50C != 9) { + func_8007E1AC(); + func_8007E4C4(); + if (gModeSelection != 1) { + func_8007DB44(); + } + func_8007C340(); + func_8007C2F8(0); + } + break; + case 4: + func_80083080(); + if (D_800DC50C != 9) { + func_800834B8(); + } + break; + case 5: + if (D_800DC50C != 9) { + func_80083D60(); + } + func_80078838(); + break; + case 6: + if (D_800DC50C != 9) { + func_80082E5C(); + } + temp_v0 = D_8018EDF3; + if ((temp_v0 == 1) || (temp_v0 == 2) || (D_800DC50C == 9)) { + func_80082870(); + } + break; + case 8: + if (D_80165898 != 0) { + func_800857C0(); + } + break; + case 9: + if (D_800DC50C != 9) { + func_800821FC(); + } + break; + case 11: + func_80075838(); + break; + case 12: + if (D_800DC50C != 9) { + func_800842C8(); + } + func_80085214(); + break; + case 13: + if (D_800DC50C != 9) { + func_800861E0(); + func_80085AA8(); + } + break; + case 18: + func_80075CA8(); + break; + } + if (D_80165730 != 0) { + func_80074EE8(); + } + func_80076F2C(); + if (gCurrentCourseId != 5) { + func_80077C9C(); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005A74C.s") #endif @@ -1560,15 +2051,400 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005AB20.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8005AB60: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80041288(? *, ?, ?); /* extern */ +extern ? D_8018CA70; +extern ? D_8018CAAE; +extern ? D_8018CAB0; +extern ? D_8018CAB8; +extern ? D_8018CABE; +extern ? D_8018CAC0; +extern ? D_8018CAC2; +extern ? D_8018CACA; +extern ? D_8018CACC; +extern ? D_8018CACE; +static ? D_800E55B0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8005AB60.s line 781. +void func_8005AB60(void) { + s32 temp_v0_2; + u8 temp_t2; + u8 temp_t2_2; + u8 temp_t3; + u8 temp_t3_2; + u8 temp_t6; + u8 temp_t7; + u8 temp_t7_2; + u8 temp_t8; + u8 temp_t8_2; + u8 temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = D_8018CA70.unk78; + switch (temp_t6) { /* switch 1 */ + case 1: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x106, 0x10); + if (func_80041288(&D_8018CAB0, 0xB6, 0x10) != 0) { + D_8018CA70.unk79 = 1; + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 2: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x116, 4); + if (func_80041288(&D_8018CAB0, 0xC6, 4) != 0) { + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 3: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x106, 4); + if (func_80041288(&D_8018CAB0, 0xB6, 4) != 0) { + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 4: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x10E, 4); + if (func_80041288(&D_8018CAB0, 0xBE, 4) != 0) { + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 5: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x106, 4); + if (func_80041288(&D_8018CAB0, 0xB6, 4) != 0) { + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 6: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x10A, 2); + if (func_80041288(&D_8018CAB0, 0xBA, 2) != 0) { + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 7: /* switch 1 */ + func_80041288(&D_8018CAAE, 0x106, 2); + if (func_80041288(&D_8018CAB0, 0xB6, 2) != 0) { + D_8018CA70.unk78 = D_8018CA70.unk78 + 1; + } + break; + case 8: /* switch 1 */ + D_8018CA70.unk78 = 0; + break; + } + temp_v0 = D_8018CA70.unk79; + if ((temp_v0 != 0) && (temp_v0 == 1)) { + temp_t3 = D_801657E7 + 1; + temp_v0_2 = temp_t3 & 0xFF; + D_801657E7 = temp_t3; + if (temp_v0_2 >= 0x10) { + D_801657E7 = 0; + D_8016579E = -0x2300; + D_8018CA70.unk79 = 0; + } else { + D_8016579E = *(&D_800E55B0 + (temp_v0_2 * 2)) + 0xDD00; + } + } + temp_t8 = D_8018CA70.unk80; + switch (temp_t8) { /* switch 2 */ + case 1: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x40, 8) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 2: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x38, 8) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 3: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x40, 8) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 4: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x38, 8) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 5: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x40, 8) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 6: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x38, 4) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 7: /* switch 2 */ + if (func_80041288(&D_8018CAB8, 0x40, 4) != 0) { + D_8018CA70.unk80 = D_8018CA70.unk80 + 1; + } + break; + case 8: /* switch 2 */ + D_8018CA70.unk80 = 0; + break; + } + temp_t3_2 = D_8018CA70.unk7A; + switch (temp_t3_2) { /* switch 3 */ + case 1: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xE4, 0x10) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 2: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xF4, 4) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 3: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xE4, 4) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 4: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xEC, 4) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 5: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xE4, 4) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 6: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xE8, 2) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 7: /* switch 3 */ + if (func_80041288(&D_8018CABE, 0xE4, 2) != 0) { + D_8018CA70.unk7A = D_8018CA70.unk7A + 1; + } + break; + case 8: /* switch 3 */ + D_8018CA70.unk7A = 0; + break; + } + temp_t8_2 = D_8018CA70.unk7D; + switch (temp_t8_2) { /* switch 4 */ + case 1: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x53, 0x10) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 2: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x43, 4) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 3: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x53, 4) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 4: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x4B, 4) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 5: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x53, 4) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 6: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x4F, 2) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 7: /* switch 4 */ + if (func_80041288(&D_8018CACA, 0x53, 2) != 0) { + D_8018CA70.unk7D = D_8018CA70.unk7D + 1; + } + break; + case 8: /* switch 4 */ + D_8018CA70.unk7D = 0; + break; + } + D_8018CFEC = D_8018CA70.unk3E + 0x18; + D_8018CFF4 = D_8018CA70.unk40 + 6; + temp_t7 = D_8018CA70.unk7B; + switch (temp_t7) { /* switch 5 */ + case 1: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xE4, 0x10) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 2: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xF4, 4) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 3: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xE4, 4) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 4: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xEC, 4) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 5: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xE4, 4) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 6: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xE8, 2) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 7: /* switch 5 */ + if (func_80041288(&D_8018CAC0, 0xE4, 2) != 0) { + D_8018CA70.unk7B = D_8018CA70.unk7B + 1; + } + break; + case 8: /* switch 5 */ + D_8018CA70.unk7B = 0; + break; + } + temp_t2 = D_8018CA70.unk7E; + switch (temp_t2) { /* switch 6 */ + case 1: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x53, 0x10) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 2: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x43, 4) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 3: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x53, 4) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 4: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x4B, 4) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 5: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x53, 4) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 6: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x4F, 2) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 7: /* switch 6 */ + if (func_80041288(&D_8018CACC, 0x53, 2) != 0) { + D_8018CA70.unk7E = D_8018CA70.unk7E + 1; + } + break; + case 8: /* switch 6 */ + D_8018CA70.unk7E = 0; + break; + } + temp_t7_2 = D_8018CA70.unk7C; + switch (temp_t7_2) { /* switch 7 */ + case 1: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xE4, 0x10) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 2: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xF4, 4) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 3: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xE4, 4) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 4: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xEC, 4) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 5: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xE4, 4) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 6: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xE8, 2) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 7: /* switch 7 */ + if (func_80041288(&D_8018CAC2, 0xE4, 2) != 0) { + D_8018CA70.unk7C = D_8018CA70.unk7C + 1; + } + break; + case 8: /* switch 7 */ + D_8018CA70.unk7C = 0; + break; + } + temp_t2_2 = D_8018CA70.unk7F; + switch (temp_t2_2) { /* switch 8 */ + case 1: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x53, 0x10) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + default: /* switch 8 */ + return; + case 2: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x43, 4) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + case 3: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x53, 4) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + case 4: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x4B, 4) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + case 5: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x53, 4) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + case 6: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x4F, 2) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + case 7: /* switch 8 */ + if (func_80041288(&D_8018CACE, 0x53, 2) != 0) { + D_8018CA70.unk7F = D_8018CA70.unk7F + 1; + return; + } + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + case 8: /* switch 8 */ + D_8018CA70.unk7F = 0; + /* Duplicate return node #141. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005AB60.s") #endif @@ -1626,15 +2502,356 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005B7A0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8005B914: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800413B8(f32 *, f32, s32); /* extern */ +? func_8005AA4C(); /* extern */ +? func_8005AA6C(?); /* extern */ +? func_8005AA80(); /* extern */ +? func_8005AA94(?); /* extern */ +? func_8005AAF0(); /* extern */ +? func_8005AB60(); /* extern */ +? func_8005B7A0(); /* extern */ +extern ? D_8018CA70; +extern ? D_8018D070; +extern s32 D_8018D078; +extern ? D_8018D098; -Unable to determine jump table for jr instruction at func_8005B914.s line 25. +void func_8005B914(void) { + s32 *sp20; + f32 *sp1C; + f32 *sp18; + f32 *temp_v0_2; + f32 *temp_v1; + s32 *temp_v0_3; + s32 temp_v0; + f32 *phi_v0; + s32 *phi_v0_2; + s32 phi_v0_3; + s32 phi_v0_4; + s32 *phi_v0_5; + f32 *phi_v1; + f32 *phi_a0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = D_8018D1CC; + phi_v0_3 = temp_v0; + if (temp_v0 >= 0x1D) { + switch (temp_v0) { /* switch 1 */ + case 0x64: /* switch 1 */ + func_8005AA4C(); + goto block_76; + case 0x65: /* switch 1 */ + func_8005AA94(0x3A); + goto block_76; + case 0x66: /* switch 1 */ + D_8018D078 = -0x3F000000; + D_8018D0C8 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x67: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x68: /* switch 1 */ + D_8018D07C = -8.0f; + D_8018D0CC = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x69: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x6A: /* switch 1 */ + D_8018D080 = -8.0f; + D_8018D0D0 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x6B: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x6C: /* switch 1 */ + D_8018D084 = -8.0f; + D_8018D0D4 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x6D: /* switch 1 */ + func_8005AA94(0xA); + goto block_76; + case 0x6E: /* switch 1 */ + phi_v0 = &D_8018D050; + do { + temp_v0_2 = phi_v0 + 0x10; + temp_v0_2->unk-10 = -32.0f; + temp_v0_2->unk-C = -32.0f; + temp_v0_2->unk-8 = -32.0f; + temp_v0_2->unk-4 = -32.0f; + phi_v0 = temp_v0_2; + } while (temp_v0_2 != &D_8018D070); + D_8018D028 = 360.0f; + D_8018D050 = 110.0f; + D_8018D0C8 = 44.0f; + D_8018D078 = -0x3E800000; + D_801657E2 = 1; + func_8005AA4C(); + goto block_76; + case 0x6F: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x70: /* switch 1 */ + D_8018D02C = 360.0f; + D_8018D054 = 110.0f; + D_8018D0CC = 76.0f; + D_8018D07C = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x71: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x72: /* switch 1 */ + D_8018D030 = 360.0f; + D_8018D058 = 110.0f; + D_8018D0D0 = 108.0f; + D_8018D080 = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x73: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x74: /* switch 1 */ + D_8018D034 = 360.0f; + D_8018D05C = 110.0f; + D_8018D0D4 = 140.0f; + D_8018D084 = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x75: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x76: /* switch 1 */ + D_8018D038 = 360.0f; + D_8018D060 = 110.0f; + D_8018D0D8 = 180.0f; + D_8018D088 = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x77: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x78: /* switch 1 */ + D_8018D03C = 360.0f; + D_8018D064 = 110.0f; + D_8018D0DC = 212.0f; + D_8018D08C = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x79: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x7A: /* switch 1 */ + D_8018D040 = 360.0f; + D_8018D068 = 110.0f; + D_8018D0E0 = 244.0f; + D_8018D090 = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x7B: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x7C: /* switch 1 */ + D_8018D044 = 360.0f; + D_8018D06C = 110.0f; + D_8018D0E4 = 276.0f; + D_8018D094 = -16.0f; + func_8005AA4C(); + goto block_76; + case 0x7D: /* switch 1 */ + func_8005AA94(0xA); + goto block_76; + case 0x7E: /* switch 1 */ + phi_v0_2 = &D_8018D078; + do { + temp_v0_3 = phi_v0_2 + 0x10; + temp_v0_3->unk-C = 0.0f; + temp_v0_3->unk-8 = 0.0f; + temp_v0_3->unk-4 = 0.0f; + temp_v0_3->unk-10 = 0.0f; + phi_v0_2 = temp_v0_3; + } while (temp_v0_3 != &D_8018D098); + func_8005AA4C(); + goto block_76; + case 0x7F: /* switch 1 */ + func_8005AA94(0x82); + goto block_76; + case 0x80: /* switch 1 */ + if (D_801643B8 < 4) { + func_8005AA6C(0x8C); + } else { + func_8005AA6C(0x82); + } + goto block_76; + case 0x82: /* switch 1 */ + func_8005AA80(); + goto block_76; + case 0x8C: /* switch 1 */ + D_8018D078 = -0x3E800000; + D_8018D0C8 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x8D: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x8E: /* switch 1 */ + D_8018D07C = -16.0f; + D_8018D0CC = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x8F: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x90: /* switch 1 */ + D_8018D080 = -16.0f; + D_8018D0D0 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x91: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x92: /* switch 1 */ + D_8018D084 = -16.0f; + D_8018D0D4 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x93: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x94: /* switch 1 */ + D_8018D088 = -16.0f; + D_8018D0D8 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x95: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x96: /* switch 1 */ + D_8018D08C = -16.0f; + D_8018D0DC = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x97: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x98: /* switch 1 */ + D_8018D090 = -16.0f; + D_8018D0E0 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x99: /* switch 1 */ + func_8005AA94(4); + goto block_76; + case 0x9A: /* switch 1 */ + D_8018D094 = -16.0f; + D_8018D0E4 = -32.0f; + func_8005AA4C(); + goto block_76; + case 0x9B: /* switch 1 */ + func_8005AA94(0x14); + goto block_76; + case 0x9C: /* switch 1 */ + func_8005AA80(); + goto block_76; + } + } else { + switch (temp_v0) { /* switch 2 */ + case 1: /* switch 2 */ + func_8005AAF0(); +block_76: + phi_v0_3 = D_8018D1CC; + break; + case 2: /* switch 2 */ + if (gModeSelection == 1) { + D_8018CA70.unk80 = 1; + } + D_8018CA70.unk78 = 1; + D_8018CA70.unk7A = 1; + D_8018CA70.unk7D = 1; + func_8005AA4C(); + goto block_76; + case 3: /* switch 2 */ + func_8005AA94(0); + goto block_76; + case 4: /* switch 2 */ + D_8018CA70.unk7B = 1; + D_8018CA70.unk7E = 1; + func_8005AA4C(); + goto block_76; + case 5: /* switch 2 */ + func_8005AA94(0); + goto block_76; + case 6: /* switch 2 */ + D_8018CA70.unk7C = 1; + D_8018CA70.unk7F = 1; + func_8005AA4C(); + func_8005AA80(); + goto block_76; + case 20: /* switch 2 */ + D_8018D078 = 0x41800000; + func_8005AA4C(); + goto block_76; + case 21: /* switch 2 */ + func_8005AA94(4); + goto block_76; + case 22: /* switch 2 */ + D_8018D07C = 16.0f; + func_8005AA4C(); + goto block_76; + case 23: /* switch 2 */ + func_8005AA94(4); + goto block_76; + case 24: /* switch 2 */ + D_8018D080 = 16.0f; + func_8005AA4C(); + goto block_76; + case 25: /* switch 2 */ + func_8005AA94(4); + goto block_76; + case 26: /* switch 2 */ + D_8018D084 = 16.0f; + func_8005AA4C(); + goto block_76; + case 27: /* switch 2 */ + func_8005AA94(0xA); + goto block_76; + case 28: /* switch 2 */ + func_8005AA80(); + goto block_76; + } + } + phi_v0_4 = phi_v0_3; + if (phi_v0_3 < 0x64) { + func_8005AB60(); + goto block_81; + } + if (phi_v0_3 < 0xC8) { + func_8005B7A0(); +block_81: + phi_v0_4 = D_8018D1CC; + } + if ((phi_v0_4 != 0) && (phi_v0_4 >= 0x14) && (phi_v0_4 < 0x1E)) { + phi_v0_5 = &D_8018D078; + phi_v1 = &D_8018D0C8; + phi_a0 = &D_8018D028; + do { + sp20 = phi_v0_5; + sp18 = phi_v1; + sp1C = phi_a0; + func_800413B8(phi_a0, *phi_v1, *phi_v0_5); + temp_v1 = phi_v1 + 4; + phi_v1 = temp_v1; + phi_a0 += 4; + if (*phi_a0 == *phi_v1) { + *phi_v0_5 = 0; + } + phi_v0_5 += 4; + } while (temp_v1 != &D_8018D0D8); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005B914.s") #endif @@ -2600,15 +3817,370 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005DAD8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8005DAF4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8005D794(f32, f32, void *, void *, f32, f32, f32, s32, s32); /* extern */ +? func_8005D7D8(void *, ?, ?); /* extern */ +? func_8005D800(void *, ?, ?); /* extern */ +? func_8005D82C(void *, ?, ?); /* extern */ +? func_8005DAD8(void *, ?, ?, ?); /* extern */ +s16 gCurrentCourseId; /* unable to generate initializer */ +u16 D_800E483E; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8005DAF4.s line 61. +void func_8005DAF4(void *arg0, s16 arg1, s32 arg2, s32 arg3) { + s32 sp48; + s32 sp44; + f32 sp40; + f32 sp3C; + f32 sp38; + f32 temp_f0; + f32 temp_f0_2; + s16 temp_v0; + s16 temp_v1; + s16 temp_v1_2; + s32 temp_lo; + s32 temp_lo_2; + s32 temp_v1_3; + s32 temp_v1_4; + void *temp_s0; + void *temp_s0_10; + void *temp_s0_11; + void *temp_s0_12; + void *temp_s0_13; + void *temp_s0_14; + void *temp_s0_15; + void *temp_s0_16; + void *temp_s0_2; + void *temp_s0_3; + void *temp_s0_4; + void *temp_s0_5; + void *temp_s0_6; + void *temp_s0_7; + void *temp_s0_8; + void *temp_s0_9; + void *temp_s2; + void *temp_s2_10; + void *temp_s2_11; + void *temp_s2_12; + void *temp_s2_13; + void *temp_s2_14; + void *temp_s2_15; + void *temp_s2_16; + void *temp_s2_17; + void *temp_s2_2; + void *temp_s2_3; + void *temp_s2_4; + void *temp_s2_5; + void *temp_s2_6; + void *temp_s2_7; + void *temp_s2_8; + void *temp_s2_9; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + void *temp_v0_7; + void *temp_v0_8; + void *temp_v0_9; + s32 phi_t1; + f32 phi_f12; + f32 phi_f14; + f32 phi_f2; + s32 phi_t3; + s16 phi_v1; + s16 phi_v1_2; + s16 phi_v1_3; + s16 phi_v1_4; + s16 phi_v1_5; + s16 phi_v1_6; + s16 phi_v1_7; + s16 phi_v1_8; + s16 phi_v1_9; + s16 phi_v1_10; + s16 phi_v0; + void *phi_s2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp48 = 0xFF; + temp_v0 = random_int(D_800E483E); + phi_t1 = 0xFF; + if ((temp_v0 == 0) || (temp_v0 == 4)) { + sp44 = 1; + sp3C = arg0->unk1D8 + 2.0f; + sp40 = arg0->unk1C8; + sp38 = arg0->unk1D0; + phi_t1 = arg0->unk1D4; + } + phi_f12 = sp3C; + phi_f14 = sp38; + phi_f2 = sp40; + phi_t3 = sp44; + if ((temp_v0 == 2) || (temp_v0 == 6)) { + phi_t1 = arg0->unk1EC; + phi_f12 = arg0->unk1F0 + 2.0f; + phi_f14 = arg0->unk1E8; + phi_f2 = arg0->unk1E0; + phi_t3 = 0; + } + switch (phi_t1) { + case 2: + if ((arg1 == 0) && ((temp_v0_2 = arg0 + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2 = arg0 + (arg1 * 0x48); + temp_s0 = temp_s2 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0, 2, 0x3EEB851F); + temp_v1 = gCurrentCourseId; + phi_v1 = temp_v1; + phi_s2 = temp_s2; + if ((temp_v1 == 1) || (temp_v1 == 7)) { + func_8005DAD8(temp_s0, 1, 0, 0x80); + phi_v1 = gCurrentCourseId; + } + phi_v1_2 = phi_v1; + if (phi_v1 == 0xB) { + func_8005DAD8(temp_s0, 7, 0, 0x80); + phi_v1_2 = gCurrentCourseId; + } + phi_v1_3 = phi_v1_2; + if (phi_v1_2 == 9) { + func_8005DAD8(temp_s0, 8, 0, 0x80); + phi_v1_3 = gCurrentCourseId; + } + phi_v1_4 = phi_v1_3; + if (phi_v1_3 == 0xE) { + func_8005DAD8(temp_s0, 9, 0, 0x80); + phi_v1_4 = gCurrentCourseId; + } + phi_v1_5 = phi_v1_4; + if (phi_v1_4 == 4) { + func_8005DAD8(temp_s0, 0xA, 0, 0x80); + phi_v1_5 = gCurrentCourseId; + } + if (phi_v1_5 == 0x12) { + func_8005DAD8(temp_s0, 0xB, 0, 0x80); + } + phi_v0 = random_int(0x10); + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_2 = arg0 + (arg1 * 0x48); + temp_s0_2 = temp_s2_2 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_2, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_2, 2, 0x3EEB851F); + temp_v1_2 = gCurrentCourseId; + phi_v1_6 = temp_v1_2; + phi_s2 = temp_s2_2; + if ((temp_v1_2 == 1) || (temp_v1_2 == 7)) { + func_8005DAD8(temp_s0_2, 1, 0, 0x80); + phi_v1_6 = gCurrentCourseId; + } + phi_v1_7 = phi_v1_6; + if (phi_v1_6 == 0xB) { + func_8005DAD8(temp_s0_2, 7, 0, 0x80); + phi_v1_7 = gCurrentCourseId; + } + phi_v1_8 = phi_v1_7; + if (phi_v1_7 == 9) { + func_8005DAD8(temp_s0_2, 8, 0, 0x80); + phi_v1_8 = gCurrentCourseId; + } + phi_v1_9 = phi_v1_8; + if (phi_v1_8 == 0xE) { + func_8005DAD8(temp_s0_2, 9, 0, 0x80); + phi_v1_9 = gCurrentCourseId; + } + phi_v1_10 = phi_v1_9; + if (phi_v1_9 == 4) { + func_8005DAD8(temp_s0_2, 0xA, 0, 0x80); + phi_v1_10 = gCurrentCourseId; + } + if (phi_v1_10 == 0x12) { + func_8005DAD8(temp_s0_2, 0xB, 0, 0x80); + } + phi_v0 = random_int(0x10); +block_105: + phi_s2->unk562 = phi_v0; + } + default: + return; + case 8: + if ((arg1 == 0) && ((temp_v0_3 = arg0 + (arg2 * 0x48), (temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2_3 = arg0 + (arg1 * 0x48); + temp_s0_3 = temp_s2_3 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_3, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_3, 3, 0x3F800000); + func_8005D800(temp_s0_3, 0xFFFFFF, 0xFF); + temp_v1_3 = arg1 * 8; + temp_s2_3->unk560 = temp_s2_3->unk560 - temp_v1_3; + temp_s2_3->unk562 = temp_s2_3->unk562 - temp_v1_3; + temp_s2_3->unk564 = temp_s2_3->unk564 - temp_v1_3; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_4 = arg0 + (arg1 * 0x48); + temp_s0_4 = temp_s2_4 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_4, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_4, 3, 0x3F800000); + func_8005D800(temp_s0_4, 0xFFFFFF, 0xFF); + temp_v1_4 = arg1 * 8; + temp_s2_4->unk560 = temp_s2_4->unk560 - temp_v1_4; + temp_s2_4->unk562 = temp_s2_4->unk562 - temp_v1_4; + temp_s2_4->unk564 = temp_s2_4->unk564 - temp_v1_4; + } + temp_s2_5 = arg0 + (arg1 * 0x48); + temp_s2_5->unk52C = temp_s2_5->unk52C - 1.5; + return; + case 7: + if ((arg1 == 0) && ((temp_v0_4 = arg0 + (arg2 * 0x48), (temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2_6 = arg0 + (arg1 * 0x48); + temp_s0_5 = temp_s2_6 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_5, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_5, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_5, 2, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_6; + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_7 = arg0 + (arg1 * 0x48); + temp_s0_6 = temp_s2_7 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_6, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_6, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_6, 2, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_7; + goto block_105; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 3: + if ((arg1 == 0) && ((temp_v0_5 = arg0 + (arg2 * 0x48), (temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2_8 = arg0 + (arg1 * 0x48); + temp_s0_7 = temp_s2_8 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_7, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_7, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_7, 3, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_8; + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_9 = arg0 + (arg1 * 0x48); + temp_s0_8 = temp_s2_9 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_8, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_8, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_8, 3, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_9; + goto block_105; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 10: + if ((arg1 == 0) && ((temp_v0_6 = arg0 + (arg2 * 0x48), (temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2_10 = arg0 + (arg1 * 0x48); + temp_s0_9 = temp_s2_10 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_9, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_9, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_9, 4, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_10; + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_11 = arg0 + (arg1 * 0x48); + temp_s0_10 = temp_s2_11 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_10, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_10, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_10, 4, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_11; + goto block_105; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 13: + if ((arg1 == 0) && ((temp_v0_7 = arg0 + (arg2 * 0x48), (temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2_12 = arg0 + (arg1 * 0x48); + temp_s0_11 = temp_s2_12 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_11, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_11, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_11, 5, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_12; + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_13 = arg0 + (arg1 * 0x48); + temp_s0_12 = temp_s2_13 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_12, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_12, 2, 0x3EEB851F); + func_8005D82C(temp_s0_12, 0xFFA54F, 0xAF); + func_8005DAD8(temp_s0_12, 5, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_13; + goto block_105; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 5: + case 11: + if ((arg1 == 0) && ((temp_v0_8 = arg0 + (arg2 * 0x48), (temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { + if (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f) { + temp_s2_14 = arg0 + (arg1 * 0x48); + temp_s0_13 = temp_s2_14 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_13, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_13, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_13, 6, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_14; + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 10.0f)) { + temp_s2_15 = arg0 + (arg1 * 0x48); + temp_s0_14 = temp_s2_15 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_14, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_14, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_14, 6, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_15; + goto block_105; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 1: + case 4: + case 6: + if ((arg1 == 0) && ((temp_v0_9 = arg0 + (arg2 * 0x48), (temp_v0_9->unk546 > 0)) || (temp_v0_9->unk544 == 0))) { + temp_f0 = arg0->unk94; + if (((((temp_f0 / 18.0f) * 216.0f) >= 30.0f) && ((temp_lo = arg0->unkC0 / 182, ((temp_lo < 0x15) == 0)) || (temp_lo < -0x14))) || ((arg0->unk22C - temp_f0) >= 0.04)) { + temp_s2_16 = arg0 + (arg1 * 0x48); + temp_s0_15 = temp_s2_16 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_15, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_15, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_15, 0, 0, 0x80); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_16; + goto block_105; + } + } else if (((arg0 + (arg2 * 0x48))->unk546 > 0) && (((temp_f0_2 = arg0->unk94, (((temp_f0_2 / 18.0f) * 216.0f) >= 30.0f)) && ((temp_lo_2 = arg0->unkC0 / 182, ((temp_lo_2 < 0x15) == 0)) || (temp_lo_2 < -0x14))) || ((arg0->unk22C - temp_f0_2) >= 0.04))) { + temp_s2_17 = arg0 + (arg1 * 0x48); + temp_s0_16 = temp_s2_17 + 0x528; + func_8005D794(phi_f12, phi_f14, arg0, temp_s0_16, phi_f2, phi_f12, phi_f14, phi_t1, phi_t3); + func_8005D7D8(temp_s0_16, 2, 0x3EEB851F); + func_8005DAD8(temp_s0_16, 0, 0, 0x80); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_17; + goto block_105; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005DAF4.s") #endif @@ -2694,29 +4266,693 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005EA94.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8005ED48: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8005D794(f32, void *, void *, f32, f32, f32, s32, s32); /* extern */ +? func_8005D7D8(void *, ?, ?); /* extern */ +? func_8005D800(void *, ?, ?); /* extern */ +? func_8005DAD8(void *, ?, ?, ?); /* extern */ +s16 gCurrentCourseId; /* unable to generate initializer */ +u16 D_800E4846; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8005ED48.s line 61. +void func_8005ED48(void *arg0, s16 arg1, s32 arg2, s32 arg3) { + s32 sp48; + s32 sp44; + f32 sp40; + f32 sp3C; + f32 sp38; + s16 temp_v0; + s16 temp_v1; + s16 temp_v1_2; + s32 temp_v1_3; + s32 temp_v1_4; + void *temp_s0; + void *temp_s0_10; + void *temp_s0_11; + void *temp_s0_12; + void *temp_s0_13; + void *temp_s0_14; + void *temp_s0_15; + void *temp_s0_16; + void *temp_s0_2; + void *temp_s0_3; + void *temp_s0_4; + void *temp_s0_5; + void *temp_s0_6; + void *temp_s0_7; + void *temp_s0_8; + void *temp_s0_9; + void *temp_s2; + void *temp_s2_10; + void *temp_s2_11; + void *temp_s2_12; + void *temp_s2_13; + void *temp_s2_14; + void *temp_s2_15; + void *temp_s2_16; + void *temp_s2_17; + void *temp_s2_2; + void *temp_s2_3; + void *temp_s2_4; + void *temp_s2_5; + void *temp_s2_6; + void *temp_s2_7; + void *temp_s2_8; + void *temp_s2_9; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + void *temp_v0_7; + void *temp_v0_8; + void *temp_v0_9; + s32 phi_t2; + f32 phi_f12; + f32 phi_f0; + f32 phi_f2; + s32 phi_t3; + s16 phi_v1; + s16 phi_v1_2; + s16 phi_v1_3; + s16 phi_v1_4; + s16 phi_v1_5; + s16 phi_v1_6; + s16 phi_v1_7; + s16 phi_v1_8; + s16 phi_v1_9; + s16 phi_v1_10; + s16 phi_v0; + void *phi_s2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp48 = 0xFF; + temp_v0 = random_int(D_800E4846); + phi_t2 = 0xFF; + if ((temp_v0 == 2) || (temp_v0 == 4)) { + sp44 = 1; + sp3C = arg0->unk1D8 + 2.0f; + sp40 = arg0->unk1C8; + sp38 = arg0->unk1D0; + phi_t2 = arg0->unk1D4; + } + phi_f12 = sp38; + phi_f0 = sp40; + phi_f2 = sp3C; + phi_t3 = sp44; + if ((temp_v0 == 0) || (temp_v0 == 6)) { + phi_t2 = arg0->unk1EC; + phi_f12 = arg0->unk1E8; + phi_f0 = arg0->unk1E0; + phi_f2 = arg0->unk1F0 + 2.0f; + phi_t3 = 0; + } + switch (phi_t2) { + case 2: + if ((arg1 == 0) && ((temp_v0_2 = arg0 + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + temp_s2 = arg0 + (arg1 * 0x48); + temp_s0 = temp_s2 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0, 5, 0x3EEB851F); + temp_v1 = gCurrentCourseId; + phi_v1 = temp_v1; + phi_s2 = temp_s2; + if ((temp_v1 == 1) || (temp_v1 == 7)) { + func_8005DAD8(temp_s0, 1, 0, 0x80); + phi_v1 = gCurrentCourseId; + } + phi_v1_2 = phi_v1; + if (phi_v1 == 0xB) { + func_8005DAD8(temp_s0, 7, 0, 0x80); + phi_v1_2 = gCurrentCourseId; + } + phi_v1_3 = phi_v1_2; + if (phi_v1_2 == 9) { + func_8005DAD8(temp_s0, 8, 0, 0x80); + phi_v1_3 = gCurrentCourseId; + } + phi_v1_4 = phi_v1_3; + if (phi_v1_3 == 0xE) { + func_8005DAD8(temp_s0, 9, 0, 0x80); + phi_v1_4 = gCurrentCourseId; + } + phi_v1_5 = phi_v1_4; + if (phi_v1_4 == 4) { + func_8005DAD8(temp_s0, 0xA, 0, 0x80); + phi_v1_5 = gCurrentCourseId; + } + if (phi_v1_5 == 0x12) { + func_8005DAD8(temp_s0, 0xB, 0, 0x80); + } + phi_v0 = random_int(0x10); + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_2 = arg0 + (arg1 * 0x48); + temp_s0_2 = temp_s2_2 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_2, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_2, 5, 0x3EEB851F); + temp_v1_2 = gCurrentCourseId; + phi_v1_6 = temp_v1_2; + phi_s2 = temp_s2_2; + if ((temp_v1_2 == 1) || (temp_v1_2 == 7)) { + func_8005DAD8(temp_s0_2, 1, 0, 0x80); + phi_v1_6 = gCurrentCourseId; + } + phi_v1_7 = phi_v1_6; + if (phi_v1_6 == 0xB) { + func_8005DAD8(temp_s0_2, 7, 0, 0x80); + phi_v1_7 = gCurrentCourseId; + } + phi_v1_8 = phi_v1_7; + if (phi_v1_7 == 9) { + func_8005DAD8(temp_s0_2, 8, 0, 0x80); + phi_v1_8 = gCurrentCourseId; + } + phi_v1_9 = phi_v1_8; + if (phi_v1_8 == 0xE) { + func_8005DAD8(temp_s0_2, 9, 0, 0x80); + phi_v1_9 = gCurrentCourseId; + } + phi_v1_10 = phi_v1_9; + if (phi_v1_9 == 4) { + func_8005DAD8(temp_s0_2, 0xA, 0, 0x80); + phi_v1_10 = gCurrentCourseId; + } + if (phi_v1_10 == 0x12) { + func_8005DAD8(temp_s0_2, 0xB, 0, 0x80); + } + phi_v0 = random_int(0x10); +block_83: + phi_s2->unk562 = phi_v0; + } + default: + return; + case 8: + if ((arg1 == 0) && ((temp_v0_3 = arg0 + (arg2 * 0x48), (temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { + temp_s2_3 = arg0 + (arg1 * 0x48); + temp_s0_3 = temp_s2_3 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_3, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_3, 5, 0x3DCCCCCD); + func_8005D800(temp_s0_3, 0xFFFFFF, 0xFF); + temp_v1_3 = arg1 * 8; + temp_s2_3->unk560 = temp_s2_3->unk560 - temp_v1_3; + temp_s2_3->unk562 = temp_s2_3->unk562 - temp_v1_3; + temp_s2_3->unk564 = temp_s2_3->unk564 - temp_v1_3; + } else if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_4 = arg0 + (arg1 * 0x48); + temp_s0_4 = temp_s2_4 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_4, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_4, 5, 0x3DCCCCCD); + func_8005D800(temp_s0_4, 0xFFFFFF, 0xFF); + temp_v1_4 = arg1 * 8; + temp_s2_4->unk560 = temp_s2_4->unk560 - temp_v1_4; + temp_s2_4->unk562 = temp_s2_4->unk562 - temp_v1_4; + temp_s2_4->unk564 = temp_s2_4->unk564 - temp_v1_4; + } + temp_s2_5 = arg0 + (arg1 * 0x48); + temp_s2_5->unk52C = temp_s2_5->unk52C - 1.5; + return; + case 7: + if ((arg1 == 0) && ((temp_v0_4 = arg0 + (arg2 * 0x48), (temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { + temp_s2_6 = arg0 + (arg1 * 0x48); + temp_s0_5 = temp_s2_6 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_5, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_5, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_5, 2, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_6; + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_7 = arg0 + (arg1 * 0x48); + temp_s0_6 = temp_s2_7 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_6, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_6, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_6, 2, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_7; + goto block_83; + } + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + case 3: + if ((arg1 == 0) && ((temp_v0_5 = arg0 + (arg2 * 0x48), (temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { + temp_s2_8 = arg0 + (arg1 * 0x48); + temp_s0_7 = temp_s2_8 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_7, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_7, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_7, 3, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_8; + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_9 = arg0 + (arg1 * 0x48); + temp_s0_8 = temp_s2_9 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_8, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_8, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_8, 3, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_9; + goto block_83; + } + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + case 10: + if ((arg1 == 0) && ((temp_v0_6 = arg0 + (arg2 * 0x48), (temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { + temp_s2_10 = arg0 + (arg1 * 0x48); + temp_s0_9 = temp_s2_10 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_9, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_9, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_9, 4, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_10; + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_11 = arg0 + (arg1 * 0x48); + temp_s0_10 = temp_s2_11 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_10, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_10, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_10, 4, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_11; + goto block_83; + } + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + case 13: + if ((arg1 == 0) && ((temp_v0_7 = arg0 + (arg2 * 0x48), (temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { + temp_s2_12 = arg0 + (arg1 * 0x48); + temp_s0_11 = temp_s2_12 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_11, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_11, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_11, 5, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_12; + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_13 = arg0 + (arg1 * 0x48); + temp_s0_12 = temp_s2_13 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_12, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_12, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_12, 5, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_13; + goto block_83; + } + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + case 5: + case 11: + if ((arg1 == 0) && ((temp_v0_8 = arg0 + (arg2 * 0x48), (temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { + temp_s2_14 = arg0 + (arg1 * 0x48); + temp_s0_13 = temp_s2_14 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_13, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_13, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_13, 6, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_14; + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_15 = arg0 + (arg1 * 0x48); + temp_s0_14 = temp_s2_15 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_14, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_14, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_14, 6, 1, 0xA8); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_15; + goto block_83; + } + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + case 1: + case 4: + case 6: + if ((arg1 == 0) && ((temp_v0_9 = arg0 + (arg2 * 0x48), (temp_v0_9->unk546 > 0)) || (temp_v0_9->unk544 == 0))) { + temp_s2_16 = arg0 + (arg1 * 0x48); + temp_s0_15 = temp_s2_16 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_15, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_15, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_15, 0, 0, 0x80); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_16; + goto block_83; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_17 = arg0 + (arg1 * 0x48); + temp_s0_16 = temp_s2_17 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_16, phi_f0, phi_f2, phi_f12, phi_t2, phi_t3); + func_8005D7D8(temp_s0_16, 5, 0x3EEB851F); + func_8005DAD8(temp_s0_16, 0, 0, 0x80); + phi_v0 = random_int(0x10); + phi_s2 = temp_s2_17; + goto block_83; + } + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005ED48.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8005F90C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8005D794(f32, void *, void *, f32, f32, f32, s32, s32); /* extern */ +? func_8005D7D8(void *, ?, ?); /* extern */ +? func_8005D800(void *, ?, ?); /* extern */ +? func_8005DAD8(void *, ?, ?, ?); /* extern */ +s16 random_int(?); /* extern */ +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8005F90C.s line 39. +void func_8005F90C(void *arg0, s16 arg1, s32 arg2, s32 arg3) { + s16 temp_v1; + s16 temp_v1_2; + s32 temp_t2; + s32 temp_t6; + void *temp_s0; + void *temp_s0_10; + void *temp_s0_11; + void *temp_s0_12; + void *temp_s0_13; + void *temp_s0_14; + void *temp_s0_15; + void *temp_s0_16; + void *temp_s0_2; + void *temp_s0_3; + void *temp_s0_4; + void *temp_s0_5; + void *temp_s0_6; + void *temp_s0_7; + void *temp_s0_8; + void *temp_s0_9; + void *temp_s2; + void *temp_s2_10; + void *temp_s2_11; + void *temp_s2_12; + void *temp_s2_13; + void *temp_s2_14; + void *temp_s2_15; + void *temp_s2_16; + void *temp_s2_17; + void *temp_s2_2; + void *temp_s2_3; + void *temp_s2_4; + void *temp_s2_5; + void *temp_s2_6; + void *temp_s2_7; + void *temp_s2_8; + void *temp_s2_9; + void *temp_v0; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + void *temp_v0_7; + void *temp_v0_8; + s32 phi_v0; + f32 phi_f12; + f32 phi_f0; + f32 phi_f2; + s32 phi_t1; + s16 phi_v1; + s16 phi_v1_2; + s16 phi_v1_3; + s16 phi_v1_4; + s16 phi_v1_5; + s16 phi_v1_6; + s16 phi_v1_7; + s16 phi_v1_8; + s16 phi_v1_9; + s16 phi_v1_10; + s16 phi_v0_2; + void *phi_s2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_t1 = 0; + if ((arg0->unkBC & 0x80) == 0x80) { + phi_v0 = arg0->unk1D4; + phi_f12 = arg0->unk1C; + phi_f0 = arg0->unk14; + phi_f2 = arg0->unk18 - arg0->unk70; + phi_t1 = 1; + } else { + phi_v0 = arg0->unk1EC; + phi_f12 = arg0->unk1C; + phi_f0 = arg0->unk14; + phi_f2 = arg0->unk18 - arg0->unk70; + } + switch (phi_v0) { + case 2: + if ((arg1 == 0) && ((temp_v0 = arg0 + (arg2 * 0x48), (temp_v0->unk546 > 0)) || (temp_v0->unk544 == 0))) { + temp_s2 = arg0 + (arg1 * 0x48); + temp_s0 = temp_s2 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0, 4, 0x3EEB851F); + temp_v1 = gCurrentCourseId; + phi_v1 = temp_v1; + phi_s2 = temp_s2; + if ((temp_v1 == 1) || (temp_v1 == 7)) { + func_8005DAD8(temp_s0, 1, 0, 0x80); + phi_v1 = gCurrentCourseId; + } + phi_v1_2 = phi_v1; + if (phi_v1 == 0xB) { + func_8005DAD8(temp_s0, 7, 0, 0x80); + phi_v1_2 = gCurrentCourseId; + } + phi_v1_3 = phi_v1_2; + if (phi_v1_2 == 9) { + func_8005DAD8(temp_s0, 8, 0, 0x80); + phi_v1_3 = gCurrentCourseId; + } + phi_v1_4 = phi_v1_3; + if (phi_v1_3 == 0xE) { + func_8005DAD8(temp_s0, 9, 0, 0x80); + phi_v1_4 = gCurrentCourseId; + } + phi_v1_5 = phi_v1_4; + if (phi_v1_4 == 4) { + func_8005DAD8(temp_s0, 0xA, 0, 0x80); + phi_v1_5 = gCurrentCourseId; + } + if (phi_v1_5 == 0x12) { + func_8005DAD8(temp_s0, 0xB, 0, 0x80); + } + phi_v0_2 = random_int(0x10); + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_2 = arg0 + (arg1 * 0x48); + temp_s0_2 = temp_s2_2 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_2, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_2, 4, 0x3EEB851F); + temp_v1_2 = gCurrentCourseId; + phi_v1_6 = temp_v1_2; + phi_s2 = temp_s2_2; + if ((temp_v1_2 == 1) || (temp_v1_2 == 7)) { + func_8005DAD8(temp_s0_2, 1, 0, 0x80); + phi_v1_6 = gCurrentCourseId; + } + phi_v1_7 = phi_v1_6; + if (phi_v1_6 == 0xB) { + func_8005DAD8(temp_s0_2, 7, 0, 0x80); + phi_v1_7 = gCurrentCourseId; + } + phi_v1_8 = phi_v1_7; + if (phi_v1_7 == 9) { + func_8005DAD8(temp_s0_2, 8, 0, 0x80); + phi_v1_8 = gCurrentCourseId; + } + phi_v1_9 = phi_v1_8; + if (phi_v1_8 == 0xE) { + func_8005DAD8(temp_s0_2, 9, 0, 0x80); + phi_v1_9 = gCurrentCourseId; + } + phi_v1_10 = phi_v1_9; + if (phi_v1_9 == 4) { + func_8005DAD8(temp_s0_2, 0xA, 0, 0x80); + phi_v1_10 = gCurrentCourseId; + } + if (phi_v1_10 == 0x12) { + func_8005DAD8(temp_s0_2, 0xB, 0, 0x80); + } + phi_v0_2 = random_int(0x10); +block_80: + phi_s2->unk562 = phi_v0_2; + } + default: + return; + case 8: + if ((arg1 == 0) && ((temp_v0_2 = arg0 + (arg2 * 0x48), (temp_v0_2->unk546 > 0)) || (temp_v0_2->unk544 == 0))) { + temp_s2_3 = arg0 + (arg1 * 0x48); + temp_s0_3 = temp_s2_3 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_3, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_3, 4, 0x3DCCCCCD); + func_8005D800(temp_s0_3, 0xFFFFFF, 0xFF); + temp_t6 = arg1 * 8; + temp_s2_3->unk560 = temp_s2_3->unk560 - temp_t6; + temp_s2_3->unk562 = temp_s2_3->unk562 - temp_t6; + temp_s2_3->unk564 = temp_s2_3->unk564 - temp_t6; + } else if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_4 = arg0 + (arg1 * 0x48); + temp_s0_4 = temp_s2_4 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_4, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_4, 4, 0x3DCCCCCD); + func_8005D800(temp_s0_4, 0xFFFFFF, 0xFF); + temp_t2 = arg1 * 8; + temp_s2_4->unk560 = temp_s2_4->unk560 - temp_t2; + temp_s2_4->unk562 = temp_s2_4->unk562 - temp_t2; + temp_s2_4->unk564 = temp_s2_4->unk564 - temp_t2; + } + temp_s2_5 = arg0 + (arg1 * 0x48); + temp_s2_5->unk52C = temp_s2_5->unk52C - 1.5; + return; + case 7: + if ((arg1 == 0) && ((temp_v0_3 = arg0 + (arg2 * 0x48), (temp_v0_3->unk546 > 0)) || (temp_v0_3->unk544 == 0))) { + temp_s2_6 = arg0 + (arg1 * 0x48); + temp_s0_5 = temp_s2_6 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_5, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_5, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_5, 2, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_6; + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_7 = arg0 + (arg1 * 0x48); + temp_s0_6 = temp_s2_7 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_6, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_6, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_6, 2, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_7; + goto block_80; + } + /* Duplicate return node #81. Try simplifying control flow for better match */ + return; + case 3: + if ((arg1 == 0) && ((temp_v0_4 = arg0 + (arg2 * 0x48), (temp_v0_4->unk546 > 0)) || (temp_v0_4->unk544 == 0))) { + temp_s2_8 = arg0 + (arg1 * 0x48); + temp_s0_7 = temp_s2_8 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_7, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_7, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_7, 3, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_8; + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_9 = arg0 + (arg1 * 0x48); + temp_s0_8 = temp_s2_9 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_8, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_8, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_8, 3, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_9; + goto block_80; + } + /* Duplicate return node #81. Try simplifying control flow for better match */ + return; + case 10: + if ((arg1 == 0) && ((temp_v0_5 = arg0 + (arg2 * 0x48), (temp_v0_5->unk546 > 0)) || (temp_v0_5->unk544 == 0))) { + temp_s2_10 = arg0 + (arg1 * 0x48); + temp_s0_9 = temp_s2_10 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_9, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_9, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_9, 4, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_10; + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_11 = arg0 + (arg1 * 0x48); + temp_s0_10 = temp_s2_11 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_10, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_10, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_10, 4, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_11; + goto block_80; + } + /* Duplicate return node #81. Try simplifying control flow for better match */ + return; + case 13: + if ((arg1 == 0) && ((temp_v0_6 = arg0 + (arg2 * 0x48), (temp_v0_6->unk546 > 0)) || (temp_v0_6->unk544 == 0))) { + temp_s2_12 = arg0 + (arg1 * 0x48); + temp_s0_11 = temp_s2_12 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_11, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_11, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_11, 5, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_12; + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_13 = arg0 + (arg1 * 0x48); + temp_s0_12 = temp_s2_13 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_12, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_12, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_12, 5, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_13; + goto block_80; + } + /* Duplicate return node #81. Try simplifying control flow for better match */ + return; + case 5: + case 11: + if ((arg1 == 0) && ((temp_v0_7 = arg0 + (arg2 * 0x48), (temp_v0_7->unk546 > 0)) || (temp_v0_7->unk544 == 0))) { + temp_s2_14 = arg0 + (arg1 * 0x48); + temp_s0_13 = temp_s2_14 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_13, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_13, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_13, 6, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_14; + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_15 = arg0 + (arg1 * 0x48); + temp_s0_14 = temp_s2_15 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_14, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_14, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_14, 6, 1, 0xA8); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_15; + goto block_80; + } + /* Duplicate return node #81. Try simplifying control flow for better match */ + return; + case 1: + case 4: + case 6: + if ((arg1 == 0) && ((temp_v0_8 = arg0 + (arg2 * 0x48), (temp_v0_8->unk546 > 0)) || (temp_v0_8->unk544 == 0))) { + temp_s2_16 = arg0 + (arg1 * 0x48); + temp_s0_15 = temp_s2_16 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_15, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_15, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_15, 0, 0, 0x80); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_16; + goto block_80; + } + if ((arg0 + (arg2 * 0x48))->unk546 > 0) { + temp_s2_17 = arg0 + (arg1 * 0x48); + temp_s0_16 = temp_s2_17 + 0x528; + func_8005D794(phi_f12, arg0, temp_s0_16, phi_f0, phi_f2, phi_f12, phi_v0, phi_t1); + func_8005D7D8(temp_s0_16, 4, 0x3EEB851F); + func_8005DAD8(temp_s0_16, 0, 0, 0x80); + phi_v0_2 = random_int(0x10); + phi_s2 = temp_s2_17; + goto block_80; + } + /* Duplicate return node #81. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005F90C.s") #endif @@ -3576,15 +5812,193 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80062484.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800624D8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8005DAD8(void *, s16, ?, ?); /* extern */ +? func_80062484(void *, void *, s32); /* extern */ +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_800624D8.s line 20. +void func_800624D8(void *arg0, s16 arg1, s8 arg2, s8 arg3) { + s16 temp_v0; + s32 temp_s1; + s32 temp_s1_2; + s32 temp_s1_3; + s32 temp_s1_4; + s32 temp_s1_5; + s32 temp_s1_6; + s32 temp_s1_7; + s32 temp_s1_8; + s32 temp_s1_9; + u16 temp_t6; + void *phi_s0; + s16 phi_v0; + s16 phi_v0_2; + s16 phi_v0_3; + s16 phi_v0_4; + s16 phi_v0_5; + s32 phi_s1; + void *phi_s0_2; + s32 phi_s1_2; + void *phi_s0_3; + s32 phi_s1_3; + void *phi_s0_4; + s32 phi_s1_4; + void *phi_s0_5; + s32 phi_s1_5; + void *phi_s0_6; + s32 phi_s1_6; + void *phi_s0_7; + s32 phi_s1_7; + void *phi_s0_8; + s32 phi_s1_8; + void *phi_s0_9; + s32 phi_s1_9; + s16 phi_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unkF8; + switch (temp_t6) { + case 2: + phi_s0 = arg0 + 0xAC8; + phi_s1 = 0; + do { + temp_v0 = gCurrentCourseId; + phi_v0 = temp_v0; + if ((temp_v0 == 1) || (temp_v0 == 7)) { + func_8005DAD8(phi_s0, 1, 0, 0xA8); + phi_v0 = gCurrentCourseId; + } + phi_v0_2 = phi_v0; + if (phi_v0 == 0xB) { + func_8005DAD8(phi_s0, 7, 0, 0xA8); + phi_v0_2 = gCurrentCourseId; + } + phi_v0_3 = phi_v0_2; + if (phi_v0_2 == 9) { + func_8005DAD8(phi_s0, 8, 0, 0xA8); + phi_v0_3 = gCurrentCourseId; + } + phi_v0_4 = phi_v0_3; + if (phi_v0_3 == 0xE) { + func_8005DAD8(phi_s0, 9, 0, 0xA8); + phi_v0_4 = gCurrentCourseId; + } + phi_v0_5 = phi_v0_4; + if (phi_v0_4 == 4) { + func_8005DAD8(phi_s0, 0xA, 0, 0xA8); + phi_v0_5 = gCurrentCourseId; + } + if (phi_v0_5 == 0x12) { + func_8005DAD8(phi_s0, 0xB, 0, 0xA8); + } + func_80062484(arg0, phi_s0, phi_s1); + temp_s1 = phi_s1 + 1; + phi_s0 += 0x48; + phi_s1 = temp_s1; + } while (temp_s1 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + case 8: + phi_s0_2 = arg0 + 0xAC8; + phi_s1_2 = 0; + do { + func_8005DAD8(phi_s0_2, 2, 1, 0xA8); + func_80062484(arg0, phi_s0_2, phi_s1_2); + temp_s1_2 = phi_s1_2 + 1; + phi_s0_2 += 0x48; + phi_s1_2 = temp_s1_2; + } while (temp_s1_2 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + case 7: + phi_s0_3 = arg0 + 0xAC8; + phi_s1_3 = 0; + do { + func_8005DAD8(phi_s0_3, 2, 1, 0xA8); + func_80062484(arg0, phi_s0_3, phi_s1_3); + temp_s1_3 = phi_s1_3 + 1; + phi_s0_3 += 0x48; + phi_s1_3 = temp_s1_3; + } while (temp_s1_3 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + case 3: + phi_s0_4 = arg0 + 0xAC8; + phi_s1_4 = 0; + do { + func_8005DAD8(phi_s0_4, 3, 1, 0xA8); + func_80062484(arg0, phi_s0_4, phi_s1_4); + temp_s1_4 = phi_s1_4 + 1; + phi_s0_4 += 0x48; + phi_s1_4 = temp_s1_4; + } while (temp_s1_4 != 0xA); + phi_t6 = arg0->unk44 & 0xFEFF; +block_42: + arg0->unk44 = phi_t6; + return; + case 10: + phi_s0_5 = arg0 + 0xAC8; + phi_s1_5 = 0; + do { + func_8005DAD8(phi_s0_5, 4, 1, 0xA8); + func_80062484(arg0, phi_s0_5, phi_s1_5); + temp_s1_5 = phi_s1_5 + 1; + phi_s0_5 += 0x48; + phi_s1_5 = temp_s1_5; + } while (temp_s1_5 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + case 13: + phi_s0_6 = arg0 + 0xAC8; + phi_s1_6 = 0; + do { + func_8005DAD8(phi_s0_6, 5, 1, 0xA8); + func_80062484(arg0, phi_s0_6, phi_s1_6); + temp_s1_6 = phi_s1_6 + 1; + phi_s0_6 += 0x48; + phi_s1_6 = temp_s1_6; + } while (temp_s1_6 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + case 5: + case 11: + phi_s0_7 = arg0 + 0xAC8; + phi_s1_7 = 0; + do { + func_8005DAD8(phi_s0_7, 6, 1, 0xA8); + func_80062484(arg0, phi_s0_7, phi_s1_7); + temp_s1_7 = phi_s1_7 + 1; + phi_s0_7 += 0x48; + phi_s1_7 = temp_s1_7; + } while (temp_s1_7 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + case 1: + case 4: + case 6: + phi_s0_8 = arg0 + 0xAC8; + phi_s1_8 = 0; + do { + func_8005DAD8(phi_s0_8, 0, 0, 0xA8); + func_80062484(arg0, phi_s0_8, phi_s1_8); + temp_s1_8 = phi_s1_8 + 1; + phi_s0_8 += 0x48; + phi_s1_8 = temp_s1_8; + } while (temp_s1_8 != 0xA); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + default: + phi_s0_9 = arg0 + 0xAC8; + phi_s1_9 = 0; + do { + func_8005DAD8(phi_s0_9, 0, 0, 0xA8); + func_80062484(arg0, phi_s0_9, phi_s1_9); + temp_s1_9 = phi_s1_9 + 1; + phi_s0_9 += 0x48; + phi_s1_9 = temp_s1_9; + } while (temp_s1_9 != 0xA); + phi_t6 = arg0->unk44 & 0xFEFF; + goto block_42; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800624D8.s") #endif @@ -9022,71 +11436,566 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006BB34.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006C6AC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8005DA30(s16, s32, s8, s32); /* extern */ +? func_8005DAF4(s16, s32, s8, s32); /* extern */ +? func_8005EA94(s16, s32, s8, s32); /* extern */ +? func_8005ED48(s16, s32, s8, s32); /* extern */ +? func_8005F90C(s16, s32, s8, s32); /* extern */ +? func_80060BCC(s16, s32, s8, s32); /* extern */ +? func_80062F98(s16, s8, s8); /* extern */ +? func_80063408(s16, s8, s8); /* extern */ +? func_800635D4(s16, s8, s8); /* extern */ +? func_800639DC(s16, s8, s8); /* extern */ +? func_80063BD4(s16, s8, s8); /* extern */ +? func_80063D58(s16, s8, s8); /* extern */ +? func_800643A8(s16, s8, s8); /* extern */ +extern ? D_801652A0; -Unable to determine jump table for jr instruction at func_8006C6AC.s line 35. +void func_8006C6AC(void *arg0, s16 arg1, s8 arg2, s8 arg3) { + s32 sp28; + f32 temp_f0; + s32 temp_v0; + s32 temp_v0_3; + u16 temp_t2; + void *temp_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg1 - 1; + sp28 = temp_v0; + if (temp_v0 < 0) { + sp28 = 9; + } + temp_v0_2 = arg0 + (arg1 * 0x48); + if (temp_v0_2->unk544 == 1) { + temp_t2 = temp_v0_2->unk53A; + switch (temp_t2) { + case 1: + func_80063408(arg1, arg2, arg3); + return; + case 2: + func_800635D4(arg1, arg2, arg3); + return; + case 3: + func_80063BD4(arg1, arg2, arg3); + return; + case 4: + func_800643A8(arg1, arg2, arg3); + return; + case 5: + func_800639DC(arg1, arg2, arg3); + return; + case 9: + func_80063D58(arg1, arg2, arg3); + return; + case 11: + func_80062F98(arg1, arg2, arg3); + return; + } + } else { + if ((arg0->unkDE & 1) != 0) { + func_80060BCC(arg1, sp28, arg2, arg3); + return; + } + temp_v0_3 = arg0->unkBC; + if (((temp_v0_3 & 8) == 0) && ((temp_v0_3 & 2) == 0)) { + if (((temp_v0_3 & 0x10) == 0x10) && ((arg0->unk0 & 0x4000) == 0x4000)) { + func_8005DA30(arg1, sp28, arg2, arg3); + return; + } + temp_f0 = *(&D_801652A0 + (arg2 * 4)); + if (((temp_f0 - arg0->unk1F0) >= 3.5) || ((temp_f0 - arg0->unk1D8) >= 3.5)) { + func_8005EA94(arg1, sp28, arg2, arg3); + return; + } + if (((temp_v0_3 & 0x80) == 0x80) || ((temp_v0_3 & 0x40) == 0x40)) { + func_8005F90C(arg1, sp28, arg2, arg3); + return; + } + if ((((temp_v0_3 & 0x4000) != 0) && ((arg0->unk0 & 0x2000) == 0)) || ((temp_v0_3 & 0x800) != 0) || ((temp_v0_3 & 0x20) != 0) || ((arg0->unk44 & 0x4000) != 0)) { + func_8005ED48(arg1, sp28, arg2, arg3); + return; + } + func_8005DAF4(arg1, sp28, arg2, arg3); + /* Duplicate return node #32. Try simplifying control flow for better match */ + return; + } + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006C6AC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006C9B8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800612F8(s16, s32, s8, s32); /* extern */ +? func_80061430(s16, s32, s8, s32); /* extern */ +? func_800615AC(s16, s32, s8, s32); /* extern */ +? func_8006199C(s16, s32, s8, s32); /* extern */ +? func_80061A34(s16, s32, s8, s32); /* extern */ +? func_80061D4C(s16, s32, s8, s32); /* extern */ +? func_80061EF4(s16, s32, s8, s32); /* extern */ +? func_800621BC(s16, s32, s8, s32); /* extern */ +? func_800624D8(s16, s32, s8, s32); /* extern */ +? func_800644E8(s16, s8, s8); /* extern */ +? func_80064664(s16, s8, s8); /* extern */ +? func_800647C8(s16, s8, s8); /* extern */ +? func_800648E4(s16, s8, s8); /* extern */ +? func_80064988(s16, s8, s8); /* extern */ +? func_800649F4(s16, s8, s8); /* extern */ +? func_80064B30(s16, s8, s8); /* extern */ +? func_80064C74(s16, s8, s8); /* extern */ +extern ? D_8018D930; -Unable to determine jump table for jr instruction at func_8006C9B8.s line 39. +void func_8006C9B8(void *arg0, s16 arg1, s8 arg2, s8 arg3) { + s32 sp28; + s16 temp_a2; + s16 temp_a3; + s16 temp_v0_3; + s32 temp_v0; + s32 temp_v1; + u16 temp_t3; + u16 temp_v0_4; + void *temp_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg1 - 1; + sp28 = temp_v0; + if (temp_v0 < 0) { + sp28 = 9; + } + temp_v0_2 = arg0 + (arg1 * 0x48); + if (temp_v0_2->unkAE4 == 1) { + temp_t3 = temp_v0_2->unkADA; + switch (temp_t3) { + case 1: + func_800644E8(arg1, arg2, arg3); + return; + case 2: + func_800649F4(arg1, arg2, arg3); + return; + case 3: + func_80064C74(arg1, arg2, arg3); + return; + case 4: + func_800647C8(arg1, arg2, arg3); + return; + case 5: + func_80064B30(arg1, arg2, arg3); + return; + case 6: + func_800648E4(arg1, arg2, arg3); + return; + case 7: + func_80064988(arg1, arg2, arg3); + return; + case 8: + func_80064C74(arg1, arg2, arg3); + return; + case 9: + func_80064664(arg1, arg2, arg3); + return; + } + } else { + temp_a3 = arg0->unk44; + if ((temp_a3 & 0x1000) != 0) { + func_80061430(arg1, sp28, arg2, arg3); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + temp_a2 = arg0->unkCA; + if (((temp_a2 & 0x1000) == 0x1000) || ((temp_v0_3 = arg0->unkE0, ((temp_v0_3 < 2) != 0)) && ((arg0->unkBC << 7) < 0)) || ((temp_v1 = arg0->unkBC, ((temp_v0_3 < 2) != 0)) && ((temp_v1 << 6) < 0)) || ((temp_v1 & 0x400) != 0)) { + func_8006199C(arg1, sp28, arg2, arg3); + arg0->unk46 = arg0->unk46 & 0xFFF7; + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + if ((temp_a2 & 0x2000) == 0x2000) { + func_80061A34(arg1, sp28, arg2, arg3); + arg0->unk46 = arg0->unk46 & 0xFFF7; + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + if (((temp_v1 & 0x200) != 0) && ((gCourseTimer - *(&D_8018D930 + (arg2 * 4))) < 9)) { + func_800615AC(arg1, sp28, arg2, arg3); + arg0->unk46 = arg0->unk46 & 0xFFF7; + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + temp_v0_4 = arg0->unk46; + if ((temp_v0_4 & 8) == 8) { + func_800612F8(arg1, sp28, arg2, arg3); + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + if (((temp_v0_4 & 0x20) == 0x20) && (((arg0->unk94 / 18.0f) * 216.0f) >= 20.0f)) { + func_80061D4C(arg1, sp28, arg2, arg3); + arg0->unk46 = arg0->unk46 & 0xFFF7; + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + if (((temp_v1 & 0x2000) != 0) && ((arg0->unk0 & 0x4000) != 0)) { + func_800621BC(arg1, sp28, arg2, arg3); + return; + } + if ((((temp_v1 << 0xA) < 0) || (temp_v1 & 0x100000)) && ((arg0->unk0 & 0x4000) == 0x4000)) { + func_80061EF4(arg1, sp28, arg2, arg3); + arg0->unk46 = arg0->unk46 & 0xFFF7; + arg0->unk44 = arg0->unk44 & 0xFEFF; + return; + } + if ((temp_a3 & 0x100) == 0x100) { + func_800624D8(arg1, sp28, arg2, arg3); + arg0->unk46 = arg0->unk46 & 0xFFF7; + } + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006C9B8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006CEC0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80060504(s16, s32, s8, s32); /* extern */ +? func_80060B14(s16, s32, s8, s32); /* extern */ +? func_80060F50(s16, s32, s8, s32); /* extern */ +? func_80061094(s16, s32, s8, s32); /* extern */ +? func_80061224(s16, s32, s8, s32); /* extern */ +? func_80062C74(s16, s8, s8); /* extern */ +? func_800630C0(s16, s8, s8); /* extern */ +? func_800631A8(s16, s8, s8); /* extern */ +? func_80063268(s16, s8, s8); /* extern */ +? func_80064184(s16, s8, s8); /* extern */ -Unable to determine jump table for jr instruction at func_8006CEC0.s line 31. +void func_8006CEC0(void *arg0, s16 arg1, s8 arg2, s8 arg3) { + s32 sp20; + s16 temp_v0_5; + s16 temp_v0_6; + s32 temp_t1_2; + s32 temp_v0; + s32 temp_v0_4; + s32 temp_v1; + u16 temp_t1; + u16 temp_v0_3; + void *temp_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg1 - 1; + sp20 = temp_v0; + if (temp_v0 < 0) { + sp20 = 9; + } + temp_v0_2 = arg0 + (arg1 * 0x48); + if (temp_v0_2->unk274 == 1) { + temp_t1 = temp_v0_2->unk26A; + switch (temp_t1) { + case 1: + func_80062C74(arg1, arg2, arg3); + return; + case 3: + func_80064184(arg1, arg2, arg3); + return; + case 5: + func_800630C0(arg1, arg2, arg3); + return; + case 6: + func_800631A8(arg1, arg2, arg3); + return; + case 7: + func_80063268(arg1, arg2, arg3); + return; + } + } else { + if (((arg0->unk44 & 0x200) != 0) && ((arg0->unk0 & 0x4000) != 0)) { + func_80061224(arg1, sp20, arg2, arg3); + return; + } + temp_v1 = arg0->unkBC; + if (((temp_v1 & 0x40000000) == 0x40000000) && (arg0->unkB0 < 0x32)) { + func_80061094(arg1, sp20, arg2, arg3); + return; + } + temp_t1_2 = arg0->unk0 & 0x4000; + if (temp_t1_2 == 0x4000) { + temp_v0_3 = arg0->unkDE; + if ((temp_v0_3 & 8) == 8) { + func_80060F50(arg1, sp20, arg2, arg3); + return; + } + if (((temp_v0_3 & 2) != 0) || ((temp_v0_3 & 1) != 0)) { + func_80060B14(arg1, sp20, arg2, arg3); + return; + } + goto block_22; + } +block_22: + temp_v0_4 = D_800DC52C; + if (temp_v0_4 != 0) { + if ((temp_v0_4 != 1) && (temp_v0_4 != 2) && (temp_v0_4 != 3)) { + return; + } + if ((temp_t1_2 != 0) && ((temp_v1 & 0x4000000) != 0x4000000) && ((temp_v1 & 0x400) != 0x400) && ((temp_v1 & 0x1000000) != 0x1000000)) { + temp_v0_5 = arg0->unkCA; + if (((temp_v0_5 & 2) != 2) && ((temp_v0_5 & 0x10) != 0x10) && ((temp_v0_5 & 0x100) == 0)) { + func_80060504(arg1, sp20, arg2, arg3); + } + } + /* Duplicate return node #42. Try simplifying control flow for better match */ + return; + } + if (((temp_v1 & 0x4000000) != 0x4000000) && ((temp_v1 & 0x400) != 0x400) && ((temp_v1 & 0x1000000) != 0x1000000) && (temp_v0_6 = arg0->unkCA, ((temp_v0_6 & 2) != 2)) && ((temp_v0_6 & 0x10) != 0x10) && ((temp_v0_6 & 0x100) == 0)) { + func_80060504(arg1, sp20, arg2, arg3); + return; + } + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006CEC0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006D194: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800628C0(void *, s8, s8, ?); /* extern */ +? func_80062914(void *, s8, s8, ?); /* extern */ +? func_80062968(void *, s8, s8, ?); /* extern */ +? func_800629BC(void *, s8, s8, ?); /* extern */ +? func_80062A18(void *, s8, s8, ?); /* extern */ +? func_80062AA8(void *, s8, s8, ?); /* extern */ +? func_80064DEC(void *, s8, s8, ?); /* extern */ +? func_80064EA4(void *, s8, s8, ?); /* extern */ +? func_80064F88(void *, s8, s8, ?); /* extern */ +? func_80065030(void *, s8, s8, ?); /* extern */ +? func_800650FC(void *, s8, s8, ?); /* extern */ +? func_800651F4(void *, s8, s8, ?); /* extern */ -Unable to determine jump table for jr instruction at func_8006D194.s line 27. +void func_8006D194(void *arg0, s8 arg1, s8 arg2) { + u16 temp_t9; + u16 phi_v0; + u16 phi_v0_2; + u16 phi_v0_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (arg0->unk814 == 1) { + temp_t9 = arg0->unk80A; + switch (temp_t9) { + case 2: + func_80064DEC(arg0, arg1, arg2, 0); + break; + case 3: + func_800650FC(arg0, arg1, arg2, 0); + break; + case 4: + func_80064EA4(arg0, arg1, arg2, 0); + break; + case 5: + func_80064F88(arg0, arg1, arg2, 0); + break; + case 6: + func_80065030(arg0, arg1, arg2, 0); + break; + } + } else { + if ((arg0->unkB6 & 0x40) == 0x40) { + func_800628C0(arg0, arg1, arg2, 0); + } + phi_v0 = arg0->unkB6; + if ((arg0->unkB6 & 0x800) == 0x800) { + func_80062968(arg0, arg1, arg2, 0); + phi_v0 = arg0->unkB6; + } + phi_v0_2 = phi_v0; + if ((phi_v0 & 0x1000) == 0x1000) { + func_80062914(arg0, arg1, arg2, 0); + phi_v0_2 = arg0->unkB6; + } + phi_v0_3 = phi_v0_2; + if ((phi_v0_2 & 0x80) == 0x80) { + func_80062A18(arg0, arg1, arg2, 0); + phi_v0_3 = arg0->unkB6; + } + if ((phi_v0_3 & 0x100) == 0x100) { + func_800629BC(arg0, arg1, arg2, 0); + } + } + if (arg0->unk85C == 1) { + if (arg0->unk852 == 5) { + func_800651F4(arg0, arg1, arg2, 1); + return; + } + /* Duplicate return node #23. Try simplifying control flow for better match */ + return; + } + if ((arg0->unkB6 & 0x20) == 0x20) { + func_80062AA8(arg0, arg1, arg2, 1); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006D194.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006D474: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8006538C(void *, s8, s16, s8); /* extern */ +? func_80065AB0(void *, s8, s16, s8); /* extern */ +? func_80065F0C(void *, s8, s16, s8); /* extern */ +? func_800664E0(void *, s8, s16, s8); /* extern */ +? func_80066BAC(void *, s8, s16, s8); /* extern */ +? func_80067280(void *, s8, s16, s8); /* extern */ +? func_80067604(void *, s8, s16, s8); /* extern */ +? func_800691B8(void *, s8, s16, s8); /* extern */ +? func_80069444(void *, s8, s16, s8); /* extern */ +? func_800696CC(void *, s8, s16, s8, f32); /* extern */ +? func_80069938(void *, s8, s16, s8); /* extern */ +? func_80069BA8(void *, s8, s16, s8); /* extern */ +? func_80069DB8(void *, s8, s16, s8); /* extern */ +? func_8006A01C(void *, s8, s16, s8); /* extern */ +? func_8006BA94(void *, s8, s8); /* extern */ -Unable to determine jump table for jr instruction at func_8006D474.s line 378. +void func_8006D474(void *arg0, s8 arg1, s8 arg2) { + s32 sp44; + s16 temp_s2; + s32 temp_t8; + s32 temp_v0; + u16 temp_t6; + u16 temp_t8_2; + u16 temp_v0_2; + void *temp_s5; + s16 phi_s2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t8 = arg2 * 4; + sp44 = temp_t8; + temp_v0 = 8 << temp_t8; + if (temp_v0 == (arg0->unk2 & temp_v0)) { + phi_s2 = 0; + do { + temp_s5 = arg0 + (phi_s2 * 0x48); + temp_v0_2 = temp_s5->unk26A; + if (temp_v0_2 != 1) { + if (temp_v0_2 != 6) { + + } else if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_80066BAC(arg0, arg1, phi_s2, arg2); + } + } else if (arg2 == arg1) { + func_80066BAC(arg0, arg1, phi_s2, arg2); + } + } else if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_8006538C(arg0, arg1, phi_s2, arg2); + } + } else { + func_8006538C(arg0, arg1, phi_s2, arg2); + } + temp_t8_2 = temp_s5->unkADA; + switch (temp_t8_2) { /* switch 1 */ + case 1: /* switch 1 */ + case 9: /* switch 1 */ + if (D_800DC52C == 0) { + func_800691B8(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_800691B8(arg0, arg1, phi_s2, arg2); + } + break; + case 2: /* switch 1 */ + if (D_800DC52C == 0) { + func_800696CC(arg0, arg1, phi_s2, arg2, temp_s5->unkAD4); + } else if (arg2 == arg1) { + func_800696CC(arg0, arg1, phi_s2, arg2, temp_s5->unkAD4); + } + break; + case 3: /* switch 1 */ + if (D_800DC52C == 0) { + func_80067280(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_80067280(arg0, arg1, phi_s2, arg2); + } + break; + case 4: /* switch 1 */ + if (D_800DC52C == 0) { + func_80069444(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_80069444(arg0, arg1, phi_s2, arg2); + } + break; + case 5: /* switch 1 */ + if (D_800DC52C == 0) { + func_80069938(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_80069938(arg0, arg1, phi_s2, arg2); + } + break; + case 6: /* switch 1 */ + if (D_800DC52C == 0) { + func_80069BA8(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_80069BA8(arg0, arg1, phi_s2, arg2); + } + break; + case 7: /* switch 1 */ + if (D_800DC52C == 0) { + func_80069DB8(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_80069DB8(arg0, arg1, phi_s2, arg2); + } + break; + case 8: /* switch 1 */ + if (D_800DC52C == 0) { + func_80067604(arg0, arg1, phi_s2, arg2); + } else if (arg2 == arg1) { + func_80067604(arg0, arg1, phi_s2, arg2); + } + break; + } + temp_t6 = temp_s5->unk53A; + switch (temp_t6) { /* switch 2 */ + case 1: /* switch 2 */ + if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_80065AB0(arg0, arg1, phi_s2, arg2); + } + } else { + func_80065AB0(arg0, arg1, phi_s2, arg2); + } + break; + case 2: /* switch 2 */ + case 3: /* switch 2 */ + case 4: /* switch 2 */ + case 5: /* switch 2 */ + if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_80065F0C(arg0, arg1, phi_s2, arg2); + } + } else { + func_80065F0C(arg0, arg1, phi_s2, arg2); + } + break; + case 9: /* switch 2 */ + if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_800664E0(arg0, arg1, phi_s2, arg2); + } + } else { + func_800664E0(arg0, arg1, phi_s2, arg2); + } + break; + case 11: /* switch 2 */ + if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_8006A01C(arg0, arg1, phi_s2, arg2); + } + } else if (arg2 == arg1) { + func_8006A01C(arg0, arg1, phi_s2, arg2); + } + break; + } + temp_s2 = phi_s2 + 1; + phi_s2 = temp_s2; + } while (temp_s2 < 0xA); + } + if ((gModeSelection == 3) && ((arg0->unk2 & (2 << sp44)) != 0)) { + func_8006BA94(arg0, arg1, arg2); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006D474.s") #endif @@ -9117,15 +12026,69 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006DC54.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006DD3C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80066998(void *, s8, s16, s8); /* extern */ +? func_80067964(void *, s8, s32, s8, s32); /* extern */ +? func_80067D3C(void *, s8, s32, ?, f32, s32); /* extern */ +? func_8006801C(void *, s8, s32, ?, f32, s32); /* extern */ +? func_80068310(void *, s8, s32, s8, s32); /* extern */ +? func_80068724(void *, s8, s32, s8, s32); /* extern */ +? func_80068AA4(void *, s8, s32, s8, s32); /* extern */ +? func_80068DA0(void *, s8, s32, s8, s32); /* extern */ +? func_8006A280(void *, s8, s16, s8); /* extern */ -Unable to determine jump table for jr instruction at func_8006DD3C.s line 106. +void func_8006DD3C(void *arg0, s8 arg1, s8 arg2) { + s16 temp_s0; + s32 temp_v0; + u16 temp_t9; + u16 temp_v0_2; + s16 phi_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = 8 << (arg2 * 4); + if (temp_v0 == (arg0->unk2 & temp_v0)) { + phi_s0 = 0; + do { + temp_v0_2 = (arg0 + (phi_s0 * 0x48))->unk26A; + if (temp_v0_2 != 3) { + if (temp_v0_2 == 5) { + func_8006A280(arg0, arg1, phi_s0, arg2); + } + } else if (D_800DC52C == 3) { + if (arg2 == arg1) { + func_80066998(arg0, arg1, phi_s0, arg2); + } + } else { + func_80066998(arg0, arg1, phi_s0, arg2); + } + temp_s0 = phi_s0 + 1; + phi_s0 = temp_s0; + } while (temp_s0 < 0xA); + if (((arg0->unk0 & 0x4000) == 0x4000) && (arg2 == arg1)) { + temp_t9 = arg0->unk80A; + switch (temp_t9) { + case 2: + func_80068310(arg0, arg1, arg0->unk804, arg2, 0); + break; + case 3: + func_80067964(arg0, arg1, arg0->unk804, arg2, 0); + break; + case 4: + func_80068724(arg0, arg1, arg0->unk804, arg2, 0); + break; + case 5: + func_80068AA4(arg0, arg1, arg0->unk804, arg2, 0); + break; + case 6: + func_80068DA0(arg0, arg1, arg0->unk804, arg2, 0); + break; + } + if (arg0->unk852 == 5) { + func_80067D3C(arg0, arg2, D_8018D480, 1, 1.6f, 0xFFFFFF); + func_8006801C(arg0, arg2, D_8018D484, 1, 1.6f, 0xFF); + } + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006DD3C.s") #endif diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index 7a1bb58d1..fd35f7caf 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -338,15 +338,235 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EF60.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8006F008: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8006EEE8(s16); /* extern */ +s32 func_802A84F4(? *, ?, ?, s16); /* extern */ +extern ? D_0F0D0E50; +extern ? gTextureExhaust0; +extern ? gTextureExhaust1; +extern ? gTextureExhaust2; +extern ? gTextureExhaust3; +extern ? gTextureExhaust4; +extern ? gTextureExhaust5; +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8006F008.s line 57. +void func_8006F008(void) { + s16 temp_a0; + s8 temp_v0; + u32 phi_a0; + s16 phi_t9; + s16 *phi_v1; + s16 *phi_t0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_801655C8 = 0; + D_8018D01C = 1.0f; + if (gIsMirrorMode != 0) { + D_8018D01C = -1.0f; + } + D_8018D2C0 = 0x101; + D_8018D2D8 = 0xAA; + D_8018D300 = 0xFF; + D_8018D308 = 0xFF; + temp_a0 = gCurrentCourseId; + D_8018D310 = 0xFF; + D_8018D318 = 0xFF; + phi_a0 = temp_a0; + if (temp_a0 < 0x14) { + func_8006EEE8(temp_a0); + phi_a0 = gCurrentCourseId; + } + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + switch (phi_a0) { + case 0: + D_8018D220 = func_802A84F4(&gTextureExhaust5, 0x443, 0x1000, 0xFF); + D_8018D2A0 = 0.022f; + D_8018D2E0 = 6; + D_8018D2E8 = 0x1C; + D_8018D2C0 = 0x104; + D_8018D2D8 = 0xAA; + D_80165718 = 0; + D_80165720 = 5; + D_80165728 = -0xF0; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 1: + D_8018D2A0 = 0.022f; + D_8018D2C0 = 0x109; + D_8018D2E0 = 0x13; + phi_t9 = 0x25; +block_26: + D_8018D2E8 = phi_t9; + break; + case 2: + D_8018D2C0 = 0x109; + D_8018D2A0 = 0.0174f; + D_8018D2E0 = 0xC; + D_8018D2E8 = 0x30; + break; + case 3: + D_80165880 = func_802A84F4(&D_0F0D0E50, 0x4CC2, 0xD980, 0xFF); + D_8018D2A0 = 0.016f; + D_8018D2C0 = 0x106; + D_8018D2E0 = 0x37; + D_8018D2E8 = 0x27; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 4: + D_8018D220 = func_802A84F4(&gTextureExhaust0, 0x479, 0xC00, 0xFF); + D_8018D2A0 = 0.018f; + D_8018D2E0 = 0x3D; + D_8018D2E8 = 0x26; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 5: + D_8018D2C0 = 0x106; + D_8018D2A0 = 0.016f; + D_8018D2E0 = 0x24; + D_8018D2E8 = 0x28; + D_8018D300 = 0x48; + D_8018D308 = 0x64; + D_8018D310 = 0xFF; + break; + case 6: + D_8018D220 = func_802A84F4(&gTextureExhaust3, 0x3C8, 0x1000, 0xFF); + D_8018D2A0 = 0.014f; + D_8018D2C0 = 0x10C; + D_8018D2E0 = 0x28; + D_8018D2E8 = 0x15; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 7: + D_8018D220 = func_802A84F4(&gTextureExhaust4, 0x3F8, 0x1000, 0xFF); + D_8018D2C0 = 0x106; + D_8018D2A0 = 0.014f; + D_8018D2E0 = 0x25; + D_8018D2E8 = 0x32; + D_80165718 = -0x40; + D_80165720 = 5; + D_80165728 = -0x14A; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 8: + D_8018D220 = func_802A84F4(&gTextureExhaust2, 0x4F4, 0xC00, 0xFF); + D_8018D2A0 = 0.0155f; + D_8018D2C0 = 0x10F; + D_8018D2E0 = 0x2D; + D_8018D2E8 = 0x3C; + D_80165718 = -0x8C; + D_80165720 = -0x2C; + D_80165728 = -0xD7; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 9: + D_8018D220 = func_802A84F4(&gTextureExhaust0, 0x479, 0xC00, 0xFF); + D_8018D2A0 = 0.0155f; + D_8018D2C0 = 0x10F; + D_8018D2E0 = 0x12; + D_8018D2E8 = 0x24; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 10: + D_8018D2A0 = 0.013f; + D_8018D2C0 = 0xFC; + D_8018D2E0 = 0x39; + D_8018D2E8 = 0x2C; + break; + case 11: + D_8018D2C0 = 0x107; + D_8018D2D8 = 0xA5; + D_8018D220 = func_802A84F4(&gTextureExhaust5, 0x443, 0x1000, 0xFF); + D_8018D2A0 = 0.015f; + D_8018D2E0 = 0x37; + D_8018D2E8 = 0x1B; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 12: + D_8018D220 = func_802A84F4(&gTextureExhaust1, 0x485, 0xC00, 0xFF); + D_8018D2A0 = 0.015f; + D_8018D2C0 = 0x106; + D_8018D2E0 = 0x34; + D_8018D2E8 = 0x21; + D_8018D300 = 0x48; + D_8018D308 = 0x64; + D_8018D310 = 0xFF; + phi_v1 = &D_8018D2C0; + phi_t0 = &D_8018D2D8; + break; + case 13: + D_8018D2A0 = 0.0103f; + D_8018D2C0 = 0x105; + D_8018D2D8 = 0xA6; + D_8018D2E0 = 0x27; + D_8018D2E8 = 0x37; + break; + case 14: + D_8018D2A0 = 0.0155f; + D_8018D2C0 = 0x106; + D_8018D2E0 = 0x35; + D_8018D2E8 = 0x23; + break; + case 15: + D_8018D2A0 = 0.0335f; + D_8018D2E0 = 0x20; + D_8018D2E8 = 0x20; + break; + case 16: + D_8018D2A0 = 0.0445f; + D_8018D2E0 = 0x20; + D_8018D2E8 = 0x20; + break; + case 17: + D_8018D2A0 = 0.0285f; + D_8018D2E0 = 0x20; + D_8018D2E8 = 0x20; + break; + case 18: + D_8018D2A0 = 0.0155f; + D_8018D2C0 = 0xFF; + D_8018D2E0 = 0x1D; + D_8018D2E8 = 0x2F; + break; + case 19: + D_8018D2A0 = 0.0257f; + D_8018D2E0 = 0x20; + phi_t9 = 0x1F; + goto block_26; + } + if (gIsMirrorMode != 0) { + D_8018D2E0 = D_8018D2B0 - D_8018D2E0; + } + temp_v0 = D_8018EDF3; + if (temp_v0 == 4) { + phi_v1->unk0 = 0xA0; + phi_t0->unk0 = 0x78; + return; + } + if (temp_v0 == 3) { + phi_v1->unk0 = 0xEB; + phi_t0->unk0 = 0xAF; + return; + } + if (temp_v0 == 2) { + if (gCurrentCourseId != 0xA) { + phi_v1->unk2 = 0x109; + phi_v1->unk0 = phi_v1->unk2; + } else { + phi_v1->unk2 = 0xFF; + phi_v1->unk0 = phi_v1->unk2; + } + phi_t0->unk0 = 0x41; + phi_t0->unk2 = 0xB4; + } +} #else GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F008.s") #endif @@ -987,15 +1207,88 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_800704A0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007055C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? find_unused_obj_index(void *); /* extern */ +? func_80070328(? *); /* extern */ +? func_800704A0(? *); /* extern */ +? func_8008C23C(); /* extern */ +extern ? D_8018CC80; +static ? D_800E6A38; /* unable to generate initializer; const */ +static ? D_800E6AA8; /* unable to generate initializer; const */ +static ? D_800E6B00; /* unable to generate initializer; const */ +static ? D_800E6B38; /* unable to generate initializer; const */ +static ? D_800E6BA8; /* unable to generate initializer; const */ +static ? D_800E6C10; /* unable to generate initializer; const */ +static ? D_800E6C80; /* unable to generate initializer; const */ +static ? D_800E6DE0; /* unable to generate initializer; const */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8007055C.s line 17. +void func_8007055C(void) { + s32 temp_s1; + u16 temp_t6; + s32 phi_s4; + s32 phi_s0; + s32 phi_s1; + s32 phi_s1_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = gCurrentCourseId; + switch (temp_t6) { + case 0: + func_80070328(&D_800E6C10); + break; + case 4: + func_80070328(&D_800E6AA8); + break; + case 5: + phi_s4 = 0x19; + phi_s0 = 0; + if (D_8018EDF3 == 1) { + phi_s4 = 0x32; + } + phi_s1 = 0; + phi_s1_2 = 0; + if (phi_s4 > 0) { + do { + find_unused_obj_index(&D_8018CC80 + (D_8018D1F8 * 4) + phi_s0); + temp_s1 = phi_s1 + 1; + phi_s0 += 4; + phi_s1 = temp_s1; + phi_s1_2 = temp_s1; + } while (temp_s1 != phi_s4); + } + D_8018D1F8 += phi_s1_2; + D_8018D1F0 = phi_s1_2; + break; + case 6: + func_80070328(&D_800E6B00); + break; + case 7: + func_80070328(&D_800E6B38); + break; + case 8: + func_80070328(&D_800E6A38); + break; + case 9: + func_80070328(&D_800E6AA8); + break; + case 10: + func_800704A0(&D_800E6C80); + break; + case 11: + func_80070328(&D_800E6C10); + break; + case 12: + func_80070328(&D_800E6BA8); + break; + case 13: + func_800704A0(&D_800E6C80); + break; + case 14: + func_800704A0(&D_800E6DE0); + break; + } + func_8008C23C(); +} #else GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8007055C.s") #endif @@ -1024,15 +1317,562 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070714.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80070780: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? find_unused_obj_index(s32 *); /* extern */ +? func_80070714(); /* extern */ +? func_80071F6C(? *); /* extern */ +? func_800723A4(s32, ?, s16 *, ? **); /* extern */ +? func_80073444(s32, ? *, ? *, ?, s32); /* extern */ +? func_800770F0(s32); /* extern */ +? func_800887C0(s32); /* extern */ +extern ? D_06007BB8; +extern ? D_06007DB8; +extern ? *D_80165758; +extern ? D_80165C18; +extern ? D_80183EB0; +extern ? D_80183EC8; +extern ? D_80183EDC; +extern ? D_80183F34; +extern ? D_80183F3C; +extern ? D_80183F50; +extern ? D_8018C030; +extern ? D_8018C0B0; +extern ? D_8018C278; +extern ? D_8018C404; +extern ? D_8018C5F0; +extern ? D_8018C6B0; +extern ? D_8018D1A0; +extern ? D_8018D1B3; +extern ? D_8018D1C4; +static ? D_800E5728; /* unable to generate initializer; const */ +static ? D_800E5854; /* unable to generate initializer; const */ +static ? D_800E5894; /* unable to generate initializer; const */ +static ? D_800E58EC; /* unable to generate initializer; const */ +static ? D_800E5E14; /* unable to generate initializer; const */ +static ? D_800E5EE6; /* unable to generate initializer; const */ +static u16 D_800E5EE8; /* type too large by 2; unable to generate initializer; const */ +static ? D_800E5FD0; /* unable to generate initializer; const */ +static ? D_800E6360; /* unable to generate initializer; const */ +static ? D_800E641A; /* unable to generate initializer; const */ +u16 gCurrentCourseId; /* unable to generate initializer */ +u16 D_800E5E8C[0x2D]; /* unable to generate initializer; const */ +u16 D_800E5F80[0x28]; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_80070780.s line 19. +void func_80070780(void) { + void *sp4C; + u16 *sp48; + u16 *sp44; + ? *temp_s0_4; + ? *temp_s2_2; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f0_5; + f32 temp_f2; + f32 temp_f2_2; + s32 *temp_s0_15; + s32 *temp_s0_16; + s32 *temp_s0_17; + s32 *temp_s1; + s32 *temp_s1_2; + s32 *temp_s1_3; + s32 *temp_s1_4; + s32 *temp_s1_5; + s32 *temp_s2; + s32 *temp_s2_3; + s32 temp_s0; + s32 temp_s0_10; + s32 temp_s0_14; + s32 temp_s0_2; + s32 temp_s0_3; + s32 temp_s0_5; + s32 temp_s0_6; + s32 temp_s0_7; + s32 temp_s0_8; + s32 temp_s0_9; + s32 temp_s3; + s32 temp_s3_2; + s32 temp_s3_3; + s32 temp_s3_4; + s32 temp_s3_5; + s32 temp_s3_6; + s32 temp_v0; + s32 temp_v0_11; + s8 *temp_s0_11; + s8 *temp_s0_12; + s8 *temp_s0_13; + s8 temp_v0_10; + u16 *temp_v1_2; + u16 *temp_v1_3; + u16 *temp_v1_4; + u16 temp_t6; + void *temp_v0_12; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + void *temp_v0_7; + void *temp_v0_8; + void *temp_v0_9; + void *temp_v1; + s32 *phi_s0; + s32 phi_s3; + s32 *phi_s1; + s32 phi_s2; + s32 phi_s3_2; + s32 *phi_s2_2; + ? *phi_s1_2; + s32 phi_s3_3; + ? *phi_s0_2; + s32 *phi_s1_3; + u16 *phi_v1; + s32 *phi_s2_3; + ? *phi_s1_4; + s32 *phi_s1_5; + u16 *phi_v1_2; + s32 *phi_s2_4; + s32 *phi_s1_6; + u16 *phi_v1_3; + s32 *phi_s1_7; + s32 *phi_s2_5; + s32 *phi_s0_3; + s32 phi_s3_4; + s32 *phi_s0_4; + s32 phi_s3_5; + s8 *phi_s0_5; + s32 *phi_s1_8; + s8 *phi_s0_6; + s32 *phi_s1_9; + s8 *phi_s0_7; + s32 *phi_s1_10; + s32 *phi_s1_11; + ? *phi_s2_6; + s32 *phi_s0_8; + s32 *phi_s1_12; + s32 *phi_s0_9; + s32 *phi_s0_10; + s32 *phi_s1_13; + s32 *phi_s1_14; + s32 *phi_s2_7; + s32 phi_s3_6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = gCurrentCourseId; + switch (temp_t6) { + case 0: + if (D_800DC50C != 9) { + if (gModeSelection == 0) { + func_80070714(); + } + phi_s0 = &D_8018C630; + phi_s3 = 0; + if (D_80165738 > 0) { + do { + find_unused_obj_index(phi_s0); + func_800723A4(*phi_s0, 0); + temp_s3 = phi_s3 + 1; + phi_s0 += 4; + phi_s3 = temp_s3; + } while (temp_s3 < D_80165738); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + } + default: + return; + case 2: + D_80165750 = 0xB; + D_80165758 = &D_800E5894; + temp_v0 = gCCSelection; + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 2) { + if (temp_v0 != 3) { + + } + } else { + D_80165750 = 0xC; + D_80165758 = &D_800E58EC; + } + } + } else { + D_80165750 = 8; + D_80165758 = &D_800E5854; + } + phi_s1 = &D_80183EA0; + phi_s3_2 = 0; + if (D_80165750 > 0) { + phi_s2 = 0; + do { + temp_s0 = *phi_s1; + func_800723A4(temp_s0, 0, &D_80165750, &D_80165758); + temp_v1 = D_80165758 + phi_s2; + temp_s3_2 = phi_s3_2 + 1; + temp_v0_2 = &D_80165C18 + (temp_s0 * 0xE0); + temp_v0_2->unk10 = temp_v1->unk0 * D_8018D01C; + temp_v0_2->unk18 = temp_v1->unk2; + temp_v0_2->unkD5 = temp_v1->unk4; + temp_v0_2->unkA0 = temp_v1->unk6; + phi_s1 += 4; + phi_s2 += 8; + phi_s3_2 = temp_s3_2; + } while (temp_s3_2 < D_80165750); + } + temp_s0_2 = D_80183F28; + func_800723A4(temp_s0_2, 0, &D_80165750, &D_80165758); + temp_v0_3 = &D_80165C18 + (temp_s0_2 * 0xE0); + temp_v0_3->unk8 = 80.0f; + temp_v0_3->unk4 = D_8018D01C * -68.0; + temp_v0_3->unkC = -1840.0f; + phi_s2_2 = &D_8018BFA8; + phi_s1_2 = &D_800E5728; + phi_s3_3 = 0; + do { + temp_s0_3 = *phi_s2_2; + func_800723A4(temp_s0_3, 0); + temp_v0_4 = &D_80165C18 + (temp_s0_3 * 0xE0); + temp_s3_3 = phi_s3_3 + 1; + temp_v0_4->unk8 = phi_s1_2->unk2; + temp_v0_4->unk4 = phi_s1_2->unk0 * D_8018D01C; + temp_v0_4->unkC0 = 0; + temp_v0_4->unkC = phi_s1_2->unk4; + phi_s2_2 += 4; + phi_s3_3 = temp_s3_3; + if ((phi_s3_3 & 1) != 0) { + temp_v0_4->unkC0 = 0x8000; + } + phi_s1_2 += 6; + } while (temp_s3_3 < 4); + phi_s0_2 = &D_8018C030; + do { + func_80071F6C(phi_s0_2); + temp_s0_4 = phi_s0_2 + 4; + phi_s0_2 = temp_s0_4; + } while (temp_s0_4 != &D_8018C0B0); + return; + case 3: + if (D_800DC50C != 9) { + temp_s0_5 = D_80183EA0.unk0; + func_80073444(temp_s0_5, &D_06007BB8, &D_06007DB8, 0x20, 0x40); + temp_v0_5 = &D_80165C18 + (temp_s0_5 * 0xE0); + temp_v0_5->unkB2 = 0; + temp_v0_5->unkB4 = 0; + temp_v0_5->unkB6 = 0x8000; + func_800723A4(D_80183EA0.unk4, 0); + func_800723A4(D_80183EA0.unk8, 0); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 4: + phi_s1_3 = &D_80183EA0; + do { + func_800723A4(*phi_s1_3, 0); + temp_s1 = phi_s1_3 + 4; + phi_s1_3 = temp_s1; + } while (temp_s1 < &D_80183EB0); + phi_s2_3 = &D_80183F28; + if (D_800DC50C != 9) { + phi_v1 = D_800E5E8C; + phi_s1_4 = &D_800E5E14; + do { + temp_s0_6 = *phi_s2_3; + sp44 = phi_v1; + func_800723A4(temp_s0_6, 0); + temp_f2 = D_8018D01C; + temp_f0 = phi_s1_4->unk0 * temp_f2; + temp_v0_6 = &D_80165C18 + (temp_s0_6 * 0xE0); + temp_v0_6->unk10 = temp_f0; + temp_v0_6->unk4 = temp_f0; + temp_f0_2 = phi_s1_4->unk2 + 6.0; + temp_v1_2 = phi_v1 + 6; + temp_v0_6->unk44 = temp_f0_2; + temp_v0_6->unk8 = temp_f0_2; + temp_f0_3 = phi_s1_4->unk4; + temp_v0_6->unkD5 = phi_s1_4->unk6; + temp_v0_6->unk9E = phi_v1->unk4; + temp_v0_6->unk18 = temp_f0_3; + temp_v0_6->unkC = temp_f0_3; + temp_v0_6->unk9C = phi_v1->unk0 * temp_f2; + phi_v1 = temp_v1_2; + phi_s2_3 += 4; + phi_s1_4 += 8; + } while (temp_v1_2 != &D_800E5EE6); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 5: + phi_s1_5 = &D_8018C1B0; + do { + find_unused_obj_index(phi_s1_5); + temp_s1_2 = phi_s1_5 + 4; + phi_s1_5 = temp_s1_2; + } while (temp_s1_2 < &D_8018C278); + phi_s1_6 = &D_80183EA0; + if (D_800DC50C != 9) { + phi_v1_2 = &D_800E5EE8; + phi_s2_4 = &D_80183F28; + do { + temp_s0_7 = *phi_s2_4; + sp44 = phi_v1_2; + func_800723A4(temp_s0_7, 0); + temp_v0_7 = &D_80165C18 + (temp_s0_7 * 0xE0); + temp_s0_8 = *phi_s1_6; + temp_v0_7->unk10 = phi_v1_2->unk0 * D_8018D01C; + temp_v0_7->unk18 = phi_v1_2->unk4; + temp_v0_7->unk14 = phi_v1_2->unk2 + 5.0 + 3.0; + func_800723A4(temp_s0_8, 0); + temp_v0_8 = &D_80165C18 + (temp_s0_8 * 0xE0); + temp_v1_3 = phi_v1_2 + 8; + temp_v0_8->unkD5 = phi_v1_2->unk6; + temp_v0_8->unk10 = phi_v1_2->unk0 * D_8018D01C; + temp_v0_8->unk14 = phi_v1_2->unk2 + 3.0; + temp_v0_8->unk18 = phi_v1_2->unk4; + phi_v1_2 = temp_v1_3; + phi_s2_4 += 4; + phi_s1_6 += 4; + } while (temp_v1_3 != D_800E5F80); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 6: + phi_s1_7 = &D_80183EA0; + if (D_800DC50C != 9) { + phi_v1_3 = D_800E5F80; + do { + temp_s0_9 = *phi_s1_7; + sp48 = phi_v1_3; + func_800723A4(temp_s0_9, 0); + temp_f2_2 = D_8018D01C; + temp_v0_9 = &D_80165C18 + (temp_s0_9 * 0xE0); + temp_f0_4 = phi_v1_3->unk0 * temp_f2_2; + temp_v1_4 = phi_v1_3 + 8; + temp_v0_9->unk10 = temp_f0_4; + temp_v0_9->unk4 = temp_f0_4; + temp_f0_5 = phi_v1_3->unk4; + temp_v0_9->unk1C = phi_v1_3->unk2 * temp_f2_2; + temp_v0_9->unk18 = temp_f0_5; + temp_v0_9->unkC = temp_f0_5; + temp_v0_9->unk24 = phi_v1_3->unk6; + phi_v1_3 = temp_v1_4; + phi_s1_7 += 4; + } while (temp_v1_4 != &D_800E5FD0); + } + phi_s2_5 = &D_80183F28; + do { + temp_s0_10 = *phi_s2_5; + func_800723A4(temp_s0_10, 0); + temp_s2 = phi_s2_5 + 4; + phi_s2_5 = temp_s2; + if (phi_s2_5 < &D_80183F3C) { + (&D_80165C18 + (temp_s0_10 * 0xE0))->unkD5 = 0; + } else { + (&D_80165C18 + (temp_s0_10 * 0xE0))->unkD5 = 1; + } + } while (temp_s2 != &D_80183F50); + return; + case 7: + if (D_800DC50C != 9) { + if (gModeSelection == 0) { + func_80070714(); + } + phi_s0_3 = &D_8018C630; + phi_s3_4 = 0; + if (D_80165738 > 0) { + do { + find_unused_obj_index(phi_s0_3); + func_800723A4(*phi_s0_3, 0); + temp_s3_4 = phi_s3_4 + 1; + phi_s0_3 += 4; + phi_s3_4 = temp_s3_4; + } while (temp_s3_4 < D_80165738); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 8: + if (D_800DC50C != 9) { + if (gModeSelection == 0) { + func_80070714(); + } + D_80165898 = 0; + func_800723A4(D_80183EA0.unk0, 0); + phi_s0_4 = &D_8018C630; + phi_s3_5 = 0; + if (D_80165738 > 0) { + do { + find_unused_obj_index(phi_s0_4); + func_800723A4(*phi_s0_4, 0); + temp_s3_5 = phi_s3_5 + 1; + phi_s0_4 += 4; + phi_s3_5 = temp_s3_5; + } while (temp_s3_5 < D_80165738); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 9: + if (D_800DC50C != 9) { + temp_v0_10 = D_8018EDF3; + phi_s1_8 = &D_80183EA0; + if ((temp_v0_10 == 1) || ((temp_v0_10 == 2) && (gModeSelection == 2))) { + temp_v0_11 = gCCSelection; + if (temp_v0_11 != 0) { + if (temp_v0_11 != 1) { + if (temp_v0_11 != 2) { + if (temp_v0_11 != 3) { + + } else { + D_8018D1C8 = 5; + D_8018D1D0 = 8; + D_8018D1D8 = 8; + } + } else { + D_8018D1C8 = 5; + D_8018D1D0 = 8; + D_8018D1D8 = 0xA; + } + } else { + D_8018D1C8 = 5; + D_8018D1D0 = 8; + D_8018D1D8 = 8; + } + } else { + D_8018D1C8 = 4; + D_8018D1D0 = 6; + goto block_75; + } + } else { + D_8018D1C8 = 4; + D_8018D1D0 = 6; +block_75: + D_8018D1D8 = 6; + } + phi_s0_5 = &D_8018D198; + do { + *phi_s0_5 = 0; + find_unused_obj_index(phi_s1_8); + temp_s0_11 = phi_s0_5 + 1; + phi_s0_5 = temp_s0_11; + phi_s1_8 += 4; + } while (temp_s0_11 < &D_8018D1A0); + phi_s0_6 = &D_8018D1A8; + phi_s1_9 = &D_80183EA0; + do { + *phi_s0_6 = 0; + find_unused_obj_index(phi_s1_9); + temp_s0_12 = phi_s0_6 + 1; + phi_s0_6 = temp_s0_12; + phi_s1_9 += 4; + } while (temp_s0_12 < &D_8018D1B3); + phi_s0_7 = &D_8018D1B8; + phi_s1_10 = &D_80183EA0; + do { + *phi_s0_7 = 0; + find_unused_obj_index(phi_s1_10); + temp_s0_13 = phi_s0_7 + 1; + phi_s0_7 = temp_s0_13; + phi_s1_10 += 4; + } while (temp_s0_13 < &D_8018D1C4); + phi_s1_11 = &D_8018C1B0; + phi_s2_6 = &D_800E6360; + do { + find_unused_obj_index(phi_s1_11); + temp_s0_14 = *phi_s1_11; + func_800723A4(temp_s0_14, 0); + temp_v0_12 = &D_80165C18 + (temp_s0_14 * 0xE0); + sp4C = temp_v0_12; + temp_v0_12->unkC = phi_s2_6->unk4; + temp_v0_12->unk4 = phi_s2_6->unk0 * D_8018D01C; + func_800887C0(temp_s0_14); + temp_s2_2 = phi_s2_6 + 6; + temp_v0_12->unk0 = 0.7f; + phi_s1_11 += 4; + phi_s2_6 = temp_s2_2; + } while (temp_s2_2 < &D_800E641A); + phi_s0_8 = &D_8018C3F0; + do { + find_unused_obj_index(phi_s0_8); + temp_s0_15 = phi_s0_8 + 4; + phi_s0_8 = temp_s0_15; + } while (temp_s0_15 != &D_8018C5F0); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 11: + if (D_800DC50C != 9) { + find_unused_obj_index(&D_8018CF10); + func_800723A4(D_8018CF10, 0); + phi_s1_12 = &D_8018C1B0; + do { + find_unused_obj_index(phi_s1_12); + temp_s1_3 = phi_s1_12 + 4; + phi_s1_12 = temp_s1_3; + } while (temp_s1_3 < &D_8018C278); + phi_s0_9 = &D_8018C3F0; + do { + find_unused_obj_index(phi_s0_9); + temp_s0_16 = phi_s0_9 + 4; + phi_s0_9 = temp_s0_16; + } while (temp_s0_16 < &D_8018C404); + phi_s0_10 = &D_8018C630; + do { + find_unused_obj_index(phi_s0_10); + temp_s0_17 = phi_s0_10 + 4; + phi_s0_10 = temp_s0_17; + } while (temp_s0_17 != &D_8018C6B0); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 12: + phi_s1_13 = &D_80183EA0; + do { + func_800723A4(*phi_s1_13, 0); + temp_s1_4 = phi_s1_13 + 4; + phi_s1_13 = temp_s1_4; + } while (temp_s1_4 != &D_80183EDC); + return; + case 13: + phi_s1_14 = &D_80183EA0; + if (D_800DC50C != 9) { + do { + func_800723A4(*phi_s1_14, 0); + temp_s1_5 = phi_s1_14 + 4; + phi_s1_14 = temp_s1_5; + } while (temp_s1_5 < &D_80183EC8); + phi_s2_7 = &D_80183F28; + do { + func_800723A4(*phi_s2_7, 0); + temp_s2_3 = phi_s2_7 + 4; + phi_s2_7 = temp_s2_3; + } while (temp_s2_3 != &D_80183F34); + return; + } + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + case 18: + phi_s3_6 = 0; + do { + func_800770F0(phi_s3_6); + temp_s3_6 = phi_s3_6 + 1; + phi_s3_6 = temp_s3_6; + } while (temp_s3_6 != 8); + /* Duplicate return node #106. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070780.s") #endif diff --git a/src/code_80071F00.c b/src/code_80071F00.c index 6dfbf3d1b..e5e615c7b 100644 --- a/src/code_80071F00.c +++ b/src/code_80071F00.c @@ -3141,15 +3141,57 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007634C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800763CC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80041288(void *, ?, ?); /* extern */ +? func_800413B8(void *, ?, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +s32 func_80073B00(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_8007634C(s32); /* extern */ +? func_80086E70(s32); /* extern */ +? func_80086F60(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_800763CC.s line 20. +void func_800763CC(s32 arg0) { + u16 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkA6; + switch (temp_t8) { + case 1: + func_8007634C(arg0); + return; + case 2: + if (func_8007278C(arg0, temp_s0->unk48) != 0) { + func_80086E70(arg0); + return; + } + default: + return; + case 3: + if (temp_s0->unkD5 == 4) { + func_800413B8(temp_s0, 0x40800000, 0x3DCCCCCD); + func_80041288(temp_s0 + 0xA4, 0, 0x18); + func_80041288(temp_s0 + 0xA2, 0x80, 0xC); + } else { + func_800413B8(temp_s0, 0x3F800000, 0x3DCCCCCD); + func_80041288(temp_s0 + 0xA4, 0, 0x18); + func_80041288(temp_s0 + 0xA2, 0x80, 0xC); + } + if ((temp_s0->unkAE >= 2) && (func_80073B00(arg0, temp_s0 + 0xA0, 0xFF, 0x50, 0x20, 0, 0) != 0)) { + func_80072488(arg0); + return; + } + /* Duplicate return node #12. Try simplifying control flow for better match */ + return; + case 4: + func_80072428(arg0); + func_80086F60(arg0); + /* Duplicate return node #12. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800763CC.s") #endif @@ -3344,15 +3386,50 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80076958.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800769D8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80041288(void *, ?, ?); /* extern */ +? func_800413B8(void *, ?, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +s32 func_80073B00(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_80076958(s32); /* extern */ +? func_80086E70(s32); /* extern */ +? func_80086F60(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_800769D8.s line 20. +void func_800769D8(s32 arg0) { + u16 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkA6; + switch (temp_t8) { + case 1: + func_80076958(arg0); + return; + case 2: + if (func_8007278C(arg0, temp_s0->unk48) != 0) { + func_80086E70(arg0); + return; + } + default: + return; + case 3: + func_800413B8(temp_s0, 0x40000000, 0x3D4CCCCD); + func_80041288(temp_s0 + 0xA4, 0, 0x18); + if ((temp_s0->unkAE >= 2) && (func_80073B00(arg0, temp_s0 + 0xA0, 0xFF, 0x50, 0x20, 0, 0) != 0)) { + func_80072488(arg0); + return; + } + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + case 4: + func_80072428(arg0); + func_80086F60(arg0); + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800769D8.s") #endif @@ -4705,29 +4782,153 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800789AC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80078A44: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80073CB0(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_800788F8(s32, u16, s32); /* extern */ +extern ? D_80165C18; +extern ? D_8018CC80; -Unable to determine jump table for jr instruction at func_80078A44.s line 48. +void func_80078A44(s32 arg0, s32 arg1, s32 arg2) { + s32 temp_s0; + s32 temp_s3; + u32 temp_hi; + s32 *phi_s4; + u32 phi_s3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_s3 = 0; + if (D_8018D1F0 > 0) { + phi_s4 = (arg0 * 4) + &D_8018CC80; + do { + temp_s0 = *phi_s4; + func_800788F8(temp_s0, *((phi_s3 * 8) + arg2), arg1); + temp_hi = phi_s3 % 5; + switch (temp_hi) { + case 0: + func_80073CB0(temp_s0, &D_80165C18 + (temp_s0 * 0xE0) + 0xA0, 0x28, 0xB4, 0xFF, 0, -1); + break; + case 1: + func_80073CB0(temp_s0, &D_80165C18 + (temp_s0 * 0xE0) + 0xA0, 0x80, 0xFF, 0xFF, 0, -1); + break; + case 2: + func_80073CB0(temp_s0, &D_80165C18 + (temp_s0 * 0xE0) + 0xA0, 0x50, 0xC8, 0xFF, 0, -1); + break; + case 3: + func_80073CB0(temp_s0, &D_80165C18 + (temp_s0 * 0xE0) + 0xA0, 0, 0x9B, 0xFF, 0, -1); + break; + case 4: + func_80073CB0(temp_s0, &D_80165C18 + (temp_s0 * 0xE0) + 0xA0, 0x5A, 0x80, 0xFF, 0, -1); + break; + } + temp_s3 = phi_s3 + 1; + phi_s4 += 4; + phi_s3 = temp_s3; + } while (temp_s3 < D_8018D1F0); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80078A44.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80078C70: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80078170(s32, s32, s32); /* extern */ +? func_800789AC(s32, s32, ? *); /* extern */ +? func_80078A44(s32, s32, ? *); /* extern */ +static ? D_800E6A38; /* unable to generate initializer; const */ +static ? D_800E6AA8; /* unable to generate initializer; const */ +static ? D_800E6B00; /* unable to generate initializer; const */ +static ? D_800E6B38; /* unable to generate initializer; const */ +static ? D_800E6BA8; /* unable to generate initializer; const */ +static ? D_800E6C10; /* unable to generate initializer; const */ +static ? D_800E6C80; /* unable to generate initializer; const */ +static ? D_800E6DE0; /* unable to generate initializer; const */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80078C70.s line 135. +void func_80078C70(u32 arg0) { + s32 sp1C; + s32 sp18; + s16 temp_v0; + s32 temp_v1; + u16 temp_t4; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (D_801657C8 == 0) { + switch (arg0) { /* switch 1 */ + case 0: /* switch 1 */ + sp1C = 0; + sp18 = camera1; + D_8018D200 = D_80150130 + 40.0f; + break; + case 1: /* switch 1 */ + sp1C = 0; + sp18 = camera1; + D_8018D200 = D_80150130 + 40.0f; + break; + case 2: /* switch 1 */ + sp18 = camera2; + sp1C = D_8018D1F0; + D_8018D200 = D_80150134 + 40.0f; + break; + case 3: /* switch 1 */ + sp1C = 0; + sp18 = camera1; + D_8018D200 = D_80150130 + 40.0f; + break; + case 4: /* switch 1 */ + sp18 = camera2; + sp1C = D_8018D1F0; + D_8018D200 = D_80150134 + 40.0f; + break; + } + temp_v0 = D_8018D200; + temp_t4 = gCurrentCourseId; + temp_v1 = temp_v0 / 2; + D_8018D208 = (temp_v1 * 0xB6) + 0x71C; + D_8018D210 = (-temp_v1 * 0xB6) - 0x71C; + D_8018D1E8 = 1.7578125 / temp_v0; + D_8018D218 = 0xA0; + switch (temp_t4) { /* switch 2 */ + case 0: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6A38); + return; + case 4: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6AA8); + return; + case 5: /* switch 2 */ + func_80078170(sp1C, sp18, 0xB6); + return; + case 6: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6B00); + return; + case 7: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6B38); + return; + case 8: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6A38); + return; + case 9: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6AA8); + return; + case 10: /* switch 2 */ + func_80078A44(sp1C, sp18, &D_800E6C80); + return; + case 11: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6C10); + return; + case 12: /* switch 2 */ + func_800789AC(sp1C, sp18, &D_800E6BA8); + return; + case 13: /* switch 2 */ + func_80078A44(sp1C, sp18, &D_800E6C80); + return; + case 14: /* switch 2 */ + func_80078A44(sp1C, sp18, &D_800E6DE0); + /* Duplicate return node #22. Try simplifying control flow for better match */ + return; + } + } else { + default: /* switch 2 */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80078C70.s") #endif @@ -4942,15 +5143,109 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800792D8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80079380: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(?); /* extern */ +? func_80072428(); /* extern */ +? func_80072488(s32); /* extern */ +? func_800729EC(); /* extern */ +s32 func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_800792D8(s32); /* extern */ +? func_80086F10(s32, ?, ? *); /* extern */ +? play_sound2(?); /* extern */ +extern ? D_80165C18; +static ? D_800E67B8; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_80079380.s line 18. +void func_80079380(s32 arg0, s32 arg1) { + void *sp20; + u16 temp_t8; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v1->unkA6; + switch (temp_t8) { + case 1: + func_800792D8(arg1); + return; + case 2: + sp20 = temp_v1; + func_8007278C(arg0); + if ((temp_v1->unk50 == 0x55) && (D_8018EDF3 == 3) && (arg1 == 0)) { + D_8018D168 = 1; + return; + } + default: + return; + case 3: + func_800721C0(0x10); + func_80086F10(arg0, 1, &D_800E67B8); + func_80072488(arg0); + return; + case 4: + if ((func_8007278C(arg0) != 0) && (D_8018EDF3 != 3) && (arg1 == 0)) { + D_8018D168 = 1; + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 5: + func_8007278C(arg0); + return; + case 6: + func_80072E54(1, 7, 1, 2, 0); + return; + case 7: + sp20 = temp_v1; + if ((func_8007278C(arg0) != 0) && (temp_v1->unk68 = temp_v1->unk68 + 0x200, (arg1 == 0))) { + play_sound2(0x49008003); + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 8: + func_80072E54(8, 0xF, 1, 6, 0); + return; + case 9: + if ((func_8007278C(arg0) != 0) && (arg1 == 0)) { + play_sound2(0x49008003); + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 10: + if ((func_80072E54(0x10, 0x17, 1, 6, 0) != 0) && (arg1 == 0)) { + D_801656F0 = 1; + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 11: + sp20 = temp_v1; + if ((func_8007278C(arg0) != 0) && (temp_v1->unk68 = temp_v1->unk68 + 0x200, (arg1 == 0))) { + play_sound2(0x49008004); + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 12: + func_80072E54(0x18, 0x1B, 1, 6, 0); + return; + case 13: + if (arg1 == 0) { + func_800729EC(); + D_8018D160 = 1; + return; + } + func_80072488(); + return; + case 14: + func_8007278C(arg0); + return; + case 15: + func_80072428(); + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079380.s") #endif @@ -4994,15 +5289,36 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007963C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80079700: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(?); /* extern */ +? func_80072428(); /* extern */ +? func_80072488(s32); /* extern */ +? func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_8007963C(); /* extern */ +extern ? D_80165CBE; -Unable to determine jump table for jr instruction at func_80079700.s line 16. +void func_80079700(s32 arg0) { + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = *(&D_80165CBE + (arg0 * 0xE0)); + switch (temp_t7) { + case 1: + func_8007963C(); + return; + case 2: + func_800721C0(0x10); + func_80072488(arg0); + return; + case 3: + func_80072E54(0, 0x1F, 1, 2, -1); + return; + case 4: + func_80072428(); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079700.s") #endif @@ -5172,29 +5488,196 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079A5C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80079B40: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(s32, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_800730BC(s32, ?, ?, ?, s32, s32); /* extern */ +? func_80073654(s32); /* extern */ +? func_800736E0(s32); /* extern */ +? func_80073720(s32); /* extern */ +? func_8007993C(s32, void *); /* extern */ +? func_800799A8(s32, s32); /* extern */ +? func_80079A5C(s32, void *); /* extern */ +? func_80086EAC(s32, ?, ?); /* extern */ +? func_80090868(void *); /* extern */ +? func_800C9018(u8, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80079B40.s line 71. +void func_80079B40(s32 arg0, s32 playerId) { + void *sp34; + void *sp2C; + s16 temp_v0; + u8 temp_t6; + void *temp_t2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t2 = (arg0 * 0xE0) + &D_80165C18; + sp34 = (playerId * 0xDD8) + D_800DC4DC; + sp2C = temp_t2; + temp_v0 = temp_t2->unkA6; + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 2) { + if (temp_v0 != 3) { + + } else { + func_800730BC(arg0, 0, 3, 1, 2, -1); + } + } else { + func_800721C0(arg0, 0x10); + func_800736E0(arg0); + func_80072488(arg0); + } + } else { + func_800799A8(arg0, playerId); + } + } + temp_t6 = sp2C->unkD6; + switch (temp_t6) { + case 1: + if (func_80086FA4(arg0) != 0) { + func_80073654(arg0); + } + break; + case 2: + func_80090868(sp34); + func_80073654(arg0); + break; + case 3: + if ((sp34->unkCA & 2) == 0) { + func_80086EAC(arg0, 0, 3); + func_80073654(arg0); + } + break; + case 4: + if (func_80086FA4(arg0) != 0) { + func_80073654(arg0); + } + break; + case 5: + func_800722CC(arg0, 1); + func_800C9018(playerId, 0x100FA28); + func_80072428(arg0); + func_80073720(arg0); + break; + } + if (sp2C->unkA6 >= 2) { + func_8007993C(arg0, sp34); + } + func_80079A5C(arg0, sp34); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079B40.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80079D44: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(s32, ?); /* extern */ +? func_800722A4(s32, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_800730BC(s32, ?, ?, ?, s32, s32); /* extern */ +? func_80073654(s32); /* extern */ +? func_800736E0(s32); /* extern */ +? func_80073720(s32); /* extern */ +s32 func_8007375C(s32, ?); /* extern */ +? func_8007993C(s32, void *); /* extern */ +? func_800799A8(s32, s32); /* extern */ +? func_80079A5C(s32, void *); /* extern */ +? func_80086EAC(s32, ?, ?); /* extern */ +? func_80090868(void *); /* extern */ +? func_800C9018(u8, ?); /* extern */ +? func_800C9060(u8, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80079D44.s line 75. +void func_80079D44(s32 arg0, s32 playerId) { + void *sp2C; + s16 temp_v0; + u8 temp_t7; + void *temp_s1; + void *temp_t1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t1 = (arg0 * 0xE0) + &D_80165C18; + sp2C = temp_t1; + temp_v0 = temp_t1->unkA6; + temp_s1 = (playerId * 0xDD8) + D_800DC4DC; + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 2) { + if (temp_v0 != 3) { + + } else { + func_800730BC(arg0, 0, 3, 1, 2, -1); + } + } else { + func_800721C0(arg0, 0x10); + func_800736E0(arg0); + temp_s1->unkCA = temp_s1->unkCA | 0x80; + func_80072488(arg0); + } + } else { + func_800799A8(arg0, playerId); + } + } + temp_t7 = sp2C->unkD6; + switch (temp_t7) { + case 1: + if (func_80086FA4(arg0) != 0) { + func_800C9060(playerId, 0x1900A055); + func_80073654(arg0); + } + break; + case 2: + func_80090868(temp_s1); + func_800722A4(arg0, 4); + func_80073654(arg0); + break; + case 3: + if ((temp_s1->unkF8 == 9) && ((temp_s1->unkCA & 1) == 0) && (temp_s1->unk124 <= 30.0)) { + func_800722A4(arg0, 8); + } + if ((temp_s1->unkCA & 2) == 0) { + func_80086EAC(arg0, 0, 3); + func_80073654(arg0); + } + break; + case 4: + func_8007375C(arg0, 0x1E); + break; + case 5: + temp_s1->unkCA = temp_s1->unkCA & 0xFF7F; + func_800722A4(arg0, 0x10); + func_800722A4(arg0, 0x20); + func_800722CC(arg0, 4); + func_800722CC(arg0, 8); + func_80073654(arg0); + func_800C9060(playerId, 0x1900A056); + break; + case 6: + if (func_8007375C(arg0, 0xA0) != 0) { + func_800722CC(arg0, 0x10); + temp_s1->unkCA = temp_s1->unkCA & 0xFFEF; + temp_s1->unkCA = temp_s1->unkCA | 0x20; + } + break; + case 7: + func_8007375C(arg0, 0x3C); + break; + case 8: + func_80073720(arg0); + func_80072428(arg0); + temp_s1->unkCA = temp_s1->unkCA & 0xFFDF; + func_800722CC(arg0, 1); + func_800C9018(playerId, 0x100FA28); + break; + } + if (sp2C->unkA6 >= 2) { + func_8007993C(arg0, temp_s1); + } + func_80079A5C(arg0, temp_s1); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079D44.s") #endif @@ -5238,15 +5721,51 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A060.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007A124: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(?); /* extern */ +? func_80072428(); /* extern */ +? func_80072488(s32); /* extern */ +? func_8007278C(?); /* extern */ +? func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_80072F88(?, ?, ?, s32, s32); /* extern */ +? func_8007A060(); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007A124.s line 17. +void func_8007A124(s32 arg0) { + u16 temp_t8; + void *temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v0->unkA6; + switch (temp_t8) { + case 1: + func_8007A060(); + return; + case 2: + func_800721C0(0x10); + func_80072488(arg0); + return; + case 3: + func_8007278C(0x14); + return; + case 4: + func_80072E54(0, 0xF, 1, 2, 1); + return; + case 5: + func_8007278C(0x3C); + return; + case 6: + func_80072F88(0xF, 0, 1, 2, 1); + return; + case 7: + if (temp_v0->unkAE == 0) { + func_80072428(); + } + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A124.s") #endif @@ -5290,15 +5809,51 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A228.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007A2EC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(?); /* extern */ +? func_80072428(); /* extern */ +? func_80072488(s32); /* extern */ +? func_8007278C(?); /* extern */ +? func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_80072F88(?, ?, ?, s32, s32); /* extern */ +? func_8007A228(); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007A2EC.s line 17. +void func_8007A2EC(s32 arg0) { + u16 temp_t8; + void *temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v0->unkA6; + switch (temp_t8) { + case 1: + func_8007A228(); + return; + case 2: + func_800721C0(0x10); + func_80072488(arg0); + return; + case 3: + func_8007278C(0x14); + return; + case 4: + func_80072E54(0, 0xF, 1, 2, 1); + return; + case 5: + func_8007278C(0x3C); + return; + case 6: + func_80072F88(0xF, 0, 1, 2, 1); + return; + case 7: + if (temp_v0->unkAE == 0) { + func_80072428(); + } + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A2EC.s") #endif @@ -5347,15 +5902,64 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A3F0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007A4D4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(s32, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_800730BC(s32, ?, ?, ?, s32, s32); /* extern */ +? func_8007A3F0(s32, s32); /* extern */ +? func_80086F10(s32, ?, ? *); /* extern */ +? func_800C9018(u8, ?); /* extern */ +extern ? D_80165C18; +static ? D_800E69F4; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8007A4D4.s line 32. +void func_8007A4D4(s32 arg0, s32 playerId) { + void *sp2C; + s32 temp_t3; + u16 temp_t2; + u8 temp_v0; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t2 = temp_s0->unkA6; + sp2C = (playerId * 0xDD8) + D_800DC4DC; + switch (temp_t2) { + case 1: + func_8007A3F0(arg0, playerId); + break; + case 2: + func_800721C0(arg0, 0x10); + temp_s0->unkD6 = 1; + func_80072488(arg0); + break; + case 3: + func_800730BC(arg0, 0, 0xF, 1, 2, -1); + break; + case 4: + func_80072428(arg0); + break; + } + temp_v0 = temp_s0->unkD6; + if (temp_v0 != 1) { + if (temp_v0 != 2) { + return; + } + temp_t3 = temp_s0->unk4C - 1; + temp_s0->unk4C = temp_t3; + if (temp_t3 == 0) { + func_80072488(arg0); + temp_s0->unkD6 = 0; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + } + if ((temp_s0->unkA6 >= 3) && ((sp2C->unkBC << 9) >= 0)) { + func_80086F10(arg0, 6, &D_800E69F4); + temp_s0->unkD6 = 2; + temp_s0->unk4C = 0x50; + func_800C9018(playerId, 0x100FA28); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A4D4.s") #endif @@ -5446,29 +6050,110 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A910.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007A948: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80079380(s32, s32); /* extern */ +? func_80079700(s32, s32); /* extern */ +? func_80079B40(s32, s32); /* extern */ +? func_80079D44(s32, s32); /* extern */ +? func_8007A124(s32, s32); /* extern */ +? func_8007A2EC(s32, s32); /* extern */ +? func_8007A4D4(s32, s32); /* extern */ +? func_8008BFFC(s32); /* extern */ +extern ? D_80165CF0; +extern ? D_80183DB8; -Unable to determine jump table for jr instruction at func_8007A948.s line 22. +void func_8007A948(s32 arg0) { + s32 temp_s0; + u8 temp_t8; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = *(&D_80183DB8 + (arg0 * 4)); + temp_t8 = *(&D_80165CF0 + (temp_s0 * 0xE0)); + switch (temp_t8) { + case 1: + func_80079380(temp_s0, arg0); + func_8008BFFC(temp_s0); + return; + case 2: + func_80079700(temp_s0, arg0); + func_8008BFFC(temp_s0); + return; + case 3: + func_80079B40(temp_s0, arg0); + return; + case 4: + func_8007A124(temp_s0, arg0); + func_8008BFFC(temp_s0); + return; + case 5: + func_8007A2EC(temp_s0, arg0); + func_8008BFFC(temp_s0); + return; + case 6: + func_8007A4D4(temp_s0, arg0); + func_8008BFFC(temp_s0); + return; + case 7: + func_80079D44(temp_s0, arg0); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A948.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007AA44: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80079114(s32, s32, ?); /* extern */ +? func_8007A66C(s32, s32, s32); /* extern */ +? func_8007A778(s32, s32, s32); /* extern */ +? func_8007A910(); /* extern */ +extern ? D_80165CF0; +extern ? D_80183DB8; +extern ? D_80183FA8; -Unable to determine jump table for jr instruction at func_8007AA44.s line 30. +void func_8007AA44(s32 arg0) { + s32 temp_s0; + u8 temp_t1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + func_8007A910(); + temp_s0 = *(&D_80183DB8 + (arg0 * 4)); + temp_t1 = *(&D_80165CF0 + (temp_s0 * 0xE0)); + D_8018C028 = (arg0 << 0xD) + &D_80183FA8; + switch (temp_t1) { + case 1: + func_80079114(temp_s0, arg0, 2); + func_8007A66C(temp_s0, D_8018CF1C, D_8018CF14); + return; + case 2: + func_80079114(temp_s0, arg0, 0); + func_8007A66C(temp_s0, D_8018CF1C, D_8018CF14); + return; + case 3: + func_80079114(temp_s0, arg0, 0); + func_8007A778(temp_s0, D_8018CF1C, D_8018CF14); + return; + case 4: + func_80079114(temp_s0, arg0, 0); + func_8007A66C(temp_s0, D_8018CF1C, D_8018CF14); + return; + case 5: + func_80079114(temp_s0, arg0, 0); + func_8007A66C(temp_s0, D_8018CF1C, D_8018CF14); + return; + case 6: + func_80079114(temp_s0, arg0, 0); + func_8007A66C(temp_s0, D_8018CF1C, D_8018CF14); + return; + case 7: + func_80079114(temp_s0, arg0, 0); + func_8007A778(temp_s0, D_8018CF1C, D_8018CF14); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007AA44.s") #endif @@ -5823,15 +6508,260 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007B254.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007B34C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80040FD8(void *, ?, ?); /* extern */ +s32 func_8004106C(void *, ?, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +s32 func_80072320(s32, ?); /* extern */ +s32 func_80072354(s32, ?); /* extern */ +? func_800723A4(s32, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_800726CC(s32, ?); /* extern */ +? func_8007278C(s32, ?); /* extern */ +? func_800729D0(s32, s16); /* extern */ +? func_80072D3C(s32, s16, ?, ?, s32); /* extern */ +? func_80072E54(s32, ?, ?, ?, s32, s32); /* extern */ +? func_80073600(s32); /* extern */ +? func_8007AC9C(s32); /* extern */ +? func_8007B254(s32, s32); /* extern */ +? func_800C8F80(u8, ?); /* extern */ +? func_800C9018(u8, ?); /* extern */ +extern ? D_80165C18; +extern ? D_80183E88; +extern ? D_8018CA70; +static ? D_800E44F0; /* unable to generate initializer; const */ +static ? D_800E4530; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8007B34C.s line 54. +void func_8007B34C(s32 playerId) { + s32 sp40; + void *sp38; + void *sp2C; + void *sp28; + s16 temp_a1; + s16 temp_a1_2; + s16 temp_a1_3; + s16 temp_v0_6; + s32 temp_s0; + s32 temp_t6_2; + s32 temp_v0; + s32 temp_v0_2; + s32 temp_v0_4; + u16 temp_t6; + u16 temp_v0_3; + u8 temp_v0_5; + void *temp_t0; + void *temp_v1; + void *temp_v1_2; + void *temp_v1_3; + void *temp_v1_4; + void *temp_v1_5; + void *temp_v1_6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp38 = (playerId * 0xDD8) + D_800DC4DC; + sp40 = 0; + temp_s0 = *(&D_80183E88 + (playerId * 4)); + if ((((playerId * 0x10) + D_800DC4BC)->unk6 & 0x2000) != 0) { + sp40 = 1; + } + if (D_80165888 != 0) { + func_800723A4(temp_s0, 0); + } + temp_t0 = (temp_s0 * 0xE0) + &D_80165C18; + sp2C = temp_t0; + temp_t6 = temp_t0->unkA6; + switch (temp_t6) { + case 0x1: + func_8007B254(temp_s0, playerId); + break; + case 0x2: + temp_v0 = D_800DC52C; + if (temp_v0 == 0) { + temp_v1 = (playerId * 0x84) + &D_8018CA70; + sp28 = temp_v1; + func_80040FD8(temp_v1 + 0x48, 0x40, 4); + if (temp_v1->unk48 == 0x40) { + func_80072488(temp_s0); + } + } else if (temp_v0 == 3) { + if ((playerId == 0) || (playerId == 2)) { + temp_v1_3 = (playerId * 0x84) + &D_8018CA70; + sp28 = temp_v1_3; + func_80040FD8(temp_v1_3 + 0x46, 0x80, 8); + if (temp_v1_3->unk46 == 0x80) { + func_80072488(temp_s0); + } + } else { + temp_v1_2 = (playerId * 0x84) + &D_8018CA70; + sp28 = temp_v1_2; + func_8004106C(temp_v1_2 + 0x46, -0x80, 8); + if (temp_v1_2->unk46 == -0x80) { + func_80072488(temp_s0); + } + } + } else { + temp_v1_4 = (playerId * 0x84) + &D_8018CA70; + sp28 = temp_v1_4; + func_80040FD8(temp_v1_4 + 0x46, 0x80, 8); + if (temp_v1_4->unk46 == 0x80) { + func_80072488(temp_s0); + } + } + break; + case 0x3: + func_80072E54(temp_s0, 1, 0xF, 1, 2, 2); + break; + case 0x4: + func_80072E54(temp_s0, 1, 6, 1, 8, 1); + break; + case 0x5: + func_80072E54(temp_s0, 1, 4, 1, 0x10, 1); + break; + case 0x6: + sp2C->unkD2 = func_8007AFB0(temp_s0, playerId); + sp2C->unk4C = 8; + sp2C->unkD6 = 2; + func_80072488(temp_s0); + sp28 = playerId; + func_800C9018(playerId, 0x100FE1C); + func_800C8F80(playerId, 0x100FE47); + break; + case 0x7: + func_80072D3C(temp_s0, sp2C->unkA2, 0, 8, 0xA); + break; + case 0x9: + func_800722CC(temp_s0, 4); + func_80073600(temp_s0); + sp2C->unkD2 = 0; + func_80072488(temp_s0); + break; + case 0xA: + func_8007278C(temp_s0, 0x14); + break; + case 0xB: + temp_v0_2 = D_800DC52C; + if (temp_v0_2 == 0) { + if (func_8004106C((playerId * 0x84) + 0x48 + &D_8018CA70, 0, 4) != 0) { + func_80072488(temp_s0); + } + } else if (temp_v0_2 == 3) { + if ((playerId == 0) || (playerId == 2)) { + temp_v1_6 = (playerId * 0x84) + &D_8018CA70; + sp28 = temp_v1_6; + func_8004106C(temp_v1_6 + 0x46, 0, 8); + if (temp_v1_6->unk46 == 0) { + func_80072488(temp_s0); + } + } else { + temp_v1_5 = (playerId * 0x84) + &D_8018CA70; + sp28 = temp_v1_5; + func_80040FD8(temp_v1_5 + 0x46, 0, 8); + if (temp_v1_5->unk46 == 0) { + func_80072488(temp_s0); + } + } + } else if (func_8004106C((playerId * 0x84) + 0x46 + &D_8018CA70, 0, 8) != 0) { + func_80072488(temp_s0); + } + break; + case 0xC: + func_80072428(temp_s0); + break; + case 0x14: + temp_a1 = sp2C->unkA2; + if (temp_a1 == 0xB) { + func_80072D3C(temp_s0, temp_a1, 0, 8, 0xA); + } else { + func_80072D3C(temp_s0, temp_a1, 0xB, 8, 0xA); + } + break; + case 0x15: + func_800726CC(temp_s0, 8); + sp2C->unkD6 = 2; + break; + case 0x1E: + temp_a1_2 = sp2C->unkA2; + if (temp_a1_2 == 0xB) { + func_80072D3C(temp_s0, temp_a1_2, 0, 8, 0xA); + } else { + func_80072D3C(temp_s0, temp_a1_2, 0xB, 8, 0xA); + } + break; + case 0x1F: + func_800726CC(temp_s0, 9); + break; + case 0x28: + temp_a1_3 = sp2C->unkA2; + if (temp_a1_3 == 0xD) { + func_80072D3C(temp_s0, temp_a1_3, 0xE, 8, 0xA); + } else { + func_80072D3C(temp_s0, temp_a1_3, 0xD, 8, 0xA); + } + break; + case 0x29: + func_800726CC(temp_s0, 8); + break; + case 0x32: + func_80072D3C(temp_s0, sp2C->unkA2, 0, 8, 0x64); + break; + } + if (func_80072320(temp_s0, 2) != 0) { + temp_v0_3 = sp2C->unk98; + if (temp_v0_3 == 0) { + func_8007AC9C(playerId); + } else { + sp2C->unk98 = temp_v0_3 - 1; + } + } + temp_v0_4 = sp2C->unk4C; + if (temp_v0_4 >= 0) { + if (temp_v0_4 > 0) { + sp2C->unk4C = temp_v0_4 - 1; + } else { + temp_v0_5 = sp2C->unkD6; + if (temp_v0_5 != 1) { + if (temp_v0_5 != 2) { + if (temp_v0_5 != 3) { + + } else if (sp2C->unkA4 == 0) { + if (func_80072354(temp_s0, 1) != 0) { + temp_v0_6 = sp2C->unkA2; + if (temp_v0_6 == 0xB) { + if (func_8007B040(temp_s0, playerId) != 0) { + func_800726CC(temp_s0, 0x14); + sp2C->unkD6 = 0; + } else { + func_800726CC(temp_s0, 9); + } + } else if ((temp_v0_6 == 0xD) || (temp_v0_6 == 0xE)) { + sp2C->unkA2 = temp_v0_6 - 1; + func_800729D0(temp_s0, sp2C->unkA2); + sp2C->unkD6 = 3; + func_800726CC(temp_s0, 0x28); + } else { + func_800726CC(temp_s0, 9); + } + } else { + func_800722CC(temp_s0, 1); + func_800726CC(temp_s0, 0x1E); + sp2C->unkD6 = 0; + } + } + } else { + func_800729D0(temp_s0, sp2C->unkA2); + sp2C->unkD6 = 3; + } + } else if (sp40 != 0) { + func_80073600(temp_s0); + func_800726CC(temp_s0, 6); + } + } + } + temp_t6_2 = sp2C->unkD2 * 4; + sp2C->unk60 = *(&D_800E44F0 + temp_t6_2); + sp2C->unk64 = *(&D_800E4530 + temp_t6_2); + sp38->unk10 = sp2C->unkA4; +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007B34C.s") #endif @@ -5980,29 +6910,150 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007BDE0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007BEC8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(s32, ?); /* extern */ +? func_80072428(); /* extern */ +? func_80072488(); /* extern */ +s32 func_8007278C(?); /* extern */ +? func_8007BDE0(); /* extern */ +? func_80086E70(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007BEC8.s line 17. +void func_8007BEC8(s32 arg0) { + s32 temp_a0; + u16 temp_t8; + void *temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v0->unkA6; + switch (temp_t8) { + case 1: + func_8007BDE0(); + return; + case 2: + temp_a0 = arg0; + if (func_8007278C(0x3C) != 0) { + arg0 = temp_a0; + func_800721C0(temp_a0, 0x10); + func_80086E70(arg0); + return; + } + default: + return; + case 3: + if (temp_v0->unkAE == 0) { + func_80072488(); + return; + } + /* Duplicate return node #11. Try simplifying control flow for better match */ + return; + case 4: + if (func_8007278C(0xA) != 0) { + func_8008701C(arg0, 2); + return; + } + /* Duplicate return node #11. Try simplifying control flow for better match */ + return; + case 5: + if (temp_v0->unkAE == 0) { + func_80072428(); + } + /* Duplicate return node #11. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007BEC8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007BFB0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80040FD8(void *, ?, ?); /* extern */ +s32 func_80041028(void *, ?, u16); /* extern */ +? func_800721E8(s32, ?); /* extern */ +? func_80074344(s32, void *, ?, ?, f32, s32, s32); /* extern */ +? func_80086F60(s32); /* extern */ +? func_80086FD4(s32); /* extern */ +s32 func_80087060(s32, ?); /* extern */ +s32 func_800871AC(s32, ?); /* extern */ +? func_800877C4(s32); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007BFB0.s line 20. +void func_8007BFB0(s32 arg0) { + f64 temp_f0; + s16 temp_v0; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_v0 = temp_s0->unkAE; + switch (temp_v0) { + case 1: + temp_s0->unk3C = -0.2f; + if (temp_s0->unk2C <= 0.0) { + temp_s0->unk2C = 0.0f; + temp_s0->unk3C = 0.0f; + func_80086F60(arg0); + } +block_26: + break; + case 2: + if (func_800871AC(arg0, 0x14) != 0) { + temp_s0->unk92 = 0x40; + } + goto block_26; + case 3: + temp_s0->unk0 = temp_s0->unk0 - 0.0015; + if (temp_s0->unkBE >= 0xA01) { + temp_s0->unk92 = temp_s0->unk92 - 4; + } + if (func_80041028(temp_s0 + 0xBE, 0xC00, temp_s0->unk92) != 0) { + func_80086FD4(arg0); + } + goto block_26; + case 4: + temp_s0->unk0 = temp_s0->unk0 - 0.0015; + temp_s0->unk34 = 0.001f; + func_80086FD4(arg0); + temp_s0->unk92 = 0; + goto block_26; + case 5: + temp_f0 = temp_s0->unk34; + if (temp_f0 <= 0.004) { + temp_s0->unk34 = temp_f0 + 0.0002; + } + temp_s0->unk0 = temp_s0->unk0 + temp_s0->unk34; + func_80040FD8(temp_s0 + 0x92, 0x100, 0x10); + temp_s0->unkBE = temp_s0->unkBE - temp_s0->unk92; + if (func_80087060(arg0, 0x35) != 0) { + func_80086FD4(arg0); + } + goto block_26; + case 6: + if (func_80087060(arg0, 0xF) != 0) { + func_80086FD4(arg0); + D_801658CE = 1; + } + goto block_26; + case 7: + temp_s0->unk0 = temp_s0->unk0 - 0.05; + if (temp_s0->unk0 <= 0.01) { + func_800721E8(arg0, 0x10); + temp_s0->unk0 = 0.000001f; + func_80086FD4(arg0); + } + goto block_26; + case 8: + func_80086F60(arg0); + goto block_26; + } + if (temp_s0->unkAE < 0xA) { + func_80074344(arg0, temp_s0, 0x3E4CCCCD, 0x3E570A3D, 0.001f, 0, -1); + } + func_800877C4(arg0); + func_8008BF18(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007BFB0.s") #endif @@ -6218,15 +7269,55 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C5B4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007C684: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80072428(s32, s32); /* extern */ +? func_80073514(s32); /* extern */ +? func_80073884(s32); /* extern */ +? func_80073998(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_80073CB0(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_80073DC0(s32, void *, ?, ?); /* extern */ +? func_8007C5B4(s16); /* extern */ +? func_80086F60(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007C684.s line 34. +void func_8007C684(s32 arg0) { + void *sp30; + s16 temp_a1; + s32 temp_t6; + u8 temp_t8; + void *temp_v0; + s32 phi_a1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0 * 0xE0; + temp_v0 = temp_t6 + &D_80165C18; + temp_a1 = temp_v0->unkA6; + phi_a1 = temp_a1; + if ((temp_a1 != 0) && (temp_a1 == 1)) { + sp30 = temp_v0; + func_8007C5B4(temp_a1); + phi_a1 = temp_v0->unkA6; + } + if (phi_a1 >= 2) { + temp_t8 = (temp_t6 + &D_80165C18)->unkDC; + switch (temp_t8) { + case 1: + func_80073998(arg0, temp_t6 + &D_80165C18 + 0xA0, 0, 0x50, 2, 1, 0); + break; + case 2: + func_80073CB0(arg0, temp_t6 + &D_80165C18 + 0xA0, 0x50, 0x78, 1, 0, -1); + break; + case 3: + func_80073DC0(arg0, temp_t6 + &D_80165C18 + 0xA0, 0, 2); + break; + case 4: + func_80072428(arg0, phi_a1); + func_80086F60(arg0); + func_80073884(arg0); + break; + } + func_80073514(arg0); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C684.s") #endif @@ -6521,15 +7612,68 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007CE0C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007CEDC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80072428(s32); /* extern */ +? func_8007278C(s32, ?); /* extern */ +? func_80072950(s32, u8, ?, ?); /* extern */ +? func_80073514(s32); /* extern */ +? func_80073884(s32); /* extern */ +? func_80073998(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_80073CB0(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_80073DC0(s32, void *, ?, ?); /* extern */ +? func_8007CE0C(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007CEDC.s line 61. +void func_8007CEDC(s32 arg0) { + s16 temp_v0; + u8 temp_t9; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_v0 = temp_s0->unkA6; + switch (temp_v0) { /* switch 1 */ + case 1: /* switch 1 */ + func_8007CE0C(arg0); +block_6: + break; + case 2: /* switch 1 */ + func_8007278C(arg0, 0x1E); + goto block_6; + case 3: /* switch 1 */ + func_8007278C(arg0, 0x3E8); + goto block_6; + case 4: /* switch 1 */ + func_80072428(arg0); + goto block_6; + } + if (temp_s0->unkA6 >= 2) { + func_80072950(arg0, temp_s0->unkDC, 0, 4); + func_80073514(arg0); + temp_t9 = temp_s0->unkDC; + switch (temp_t9) { /* switch 2 */ + case 1: /* switch 2 */ + func_80073998(arg0, temp_s0 + 0xA0, 0x28, 0x50, 4, 0, 0); + return; + case 2: /* switch 2 */ + func_80073CB0(arg0, temp_s0 + 0xA0, 0x50, 0xB4, 2, 0, -1); + if ((temp_s0->unkAE == 0) || (temp_s0->unkA6 == 3)) { + temp_s0->unkDC = temp_s0->unkDC + 1; + return; + } + /* Duplicate return node #16. Try simplifying control flow for better match */ + return; + case 3: /* switch 2 */ + func_80073DC0(arg0, temp_s0 + 0xA0, 0, 4); + return; + case 4: /* switch 2 */ + func_80073884(arg0); + /* Duplicate return node #16. Try simplifying control flow for better match */ + return; + } + } else { + default: /* switch 2 */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007CEDC.s") #endif @@ -7035,15 +8179,79 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007DF20.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007E00C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_800417B4(u16, ?, s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_8007278C(s32, ?, s32); /* extern */ +? func_80073CB0(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_8007D714(?); /* extern */ +? func_8007DF20(s32); /* extern */ +? func_800C98B8(void *, void *, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007E00C.s line 19. +void func_8007E00C(s32 arg0) { + s16 temp_v0; + s16 temp_v1; + s32 temp_a0; + s32 temp_a2; + u16 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkA6; + temp_a2 = arg0; + switch (temp_t8) { + case 1: + func_8007DF20(temp_a2); + return; + case 3: + D_8018CFB0 = 1; + func_80072488(temp_a2); + return; + case 4: + temp_a0 = temp_a2; + arg0 = temp_a2; + func_8007278C(temp_a0, 0xD2, temp_a2); + if (D_80165594 == 0) { + if (gCCSelection < 2) { + func_8007D714(1); + func_8007D714(1); + } else { + func_8007D714(1); + func_8007D714(1); + func_8007D714(1); + func_8007D714(1); + } + } + func_80073CB0(arg0, temp_s0 + 0xA0, -0x2000, 0, 0x400, 0, -1); + temp_v1 = temp_s0->unk92; + temp_s0->unkB6 = temp_s0->unkA0; + if (temp_v1 == 0) { + func_800C98B8(temp_s0 + 4, temp_s0 + 0x38, 0x1901904E); + temp_s0->unk92 = 0x14; + return; + } + temp_s0->unk92 = temp_v1 - 1; + return; + case 5: + arg0 = temp_a2; + temp_v0 = func_800417B4(temp_s0->unkB6, 0, temp_a2); + temp_s0->unkB6 = temp_v0; + if ((temp_v0 & 0xFFFF) == 0) { + func_80072488(arg0); + return; + } + default: + return; + case 6: + temp_s0->unkB6 = 0; + temp_s0->unk92 = 0; + func_80072488(temp_a2); + D_8018CFB0 = 0; + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E00C.s") #endif @@ -7167,15 +8375,45 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E358.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007E3EC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80072488(); /* extern */ +? func_8007278C(?); /* extern */ +? func_8007D714(?); /* extern */ +? func_8007E358(); /* extern */ +extern ? D_80165CBE; -Unable to determine jump table for jr instruction at func_8007E3EC.s line 16. +void func_8007E3EC(s32 arg0) { + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = *(&D_80165CBE + (arg0 * 0xE0)); + switch (temp_t7) { + case 1: + func_8007E358(); + return; + case 3: + D_8018CFE8 = 1; + func_80072488(); + return; + case 4: + func_8007278C(0xD2); + if (D_80165598 == 0) { + if (gCCSelection < 2) { + func_8007D714(2); + return; + } + func_8007D714(2); + func_8007D714(2); + return; + } + default: + return; + case 5: + D_8018CFE8 = 0; + func_80072488(); + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E3EC.s") #endif @@ -7260,15 +8498,219 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E59C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007E63C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80040EE0(void *, f32, ?); /* extern */ +s32 func_80040F2C(void *, ?, ?); /* extern */ +? func_800721C0(s32, ?); /* extern */ +? func_800721E8(s32, ?); /* extern */ +s32 func_8007223C(s32, ?); /* extern */ +? func_800722A4(s32, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +s32 func_80072320(s32, ?); /* extern */ +? func_80072388(s32, ?); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_8007266C(s32); /* extern */ +? func_800726CC(s32, ?); /* extern */ +s32 func_8007278C(s32, ?); /* extern */ +? func_80072AAC(s32, ?, ?); /* extern */ +? func_80072E54(s32, ?, ?, ?, s32, s32); /* extern */ +? func_800730BC(s32, ?, ?, ?, s32, s32); /* extern */ +s32 func_8007326C(s32, ?, ?, ?, s32, s32); /* extern */ +s32 func_80073E18(s32, void *, ?, ?); /* extern */ +? func_80080DE4(s32); /* extern */ +? func_800C98B8(s32, s32, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007E63C.s line 43. +void func_8007E63C(s32 arg0) { + void *sp28; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + s16 temp_v0; + s32 temp_t6; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0 * 0xE0; + temp_v1 = temp_t6 + &D_80165C18; + temp_v0 = temp_v1->unkA6; + if (temp_v0 >= 0x6D) { + if (temp_v0 != 0xC8) { + if (temp_v0 != 0x12C) { + return; + } + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x8000) != 0) { + func_800722CC(arg0, 4); + func_8007266C(arg0); + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + } + if (func_8007278C(arg0, 0x12C) != 0) { + func_80072320(arg0, 0x80); + func_80072428(arg0); + func_800726CC(arg0, 1); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + } + if (temp_v0 >= 0x37) { + switch (temp_v0) { /* switch 1 */ + case 0x64: /* switch 1 */ + func_80072E54(arg0, 3, 5, 1, 8, 0); + return; + case 0x65: /* switch 1 */ + func_8007278C(arg0, 0x1E); + return; + case 0x66: /* switch 1 */ + if (func_80040EE0(temp_v1 + 0x2C, 20.0f, 0x3FC00000) != 0) { + func_80072488(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x67: /* switch 1 */ + if (func_80040F2C(temp_v1 + 0x2C, 0, 0x3FC00000) != 0) { + if (func_8007223C(arg0, 0x20000) != 0) { + func_800722A4(arg0, 0x10); + if (func_8007223C(arg0, 0x40000) != 0) { + func_800722A4(arg0, 0x20); + } + } + func_80072488(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x68: /* switch 1 */ + if (func_80040EE0(temp_v1 + 0x2C, 12.0f, 0x3FC00000) != 0) { + func_80072488(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x69: /* switch 1 */ + sp28 = temp_v1; + if (func_80040F2C(temp_v1 + 0x2C, 0, 0x3FC00000) != 0) { + sp28 = temp_v1; + if (func_8007223C(arg0, 0x20000) != 0) { + sp28 = temp_v1; + func_800722A4(arg0, 0x10); + if (func_8007223C(arg0, 0x40000) != 0) { + sp28 = temp_v1; + func_800722A4(arg0, 0x20); + } + } + func_800C98B8(temp_t6 + &D_80165C18 + 4, temp_t6 + &D_80165C18 + 0x38, 0x19018045); + func_80072488(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x6A: /* switch 1 */ + if (func_8007326C(arg0, 5, 3, 1, 6, 3) != 0) { + func_80080DE4(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x6B: /* switch 1 */ + temp_f0 = temp_v1->unk2C; + if (temp_f0 >= 22.0f) { + temp_v1->unkD2 = 0; + } else if (temp_f0 >= 20.0f) { + temp_v1->unkD2 = 1; + } else if (temp_f0 >= 18.0f) { + temp_v1->unkD2 = 2; + } else if (temp_f0 >= 16.0f) { + temp_v1->unkD2 = 3; + } else if (temp_f0 >= 14.0f) { + temp_v1->unkD2 = 4; + } else { + sp28 = temp_v1; + func_800730BC(arg0, 3, 5, 1, 6, -1); + } + if (func_80040EE0(temp_t6 + &D_80165C18 + 0x2C, (temp_t6 + &D_80165C18)->unk20, 0x3F000000) != 0) { + func_80072388(arg0, 0); + func_80072488(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x6C: /* switch 1 */ + if (func_8007278C(arg0, 0x64) != 0) { + func_800722CC(arg0, 2); + func_800721E8(arg0, 0x200); + func_8007266C(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + } + } else { + switch (temp_v0) { /* switch 2 */ + case 0x32: /* switch 2 */ + if (func_80040EE0(temp_v1 + 0x2C, temp_v1->unk20 + 15.0, 0x3FC00000) != 0) { + func_800721C0(arg0, 0x200); + func_800722A4(arg0, 1); + func_800722CC(arg0, 2); + func_80072488(arg0); + return; + } + default: /* switch 2 */ + default: /* switch 1 */ + return; + case 0x33: /* switch 2 */ + sp28 = temp_v1; + if (func_80040F2C(temp_v1 + 0x2C, 0, 0x40000000) != 0) { + temp_f0_2 = temp_v1->unk2C; + if (temp_f0_2 >= 16.0f) { + temp_v1->unkD2 = 0; + } else if (temp_f0_2 >= 8.0f) { + temp_v1->unkD2 = 1; + } else { + temp_v1->unkD2 = 2; + } + func_800722CC(arg0, 1); + if (func_8007223C(arg0, 0x10000) != 0) { + func_800722A4(arg0, 0x10); + if (func_8007223C(arg0, 0x40000) != 0) { + func_800722A4(arg0, 0x20); + } + } + if (func_80072320(arg0, 2) != 0) { + func_800726CC(arg0, 0x64); + return; + } + func_80072488(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + case 0x34: /* switch 2 */ + func_80072AAC(arg0, 3, 6); + return; + case 0x35: /* switch 2 */ + func_80072AAC(arg0, 2, 0x32); + return; + case 0x36: /* switch 2 */ + temp_f0_3 = temp_v1->unk2C; + if (temp_f0_3 >= 20.0f) { + temp_v1->unkD2 = 0; + } else if (temp_f0_3 >= 18.0f) { + temp_v1->unkD2 = 1; + } + if (func_80040EE0(temp_v1 + 0x2C, temp_v1->unk20, 0x3F000000) != 0) { + func_800721E8(arg0, 0x200); + func_8007266C(arg0); + return; + } + /* Duplicate return node #68. Try simplifying control flow for better match */ + return; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E63C.s") #endif @@ -7317,15 +8759,48 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007EC30.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007ED6C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80072568(s32, ?); /* extern */ +? func_800725E8(s32, ?, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +? func_8007278C(s32, ?); /* extern */ +? func_80073514(s32); /* extern */ +? func_8007E63C(s32); /* extern */ +? func_8007EC30(s32); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007ED6C.s line 20. +void func_8007ED6C(s32 arg0) { + void *sp24; + u16 temp_t9; + void *temp_t8; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t8 = (arg0 * 0xE0) + &D_80165C18; + sp24 = temp_t8; + temp_t9 = temp_t8->unkA6; + switch (temp_t9) { + case 1: + func_8007EC30(arg0); + break; + case 2: + func_8007278C(arg0, 0x3C); + break; + case 3: + func_80072568(arg0, 0x32); + break; + case 4: + if (func_8007E59C(arg0) != 0) { + func_800725E8(arg0, 0x12C, 2); + } else { + func_800726CC(arg0, 2); + } + break; + } + func_8007E63C(arg0); + func_8008BF18(arg0); + sp24->unkC0 = sp24->unkB4; + func_80073514(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007ED6C.s") #endif @@ -7380,29 +8855,239 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007EE5C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007EFBC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80040EE0(void *, ?, ?); /* extern */ +s32 func_80040F2C(void *, ?, ?); /* extern */ +s32 func_800413B8(void *, f32, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +s32 func_80073E18(s32, void *, ?, ?); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007EFBC.s line 19. +void func_8007EFBC(s32 arg0) { + void *sp24; + u16 temp_t8; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v1->unkAE; + switch (temp_t8) { + case 1: + sp24 = temp_v1; + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x800, 0x8000) != 0) { + temp_v1->unk1C = D_8018D01C * 200.0; + func_80086FD4(arg0); + return; + } + default: + return; + case 2: + if (func_800413B8(temp_v1 + 0x28, temp_v1->unk1C, 0x40800000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 3: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x8000) != 0) { + func_800726CC(arg0, 3); + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 5: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0xC000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 6: + if (func_80040F2C(temp_v1 + 0x30, 0xC2C80000, 0x40000000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 7: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x4000) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 9: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x10000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 10: + if (func_800413B8(temp_v1 + 0x28, 0.0f, 0x40800000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 11: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x10000) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 13: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x14000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 14: + if (func_80040EE0(temp_v1 + 0x30, 0, 0x40000000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 15: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0xC000) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 17: + func_8008701C(arg0, 1); + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007EFBC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007F280: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80040EE0(void *, ?, ?); /* extern */ +s32 func_80040F2C(void *, ?, ?); /* extern */ +s32 func_800413B8(void *, f32, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +s32 func_80073E18(s32, void *, ?, ?); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007F280.s line 19. +void func_8007F280(s32 arg0) { + void *sp24; + u16 temp_t8; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v1->unkAE; + switch (temp_t8) { + case 1: + sp24 = temp_v1; + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x10000) != 0) { + temp_v1->unk1C = D_8018D01C * -200.0; + func_80086FD4(arg0); + return; + } + default: + return; + case 2: + if (func_800413B8(temp_v1 + 0x28, temp_v1->unk1C, 0x40800000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 3: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x10000) != 0) { + func_800726CC(arg0, 3); + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 5: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x4000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 6: + if (func_80040EE0(temp_v1 + 0x30, 0x42C80000, 0x40000000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 7: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0xC000) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 9: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x8000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 10: + if (func_800413B8(temp_v1 + 0x28, 0.0f, 0x40800000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 11: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x8000) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 13: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0xC000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 14: + if (func_80040F2C(temp_v1 + 0x30, 0, 0x40000000) != 0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 15: + if (func_80073E18(arg0, temp_v1 + 0xB4, 0x400, 0x14000) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + return; + } + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + case 17: + func_8008701C(arg0, 1); + /* Duplicate return node #27. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007F280.s") #endif @@ -7647,15 +9332,118 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007FA08.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8007FB48: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800413B8(void *, ?, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +? func_80086FD4(s32, void *); /* extern */ +? func_8008775C(s32, void *); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8007FB48.s line 29. +void func_8007FB48(s32 arg0) { + void *sp18; + s16 temp_a0; + s16 temp_a0_2; + s16 temp_a0_3; + s32 temp_t1; + s32 temp_t7; + s32 temp_v0; + u16 temp_t2; + u16 temp_v0_2; + void *temp_a1; + void *temp_v1; + s16 phi_a0; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = arg0 * 0xE0; + temp_v1 = temp_t7 + &D_80165C18; + temp_t2 = temp_v1->unkAE; + temp_a1 = (temp_v1->unkD1 * 0xDD8) + D_800DC4DC; + switch (temp_t2) { + case 1: + temp_v1->unkB0 = 0xA0; + temp_v1->unk28 = 0.0f; + temp_v1->unk30 = 0.0f; + temp_v1->unk40 = 0.0f; + func_80086FD4(arg0, temp_a1); + return; + case 2: + temp_v0 = temp_v1->unk48; + temp_a0 = temp_v1->unkB0; + temp_v1->unk38 = (temp_a1->unk94 * D_8018D01C) * 1.25; + if (temp_v0 >= temp_a0) { + if (temp_a0 == temp_v0) { + if ((D_8018D400 & 1) != 0) { + temp_v1->unk40 = 1.5f; + } else { + temp_v1->unk40 = -1.5f; + } + } + if (temp_v1->unk40 >= 0.0) { + if (temp_v1->unk30 >= 40.0) { + temp_v1->unk40 = -1.5f; + } + } else if (temp_v1->unk30 <= -40.0) { + temp_v1->unk40 = 1.5f; + } + } + sp18 = temp_v1; + func_8008775C(arg0, temp_a1); + temp_a0_2 = temp_v1->unkB0; + phi_a0 = temp_a0_2; + if (temp_a0_2 < 0x65) { + sp18 = temp_v1; + temp_a0_3 = temp_v1->unkB0; + temp_v1->unkB4 = func_800417B4(temp_v1->unkB4, (temp_v1->unkC0 + 0x8000) & 0xFFFF); + phi_a0 = temp_a0_3; + if (temp_a0_3 == 0x64) { + temp_v1->unkD2 = 1; + phi_a0 = temp_v1->unkB0; + } + } + phi_v0 = 0; + if (gIsMirrorMode != 0) { + if ((temp_t7 + &D_80165C18)->unk28 <= -1000.0) { + goto block_20; + } + } else if ((temp_t7 + &D_80165C18)->unk28 >= 1000.0) { +block_20: + phi_v0 = 1; + } + (temp_t7 + &D_80165C18)->unkB0 = phi_a0 - 1; + if (((temp_t7 + &D_80165C18)->unkB0 == 0) || (phi_v0 != 0)) { + (temp_t7 + &D_80165C18)->unk34 = 0.0f; + func_800726CC(arg0, 3); + func_80086FD4(arg0); + return; + } + default: + return; + case 4: + sp18 = temp_v1; + func_800413B8(temp_v1 + 0x30, 0, 0x40000000); + func_800413B8(temp_v1 + 0x28, 0, 0x40A00000); + if ((temp_v1->unk30 + temp_v1->unk28) == 0.0) { + func_80086FD4(arg0); + return; + } + /* Duplicate return node #28. Try simplifying control flow for better match */ + return; + case 5: + sp18 = temp_v1; + temp_v0_2 = func_800417B4(temp_v1->unkB4, temp_v1->unkC0); + temp_t1 = temp_v0_2 & 0xFFFF; + temp_v1->unkB4 = temp_v0_2; + if (temp_t1 == temp_v1->unkC0) { + sp18 = temp_v1; + func_800722CC(arg0, 8); + func_80086FD4(arg0); + temp_v1->unkD2 = 0; + } + /* Duplicate return node #28. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007FB48.s") #endif @@ -7828,15 +9616,41 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080078.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800801FC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80072568(s32, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +? func_8007278C(s32, s32); /* extern */ +? func_80073514(s32); /* extern */ +? func_8007E63C(s32); /* extern */ +? func_80080078(s32); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_800801FC.s line 19. +void func_800801FC(s32 arg0) { + u16 temp_t8; + void *temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v0->unkA6; + switch (temp_t8) { + case 1: + func_80080078(arg0); + break; + case 2: + func_8007278C(arg0, temp_v0->unk50); + break; + case 3: + func_80072568(arg0, 0x32); + break; + case 4: + temp_v0->unk50 = 0x3C; + func_800726CC(arg0, 2); + break; + } + func_8007E63C(arg0); + func_8008BF18(arg0); + func_80073514(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800801FC.s") #endif @@ -7889,15 +9703,53 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800802C0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80080408: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_8007223C(s32, ?); /* extern */ +? func_80072488(s32); /* extern */ +? func_800726CC(s32, ?); /* extern */ +s32 func_8007278C(s32, ?); /* extern */ +s32 func_800730BC(s32, ?, ?, ?, s32, s32); /* extern */ +? func_80073514(s32); /* extern */ +? func_800802C0(s32); /* extern */ +? func_8008A6DC(s32, ?); /* extern */ +? func_8008BF18(s32); /* extern */ +? func_800C98B8(void *, void *, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80080408.s line 19. +void func_80080408(s32 arg0) { + void *sp2C; + u16 temp_t8; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v1->unkA6; + switch (temp_t8) { + case 1: + func_800802C0(arg0); + break; + case 2: + sp2C = temp_v1; + func_8008A6DC(arg0, 0x42C80000); + if (func_8007223C(arg0, 0x40000) != 0) { + func_800C98B8(temp_v1 + 4, temp_v1 + 0x38, 0x19018045); + func_80072488(arg0); + } + break; + case 3: + sp2C = temp_v1; + if (func_800730BC(arg0, 3, 5, 1, 6, 6) != 0) { + temp_v1->unkD2 = 0; + } + break; + case 4: + if (func_8007278C(arg0, 0x12C) != 0) { + func_800726CC(arg0, 2); + } + break; + } + func_8008BF18(arg0); + func_80073514(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080408.s") #endif @@ -8471,15 +10323,171 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081208.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80081210: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80072100(s32 *); /* extern */ +s32 func_8007223C(s32, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +s32 func_80072320(s32, ?); /* extern */ +? func_8007542C(?); /* extern */ +? func_8007ED6C(s32); /* extern */ +? func_8007F5A8(s32); /* extern */ +? func_8007F8D8(); /* extern */ +? func_8007FFC0(s32); /* extern */ +? func_800801FC(s32); /* extern */ +? func_80080408(s32); /* extern */ +? func_800808CC(s32); /* extern */ +? func_80080A14(s32, void *); /* extern */ +? func_80080A4C(s32, s32); /* extern */ +? func_80080B28(s32, s32); /* extern */ +? func_80080FEC(s32); /* extern */ +? func_800810F4(s32); /* extern */ +? func_8008A4CC(s32); /* extern */ +extern ? D_80165834; +extern ? D_80165C18; +extern ? D_8018C5F0; -Unable to determine jump table for jr instruction at func_80081210.s line 69. +void func_80081210(void) { + s16 temp_v0; + s32 *temp_s2_2; + s32 temp_s0; + s32 temp_s0_2; + s32 temp_s0_3; + s32 temp_s0_4; + s32 temp_s0_5; + s32 temp_s2; + s32 temp_s4; + s32 temp_s4_2; + s32 temp_s4_3; + s32 temp_s4_4; + u8 temp_t5; + void *temp_s1; + void *temp_s1_2; + s32 *phi_s2; + s32 phi_s4; + s32 *phi_s2_2; + s32 phi_s4_2; + s32 phi_v0; + void *phi_s3; + s32 *phi_s1; + s32 phi_s4_3; + s32 phi_s2_3; + s32 *phi_s2_4; + s32 phi_s4_4; + s32 *phi_s2_5; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_80165834.unk0 = D_80165834.unk0 + 0x100; + D_80165834.unk2 = D_80165834.unk2 + 0x200; + phi_s4 = 0; + phi_s4_4 = 0; + phi_s4_3 = 0; + if (D_80165750 > 0) { + phi_s2 = &D_80183EA0; + do { + temp_s0 = *phi_s2; + func_800722CC(temp_s0, 0x10); + func_8008A4CC(temp_s0); + temp_s4 = phi_s4 + 1; + phi_s2 += 4; + phi_s4 = temp_s4; + } while (temp_s4 < D_80165750); + } + func_8007F8D8(); + temp_v0 = D_80165750; + phi_s2_2 = &D_80183EA0; + phi_s4_2 = 0; + phi_v0 = temp_v0; + phi_s4_3 = 0; + if (temp_v0 > 0) { + do { + temp_s0_2 = *phi_s2_2; + temp_s1 = (temp_s0_2 * 0xE0) + &D_80165C18; + if (temp_s1->unkA6 != 0) { + temp_t5 = temp_s1->unkD5; + switch (temp_t5) { + case 1: + func_8007ED6C(temp_s0_2); +block_14: + phi_v0 = D_80165750; + break; + case 2: + func_8007F5A8(temp_s0_2); + goto block_14; + case 3: + func_8007FFC0(temp_s0_2); + goto block_14; + case 4: + func_800801FC(temp_s0_2); + goto block_14; + case 6: + func_80080408(temp_s0_2); + goto block_14; + case 5: + func_800808CC(temp_s0_2); + goto block_14; + } + } + temp_s4_2 = phi_s4_2 + 1; + phi_s2_2 += 4; + phi_s4_2 = temp_s4_2; + } while (temp_s4_2 < phi_v0); + } + phi_s3 = D_800DC4DC; + do { + phi_s3->unk1AC = phi_s3->unk1AC & ~3; + phi_s3->unk46 = phi_s3->unk46 & 0xFFF9; + phi_s1 = &D_80183EA0; + phi_s2_3 = 0; + if (D_80165750 > 0) { + do { + temp_s0_3 = *phi_s1; + if ((phi_s3->unkBC & 0x80000000) == 0) { + func_80080B28(temp_s0_3, phi_s4_3); + } + if (func_8007223C(temp_s0_3, 0x20000) != 0) { + func_80080A14(temp_s0_3, phi_s3); + } + if (func_8007223C(temp_s0_3, 0x10000) != 0) { + func_80080A4C(temp_s0_3, phi_s4_3); + } + temp_s2 = phi_s2_3 + 1; + phi_s1 += 4; + phi_s2_3 = temp_s2; + } while (temp_s2 < D_80165750); + } + temp_s4_3 = phi_s4_3 + 1; + phi_s3 += 0xDD8; + phi_s4_3 = temp_s4_3; + } while (temp_s4_3 < 8); + func_8007542C(3); + if (D_80165750 > 0) { + phi_s2_4 = &D_80183EA0; + do { + temp_s0_4 = *phi_s2_4; + if (func_80072320(temp_s0_4, 0x20) != 0) { + func_800722CC(temp_s0_4, 0x20); + func_80080FEC(temp_s0_4); + } + temp_s4_4 = phi_s4_4 + 1; + phi_s2_4 += 4; + phi_s4_4 = temp_s4_4; + } while (temp_s4_4 < D_80165750); + } + phi_s2_5 = &D_8018C3F0; + do { + temp_s0_5 = *phi_s2_5; + if (temp_s0_5 != -1) { + temp_s1_2 = (temp_s0_5 * 0xE0) + &D_80165C18; + if (temp_s1_2->unkA6 != 0) { + func_800810F4(temp_s0_5); + if (temp_s1_2->unkA6 == 0) { + func_80072100(phi_s2_5); + } + } + } + temp_s2_2 = phi_s2_5 + 4; + phi_s2_5 = temp_s2_2; + } while (temp_s2_2 != &D_8018C5F0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081210.s") #endif @@ -8640,15 +10648,61 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081848.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80081924: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80040EE0(void *, ?, ?); /* extern */ +s32 func_80040F2C(void *, ?, ?); /* extern */ +? func_80086F60(s32); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_800871AC(s32, ?); /* extern */ +? func_8008751C(s32); /* extern */ +? func_80087710(s32); /* extern */ +? func_80087D24(s32, ?, ?, ?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80081924.s line 19. +void func_80081924(s32 arg0) { + void *sp24; + u16 temp_t8; + void *temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v0->unkAE; + switch (temp_t8) { + case 1: + if (func_80040EE0(temp_v0 + 0x2C, 0x41100000, 0x3F333333) != 0) { + func_80086FD4(arg0); + return; + } + default: + return; + case 2: + func_800871AC(arg0, 0xA); + return; + case 3: + if (func_80040F2C(temp_v0 + 0x2C, 0x40400000, 0x3F800000) != 0) { + func_80086F60(arg0); + return; + } + /* Duplicate return node #11. Try simplifying control flow for better match */ + return; + case 4: + func_80087D24(arg0, 0x40666666, 0x3E800000, 0); + return; + case 5: + func_80086F60(arg0); + return; + case 10: + temp_v0->unkB6 = temp_v0->unkB6 + 0x1000; + sp24 = temp_v0; + temp_v0->unk3C = temp_v0->unk3C - 0.184; + func_8008751C(arg0); + func_80087710(arg0); + if (temp_v0->unk8 <= -10.0) { + func_80086F60(arg0); + } + /* Duplicate return node #11. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081924.s") #endif @@ -8682,15 +10736,98 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081A88.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80081AFC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(s32, ?); /* extern */ +? func_800721E8(s32, ?, s32); /* extern */ +? func_80072428(s32); /* extern */ +? func_80072488(s32); /* extern */ +? func_800726CC(s32, ?); /* extern */ +s32 func_80072E54(s32, ?, ?, ?, s32, s32); /* extern */ +? func_80073514(s32); /* extern */ +? func_8008153C(s32); /* extern */ +? func_80081848(s32, s32); /* extern */ +? func_80086EAC(s32, ?, ?); /* extern */ +? func_800C98B8(void *, void *, ?); /* extern */ +extern ? D_80165C18; +extern s8 D_8018D198; +extern s8 D_8018D1A8; +extern s8 D_8018D1B8; -Unable to determine jump table for jr instruction at func_80081AFC.s line 30. +void func_80081AFC(s32 arg0, s32 arg1) { + s8 *sp2C; + s16 temp_v1; + s32 temp_a2; + s32 temp_v0; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_v1 = temp_s0->unkA6; + temp_a2 = arg1; + if (temp_v1 >= 0xB) { + if (temp_v1 != 0x64) { + + } else if (temp_s0->unkAE == 0) { + arg1 = temp_a2; + func_800721E8(arg0, 0x200, temp_a2); + func_80072428(arg0); + if (arg1 != 1) { + if (arg1 != 2) { + if (arg1 != 3) { + + } else { + sp2C = &D_8018D1B8; + } + } else { + sp2C = &D_8018D1A8; + } + } else { + sp2C = &D_8018D198; + } + sp2C[temp_s0->unkA4] = 0; + goto block_27; + } + } else { + switch (temp_v1) { + case 1: + func_80081848(arg0, temp_a2); +block_27: + break; + case 2: + temp_v0 = temp_s0->unk4C; + if (temp_v0 == 0) { + func_80086EAC(arg0, 2, 1); + func_80072488(arg0); + func_800721C0(arg0, 0x200); + } else { + temp_s0->unk4C = temp_v0 - 1; + } + goto block_27; + case 3: + if (temp_s0->unkAE == 0) { + func_80086EAC(arg0, 2, 4); + func_8008153C(arg0); + func_80072488(arg0); + func_800C98B8(temp_s0 + 4, temp_s0 + 0x38, 0x19018007); + goto block_27; + } + break; + case 4: + if (func_80072E54(arg0, 1, 6, 1, 2, 0) != 0) { + func_800726CC(arg0, 0x64); + } + goto block_27; + case 10: + func_80072E54(arg0, 1, 6, 1, 0, -1); + if (temp_s0->unkAE == 0) { + func_800726CC(arg0, 0x64); + } + goto block_27; + } + } + if (temp_s0->unkA6 >= 2) { + func_80073514(arg0); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081AFC.s") #endif @@ -9268,15 +11405,65 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80082B34.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80082C30: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_8007223C(s32, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +s32 func_80087104(s32, ?); /* extern */ +s32 func_8008789C(s32, ?); /* extern */ +s32 func_80087954(s32, ?); /* extern */ +? func_80088538(s32); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80082C30.s line 21. +void func_80082C30(s32 arg0) { + void *sp2C; + s16 temp_t9; + void *temp_t8; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t8 = (arg0 * 0xE0) + &D_80165C18; + sp2C = temp_t8; + temp_t9 = temp_t8->unkAE; + switch (temp_t9) { + case 1: + if (func_80087A0C(arg0, sp2C->unk10, sp2C->unk1C, sp2C->unk18, sp2C->unk24) != 0) { + func_800726CC(arg0, 3); + func_80086FD4(arg0); + } + break; + case 2: + if (func_80087104(arg0, 0x3C) != 0) { + sp2C->unk34 = 0.8f; + func_800726CC(arg0, 2); + func_80086FD4(arg0); + } + break; + case 3: + if (func_80087954(arg0, 0x3C) != 0) { + func_80086FD4(arg0); + func_800726CC(arg0, 3); + } + break; + case 4: + if (func_80087104(arg0, 0x3C) != 0) { + func_800726CC(arg0, 2); + func_80086FD4(arg0); + } + break; + case 5: + if (func_8008789C(arg0, 0x3C) != 0) { + func_800726CC(arg0, 3); + func_8008701C(arg0, 2); + } + break; + } + func_8008BF18(arg0); + if (func_8007223C(arg0, 0x40000) != 0) { + func_80088538(arg0); + sp2C->unk8 = sp2C->unk44 + 2.5; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80082C30.s") #endif @@ -9458,15 +11645,50 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8008311C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80083248: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_8007223C(s32, ?); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +s32 func_80087060(s32, ?); /* extern */ +? func_800871AC(s32, ?); /* extern */ +? func_8008861C(s32); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80083248.s line 20. +void func_80083248(s32 arg0) { + u16 temp_t8; + void *temp_s1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s1->unkAE; + switch (temp_t8) { + case 1: + if (func_80087A0C(arg0, temp_s1->unk10, temp_s1->unk9C, temp_s1->unk18, temp_s1->unk9E) != 0) { + func_80086FD4(arg0); + } + break; + case 2: + func_800871AC(arg0, 0x3C); + break; + case 3: + if (func_80087A0C(arg0, temp_s1->unk9C, temp_s1->unk10, temp_s1->unk9E, temp_s1->unk18) != 0) { + func_80086FD4(arg0); + } + break; + case 4: + if (func_80087060(arg0, 0x3C) != 0) { + func_8008701C(arg0, 1); + } + break; + } + func_8008BF18(arg0); + if (func_8007223C(arg0, 0x200000) != 0) { + if (func_8007223C(arg0, 0x400000) != 0) { + func_8008861C(arg0); + } + temp_s1->unk8 = temp_s1->unk44 + 6.0; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083248.s") #endif @@ -9704,15 +11926,51 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083868.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80083948: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80040EE0(void *, ?, ?); /* extern */ +? func_80073800(s32, ?); /* extern */ +? func_80073D0C(s32, void *, ?, ?, s32, s32, s32); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +? func_800871AC(s32, ?); /* extern */ +? func_80087C48(s32, ?, ?, ?); /* extern */ +? func_80087D24(s32, ?, ?, ?); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80083948.s line 20. +void func_80083948(s32 arg0) { + u16 temp_t8; + void *temp_s1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s1->unkAE; + switch (temp_t8) { + case 1: + func_80086FD4(arg0); + break; + case 2: + func_800871AC(arg0, 0x14); + break; + case 3: + func_8008701C(arg0, 1); + break; + case 10: + func_80087C48(arg0, 0x41200000, 0x3F000000, 0xA); + break; + case 11: + func_80087D24(arg0, 0, 0x3E4CCCCD, 0xC0E00000); + break; + case 20: + if (func_80040EE0(temp_s1 + 0x2C, 0, 0x3E4CCCCD) != 0) { + func_80073800(arg0, 0); + func_8008701C(arg0, 1); + } + break; + } + func_8008BF18(arg0); + func_80073D0C(arg0, temp_s1 + 0xA0, -0x1000, 0x1000, 0x400, 1, -1); + temp_s1->unkB6 = temp_s1->unkA0 + 0x8000; +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083948.s") #endif @@ -9794,15 +12052,59 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083BE4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80083C04: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800721C0(s32, ?); /* extern */ +? func_800721E8(s32, ?); /* extern */ +? func_800722A4(s32, ?); /* extern */ +? func_80072488(s32); /* extern */ +? func_800726CC(s32, ?); /* extern */ +s32 func_8007278C(s32, ?); /* extern */ +? func_80073514(s32); /* extern */ +s32 func_80074118(s32, void *, ?, ?, f32, s32, s32); /* extern */ +? func_80083B0C(s32); /* extern */ +? func_80083BE4(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80083C04.s line 20. +void func_80083C04(s32 arg0) { + s16 temp_v1; + void *temp_s1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s1 = (arg0 * 0xE0) + &D_80165C18; + temp_v1 = temp_s1->unkA6; + switch (temp_v1) { + case 1: + func_80083B0C(arg0); +block_14: + break; + case 2: + func_8007278C(arg0, 0x96); + goto block_14; + case 10: + if (func_8007278C(arg0, 0x12C) != 0) { + func_800722A4(arg0, 2); + } + goto block_14; + case 11: + if (func_8007278C(arg0, 0xA) != 0) { + func_800721C0(arg0, 0x10); + temp_s1->unk0 = 0.001f; + } + goto block_14; + case 12: + if (func_80074118(arg0, temp_s1, 0x3A83126F, 0x3DCCCCCD, 0.0025f, 0, 0) != 0) { + func_80072488(arg0); + } + goto block_14; + case 13: + func_800726CC(arg0, 2); + func_800721E8(arg0, 0x1000); + goto block_14; + } + if (temp_s1->unkA6 >= 2) { + func_80073514(arg0); + } + func_80083BE4(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083C04.s") #endif @@ -10151,43 +12453,313 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8008453C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800845C8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_80004EAC(? *, ?); /* extern */ +? func_800721C0(s32, ?); /* extern */ +? func_800722A4(s32, ?); /* extern */ +? func_80072488(s32); /* extern */ +? func_80086EF0(s32); /* extern */ +? func_8008B7D4(s32, f32, ?, ?); /* extern */ +? func_8008B888(s32, ?, s32, ?); /* extern */ +s32 random_int(?); /* extern */ +extern ? D_06008EB0; +extern ? D_06009AC8; +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_800845C8.s line 169. +void func_800845C8(s32 arg0, s32 arg1) { + void *temp_s0; + f32 phi_f18; + s32 phi_v1; + u16 phi_t0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_s0->unkD8 = 0; + temp_s0->unk70 = &D_06008EB0; + temp_s0->unk74 = &D_06009AC8; + temp_s0->unkC8 = 4; + temp_s0->unk9C = 2; + temp_s0->unk4C = random_int(0x12C); + func_800721C0(arg0, 0x4000220); + phi_v1 = arg1; + if ((arg1 > 0) && (arg1 < 9)) { + if ((arg1 == 1) || (arg1 == 2)) { + func_8008B7D4(arg0, D_8018D01C * -2960.0, 0xC2A00000, 0x44BE2000); + temp_s0->unkC6 = 0x150; + phi_f18 = 100.0f; + goto block_14; + } + if ((arg1 == 3) || (arg1 == 4)) { + func_8008B7D4(arg0, D_8018D01C * -2490.0, 0xC2A00000, 0x44C98000); + temp_s0->unkC6 = 0x100; + phi_f18 = 80.0f; + goto block_14; + } + if ((arg1 == 5) || (arg1 == 6)) { + func_8008B7D4(arg0, D_8018D01C * -2098.0, 0xC2A00000, 0x44CB0000); + temp_s0->unkC6 = 0xFF00; + phi_f18 = 80.0f; + goto block_14; + } + if ((arg1 == 7) || (arg1 == 8)) { + func_8008B7D4(arg0, D_8018D01C * -2080.0, 0xC2A00000, 0x44926000); + temp_s0->unkC6 = 0x150; + phi_f18 = 80.0f; +block_14: + temp_s0->unk20 = phi_f18; + phi_v1 = arg1; + } + temp_s0->unkC4 = phi_v1 << 0xF; + temp_s0->unk44 = -80.0f; + temp_s0->unkDD = 2; + temp_s0->unk0 = 0.08f; + func_800722A4(arg0, 8); + } else if ((arg1 >= 9) && (arg1 < 0xF)) { + switch (arg1) { + case 9: + if (D_800DC50C != 9) { + func_8008B7D4(arg0, D_8018D01C * 146.0, 0, 0xC3BE0000); + } else { + func_8008B7D4(arg0, D_8018D01C * 380.0, 0, 0xC405C000); + temp_s0->unk0 = 0.15f; + } + temp_s0->unkC6 = 0x9000; + if (gIsMirrorMode != 0) { + temp_s0->unkC6 = 0x5000; + } + temp_s0->unkDD = 3; + break; + case 10: + func_8008B7D4(arg0, D_8018D01C * 380.0, 0, 0xC43F8000); + temp_s0->unkC6 = 0x5000; + if (gIsMirrorMode != 0) { + temp_s0->unkC6 = 0xD000; + } + temp_s0->unkDD = 4; + break; + case 11: + func_8008B7D4(arg0, D_8018D01C * -2300.0, 0, 0xC3520000); + temp_s0->unkC6 = 0xC000; + temp_s0->unkDD = 6; + if (gIsMirrorMode != 0) { + temp_s0->unkC6 = 0x14000; + } + break; + case 12: + func_8008B7D4(arg0, D_8018D01C * -2500.0, 0, 0xC37A0000); + temp_s0->unkC6 = 0x4000; + temp_s0->unkDD = 6; + phi_t0 = 0xC000; + if (gIsMirrorMode != 0) { +block_36: + temp_s0->unkC6 = phi_t0; + } + break; + case 13: + func_8008B7D4(arg0, D_8018D01C * -535.0, 0, 0x445AC000); + temp_s0->unkC6 = 0x8000; + temp_s0->unkDD = 6; + if (gIsMirrorMode != 0) { + temp_s0->unkC6 = 0x4000; + } + break; + case 14: + func_8008B7D4(arg0, D_8018D01C * -250.0, 0, 0x446E4000); + temp_s0->unkC6 = 0x9000; + temp_s0->unkDD = 6; + phi_t0 = 0x5000; + if (gIsMirrorMode != 0) { + goto block_36; + } + break; + } + func_8008B888(arg0, 0, (temp_s0->unkC6 + 0x8000) & 0xFFFF, 0); + temp_s0->unk44 = 5.0f; + temp_s0->unk0 = 0.04f; + func_800722A4(arg0, 0x14); + } + func_80086EF0(arg0); + temp_s0->unk34 = 0.0f; + temp_s0->unkA4 = func_80004EAC(&D_06009AC8, 0); + func_80072488(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800845C8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80084B7C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800722A4(s32, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +s32 func_80072320(s32, ?); /* extern */ +s32 func_80072354(s32, ?); /* extern */ +? func_80072488(s32); /* extern */ +? func_80072E54(s32, ?, s16, s16, s32, s32); /* extern */ +? func_800845C8(s32); /* extern */ +? func_800C98B8(void *, void *, ?); /* extern */ +s32 random_int(?); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80084B7C.s line 20. +void func_80084B7C(s32 arg0) { + s16 temp_v0; + s16 temp_v0_2; + u16 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkA6; + switch (temp_t8) { + case 1: + func_800845C8(arg0); + break; + case 2: + func_80072E54(arg0, 0, temp_s0->unkA4, temp_s0->unk9C, 0, -1); + if (func_80072354(arg0, 0x20) != 0) { + temp_v0 = temp_s0->unk90; + if (temp_v0 == 0) { + temp_s0->unk90 = random_int(0x5A) + 0x5A; + func_800722A4(arg0, 0x80); + } else { + temp_s0->unk90 = temp_v0 - 1; + } + } + break; + case 3: + func_80072E54(arg0, 0, temp_s0->unkA4, 1, 0, 0); + break; + case 4: + func_800722CC(arg0, 2); + func_80072488(arg0); + break; + } + if (func_80072320(arg0, 0x20) != 0) { + temp_v0_2 = temp_s0->unk90; + if (temp_v0_2 == 0) { + func_800722A4(arg0, 0x80); + temp_s0->unk90 = 0x10; + } else { + temp_s0->unk90 = temp_v0_2 - 1; + } + } + if (func_80072320(arg0, 0x80) != 0) { + func_800722CC(arg0, 0x80); + if (func_80072320(arg0, 0x10) != 0) { + func_800C98B8(temp_s0 + 4, temp_s0 + 0x38, 0x19007049); + return; + } + func_800C98B8(temp_s0 + 4, temp_s0 + 0x38, 0x19007017); + /* Duplicate return node #17. Try simplifying control flow for better match */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80084B7C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80084D2C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_80004EAC(? *, s32); /* extern */ +? func_800413B8(void *, f32, ?); /* extern */ +? func_800722A4(s32, ?); /* extern */ +? func_800722CC(s32, ?); /* extern */ +s32 func_80072354(s32, ?); /* extern */ +? func_800726CC(s32, ?); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +s32 func_80087060(s32, ?); /* extern */ +? func_8008781C(s32); /* extern */ +? func_8008BF18(s32); /* extern */ +extern ? D_06009AC8; +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80084D2C.s line 20. +void func_80084D2C(s32 arg0, s32 arg1) { + f32 sp24; + s32 temp_t9; + u16 temp_t8; + u16 temp_v0; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkAE; + switch (temp_t8) { + case 1: + temp_v0 = func_800417B4(temp_s0->unkC0, temp_s0->unkC6); + temp_t9 = temp_v0 & 0xFFFF; + temp_s0->unkC0 = temp_v0; + if (temp_t9 == temp_s0->unkC6) { + temp_s0->unk9C = 4; + temp_s0->unk34 = 0.4f; + func_80086FD4(arg0); + } + break; + case 2: + func_800413B8(temp_s0 + 0x34, 0.8f, 0x3CA3D70A); + if (func_80087060(arg0, 0xF) != 0) { + func_800722A4(arg0, 1); + func_800722A4(arg0, 2); + temp_s0->unk9C = 1; + temp_s0->unkD8 = 1; + temp_s0->unkD2 = 0; + temp_s0->unkA4 = func_80004EAC(&D_06009AC8, 1 & 0xFF); + func_800726CC(arg0, 3); + func_80086FD4(arg0); + if (func_80072354(arg0, 0x20) != 0) { + func_800722A4(arg0, 0x80); + } + } + break; + case 3: + if (arg1 != 0) { + if (arg1 != 1) { + if (arg1 != 2) { + if (arg1 != 3) { + + } else { + sp24 = 2.5f; + } + } else { + sp24 = 2.0f; + } + } else { + sp24 = 1.5f; + } + } else { + sp24 = 1.0f; + } + func_800413B8(temp_s0 + 0x34, sp24, 0x3E19999A); + if ((func_80072354(arg0, 2) != 0) && (sp24 == temp_s0->unk34)) { + func_80086FD4(arg0); + } + break; + case 4: + if (func_80087060(arg0, 0x1E) != 0) { + func_800722CC(arg0, 1); + func_80086FD4(arg0); + } + break; + case 5: + func_800413B8(temp_s0 + 0x34, 0.4f, 0x3E4CCCCD); + if (func_80087060(arg0, 0xA) != 0) { + func_800722A4(arg0, 2); + temp_s0->unkD8 = 2; + temp_s0->unkD2 = 0; + temp_s0->unkA4 = func_80004EAC(&D_06009AC8, 2 & 0xFF); + func_800726CC(arg0, 3); + func_80086FD4(arg0); + } + break; + case 6: + if (func_80072354(arg0, 2) != 0) { + temp_s0->unkD8 = 0; + temp_s0->unkD2 = 0; + temp_s0->unkA4 = func_80004EAC(&D_06009AC8, 0 & 0xFF); + temp_s0->unkC6 = temp_s0->unkC6 + 0x8000; + func_800726CC(arg0, 2); + func_8008701C(arg0, 1); + } + break; + } + func_8008781C(arg0); + func_8008BF18(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80084D2C.s") #endif @@ -10227,15 +12799,62 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085080.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800850B0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800722CC(s32, ?); /* extern */ +s32 func_80072320(s32, ?); /* extern */ +? func_80084D2C(s32, ?); /* extern */ +? func_8008502C(s32); /* extern */ +? func_80085080(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_800850B0.s line 21. +void func_800850B0(s32 arg0) { + s16 temp_v0; + u8 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkDD; + switch (temp_t8) { + case 1: + func_80085080(arg0); + break; + case 2: + func_8008502C(arg0); + break; + case 3: + func_80084D2C(arg0, 0); + break; + case 4: + func_80084D2C(arg0, 1); + break; + case 5: + func_80084D2C(arg0, 2); + break; + case 6: + func_80084D2C(arg0, 3); + break; + } + if (func_80072320(arg0, 0x20) != 0) { + if (func_80072320(arg0, 0x40) != 0) { + func_800722CC(arg0, 0x40); + temp_s0->unk90 = 0; + temp_s0->unk92 = 0x96; + } + temp_v0 = temp_s0->unk92; + if (temp_v0 == 0) { + func_800722CC(arg0, 0x20); + return; + } + temp_s0->unk92 = temp_v0 - 1; + temp_s0->unkB4 = temp_s0->unkB4 + 0x2000; + temp_s0->unkB2 = temp_s0->unkBE; + temp_s0->unkB6 = temp_s0->unkC2; + return; + } + temp_s0->unkB2 = temp_s0->unkBE; + temp_s0->unkB4 = temp_s0->unkC0; + temp_s0->unkB6 = temp_s0->unkC2; +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800850B0.s") #endif @@ -10337,15 +12956,70 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800853DC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80085534: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800413B8(void *, ?, ?); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +s32 func_80087060(s32, ?); /* extern */ +? func_800871AC(s32, ?); /* extern */ +? func_800877C4(s32); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80085534.s line 21. +void func_80085534(s32 arg0) { + s16 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkAE; + switch (temp_t8) { + case 1: + if (temp_s0->unk2C <= 18.0) { + func_80086FD4(arg0); + } + break; + case 2: + func_800413B8(temp_s0 + 0x3C, 0, 0x3D4CCCCD); + if (temp_s0->unk3C == 0.0) { + func_80086FD4(arg0); + } + break; + case 3: + func_800871AC(arg0, 1); + break; + case 4: + func_800413B8(temp_s0 + 0x3C, 0x3F800000, 0x3D4CCCCD); + if (temp_s0->unk3C == 1.0) { + func_80086FD4(arg0); + } + break; + case 5: + func_800871AC(arg0, 0x5A); + break; + case 6: + func_800413B8(temp_s0 + 0x3C, 0, 0x3D4CCCCD); + if (temp_s0->unk3C == 0.0) { + func_80086FD4(arg0); + } + break; + case 7: + func_800413B8(temp_s0 + 0x3C, 0xBF800000, 0x3D4CCCCD); + if (temp_s0->unk3C == -1.0) { + func_80086FD4(arg0); + } + break; + case 8: + func_800871AC(arg0, 0x5A); + break; + case 9: + func_800413B8(temp_s0 + 0x3C, 0, 0x3D4CCCCD); + if (func_80087060(arg0, 0x5A) != 0) { + func_8008701C(arg0, 3); + } + break; + } + func_800877C4(arg0); + temp_s0->unkC0 = temp_s0->unkC0 + 0x100; +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085534.s") #endif @@ -10564,15 +13238,47 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085C20.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80085CA0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800726CC(?); /* extern */ +? func_8007278C(?); /* extern */ +? func_80072D3C(?, ?, ?, s32); /* extern */ +? func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_80085C20(); /* extern */ +extern ? D_80165CBE; -Unable to determine jump table for jr instruction at func_80085CA0.s line 16. +void func_80085CA0(s32 arg0) { + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = *(&D_80165CBE + (arg0 * 0xE0)); + switch (temp_t7) { + case 1: + func_80085C20(); + return; + case 2: + func_80072E54(0, 4, 1, 0xC, 5); + return; + case 3: + func_80072D3C(3, 4, 4, 0xA); + return; + case 4: + func_8007278C(0x14); + return; + case 5: + func_80072E54(0, 4, 1, 0xC, 5); + return; + case 6: + func_8007278C(0x14); + return; + case 7: + func_80072D3C(3, 4, 0, 0x14); + return; + case 8: + func_800726CC(2); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085CA0.s") #endif @@ -10597,15 +13303,38 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085DB8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80085E38: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800726CC(?); /* extern */ +? func_80072B48(?); /* extern */ +? func_80072D3C(?, ?, ?, s32); /* extern */ +? func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_80085DB8(); /* extern */ +extern ? D_80165CBE; -Unable to determine jump table for jr instruction at func_80085E38.s line 16. +void func_80085E38(s32 arg0) { + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = *(&D_80165CBE + (arg0 * 0xE0)); + switch (temp_t7) { + case 1: + func_80085DB8(); + return; + case 2: + func_80072E54(0, 4, 1, 0xC, 1); + return; + case 3: + func_80072D3C(3, 4, 0xC, 1); + return; + case 4: + func_80072B48(0xC); + return; + case 5: + func_800726CC(2); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085E38.s") #endif @@ -10630,15 +13359,49 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085EF8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80085F74: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800726CC(?); /* extern */ +? func_8007278C(?); /* extern */ +? func_80072B48(?); /* extern */ +? func_80072C00(?, ?, ?); /* extern */ +? func_80072E54(?, ?, ?, s32, s32); /* extern */ +? func_80072F88(?, ?, ?, s32, s32); /* extern */ +? func_80085EF8(); /* extern */ +extern ? D_80165CBE; -Unable to determine jump table for jr instruction at func_80085F74.s line 16. +void func_80085F74(s32 arg0) { + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t7 = *(&D_80165CBE + (arg0 * 0xE0)); + switch (temp_t7) { + case 1: + func_80085EF8(); + return; + case 2: + func_80072E54(0, 4, 1, 5, 1); + return; + case 3: + func_8007278C(0x1E); + return; + case 4: + func_80072C00(4, 0, 7); + return; + case 5: + func_8007278C(0x1E); + return; + case 6: + func_80072F88(3, 0, 1, 5, 1); + return; + case 7: + func_80072B48(0xF); + return; + case 8: + func_800726CC(2); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085F74.s") #endif @@ -11045,15 +13808,89 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80086700.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80086940: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800413B8(void *, ?, ?); /* extern */ +? func_80086F60(s32); /* extern */ +? func_80086FD4(s32); /* extern */ +? func_8008701C(s32, ?); /* extern */ +s32 func_800871AC(s32, ?); /* extern */ +? func_800877C4(s32); /* extern */ +? func_80087C48(s32, ?, ?, ?); /* extern */ +? func_8008BF18(s32); /* extern */ +? func_8009265C(); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_80086940.s line 20. +void func_80086940(s32 arg0) { + s8 temp_v0; + u16 temp_t8; + void *temp_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_s0->unkAE; + switch (temp_t8) { + case 1: + func_80086FD4(arg0); + break; + case 2: + func_800413B8(temp_s0, 0x3CCCCCCD, 0x3A83126F); + func_80087C48(arg0, 0x40C00000, 0x3DCCCCCD, 0xC8); + if (temp_s0->unk3C <= 0.0) { + func_8008701C(arg0, 3); + } + break; + case 3: + func_800871AC(arg0, 0x64); + break; + case 4: + D_801658D6 = 1; + temp_s0->unk3C = -0.4f; + func_80086FD4(arg0); + temp_s0->unk14 = 90.0f; + temp_s0->unk2C = 60.0f; + temp_v0 = D_802874F5; + if (temp_v0 != 1) { + if (temp_v0 != 2) { + + } else { + temp_s0->unk10 = temp_s0->unk10 - 2.0; + temp_s0->unk18 = temp_s0->unk18 - 15.0; + } + } else { + temp_s0->unk10 = temp_s0->unk10 - 3.0; + temp_s0->unk18 = temp_s0->unk18 + 15.0; + } + break; + case 5: + if (temp_s0->unk2C <= 8.0) { + func_800413B8(temp_s0 + 0x3C, 0xBDCCCCCD, 0xBC23D70A); + } + func_800877C4(arg0); + if (temp_s0->unk2C <= 0.0) { + func_80086FD4(arg0); + } + break; + case 6: + if (func_800871AC(arg0, 0x41) != 0) { + D_801658F4 = 1; + } + break; + case 7: + if (func_800871AC(arg0, 0x64) != 0) { + func_8009265C(); + func_80086F60(arg0); + } + break; + } + if (D_801658D6 != 0) { + temp_s0->unkC0 = 0xE800; + temp_s0->unkC2 = 0xDA00; + temp_s0->unkBE = temp_s0->unkBE + 0x400; + } else { + temp_s0->unkBE = temp_s0->unkBE + 0x400; + temp_s0->unkC0 = temp_s0->unkC0 - 0x200; + } + func_8008BF18(arg0); +} #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80086940.s") #endif diff --git a/src/code_80086E70.c b/src/code_80086E70.c index 32b2a37d9..18cf25777 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -2658,15 +2658,106 @@ GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BFC0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8008BFFC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80086F60(); /* extern */ +? func_80088228(); /* extern */ +? func_80088364(); /* extern */ +? func_8008B620(); /* extern */ +? func_8008B6A4(); /* extern */ +extern ? D_80165C18; -Unable to determine jump table for jr instruction at func_8008BFFC.s line 17. +void func_8008BFFC(s32 arg0) { + s16 temp_v0; + s16 temp_v0_2; + s16 temp_v0_3; + s16 temp_v0_4; + s16 temp_v0_5; + s16 temp_v0_6; + u8 temp_t8; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = (arg0 * 0xE0) + &D_80165C18; + temp_t8 = temp_v1->unkDE; + switch (temp_t8) { + case 1: + if (temp_v1->unkAE == 1) { + func_8008B620(); + return; + } + default: + return; + case 2: + temp_v0 = temp_v1->unkAE; + if ((temp_v0 != 0) && (temp_v0 == 1)) { + func_8008B6A4(); + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 3: + temp_v0_2 = temp_v1->unkAE; + if ((temp_v0_2 != 0) && (temp_v0_2 == 1)) { + func_8008B620(); + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 4: + temp_v0_3 = temp_v1->unkAE; + if (temp_v0_3 != 0) { + if (temp_v0_3 != 1) { + if (temp_v0_3 != 2) { + return; + } + func_80086F60(); + return; + } + func_8008B620(); + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 5: + temp_v0_4 = temp_v1->unkAE; + if (temp_v0_4 != 0) { + if (temp_v0_4 != 1) { + if (temp_v0_4 != 2) { + return; + } + func_80086F60(); + return; + } + func_8008B620(); + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 6: + temp_v0_5 = temp_v1->unkAE; + if ((temp_v0_5 != 0) && (temp_v0_5 == 1)) { + func_8008B620(); + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 7: + temp_v0_6 = temp_v1->unkAE; + if (temp_v0_6 != 0) { + if (temp_v0_6 != 1) { + if (temp_v0_6 != 2) { + return; + } + func_80088364(); + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + } + func_80088228(); + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BFFC.s") #endif diff --git a/src/code_8008C1D0.c b/src/code_8008C1D0.c index b6ec8749a..8703c811b 100644 --- a/src/code_8008C1D0.c +++ b/src/code_8008C1D0.c @@ -314,80 +314,3186 @@ void func_8008C6D0(Player *player, s8 arg1) { player->unk_042 = 0; } -/* -void func_8008C73C(Player *player, s8 arg1, s8 unk3, s8 unk4) { +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800098FC(s8, void *, void *, u16); /* extern */ +? func_8008C354(s8); /* extern */ +? func_800C90F4(s32, s32, void *, u16); /* extern */ +extern ? D_80165190; +extern ? D_80165280; +extern ? D_80165420; +extern ? D_80165440; +extern ? D_80165460; +extern ? D_80165480; +extern ? D_8018D920; + +void func_8008C73C(void *arg0, s8 arg1) { + s32 temp_a0; + s32 temp_t0; s32 temp_v0; - func_8008C354(player, arg1); - //temp_v0 = player->unk_0BC; - if (((player->unk_0BC & 0x80) != 0x80) && ((player->unk_0BC & 0x40) != 0x40)) { - player->unk_0BC = player->unk_0BC & ~0x10; - if (((s32) player->unk_0C0 / 182) >= 0) { - player->unk_0BC = (s32) ((player->unk_0BC & ~0x10) | 0x40); + s32 temp_v0_2; + u16 temp_a3; + void *temp_v1; + + func_8008C354(arg1); + temp_v0 = arg0->unkBC; + if (((temp_v0 & 0x80) != 0x80) && ((temp_v0 & 0x40) != 0x40)) { + temp_t0 = temp_v0 & ~0x10; + arg0->unkBC = temp_t0; + temp_a0 = arg1 * 2; + if ((arg0->unkC0 / 182) >= 0) { + arg0->unkBC = temp_t0 | 0x40; } else { - player->unk_0BC = (s32) (player->unk_0BC | 0x80); + arg0->unkBC = arg0->unkBC | 0x80; } - player->unk_0B4 = (u16) (player->unk_0B4 | 0x80); - player->unk_0B0 = 2; - player->unk_0C0 = 0; - player->unk_07C = 0; - player->unk_078 = 0; - player->unk_0AE = (s16) player->unk_02E; - D_80165190[0][arg1] = 1; - D_80165190[1][arg1] = 1; - D_80165190[2][arg1] = 1; - D_80165190[3][arg1] = 1; - D_80165280[arg1++] = (f32) player->unk_09C; - D_80165480[arg1++] = 0.0f; - D_80165460[arg1++] = 0.0f; - D_80165440[arg1++] = 0.0f; - D_80165420[arg1++] = 0.0f; - D_8018D920[D_80165190[0][0]] = 0; - if (((player->unk_000 & 0x4000) == 0x4000) && ((player->unk_000 & 0x100) != 0x100)) { - func_800C90F4(arg1 & 0xFF, (player->characterId * 0x10) + 0x29008003, player, player->unk_000); + arg0->unkB6 = arg0->unkB6 | 0x80; + arg0->unkB2 = 2; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unk78 = 0; + temp_v1 = temp_a0 + &D_80165190; + arg0->unkAE = arg0->unk2E; + temp_v1->unk0 = 1; + temp_v1->unk10 = 1; + temp_v1->unk20 = 1; + temp_v1->unk30 = 1; + temp_v0_2 = arg1 * 4; + *(&D_80165280 + temp_v0_2) = arg0->unk9C; + *(&D_80165480 + temp_v0_2) = 0; + *(&D_80165460 + temp_v0_2) = 0; + *(&D_80165440 + temp_v0_2) = 0; + *(&D_80165420 + temp_v0_2) = 0; + *(&D_8018D920 + temp_a0) = 0; + temp_a3 = arg0->unk0; + if (((temp_a3 & 0x4000) == 0x4000) && ((temp_a3 & 0x100) != 0x100)) { + func_800C90F4(arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008003, arg0, temp_a3); return; } - func_800098FC(arg1, player, player, player->unk_000); - // Duplicate return node #9. Try simplifying control flow for better match + func_800098FC(arg1, arg0, arg0, temp_a3); + /* Duplicate return node #9. Try simplifying control flow for better match */ } } -*/ +#else GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008C73C.s") -/* -void func_8008C8C4(Player *player, s8 arg1) { +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern u16 D_800DC51C; +extern ? D_801643B8; +extern ? D_80165190; +extern ? D_80165460; +extern s32 gModeSelection; + +void func_8008C8C4(void *arg0, s8 arg1) { + s32 temp_t1; + s32 temp_t9; s32 temp_v1; + void *temp_v0; - - - - player->unk_0BC = player->unk_0BC & ~0x80; - player->unk_0BC = player->unk_0BC & ~0x40; - - - player->unk_02E = player->unk_0AE; - player->unk_0A8 = 0; - player->unk_07C = 0; - player->unk_0C0 = 0; - player->unk_0BC &= ~0x800; - - D_80165190[0][arg1] = 1; - D_80165190[1][arg1] = 1; - D_80165190[2][arg1] = 1; - D_80165190[3][arg1] = 1; - - player->unk_046 &= 0xFFBF; - temp_v1 = arg1++; - if ((D_80165460[temp_v1] == 1) && (player->unk_000 & 0x4000 == 0x4000)) { - player->unk_09C += 100.0f; - + temp_t9 = arg0->unkBC & ~0x80; + temp_t1 = temp_t9 & ~0x40; + arg0->unkBC = temp_t9; + arg0->unkBC = temp_t1; + arg0->unkA8 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unkBC = temp_t1 & ~0x800; + temp_v0 = (arg1 * 2) + &D_80165190; + arg0->unk2E = arg0->unkAE; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + temp_v1 = arg1 * 4; + arg0->unk46 = arg0->unk46 & 0xFFBF; + if ((*(&D_80165460 + temp_v1) == 1) && ((arg0->unk0 & 0x4000) == 0x4000)) { + arg0->unk9C = arg0->unk9C + 100.0f; } - if (gModeSelection == 2 && player->unk_000 & 0x1000 == 0x1000 && D_800DC51C == 0 && player->unk_0CA & 2 == 0 && D_801643B8[temp_v1] != 0) { - - player->unk_00C |= 0x400000; - - + if ((gModeSelection == 2) && ((arg0->unk0 & 0x1000) == 0x1000) && (D_800DC51C == 0) && ((arg0->unkCA & 2) == 0) && (*(&D_801643B8 + temp_v1) != 0)) { + arg0->unkC = arg0->unkC | 0x400000; } } -*/ +#else GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008C8C4.s") +#endif -GLOBAL_ASM("asm/non_matchings/code_8008C1D0/code_8008C1D0.s") +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80031F48(void *, ?); /* extern */ +? func_8006B8B4(void *, s8, ? *); /* extern */ +? func_8008C8C4(void *, s8); /* extern */ +extern ? D_80165460; +extern ? D_80165480; +extern ? D_8018D920; +extern s32 gModeSelection; +static ? D_800E6F60; /* unable to generate initializer; const */ + +void func_8008C9EC(void *arg0, s8 arg1) { + ? sp30; + s16 *temp_a0; + s16 *temp_a0_2; + s16 *temp_v0; + s16 *temp_v0_2; + s16 temp_t7; + s16 temp_t8; + s16 temp_v1; + s16 temp_v1_2; + s32 temp_t7_2; + + sp30.unk0 = D_800E6F60.unk0; + sp30.unk4 = D_800E6F60.unk4; + sp30.unk8 = D_800E6F60.unk8; + arg0->unk206 = 0; + arg0->unkC4 = 0; + if ((arg0->unk46 & 0x40) == 0x40) { + func_80031F48(0x42C80000); + } else { + if ((arg0->unk0 & 0x4000) == 0x4000) { + func_80031F48(arg0, 0x3F800000); + } else { + func_80031F48(arg0, 0x40800000); + } + if ((arg0->unk0 & 0x4000) == 0) { + func_80031F48(arg0, 0x41F00000); + } + } + if ((arg0->unkBC & 0x80) == 0x80) { + temp_a0 = &sp30 + (arg0->unkB2 * 2); + arg0->unk2E = arg0->unk2E - *temp_a0; + temp_v0 = (arg1 * 2) + &D_8018D920; + temp_t7 = *temp_v0 - *temp_a0; + *temp_v0 = temp_t7; + temp_v1 = arg0->unkB2; + if (((temp_t7 & 0xFFFF) / (0x10000 / (0x168 / (*(&sp30 + (temp_v1 * 2)) / 182)))) == 0) { + arg0->unkB2 = temp_v1 - 1; + if (arg0->unkB2 <= 0) { + if (gModeSelection == 3) { + func_8006B8B4(arg0, arg1, &sp30); + } + func_8008C8C4(arg0, arg1); + } + } + } else { + temp_a0_2 = (arg0->unkB2 * 2) + &sp30; + arg0->unk2E = arg0->unk2E + *temp_a0_2; + temp_v0_2 = (arg1 * 2) + &D_8018D920; + temp_t8 = *temp_v0_2 - *temp_a0_2; + *temp_v0_2 = temp_t8; + temp_v1_2 = arg0->unkB2; + if (((temp_t8 & 0xFFFF) / (0x10000 / (0x168 / ((sp + (temp_v1_2 * 2))->unk30 / 182)))) == 0) { + arg0->unkB2 = temp_v1_2 - 1; + if (arg0->unkB2 <= 0) { + func_8008C8C4(arg0, arg1); + if (gModeSelection == 3) { + func_8006B8B4(arg0, arg1); + } + } + } + } + temp_t7_2 = arg1 * 4; + if ((*(&D_80165460 + temp_t7_2) == 1) && ((arg0->unk0 & 0x4000) == 0x4000)) { + *(&D_80165480 + temp_t7_2) = 0x78; + if (arg0->unk9C <= 90.0f) { + arg0->unk9C = 90.0f; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008C9EC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_8008C73C(void *, s8); /* extern */ + +void func_8008CDC0(void *arg0, s8 arg1) { + s32 temp_t0; + s32 temp_t1; + + func_8008C354(arg1); + temp_t0 = arg0->unkBC & ~0x10; + temp_t1 = arg0->unk7C >> 0x10; + arg0->unkC = arg0->unkC & ~1; + arg0->unkB4 = 0; + arg0->unkAC = 1; + arg0->unkBC = temp_t0; + arg0->unkB8 = 3.0f; + if ((temp_t1 >= 0x14) || (temp_t1 < -0x13) || (((arg0->unk94 / 18.0f) * 216.0f) <= 30.0f) || ((temp_t0 & 8) != 0) || (((arg0->unk0 & 0x4000) == 0) && ((temp_t0 & 0x1000) == 0))) { + func_8008C73C(arg0, arg1); + return; + } + arg0->unkBC = temp_t0 | 0x800; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008CDC0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C73C(void *, s8, s16, s16); /* extern */ +? func_800C90F4(u8, s32, s16, s16); /* extern */ + +void func_8008CEB0(void *arg0, s8 arg1) { + f32 sp2C; + s16 sp2A; + s16 sp28; + s16 sp26; + f32 temp_f0; + f32 temp_f0_2; + s16 temp_a3; + s16 temp_a3_2; + s16 temp_lo; + s16 temp_v1; + s32 temp_f16; + s32 temp_v0; + s32 temp_v0_2; + s16 phi_a2; + s16 phi_a3; + s32 phi_a2_2; + s16 phi_a2_3; + f32 phi_f0; + s16 phi_v1; + + temp_v1 = arg0->unkB4 + 1; + temp_f0 = arg0->unkB8; + temp_a3 = arg0->unkAC; + temp_f16 = (temp_v1 * temp_f0) - (0.2 * (temp_v1 * temp_v1)); + phi_a2 = temp_f16; + phi_a3 = temp_a3; + phi_f0 = temp_f0; + phi_v1 = temp_v1; + if ((temp_v1 != 0) && (temp_f16 < 0)) { + temp_v0 = arg0->unkBC; + temp_a3_2 = temp_a3 * -1; + temp_f0_2 = temp_f0 * 0.8; + phi_a3 = temp_a3_2; + phi_f0 = temp_f0_2; + phi_v1 = 0; + if ((temp_v0 & 1) == 1) { + arg0->unkBC = temp_v0 | 0x40000; + } + if (temp_f0_2 <= 1.0f) { + temp_v0_2 = arg0->unkBC & ~0x800; + arg0->unkBC = temp_v0_2; + if ((temp_v0_2 & 0x40000) != 0x40000) { + sp2A = 0; + sp26 = temp_f16; + sp28 = temp_a3_2; + sp2C = temp_f0_2; + func_8008C73C(arg0, arg1, temp_f16, temp_a3_2); + goto block_9; + } + arg0->unkB6 = arg0->unkB6 | 0x20; + arg0->unkBC = temp_v0_2 & 0xFFFBFFFF; + if ((arg0->unk0 & 0x4000) == 0x4000) { + sp2C = temp_f0_2; + sp28 = temp_a3_2; + sp26 = temp_f16; + sp2A = 0; + func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008008, temp_f16, temp_a3_2); +block_9: + phi_a2 = temp_f16; + phi_a3 = temp_a3 * -1; + phi_f0 = sp2C; + phi_v1 = 0; + } + } + } + temp_lo = phi_a2 * phi_a3; + phi_a2_2 = temp_lo; + if ((temp_lo <= 0) && (phi_a3 == 1)) { + phi_a2_2 = 0; + } + phi_a2_3 = phi_a2_2; + if ((phi_a2_2 >= 0) && (phi_a3 == -1)) { + phi_a2_3 = 0; + } + arg0->unk78 = arg0->unk78 + (phi_a2_3 * 0x12); + arg0->unkB8 = phi_f0; + arg0->unkB4 = phi_v1; + arg0->unkAC = phi_a3; + if ((arg0->unkBC & 8) != 0) { + func_8008C73C(arg0, arg1, phi_a2_3, phi_a3); + arg0->unkBC = arg0->unkBC & ~0x800; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008CEB0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008D0E4(void *arg0, ? arg1) { + arg0->unkBC = arg0->unkBC & ~0x800; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D0E4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ + +void func_8008D0FC(void *arg0, s8 arg1) { + func_8008C354(arg1); + arg0->unkC = arg0->unkC & ~0x80; + arg0->unkB4 = 0; + arg0->unkAC = 1; + arg0->unkBC = arg0->unkBC & ~0x10; + arg0->unk44 = arg0->unk44 | 0x4000; + arg0->unkB8 = 2.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D0FC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C73C(void *, s8, s16, s16); /* extern */ +? func_800C90F4(u8, s32, s16, s16); /* extern */ + +void func_8008D170(void *arg0, s8 arg1) { + f32 sp2C; + s16 sp2A; + s16 sp28; + s16 sp26; + f32 temp_f0; + f32 temp_f0_2; + s16 temp_a3; + s16 temp_a3_2; + s16 temp_lo; + s16 temp_v1; + s32 temp_f16; + s32 temp_v0; + s32 temp_v0_2; + s16 phi_a2; + s16 phi_a3; + s32 phi_a2_2; + s16 phi_a2_3; + f32 phi_f0; + s16 phi_v1; + + temp_v1 = arg0->unkB4 + 1; + temp_f0 = arg0->unkB8; + temp_a3 = arg0->unkAC; + temp_f16 = (temp_v1 * temp_f0) - (0.1 * (temp_v1 * temp_v1)); + phi_a2 = temp_f16; + phi_a3 = temp_a3; + phi_f0 = temp_f0; + phi_v1 = temp_v1; + if ((temp_v1 != 0) && (temp_f16 < 0)) { + temp_v0 = arg0->unkBC; + temp_a3_2 = temp_a3 * -1; + temp_f0_2 = temp_f0 * 0.9; + phi_a3 = temp_a3_2; + phi_f0 = temp_f0_2; + phi_v1 = 0; + if (((temp_v0 & 1) == 1) || ((arg0->unk44 & 0x20) == 0)) { + arg0->unkBC = temp_v0 | 0x40000; + } + if (temp_f0_2 <= 1.3) { + temp_v0_2 = arg0->unkBC; + arg0->unk44 = arg0->unk44 & 0xBFFF; + if ((temp_v0_2 & 0x40000) != 0x40000) { + sp2A = 0; + sp26 = temp_f16; + sp28 = temp_a3_2; + sp2C = temp_f0_2; + func_8008C73C(arg0, arg1, temp_f16, temp_a3_2); + goto block_10; + } + arg0->unkB6 = arg0->unkB6 | 0x20; + arg0->unkBC = temp_v0_2 & 0xFFFBFFFF; + if ((arg0->unk0 & 0x4000) == 0x4000) { + sp2C = temp_f0_2; + sp28 = temp_a3_2; + sp26 = temp_f16; + sp2A = 0; + func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008008, temp_f16, temp_a3_2); +block_10: + phi_a2 = temp_f16; + phi_a3 = temp_a3 * -1; + phi_f0 = sp2C; + phi_v1 = 0; + } + } + } + temp_lo = phi_a2 * phi_a3; + phi_a2_2 = temp_lo; + if ((temp_lo <= 0) && (phi_a3 == 1)) { + phi_a2_2 = 0; + } + phi_a2_3 = phi_a2_2; + if ((phi_a2_2 >= 0) && (phi_a3 == -1)) { + phi_a2_3 = 0; + } + arg0->unk78 = arg0->unk78 + (phi_a2_3 * 0x14); + arg0->unkB8 = phi_f0; + arg0->unkB4 = phi_v1; + arg0->unkAC = phi_a3; + if ((arg0->unkBC & 8) != 0) { + func_8008C73C(arg0, arg1, phi_a2_3, phi_a3); + arg0->unk44 = arg0->unk44 & 0xBFFF; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D170.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008D3B0(void *arg0, ? arg1) { + arg0->unk44 = arg0->unk44 & 0xBFFF; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D3B0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800C9060(s32, ?); /* extern */ +? func_800C9250(s32, s8); /* extern */ +extern s32 D_800DC4DC; +extern u16 D_8015F890; + +void func_8008D3C4(void *arg0, s8 arg1) { + s32 sp24; + s32 temp_a0; + s32 temp_a0_2; + s8 temp_a1; + u16 temp_v0; + + temp_a1 = arg1; + arg1 = temp_a1; + func_8008C354(temp_a1); + arg0->unkBC = arg0->unkBC | 0x2000; + arg0->unkC = arg0->unkC & ~0x200; + arg0->unkDB4 = 0; + arg0->unkDBC = 8.0f; + if (D_8015F890 != 1) { + temp_v0 = arg0->unk0; + if ((temp_v0 & 0x4000) == 0x4000) { + temp_a0 = arg1 & 0xFF; + if ((temp_v0 & 0x100) != 0x100) { + sp24 = temp_a0; + func_800C9250(temp_a0, arg1); + func_800C9060(temp_a0, 0x1900A40B); + } + } + } else { + temp_a0_2 = arg1 & 0xFF; + if (arg0 == D_800DC4DC) { + sp24 = temp_a0_2; + func_800C9250(temp_a0_2, arg1); + func_800C9060(temp_a0_2, 0x1900A40B); + } + } + arg0->unkDC = 0x50; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D3C4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(void *, ?, ?, void *); /* extern */ + +void func_8008D4B4(void *arg0) { + s16 temp_v0; + void *temp_a0; + void *temp_a3; + + temp_v0 = arg0->unkDC; + temp_a3 = arg0; + arg0->unk9C = arg0->unk214; + if (temp_v0 > 0) { + arg0->unkDC = temp_v0 - 1; + } + if (arg0->unkDC != 0) { + temp_a0 = temp_a3 + 0x80; + arg0 = temp_a3; + func_800225CC(temp_a0, 0x43C80000, 0x3F000000, temp_a3); + } else { + arg0 = temp_a3; + func_800225CC(temp_a3 + 0x80, 0, 0x3DCCCCCD, temp_a3); + } + if (arg0->unk80 <= 1.0f) { + arg0->unkBC = arg0->unkBC & ~0x2000; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D4B4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008D554(void *arg0) { + arg0->unkBC = arg0->unkBC & ~0x2000; + arg0->unk80 = 0.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D554.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800C9060(s32, ?, void *, s8); /* extern */ +? func_800C90F4(s32, s32, void *, s8); /* extern */ +extern ? D_800E3710; +extern ? D_800E3730; +extern ? D_8018D920; + +void func_8008D570(void *arg0, s8 arg1) { + s32 temp_a0; + s32 temp_t0; + s32 temp_t3; + s32 temp_t8; + u16 temp_v1; + u16 temp_v1_2; + void *temp_a2; + s32 phi_a0; + u16 phi_v1; + void *phi_a2; + + func_8008C354(arg1); + temp_a2 = arg0; + temp_t8 = temp_a2->unkBC | 0x80000; + temp_t0 = temp_t8 & ~0x10; + temp_a2->unkBC = temp_t8; + temp_t3 = temp_a2->unk254 * 4; + temp_a2->unkBC = temp_t0; + temp_a2->unkC = temp_a2->unkC & ~0x1000; + temp_a2->unkAE = temp_a2->unk2E; + temp_a2->unkF0 = *(&D_800E3730 + temp_t3); + temp_a2->unkF4 = 0.0f; + temp_a2->unkB2 = 1; + temp_a2->unkC0 = 0; + temp_a2->unk7C = 0; + temp_a2->unk78 = 0; + temp_a2->unkEC = *(&D_800E3710 + temp_t3); + *(&D_8018D920 + (arg1 * 2)) = 0; + temp_v1 = temp_a2->unk0; + temp_a0 = temp_v1 & 0x4000; + phi_a0 = temp_a0; + phi_v1 = temp_v1; + phi_a2 = temp_a2; + if ((temp_a0 == 0x4000) && ((temp_v1 & 0x100) != 0x100)) { + arg0 = temp_a2; + func_800C9060(arg1 & 0xFF, 0x19008002, temp_a2, arg1); + temp_v1_2 = arg0->unk0; + phi_a0 = temp_v1_2 & 0x4000; + phi_v1 = temp_v1_2; + phi_a2 = arg0; + } + if ((phi_a0 == 0x4000) && ((phi_v1 & 0x100) != 0x100)) { + func_800C90F4(arg1 & 0xFF, (phi_a2->unk254 * 0x10) + 0x2900800C, phi_a2, arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D570.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008D760(s8); /* extern */ +extern ? D_8018D920; + +void func_8008D698(void *arg0, s8 arg1) { + s16 *temp_v0; + s16 temp_t5; + s32 temp_t7; + s32 phi_v1; + + if (arg0->unkB2 == 0) { + arg0->unk2E = arg0->unkAE; + phi_v1 = 0; + } else { + arg0->unk2E = arg0->unk2E - 0x71C; + temp_v0 = (arg1 * 2) + &D_8018D920; + temp_t5 = *temp_v0 - 0x71C; + temp_t7 = ((temp_t5 & 0xFFFF) / 1820) << 0x10; + *temp_v0 = temp_t5; + phi_v1 = temp_t7 >> 0x10; + } + if (phi_v1 == 0) { + arg0->unkB2 = arg0->unkB2 - 1; + if (arg0->unkB2 <= 0) { + arg0->unkB2 = 0; + } + if ((arg0->unkB2 == 0) && ((arg0->unkBC & 8) != 8)) { + func_8008D760(arg1); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D698.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? gKartGravityTable; + +void func_8008D760(void *arg0) { + arg0->unkA8 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unkBC = arg0->unkBC & 0xFFF7FFFF; + arg0->unk2E = arg0->unkAE; + arg0->unk0 = arg0->unk0 & 0xFF7F; + arg0->unk100 = *(&gKartGravityTable + (arg0->unk254 * 4)); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D760.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800C90F4(s32, s32, void *, s8); /* extern */ +extern ? D_800E3750; +extern ? D_800E3770; +extern ? D_8018D920; + +void func_8008D7B0(void *arg0, s8 arg1) { + s32 temp_t0; + s32 temp_t2; + s32 temp_t5; + s8 temp_a1; + u16 temp_v1; + + temp_a1 = arg1; + arg1 = arg1; + func_8008C354(temp_a1); + temp_t0 = arg0->unkBC | 0x800000; + temp_t2 = temp_t0 & ~0x10; + arg0->unkBC = temp_t0; + temp_t5 = arg0->unk254 * 4; + arg0->unkBC = temp_t2; + arg0->unkC = arg0->unkC & 0xFFFDFFFF; + arg0->unkAE = arg0->unk2E; + arg0->unkF0 = *(&D_800E3770 + temp_t5); + arg0->unkF4 = 0.0f; + arg0->unkEC = *(&D_800E3750 + temp_t5); + *(&D_8018D920 + (arg1 * 2)) = 0; + temp_v1 = arg0->unk0; + arg0->unkB2 = 4; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unk78 = 0; + if (((temp_v1 & 0x4000) == 0x4000) && ((temp_v1 & 0x100) != 0x100)) { + func_800C90F4(arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008003, arg0, arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D7B0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008D97C(s8); /* extern */ +extern ? D_8018D920; + +void func_8008D8B4(void *arg0, s8 arg1) { + s16 *temp_v0; + s16 temp_t5; + s32 temp_t7; + s32 phi_v1; + + if (arg0->unkB2 == 0) { + arg0->unk2E = arg0->unkAE; + phi_v1 = 0; + } else { + arg0->unk2E = arg0->unk2E - 0x71C; + temp_v0 = (arg1 * 2) + &D_8018D920; + temp_t5 = *temp_v0 - 0x71C; + temp_t7 = ((temp_t5 & 0xFFFF) / 1820) << 0x10; + *temp_v0 = temp_t5; + phi_v1 = temp_t7 >> 0x10; + } + if (phi_v1 == 0) { + arg0->unkB2 = arg0->unkB2 - 1; + if (arg0->unkB2 <= 0) { + arg0->unkB2 = 0; + } + if ((arg0->unkB2 == 0) && ((arg0->unkBC & 8) != 8)) { + func_8008D97C(arg1); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D8B4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? gKartGravityTable; + +void func_8008D97C(void *arg0) { + arg0->unkA8 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unkBC = arg0->unkBC & 0xFF7FFFFF; + arg0->unk2E = arg0->unkAE; + arg0->unk100 = *(&gKartGravityTable + (arg0->unk254 * 4)); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D97C.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008D9C0(void *arg0) { + arg0->unkDA0 = arg0->unkDA0 + 8.0f; + if (arg0->unkDA0 >= 140.0f) { + arg0->unkDA0 = 140.0f; + } + if (arg0->unkD98 == 1) { + arg0->unkD9C = arg0->unkD9C + arg0->unkDA0; + if (arg0->unkD9C >= 2002.0f) { + arg0->unkDA0 = 10.0f; + arg0->unkD98 = arg0->unkD98 * -1; + } + } + if (arg0->unkD98 == -1) { + arg0->unkD9C = arg0->unkD9C - arg0->unkDA0; + if (arg0->unkD9C <= -2002.0f) { + arg0->unkDA0 = 10.0f; + arg0->unkD98 = arg0->unkD98 * -1; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008D9C0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800098FC(s8, void *, void *, s8); /* extern */ +? func_8008C354(s8); /* extern */ +? func_800C90F4(s32, s32, void *, s8); /* extern */ +extern ? D_80165190; +extern ? D_8018D990; + +void func_8008DABC(void *arg0, s8 arg1) { + s32 temp_a0; + s8 temp_a1; + s8 temp_a3; + u16 temp_a1_2; + u16 temp_v0_2; + void *temp_a2; + void *temp_v0; + void *phi_a2; + u16 phi_v0; + s8 phi_a3; + + temp_a1 = arg1; + arg1 = arg1; + func_8008C354(temp_a1); + temp_a2 = arg0; + temp_a3 = arg1; + phi_a2 = temp_a2; + phi_a3 = temp_a3; + if ((temp_a2->unkBC << 5) >= 0) { + temp_a2->unkDB6 = 0; + temp_a2->unk238 = 0; + temp_a2->unkDC4 = 4.5f; + *(&D_8018D990 + (temp_a3 * 4)) = 0; + temp_a2->unkBC = temp_a2->unkBC & 0xF7FFFFEF; + temp_v0 = (temp_a3 * 2) + &D_80165190; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + temp_a2->unkD98 = 1; + temp_a2->unkD9C = 0.0f; + temp_a2->unkDA0 = 65.0f; + if ((temp_a2->unkC & 0x100) != 0) { + temp_a2->unk46 = temp_a2->unk46 | 0x80; + } + temp_v0_2 = temp_a2->unk0; + phi_v0 = temp_v0_2; + if ((temp_v0_2 & 0x4000) != 0) { + temp_a0 = temp_a3 & 0xFF; + if ((temp_a2->unkBC & 0x4000000) == 0) { + temp_a1_2 = temp_a2->unk254; + arg1 = temp_a3; + arg0 = temp_a2; + func_800C90F4(temp_a0, (temp_a1_2 * 0x10) + 0x29008005, temp_a2, temp_a3); + phi_a2 = arg0; + phi_v0 = arg0->unk0; + phi_a3 = arg1; + } + } + phi_a2->unkBC = phi_a2->unkBC | 0x4000000; + if ((phi_v0 & 0x1000) != 0) { + func_800098FC(phi_a3, phi_a2, phi_a2, phi_a3); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008DABC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008D9C0(f32, void *, s32, void *, s8); /* extern */ +? func_800C9060(f32, s32, ?, void *, s8); /* extern */ +? func_800C90F4(f32, s32, s32, void *, s8); /* extern */ +extern ? D_80165190; +extern ? D_8018D990; +extern ? gKartBoundingBoxTable; + +void func_8008DC08(void *arg0, s8 arg1) { + s16 temp_v0_3; + s32 *temp_v1; + s32 temp_t0; + s32 temp_t2; + s32 temp_v0; + void *temp_v0_2; + + arg0->unkC2 = 0; + arg0->unkA8 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unk8C = 0.0f; + arg0->unk9C = 0.0f; + if ((arg0->unk124 >= 600.0f) || ((arg0->unkBC & 0x1000) != 0)) { + *(&D_8018D990 + (arg1 * 4)) = 3; + } + temp_v1 = (arg1 * 4) + &D_8018D990; + temp_v0 = *temp_v1; + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 2) { + if (temp_v0 != 3) { + return; + } + temp_t0 = arg0->unkBC & 0xFBFFFFFF; + temp_t2 = temp_t0 | 0x8000000; + arg0->unkBC = temp_t0; + arg0->unkDB6 = 0; + arg0->unkBC = temp_t2; + arg0->unkDC4 = 3.0f; + arg0->unk224 = 1.0f; + temp_v0_2 = (arg1 * 2) + &D_80165190; + arg0->unk70 = *(&gKartBoundingBoxTable + (arg0->unk254 * 4)); + temp_v0_2->unk0 = 1; + temp_v0_2->unk10 = 1; + temp_v0_2->unk20 = 1; + temp_v0_2->unk30 = 1; + if ((arg0->unk0 & 0x4000) != 0) { + func_800C90F4(0.0f, arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008008, arg0, arg1); + } + /* Duplicate return node #35. Try simplifying control flow for better match */ + return; + } + arg0->unk238 = arg0->unk238 + 1; + if (arg0->unk238 >= 0x259) { + *temp_v1 = 3; + arg0->unk238 = 0; + } + if (arg0->unk124 >= 600.0f) { + *temp_v1 = 3; + } + arg0->unkDC4 = 4.5f; + arg0->unk18 = arg0->unk18 - 0.085; + if ((arg0->unkBC & 8) != 8) { + *temp_v1 = 3; + arg0->unk238 = 0; + } + func_8008D9C0(0.0f, arg0, 3, arg0, arg1); + return; + } + arg0->unkDC4 = 4.5f; + arg0->unk238 = arg0->unk238 + 1; + arg0->unk18 = arg0->unk18 + 0.13; + if ((arg0->unk46 & 0x80) != 0) { + if (arg0->unk238 >= 0x32) { + *temp_v1 = 2; + arg0->unk238 = 0; + arg0->unk46 = arg0->unk46 & 0xFF7F; + } + } else if (arg0->unk238 >= 0x50) { + *temp_v1 = 2; + arg0->unk238 = 0; + } + arg0->unkDA0 = arg0->unkDA0 + 6.0f; + if (arg0->unkDA0 >= 90.0f) { + arg0->unkDA0 = 90.0f; + } + arg0->unkD9C = arg0->unkD9C + arg0->unkDA0; + if (arg0->unkD9C >= 3458.0f) { + arg0->unkDA0 = 0.0f; + return; + } + /* Duplicate return node #35. Try simplifying control flow for better match */ + return; + } + temp_v0_3 = arg0->unk238; + arg0->unkDC4 = 4.5f; + if (temp_v0_3 < 0x3D) { + arg0->unk238 = temp_v0_3 + 1; + } + if ((arg0->unk46 & 0x80) != 0) { + if (((arg0->unkC & 0x100) == 0) && (*temp_v1 = 1, arg0->unk238 = 0, ((arg0->unk0 & 0x4000) != 0))) { + func_800C9060(0.0f, arg1 & 0xFF, 0x1901904B, arg0, arg1); + return; + } + /* Duplicate return node #35. Try simplifying control flow for better match */ + return; + } + arg0->unk238 = arg0->unk238 + 1; + if ((arg0->unk238 >= 0x1E) && (*temp_v1 = 1, arg0->unk238 = 0, ((arg0->unk0 & 0x4000) != 0))) { + func_800C9060(0.0f, arg1 & 0xFF, 0x1901904B, arg0, arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008DC08.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800098FC(s8, void *); /* extern */ +? func_8006B8B4(void *, s8); /* extern */ +? func_8008C354(s8); /* extern */ +? func_800C90F4(s32, s32); /* extern */ +extern ? D_80165190; +extern ? D_8018D920; +extern ? D_8018D930; +extern f32 gCourseTimer; +extern s32 gModeSelection; + +void func_8008DF98(void *arg0, s8 arg1) { + s32 temp_t1; + s32 temp_t3; + s32 temp_v1; + u16 temp_a0; + void *temp_v0; + + func_8008C354(arg1); + temp_t1 = arg0->unkBC | 0x40020000; + temp_t3 = temp_t1 & ~0x10; + arg0->unkBC = temp_t1; + arg0->unkC = arg0->unkC & ~0x4000; + arg0->unkBC = temp_t3; + arg0->unkB0 = 0; + arg0->unk224 = 1.0f; + temp_v1 = arg1 * 2; + arg0->unk8C = arg0->unk8C * 0.6; + temp_v0 = temp_v1 + &D_80165190; + *(&D_8018D930 + (arg1 * 4)) = gCourseTimer; + arg0->unkB2 = 2; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unk78 = 0; + arg0->unkAE = arg0->unk2E; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + *(&D_8018D920 + temp_v1) = 0; + temp_a0 = arg0->unk0; + if (((temp_a0 & 0x4000) == 0x4000) && ((temp_a0 & 0x100) != 0x100)) { + func_800C90F4(arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008003); + } else { + func_800098FC(arg1, arg0); + } + if (gModeSelection == 3) { + func_8006B8B4(arg0, arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008DF98.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(void *, f32, ?); /* extern */ +? func_80031F48(void *, ?, s8); /* extern */ +? func_8008DABC(void *, s8, s8); /* extern */ +? func_8008E3C0(s8, s8, s8); /* extern */ +? func_800C90F4(s32, s32, s8); /* extern */ +extern ? D_80165190; +extern ? D_8018D920; +extern ? gKartBoundingBoxTable; + +void func_8008E118(void *arg0, s8 arg1) { + s16 *temp_v0_3; + s16 temp_t0; + s32 temp_a0; + s32 temp_v0; + s8 temp_a2; + s8 temp_t1; + void *temp_v0_2; + void *temp_v0_4; + s8 phi_a2; + + temp_v0 = arg0->unkBC; + temp_a2 = arg1; + phi_a2 = temp_a2; + if (((temp_v0 & 0x8000) == 0x8000) && ((temp_v0 & 0x4000000) != 0x4000000)) { + arg0->unkBC = temp_v0 & 0xFFFDFFFF; + arg0->unkA8 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + temp_t1 = arg1; + arg0->unk2E = arg0->unkAE; + arg1 = arg1; + func_8008E3C0(temp_t1, temp_a2); + temp_v0_2 = (arg1 * 2) + &D_80165190; + temp_v0_2->unk0 = 1; + temp_v0_2->unk10 = 1; + temp_v0_2->unk20 = 1; + temp_v0_2->unk30 = 1; + func_8008DABC(arg0, arg1, arg1); + return; + } + temp_a0 = temp_a2 * 2; + if ((temp_v0 & 0x20000) == 0x20000) { + arg0->unk2E = arg0->unk2E - 0x5B0; + temp_v0_3 = temp_a0 + &D_8018D920; + temp_t0 = *temp_v0_3 - 0x5B0; + *temp_v0_3 = temp_t0; + if (((temp_t0 & 0xFFFF) / 1456) == 0) { + arg0->unkB2 = arg0->unkB2 - 1; + if (arg0->unkB2 <= 0) { + arg0->unkA8 = 0; + arg0->unkBC = arg0->unkBC & 0xFFFDFFFF; + arg0->unk7C = 0; + arg0->unkC0 = 0; + temp_v0_4 = temp_a0 + &D_80165190; + arg0->unk2E = arg0->unkAE; + temp_v0_4->unk0 = 1; + temp_v0_4->unk10 = 1; + temp_v0_4->unk20 = 1; + temp_v0_4->unk30 = 1; + } + } + func_80031F48(arg0, 0x3F800000, temp_a2); + return; + } + arg0->unkB0 = arg0->unkB0 + 1; + arg0->unk8C = arg0->unk8C * 0.6; + if ((arg0->unkB0 == 1) && ((arg0->unk0 & 0x4000) != 0)) { + arg1 = temp_a2; + func_800C90F4(temp_a2 & 0xFF, (arg0->unk254 * 0x10) + 0x29008005, temp_a2); + phi_a2 = arg1; + } + if ((arg0->unkB0 >= 0) && (arg0->unkB0 < 0x1CC)) { + func_800225CC(arg0 + 0x224, 0.7f, 0x3DCCCCCD); + func_800225CC(arg0 + 0x70, *(&gKartBoundingBoxTable + (arg0->unk254 * 4)) * 0.9, 0x3DCCCCCD); + return; + } + arg1 = phi_a2; + func_8008E3C0(arg0, phi_a2, phi_a2); + if ((arg0->unk0 & 0x4000) != 0) { + func_800C90F4(arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008008, arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E118.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(void *, s32, ?, void *); /* extern */ +extern ? gKartBoundingBoxTable; + +void func_8008E3C0(void *arg0, ? arg1) { + s32 temp_t3; + s32 temp_t9; + void *temp_a3; + + temp_a3 = arg0; + arg0 = temp_a3; + func_800225CC(arg0 + 0x224, 0x3F800000, 0x3DCCCCCD, temp_a3); + func_800225CC(arg0 + 0x70, *(&gKartBoundingBoxTable + (arg0->unk254 * 4)), 0x3DCCCCCD, arg0); + temp_t9 = arg0->unkBC & 0xBFFFFFFF; + arg0->unkBC = temp_t9; + arg0->unk224 = 1.0f; + temp_t3 = temp_t9 | 0x8000000; + arg0->unkDB6 = 0; + arg0->unkBC = temp_t3; + arg0->unk70 = *(&gKartBoundingBoxTable + (arg0->unk254 * 4)); + arg0->unkDC4 = 3.0f; + if ((temp_t3 & 0x20000) == 0x20000) { + arg0->unk2E = arg0->unkAE; + } + arg0->unkBC = (temp_t9 | 0x8000000) & 0xFFFDFFFF; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E3C0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8006B8B4(s8, s32); /* extern */ +extern ? D_80165190; +extern ? D_80165460; +extern s32 gModeSelection; + +void func_8008E4A4(void *arg0, s8 arg1) { + s32 temp_t2; + s32 temp_t4; + s8 temp_a1; + u16 temp_t3; + void *temp_v0; + void *temp_v0_2; + s8 phi_a1; + + temp_t2 = arg0->unkBC & ~0xC0; + temp_t4 = temp_t2 & 8; + temp_a1 = arg1; + arg0->unk206 = 0; + arg0->unkC4 = 0; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unkC2 = 0xF; + arg0->unk42 = arg0->unk42 + 0xAAA; + arg0->unkBC = temp_t2; + arg0->unk8C = 0.0f; + arg0->unk9C = 0.0f; + arg0->unk34 = 0.0f; + arg0->unk3C = 0.0f; + phi_a1 = temp_a1; + if (temp_t4 != 8) { + arg0->unkE0 = arg0->unkE0 + 1; + } + if (arg0->unkE0 == 3) { + arg0->unkBC = arg0->unkBC & 0xFEFFFFFF; + arg0->unkA8 = 0; + arg0->unk236 = 0; + temp_v0 = (temp_a1 * 2) + &D_80165190; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + temp_t3 = arg0->unk0 & ~0x80; + arg0->unk42 = 0; + arg0->unk0 = temp_t3; + if ((*(&D_80165460 + (temp_a1 * 4)) == 1) && ((temp_t3 & 0x4000) == 0x4000)) { + arg0->unk9C = arg0->unk9C + 100.0f; + } + if (gModeSelection == 3) { + func_8006B8B4(temp_a1, 3); + return; + } + /* Duplicate return node #16. Try simplifying control flow for better match */ + return; + } + arg0->unkA8 = arg0->unkA8 + 0x80; + if (arg0->unkA8 >= 0x2000) { + arg0->unkA8 = 0; + arg0->unk236 = arg0->unk236 - 1; + if (arg0->unk236 == 0) { + arg0->unkBC = arg0->unkBC & 0xFEFFFFFF; + arg0->unk236 = 0; + temp_v0_2 = (temp_a1 * 2) + &D_80165190; + temp_v0_2->unk0 = 1; + temp_v0_2->unk10 = 1; + temp_v0_2->unk20 = 1; + temp_v0_2->unk30 = 1; + arg0->unk42 = 0; + if (gModeSelection == 3) { + arg1 = temp_a1; + func_8006B8B4(temp_a1, 3); + phi_a1 = arg1; + } + if ((*(&D_80165460 + (phi_a1 * 4)) == 1) && ((arg0->unk0 & 0x4000) == 0x4000)) { + arg0->unk9C = arg0->unk9C + 100.0f; + } + arg0->unk0 = arg0->unk0 & 0xFF7F; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E4A4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800098FC(s8, void *, u16); /* extern */ +? func_8008C310(void *); /* extern */ +? func_8008C354(s8); /* extern */ +? func_800C9060(u8, ?); /* extern */ +? func_800C90F4(u8, s32, u16); /* extern */ +? func_800CA24C(u8); /* extern */ +extern u16 D_800DC51C; +extern ? D_800E3710; +extern ? D_800E3730; +extern ? D_80165420; +extern ? D_80165440; +extern ? D_80165460; +extern ? D_80165480; +extern s32 gModeSelection; + +void func_8008E6C0(void *arg0, s8 arg1) { + s32 sp20; + s32 temp_t4; + s32 temp_t7; + s32 temp_t9; + s32 temp_v0; + u16 temp_a2; + u16 temp_v1; + + func_8008C354(arg1); + func_8008C310(arg0); + temp_a2 = arg0->unk254; + temp_t7 = arg0->unkBC | 0x1000000; + temp_t9 = temp_t7 & ~0x10; + arg0->unkBC = temp_t7; + temp_v0 = temp_a2 * 4; + arg0->unkA8 = 0; + arg0->unkBC = temp_t9; + arg0->unkF0 = 0.0f; + arg0->unkF4 = 0.0f; + arg0->unkEC = 0.0f; + arg0->unkF0 = *(&D_800E3730 + temp_v0); + temp_v1 = arg0->unk0; + arg0->unk236 = 4; + arg0->unk42 = 0; + arg0->unkE0 = 0; + arg0->unkEC = *(&D_800E3710 + temp_v0); + if (((temp_v1 & 0x4000) == 0x4000) && ((temp_v1 & 0x100) != 0x100)) { + if ((gModeSelection == 2) && ((temp_v1 & 0x1000) != 0) && (D_800DC51C == 0)) { + func_800CA24C(arg1); + } + sp20 = arg1; + func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008005, arg0->unk254); + if ((gModeSelection == 2) && ((arg0->unk0 & 0x1000) != 0) && (D_800DC51C == 0)) { + func_800CA24C(unksp23); + } + func_800C9060(unksp23, 0x19009005); + } else { + func_800098FC(arg1, arg0, temp_a2); + } + arg0->unkC = arg0->unkC & 0xFFB7FFFF; + arg0->unkB6 = arg0->unkB6 | 0x40; + temp_t4 = arg1 * 4; + *(&D_80165480 + temp_t4) = 0; + *(&D_80165460 + temp_t4) = 0; + *(&D_80165440 + temp_t4) = 0; + *(&D_80165420 + temp_t4) = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E6C0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_80165190; + +void func_8008E884(void *arg0, s8 arg1) { + void *temp_v0; + + arg0->unkBC = arg0->unkBC & 0xFEFFFFFF; + arg0->unkA8 = 0; + arg0->unk236 = 0; + temp_v0 = (arg1 * 2) + &D_80165190; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + arg0->unk42 = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E884.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8006B8B4(s8); /* extern */ +extern ? D_80165190; +extern ? D_80165460; +extern s32 gModeSelection; + +void func_8008E8D8(void *arg0, s8 arg1) { + s32 temp_t2; + s32 temp_t4; + void *temp_v0; + void *temp_v0_2; + + temp_t2 = arg0->unkBC & ~0xC0; + arg0->unk42 = arg0->unk42 + 0xAAA; + temp_t4 = temp_t2 & 8; + arg0->unk206 = 0; + arg0->unkC4 = 0; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unkC2 = 0xF; + arg0->unkBC = temp_t2; + arg0->unk9C = 0.0f; + arg0->unk8C = arg0->unk8C / 2.0f; + if (temp_t4 != 8) { + arg0->unkE0 = arg0->unkE0 + 1; + } + temp_v0 = (arg1 * 2) + &D_80165190; + if (arg0->unkE0 == 4) { + arg0->unkBC = arg0->unkBC & 0xFDFFFFFF; + arg0->unkA8 = 0; + arg0->unk236 = 0; + temp_v0->unk30 = 1; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + arg0->unk42 = 0; + if ((*(&D_80165460 + (arg1 * 4)) == 1) && ((arg0->unk0 & 0x4000) == 0x4000)) { + arg0->unk9C = arg0->unk9C + 100.0f; + } + if (gModeSelection == 3) { + func_8006B8B4(arg1); + return; + } + /* Duplicate return node #15. Try simplifying control flow for better match */ + return; + } + arg0->unkA8 = arg0->unkA8 + 0x90; + if (arg0->unkA8 >= 0x2000) { + arg0->unkA8 = 0; + arg0->unk236 = arg0->unk236 - 1; + if (arg0->unk236 == 0) { + arg0->unkBC = arg0->unkBC & 0xFDFFFFFF; + arg0->unk236 = 0; + temp_v0_2 = (arg1 * 2) + &D_80165190; + temp_v0_2->unk0 = 1; + temp_v0_2->unk10 = 1; + temp_v0_2->unk20 = 1; + temp_v0_2->unk30 = 1; + arg0->unk42 = 0; + if ((*(&D_80165460 + (arg1 * 4)) == 1) && ((arg0->unk0 & 0x4000) == 0x4000)) { + arg0->unk9C = arg0->unk9C + 100.0f; + } + if (gModeSelection == 3) { + func_8006B8B4(arg1); + } + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E8D8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800098FC(s8, void *); /* extern */ +? func_8008C310(void *); /* extern */ +? func_8008C354(s8); /* extern */ +? func_800C9060(u8, ?); /* extern */ +? func_800C90F4(u8, s32); /* extern */ +extern ? D_800E3710; +extern ? D_800E3730; +extern ? D_80165420; +extern ? D_80165440; +extern ? D_80165460; +extern ? D_80165480; + +void func_8008EAE0(void *arg0, s8 arg1) { + s32 sp20; + s32 temp_t7; + s32 temp_v0; + u16 temp_a0; + u16 temp_v1; + + func_8008C354(arg1); + func_8008C310(arg0); + temp_v1 = arg0->unk254; + temp_v0 = temp_v1 * 4; + arg0->unkA8 = 0; + arg0->unkBC = arg0->unkBC & ~0x10; + arg0->unkF0 = 0.0f; + arg0->unkF4 = 0.0f; + arg0->unkEC = 0.0f; + arg0->unkF0 = *(&D_800E3730 + temp_v0); + temp_a0 = arg0->unk0; + arg0->unk236 = 4; + arg0->unk42 = 0; + arg0->unkE0 = 0; + arg0->unkEC = *(&D_800E3710 + temp_v0); + if (((temp_a0 & 0x4000) == 0x4000) && ((temp_a0 & 0x100) != 0x100)) { + sp20 = arg1; + func_800C90F4(arg1, (temp_v1 * 0x10) + 0x29008005); + func_800C9060(arg1, 0x19009005); + } else { + func_800098FC(arg1, arg0); + } + arg0->unkBC = arg0->unkBC | 0x2000000; + arg0->unkB6 = arg0->unkB6 | 0x40; + arg0->unkC = arg0->unkC & 0xFEFFFFFD; + temp_t7 = arg1 * 4; + *(&D_80165480 + temp_t7) = 0; + *(&D_80165460 + temp_t7) = 0; + *(&D_80165440 + temp_t7) = 0; + *(&D_80165420 + temp_t7) = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008EAE0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_80165190; + +void func_8008EC34(void *arg0, s8 arg1) { + void *temp_v0; + + arg0->unkBC = arg0->unkBC & 0xFDFFFFFF; + arg0->unkA8 = 0; + arg0->unk236 = 0; + temp_v0 = (arg1 * 2) + &D_80165190; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + arg0->unk42 = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008EC34.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800C9060(s32, ?); /* extern */ +? func_800C90F4(s32, s32, s8); /* extern */ +extern s32 D_800DC4DC; +extern u16 D_8015F890; + +void func_8008EC88(void *arg0, s8 arg1) { + s32 sp24; + s32 temp_a0; + s32 temp_a0_2; + s8 temp_a1; + u16 temp_v0; + + temp_a1 = arg1; + arg1 = arg1; + func_8008C354(temp_a1); + arg0->unkBC = arg0->unkBC | 0x100000; + arg0->unkC = arg0->unkC & 0xFF7FFFFF; + arg0->unkDB4 = 0; + arg0->unkDBC = 8.0f; + if (D_8015F890 != 1) { + temp_v0 = arg0->unk0; + if ((temp_v0 & 0x4000) == 0x4000) { + temp_a0 = arg1 & 0xFF; + if ((temp_v0 & 0x100) == 0) { + sp24 = temp_a0; + func_800C90F4(temp_a0, (arg0->unk254 * 0x10) + 0x29008001, arg1); + func_800C9060(temp_a0, 0x1900A40B); + } + } + } else { + temp_a0_2 = arg1 & 0xFF; + if (arg0 == D_800DC4DC) { + sp24 = temp_a0_2; + func_800C90F4(temp_a0_2, (arg0->unk254 * 0x10) + 0x29008001, arg1); + func_800C9060(temp_a0_2, 0x1900A40B); + } + } + arg0->unk44 = arg0->unk44 & 0xFFFE; + arg0->unkBC = arg0->unkBC & ~0x20; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008EC88.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(void *, ?, ?, void *); /* extern */ + +void func_8008EDC0(void *arg0) { + void *temp_a0; + void *temp_a3; + + temp_a3 = arg0; + arg0->unk9C = arg0->unk214; + if (arg0->unk256 > 0) { + arg0->unk9C = 0.0f; + } + if ((temp_a3->unkF8 != 0xFE) && ((temp_a3->unkBC & 8) != 8)) { + temp_a0 = temp_a3 + 0x80; + arg0 = temp_a3; + func_800225CC(temp_a0, 0, 0x3F800000, temp_a3); + } else { + arg0 = temp_a3; + func_800225CC(temp_a3 + 0x80, 0x43C80000, 0x3C23D70A, temp_a3); + } + if (arg0->unk80 <= 1.0f) { + arg0->unkBC = arg0->unkBC & 0xFFEFFFFF; + arg0->unk80 = 0.0f; + if (arg0->unkC2 >= 0x33) { + arg0->unk9C = arg0->unk9C * 0.7; + arg0->unk8C = arg0->unk8C * 0.7; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008EDC0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008EEC4(void *arg0) { + arg0->unkBC = arg0->unkBC & 0xFFEFFFFF; + arg0->unk80 = 0.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008EEC4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800C9060(s32, ?); /* extern */ +? func_800C90F4(s32, s32, s8); /* extern */ +extern s32 D_800DC4DC; +extern u16 D_8015F890; + +void func_8008EEE4(void *arg0, s8 arg1) { + s32 sp24; + s32 temp_a0; + s32 temp_a0_2; + s8 temp_a1; + u16 temp_v0; + + temp_a1 = arg1; + arg1 = arg1; + func_8008C354(temp_a1); + arg0->unkBC = arg0->unkBC | 4; + arg0->unkC = arg0->unkC & 0xFFFF7FFF; + if (D_8015F890 != 1) { + temp_v0 = arg0->unk0; + if ((temp_v0 & 0x4000) == 0x4000) { + temp_a0 = arg1 & 0xFF; + if ((temp_v0 & 0x100) == 0) { + sp24 = temp_a0; + func_800C90F4(temp_a0, (arg0->unk254 * 0x10) + 0x29008001, arg1); + func_800C9060(temp_a0, 0x1900A40B); + } + } + } else { + temp_a0_2 = arg1 & 0xFF; + if (arg0 == D_800DC4DC) { + sp24 = temp_a0_2; + func_800C90F4(temp_a0_2, (arg0->unk254 * 0x10) + 0x29008001, arg1); + func_800C9060(temp_a0_2, 0x1900A40B); + } + } + arg0->unk44 = arg0->unk44 & 0xFFFE; + arg0->unkBC = arg0->unkBC & ~0x20; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008EEE4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(void *, ?, ?, void *); /* extern */ +extern s32 D_800E261C; + +void func_8008F008(void *arg0) { + void *temp_a0; + void *temp_a3; + + temp_a3 = arg0; + arg0->unk9C = *(D_800E261C + (arg0->unk254 * 4)); + if ((arg0->unkF8 != 0xFC) && (temp_a0 = arg0 + 0x80, ((arg0->unkBC & 8) != 8))) { + arg0 = temp_a3; + func_800225CC(temp_a0, 0, 0x3F800000, temp_a3); + } else { + arg0 = temp_a3; + func_800225CC(temp_a3 + 0x80, 0x43960000, 0x3DCCCCCD, temp_a3); + } + if (arg0->unk80 <= 1.0f) { + arg0->unkBC = arg0->unkBC & ~4; + arg0->unk80 = 0.0f; + arg0->unk9C = arg0->unk9C / 2.0f; + arg0->unk8C = arg0->unk8C / 2.0f; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F008.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008F0E8(void *arg0) { + arg0->unkBC = arg0->unkBC & ~4; + arg0->unk80 = 0.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F0E8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800C90F4(s32, s32, void *, s8); /* extern */ +extern ? D_8018D920; + +void func_8008F104(void *arg0, s8 arg1) { + s8 temp_a1; + u16 temp_v0; + + temp_a1 = arg1; + arg1 = arg1; + func_8008C354(temp_a1); + arg0->unkB2 = 2; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unkBC = arg0->unkBC | 0x4000; + arg0->unk78 = 0; + arg0->unkAE = arg0->unk2E; + *(&D_8018D920 + (arg1 * 2)) = -0x8000; + temp_v0 = arg0->unk0; + if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { + func_800C90F4(arg1 & 0xFF, (arg0->unk254 * 0x10) + 0x29008003, arg0, arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F104.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_8018D920; + +void func_8008F1B8(void *arg0, s8 arg1) { + s16 *temp_v0_2; + s16 *temp_v0_3; + s16 *temp_v0_4; + s16 *temp_v0_5; + s16 temp_t2; + s16 temp_t5; + s16 temp_t7; + s16 temp_t8; + s16 temp_v0; + + temp_v0 = arg0->unkB2; + arg0->unk8C = arg0->unk210 * 0.05; + if (temp_v0 < 0) { + if ((arg0->unk44 & 0x80) == 0x80) { + arg0->unk2E = arg0->unk2E + 0xB6; + temp_v0_2 = (arg1 * 2) + &D_8018D920; + temp_t5 = *temp_v0_2 + 0xB6; + *temp_v0_2 = temp_t5; + if (((temp_t5 & 0xFFFF) / 182) == 0xB4) { + arg0->unkBC = arg0->unkBC & ~0x4000; + arg0->unk0 = arg0->unk0 & 0xFF7F; + arg0->unk9C = arg0->unk9C / 3.0f; + return; + } + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + } + temp_v0_3 = (arg1 * 2) + &D_8018D920; + arg0->unk2E = arg0->unk2E - 0xB6; + temp_t8 = *temp_v0_3 - 0xB6; + *temp_v0_3 = temp_t8; + if (((temp_t8 & 0xFFFF) / 182) == 0xB4) { + arg0->unkBC = arg0->unkBC & ~0x4000; + arg0->unk0 = arg0->unk0 & 0xFF7F; + arg0->unk9C = arg0->unk9C / 3.0f; + return; + } + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + } + if ((temp_v0 & 1) != 0) { + arg0->unk2E = arg0->unk2E - 0x16C; + temp_v0_4 = (arg1 * 2) + &D_8018D920; + temp_t2 = *temp_v0_4 - 0x16C; + *temp_v0_4 = temp_t2; + if (((temp_t2 & 0xFFFF) / 364) < 0x47) { + arg0->unkB2 = arg0->unkB2 - 1; + } + arg0->unk44 = arg0->unk44 | 0x80; + arg0->unk44 = arg0->unk44 & 0xFFBF; + return; + } + arg0->unk2E = arg0->unk2E + 0x16C; + temp_v0_5 = (arg1 * 2) + &D_8018D920; + temp_t7 = *temp_v0_5 + 0x16C; + *temp_v0_5 = temp_t7; + if (((temp_t7 & 0xFFFF) / 364) >= 0x6E) { + arg0->unkB2 = arg0->unkB2 - 1; + } + arg0->unk44 = arg0->unk44 | 0x40; + arg0->unk44 = arg0->unk44 & 0xFF7F; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F1B8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008F3E0(void *arg0) { + arg0->unkBC = arg0->unkBC & ~0x4000; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F3E0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80090778(); /* extern */ +? func_80090868(void *); /* extern */ + +void func_8008F3F4(void *arg0, ? arg1) { + arg0->unkA8 = arg0->unkA8 + 0x80; + arg0->unk42 = arg0->unk42 + 0x71C; + arg0->unk7C = 0; + arg0->unk9C = 0.0f; + arg0->unk8C = arg0->unk8C / 2.0f; + if (arg0->unkA8 >= 0x2000) { + arg0->unkA8 = 0; + arg0->unk236 = arg0->unk236 - 1; + if (arg0->unk236 == 0) { + arg0->unkBC = arg0->unkBC & 0xFFFEFFFF; + func_80090778(); + func_80090868(arg0); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F3F4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(void *, s8, void *); /* extern */ +? func_8008F86C(void *, s8); /* extern */ +? func_800C90F4(u8, s32, void *); /* extern */ +extern s32 gModeSelection; + +void func_8008F494(void *arg0, s8 arg1) { + s32 temp_t5; + s32 temp_t7; + s32 temp_v0; + u16 temp_v0_2; + u16 temp_v0_3; + void *temp_a0; + void *temp_a2; + + temp_v0 = arg0->unkBC; + temp_a2 = arg0; + temp_a0 = temp_a2; + if ((((temp_v0 & 0x80) != 0) || ((temp_v0 & 0x40) != 0) || ((temp_v0 << 7) < 0) || ((temp_v0 << 6) < 0) || ((temp_v0 & 0x400) != 0)) && (gModeSelection == 3)) { + temp_a2->unk44 = temp_a2->unk44 | 0x8000; + } + arg0 = temp_a2; + func_8008C354(temp_a0, arg1, temp_a2); + func_8008F86C(arg0, arg1); + temp_v0_2 = arg0->unk0; + arg0->unkA8 = 0; + temp_t5 = arg0->unkBC | 0x10000; + temp_t7 = temp_t5 & ~0x10; + arg0->unkBC = temp_t5; + arg0->unkBC = temp_t7; + arg0->unk236 = 0x1E; + arg0->unk42 = 0; + if (((temp_v0_2 & 0x4000) != 0) && ((temp_v0_2 & 0x100) == 0) && ((arg0->unkCA & 2) == 0)) { + temp_v0_3 = arg0->unkDE; + if (((temp_v0_3 & 1) == 0) && ((temp_v0_3 & 2) == 0)) { + func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008004, arg0); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F494.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8006B8B4(s8); /* extern */ +extern ? D_80165190; + +void func_8008F5A4(void *arg0, s8 arg1) { + void *temp_v0; + + if ((arg0->unk44 & 0x8000) != 0) { + func_8006B8B4(arg1); + arg0->unk44 = arg0->unk44 & 0x7FFF; + } + arg0->unk206 = 0; + arg0->unkC4 = 0; + arg0->unkBC = arg0->unkBC & 0xFFFEFFFF; + arg0->unkA8 = 0; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unk236 = 0; + arg0->unk78 = 0; + arg0->unk9C = 0.0f; + temp_v0 = (arg1 * 2) + &D_80165190; + temp_v0->unk0 = 1; + temp_v0->unk10 = 1; + temp_v0->unk20 = 1; + temp_v0->unk30 = 1; + arg0->unk42 = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F5A4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800CA730(s32, s8, s32, s32 *); /* extern */ +? func_800CAACC(s32, s8, s32, s32 *); /* extern */ +extern ? D_8018D900; +extern ? D_8018D930; +extern f32 gCourseTimer; + +void func_8008F650(void *arg0, s8 arg1) { + s32 *sp20; + s32 *sp18; + s32 *temp_a3; + s32 *temp_v0; + s32 temp_a2; + s32 temp_v1; + u16 temp_a0; + s32 phi_v1; + + temp_a2 = arg1 * 4; + temp_a3 = temp_a2 + &D_8018D930; + temp_v1 = gCourseTimer - *temp_a3; + phi_v1 = temp_v1; + if (temp_v1 >= 9) { + temp_v0 = temp_a2 + &D_8018D900; + *temp_v0 = 1; + temp_a0 = arg0->unk0; + if (((temp_a0 & 0x4000) == 0x4000) && ((temp_a0 & 0x100) != 0x100)) { + if (1 == 1) { + sp18 = temp_v0; + sp20 = temp_a3; + func_800CA730(arg1 & 0xFF, arg1, temp_a2, temp_a3); + *temp_v0 = 0; + phi_v1 = gCourseTimer - *temp_a3; + } + } else if (*temp_v0 == 1) { + sp18 = temp_v0; + sp20 = temp_a3; + func_800CAACC(arg1 & 0xFF, arg1, temp_a2, temp_a3); + *temp_v0 = 0; + phi_v1 = gCourseTimer - *temp_a3; + } + } + if (phi_v1 >= 0xA) { + arg0->unkBC = arg0->unkBC & ~0x200; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F650.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(s8); /* extern */ +? func_800CA59C(s32, u16, s8, s32); /* extern */ +? func_800CA984(s32, u16, s8, s32); /* extern */ +extern ? D_8018D900; +extern ? D_8018D930; +extern f32 gCourseTimer; + +void func_8008F778(void *arg0, s8 arg1) { + s32 *sp1C; + s32 *temp_v1; + s32 temp_v0; + s8 temp_a1; + u16 temp_a1_2; + + temp_a1 = arg1; + arg1 = arg1; + func_8008C354(temp_a1); + arg0->unkBC = arg0->unkBC | 0x200; + arg0->unkC = arg0->unkC & ~0x2000; + temp_v0 = arg1 * 4; + temp_v1 = temp_v0 + &D_8018D900; + *(&D_8018D930 + temp_v0) = gCourseTimer; + *temp_v1 = 1; + temp_a1_2 = arg0->unk0; + if (((temp_a1_2 & 0x4000) == 0x4000) && ((temp_a1_2 & 0x100) != 0x100)) { + if (1 == 1) { + sp1C = temp_v1; + func_800CA59C(arg1 & 0xFF, temp_a1_2, arg1, 1); + *temp_v1 = 2; + return; + } + /* Duplicate return node #6. Try simplifying control flow for better match */ + return; + } + if (*temp_v1 == 1) { + sp1C = temp_v1; + func_800CA984(arg1 & 0xFF, temp_a1_2, arg1, 1); + *temp_v1 = 2; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F778.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800CA730(s32, s8); /* extern */ +? func_800CAACC(s32, s8); /* extern */ + +void func_8008F86C(void *arg0, s8 arg1) { + u16 temp_v0; + + temp_v0 = arg0->unk0; + arg0->unkBC = arg0->unkBC & ~0x200; + if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { + func_800CA730(arg1 & 0xFF, arg1); + return; + } + func_800CAACC(arg1 & 0xFF, arg1); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F86C.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800CB064(s32, s8, void *, s16); /* extern */ +extern ? D_8018D950; +extern ? D_8018D970; +extern f32 gCourseTimer; + +void func_8008F8DC(void *arg0, s8 arg1) { + s32 sp18; + s32 *temp_v0; + s32 *temp_v0_2; + s32 temp_a0; + s32 temp_t7; + s32 temp_t8; + s32 temp_v1; + s8 temp_a1; + void *temp_a2; + void *phi_a2; + s8 phi_a1; + + temp_a1 = arg1; + temp_v1 = temp_a1 * 4; + temp_a2 = arg0; + phi_a2 = temp_a2; + phi_a1 = temp_a1; + if ((gCourseTimer - *(&D_8018D950 + temp_v1)) < 7) { + arg0->unkC6 = arg0->unkC6 - 2; + temp_v0 = temp_v1 + &D_8018D970; + if (arg0->unkC6 < 0x61) { + arg0->unkC6 = 0x60; + } + temp_t7 = *temp_v0 - 2; + *temp_v0 = temp_t7; + if (temp_t7 <= 0) { + *temp_v0 = 0; + return; + } + /* Duplicate return node #11. Try simplifying control flow for better match */ + return; + } + temp_a2->unkC6 = temp_a2->unkC6 + 4; + if (temp_a2->unkC6 >= 0xF0) { + temp_a2->unkC6 = 0xFF; + *(&D_8018D970 + temp_v1) = 0xFF; + temp_a2->unkBC = temp_a2->unkBC & 0x7FFFFFFF; + if ((temp_a2->unk0 & 0x4000) != 0) { + temp_a0 = temp_a1 & 0xFF; + sp18 = temp_v1; + arg1 = temp_a1; + arg0 = temp_a2; + func_800CB064(temp_a0, temp_a1, temp_a2, 0xFF); + phi_a2 = arg0; + phi_a1 = arg1; + } + } + temp_v0_2 = (temp_a1 * 4) + &D_8018D970; + temp_t8 = *temp_v0_2 + 8; + *temp_v0_2 = temp_t8; + if (temp_t8 >= 0xF0) { + *temp_v0_2 = 0xFF; + phi_a2->unkC6 = 0xFF; + phi_a2->unkBC = phi_a2->unkBC & 0x7FFFFFFF; + if ((phi_a2->unk0 & 0x4000) != 0) { + func_800CB064(phi_a1 & 0xFF, phi_a1, phi_a2, 0xFF); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008F8DC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8008C354(void *, s8, void *); /* extern */ +? func_800CAFC0(s32, s8, void *); /* extern */ +extern ? D_8018D950; +extern ? D_8018D970; +extern f32 gCourseTimer; + +void func_8008FA38(void *arg0, s8 arg1) { + s16 temp_v1; + s32 temp_v0_2; + s8 temp_a1; + void *temp_a0; + void *temp_a2; + void *temp_v0; + s16 phi_v1; + + temp_a1 = arg1; + temp_a2 = arg0; + if ((arg0->unk0 & 0x4000) != 0) { + arg0->unk44 = arg0->unk44 | 0x200; + phi_v1 = 0; + do { + temp_v1 = phi_v1 + 1; + temp_v0 = temp_a2 + (phi_v1 * 0x48); + temp_v0->unk274 = 0; + temp_v0->unk276 = 0; + temp_v0->unk26A = 0; + phi_v1 = temp_v1; + } while (temp_v1 < 0xA); + } + temp_a0 = temp_a2; + arg1 = temp_a1; + arg0 = temp_a2; + func_8008C354(temp_a0, temp_a1, temp_a2); + temp_v0_2 = arg1 * 4; + arg0->unkBC = arg0->unkBC | 0x80000000; + arg0->unkC = arg0->unkC & ~0x800; + *(&D_8018D950 + temp_v0_2) = gCourseTimer; + *(&D_8018D970 + temp_v0_2) = 0xFF; + if ((arg0->unk0 & 0x4000) != 0) { + func_800CAFC0(arg1 & 0xFF, arg1, arg0); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FA38.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800CB064(s32, s8, void *); /* extern */ +extern ? D_8018D970; + +void func_8008FB30(void *arg0, s8 arg1) { + s32 *temp_v0; + s32 temp_a0; + s32 temp_t9; + s8 temp_a1; + void *temp_a2; + s8 phi_a1; + void *phi_a2; + + arg0->unkC6 = arg0->unkC6 + 8; + temp_a1 = arg1; + temp_a2 = arg0; + phi_a1 = temp_a1; + phi_a2 = temp_a2; + if (arg0->unkC6 >= 0xF0) { + arg0->unkC6 = 0xFF; + *(&D_8018D970 + (arg1 * 4)) = 0xFF; + arg0->unkBC = arg0->unkBC & 0x7FFFFFFF; + if ((arg0->unk0 & 0x4000) != 0) { + temp_a0 = arg1 & 0xFF; + arg1 = arg1; + arg0 = temp_a2; + func_800CB064(temp_a0, temp_a1, temp_a2); + phi_a1 = arg1; + phi_a2 = arg0; + } + } + temp_v0 = (phi_a1 * 4) + &D_8018D970; + temp_t9 = *temp_v0 + 0x10; + *temp_v0 = temp_t9; + if (temp_t9 >= 0xE0) { + *temp_v0 = 0xFF; + phi_a2->unkC6 = 0xFF; + phi_a2->unkBC = phi_a2->unkBC & 0x7FFFFFFF; + if ((phi_a2->unk0 & 0x4000) != 0) { + func_800CB064(phi_a1 & 0xFF, phi_a1, phi_a2); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FB30.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80027D00(u16 *); /* extern */ +? func_80056A94(s32, u16 *); /* extern */ + +void func_8008FC1C(u16 *arg0) { + s32 temp_a0; + u16 *temp_a1; + + temp_a1 = arg0; + if ((*arg0 & 0x40) != 0) { + arg0 = temp_a1; + temp_a0 = func_80027D00(temp_a1); + *arg0 = 0x7000; + func_80056A94(temp_a0, arg0); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FC1C.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800569F4(s8); /* extern */ +? func_8008FDA8(s8); /* extern */ + +void func_8008FC64(void *arg0, s8 arg1) { + s32 temp_t0; + + arg0->unkC6 = arg0->unkC6 - 4; + if (arg0->unkC6 < 5) { + temp_t0 = arg0->unkC & 0xFBFFFFFF; + arg0->unkC = temp_t0; + arg0->unkC6 = 0; + arg0->unkC = temp_t0 | 0x8000000; + arg0->unk0 = arg0->unk0 | 0x40; + func_8008FDA8(arg1); + func_800569F4(arg1); + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FC64.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80056A40(s8, s16, s8); /* extern */ + +void func_8008FCDC(void *arg0, s8 arg1) { + arg0->unkC6 = arg0->unkC6 + 2; + if (arg0->unkC6 >= 0xF0) { + arg0->unkC6 = 0xFF; + arg0->unkC = arg0->unkC & 0xF7FFFFFF; + } + func_80056A40(arg1, arg0->unkC6, arg1); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FCDC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008FD4C(void *arg0, ? arg1) { + s16 temp_v0; + void *temp_v1; + s16 phi_v0; + + arg0->unkC = arg0->unkC | 0x4000000; + arg0->unk44 = arg0->unk44 | 0x200; + phi_v0 = 0; + do { + temp_v0 = phi_v0 + 1; + temp_v1 = arg0 + (phi_v0 * 0x48); + temp_v1->unk274 = 0; + temp_v1->unk276 = 0; + temp_v1->unk26A = 0; + phi_v0 = temp_v0; + } while (temp_v0 < 0xA); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FD4C.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008FDA8(void *arg0, ? arg1) { + s16 temp_v0; + void *temp_v1; + s16 phi_v0; + + arg0->unk44 = arg0->unk44 | 0x200; + phi_v0 = 0; + do { + temp_v0 = phi_v0 + 1; + temp_v1 = arg0 + (phi_v0 * 0x48); + temp_v1->unk274 = 0; + temp_v1->unk276 = 0; + temp_v1->unk26A = 0; + phi_v0 = temp_v0; + } while (temp_v0 < 0xA); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FDA8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_8008C354(s8); /* extern */ +extern ? D_800E37D0; +extern ? D_800E37F0; + +void func_8008FDF4(void *arg0, s8 arg1) { + s32 temp_t0; + s32 temp_t9; + + func_8008C354(arg1); + temp_t9 = arg0->unkBC & ~0x10; + temp_t0 = arg0->unk254 * 4; + arg0->unkBC = temp_t9; + arg0->unkF4 = 0.0f; + arg0->unkF0 = *(&D_800E37F0 + temp_t0); + arg0->unkC = arg0->unkC & 0xFFEFFFFF; + arg0->unkBC = temp_t9 | 0x10000000; + arg0->unkEC = *(&D_800E37D0 + temp_t0); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FDF4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +void func_8008FE84(void *arg0, ? arg1) { + s32 temp_t7; + + temp_t7 = arg0->unkBC & ~0x10; + arg0->unkBC = temp_t7; + if ((temp_t7 & 8) != 8) { + arg0->unkBC = temp_t7 & 0xEFFFFFFF; + arg0->unk9C = arg0->unk9C / 2.0f; + arg0->unk8C = arg0->unk8C / 2.0f; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FE84.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_8008FEDC(void *arg0, ? arg1) { + arg0->unkBC = arg0->unkBC & 0xEFFFFFFF; + arg0->unkF0 = 0.0f; + arg0->unkEC = 0.0f; + arg0->unkF4 = 0.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FEDC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_80164438; +extern u16 D_801645C8; +extern ? D_80165320; +static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ + +void func_8008FF08(void *arg0, s8 arg1) { + s16 temp_t8; + s16 temp_v0; + s16 temp_v0_2; + s16 temp_v0_3; + s16 temp_v0_4; + s16 temp_v0_5; + s16 temp_v0_6; + s16 temp_v0_7; + s16 temp_v0_8; + s32 temp_v1_3; + s32 temp_v1_4; + u16 temp_v1; + u16 temp_v1_2; + u16 temp_v1_5; + + temp_t8 = gCurrentCourseId; + switch (temp_t8) { + case 2: + temp_v1 = *(&D_80164438 + (arg1 * 2)); + if ((temp_v1 >= 0x235) && (temp_v1 < 0x247)) { + arg0->unk220 = 0x214; + return; + } + if ((temp_v1 >= 0x267) && (temp_v1 < 0x277)) { + arg0->unk220 = 0x25B; + return; + } + arg0->unk220 = temp_v1; + temp_v0 = arg0->unk220; + if (temp_v0 < 0) { + arg0->unk220 = D_801645C8 + temp_v0; + return; + } + return; + case 3: + temp_v1_2 = *(&D_80164438 + (arg1 * 2)); + if ((temp_v1_2 >= 0x12C) && (temp_v1_2 < 0x13C)) { + arg0->unk220 = 0x12C; + return; + } + arg0->unk220 = temp_v1_2; + temp_v0_2 = arg0->unk220; + if (temp_v0_2 < 0) { + arg0->unk220 = D_801645C8 + temp_v0_2; + return; + } + /* Duplicate return node #34. Try simplifying control flow for better match */ + return; + case 4: + case 13: + arg0->unk220 = *(&D_80165320 + (arg1 * 2)); + return; + case 5: + temp_v1_3 = arg1 * 2; + temp_v0_3 = *(&D_80164438 + temp_v1_3); + if ((temp_v0_3 >= 0xF0) && (temp_v0_3 < 0x105)) { + arg0->unk220 = 0xF0; + return; + } + arg0->unk220 = *(&D_80165320 + temp_v1_3); + temp_v0_4 = arg0->unk220; + if (temp_v0_4 < 0) { + arg0->unk220 = D_801645C8 + temp_v0_4; + return; + } + /* Duplicate return node #34. Try simplifying control flow for better match */ + return; + case 7: + temp_v1_4 = arg1 * 2; + temp_v0_5 = *(&D_80164438 + temp_v1_4); + if ((temp_v0_5 >= 0x258) && (temp_v0_5 < 0x2A4)) { + arg0->unk220 = 0x258; + return; + } + arg0->unk220 = *(&D_80165320 + temp_v1_4); + temp_v0_6 = arg0->unk220; + if (temp_v0_6 < 0) { + arg0->unk220 = D_801645C8 + temp_v0_6; + return; + } + /* Duplicate return node #34. Try simplifying control flow for better match */ + return; + case 18: + temp_v1_5 = *(&D_80164438 + (arg1 * 2)); + if ((temp_v1_5 >= 0xB9) && (temp_v1_5 < 0x119)) { + arg0->unk220 = 0xB9; + return; + } + arg0->unk220 = temp_v1_5; + temp_v0_7 = arg0->unk220; + if (temp_v0_7 < 0) { + arg0->unk220 = D_801645C8 + temp_v0_7; + return; + } + /* Duplicate return node #34. Try simplifying control flow for better match */ + return; + case 15: + case 16: + case 17: + case 19: + arg0->unk220 = 0; + return; + default: + arg0->unk220 = *(&D_80164438 + (arg1 * 2)); + temp_v0_8 = arg0->unk220; + if (temp_v0_8 < 0) { + arg0->unk220 = D_801645C8 + temp_v0_8; + } + /* Duplicate return node #34. Try simplifying control flow for better match */ + return; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FF08.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern s32 D_80164550; +extern u16 D_801645C8; +extern ? D_80165310; +static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ +static ? D_800E6F6C; /* unable to generate initializer; const */ +static ? D_800E6F7C; /* unable to generate initializer; const */ +static ? D_800E6F8C; /* unable to generate initializer; const */ +static ? D_800E6F9C; /* unable to generate initializer; const */ +static ? D_800E6FAC; /* unable to generate initializer; const */ +static ? D_800E6FBC; /* unable to generate initializer; const */ +static ? D_800E6FCC; /* unable to generate initializer; const */ +static ? D_800E6FDC; /* unable to generate initializer; const */ +static ? D_800E6FEC; /* unable to generate initializer; const */ +static ? D_800E6FFC; /* unable to generate initializer; const */ +static ? D_800E700C; /* unable to generate initializer; const */ +static ? D_800E701C; /* unable to generate initializer; const */ +static ? D_800E702C; /* unable to generate initializer; const */ +static ? D_800E703C; /* unable to generate initializer; const */ +static ? D_800E704C; /* unable to generate initializer; const */ +static ? D_800E705C; /* unable to generate initializer; const */ + +void func_80090178(void *arg0, s8 arg1, void *arg2, void *arg3) { + ? spF8; + ? spE8; + ? spD8; + ? spC8; + ? spB8; + ? spA8; + ? sp98; + ? sp88; + ? sp78; + ? sp68; + ? sp58; + ? sp48; + ? sp38; + ? sp28; + ? sp18; + ? sp8; + s16 temp_t9; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_a0_4; + u16 *temp_t0; + u16 temp_t1; + void *temp_v1; + void *temp_v1_2; + void *temp_v1_3; + void *temp_v1_4; + f32 phi_f10; + + spF8.unk0 = D_800E6F6C.unk0; + spF8.unk4 = D_800E6F6C.unk4; + spF8.unk8 = D_800E6F6C.unk8; + spF8.unkC = D_800E6F6C.unkC; + spE8.unk0 = D_800E6F7C.unk0; + spE8.unk4 = D_800E6F7C.unk4; + spE8.unk8 = D_800E6F7C.unk8; + spE8.unkC = D_800E6F7C.unkC; + spD8.unk0 = D_800E6F8C.unk0; + spD8.unk4 = D_800E6F8C.unk4; + spD8.unk8 = D_800E6F8C.unk8; + spD8.unkC = D_800E6F8C.unkC; + spC8.unk0 = D_800E6F9C.unk0; + spC8.unk4 = D_800E6F9C.unk4; + spC8.unk8 = D_800E6F9C.unk8; + spC8.unkC = D_800E6F9C.unkC; + spB8.unk0 = D_800E6FAC.unk0; + spB8.unk4 = D_800E6FAC.unk4; + spB8.unk8 = D_800E6FAC.unk8; + spB8.unkC = D_800E6FAC.unkC; + spA8.unk0 = D_800E6FBC.unk0; + spA8.unk4 = D_800E6FBC.unk4; + spA8.unk8 = D_800E6FBC.unk8; + spA8.unkC = D_800E6FBC.unkC; + sp98.unk0 = D_800E6FCC.unk0; + sp98.unk4 = D_800E6FCC.unk4; + sp98.unk8 = D_800E6FCC.unk8; + sp98.unkC = D_800E6FCC.unkC; + sp88.unk0 = D_800E6FDC.unk0; + sp88.unk4 = D_800E6FDC.unk4; + sp88.unk8 = D_800E6FDC.unk8; + sp88.unkC = D_800E6FDC.unkC; + sp78.unk4 = D_800E6FEC.unk4; + sp78.unk0 = D_800E6FEC.unk0; + sp78.unk8 = D_800E6FEC.unk8; + sp78.unkC = D_800E6FEC.unkC; + sp68.unk0 = D_800E6FFC.unk0; + sp68.unk4 = D_800E6FFC.unk4; + sp68.unkC = D_800E6FFC.unkC; + sp68.unk8 = D_800E6FFC.unk8; + sp58.unk0 = D_800E700C.unk0; + sp58.unk4 = D_800E700C.unk4; + sp58.unkC = D_800E700C.unkC; + sp58.unk8 = D_800E700C.unk8; + sp48.unk0 = D_800E701C.unk0; + sp48.unk4 = D_800E701C.unk4; + sp48.unkC = D_800E701C.unkC; + sp48.unk8 = D_800E701C.unk8; + sp38.unk0 = D_800E702C.unk0; + sp38.unk4 = D_800E702C.unk4; + sp38.unkC = D_800E702C.unkC; + sp38.unk8 = D_800E702C.unk8; + sp28.unk0 = D_800E703C.unk0; + sp28.unk4 = D_800E703C.unk4; + sp28.unkC = D_800E703C.unkC; + sp28.unk8 = D_800E703C.unk8; + sp18.unk0 = D_800E704C.unk0; + sp18.unk4 = D_800E704C.unk4; + sp18.unkC = D_800E704C.unkC; + sp18.unk8 = D_800E704C.unk8; + sp8.unk0 = D_800E705C.unk0; + sp8.unk4 = D_800E705C.unk4; + sp8.unkC = D_800E705C.unkC; + sp8.unk8 = D_800E705C.unk8; + temp_t9 = gCurrentCourseId; + switch (temp_t9) { + case 4: + temp_t0 = (arg1 * 2) + &D_80165310; + temp_v1 = (&D_80164550)[*temp_t0] + (arg0->unk220 * 8); + arg2->unk0 = temp_v1->unk0; + arg2->unk4 = temp_v1->unk2; + arg2->unk8 = temp_v1->unk4; + temp_t1 = *temp_t0; + temp_v1_2 = (((arg0->unk220 + 5) % ((&D_801645C8)[temp_t1] + 1)) * 8) + (&D_80164550)[temp_t1]; + arg3->unk0 = temp_v1_2->unk0; + arg3->unk4 = temp_v1_2->unk2; + arg3->unk8 = temp_v1_2->unk4; + return; + case 15: + temp_a0 = arg1 * 4; + arg2->unk4 = 0.0f; + arg2->unk0 = *(&spF8 + temp_a0); + arg2->unk8 = *(&spE8 + temp_a0); + arg3->unk4 = 0.0f; + arg3->unk0 = *(&spD8 + temp_a0); + phi_f10 = *(&spC8 + temp_a0); +block_8: + arg3->unk8 = phi_f10; + return; + case 16: + temp_a0_2 = arg1 * 4; + arg2->unk4 = 480.0f; + arg2->unk0 = *(&spB8 + temp_a0_2); + arg2->unk8 = *(&spA8 + temp_a0_2); + arg3->unk4 = 480.0f; + arg3->unk0 = *(&sp98 + temp_a0_2); + arg3->unk8 = *(&sp88 + temp_a0_2); + return; + case 17: + temp_a0_3 = arg1 * 4; + arg2->unk4 = 0.0f; + arg2->unk0 = (sp + temp_a0_3)->unk78; + arg2->unk8 = (sp + temp_a0_3)->unk68; + arg3->unk4 = 0.0f; + arg3->unk0 = (sp + temp_a0_3)->unk58; + arg3->unk8 = (sp + temp_a0_3)->unk48; + return; + case 19: + temp_a0_4 = arg1 * 4; + arg2->unk4 = 200.0f; + arg2->unk0 = (sp + temp_a0_4)->unk38; + arg2->unk8 = (sp + temp_a0_4)->unk28; + arg3->unk4 = 200.0f; + arg3->unk0 = (sp + temp_a0_4)->unk18; + phi_f10 = (sp + temp_a0_4)->unk8; + goto block_8; + default: + temp_v1_3 = D_80164550 + (arg0->unk220 * 8); + arg2->unk0 = temp_v1_3->unk0; + arg2->unk4 = temp_v1_3->unk2; + arg2->unk8 = temp_v1_3->unk4; + temp_v1_4 = (((arg0->unk220 + 5) % (D_801645C8 + 1)) * 8) + D_80164550; + arg3->unk0 = temp_v1_4->unk0; + arg3->unk4 = temp_v1_4->unk2; + phi_f10 = temp_v1_4->unk4; + goto block_8; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090178.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80027D00(); /* extern */ +? func_8008C354(void *, s8); /* extern */ +? func_8008E3C0(void *, s8); /* extern */ +? func_8008F86C(void *, s8); /* extern */ + +void func_80090778(void *arg0) { + s32 sp2C; + s32 sp24; + s32 temp_v0; + s32 temp_v0_2; + + temp_v0 = func_80027D00(); + sp2C = temp_v0; + arg0->unk78 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unkCA = arg0->unkCA | 8; + arg0->unkBC = arg0->unkBC & ~0x10; + arg0->unk222 = 0; + arg0->unk8C = 0.0f; + func_8008C354(arg0, temp_v0); + sp24 = unksp2F; + func_8008F86C(arg0, unksp2F); + temp_v0_2 = arg0->unkBC; + arg0->unkDB4 = 0; + arg0->unkC2 = 0; + arg0->unkDBC = 0.0f; + if ((temp_v0_2 & 0x40000000) == 0x40000000) { + if ((temp_v0_2 & 0x20000) == 0x20000) { + arg0->unkBC = temp_v0_2 & 0xFFFDFFFF; + arg0->unkA8 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unk2E = arg0->unkAE; + } + func_8008E3C0(arg0, unksp2F); + } + arg0->unkBC = arg0->unkBC & ~0x20; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090778.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s8 func_80027D00(); /* extern */ +? func_8008FF08(void *, s8); /* extern */ +static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ + +void func_80090868(void *arg0) { + s16 temp_v0; + s16 temp_v0_2; + s8 temp_a1; + void *temp_a0; + + arg0->unk78 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unk8C = 0.0f; + temp_a0 = arg0; + temp_a1 = func_80027D00(); + if ((temp_a0->unkCA & 2) != 2) { + temp_a0->unkD98 = 1; + temp_a0->unkD9C = 0.0f; + temp_a0->unkDA0 = 0.5f; + arg0 = temp_a0; + func_8008FF08(temp_a0, temp_a1); + arg0->unk222 = 0; + arg0->unkCA = arg0->unkCA | 2; + arg0->unkC8 = 0; + if ((arg0->unkDE & 1) == 1) { + temp_v0 = gCurrentCourseId; + if ((temp_v0 == 2) || (temp_v0 == 0x13)) { + arg0->unkCA = arg0->unkCA | 0x1000; + } else { + arg0->unkCA = arg0->unkCA | 0x2000; + } + temp_v0_2 = gCurrentCourseId; + if ((temp_v0_2 == 0xC) || (temp_v0_2 == 0x10) || (temp_v0_2 == 0xD)) { + arg0->unkCA = arg0->unkCA & 0xCFFF; + } + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090868.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800225CC(void *, f32, ?); /* extern */ +? func_80022634(void *, ?, ?); /* extern */ +? func_8006B8B4(void *, s8); /* extern */ +? func_8008C354(s8); /* extern */ +? func_8008F104(void *, s8); /* extern */ +? func_8008FB30(void *, s8); /* extern */ +? func_80090178(void *, s8, f32 *, ? *); /* extern */ +? func_8009E020(s8, ?); /* extern */ +? func_8009E088(s8, ?); /* extern */ +? func_800C9018(u8, ?); /* extern */ +s32 func_802B5224(f32 *, ? *); /* extern */ +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ +extern ? D_80004334; +extern void *D_80164550; +extern ? D_801652A0; +extern ? D_80165330; +extern s32 gModeSelection; + +void func_80090970(void *arg0, s8 arg1, s8 arg2) { + f32 sp44; + ? sp38; + f32 *sp28; + f32 *temp_v0_2; + f32 temp_f6; + s16 temp_v0; + s16 temp_v0_6; + s16 temp_v1; + s16 temp_v1_2; + s32 temp_at; + s32 temp_v0_5; + u16 temp_t7; + u16 temp_v0_3; + u16 temp_v0_4; + void *temp_v0_7; + f32 phi_at; + + arg0->unkC2 = 0xC; + arg0->unk78 = 0; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unk8C = 0.0f; + func_8008C354(arg1); + temp_t7 = arg0->unk222; + switch (temp_t7) { + case 0: + temp_v1 = arg0->unkCA; + if ((temp_v1 & 1) == 1) { + temp_v0 = arg0->unkC8; + if ((temp_v0 < 0x3C) || ((temp_v1 & 2) != 2)) { + arg0->unkC8 = temp_v0 + 1; + temp_at = arg0->unkC8 < 0x3C; + phi_at = (bitwise f32) temp_at; + if (temp_at == 0) { + arg0->unkC8 = 0x3C; + } + } else { + temp_v0_2 = (arg1 * 4) + &D_801652A0; + sp28 = temp_v0_2; + func_800225CC(arg0 + 0x18, *temp_v0_2 + 100.0f, 0x3C449BA6); + func_80022634(arg0 + (arg2 * 2) + 0xCC, 0, 0x3E4CCCCD); + phi_at = 40.0f; + if ((*sp28 + 40.0f) <= arg0->unk18) { + arg0->unk222 = 1; + arg0->unkC6 = 0xFF; + arg0->unkCA = arg0->unkCA | 4; + phi_at = 40.0f; + } + } + } else { + phi_at = 100.0f; + if ((temp_v1 & 2) == 2) { + func_800225CC(arg0 + 0x18, arg0->unk74 + 100.0f, 0x3CCCCCCD); + func_80022634(arg0 + (arg2 * 2) + 0xCC, 0, 0x3E4CCCCD); + phi_at = 40.0f; + if ((arg0->unk74 + 40.0f) <= arg0->unk18) { + arg0->unk222 = 1; + arg0->unkC6 = 0xFF; + arg0->unkCA = arg0->unkCA | 4; + phi_at = 40.0f; + } + } + } + if (&D_80004334 != (arg0->unkBC & &D_80004334)) { + // Error: Got lui instruction with macro other than %hi + // At instruction: lui $at, %lo(D_80004334) + } else { + func_8008FB30(arg0, arg1); + default: +block_49: + phi_at = 180.0f; + } + break; + case 1: + temp_v0_3 = arg0->unk0; + if (((temp_v0_3 & 0x4000) == 0x4000) && ((temp_v0_3 & 0x1000) == 0)) { + func_8009E088(arg1, 0xA); + } + if ((arg0->unkCA & 1) == 1) { + func_800225CC(arg0 + 0x18, *(&D_801652A0 + (arg1 * 4)) + 40.0f, 0x3CA3D70A); + arg0->unkC6 = arg0->unkC6 - 8; + if (arg0->unkC6 < 9) { + arg0->unkC6 = 0; + arg0->unk222 = 2; + arg0->unkCA = arg0->unkCA & 0xFFFE; + } + } else { + func_800225CC(arg0 + 0x18, arg0->unk24 + 40.0f, 0x3CA3D70A); + arg0->unkC6 = arg0->unkC6 - 8; + if (arg0->unkC6 < 9) { + arg0->unkC6 = 0; + arg0->unk222 = 2; + } + } + arg0->unkCA = arg0->unkCA & 0xDFFF; + goto block_49; + case 2: + func_80090178(arg0, arg1, &sp44, &sp38); + arg0->unk2E = -func_802B5224(&sp44, &sp38); + arg0->unk14 = sp44; + arg0->unk18 = sp48 + 40.0f; + arg0->unk222 = 3; + arg0->unk1C = sp4C; + goto block_49; + case 3: + *(&D_80165330 + (arg1 * 2)) = 0; + temp_v0_4 = arg0->unk0; + if (((temp_v0_4 & 0x4000) == 0x4000) && ((temp_v0_4 & 0x1000) == 0)) { + func_8009E020(arg1, 0x14); + } + func_80090178(arg0, arg1, &sp44, &sp38); + arg0->unk14 = sp44; + arg0->unk18 = sp48 + 40.0f; + arg0->unk1C = sp4C; + temp_v0_5 = arg1 * 0x1C70; + sp28 = temp_v0_5; + arg0->unk1C = (func_802B8038((temp_v0_5 - arg0->unk2E) & 0xFFFF) * -5.0f) + arg0->unk1C; + temp_f6 = func_802B8018((temp_v0_5 - arg0->unk2E) & 0xFFFF) * -5.0f; + arg0->unkC6 = arg0->unkC6 + 8; + arg0->unk14 = temp_f6 + arg0->unk14; + if (arg0->unkC6 >= 0xF0) { + arg0->unkC6 = 0xFF; + arg0->unk222 = 4; + arg0->unkCA = arg0->unkCA & 0xFFFB; + arg0->unkC8 = 0; + } + goto block_49; + case 4: + temp_v0_6 = arg0->unkC8; + if ((temp_v0_6 == 0x96) || (temp_v0_6 == 0xC8) || (temp_v0_6 == 0xFA)) { + arg0->unk1C = (func_802B8038(-arg0->unk2E & 0xFFFF) * -10.0f) + arg0->unk1C; + arg0->unk14 = (func_802B8018(-arg0->unk2E & 0xFFFF) * -10.0f) + arg0->unk14; + } + if (arg0->unkC8 == 0xFC) { + temp_v0_7 = D_80164550; + arg0->unk14 = temp_v0_7->unk0; + arg0->unk18 = temp_v0_7->unk2; + arg0->unk1C = temp_v0_7->unk4; + } + func_800225CC(arg0 + 0x18, (arg0->unk74 + arg0->unk70) - 2.0f, 0x3D23D70A); + arg0->unkC8 = arg0->unkC8 + 1; + phi_at = (bitwise f32) 8; + if ((arg0->unkBC & 8) == 8) { + // Error: %hi macro outside of lui + // At instruction: andi $t8, $v0, %hi(D_80004334) + if (MIPS2C_ERROR()) { + // Error: Got lui instruction with macro other than %hi + // At instruction: lui $at, %lo(D_80004334) + } else { + goto block_41; + } + } else { +block_41: + arg0->unkCA = arg0->unkCA & 0xEFFF; + if (arg0->unkC8 >= 0x5B) { + if ((arg0->unk0 & 0x4000) != 0) { + func_800C9018(arg1, 0x100FA28); + } + if (gModeSelection == 3) { + func_8006B8B4(arg0, arg1); + } + arg0->unkCA = arg0->unkCA & 0xFFFD; + temp_v1_2 = arg0->unkCA; + arg0->unkDE = arg0->unkDE & 0xFFFB; + if ((temp_v1_2 & 0x80) != 0x80) { + arg0->unkCA = temp_v1_2 & 0xFFF7; + if ((arg0->unk214 * 0.9) <= arg0->unk9C) { + func_8008F104(arg0, arg1); + } + } + } + goto block_49; + } + break; + } + arg0->unkDA0 = arg0->unkDA0 + 8.0f; + if (phi_at <= arg0->unkDA0) { + arg0->unkDA0 = phi_at; + } + if (arg0->unkD98 == 1) { + arg0->unkD9C = arg0->unkD9C + arg0->unkDA0; + if (arg0->unkD9C >= 1820.0f) { + arg0->unkDA0 = 0.0f; + arg0->unkD98 = arg0->unkD98 * -1; + } + } + if (arg0->unkD98 == -1) { + arg0->unkD9C = arg0->unkD9C - arg0->unkDA0; + if (arg0->unkD9C <= -1820.0f) { + arg0->unkDA0 = 0.0f; + arg0->unkD98 = arg0->unkD98 * -1; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80090970.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800910E4(void *arg0) { + s16 temp_t1; + s16 temp_v1; + u16 temp_v1_2; + s32 phi_v0; + s32 phi_v0_2; + + temp_v1 = arg0->unkCA; + phi_v0 = 0; + phi_v0_2 = 0; + if (((temp_v1 & 2) == 2) || ((temp_v1 & 8) == 8) || (temp_v1_2 = arg0->unk0, ((temp_v1_2 & 0x40) != 0)) || ((temp_v1_2 & 0x800) != 0) || ((temp_v1_2 & 0x8000) == 0)) { + return 1; + } + temp_t1 = arg0->unk10; + switch (temp_t1) { + case 12: + case 13: + case 14: + case 15: + if ((arg0->unkBC & 8) != 0) { + return 1; + } + phi_v0 = 0x5F934EC4; + default: +block_13: + if ((arg0->unkBC & phi_v0) != 0) { + return 1; + } + return 0; + case 10: + phi_v0_2 = 0xDF934EC4; + /* fallthrough */ + case 11: + phi_v0 = phi_v0_2 | 0xDF934EC4; + goto block_13; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800910E4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_8018D920; + +void func_800911B4(void *arg0, s8 arg1) { + s32 temp_v0; + void *temp_v1; + void *phi_v1; + s32 phi_v0; + + arg0->unk44 = arg0->unk44 | 0x1800; + arg0->unkAE = arg0->unk2E; + arg0->unk44 = arg0->unk44 & 0xFBFF; + arg0->unk44 = arg0->unk44 | 0x2000; + arg0->unkF4 = 0.0f; + arg0->unkF0 = 0.002f; + arg0->unkB2 = 2; + arg0->unkC0 = 0; + arg0->unk7C = 0; + arg0->unk78 = 0; + arg0->unkEC = 2.6f; + *(&D_8018D920 + (arg1 * 2)) = 0; + arg0->unkB22 = 0; + arg0->unkB2E = 0; + arg0->unkB2C = 0; + arg0->unkADA = 0; + arg0->unkAE6 = 0; + arg0->unkAE4 = 0; + phi_v1 = arg0 + 0x90; + phi_v0 = 2; + do { + temp_v0 = phi_v0 + 4; + phi_v1->unkB2C = 0; + phi_v1->unkB2E = 0; + phi_v1->unkB22 = 0; + phi_v1->unkB74 = 0; + phi_v1->unkB76 = 0; + phi_v1->unkB6A = 0; + phi_v1->unkBBC = 0; + phi_v1->unkBBE = 0; + phi_v1->unkBB2 = 0; + temp_v1 = phi_v1 + 0x120; + temp_v1->unk9C4 = 0; + temp_v1->unk9C6 = 0; + temp_v1->unk9BA = 0; + phi_v1 = temp_v1; + phi_v0 = temp_v0; + } while (temp_v0 != 0xA); +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800911B4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern s8 D_801658BC; +extern ? D_8018D920; +extern ? gKartGravityTable; +static ? D_800E706C; /* unable to generate initializer; const */ + +void func_80091298(void *arg0, s8 arg1) { + ? spC; + f32 temp_f0; + f32 temp_f2; + s16 *temp_a2; + s16 temp_t9; + s32 temp_t8; + s16 phi_v1; + + spC.unk0 = D_800E706C.unk0; + spC.unk4 = D_800E706C.unk4; + spC.unk8 = D_800E706C.unk8; + arg0->unk44 = arg0->unk44 | 0x2000; + if (arg0->unkB2 == 0) { + phi_v1 = 0; + } else { + temp_a2 = (arg1 * 2) + &D_8018D920; + arg0->unk2E = arg0->unk2E - 0xE38; + temp_t9 = *temp_a2 - 0xE38; + temp_t8 = (temp_t9 & 0xFFFF) / 3640; + *temp_a2 = temp_t9; + phi_v1 = temp_t8; + } + if (((phi_v1 == 9) && (arg0->unkB2 == 1)) || ((phi_v1 == 0) && (arg0->unkB2 == 2)) || (arg0->unkB2 == 0)) { + arg0->unkB2 = arg0->unkB2 - 1; + if (arg0->unkB2 <= 0) { + arg0->unkB2 = 0; + } + if (arg0->unkB2 == 0) { + temp_f2 = arg0->unk70; + temp_f0 = *(&spC + (arg1 * 4)); + if ((arg0->unk18 - (temp_f2 + 1.0f)) <= temp_f0) { + arg0->unkDCC = 0; + arg0->unkA8 = 0; + arg0->unk18 = (temp_f0 + temp_f2) + 1.08; + arg0->unk7C = 0; + arg0->unkC0 = 0; + arg0->unk44 = arg0->unk44 & 0xF7FF; + arg0->unkDC0 = 3.0f; + arg0->unkD4 = 0; + arg0->unk100 = *(&gKartGravityTable + (arg0->unk254 * 4)); + arg0->unk0 = arg0->unk0 | 0x2000; + arg0->unk94 = 0.0f; + arg0->unk8C = 0.0f; + arg0->unk9C = 0.0f; + if (arg1 == 0) { + D_801658BC = 1; + } + } + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80091298.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? gPlayers; + +void func_80091440(s8 arg0) { + s16 temp_v1; + void *temp_v0; + + temp_v0 = (arg0 * 0xDD8) + &gPlayers; + temp_v1 = temp_v0->unk44; + if ((temp_v1 & 0x800) == 0) { + temp_v0->unk44 = temp_v1 | 0x2400; + temp_v0->unk0 = temp_v0->unk0 & 0xDFFF; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_80091440.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern void *D_800DC4FC; +extern s16 D_80152308; +extern u16 D_8015F6F8; + +void func_800914A0(void) { + s16 temp_t8; + s32 temp_v1; + u16 temp_v0; + + temp_t8 = D_800DC4FC->unk6 + 7; + D_80152308 = temp_t8; + temp_v0 = D_8015F6F8; + temp_v1 = temp_t8 & 0xFFFF; + if (temp_v0 < temp_v1) { + D_80152308 = temp_v1 - temp_v0; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800914A0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_800914A0(s16, s32, s16); /* extern */ +? func_802ADDC8(void *, ?, f32, f32, f32); /* extern */ +s16 func_802B7830(f32, f32); /* extern */ +f32 sqrtf(f32, f32); /* extern */ +extern void *D_800DC4FC; +extern u16 D_80152308; +extern s16 D_8015F6F8; +extern u32 D_8015F718; +extern ? cameras; +extern ? gSegmentTable; +static ? D_800E7080; /* unable to generate initializer; const */ +static ? D_800E708C; /* unable to generate initializer; const */ + +void func_800914E0(void) { + ? sp64; + ? sp58; + s32 sp48; + f32 sp38; + f32 sp34; + f32 sp30; + f32 temp_f12; + f32 temp_f14; + f32 temp_f16; + f32 temp_f4; + f32 temp_f8; + s16 temp_a0; + s16 temp_a0_2; + s16 temp_a3; + s16 temp_v0_2; + u16 temp_t0; + u32 temp_v0; + void *temp_v0_3; + u16 phi_t0; + void **phi_t1; + + sp64.unk0 = D_800E7080.unk0; + sp64.unk4 = D_800E7080.unk4; + sp64.unk8 = D_800E7080.unk8; + sp58.unk0 = D_800E708C.unk0; + sp58.unk4 = D_800E708C.unk4; + sp58.unk8 = D_800E708C.unk8; + temp_v0 = D_8015F718; + temp_a0 = temp_v0 & 0xFFFFFF; + sp48 = *(&gSegmentTable + ((temp_v0 >> 0x18) * 4)) + temp_a0 + 0x80000000; + temp_t0 = D_80152308; + temp_a3 = D_800DC4FC->unk6; + temp_v0_2 = temp_a3 - temp_t0; + cameras.unk18 = 0.0f; + cameras.unk20 = 0.0f; + cameras.unk1C = 1.0f; + phi_t0 = temp_t0; + phi_t1 = &D_800DC4FC; + if (temp_v0_2 == 7) { + func_800914A0(temp_a0, 7, temp_a3); + phi_t0 = D_80152308; + goto block_5; + } + if (temp_v0_2 < 0xE) { + temp_a0_2 = temp_v0_2 + D_8015F6F8; + if (temp_a0_2 == 7) { + func_800914A0(temp_a0_2, 7, temp_a3); + phi_t0 = D_80152308; +block_5: + phi_t1 = &D_800DC4FC; + } + } + temp_v0_3 = (phi_t0 * 8) + sp48; + temp_f8 = temp_v0_3->unk0 + 0xA; + cameras.unk0 = temp_f8; + temp_f16 = temp_v0_3->unk2 + 7; + *(&cameras + 4) = temp_f16; + temp_f4 = temp_v0_3->unk4 - 0x14; + *(&cameras + 8) = temp_f4; + *(&cameras + 0xC) = (*phi_t1)->unk14; + *(&cameras + 0x10) = (*phi_t1)->unk18; + *(&cameras + 0x14) = (*phi_t1)->unk1C; + func_802ADDC8(&cameras + 0x54, 0x41A00000, temp_f8, temp_f16, temp_f4); + temp_f12 = *(&cameras + 0xC) - cameras.unk0; + sp38 = temp_f12; + temp_f14 = *(&cameras + 0x14) - *(&cameras + 8); + sp34 = *(&cameras + 0x10) - *(&cameras + 4); + sp30 = temp_f14; + *(&cameras + 0x26) = func_802B7830(temp_f12, temp_f14); + *(&cameras + 0x24) = func_802B7830(sqrtf((sp38 * sp38) + (temp_f14 * temp_f14), temp_f14), sp34); + *(&cameras + 0x28) = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800914E0.s") +#endif diff --git a/src/code_80091750.c b/src/code_80091750.c index 6c60e2a6c..99de82a9b 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -714,15 +714,120 @@ void func_8009265C(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80092688: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E650(?, ?, ?, ?); /* extern */ -Unable to determine jump table for jr instruction at func_80092688.s line 12. +void func_80092688(void) { + u16 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = D_800DC5E4; + switch (temp_t6) { + case 0: + func_8009E650(0x1CE, 0, 0, 2); + return; + default: + func_8009E650(0x190, 0, 0, 2); + func_8009E650(0x191, 0, 0, 2); + return; + case 2: + func_8009E650(0x192, 0, 0, 2); + func_8009E650(0x193, 0, 0, 2); + return; + case 3: + func_8009E650(0x194, 0, 0, 2); + func_8009E650(0x195, 0, 0, 2); + return; + case 4: + func_8009E650(0x196, 0, 0, 2); + func_8009E650(0x197, 0, 0, 2); + return; + case 5: + func_8009E650(0x198, 0, 0, 2); + func_8009E650(0x199, 0, 0, 2); + func_8009E650(0x19A, 0, 0, 2); + func_8009E650(0x19B, 0, 0, 2); + return; + case 6: + func_8009E650(0x198, 0, 0, 2); + func_8009E650(0x19C, 0, 0, 2); + func_8009E650(0x19D, 0, 0, 2); + func_8009E650(0x19E, 0, 0, 2); + return; + case 7: + func_8009E650(0x19F, 0, 0, 2); + func_8009E650(0x1A0, 0, 0, 2); + func_8009E650(0x1A1, 0, 0, 2); + func_8009E650(0x1A2, 0, 0, 2); + return; + case 8: + func_8009E650(0x1A3, 0, 0, 2); + func_8009E650(0x1A4, 0, 0, 2); + return; + case 9: + func_8009E650(0x1A5, 0, 0, 2); + func_8009E650(0x1A6, 0, 0, 2); + func_8009E650(0x1A7, 0, 0, 2); + func_8009E650(0x1A8, 0, 0, 2); + func_8009E650(0x1A9, 0, 0, 2); + return; + case 10: + func_8009E650(0x1A5, 0, 0, 2); + func_8009E650(0x1A6, 0, 0, 2); + func_8009E650(0x1AA, 0, 0, 2); + func_8009E650(0x1AB, 0, 0, 2); + func_8009E650(0x1AC, 0, 0, 2); + return; + case 11: + func_8009E650(0x1AD, 0, 0, 2); + func_8009E650(0x1AE, 0, 0, 2); + func_8009E650(0x1AF, 0, 0, 2); + func_8009E650(0x1B0, 0, 0, 2); + return; + case 12: + func_8009E650(0x1B1, 0, 0, 2); + func_8009E650(0x1B2, 0, 0, 2); + return; + case 13: + func_8009E650(0x1B3, 0, 0, 2); + func_8009E650(0x1B4, 0, 0, 2); + func_8009E650(0x1B5, 0, 0, 2); + return; + case 14: + func_8009E650(0x1B6, 0, 0, 2); + func_8009E650(0x1B7, 0, 0, 2); + func_8009E650(0x1B8, 0, 0, 2); + func_8009E650(0x1B9, 0, 0, 2); + func_8009E650(0x1BA, 0, 0, 2); + func_8009E650(0x1BB, 0, 0, 2); + func_8009E650(0x1BC, 0, 0, 2); + return; + case 15: + func_8009E650(0x1BD, 0, 0, 2); + func_8009E650(0x1BE, 0, 0, 2); + func_8009E650(0x1BF, 0, 0, 2); + func_8009E650(0x1C0, 0, 0, 2); + return; + case 16: + func_8009E650(0x1C1, 0, 0, 2); + func_8009E650(0x1C2, 0, 0, 2); + func_8009E650(0x1C3, 0, 0, 2); + return; + case 17: + func_8009E650(0x1C4, 0, 0, 2); + func_8009E650(0x1C5, 0, 0, 2); + func_8009E650(0x1C6, 0, 0, 2); + func_8009E650(0x1C7, 0, 0, 2); + func_8009E650(0x1C8, 0, 0, 2); + func_8009E650(0x1C9, 0, 0, 2); + func_8009E650(0x1CA, 0, 0, 2); + func_8009E650(0x1CB, 0, 0, 2); + func_8009E650(0x1CC, 0, 0, 2); + return; + case 18: + func_8009E650(0x1CD, 0, 0, 2); + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80092688.s") #endif @@ -734,15 +839,77 @@ void func_80092C80(void) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80092C90: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80092C90(s8 *arg0) { + s8 temp_v0; + s32 phi_v1; -Unable to determine jump table for jr instruction at func_80092C90.s line 73. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = *arg0; + phi_v1 = 1; + if ((temp_v0 >= 0x61) && (temp_v0 < 0x7B)) { + phi_v1 = temp_v0 - 0x61; + } else if ((temp_v0 >= 0x41) && (temp_v0 < 0x5B)) { + phi_v1 = temp_v0 - 0x41; + } else if ((temp_v0 >= 0x30) && (temp_v0 < 0x3A)) { + phi_v1 = temp_v0 - 0x10; + } else if (temp_v0 == 0x20) { + phi_v1 = -1; + } else if (temp_v0 < 0) { + switch (temp_v0) { /* switch 1 */ + case -92: /* switch 1 */ + phi_v1 = func_80092E1C(arg0 + 1, arg0); + break; + case -91: /* switch 1 */ + phi_v1 = func_80092DF8(arg0 + 1, arg0); + break; + case -95: /* switch 1 */ + case -93: /* switch 1 */ + case -85: /* switch 1 */ + phi_v1 = func_80092EE4(arg0, arg0); + break; + } + } else { + switch (temp_v0) { /* switch 2 */ + case 0x21: /* switch 2 */ + phi_v1 = 0x1A; + break; + case 0x2D: /* switch 2 */ + phi_v1 = 0x1B; + break; + case 0x3F: /* switch 2 */ + phi_v1 = 0x1C; + break; + case 0x27: /* switch 2 */ + phi_v1 = 0x1D; + break; + case 0x24: /* switch 2 */ + phi_v1 = 0x1E; + break; + case 0x2E: /* switch 2 */ + phi_v1 = 0x1F; + break; + case 0x22: /* switch 2 */ + phi_v1 = 0x2A; + break; + case 0x2A: /* switch 2 */ + phi_v1 = 0x2B; + break; + case 0x2B: /* switch 2 */ + phi_v1 = 0x2C; + break; + case 0x28: /* switch 2 */ + phi_v1 = 0x2D; + break; + case 0x2C: /* switch 2 */ + phi_v1 = 0x2E; + break; + default: /* switch 2 */ + phi_v1 = -2; + break; + } + } + return phi_v1; +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80092C90.s") #endif @@ -781,15 +948,84 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80092E1C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80092EE4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80092EE4(void *arg0) { + s32 temp_t6; + s8 temp_a1; + s32 phi_v1; -Unable to determine jump table for jr instruction at func_80092EE4.s line 26. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_a1 = arg0->unk0; + temp_t6 = (arg0->unk1 + 0x80) & 0xFF; + phi_v1 = 2; + if (temp_a1 != -0x5F) { + if (temp_a1 != -0x5D) { + if (temp_a1 != -0x55) { + return 2; + } + if (temp_t6 == 0x2E) { + phi_v1 = 0xE0; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return phi_v1; + } + if ((temp_t6 >= 0x30) && (temp_t6 < 0x3A)) { + return temp_t6 + 0xA5; + } + switch (temp_t6) { /* switch 2 */ + case 0x44: /* switch 2 */ + return 0xDF; + case 0x43: /* switch 2 */ + case 0x63: /* switch 2 */ + return 0xE0; + case 0x4E: /* switch 2 */ + case 0x6E: /* switch 2 */ + return 0xE1; + case 0x50: /* switch 2 */ + case 0x70: /* switch 2 */ + return 0xE2; + case 0x52: /* switch 2 */ + case 0x72: /* switch 2 */ + return 0xE3; + case 0x73: /* switch 2 */ + return 0xE4; + case 0x54: /* switch 2 */ + case 0x74: /* switch 2 */ + return 0xE5; + case 0x53: /* switch 2 */ + return 0xE6; + case 0x56: /* switch 2 */ + case 0x76: /* switch 2 */ + return 0xE7; + } + } else { + switch (temp_t6) { /* switch 1 */ + case 0x22: /* switch 1 */ + case 0x24: /* switch 1 */ + return 0xEA; + case 0x23: /* switch 1 */ + return 0xE9; + case 0x25: /* switch 1 */ + return 0xD0; + case 0x2A: /* switch 1 */ + return 0xE8; + case 0x30: /* switch 1 */ + return 0xEB; + case 0x47: /* switch 1 */ + return 0xD1; + case 0x49: /* switch 1 */ + return 0xD2; + case 0x5C: /* switch 1 */ + return 0xD3; + case 0x3C: /* switch 1 */ + case 0x3D: /* switch 1 */ + case 0x5D: /* switch 1 */ + return 0xD4; + default: /* switch 1 */ + default: /* switch 2 */ + return phi_v1; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80092EE4.s") #endif @@ -1209,15 +1445,48 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80093A30.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80093A5C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80093C1C(s8, u32); /* extern */ +? func_800940EC(s8, u32); /* extern */ +? func_8009C918(u32); /* extern */ +static ? D_800F0B1C; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_80093A5C.s line 21. +void func_80093A5C(u32 arg0) { + Gfx *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (D_8015F788 == 0) { + func_8009C918(arg0); + } + switch (arg0) { + case 0: + func_800940EC(*(&D_800F0B1C + arg0), arg0); + break; + case 1: + case 2: + case 3: + case 4: + if (D_8015F788 == 0) { + func_80093C1C(*(&D_800F0B1C + arg0), arg0); + } else { + func_800940EC(*(&D_800F0B1C + arg0), arg0); + } + break; + case 8: + case 9: + case 10: + case 11: + if (D_8015F788 == 3) { + func_800940EC(*(&D_800F0B1C + arg0), arg0); + } else { + func_80093C1C(*(&D_800F0B1C + arg0), arg0); + } + break; + } + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->words.w0 = 0xB900031D; + temp_v1->words.w1 = 0xF0A4000; +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80093A5C.s") #endif @@ -1762,43 +2031,373 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800947B4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80094A64: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80092290(?, ? *, ? *); /* extern */ +? func_80093E40(); /* extern */ +? func_80094C60(); /* extern */ +? func_80095574(); /* extern */ +? func_80099A70(); /* extern */ +? func_80099AEC(); /* extern */ +? func_8009C918(); /* extern */ +? func_8009CA2C(); /* extern */ +? func_800A8230(); /* extern */ +? guOrtho(s32, f32, ?, ?, f32, f32, f32, f32); /* extern */ +extern ? D_8018E850; +extern ? D_8018E854; +extern ? D_8018E858; +extern ? D_8018E85C; +extern ? D_802B8880; +static ? D_02007650; /* unable to generate initializer */ +static ? D_020076B0; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80094A64.s line 91. +void func_80094A64(s32 arg0) { + Gfx *temp_v0; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + s32 temp_t1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_8018D120 = 0; + D_80164AF0 = 0; + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = &D_802B8880 & 0x1FFFFFFF; + temp_v0->words.w0 = 0x3800010; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0xED000000; + temp_v0_2->words.w1 = 0x5003C0; + guOrtho(arg0, 0.0f, 0x439F8000, 0x436F0000, 0.0f, -100.0f, 100.0f, 1.0f); + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w0 = 0x1030040; + temp_v0_3->words.w1 = arg0; + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w1 = &D_02007650; + temp_v0_4->words.w0 = 0x6000000; + func_80094C60(); + func_80092290(4, &D_8018E850, &D_8018E858); + func_80092290(5, &D_8018E854, &D_8018E85C); + func_80099A70(); + func_8009C918(); + temp_t1 = D_800E86A0; + switch (temp_t1) { + case 10: + func_80095574(); + func_80093E40(); + break; + case 5: + case 6: + case 7: + case 8: + case 9: + case 11: + case 12: + case 13: + func_800A8230(); + func_80099AEC(); + break; + } + func_8009CA2C(); + temp_v0_5 = gDisplayListHead; + D_8018E7A8 += 1; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = 0; + temp_v0_5->words.w0 = 0xE7000000; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w0 = 0x6000000; + temp_v0_6->words.w1 = &D_020076B0; +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80094A64.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80094C60: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80092258(); /* extern */ +? func_80099110(); /* extern */ +? func_8009A344(); /* extern */ +? func_8009B938(); /* extern */ +? func_8009DF4C(?); /* extern */ +? func_8009DF6C(?); /* extern */ +? func_8009E620(); /* extern */ +? func_8009E650(?, ?, ?, ?); /* extern */ +? func_800B3F74(u32); /* extern */ +? func_800B5F30(); /* extern */ +? func_800B6014(); /* extern */ -Unable to determine jump table for jr instruction at func_80094C60.s line 33. +void func_80094C60(void) { + s32 temp_v0; + u32 temp_t7; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (D_800E86A4 != 0) { + func_80099110(); + func_8009A344(); + func_8009E620(); + func_8009B938(); + func_80092258(); + func_800B5F30(); + func_800B6014(); + func_800B3F74(D_800E86A0); + temp_t7 = D_800E86A0; + switch (temp_t7) { + case 5: + func_8009E650(0x23, 0, 0, 2); + func_8009E650(0xF1, 0, 0, 4); + func_8009E650(0xF0, 0, 0, 2); + break; + case 6: + func_8009E650(0x23, 0, 0, 2); + func_8009E650(0x8C, 0, 0, 6); + func_8009E650(0x7C, 0, 0, 6); + func_8009E650(0x7D, 0, 0, 6); + func_8009E650(0x7E, 0, 0, 6); + func_8009E650(0x7F, 0, 0, 6); + func_8009E650(0x80, 0, 0, 6); + func_8009E650(0x81, 0, 0, 6); + func_8009E650(0x82, 0, 0, 6); + func_8009E650(0x83, 0, 0, 6); + func_8009E650(0x84, 0, 0, 6); + func_8009E650(0x85, 0, 0, 6); + func_8009E650(0x86, 0, 0, 6); + func_8009E650(0x87, 0, 0, 6); + func_8009E650(0x88, 0, 0, 6); + func_8009E650(0x89, 0, 0, 6); + func_8009E650(0x8A, 0, 0, 6); + func_8009E650(0x8B, 0, 0, 6); + func_8009E650(0x8D, 0, 0, 8); + break; + case 7: + func_8009E650(0xE6, 0, 0, 8); + func_8009E650(0xE7, 0, 0, 8); + func_8009E650(0xE8, 0, 0, 8); + func_8009E650(0xE9, 0, 0, 8); + func_8009E650(0xEA, 0, 0, 8); + break; + case 8: + func_8009E650(0xFA, 0, 0, 0); + break; + case 9: + func_8009E650(0xDA, 0, 0, 0); + func_8009E650(0xD2, 0, 0, 4); + func_8009E650(0xD4, 0, 0, 6); + func_8009E650(0xD3, 0, 0, 8); + func_8009E650(0xD5, 0, 0, 0xA); + func_8009E650(0xD6, 0, 0, 0xA); + func_8009E650(0xD7, 0, 0, 0xA); + func_8009E650(0xD8, 0, 0, 0xA); + func_8009E650(0xD9, 0, 0, 0xA); + break; + case 10: + func_8009E650(2, 0, 0, 4); + func_8009E650(1, 0, 0, 0); + func_8009E650(0xFB, 0, 0, 0); + if ((gControllerBits & 1) != 0) { + func_8009E650(3, 0, 0, 2); + } else { + func_8009E650(4, 0, 0, 2); + } + func_8009E650(5, 0, 0, 6); + D_800DC51C = 0; + D_8018EE08 = 0; + break; + case 11: + func_8009E650(0x23, 0, 0, 2); + func_8009E650(0xA, 0x15E, 0x11, 6); + func_8009E650(0xE, 0x15E, 0x3E, 6); + func_8009E650(0xD, 0x15E, 0x3E, 6); + func_8009E650(0xC, 0x15E, 0x3E, 6); + func_8009E650(0xB, 0x15E, 0x3E, 6); + func_8009E650(0xF, 0x15E, 0xC8, 6); + func_8009E650(0x11, 0x15E, 0xC8, 6); + func_8009E650(0x10, 0x15E, 0xC8, 6); + if (func_800B555C() != 0) { + func_8009E650(0x15, 0, 0, 6); + } + func_8009E650(0x14, 0, 0, 6); + func_8009E650(0x13, 0, 0, 6); + func_8009E650(0x12, 0, 0, 6); + func_8009E650(0x19, 0, 0, 6); + func_8009E650(0x18, 0, 0, 6); + func_8009E650(0x1B, 0, 0, 0xC); + break; + case 12: + func_8009E650(0x24, 0, 0, 2); + func_8009E650(0x2A, 0, 0, 6); + func_8009E650(0x33, 0, 0, 6); + func_8009E650(0x2B, 0, 0, 8); + func_8009E650(0x2C, 0, 0, 8); + func_8009E650(0x2D, 0, 0, 6); + func_8009E650(0x2E, 0, 0, 6); + func_8009E650(0x2F, 0, 0, 6); + func_8009E650(0x30, 0, 0, 6); + func_8009E650(0x31, 0, 0, 6); + func_8009E650(0x32, 0, 0, 8); + func_8009E650(0x34, 0, 0, 0xC); + func_8009E650(0x35, 0, 0, 0xC); + func_8009E650(0x36, 0, 0, 0xC); + func_8009E650(0x37, 0, 0, 0xC); + break; + case 13: + func_8009E650(0x25, 0, 0, 2); + func_8009E650(0x52, 0, 0, 6); + if (gModeSelection != 3) { + func_8009E650(0x53, 0, 0, 4); + func_8009E650(0x54, 0, 0, 4); + func_8009E650(0x55, 0, 0, 4); + func_8009E650(0x56, 0, 0, 4); + func_8009E650(0x58, 0, 0, 6); + func_8009E650(0x59, 0, 0, 6); + func_8009E650(0x5A, 0, 0, 6); + func_8009E650(0x5B, 0, 0, 6); + } else { + func_8009E650(0x5C, 0, 0, 6); + func_8009E650(0x6E, 0, 0, 6); + } + func_8009E650(0x64, 0, 0, 6); + func_8009E650(0x5F, 0, 0, 6); + func_8009E650(0x60, 0, 0, 6); + func_8009E650(0x61, 0, 0, 6); + func_8009E650(0x62, 0, 0, 6); + func_8009E650(0x5D, 0, 0, 6); + func_8009E650(0x5E, 0, 0, 8); + temp_v0 = gModeSelection; + phi_v0 = temp_v0; + if (temp_v0 == 1) { + func_8009E650(0x65, 0, 0, 8); + func_8009E650(0x66, 0, 0, 8); + func_8009E650(0x69, 0, 0, 8); + phi_v0 = gModeSelection; + } + if (phi_v0 == 0) { + func_8009E650(0x68, 0, 0, 8); + func_8009E650(0x67, 0, 0, 5); + } + break; + } + if (D_800E86A4 != 2) { + func_8009DF4C(0x14); + } else { + func_8009DF6C(0x14); + } + D_800E86A4 = 0; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80094C60.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80095574: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? debug_print_str2(s32, ?, ? *, s16); /* extern */ +? func_80057778(); /* extern */ +? func_8009E230(); /* extern */ +? func_800A8230(); /* extern */ +? func_800CA0A0(); /* extern */ +? load_debug_font(); /* extern */ +? play_sound2(?); /* extern */ +? print_str_num(?, ?, ? *, s16); /* extern */ +static ? D_020076E0; /* unable to generate initializer */ +static ? D_800E7614; /* unable to generate initializer; const */ +static ? D_800E7688; /* unable to generate initializer; const */ +static ? D_800E76EC; /* unable to generate initializer; const */ +static ? D_800E7700; /* unable to generate initializer; const */ +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80095574.s line 37. +void func_80095574(void) { + Gfx *temp_v1; + s16 temp_a3; + s16 temp_a3_2; + s32 temp_v0_2; + s8 temp_t8; + s8 temp_v0; + s32 phi_v0; + s8 phi_v0_2; + s32 phi_v0_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if ((D_8018EE0C < 3) || (D_8018E7B0 != 0)) { + func_800A8230(); + } + temp_v0 = D_8018EDEF; + phi_v0_2 = temp_v0; + if (temp_v0 >= 2) { + load_debug_font(); + debug_print_str2(0x50, 0x64, "debug_mode"); + temp_t8 = D_8018EDEF; + switch (temp_t8) { + case 2: + debug_print_str2(0x46, 0x64, "*"); + break; + case 3: + debug_print_str2(0x46, 0x6E, "*"); + break; + case 4: + debug_print_str2(0x46, 0x78, "*"); + break; + case 5: + debug_print_str2(0x46, 0x82, "*"); + break; + case 6: + debug_print_str2(0x46, 0x8C, "*"); + break; + case 7: + debug_print_str2(0x46, 0x96, "*"); + break; + } + if (gEnableDebugMode != 0) { + debug_print_str2(0xAA, 0x64, "on"); + } else { + debug_print_str2(0xAA, 0x64, "off"); + } + temp_a3 = gCurrentCourseId; + if ((temp_a3 >= 0x14) || (temp_a3 < 0)) { + gCurrentCourseId = 0; + } + print_str_num(0x50, 0x6E, "map_number", gCurrentCourseId); + temp_a3_2 = gCurrentCourseId; + if (temp_a3_2 < 0xA) { + phi_v0 = 0; + } else { + phi_v0 = 8; + } + debug_print_str2(phi_v0 + 0xB9, 0x6E, *(&D_800E7614 + (temp_a3_2 * 4)), temp_a3_2); + debug_print_str2(0x50, 0x78, "screen_mode"); + debug_print_str2(0xAA, 0x78, *(&D_800E76EC + (D_8018EDF1 * 4))); + debug_print_str2(0x50, 0x82, "player"); + debug_print_str2(0xAA, 0x82, *(&D_800E7688 + (D_800E86A8 * 4))); + debug_print_str2(0x50, 0x8C, "sound mode"); + debug_print_str2(0xAA, 0x8C, *(&D_800E7700 + (D_8018EDF2 * 4))); + if (D_8018EDEF == 7) { + debug_print_str2(0x50, 0x96, "push b to get all goldcup"); + } + func_80057778(); + phi_v0_2 = D_8018EDEF; + } + if (phi_v0_2 == 1) { + D_8018EE00 += 1; + } else { + D_8018EE00 = 3; + } + temp_v0_2 = D_8018EE00; + phi_v0_3 = temp_v0_2; + if (temp_v0_2 == 2) { + play_sound2(0x49009009); + phi_v0_3 = D_8018EE00; + } + if (phi_v0_3 >= 0x12D) { + func_8009E230(); + func_800CA0A0(); + } + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->words.w0 = 0x6000000; + temp_v1->words.w1 = &D_020076E0; +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80095574.s") #endif @@ -5176,15 +5775,94 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009B9D0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8009BA74: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void *func_80095E10(void *, s8, ?, ?, s32, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ +void *func_800987D0(void *, ?, ?, u16, s32, s32, s32, s32, s32, s32); /* extern */ +void *segmented_to_virtual(s32); /* extern */ +static ? D_02007708; /* unable to generate initializer */ +static ? D_02007728; /* unable to generate initializer */ +static ? D_02007748; /* unable to generate initializer */ +static ? D_02007768; /* unable to generate initializer */ +static ? D_02007788; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8009BA74.s line 36. +void *func_8009BA74(void *arg0, s32 arg1, s32 arg2, s32 arg3) { + s32 temp_v0_2; + u16 temp_s1; + u16 temp_s1_2; + u16 temp_t7; + u16 temp_v0_3; + u16 temp_v0_4; + void *temp_v0; + void *phi_s2; + void *phi_s0; + void *phi_s0_2; + s8 phi_s4; + void *phi_s0_3; + void *phi_s0_4; + void *phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = segmented_to_virtual(arg1); + phi_s2 = temp_v0; + phi_s0 = arg0; + phi_s0_3 = arg0; + if (temp_v0->unk4 != 0) { + do { + temp_t7 = phi_s2->unk0; + phi_s4 = 0; + switch (temp_t7) { + case 0: + phi_s0->unk0 = 0x6000000; + phi_s0->unk4 = &D_02007708; + phi_s0_2 = phi_s0 + 8; + break; + case 1: + phi_s0->unk0 = 0x6000000; + phi_s0->unk4 = &D_02007728; + phi_s0_2 = phi_s0 + 8; + break; + case 2: + phi_s0->unk4 = &D_02007748; + phi_s0->unk0 = 0x6000000; + phi_s0_2 = phi_s0 + 8; + break; + case 3: + phi_s0->unk4 = &D_02007768; + phi_s0->unk0 = 0x6000000; + phi_s0_2 = phi_s0 + 8; + phi_s4 = 3; + break; + case 4: + phi_s0->unk4 = &D_02007788; + phi_s0->unk0 = 0x6000000; + phi_s0_2 = phi_s0 + 8; + break; + default: + phi_s0->unk0 = 0x6000000; + phi_s0->unk4 = &D_02007728; + phi_s0_2 = phi_s0 + 8; + break; + } + temp_v0_2 = func_8009B8C4(phi_s2->unk4); + phi_s0_4 = phi_s0_2; + if (temp_v0_2 != 0) { + if (D_8018E7B0 != 4) { + temp_s1 = phi_s2->unk8; + temp_v0_3 = phi_s2->unkA; + phi_v0 = func_80095E10(phi_s0_2, phi_s4, 0x400, 0x400, 0, 0, temp_s1, temp_v0_3, phi_s2->unkC + arg2, phi_s2->unkE + arg3, temp_v0_2, temp_s1, temp_v0_3); + } else { + temp_v0_4 = phi_s2->unkA; + temp_s1_2 = phi_s2->unk8; + phi_v0 = func_800987D0(phi_s0_2, 0, 0, temp_s1_2, temp_v0_4, phi_s2->unkC + arg2, phi_s2->unkE + arg3, temp_v0_2, temp_s1_2, temp_v0_4); + } + phi_s0_4 = phi_v0; + } + phi_s2 += 0x14; + phi_s0 = phi_s0_4; + phi_s0_3 = phi_s0_4; + } while (phi_s2->unk18 != 0); + } + return phi_s0_3; +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009BA74.s") #endif @@ -5771,15 +6449,61 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009CA2C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8009CA6C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009CDDC(s32, ?, s32); /* extern */ +? func_8009CDFC(s32, ?, s32); /* extern */ +? func_8009D958(s32, ?, s32); /* extern */ +? func_8009D978(s32, ?, s32); /* extern */ +? func_8009D998(s32, ?, s32); /* extern */ +? func_8009DAA8(Gfx **, ?, s32); /* extern */ +? func_8009DB8C(Gfx **, ?, s32); /* extern */ +s32 func_800AAF30(?); /* extern */ +extern ? D_0D0076F8; +extern ? D_8018E7AC; -Unable to determine jump table for jr instruction at func_8009CA6C.s line 66. +void func_8009CA6C(s32 arg0) { + Gfx *temp_v1; + u8 temp_t0; + ? phi_a1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if ((arg0 == 4) || ((arg0 = arg0, (func_800AAF30(0xAA) == 0)) && (arg0 = arg0, (func_800AAF30(0xAB) == 0)) && (arg0 = arg0, (func_800AAF30(0xB9) == 0)) && (arg0 = arg0, (func_800AAF30(0xBA) == 0)) && (arg0 = arg0, (func_800AAF30(0xAC) == 0)) && (arg0 = arg0, (func_800AAF30(0xB0) == 0)))) { + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->words.w0 = 0x6000000; + temp_v1->words.w1 = &D_0D0076F8; + phi_a1 = 0; + if ((arg0 != 4) && (D_800DC5FC != 0)) { + phi_a1 = 1; + } + temp_t0 = *(&D_8018E7AC + arg0); + switch (temp_t0) { + case 1: + func_8009CDDC(arg0, phi_a1, arg0); + return; + case 2: + func_8009D958(arg0, phi_a1, arg0); + return; + case 3: + func_8009DB8C(&gDisplayListHead, phi_a1, arg0); + return; + case 4: + func_8009DAA8(&gDisplayListHead, phi_a1, arg0); + return; + case 5: + func_8009D998(arg0, phi_a1, arg0); + return; + case 7: + func_8009D978(arg0, phi_a1, arg0); + return; + case 8: + func_8009CDFC(arg0, phi_a1, arg0); + /* Duplicate return node #19. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009CA6C.s") #endif @@ -5906,15 +6630,395 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009CE1C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8009CE64: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000F124(s8, s32); /* extern */ +? func_8009CE1C(s32 *, s32, s32); /* extern */ +void *func_800AAF30(?, s32, s32); /* extern */ +? func_80290338(); /* extern */ +? func_80290360(); /* extern */ +? func_80290388(); /* extern */ +? func_802903B0(); /* extern */ +extern ? D_8018E7AC; +extern ? D_8018E7B0; +static ? D_800E7664; /* unable to generate initializer; const */ +static ? D_800E86A8; /* unable to generate initializer; const */ +static ? D_800EFD50; /* unable to generate initializer; const */ +s16 D_800DC644; /* unable to generate initializer */ +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8009CE64.s line 250. +void func_8009CE64(s32 *arg0, s32 arg2, s32 arg3) { + s32 sp28; + s8 *sp18; + s16 temp_a0; + s16 temp_a0_2; + s32 temp_t6; + s32 temp_t6_2; + s32 temp_v0; + s32 temp_v0_7; + s32 temp_v0_8; + s32 temp_v1; + s32 temp_v1_2; + s32 temp_v1_3; + s32 temp_v1_5; + s32 temp_v1_6; + s32 temp_v1_8; + s8 *temp_v0_2; + s8 temp_v1_4; + s8 temp_v1_7; + s8 temp_v1_9; + u32 temp_t9; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + s32 phi_a1; + s32 phi_a1_2; + s32 phi_a1_3; + s32 phi_t7; + s32 *phi_a0; + s32 phi_a2; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = D_800DC50C; + phi_a1 = 0; + phi_a1_2 = 0; + phi_a1_3 = 0; + phi_a0 = arg0; + phi_a2 = arg3; + phi_a2 = arg3; + phi_a2 = arg3; + if (temp_v0 == 5) { + temp_v1 = gCCSelection; + if ((temp_v1 != 2) && (temp_v1 != 3)) { + + } else if ((D_802874F5 < 3) && (gCupSelection == 3)) { + phi_a1 = 1; + } + if (phi_a1 != 0) { + D_80287550 = 9; + D_800DC644 = 8; + return; + } + D_80287550 = 1; + D_800E86A0 = 0xB; + return; + } + if (temp_v0 == 4) { + temp_v0_2 = arg0 + &D_8018E7AC; + if (*temp_v0_2 == 2) { + if (temp_v0_2 != &D_8018E7B0) { + *temp_v0_2 = 5; + return; + } + sp18 = temp_v0_2; + sp28 = 0; + temp_v0_3 = func_800AAF30(0xB0, 0, 2); + if (temp_v0_3 != 0) { + temp_v1_2 = temp_v0_3->unk4; + if (temp_v1_2 != 0xA) { + if (temp_v1_2 != 0xB) { + if (temp_v1_2 != 0xC) { + if (temp_v1_2 != 0xD) { + + } + func_80290338(); + return; + } + func_80290360(); + return; + } + func_80290388(); + return; + } + func_802903B0(); + return; + } + sp28 = 0; + temp_v0_4 = func_800AAF30(0xAC, 0); + if (temp_v0_4 != 0) { + temp_v1_3 = temp_v0_4->unk4; + if (temp_v1_3 != 0xB) { + if (temp_v1_3 != 0xC) { + + } + func_80290338(); + return; + } + func_802903B0(); + D_8016556E = 1; + return; + } + sp28 = 0; + temp_v0_5 = func_800AAF30(0xC7, 0); + if (temp_v0_5 != 0) { + temp_t6 = temp_v0_5->unk4; + switch (temp_t6) { /* switch 1 */ + case 12: /* switch 1 */ + func_802903B0(); + phi_a1_2 = 1; + break; + case 13: /* switch 1 */ + case 22: /* switch 1 */ + case 42: /* switch 1 */ + func_80290388(); + phi_a1_2 = 1; + break; + case 14: /* switch 1 */ + case 23: /* switch 1 */ + case 43: /* switch 1 */ + func_80290360(); + phi_a1_2 = 1; + break; + case 15: /* switch 1 */ + case 24: /* switch 1 */ + case 32: /* switch 1 */ + case 44: /* switch 1 */ + func_80290338(); + phi_a1_2 = 1; + break; + default: /* switch 1 */ + *sp18 = 5; + break; + } + phi_a1_3 = phi_a1_2; + if (phi_a1_2 != 0) { + D_800DC5FC = 0; + } + } + temp_v0_6 = func_800AAF30(0xBD, phi_a1_3); + if (temp_v0_6 != 0) { + temp_t6_2 = temp_v0_6->unk4; + switch (temp_t6_2) { /* switch 2 */ + case 11: /* switch 2 */ + D_8015F892 = 1; + D_8015F890 = 0; + func_802903B0(); + return; + case 12: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 0; + func_80290388(); + return; + case 13: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 0; + func_80290360(); + return; + case 14: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 0; + func_80290338(); + return; + case 15: /* switch 2 */ + D_8015F892 = 0; + D_8015F890 = 1; + func_802903B0(); + return; + } + } else { + *sp18 = 5; + } + } else { + /* Duplicate return node #115. Try simplifying control flow for better match */ + } + } else { + *(&D_8018E7AC + arg0) = 0; + if (D_8018EDEF != 0x40) { + temp_t9 = D_8018EDE0; + switch (temp_t9) { /* switch 3 */ + case 0: /* switch 3 */ + temp_v0_7 = D_800E86A0; + phi_t7 = temp_v0_7 + 1; + phi_a0 = &D_800E86A0; + phi_a2 = 2; + phi_a2 = 2; + if (temp_v0_7 == 8) { + D_800E86A0 = 0xA; + D_800E86A4 = 2; + } else { +block_74: + D_800E86A0 = phi_t7; + phi_a0 = &D_800E86A0; + } + break; + case 1: /* switch 3 */ + D_800E86A0 += -1; + phi_a0 = &D_800E86A0; + break; + case 2: /* switch 3 */ + D_800DC51C = 1; + D_8018EE08 = 1; + D_800DC524 = 4; + gCCSelection = 1; + temp_v1_4 = D_800E86BC; + switch (temp_v1_4) { /* switch 4 */ + case 0: /* switch 4 */ + gCurrentCourseId = 0; + D_800DC530 = 0; + gPlayerCountSelection1 = 1; + D_8018EDF3 = 1; + D_800E86A8.unk0 = 0; + gModeSelection = 0; + break; + case 1: /* switch 4 */ + gCurrentCourseId = 1; + D_800DC530 = 1; + gPlayerCountSelection1 = 2; + D_8018EDF3 = 2; + D_800E86A8.unk0 = 2; + D_800E86A8.unk1 = 4; + gModeSelection = 2; + phi_a2 = 2; + break; + case 2: /* switch 4 */ + gCurrentCourseId = 0xB; + D_800DC530 = 0; + gPlayerCountSelection1 = 1; + D_8018EDF3 = 1; + D_800E86A8.unk0 = 1; + gModeSelection = 0; + break; + case 3: /* switch 4 */ + gCurrentCourseId = 0xE; + D_800DC530 = 3; + gPlayerCountSelection1 = 3; + D_8018EDF3 = 3; + D_800E86A8.unk0 = 5; + D_800E86A8.unk1 = 2; + D_800E86A8.unk2 = 7; + gModeSelection = 2; + phi_a2 = 2; + break; + case 4: /* switch 4 */ + gCurrentCourseId = 2; + D_800DC530 = 0; + gPlayerCountSelection1 = 1; + D_8018EDF3 = 1; + D_800E86A8.unk0 = 7; + gModeSelection = 0; + phi_a2 = 2; + break; + case 5: /* switch 4 */ + gCurrentCourseId = 0xC; + D_800DC530 = 3; + gPlayerCountSelection1 = 4; + D_8018EDF3 = 4; + D_800E86A8.unk0 = 0; + D_800E86A8.unk1 = 1; + D_800E86A8.unk2 = 6; + D_800E86A8.unk3 = 3; + gModeSelection = 2; + phi_a2 = 2; + break; + } + D_800E86BC = temp_v1_4 + 1; + if (D_800E86BC >= 6) { + D_800E86BC = 0; + } + temp_a0 = gCurrentCourseId; + gCupSelection = *(&D_800E7664 + temp_a0); + D_800DC540 = gCupSelection; + gCourseSelection = *(&D_800EFD50 + temp_a0); + phi_a0 = temp_a0; + break; + case 3: /* switch 3 */ + temp_v1_5 = D_800E86A0; + phi_a0 = &D_800E86A0; + if (temp_v1_5 != 6) { + if (temp_v1_5 == 0xB) { + D_800E86A0 = 6; + } + } else { + D_800E86A0 = 0xB; + } + break; + case 4: /* switch 3 */ + temp_v1_6 = D_800E86A0; + phi_t7 = 0xB; + phi_a0 = &D_800E86A0; + if (temp_v1_6 != 5) { + if (temp_v1_6 == 0xB) { + D_800E86A0 = 5; + } + } else { + goto block_74; + } + break; + } + if (D_800E86A4 == 0) { + D_800E86A4 = 1; + } + if (D_800E86A0 >= 0xE) { + D_800DC524 = 4; + if (gModeSelection == 1) { + D_8018EDFB = 1; + } + func_8009CE1C(phi_a0, 1, phi_a2); + } + D_8018EE0C = 0; + return; + } + temp_v1_7 = D_8018EDFA; + if (temp_v1_7 != 1) { + if ((temp_v1_7 != 2) && (temp_v1_7 != 3)) { + D_800DC524 = 4; + if (gModeSelection == 1) { + D_8018EDFB = 1; + } + } else { + D_800DC524 = 9; + D_800DC644 = 8; + } + } else { + D_800DC524 = 5; + } + func_8000F124(1, 2); + if ((D_800DC530 == 3) && ((temp_v1_8 = gModeSelection, (temp_v1_8 == 0)) || (temp_v1_8 == 1))) { + gModeSelection = 2; + } + temp_a0_2 = gCurrentCourseId; + if ((temp_a0_2 != 0xF) && (temp_a0_2 != 0x10) && (temp_a0_2 != 0x11) && (temp_a0_2 != 0x13)) { + temp_v0_8 = gModeSelection; + phi_v0 = temp_v0_8; + if (temp_v0_8 == 3) { + gModeSelection = 0; + phi_v0 = 0; + } + if ((phi_v0 == 2) && (gPlayerCountSelection1 == 1)) { + gModeSelection = 0; + } + } else { + gModeSelection = 3; + if (gPlayerCountSelection1 == 1) { + D_8018EDF3 = 2; + D_800DC530 = 1; + gPlayerCountSelection1 = D_8018EDF3; + } + } + gCupSelection = *(&D_800E7664 + temp_a0_2); + temp_v1_9 = D_8018EDFA; + D_800DC540 = gCupSelection; + gCourseSelection = *(&D_800EFD50 + temp_a0_2); + if (temp_v1_9 != 1) { + if (temp_v1_9 != 2) { + if (temp_v1_9 != 3) { + if (gCCSelection == 3) { + gIsMirrorMode = 1; + return; + } + gIsMirrorMode = 0; + /* Duplicate return node #115. Try simplifying control flow for better match */ + return; + } + gCCSelection = 3; + return; + } + gCCSelection = 0; + return; + } + default: /* switch 2 */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009CE64.s") #endif @@ -6683,29 +7787,1558 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009E620.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8009E650: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8006EE44(s8); /* extern */ +? func_8006EF60(); /* extern */ +? func_80099184(? *, s8); /* extern */ +? func_800996BC(? *, ?, s8); /* extern */ +? func_8009B0A4(?, ?); /* extern */ +? func_8009B538(?, ?, u16, u16, s32); /* extern */ +s32 func_8009B8C4(? *); /* extern */ +? func_8009B954(? *); /* extern */ +? func_8009B998(); /* extern */ +s32 *func_8009BA74(s32 *, ? *, s32, s32); /* extern */ +? func_800B559C(s32); /* extern */ +? func_800B6708(); /* extern */ +s32 random_int(?, s8); /* extern */ +? *segmented_to_virtual(void *, s8); /* extern */ +s32 segmented_to_virtual_dupe(? *, s8, s8, s32); /* extern */ +extern ? D_801640F4; +extern ? D_8018D9E0; +extern ? D_8018EE10; +extern ? D_802874D8; +extern ? gTexture7ED50C; +static ? D_02000000; /* unable to generate initializer */ +static ? D_02000028; /* unable to generate initializer */ +static ? D_02000050; /* unable to generate initializer */ +static ? D_02000078; /* unable to generate initializer */ +static ? D_020000A0; /* unable to generate initializer */ +static ? D_020000C8; /* unable to generate initializer */ +static ? D_020000F0; /* unable to generate initializer */ +static ? D_02000118; /* unable to generate initializer */ +static ? D_02000140; /* unable to generate initializer */ +static ? D_02000168; /* unable to generate initializer */ +static ? D_02000190; /* unable to generate initializer */ +static ? D_020001B8; /* unable to generate initializer */ +static ? D_020001E0; /* unable to generate initializer */ +static ? D_02000208; /* unable to generate initializer */ +static ? D_02000230; /* unable to generate initializer */ +static ? D_02000258; /* unable to generate initializer */ +static ? D_02000280; /* unable to generate initializer */ +static ? D_020002A8; /* unable to generate initializer */ +static ? D_020002D0; /* unable to generate initializer */ +static ? D_020002F8; /* unable to generate initializer */ +static ? D_02000320; /* unable to generate initializer */ +static ? D_02000348; /* unable to generate initializer */ +static ? D_02000370; /* unable to generate initializer */ +static ? D_02000398; /* unable to generate initializer */ +static ? D_020003C0; /* unable to generate initializer */ +static ? D_020003E8; /* unable to generate initializer */ +static ? D_02000410; /* unable to generate initializer */ +static ? D_02000438; /* unable to generate initializer */ +static ? D_02000460; /* unable to generate initializer */ +static ? D_02000488; /* unable to generate initializer */ +static ? D_020004B0; /* unable to generate initializer */ +static ? D_020004D8; /* unable to generate initializer */ +static ? D_02000500; /* unable to generate initializer */ +static ? D_02000528; /* unable to generate initializer */ +static ? D_02000550; /* unable to generate initializer */ +static ? D_02000578; /* unable to generate initializer */ +static ? D_020005A0; /* unable to generate initializer */ +static ? D_020005C8; /* unable to generate initializer */ +static ? D_020005F0; /* unable to generate initializer */ +static ? D_02000618; /* unable to generate initializer */ +static ? D_02000640; /* unable to generate initializer */ +static ? D_02000668; /* unable to generate initializer */ +static ? D_02000690; /* unable to generate initializer */ +static ? D_020006B8; /* unable to generate initializer */ +static ? D_020006E0; /* unable to generate initializer */ +static ? D_02000708; /* unable to generate initializer */ +static ? D_02000730; /* unable to generate initializer */ +static ? D_02000758; /* unable to generate initializer */ +static ? D_02000780; /* unable to generate initializer */ +static ? D_020007A8; /* unable to generate initializer */ +static ? D_020007D0; /* unable to generate initializer */ +static ? D_020007F8; /* unable to generate initializer */ +static ? D_02000820; /* unable to generate initializer */ +static ? D_02000848; /* unable to generate initializer */ +static ? D_02000870; /* unable to generate initializer */ +static ? D_02000898; /* unable to generate initializer */ +static ? D_020008C0; /* unable to generate initializer */ +static ? D_020008E8; /* unable to generate initializer */ +static ? D_02000910; /* unable to generate initializer */ +static ? D_02000938; /* unable to generate initializer */ +static ? D_02000960; /* unable to generate initializer */ +static ? D_02000988; /* unable to generate initializer */ +static ? D_020009B0; /* unable to generate initializer */ +static ? D_020009D8; /* unable to generate initializer */ +static ? D_02000A00; /* unable to generate initializer */ +static ? D_02000A28; /* unable to generate initializer */ +static ? D_02000A50; /* unable to generate initializer */ +static ? D_02000A78; /* unable to generate initializer */ +static ? D_02000AA0; /* unable to generate initializer */ +static ? D_02000AC8; /* unable to generate initializer */ +static ? D_02000AF0; /* unable to generate initializer */ +static ? D_02000B18; /* unable to generate initializer */ +static ? D_02000B40; /* unable to generate initializer */ +static ? D_02000B68; /* unable to generate initializer */ +static ? D_02000B90; /* unable to generate initializer */ +static ? D_02000BB8; /* unable to generate initializer */ +static ? D_02000BE0; /* unable to generate initializer */ +static ? D_02000C08; /* unable to generate initializer */ +static ? D_02000C30; /* unable to generate initializer */ +static ? D_02000C58; /* unable to generate initializer */ +static ? D_02000C80; /* unable to generate initializer */ +static ? D_02000CA8; /* unable to generate initializer */ +static ? D_02000CD0; /* unable to generate initializer */ +static ? D_02000CF8; /* unable to generate initializer */ +static ? D_02000D20; /* unable to generate initializer */ +static ? D_02000D48; /* unable to generate initializer */ +static ? D_02000D70; /* unable to generate initializer */ +static ? D_02000D98; /* unable to generate initializer */ +static ? D_02000DC0; /* unable to generate initializer */ +static ? D_02000DE8; /* unable to generate initializer */ +static ? D_02000E10; /* unable to generate initializer */ +static ? D_02000E38; /* unable to generate initializer */ +static ? D_02000E60; /* unable to generate initializer */ +static ? D_02000E88; /* unable to generate initializer */ +static ? D_02000EB0; /* unable to generate initializer */ +static ? D_02000ED8; /* unable to generate initializer */ +static ? D_02000F00; /* unable to generate initializer */ +static ? D_02000F28; /* unable to generate initializer */ +static ? D_02000F50; /* unable to generate initializer */ +static ? D_02000F78; /* unable to generate initializer */ +static ? D_02000FA0; /* unable to generate initializer */ +static ? D_02000FC8; /* unable to generate initializer */ +static ? D_02000FF0; /* unable to generate initializer */ +static ? D_02001018; /* unable to generate initializer */ +static ? D_02001040; /* unable to generate initializer */ +static ? D_02001068; /* unable to generate initializer */ +static ? D_02001090; /* unable to generate initializer */ +static ? D_020010B8; /* unable to generate initializer */ +static ? D_020014C8; /* unable to generate initializer */ +static ? D_02001540; /* unable to generate initializer */ +static ? D_0200157C; /* unable to generate initializer */ +static ? D_020015A4; /* unable to generate initializer */ +static ? D_020015CC; /* unable to generate initializer */ +static ? D_02001630; /* unable to generate initializer */ +static ? D_02001658; /* unable to generate initializer */ +static ? D_020016BC; /* unable to generate initializer */ +static ? D_020016E4; /* unable to generate initializer */ +static ? D_0200170C; /* unable to generate initializer */ +static ? D_02001734; /* unable to generate initializer */ +static ? D_0200175C; /* unable to generate initializer */ +static ? D_02001784; /* unable to generate initializer */ +static ? D_020017AC; /* unable to generate initializer */ +static ? D_020017D4; /* unable to generate initializer */ +static ? D_020017FC; /* unable to generate initializer */ +static ? D_02001824; /* unable to generate initializer */ +static ? D_0200184C; /* unable to generate initializer */ +static ? D_02001874; /* unable to generate initializer */ +static ? D_0200198C; /* unable to generate initializer */ +static ? D_0200199C; /* unable to generate initializer */ +static ? D_020019AC; /* unable to generate initializer */ +static ? D_020019BC; /* unable to generate initializer */ +static ? D_020019CC; /* unable to generate initializer */ +static ? D_020019DC; /* unable to generate initializer */ +static void D_02001FA4; /* unable to generate initializer */ +static ? D_020045E8; /* unable to generate initializer */ +static ? D_02004610; /* unable to generate initializer */ +static void D_02004638; /* unable to generate initializer */ +static void D_02004A0C; /* unable to generate initializer */ +static void D_02004A34; /* unable to generate initializer */ +static ? D_02004B4C; /* unable to generate initializer */ +static ? D_02004B74; /* unable to generate initializer */ +static ? D_800E7248; /* unable to generate initializer; const */ +static ? D_800E7268; /* unable to generate initializer; const */ +static ? D_800E74E8; /* unable to generate initializer; const */ +static void *D_800E7AF8[0x6C] = { + &D_02000000, + &D_02000028, + &D_02000050, + &D_02000078, + &D_020000A0, + &D_020000C8, + &D_020000F0, + &D_02000118, + &D_02000140, + &D_02000168, + &D_02000190, + &D_020001B8, + &D_020001E0, + &D_02000208, + &D_02000230, + &D_02000258, + &D_02000280, + &D_020002A8, + &D_020002D0, + &D_020002F8, + &D_02000320, + &D_02000348, + &D_02000370, + &D_02000398, + &D_020003C0, + &D_020003E8, + &D_02000410, + &D_02000438, + &D_02000460, + &D_02000488, + &D_020004B0, + &D_020004D8, + &D_02000500, + &D_02000528, + &D_02000550, + &D_02000578, + &D_020005A0, + &D_020005C8, + &D_020005F0, + &D_02000618, + &D_02000640, + &D_02000668, + &D_02000690, + &D_020006B8, + &D_020006E0, + &D_02000708, + &D_02000730, + &D_02000758, + &D_02000780, + &D_020007A8, + &D_020007D0, + &D_020007F8, + &D_02000820, + &D_02000848, + &D_02000870, + &D_02000898, + &D_020008C0, + &D_020008E8, + &D_02000910, + &D_02000938, + &D_02000960, + &D_02000988, + &D_020009B0, + &D_020009D8, + &D_02000A00, + &D_02000A28, + &D_02000A50, + &D_02000A78, + &D_02000AA0, + &D_02000AC8, + &D_02000AF0, + &D_02000B18, + &D_02000B40, + &D_02000B68, + &D_02000B90, + &D_02000BB8, + &D_02000BE0, + &D_02000C08, + &D_02000C30, + &D_02000C58, + &D_02000C80, + &D_02000CA8, + &D_02000CD0, + &D_02000CF8, + &D_02000D20, + &D_02000D48, + &D_02000D70, + &D_02000D98, + &D_02000DC0, + &D_02000DE8, + &D_02000E10, + &D_02000E38, + &D_02000E60, + &D_02000E88, + &D_02000EB0, + &D_02000ED8, + &D_02000F00, + &D_02000F28, + &D_02000F50, + &D_02000F78, + &D_02000FA0, + &D_02000FC8, + &D_02000FF0, + &D_02001018, + &D_02001040, + &D_02001068, + &D_02001090, + &D_020010B8, +}; /* const */ +static ? D_800E7CA8; /* unable to generate initializer; const */ +static void *D_800E7D0C[0xA] = { + &D_020016BC, + &D_020016E4, + &D_0200170C, + &D_02001734, + &D_0200175C, + &D_02001784, + &D_020017AC, + &D_020017D4, + &D_020017FC, + &D_02001824, +}; /* const */ +static ? *D_800E7D34[6] = { + &D_0200198C, + &D_0200199C, + &D_020019AC, + &D_020019BC, + &D_020019CC, + &D_020019DC, +}; /* const */ +static ? D_800E7D4C; /* unable to generate initializer; const */ +static ? D_800E7D54; /* unable to generate initializer; const */ +static ? D_800E7D74; /* unable to generate initializer; const */ +static ? D_800E7DC4; /* unable to generate initializer; const */ +static ? D_800E7E20; /* unable to generate initializer; const */ +static ? D_800E7E34; /* unable to generate initializer; const */ +static ? D_800E7FF0; /* unable to generate initializer; const */ +static ? D_800E80A0; /* unable to generate initializer; const */ +static ? D_800E8114; /* unable to generate initializer; const */ +static ? D_800E817C; /* unable to generate initializer; const */ +static ? D_800E81E4; /* unable to generate initializer; const */ +static ? D_800E822C; /* unable to generate initializer; const */ +static ? D_800E8234; /* unable to generate initializer; const */ +static ? D_800E8274; /* unable to generate initializer; const */ +static ? D_800E8294; /* unable to generate initializer; const */ +static ? D_800E8320; /* unable to generate initializer; const */ +static ? D_800E8420; /* unable to generate initializer; const */ +static ? D_800E85F7; /* unable to generate initializer; const */ +static s8 D_800E86A8 = 0; /* const */ +static ? D_800EFD64; /* unable to generate initializer; const */ +static ? gCupTrackOrder; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8009E650.s line 80. +void func_8009E650(s32 arg0, s32 arg1, s32 arg2, s8 arg3) { + void *sp7C; + s32 *sp6C; + s32 sp3C; + void **sp24; + s32 sp20; + s32 *temp_v0_2; + s32 *temp_v1_10; + s32 *temp_v1_11; + s32 *temp_v1_12; + 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_a3; + s32 temp_t8; + s32 temp_t9; + s32 temp_v0; + s32 temp_v0_4; + s32 temp_v0_5; + s32 temp_v0_6; + s32 temp_v0_7; + s32 temp_v1; + s32 temp_v1_14; + s32 temp_v1_15; + s32 temp_v1_16; + s32 temp_v1_2; + s8 temp_a1; + s8 temp_a1_2; + s8 temp_t7; + s8 temp_v0_8; + void **temp_v0_10; + void **temp_v1_13; + void **temp_v1_3; + void *temp_v0_3; + void *temp_v0_9; + ? *phi_ra; + s32 phi_v0; + s32 phi_v0_2; + s32 phi_v1; + ? *phi_a0; + void **phi_v1_2; + void **phi_v1_3; + s8 phi_v1_4; + s32 phi_v1_5; + void **phi_a2; + ? *phi_a0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_ra = &D_8018D9E0; + phi_v0 = 0; + phi_v0_2 = 0; +loop_1: + temp_v0 = phi_v0 + 1; + phi_v0 = temp_v0; + if (phi_ra->unk0 != 0) { + if (temp_v0 >= 0x21) { +loop_3: + goto loop_3; + } + phi_ra += 0x28; + goto loop_1; + } + phi_ra->unk4 = 0; + phi_ra->unk8 = 0; + phi_ra->unkC = arg1; + phi_ra->unk10 = arg2; + phi_ra->unk14 = arg3; + phi_ra->unk15 = 1; + phi_ra->unk1C = 0; + phi_ra->unk20 = 0; + phi_ra->unk0 = arg0; + phi_v1_4 = 1; + if (arg0 >= 0xFC) { + if (arg0 >= 0x131) { + switch (arg0); /* switch 1; jump table: jpt_800F1160 */ + /* Duplicate return node #87. Try simplifying control flow for better match */ + return; + } + if (arg0 != 0x130) { + return; + } + temp_a1 = *(&D_800EFD64 + D_802874D8.unk1E); + if (D_802874D8.unk1D >= 3) { + phi_v0_2 = 1; + } + temp_v1 = temp_a1 * 4; + phi_v1 = temp_v1; + if (phi_v0_2 != 0) { + temp_v1_2 = temp_a1 * 4; + phi_v1 = temp_v1_2; + phi_a0 = *(&D_800E8420 + temp_v1_2); + } else { + phi_a0 = *(&D_800E8320 + temp_v1); + } + sp7C = phi_ra; + sp20 = phi_v1; + phi_ra->unk18 = func_8009A478(segmented_to_virtual_dupe(phi_a0, temp_a1, arg3), 0); + func_800996BC(segmented_to_virtual(*(&D_800E7D54 + phi_v1)), 0); + /* Duplicate return node #87. Try simplifying control flow for better match */ + return; + } + if (arg0 >= 0x38) { + switch (arg0) { /* switch 2 */ + case 0xFA: /* switch 2 */ + D_8018ED94 = 0; + D_800E8530 = 0.0f; + D_800E8534 = 3.0f; + D_8018EDC0 = 0x9C4; + D_8018EDC8 = 0.0f; + D_8018EDCC = -270.0f; + D_8018EDD0 = 0.0f; + D_8018EDD4 = 0.0f; + D_8018EDD8 = 0.0f; + D_8018EDDC = 0.0f; + D_8018EDC4 = 3.0f; + phi_ra->unk1C = -1; + phi_ra->unk20 = 1; + return; + case 0xFB: /* switch 2 */ + D_8018EDC0 = 0x708; + D_8018EDC8 = -51.0f; + D_8018EDCC = -12.0f; + D_8018EDD0 = -18.0f; + D_8018EDD4 = -270.0f; + D_8018EDD8 = 750.0f; + D_8018EDDC = 0.0f; + D_8018EDC4 = 1.0f; + phi_ra->unk1C = -1; + phi_ra->unk20 = 1; + return; + case 0xD2: /* switch 2 */ + sp7C = phi_ra; + func_800996BC(&D_020014C8, 0, arg3); + func_8009B954(&D_020014C8); + D_8018E75C = func_8009BA74(D_8018E75C, &D_020014C8, phi_ra->unkC, phi_ra->unk10); + func_8009B998(); + return; + case 0xD3: /* switch 2 */ + sp7C = phi_ra; + func_800996BC(&D_02001540, 0, arg3); + func_8009B954(&D_02001540); + D_8018E75C = func_8009BA74(D_8018E75C, &D_02001540, phi_ra->unkC, phi_ra->unk10); + func_8009B998(); + return; + case 0xD4: /* switch 2 */ + sp7C = phi_ra; + func_800996BC(&D_0200157C, 0, arg3); + func_80099184(&D_02001874); + phi_ra->unk10 = 0x69; + phi_v1_2 = D_800E7AF8; + do { + sp24 = phi_v1_2; + func_80099184(segmented_to_virtual(*phi_v1_2)); + temp_v1_3 = phi_v1_2 + 4; + phi_v1_2 = temp_v1_3; + } while (temp_v1_3 != D_800E7D0C); + return; + case 0xD5: /* switch 2 */ + sp7C = phi_ra; + func_80099184(&D_020015A4, arg3); + func_8009B954(&D_020015A4); + temp_v0_2 = func_8009BA74(D_8018E75C, &D_020015A4, phi_ra->unkC, phi_ra->unk10); + D_8018E75C = temp_v0_2; + D_8018E75C = temp_v0_2 + 8; + *temp_v0_2 = -0x2900000; + sp6C = temp_v0_2; + sp6C->unk4 = func_8009B8C4(&gTexture7ED50C); + temp_v1_4 = D_8018E75C; + D_8018E75C = temp_v1_4 + 8; + temp_v1_4->unk0 = -0xA900000; + temp_v1_4->unk4 = 0x7080200; + temp_v1_5 = D_8018E75C; + D_8018E75C = temp_v1_5 + 8; + temp_v1_5->unk4 = 0; + temp_v1_5->unk0 = -0x1A000000; + temp_v1_6 = D_8018E75C; + D_8018E75C = temp_v1_6 + 8; + temp_v1_6->unk4 = 0x74FF020; + temp_v1_6->unk0 = -0xD000000; + temp_v1_7 = D_8018E75C; + D_8018E75C = temp_v1_7 + 8; + temp_v1_7->unk4 = 0; + temp_v1_7->unk0 = -0x19000000; + temp_v1_8 = D_8018E75C; + D_8018E75C = temp_v1_8 + 8; + temp_v1_8->unk0 = -0xA8F8000; + temp_v1_8->unk4 = 0x80200; + temp_v1_9 = D_8018E75C; + D_8018E75C = temp_v1_9 + 8; + temp_v1_9->unk0 = -0xE000000; + temp_v1_9->unk4 = 0x3FC010; + temp_v1_10 = D_8018E75C; + D_8018E75C = temp_v1_10 + 8; + temp_v1_10->unk4 = 0x802C0; + temp_v1_10->unk0 = -0x1BB7FD2C; + temp_v1_11 = D_8018E75C; + D_8018E75C = temp_v1_11 + 8; + temp_v1_11->unk4 = 0x80; + temp_v1_11->unk0 = 0xB3000000; + temp_v1_12 = D_8018E75C; + D_8018E75C = temp_v1_12 + 8; + temp_v1_12->unk0 = 0xB2000000; + temp_v1_12->unk4 = 0x400FC00; + sp7C = phi_ra; + func_8009B998(); + func_80099184(&D_020015CC); + func_8009B954(&D_020015CC); + D_8018E75C = func_8009BA74(D_8018E75C, &D_020015CC, phi_ra->unkC, phi_ra->unk10); + func_8009B998(); + func_80099184(&D_02001630); + func_8009B954(&D_02001630); + D_8018E75C = func_8009BA74(D_8018E75C, &D_02001630, phi_ra->unkC, phi_ra->unk10); + func_8009B998(); + func_80099184(&D_02001658); + func_8009B954(&D_02001658); + D_8018E75C = func_8009BA74(D_8018E75C, &D_02001658, phi_ra->unkC, phi_ra->unk10); + func_8009B998(); + return; + case 0xD6: /* switch 2 */ + sp7C = phi_ra; + phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*D_800E7D34, arg3)); + return; + case 0xD7: /* switch 2 */ + phi_v1_3 = D_800E7D0C; + do { + sp24 = phi_v1_3; + func_80099184(segmented_to_virtual(*phi_v1_3)); + temp_v1_13 = phi_v1_3 + 4; + phi_v1_3 = temp_v1_13; + } while (temp_v1_13 != D_800E7D34); + return; + case 0xD8: /* switch 2 */ + case 0xD9: /* switch 2 */ + func_80099184(&D_0200184C, arg3); + return; + case 0xA0: /* switch 2 */ + case 0xA1: /* switch 2 */ + sp7C = phi_ra; + phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E80A0 + (arg0 * 4)), arg3)); + return; + case 0x5D: /* switch 2 */ + phi_ra->unk1C = 0x20; + /* fallthrough */ + case 0x52: /* switch 2 */ + case 0x53: /* switch 2 */ + case 0x54: /* switch 2 */ + case 0x55: /* switch 2 */ + case 0x56: /* switch 2 */ + case 0x58: /* switch 2 */ + case 0x59: /* switch 2 */ + case 0x5A: /* switch 2 */ + case 0x5B: /* switch 2 */ + case 0x5C: /* switch 2 */ + func_800996BC(segmented_to_virtual(*(&D_800E817C + (arg0 * 4)), arg3), 0); + return; + case 0x5F: /* switch 2 */ + case 0x60: /* switch 2 */ + case 0x61: /* switch 2 */ + case 0x62: /* switch 2 */ + sp7C = phi_ra; + phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupTrackOrder - 0xBE + (phi_ra->unk0 * 2)) * 4)), arg3)); + return; + case 0x5E: /* switch 2 */ + sp7C = phi_ra; + phi_ra->unk20 = random_int(4, arg3) + 2; + return; + case 0x65: /* switch 2 */ + case 0x66: /* switch 2 */ + temp_v0_3 = (arg0 * 8) + &D_800E7248; + phi_ra->unkC = temp_v0_3->unk-328; + phi_ra->unk10 = temp_v0_3->unk-326; + return; + case 0x67: /* switch 2 */ + phi_ra->unk1C = gCupSelection; + sp7C = phi_ra; + temp_v0_4 = func_800B54C0(gCupSelection, gCCSelection, arg2); + temp_v1_14 = temp_v0_4; + phi_ra->unk20 = temp_v0_4; + phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E20 + (((gCCSelection / 2) * 0x10) + -(temp_v1_14 * 4))))); + phi_ra->unkC = D_800E7268.unk0; + phi_ra->unk10 = D_800E7268.unk2; + return; + case 0x68: /* switch 2 */ + sp7C = phi_ra; + func_800996BC(segmented_to_virtual(*(&D_800E8294 + (gCCSelection * 4)), arg3), 0); + phi_ra->unkC = 0x37; + phi_ra->unk10 = 0xC3; + return; + case 0x69: /* switch 2 */ + func_800996BC(segmented_to_virtual(&D_02004A0C, arg3), 0); + if (func_800B5B94() == 0) { + func_800B6708(); + return; + } + D_8018EE10.unk4 = 0; + D_8018EE10.unk84 = 0; + return; + case 0x78: /* switch 2 */ + case 0x79: /* switch 2 */ + case 0x7A: /* switch 2 */ + case 0x7B: /* switch 2 */ + func_800996BC(segmented_to_virtual(*(&D_800E8114 + (arg0 * 4)), arg3), 0); + return; + case 0x8C: /* switch 2 */ + func_800996BC(segmented_to_virtual(&D_02004A34, arg3), 0); + if (func_800B5B94() == 0) { + func_800B6708(); + return; + } + D_8018EE10.unk4 = 0; + D_8018EE10.unk84 = 0; + return; + case 0x8D: /* switch 2 */ + func_80099184(segmented_to_virtual(&D_02001FA4, arg3)); + return; + case 0x7C: /* switch 2 */ + case 0x7D: /* switch 2 */ + case 0x7E: /* switch 2 */ + case 0x7F: /* switch 2 */ + case 0x80: /* switch 2 */ + case 0x81: /* switch 2 */ + case 0x82: /* switch 2 */ + case 0x83: /* switch 2 */ + case 0x84: /* switch 2 */ + case 0x85: /* switch 2 */ + case 0x86: /* switch 2 */ + case 0x87: /* switch 2 */ + case 0x88: /* switch 2 */ + case 0x89: /* switch 2 */ + case 0x8A: /* switch 2 */ + case 0x8B: /* switch 2 */ + sp7C = phi_ra; + temp_v0_5 = phi_ra->unk0 - 0x7C; + func_800996BC(segmented_to_virtual(*(&D_800E7D74 + (*(&gCupTrackOrder + (((temp_v0_5 / 4) * 8) + ((temp_v0_5 % 4) * 2))) * 4)), arg3), -1); + temp_v0_6 = phi_ra->unk0 - 0x7C; + func_800996BC(segmented_to_virtual(*(&D_800E7DC4 + (*(&gCupTrackOrder + (((temp_v0_6 / 4) * 8) + ((temp_v0_6 % 4) * 2))) * 4))), 0); + func_800996BC(segmented_to_virtual(&D_02004A0C), 0); + return; + case 0xB1: /* switch 2 */ + case 0xB2: /* switch 2 */ + case 0xB3: /* switch 2 */ + case 0xB4: /* switch 2 */ + temp_v0_7 = gModeSelection; + temp_a1_2 = *(&D_800EFD64 + *(&D_800E85F7 + arg0)); + temp_a3 = arg0 - 0xB1; + phi_v1_4 = 0; + if (temp_v0_7 != 2) { + if (temp_v0_7 != 3) { + phi_a2 = arg0 * 4; + } else { + temp_t8 = arg0 * 4; + phi_a2 = temp_t8; + phi_a2 = temp_t8; + if (arg0 != (D_800DC5E8 + 0xB1)) { + goto block_63; + } + } + } else { + temp_t9 = arg0 * 4; + phi_a2 = temp_t9; + phi_a2 = temp_t9; + if (*(&D_801640F4 + temp_t9) != 0) { +block_63: + } + } + if (phi_v1_4 != 0) { + temp_v1_15 = temp_a1_2 * 4; + phi_v1_5 = temp_v1_15; + phi_a0_2 = *(&D_800E8420 + temp_v1_15); + } else { + temp_v1_16 = temp_a1_2 * 4; + phi_v1_5 = temp_v1_16; + phi_a0_2 = *(&D_800E8320 + temp_v1_16); + } + sp7C = phi_ra; + sp20 = phi_v1_5; + sp24 = phi_a2; + sp3C = temp_a3; + phi_ra->unk18 = func_8009A478(segmented_to_virtual_dupe(phi_a0_2, temp_a1_2, phi_a2, temp_a3), sp3C); + func_800996BC(segmented_to_virtual(*(&D_800E7D54 + phi_v1_5)), 0); + func_80099184(segmented_to_virtual(*(&D_800E7FF0 + phi_a2))); + return; + case 0xBB: /* switch 2 */ + sp7C = phi_ra; + phi_ra->unk1C = func_800B5020(D_8018CA78, D_800E86A8, arg2); + phi_ra->unk20 = func_800B5218(); + if (D_80162DD4 != 1) { + sp7C = phi_ra; + if (func_800051C4() >= 0x3C01) { + D_80162DD4 = 1; + } + } + if ((phi_ra->unk1C == 0) || (phi_ra->unk20 != 0)) { + func_800B559C((gCupSelection * 4) + gCourseSelection); + return; + } + /* Duplicate return node #87. Try simplifying control flow for better match */ + return; + case 0xE6: /* switch 2 */ + temp_v0_8 = D_8018EDF7; + sp7C = phi_ra; + phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E7E34 + (*(&gCupTrackOrder + (((temp_v0_8 / 4) * 8) + ((temp_v0_8 % 4) * 2))) * 4)), arg3)); + phi_ra->unk1C = D_8018EDF7; + func_800996BC(segmented_to_virtual(&D_02004A0C), 0); + func_8006EF60(); + if (func_800B5B94() == 0) { + func_800B6708(); + return; + } + D_8018EE10.unk4 = 0; + D_8018EE10.unk84 = 0; + return; + case 0xF0: /* switch 2 */ + phi_ra->unk4 = D_8018EDF2; + return; + case 0xF1: /* switch 2 */ + func_800996BC(segmented_to_virtual(&D_02004638, arg3), 0); + return; + case 0xBE: /* switch 2 */ + D_8018ED90 = 0; + return; + } + } else { + switch (arg0) { /* switch 3 */ + case 0x1: /* switch 3 */ + func_800996BC(*(&D_800E7D4C + (func_800B555C(arg0) * 4)), 0); + return; + case 0x2: /* switch 3 */ + func_8006EE44(arg3); + D_8018E110 += 0x10000; + func_80099184(&D_020045E8); + return; + case 0x3: /* switch 3 */ + func_80099184(&D_02004610, arg3); + return; + case 0x23: /* switch 3 */ + case 0x24: /* switch 3 */ + case 0x25: /* switch 3 */ + func_800996BC(*(&D_800E7D4C + (func_800B555C(arg0) * 4)), 0); + func_800996BC(&D_02004B74, 0); + func_8009B0A4(0, 0x19); + temp_v0_9 = (arg0 * 8) + &D_800E74E8; + func_8009B538(0, 0x12C00, temp_v0_9->unk-118, temp_v0_9->unk-116, temp_v0_9->unk-114); + return; + case 0xF: /* switch 3 */ + phi_ra->unk1C = 0x20; + /* fallthrough */ + case 0xA: /* switch 3 */ + case 0x10: /* switch 3 */ + case 0x11: /* switch 3 */ + case 0x12: /* switch 3 */ + case 0x13: /* switch 3 */ + case 0x14: /* switch 3 */ + case 0x15: /* switch 3 */ + case 0x16: /* switch 3 */ + case 0x17: /* switch 3 */ + case 0x18: /* switch 3 */ + case 0x19: /* switch 3 */ + func_800996BC(segmented_to_virtual(*(&D_800E822C + (arg0 * 4)), arg3), 0); + return; + case 0xB: /* switch 3 */ + case 0xC: /* switch 3 */ + case 0xD: /* switch 3 */ + case 0xE: /* switch 3 */ + temp_v0_10 = (arg0 * 8) + &D_800E8234; + sp24 = temp_v0_10; + func_800996BC(segmented_to_virtual(temp_v0_10->unk-58, arg3), 0); + func_80099184(segmented_to_virtual(sp24->unk-54)); + return; + case 0x2A: /* switch 3 */ + func_800996BC(&D_02004B4C, 0, arg3); + return; + case 0x33: /* switch 3 */ + sp7C = phi_ra; + func_800996BC(&D_02004B74, 0, arg3); + phi_ra->unk1C = 0x20; + return; + case 0x34: /* switch 3 */ + case 0x35: /* switch 3 */ + case 0x36: /* switch 3 */ + case 0x37: /* switch 3 */ + func_80099184(segmented_to_virtual(*(&D_800E81E4 + (arg0 * 4)), arg3)); + return; + case 0x2B: /* switch 3 */ + case 0x2C: /* switch 3 */ + case 0x2D: /* switch 3 */ + case 0x2E: /* switch 3 */ + case 0x2F: /* switch 3 */ + case 0x30: /* switch 3 */ + case 0x31: /* switch 3 */ + case 0x32: /* switch 3 */ + sp7C = phi_ra; + temp_t7 = arg0 * 4; + sp24 = temp_t7; + phi_ra->unk18 = func_8009A374(segmented_to_virtual_dupe(*(&D_800E8274 + temp_t7), temp_t7, arg3)); + func_800996BC(segmented_to_virtual(*(&D_800E7CA8 + sp24)), 0); + return; + default: /* switch 3 */ + default: /* switch 2 */ + return; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009E650.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8009F5E0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void *draw_box(void *, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ +? draw_text(s32, s32, ? *, ?, f32, f32); /* extern */ +? func_8004C8D4(s16, s16); /* extern */ +s32 func_80093034(? *); /* extern */ +? func_80093324(s32, s32, ? *, s32, f32, f32); /* extern */ +? func_800936B8(s32, s32, ? *, s32, f32, f32); /* extern */ +? func_800939C8(?, ?, ? *, ?, f32, f32); /* extern */ +? func_80094660(s32, s32); /* extern */ +? func_800947B4(s32, s32); /* extern */ +void *func_800959A0(void *, s32, s32, s32, s32); /* extern */ +void *func_800959CC(void *, s32, s32, s32, s32); /* extern */ +void *func_80096CD8(void *, ?, ?, ?, s32); /* extern */ +void *func_80098C18(void *, s32, s32, s32, s32, s32, s32, s32, s32); /* extern */ +? func_8009A76C(s32, s32, s32, s32); /* extern */ +? func_8009A7EC(s32, s32, s32, s32, s32); /* extern */ +void *func_8009B9D0(void *, ? *); /* extern */ +void *func_8009BA74(void *, ? *, s32, s32); /* extern */ +void *func_8009BC9C(void *, ? *, s32, s32, s32, s32); /* extern */ +? func_800A09E0(void *); /* extern */ +? func_800A0AD0(void *); /* extern */ +? func_800A0B80(void *); /* extern */ +? func_800A0DFC(s32); /* extern */ +? func_800A0EB8(void *, s32); /* extern */ +? func_800A0FA4(void *, s32); /* extern */ +? func_800A10CC(void *); /* extern */ +? func_800A11D0(void *, s32, s32); /* extern */ +? func_800A12BC(void *, ? *); /* extern */ +? func_800A143C(void *, s32); /* extern */ +? func_800A1500(void *); /* extern */ +? func_800A15EC(void *); /* extern */ +? func_800A1780(void *); /* extern */ +? func_800A1924(void *); /* extern */ +? func_800A1A20(void *); /* extern */ +? func_800A1BE0(void *); /* extern */ +? func_800A1DE0(void *); /* extern */ +? func_800A1F30(void *); /* extern */ +? func_800A1FB0(void *); /* extern */ +? func_800A2D1C(void *); /* extern */ +? func_800A2EB8(void *); /* extern */ +? func_800A34A8(void *); /* extern */ +? func_800A3C84(void *); /* extern */ +? func_800A3E60(void *); /* extern */ +? func_800A4A24(void *); /* extern */ +? func_800A4B38(void *); /* extern */ +? func_800A5738(void *); /* extern */ +? func_800A6034(void *); /* extern */ +? func_800A6154(void *); /* extern */ +? func_800A638C(void *); /* extern */ +? func_800A70E8(void *); /* extern */ +? func_800A7258(void *); /* extern */ +? func_800A72FC(void *); /* extern */ +? func_800A7448(void *); /* extern */ +? func_800A75A0(void *); /* extern */ +? func_800A761C(void *); /* extern */ +? func_800A7790(void *); /* extern */ +? func_800A78F4(s32, ? *); /* extern */ +? func_800A7944(s32, ? *); /* extern */ +? func_800A79A4(s32, ? *); /* extern */ +? func_800A8270(s32, void *); /* extern */ +? func_800A8564(void *); /* extern */ +? func_800A86E8(void *); /* extern */ +? func_800A874C(void *); /* extern */ +? func_800A890C(s32, void *); /* extern */ +? func_800A8A98(void *); /* extern */ +? func_800A8CA4(void *); /* extern */ +? func_800A8E14(void *); /* extern */ +? func_800A8EC0(void *); /* extern */ +? func_800A8F48(void *); /* extern */ +? func_800A90D4(s32, void *); /* extern */ +s32 func_800B4EB4(?, ?); /* extern */ +s32 func_800B555C(s32); /* extern */ +? *segmented_to_virtual(s32, s8, s32); /* extern */ +? set_text_color(s32); /* extern */ +extern s32 D_800DC540; +extern s32 D_800DC548; +extern ? D_8018EDE8; +extern s8 D_8018EDED; +extern s8 D_8018EDF3; +extern s8 D_802874F6; +extern ? gCharacterSelections; +extern void *gDisplayListHead; +extern s32 gGfxPool; +extern s32 gGlobalTimer; +static ? D_020014C8; /* unable to generate initializer */ +static ? D_02001540; /* unable to generate initializer */ +static ? D_020015A4; /* unable to generate initializer */ +static ? D_020015CC; /* unable to generate initializer */ +static ? D_02001630; /* unable to generate initializer */ +static ? D_02001658; /* unable to generate initializer */ +static ? D_020045E8; /* unable to generate initializer */ +static ? D_02004610; /* unable to generate initializer */ +static ? D_02004638; /* unable to generate initializer */ +static ? D_02004660; /* unable to generate initializer */ +static ? D_0200487C; /* unable to generate initializer */ +static ? D_02004A34; /* unable to generate initializer */ +static ? D_02004B4C; /* unable to generate initializer */ +static ? D_02004B74; /* unable to generate initializer */ +static ? D_02004E80; /* unable to generate initializer */ +static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ +static ? D_800E7500; /* unable to generate initializer; const */ +static ? D_800E7524; /* unable to generate initializer; const */ +static ? *D_800E7574[8] = { + "mario raceway", + "choco mountain", + "bowser's castle", + "banshee boardwalk", + "yoshi valley", + "frappe snowland", + "koopa troopa beach", + "royal raceway", +}; /* const */ +static ? D_800E7594; /* unable to generate initializer; const */ +static ? *D_800E77A0[2] = { "CONNECT A CONTROLLER TO SOCKET 1,", "THEN POWER ON AGAIN" }; /* const */ +static ? D_800E77A8; /* unable to generate initializer; const */ +static ? D_800E7CA8; /* unable to generate initializer; const */ +static ? D_800E7D4C; /* unable to generate initializer; const */ +static ? D_800E7D54; /* unable to generate initializer; const */ +static ? D_800E817C; /* unable to generate initializer; const */ +static ? D_800E824C; /* unable to generate initializer; const */ +static ? D_800E8254; /* unable to generate initializer; const */ +static ? D_800E8294; /* unable to generate initializer; const */ +static ? D_800E86A8; /* unable to generate initializer; const */ +static ? D_800E86AB; /* unable to generate initializer; const */ +static ? D_800E86AD; /* unable to generate initializer; const */ +static ? D_800EFD64; /* unable to generate initializer; const */ +static ? D_800F2B70; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_8009F5E0.s line 62. +void func_8009F5E0(void *arg0) { + s32 spAC; + s32 spA8; + ? *sp9C; + ? sp80; + s32 sp58; + f32 sp4C; + s32 sp44; + ? **sp40; + s32 sp3C; + f32 sp38; + ? **temp_v0_8; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_a1; + s32 temp_a1_2; + s32 temp_a1_3; + s32 temp_a1_4; + s32 temp_a1_5; + s32 temp_a1_6; + s32 temp_a1_7; + s32 temp_a2_2; + s32 temp_a2_3; + s32 temp_a2_4; + s32 temp_a2_6; + s32 temp_a2_8; + s32 temp_a2_9; + s32 temp_t0; + s32 temp_t1; + s32 temp_t2; + s32 temp_t4; + s32 temp_t5; + s32 temp_t8; + s32 temp_t9; + s32 temp_v0_10; + s32 temp_v0_13; + s32 temp_v0_5; + s32 temp_v0_6; + s32 temp_v0_7; + s32 temp_v0_9; + s32 temp_v1_3; + s32 temp_v1_4; + s32 temp_v1_5; + s32 temp_v1_6; + s32 temp_v1_8; + s8 temp_a2; + s8 temp_a2_5; + s8 temp_a2_7; + s8 temp_v0_11; + s8 temp_v0_12; + s8 temp_v0_4; + s8 temp_v1_7; + void *temp_v0; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v1; + void *temp_v1_2; + f32 phi_f0; + void *phi_v0; + s32 phi_t0; + ? **phi_v0_2; + s32 phi_v1; + s32 phi_t0_2; + s32 phi_v1_2; + s32 phi_a2; + s8 phi_a2_2; + s32 phi_a1; + void *phi_v0_3; + s32 phi_a2_3; + s32 phi_a2_4; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (arg0->unk15 != 0) { + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->unk4 = 0; + temp_v1->unk0 = 0xE7000000; + temp_t0 = arg0->unk0; + phi_t0_2 = temp_t0; + if (temp_t0 >= 0x10F) { + if (temp_t0 >= 0x131) { + switch (temp_t0) { /* switch 1 */ + func_800A7790(arg0); + break; + } + /* Duplicate return node #135. Try simplifying control flow for better match */ + return; + } + switch (temp_t0) { /* switch 2 */ + case 0x12B: /* switch 2 */ + func_800A7258(arg0); + return; + case 0x12C: /* switch 2 */ + func_800A72FC(arg0); + return; + case 0x12D: /* switch 2 */ + func_800A7448(arg0); + return; + case 0x12E: /* switch 2 */ + func_800A75A0(arg0); + return; + case 0x12F: /* switch 2 */ + func_800A761C(arg0); + return; + case 0x130: /* switch 2 */ + if (arg0->unk4 != 0) { + temp_a2 = *(&D_800EFD64 + D_802874F6); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E7D54 + (temp_a2 * 4)), temp_a2), arg0->unkC, arg0->unk10); + func_8009A7EC(arg0->unk18, arg0->unkC, arg0->unk10, 0, arg0->unk1C); + return; + } + /* Duplicate return node #135. Try simplifying control flow for better match */ + return; + } + } else if (temp_t0 >= 0x38) { + switch (temp_t0) { /* switch 3 */ + case 0xFA: /* switch 3 */ + func_80094660(gGfxPool, arg0->unk1C); + return; + case 0xFB: /* switch 3 */ + func_800947B4(gGfxPool, arg0->unk1C); + return; + case 0xD2: /* switch 3 */ + gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_020014C8); + return; + case 0xD3: /* switch 3 */ + gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_02001540); + return; + case 0xD4: /* switch 3 */ + func_800A09E0(arg0); + func_800A0AD0(arg0); + func_800A0B80(arg0); + return; + case 0xD5: /* switch 3 */ + temp_v1_2 = gDisplayListHead; + gDisplayListHead = temp_v1_2 + 8; + temp_v1_2->unk4 = 0xFF; + temp_v1_2->unk0 = 0xFA000000; + temp_v0 = func_8009B9D0(gDisplayListHead, &D_020015A4); + gDisplayListHead = temp_v0; + gDisplayListHead = temp_v0 + 8; + temp_v0->unk4 = 0x320000FF; + temp_v0->unk0 = 0xFA000000; + temp_v0_2 = func_8009B9D0(gDisplayListHead, &D_020015CC); + gDisplayListHead = temp_v0_2; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->unk4 = 0x3200FF; + temp_v0_2->unk0 = 0xFA000000; + temp_v0_3 = func_8009B9D0(gDisplayListHead, &D_02001630); + gDisplayListHead = temp_v0_3; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->unk4 = 0x323200FF; + temp_v0_3->unk0 = 0xFA000000; + gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_02001658); + return; + case 0xD6: /* switch 3 */ + func_8009A76C(arg0->unk0, arg0->unk0, arg0->unk0, -1); + return; + case 0xD7: /* switch 3 */ + func_800A0DFC(temp_t0); + return; + case 0xD8: /* switch 3 */ + case 0xD9: /* switch 3 */ + func_800A0EB8(arg0, temp_t0 - 0xD8); + return; + case 0x58: /* switch 3 */ + case 0x59: /* switch 3 */ + case 0x5A: /* switch 3 */ + case 0x5B: /* switch 3 */ + case 0x5C: /* switch 3 */ + func_800A8A98(arg0); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E817C + (arg0->unk0 * 4))), arg0->unkC, arg0->unk10); + func_800A8CA4(arg0); + return; + case 0x52: /* switch 3 */ + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E817C + (temp_t0 * 4))), arg0->unkC, arg0->unk10); + return; + case 0x5F: /* switch 3 */ + case 0x60: /* switch 3 */ + case 0x61: /* switch 3 */ + case 0x62: /* switch 3 */ + func_800A1500(arg0); + return; + case 0x53: /* switch 3 */ + case 0x54: /* switch 3 */ + case 0x55: /* switch 3 */ + case 0x56: /* switch 3 */ + temp_a0 = temp_t0 - 0x53; + spAC = temp_a0; + func_800A890C(temp_a0, arg0); + func_800A143C(arg0, spAC); + return; + case 0x5D: /* switch 3 */ + func_800A8564(arg0); + gDisplayListHead = func_8009BC9C(gDisplayListHead, &D_02004E80, arg0->unkC, arg0->unk10, 2, arg0->unk1C); + return; + case 0x65: /* switch 3 */ + case 0x66: /* switch 3 */ + if (temp_t0 == 0x65) { + phi_f0 = 0.6f; + } else { + phi_f0 = 0.8f; + } + sp4C = phi_f0; + func_800A86E8(arg0); + set_text_color(3); + func_80093324(arg0->unkC + 8, arg0->unk10 + 0x10, *(&D_800E7594 + (arg0->unk0 * 4)), 0, phi_f0, 0.8f); + func_800A874C(arg0); + return; + case 0x6E: /* switch 3 */ + func_800A8E14(arg0); + return; + case 0x67: /* switch 3 */ + func_800A8EC0(arg0); + return; + case 0x68: /* switch 3 */ + temp_a1 = arg0->unkC; + temp_a2_2 = arg0->unk10; + gDisplayListHead = func_80098C18(gDisplayListHead, temp_a1, temp_a2_2, temp_a1 + 0x3F, temp_a2_2 + 0x11, 1, 1, 1, 0xFF); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E8294 + (D_800DC548 * 4))), arg0->unkC, arg0->unk10); + return; + case 0x69: /* switch 3 */ + func_800A8F48(arg0); + return; + case 0x78: /* switch 3 */ + case 0x79: /* switch 3 */ + case 0x7A: /* switch 3 */ + case 0x7B: /* switch 3 */ + temp_a0_2 = temp_t0 - 0x78; + spAC = temp_a0_2; + func_800A90D4(temp_a0_2, arg0); + func_800A143C(arg0, spAC); + return; + case 0x8C: /* switch 3 */ + temp_v0_4 = D_8018EDED; + if ((temp_v0_4 >= 5) && (spAC == (temp_t0 - spA8))) { + if (temp_v0_4 >= 6) { + temp_a1_2 = arg0->unkC; + temp_a2_3 = arg0->unk10; + phi_v0 = func_80098C18(gDisplayListHead, temp_a1_2, temp_a2_3, temp_a1_2 + 0x3F, temp_a2_3 + 0x11, 0xFF, 0xF9, 0xDC, 0xFF); + } else { + temp_v1_3 = arg0->unk10; + temp_v0_5 = arg0->unkC; + phi_v0 = func_800959A0(gDisplayListHead, temp_v0_5, temp_v1_3, temp_v0_5 + 0x3F, temp_v1_3 + 0x11); + } + } else { + temp_a1_3 = arg0->unkC; + temp_a2_4 = arg0->unk10; + phi_v0 = func_80098C18(gDisplayListHead, temp_a1_3, temp_a2_4, temp_a1_3 + 0x3F, temp_a2_4 + 0x11, 1, 1, 1, 0xFF); + } + gDisplayListHead = phi_v0; + gDisplayListHead = func_8009BA74(gDisplayListHead, &D_02004A34, arg0->unkC, arg0->unk10); + set_text_color(3); + func_800936B8(0x125, 0x1C, "a BUTTON*SEE DATA B BUTTON*EXIT", 0, 0.55f, 0.55f); + return; + case 0x8D: /* switch 3 */ + func_800A1780(arg0); + return; + case 0x7C: /* switch 3 */ + case 0x7D: /* switch 3 */ + case 0x7E: /* switch 3 */ + case 0x7F: /* switch 3 */ + case 0x80: /* switch 3 */ + case 0x81: /* switch 3 */ + case 0x82: /* switch 3 */ + case 0x83: /* switch 3 */ + case 0x84: /* switch 3 */ + case 0x85: /* switch 3 */ + case 0x86: /* switch 3 */ + case 0x87: /* switch 3 */ + case 0x88: /* switch 3 */ + case 0x89: /* switch 3 */ + case 0x8A: /* switch 3 */ + case 0x8B: /* switch 3 */ + func_800A15EC(arg0); + return; + case 0x96: /* switch 3 */ + set_text_color(4); + func_800936B8(arg0->unkC, arg0->unk10, *(&D_800E7500 + (D_800DC540 * 4)), arg0->unk1C, arg0->unk24, 1.0f); + return; + case 0x97: /* switch 3 */ + set_text_color(5); + func_80093324(arg0->unkC, arg0->unk10, *(&D_800E7524 + (gCurrentCourseId * 4)), arg0->unk1C, arg0->unk24, 1.0f); + return; + case 0x98: /* switch 3 */ + func_800A2D1C(arg0); + return; + case 0x5E: /* switch 3 */ + gDisplayListHead = func_80096CD8(gDisplayListHead, 0x19, 0x72, 0x7C, 0x4A); + return; + case 0xAA: /* switch 3 */ + func_800A2EB8(arg0); + return; + case 0xAB: /* switch 3 */ + func_800A34A8(arg0); + return; + case 0xAC: /* switch 3 */ + func_800A6154(arg0); + return; + case 0xAF: /* switch 3 */ + func_800A6034(arg0); + return; + case 0xB0: /* switch 3 */ + func_800A638C(arg0); + return; + case 0xB1: /* switch 3 */ + case 0xB2: /* switch 3 */ + case 0xB3: /* switch 3 */ + case 0xB4: /* switch 3 */ + temp_v0_6 = temp_t0 - 0xB1; + if (arg0->unk4 != 0) { + temp_a2_5 = *(&D_800EFD64 + *(&D_800E86A8 + temp_v0_6)); + spA8 = temp_v0_6; + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E7D54 + (temp_a2_5 * 4)), temp_a2_5), arg0->unkC, arg0->unk10); + func_8009A7EC(arg0->unk18, arg0->unkC, arg0->unk10, spA8, arg0->unk1C); + func_800A11D0(arg0, spA8, 0xFF); + return; + } + /* Duplicate return node #135. Try simplifying control flow for better match */ + return; + case 0xB9: /* switch 3 */ + func_800A3C84(arg0); + return; + case 0xBA: /* switch 3 */ + func_800A3E60(arg0); + return; + case 0xBC: /* switch 3 */ + func_800A4A24(arg0); + return; + case 0xC7: /* switch 3 */ + func_800A4B38(arg0); + return; + case 0xBD: /* switch 3 */ + func_800A5738(arg0); + return; + case 0xE6: /* switch 3 */ + func_800A1924(arg0); + return; + case 0xE7: /* switch 3 */ + func_800A1A20(arg0); + return; + case 0xE8: /* switch 3 */ + func_800A1BE0(arg0); + return; + case 0xE9: /* switch 3 */ + func_800A1DE0(arg0); + return; + case 0xEA: /* switch 3 */ + func_800A1F30(arg0); + return; + case 0xF0: /* switch 3 */ + func_800A1FB0(arg0); + return; + case 0xF1: /* switch 3 */ + gDisplayListHead = func_8009BA74(gDisplayListHead, &D_02004638, arg0->unkC, arg0->unk10); + return; + case 0x10E: /* switch 3 */ + func_800A70E8(arg0); + return; + } + } else { + switch (temp_t0) { /* switch 4 */ + case 0x1: /* switch 4 */ + gDisplayListHead = func_8009BA74(gDisplayListHead, *(&D_800E7D4C + (func_800B555C(temp_t0) * 4)), arg0->unk0, arg0->unk0); + return; + case 0x2: /* switch 4 */ + func_8004C8D4(arg0->unk0 + 0xA0, arg0->unk0 + 0x47); + gDisplayListHead = func_8009BA74(gDisplayListHead, &D_020045E8, arg0->unk0, arg0->unk0); + return; + case 0x3: /* switch 4 */ + if (((gGlobalTimer / 8) % 3) != 0) { + gDisplayListHead = func_8009BA74(gDisplayListHead, &D_02004610, arg0->unk0, arg0->unk0); + return; + } + /* Duplicate return node #135. Try simplifying control flow for better match */ + return; + case 0x5: /* switch 4 */ + temp_t4 = ((func_80093034(*D_800E7574) + 5) * 0.9f) / 2; + gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - temp_t4, 0x7B, temp_t4 + 0xA0, 0xA4, 0, 0, 0, 0x96); + set_text_color(1); + draw_text(0x9B, 0x8C, *D_800E7574, 0, 0.9f, 0.9f); + temp_v1_4 = func_800B4EB4(0, 7) & 0xFFFFF; + if (temp_v1_4 < 0x1EAA) { + set_text_color(gGlobalTimer % 2); + } else if (temp_v1_4 < 0x2329) { + set_text_color(gGlobalTimer % 3); + } else { + set_text_color(3); + } + func_800A78F4(temp_v1_4, &sp80); + func_800939C8(0x77, 0xA0, &sp80, 0, 1.0f, 1.0f); + func_80093324(0x8B, 0xA0, "'", 0, 1.0f, 1.0f); + func_800A7944(temp_v1_4, &sp80); + func_800939C8(0x94, 0xA0, &sp80, 0, 1.0f, 1.0f); + func_80093324(0xA7, 0xA0, "\"", 0, 1.0f, 1.0f); + func_800A79A4(temp_v1_4, &sp80); + func_800939C8(0xB4, 0xA0, &sp80, 0, 1.0f, 1.0f); + return; + case 0x4: /* switch 4 */ + sp58 = func_80093034(D_800E77A0->unk0); + temp_v0_7 = func_80093034(D_800E77A0->unk4); + phi_t0 = sp58; + if (sp58 < temp_v0_7) { + phi_t0 = temp_v0_7; + } + temp_t2 = (phi_t0 * 0.75f) / 2; + temp_t5 = (((0.75f * 2.0f) + 0.5) * 16.0) / 2; + gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - temp_t2, 0xB6 - temp_t5, temp_t2 + 0xA0, temp_t5 + 0xB6, 0, 0, 0, 0x96); + set_text_color(4); + sp38 = 0xB4; + sp3C = 0xA0 - (1.0f * 0.75f); + phi_v0_2 = D_800E77A0; + phi_v1 = 0; + do { + sp40 = phi_v0_2; + sp44 = phi_v1; + draw_text(sp3C, sp38 + (phi_v1 * 0.75f), *phi_v0_2, 0, 0.75f, 0.75f); + temp_v0_8 = phi_v0_2 + 4; + phi_v0_2 = temp_v0_8; + phi_v1 += 0x12; + } while (temp_v0_8 != &D_800E77A8); + return; + case 0x23: /* switch 4 */ + case 0x24: /* switch 4 */ + case 0x25: /* switch 4 */ + gDisplayListHead = func_8009BC9C(gDisplayListHead, *(&D_800E7D4C + (func_800B555C(temp_t0) * 4)), arg0->unkC, arg0->unk10, 3, 0); + return; + case 0xA: /* switch 4 */ + gDisplayListHead = func_8009BA74(gDisplayListHead, &D_02004660, arg0->unkC, arg0->unk10); + return; + case 0xB: /* switch 4 */ + case 0xC: /* switch 4 */ + case 0xD: /* switch 4 */ + case 0xE: /* switch 4 */ + temp_a0_3 = temp_t0 - 0xB; + spAC = temp_a0_3; + func_800A8270(temp_a0_3, arg0); + func_800A0FA4(arg0, spAC); + return; + case 0xF: /* switch 4 */ + func_800A8564(arg0); + gDisplayListHead = func_8009BC9C(gDisplayListHead, &D_0200487C, arg0->unkC, arg0->unk10, 2, arg0->unk1C); + return; + case 0x10: /* switch 4 */ + case 0x11: /* switch 4 */ + temp_v1_5 = arg0->unk1C; + phi_v1_2 = temp_v1_5; + if (temp_v1_5 < 0x20) { + temp_t9 = (temp_v1_5 * 0x3A) / 64; + if ((temp_t0 - 0xF) == D_8018EDED) { + temp_v0_9 = arg0->unkC; + temp_v1_6 = arg0->unk10; + gDisplayListHead = func_800959CC(gDisplayListHead, temp_v0_9 + temp_t9, temp_v1_6, (temp_v0_9 - temp_t9) + 0x39, temp_v1_6 + 0x12); + } else { + temp_v0_10 = arg0->unkC; + temp_a2_6 = arg0->unk10; + gDisplayListHead = func_80098C18(gDisplayListHead, temp_v0_10 + temp_t9, temp_a2_6, (temp_v0_10 - temp_t9) + 0x39, temp_a2_6 + 0x12, 1, 1, 1, 0xFF); + } + phi_t0_2 = arg0->unk0; + phi_v1_2 = arg0->unk1C; + } + temp_t8 = phi_t0_2 - 0xA; + spA8 = temp_t8; + gDisplayListHead = func_8009BC9C(gDisplayListHead, *(&D_800E8254 + (temp_t8 * 4)), arg0->unkC, arg0->unk10, 2, phi_v1_2); + return; + case 0x12: /* switch 4 */ + case 0x13: /* switch 4 */ + case 0x14: /* switch 4 */ + case 0x15: /* switch 4 */ + case 0x16: /* switch 4 */ + case 0x17: /* switch 4 */ + case 0x18: /* switch 4 */ + case 0x19: /* switch 4 */ + temp_v0_11 = D_8018EDF3; + temp_v1_7 = *(&D_800E86AB + temp_v0_11); + temp_a2_7 = *(&D_800E86AD + ((temp_v0_11 * 3) + temp_v1_7)); + temp_a1_4 = *(&D_800F2B70 + ((temp_v0_11 * 0xC) + (temp_v1_7 * 4))); + phi_a2 = temp_a2_7; + phi_a2_2 = temp_a2_7; + phi_a1 = temp_a1_4; + switch (temp_t0) { /* switch 5 */ + case 18: /* switch 5 */ + case 19: /* switch 5 */ + case 20: /* switch 5 */ + case 21: /* switch 5 */ + if ((temp_a1_4 != 0) && (temp_a1_4 != 2)) { + phi_a2 = -1; + } + spA8 = 0x12; + spAC = phi_a2; + sp9C = segmented_to_virtual(*(&D_800E824C + (temp_t0 * 4)), temp_a1_4, phi_a2); + phi_a2_2 = phi_a2; +block_58: + phi_a1 = spA8; + break; + case 22: /* switch 5 */ + case 23: /* switch 5 */ + if (temp_a1_4 != 2) { + phi_a2_2 = -1; + } else { + spA8 = 0x16; + spAC = temp_a2_7; + sp9C = segmented_to_virtual(*(&D_800E824C + (temp_t0 * 4)), 0x16, temp_a2_7); + phi_a2_2 = temp_a2_7; + goto block_58; + } + break; + case 24: /* switch 5 */ + case 25: /* switch 5 */ + if (temp_a1_4 != 1) { + phi_a2_2 = -1; + } else { + spA8 = 0x18; + spAC = temp_a2_7; + sp9C = segmented_to_virtual(*(&D_800E824C + (temp_t0 * 4)), 0x18, temp_a2_7); + phi_a2_2 = temp_a2_7; + goto block_58; + } + break; + } + if (phi_a2_2 != -1) { + temp_v0_12 = D_8018EDED; + if ((temp_v0_12 >= 5) && (phi_a2_2 == (arg0->unk0 - phi_a1))) { + if (temp_v0_12 >= 6) { + temp_a1_5 = arg0->unkC; + temp_a2_8 = arg0->unk10; + phi_v0_3 = func_80098C18(gDisplayListHead, temp_a1_5, temp_a2_8, temp_a1_5 + 0x3F, temp_a2_8 + 0x11, 0xFF, 0xF9, 0xDC, 0xFF); + } else { + temp_v1_8 = arg0->unk10; + temp_v0_13 = arg0->unkC; + phi_v0_3 = func_800959A0(gDisplayListHead, temp_v0_13, temp_v1_8, temp_v0_13 + 0x3F, temp_v1_8 + 0x11); + } + } else { + temp_a1_6 = arg0->unkC; + temp_a2_9 = arg0->unk10; + phi_v0_3 = func_80098C18(gDisplayListHead, temp_a1_6, temp_a2_9, temp_a1_6 + 0x3F, temp_a2_9 + 0x11, 1, 1, 1, 0xFF); + } + gDisplayListHead = phi_v0_3; + gDisplayListHead = func_8009BA74(gDisplayListHead, sp9C, arg0->unkC, arg0->unk10); + return; + } + /* Duplicate return node #135. Try simplifying control flow for better match */ + return; + case 0x1B: /* switch 4 */ + func_800A10CC(arg0); + return; + case 0x2A: /* switch 4 */ + gDisplayListHead = func_8009BA74(gDisplayListHead, &D_02004B4C, arg0->unkC, arg0->unk10); + return; + case 0x34: /* switch 4 */ + case 0x35: /* switch 4 */ + case 0x36: /* switch 4 */ + case 0x37: /* switch 4 */ + temp_a1_7 = temp_t0 - 0x34; + if (*(&gCharacterSelections + temp_a1_7) != 0) { + if (*(&D_8018EDE8 + temp_a1_7) == 0) { + phi_a2_3 = 0xFF; + } else { + temp_t1 = gGlobalTimer % 16; + if (temp_t1 >= 8) { + phi_a2_4 = (temp_t1 * -8) + 0x80; + } else { + phi_a2_4 = temp_t1 * 8; + } + phi_a2_3 = phi_a2_4 + 0xBF; + } + func_800A11D0(arg0, temp_a1_7, phi_a2_3); + return; + } + /* Duplicate return node #135. Try simplifying control flow for better match */ + return; + case 0x33: /* switch 4 */ + func_800A8564(arg0); + gDisplayListHead = func_8009BC9C(gDisplayListHead, &D_02004B74, arg0->unkC, arg0->unk10, 2, arg0->unk1C); + return; + case 0x2B: /* switch 4 */ + case 0x2C: /* switch 4 */ + case 0x2D: /* switch 4 */ + case 0x2E: /* switch 4 */ + case 0x2F: /* switch 4 */ + case 0x30: /* switch 4 */ + case 0x31: /* switch 4 */ + case 0x32: /* switch 4 */ + func_800A12BC(arg0, segmented_to_virtual(*(&D_800E7CA8 + (temp_t0 * 4)))); + case 0xA0: /* switch 3 */ + case 0xA1: /* switch 3 */ + func_8009A76C(arg0->unk18, arg0->unkC, arg0->unk10, arg0->unk1C); + return; + } + } + } else { + default: /* switch 4 */ + default: /* switch 3 */ + default: /* switch 2 */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009F5E0.s") #endif @@ -6979,15 +9612,34 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A0EB8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A0FA4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +static ? D_800E8234; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A0FA4.s line 15. +void func_800A0FA4(void *arg0, s32 arg1) { + u32 temp_t6; + void *temp_s1; + void *temp_s1_2; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + case 2: + case 3: + temp_s1 = (arg1 * 8) + &D_800E8234; + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual(temp_s1->unk0), arg0->unkC, arg0->unk10); + phi_v0 = func_8009BA74(gDisplayListHead, segmented_to_virtual(temp_s1->unk4), arg0->unkC, arg0->unk10); +block_4: + gDisplayListHead = phi_v0; + break; + case 1: + case 4: + temp_s1_2 = (arg1 * 8) + &D_800E8234; + gDisplayListHead = func_8009BC9C(gDisplayListHead, segmented_to_virtual(temp_s1_2->unk0), arg0->unkC, arg0->unk10, 2, arg0->unk1C); + phi_v0 = func_8009BC9C(gDisplayListHead, segmented_to_virtual(temp_s1_2->unk4), arg0->unkC, arg0->unk10, 2, arg0->unk1C); + goto block_4; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A0FA4.s") #endif @@ -7036,29 +9688,53 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A11D0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A12BC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_800A12BC(void *arg0) { + u32 temp_t6; + s32 phi_v0; -Unable to determine jump table for jr instruction at func_800A12BC.s line 13. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + case 2: + case 4: + phi_v0 = func_8009BA74(gDisplayListHead, MIPS2C_ERROR(Read from unset register $a1), arg0->unkC); +block_4: + gDisplayListHead = phi_v0; + break; + case 1: + case 3: + phi_v0 = func_8009BC9C(gDisplayListHead, MIPS2C_ERROR(Read from unset register $a1), arg0->unkC, arg0->unk10, 2, arg0->unk1C); + goto block_4; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A12BC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A143C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +static ? D_800E82C8; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A143C.s line 13. +void func_800A143C(void *arg0, s32 arg1) { + u32 temp_t6; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + case 2: + case 3: + phi_v0 = func_8009BA74(gDisplayListHead, segmented_to_virtual(*(&D_800E82C8 + (arg1 * 4))), arg0->unkC, arg0->unk10); +block_4: + gDisplayListHead = phi_v0; + break; + case 1: + case 4: + phi_v0 = func_8009BC9C(gDisplayListHead, segmented_to_virtual(*(&D_800E82C8 + (arg1 * 4))), arg0->unkC, arg0->unk10, 2, arg0->unk1C); + goto block_4; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A143C.s") #endif @@ -7421,15 +10097,462 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A1F30.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A1FB0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +Gfx *draw_box(Gfx *, ?, ?, ?, s32, s32, s32, s32, s32); /* extern */ +? draw_text(s32, s32, ? *, ?, f32, f32); /* extern */ +? func_800921C0(s32, s32, ?); /* extern */ +? func_80092224(s32, s32, ?); /* extern */ +? func_80093324(s16, s16, ? *, ?, f32, f32); /* extern */ +? func_800A66A8(void *, s16 *); /* extern */ +? func_800A7894(s32, ? *); /* extern */ +? set_text_color(s32); /* extern */ +extern ? D_8018EE10; +static ? D_800E75C4; /* unable to generate initializer; const */ +static ? D_800E7710; /* unable to generate initializer; const */ +static ? *D_800E7840[2] = { "quit", "erase" }; /* const */ +static ? *D_800E7868[4] = { + "RETURN TO GAME SELECT", + "SOUND MODE", + "COPY N64 CONTROLLER PAK", + "ERASE ALL DATA", +}; /* const */ +static ? *D_800E7878[3] = { "ALL SAVED DATA WILL BE", "PERMANENTLY ERASED.", "ARE YOU REALLY SURE?" }; /* const */ +static ? *D_800E7884[3] = { "", "ALL SAVED DATA", "HAS BEEN NOW ERASED." }; /* const */ +static ? D_800E7890; /* unable to generate initializer; const */ +static ? D_800E78D0; /* unable to generate initializer; const */ +static ? D_800E7900; /* unable to generate initializer; const */ +static ? *D_800E7918[2] = { "CONTROLLER 1", "CONTROLLER 2" }; /* const */ +static ? D_800E7920; /* unable to generate initializer; const */ +static ? *D_800E7928[2] = { "CURRENT DATA WILL BE ERASED,", "IS THIS OK?" }; /* const */ +static ? *D_800E7930[2] = { "QUIT", "COPY" }; /* const */ +static ? D_800E7938; /* unable to generate initializer; const */ +static ? *D_800E7A44 = "NO DATA"; /* const */ +static ? *D_800E7A48[3] = { "CREATING ", "MARIO KART 64 ", "GAME DATA" }; /* const */ +static ? D_800E7A54; /* unable to generate initializer; const */ +static ? gCupTrackOrder; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A1FB0.s line 903. +void func_800A1FB0(void *arg0) { + s16 spE2; + s16 spE0; + ? spB9; + ? spB8; + ? spA9; + ? spA8; + ? sp99; + ? sp98; + s32 sp88; + ? **sp84; + ? **sp78; + ? **temp_s0_4; + ? **temp_s1; + ? **temp_s1_2; + ? **temp_s1_3; + ? **temp_v0_3; + s16 temp_s0; + s16 temp_s0_2; + s16 temp_s0_3; + s16 temp_s3; + s16 temp_s3_3; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_s1_4; + s32 temp_s1_5; + s32 temp_s1_6; + s32 temp_s2; + s32 temp_s2_2; + s32 temp_s2_3; + s32 temp_s3_2; + s8 temp_v0; + s8 temp_v0_2; + s8 temp_v0_4; + s8 temp_v1; + s8 temp_v1_2; + s32 phi_a0; + s32 phi_s2; + s16 phi_s0; + ? **phi_s1; + s16 phi_s0_2; + ? **phi_s1_2; + s32 phi_a0_2; + s32 phi_s2_2; + s16 phi_s0_3; + ? **phi_s1_3; + s16 phi_s0_4; + ? **phi_s1_4; + s16 phi_s0_5; + ? **phi_s1_5; + s16 phi_s0_6; + ? **phi_s1_6; + s16 phi_s0_7; + ? **phi_s1_7; + s16 phi_s0_8; + ? **phi_s1_8; + s32 phi_s4; + s16 phi_s3; + s32 phi_s5; + s32 phi_s0_9; + s16 phi_s6; + s16 phi_s2_3; + void *phi_v1; + s32 phi_s1_9; + ? **phi_s0_10; + s16 phi_s3_2; + s32 phi_s0_11; + s16 phi_s6_2; + s16 phi_s2_4; + void *phi_v1_2; + s32 phi_s2_5; + s16 phi_s1_10; + ? **phi_s3_3; + s16 phi_s3_4; + s32 phi_s0_12; + s16 phi_s6_3; + s16 phi_s2_6; + void *phi_v1_3; + s8 phi_v1_4; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x140, 0xF0, 0, 0, 0, 0x64); + temp_v1 = D_8018EDEC; + phi_v1_4 = temp_v1; + switch (temp_v1) { /* switch 1 */ + case 0x15: /* switch 1 */ + case 0x16: /* switch 1 */ + case 0x17: /* switch 1 */ + case 0x18: /* switch 1 */ + phi_a0 = temp_v1 - 0x15; + phi_s2 = 0; + phi_s0 = 0x55; + phi_s1 = D_800E7868; + do { + func_80092224(phi_a0, phi_s2, 3); + func_80093324(0x32, phi_s0, *phi_s1, 0, 0.9f, 1.0f); + temp_a0 = D_8018EDEC - 0x15; + phi_a0 = temp_a0; + phi_s1 += 4; + if (phi_s2 == temp_a0) { + spE0 = 0x32; + spE2 = phi_s0; + } + temp_s2 = phi_s2 + 1; + phi_s2 = temp_s2; + phi_s0 += 0x23; + } while (temp_s2 != 4); + set_text_color(1); + draw_text(0xE6, 0x78, *(&D_800E7710 + (D_8018EDF2 * 4)), 0, 1.0f, 1.0f); +block_98: + phi_v1_4 = D_8018EDEC; + break; + case 0x1E: /* switch 1 */ + case 0x1F: /* switch 1 */ + set_text_color(3); + phi_s0_2 = 0x55; + phi_s1_2 = D_800E7878; + do { + func_80093324(0x28, phi_s0_2, *phi_s1_2, 0, 1.0f, 1.0f); + temp_s1 = phi_s1_2 + 4; + phi_s0_2 += 0x14; + phi_s1_2 = temp_s1; + } while (temp_s1 < D_800E7884); + phi_a0_2 = D_8018EDEC - 0x1E; + phi_s2_2 = 0; + phi_s0_3 = 0x96; + phi_s1_3 = D_800E7840; + do { + func_80092224(phi_a0_2, phi_s2_2, 1); + func_80093324(0x84, phi_s0_3, *phi_s1_3, 0, 1.0f, 1.0f); + temp_v1_2 = D_8018EDEC; + temp_a0_2 = temp_v1_2 - 0x1E; + phi_a0_2 = temp_a0_2; + phi_s1_3 += 4; + phi_v1_4 = temp_v1_2; + if (phi_s2_2 == temp_a0_2) { + spE0 = 0x84; + spE2 = phi_s0_3; + } + temp_s2_2 = phi_s2_2 + 1; + phi_s2_2 = temp_s2_2; + phi_s0_3 += 0x19; + } while (temp_s2_2 != 2); + break; + case 0x20: /* switch 1 */ + set_text_color(3); + phi_s0_4 = 0x55; + phi_s1_4 = D_800E7884; + do { + func_80093324(0x32, phi_s0_4, *phi_s1_4, 0, 1.0f, 1.0f); + temp_s1_2 = phi_s1_4 + 4; + phi_s0_4 += 0x14; + phi_s1_4 = temp_s1_2; + } while (temp_s1_2 != &D_800E7890); + goto block_98; + case 0x2A: /* switch 1 */ + case 0x2B: /* switch 1 */ + case 0x2C: /* switch 1 */ + case 0x2D: /* switch 1 */ + set_text_color(2); + phi_s0_5 = 0x55; + phi_s1_5 = ((D_8018EDEC - 0x2A) * 0xC) + &D_800E78D0; + do { + func_80093324(0x32, phi_s0_5, *phi_s1_5, 0, 0.9f, 0.9f); + temp_s0 = phi_s0_5 + 0x14; + phi_s0_5 = temp_s0; + phi_s1_5 += 4; + } while (temp_s0 != 0x91); + goto block_98; + case 0x34: /* switch 1 */ + case 0x35: /* switch 1 */ + case 0x36: /* switch 1 */ + case 0x37: /* switch 1 */ + set_text_color(2); + phi_s0_6 = 0x55; + phi_s1_6 = ((D_8018EDEC - 0x34) * 0x10) + &D_800E7890; + do { + func_80093324(0x23, phi_s0_6, *phi_s1_6, 0, 0.8f, 0.8f); + temp_s0_2 = phi_s0_6 + 0x14; + phi_s0_6 = temp_s0_2; + phi_s1_6 += 4; + } while (temp_s0_2 != 0xA5); + goto block_98; + case 0x41: /* switch 1 */ + case 0x42: /* switch 1 */ + set_text_color(2); + phi_s0_7 = 0x55; + phi_s1_7 = ((D_8018EDEC - 0x41) * 0xC) + &D_800E7900; + do { + func_80093324(0x41, phi_s0_7, *phi_s1_7, 0, 0.9f, 0.9f); + temp_s0_3 = phi_s0_7 + 0x14; + phi_s0_7 = temp_s0_3; + phi_s1_7 += 4; + } while (temp_s0_3 != 0x91); + goto block_98; + case 0x46: /* switch 1 */ + case 0x47: /* switch 1 */ + set_text_color(3); + phi_s0_8 = 0x55; + phi_s1_8 = D_800E7A48; + do { + func_80093324(0x50, phi_s0_8, *phi_s1_8, 0, 1.0f, 1.0f); + temp_s1_3 = phi_s1_8 + 4; + phi_s0_8 += 0x14; + phi_s1_8 = temp_s1_3; + } while (temp_s1_3 != &D_800E7A54); + goto block_98; + case 0x28: /* switch 1 */ + case 0x29: /* switch 1 */ + case 0x32: /* switch 1 */ + case 0x33: /* switch 1 */ + phi_s5 = 0x28; + if ((temp_v1 != 0x28) && (temp_v1 != 0x29)) { + phi_s5 = 0x32; + if ((temp_v1 != 0x32) && (phi_s4 = spC0, (temp_v1 != 0x33))) { + phi_s5 = spC4; + } else { + phi_s4 = 1; + } + } else { + phi_s4 = 0; + } + set_text_color(phi_s4 + 1); + draw_text(0xA0, 0x55, *(&D_800E7920 + (phi_s4 * 4)), 0, 0.6f, 0.6f); + sp88 = 0x5C; + sp78 = (phi_s4 * 0x89) + 0x2A; + sp84 = D_800E7918; + phi_s3 = 0x2A; + phi_s6 = 0x20; + do { + set_text_color(3); + draw_text(sp88, 0x7D, *sp84, 0, 0.75f, 0.75f); + phi_s0_9 = 0; + phi_s2_3 = 0x96; +loop_38: + if (phi_s3 != sp78) { + func_800921C0(D_8018EDEC - phi_s5, phi_s0_9, 1); + if (phi_s0_9 == (D_8018EDEC - phi_s5)) { + spE0 = phi_s6; + spE2 = phi_s2_3; + } + } else if ((phi_s4 != 0) && (phi_s0_9 == arg0->unk20)) { + set_text_color(gGlobalTimer % 3); + } else { + set_text_color(1); + } + temp_s1_4 = phi_s0_9 + 1; + func_800A7894(temp_s1_4, &spB8); + func_80093324(phi_s6, phi_s2_3, &spB9, 0, 0.6f, 0.6f); + if (phi_s3 == 0x2A) { + phi_v1 = (phi_s0_9 << 7) + &D_8018EE10; + } else { + phi_v1 = D_8018D9C0 + (phi_s0_9 << 7); + } + if (phi_v1->unk4 == 0) { + func_80093324(phi_s3, phi_s2_3, D_800E7A44, 0, 0.5f, 0.5f); + } else { + temp_v0 = phi_v1->unk5; + func_80093324(phi_s3, phi_s2_3, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0 / 4) * 8) + ((temp_v0 % 4) * 2))) * 4)), 0, 0.5f, 0.5f); + } + phi_s0_9 = temp_s1_4; + phi_s2_3 += 0x1E; + if (temp_s1_4 != 2) { + goto loop_38; + } + temp_s3 = phi_s3 + 0x89; + sp84 += 4; + sp88 += 0x82; + phi_s3 = temp_s3; + phi_s6 += 0x89; + } while (temp_s3 != 0x13C); + goto block_98; + case 0x38: /* switch 1 */ + case 0x39: /* switch 1 */ + set_text_color(2); + phi_s1_9 = 0x4D; + phi_s0_10 = D_800E7928; + do { + draw_text(0xA0, phi_s1_9, *phi_s0_10, 0, 0.8f, 0.8f); + temp_s0_4 = phi_s0_10 + 4; + phi_s1_9 += 0x14; + phi_s0_10 = temp_s0_4; + } while (temp_s0_4 < D_800E7930); + sp88 = 0x5C; + sp84 = D_800E7918; + phi_s3_2 = 0x2A; + phi_s6_2 = 0x20; + do { + set_text_color(3); + draw_text(sp88, 0x7D, *sp84, 0, 0.75f, 0.75f); + phi_s0_11 = 0; + phi_s2_4 = 0x96; +loop_58: + if (phi_s3_2 == 0x2A) { + if (phi_s0_11 == arg0->unk1C) { + set_text_color(gGlobalTimer % 3); + } else { + set_text_color(1); + } + } else if (phi_s0_11 == arg0->unk20) { + set_text_color(gGlobalTimer % 3); + } else { + set_text_color(1); + } + temp_s1_5 = phi_s0_11 + 1; + func_800A7894(temp_s1_5, &spA8); + func_80093324(phi_s6_2, phi_s2_4, &spA9, 0, 0.6f, 0.6f); + if (phi_s3_2 == 0x2A) { + phi_v1_2 = (phi_s0_11 << 7) + &D_8018EE10; + } else { + phi_v1_2 = D_8018D9C0 + (phi_s0_11 << 7); + } + if (phi_v1_2->unk4 == 0) { + func_80093324(phi_s3_2, phi_s2_4, D_800E7A44, 0, 0.5f, 0.5f); + } else { + temp_v0_2 = phi_v1_2->unk5; + func_80093324(phi_s3_2, phi_s2_4, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), 0, 0.5f, 0.5f); + } + phi_s0_11 = temp_s1_5; + phi_s2_4 += 0x1E; + if (temp_s1_5 != 2) { + goto loop_58; + } + temp_s3_2 = phi_s3_2 + 0x89; + sp84 += 4; + sp88 += 0x82; + phi_s3_2 = temp_s3_2; + phi_s6_2 += 0x89; + } while (temp_s3_2 < 0x13C); + phi_s2_5 = 0; + phi_s1_10 = 0x6E; + phi_s3_3 = D_800E7930; + do { + temp_a0_3 = D_8018EDEC - 0x38; + if (phi_s2_5 == temp_a0_3) { + spE0 = phi_s1_10; + spE2 = 0xD2; + } + func_800921C0(temp_a0_3, temp_s1_5, 3); + func_80093324(phi_s1_10, 0xD2, *phi_s3_3, 0, 0.75f, 0.75f); + temp_s2_3 = phi_s2_5 + 1; + phi_s2_5 = temp_s2_3; + phi_s1_10 += 0x32; + phi_s3_3 += 4; + } while (temp_s2_3 != 2); + goto block_98; + case 0x3A: /* switch 1 */ + case 0x3B: /* switch 1 */ + case 0x3C: /* switch 1 */ + set_text_color(2); + temp_v0_3 = (((temp_v1 - 0x3A) / 2) * 4) + &D_800E7938; + sp78 = temp_v0_3; + draw_text(0xA0, 0x55, *temp_v0_3, 0, 1.0f, 1.0f); + sp88 = 0x5C; + sp84 = D_800E7918; + phi_s3_4 = 0x2A; + phi_s6_3 = 0x20; + do { + set_text_color(3); + draw_text(sp88, 0x7D, *sp84, 0, 0.75f, 0.75f); + phi_s0_12 = 0; + phi_s2_6 = 0x96; +loop_80: + if (phi_s3_4 == 0x2A) { + if (phi_s0_12 == arg0->unk1C) { + if (sp78 == &D_800E7938) { + set_text_color(2); + } else { + set_text_color(gGlobalTimer % 3); + } + } else { + set_text_color(1); + } + } else if (phi_s0_12 == arg0->unk20) { + set_text_color(2); + } else { + set_text_color(1); + } + temp_s1_6 = phi_s0_12 + 1; + func_800A7894(temp_s1_6, &sp98); + func_80093324(phi_s6_3, phi_s2_6, &sp99, 0, 0.6f, 0.6f); + if (phi_s3_4 == 0x2A) { + phi_v1_3 = (phi_s0_12 << 7) + &D_8018EE10; + } else { + phi_v1_3 = D_8018D9C0 + (phi_s0_12 << 7); + } + if (phi_v1_3->unk4 == 0) { + func_80093324(phi_s3_4, phi_s2_6, D_800E7A44, 0, 0.5f, 0.5f); + } else { + temp_v0_4 = phi_v1_3->unk5; + func_80093324(phi_s3_4, phi_s2_6, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_4 / 4) * 8) + ((temp_v0_4 % 4) * 2))) * 4)), 0, 0.5f, 0.5f); + } + phi_s0_12 = temp_s1_6; + phi_s2_6 += 0x1E; + if (temp_s1_6 != 2) { + goto loop_80; + } + temp_s3_3 = phi_s3_4 + 0x89; + sp84 += 4; + sp88 += 0x82; + phi_s3_4 = temp_s3_3; + phi_s6_3 += 0x89; + } while (temp_s3_3 != 0x13C); + goto block_98; + } + switch (phi_v1_4) { /* switch 2 */ + case 0x28: /* switch 2 */ + case 0x29: /* switch 2 */ + case 0x32: /* switch 2 */ + case 0x33: /* switch 2 */ + case 0x38: /* switch 2 */ + case 0x39: /* switch 2 */ + spE0 += -5; + spE2 += -6; + break; + default: /* switch 2 */ + spE0 += -0xA; + spE2 += -8; + break; + } + func_800A66A8(arg0, &spE0); +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A1FB0.s") #endif @@ -7986,15 +11109,277 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A3C84.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A3E60: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? draw_text(s32, s32, ? *, ?, f32, f32); /* extern */ +? func_800921C0(s32, s32, ?); /* extern */ +? func_80093324(s32, s32, ? *, ?, f32, f32); /* extern */ +? func_80093358(s32, s32, ? *, ?, f32, f32); /* extern */ +? func_800A4550(s32, s32, s32); /* extern */ +? func_800A66A8(void *, s16 *); /* extern */ +? func_800A7894(s32, ? *); /* extern */ +? set_text_color(?); /* extern */ +extern ? D_8018EE10; +static ? D_800E7390; /* unable to generate initializer; const */ +static ? D_800E73C0; /* unable to generate initializer; const */ +static ? D_800E73D0; /* unable to generate initializer; const */ +static ? D_800E7574; /* unable to generate initializer; const */ +static ? D_800E75C4; /* unable to generate initializer; const */ +static ? *D_800E7730 = "LAP TIME"; /* const */ +static ? D_800E775C; /* unable to generate initializer; const */ +static ? D_800E798C; /* unable to generate initializer; const */ +static ? *D_800E7A3C[2] = { "SELECT THE FILE ", "YOU WANT TO SAVE" }; /* const */ +static ? *D_800E7A44 = "NO DATA"; /* const */ +static ? *D_800E7A48[3] = { "CREATING ", "MARIO KART 64 ", "GAME DATA" }; /* const */ +static ? D_800E7A54; /* unable to generate initializer; const */ +static ? *D_800E7A60[3] = { "THE PREVIOUS DATA ", "WILL BE ERASED, ", "IS THIS OK?" }; /* const */ +static ? *D_800E7A6C[2] = { "QUIT", "SAVE" }; /* const */ +static ? *D_800E7A74[3] = { "SAVING GHOST DATA", "", "PLEASE WAIT" }; /* const */ +static ? *D_800E7A80[2] = { "UNABLE TO SAVE ", "THE GHOST" }; /* const */ +static ? D_800E7A88; /* unable to generate initializer; const */ +static ? gCupTrackOrder; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A3E60.s line 427. +void func_800A3E60(void *arg0) { + s16 sp86; + s16 sp84; + s32 sp6C; + ? sp61; + ? sp60; + s32 sp54; + ? **sp50; + ? **temp_s0_2; + ? **temp_s0_3; + ? **temp_v0_3; + ? **temp_v0_4; + ? **temp_v0_5; + Gfx *temp_v1_2; + s16 *temp_a1; + s32 temp_a0; + s32 temp_s0; + s32 temp_s1; + s32 temp_s1_2; + s32 temp_s1_3; + s32 temp_v0; + s32 temp_v1; + s8 temp_v0_2; + s32 phi_s1; + s32 phi_s0; + s32 phi_s1_2; + s32 phi_v1; + s32 phi_s2; + ? *phi_s0_2; + ? **phi_v0; + s32 phi_s0_3; + s32 phi_s2_2; + ? **phi_s0_4; + s32 phi_s1_3; + s32 phi_s0_5; + ? *phi_s2_3; + ? **phi_v0_2; + s32 phi_s0_6; + s32 phi_s2_4; + ? **phi_s0_7; + s32 phi_s1_4; + s32 phi_s0_8; + ? **phi_s2_5; + ? **phi_v0_3; + s32 phi_s0_9; + ? **phi_v0_4; + s32 phi_s0_10; + void *phi_v0_5; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk4; + if ((temp_v0 != 0) && (temp_v0 != 0x1F)) { + set_text_color(4); + draw_text(arg0->unkC + 0x55, 0x19 - arg0->unk10, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, 0.6f, 0.6f); + set_text_color(3); + draw_text(arg0->unkC + 0x55, 0x28 - arg0->unk10, D_800E7730, 0, 0.75f, 0.75f); + phi_s1 = 0; + phi_s0 = 0; + phi_s1_2 = 0; + phi_s1_3 = 0; + phi_s1_4 = 0; + do { + func_800A4550(phi_s1, arg0->unkC + 0x26, (phi_s0 - arg0->unk10) + 0x37); + temp_s1 = phi_s1 + 1; + phi_s1 = temp_s1; + phi_s0 += 0xF; + } while (temp_s1 < 4); + temp_v1 = arg0->unk4; + switch (temp_v1) { /* switch 1 */ + case 1: /* switch 1 */ + case 5: /* switch 1 */ + case 6: /* switch 1 */ + case 7: /* switch 1 */ + case 8: /* switch 1 */ + case 9: /* switch 1 */ + case 10: /* switch 1 */ + case 30: /* switch 1 */ + phi_s2 = 0; + phi_s0_2 = &D_800E775C; + do { + sp6C = 0; + func_800921C0(arg0->unk4 - 5, phi_s1_2, 1); + phi_v1 = sp6C; + if (phi_s1_2 != 4) { + if (phi_s1_2 != 5) { + + } else if (D_80162DD4 != 0) { + phi_v1 = 2; + } + } else if (D_80162DF8 == 1) { + phi_v1 = 1; + } + if (phi_v1 != 0) { + set_text_color(0); + temp_v1_2 = gDisplayListHead; + gDisplayListHead = temp_v1_2 + 8; + temp_v1_2->words.w1 = 0x96; + temp_v1_2->words.w0 = 0xFA000000; + func_80093358(0xB2 - arg0->unkC, arg0->unk10 + phi_s2 + 0x93, phi_s0_2->unk4, 0, 0.75f, 0.75f); + } else { + func_80093324(0xB2 - arg0->unkC, arg0->unk10 + phi_s2 + 0x93, phi_s0_2->unk4, 0, 0.75f, 0.75f); + } + temp_s1_2 = phi_s1_2 + 1; + phi_s1_2 = temp_s1_2; + phi_s2 += 0xD; + phi_s0_2 += 4; + } while (temp_s1_2 != 6); +block_43: + break; + case 11: /* switch 1 */ + case 12: /* switch 1 */ + case 13: /* switch 1 */ + case 14: /* switch 1 */ + case 15: /* switch 1 */ + case 16: /* switch 1 */ + set_text_color(3); + phi_v0 = ((arg0->unk4 - 0xB) * 0x1C) + &D_800E798C; + phi_s0_3 = 0x8C; + do { + sp50 = phi_v0; + func_80093324(0xA2, phi_s0_3, *phi_v0, 0, 0.6f, 0.6f); + temp_s0 = phi_s0_3 + 0xD; + phi_v0 += 4; + phi_s0_3 = temp_s0; + } while (temp_s0 != 0xE7); + goto block_43; + case 17: /* switch 1 */ + case 18: /* switch 1 */ + set_text_color(1); + phi_s2_2 = 0; + phi_s0_4 = D_800E7A3C; + do { + func_80093324(0xA5, arg0->unk10 + phi_s2_2 + 0x8C, *phi_s0_4, 0, 0.7f, 0.7f); + temp_s0_2 = phi_s0_4 + 4; + phi_s2_2 += 0xD; + phi_s0_4 = temp_s0_2; + } while (temp_s0_2 < &D_800E7A44); + phi_s0_5 = 0xAA; + phi_s2_3 = &D_8018EE10; + do { + func_800921C0(arg0->unk4 - 0x11, phi_s1_3, 1); + temp_a0 = phi_s1_3 + 1; + sp54 = temp_a0; + func_800A7894(temp_a0, &sp60); + func_80093324(0xB1 - arg0->unkC, phi_s0_5, &sp61, 0, 0.6f, 0.6f); + if (phi_s2_3->unk4 == 0) { + func_80093324(0xBB - arg0->unkC, phi_s0_5, D_800E7A44, 0, 0.45f, 0.45f); + } else { + temp_v0_2 = phi_s2_3->unk5; + func_80093324(0xBB - arg0->unkC, phi_s0_5, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_2 / 4) * 8) + ((temp_v0_2 % 4) * 2))) * 4)), 0, 0.45f, 0.45f); + } + phi_s1_3 = sp54; + phi_s0_5 += 0x1E; + phi_s2_3 += 0x80; + } while (sp54 != 2); + goto block_43; + case 19: /* switch 1 */ + set_text_color(3); + phi_v0_2 = D_800E7A48; + phi_s0_6 = 0x93; + do { + sp50 = phi_v0_2; + func_80093324(0xAA, phi_s0_6, *phi_v0_2, 0, 0.8f, 0.8f); + temp_v0_3 = phi_v0_2 + 4; + phi_v0_2 = temp_v0_3; + phi_s0_6 += 0xD; + } while (temp_v0_3 != &D_800E7A54); + goto block_43; + case 20: /* switch 1 */ + case 21: /* switch 1 */ + set_text_color(3); + phi_s2_4 = 0; + phi_s0_7 = D_800E7A60; + do { + func_80093324(0xA3, arg0->unk10 + phi_s2_4 + 0x8C, *phi_s0_7, 0, 0.67f, 0.67f); + temp_s0_3 = phi_s0_7 + 4; + phi_s2_4 += 0xD; + phi_s0_7 = temp_s0_3; + } while (temp_s0_3 < D_800E7A6C); + phi_s0_8 = 0xB9; + phi_s2_5 = D_800E7A6C; + do { + func_800921C0(arg0->unk4 - 0x14, phi_s1_4, 1); + func_80093324(0xC8 - arg0->unkC, phi_s0_8, *phi_s2_5, 0, 0.75f, 0.75f); + temp_s1_3 = phi_s1_4 + 1; + phi_s1_4 = temp_s1_3; + phi_s0_8 += 0xF; + phi_s2_5 += 4; + } while (temp_s1_3 != 2); + goto block_43; + case 25: /* switch 1 */ + set_text_color(3); + phi_v0_3 = D_800E7A74; + phi_s0_9 = 0x93; + do { + sp50 = phi_v0_3; + func_80093324(0xA3, phi_s0_9, *phi_v0_3, 0, 0.67f, 0.67f); + temp_v0_4 = phi_v0_3 + 4; + phi_v0_3 = temp_v0_4; + phi_s0_9 += 0xD; + } while (temp_v0_4 != D_800E7A80); + goto block_43; + case 26: /* switch 1 */ + set_text_color(3); + phi_v0_4 = D_800E7A80; + phi_s0_10 = 0x93; + do { + sp50 = phi_v0_4; + func_80093324(0xAA, phi_s0_10, *phi_v0_4, 0, 0.75f, 0.75f); + temp_v0_5 = phi_v0_4 + 4; + phi_v0_4 = temp_v0_5; + phi_s0_10 += 0xD; + } while (temp_v0_5 != &D_800E7A88); + goto block_43; + } + switch (arg0->unk4) { /* switch 2 */ + case 5: /* switch 2 */ + case 6: /* switch 2 */ + case 7: /* switch 2 */ + case 8: /* switch 2 */ + case 9: /* switch 2 */ + case 10: /* switch 2 */ + phi_v0_5 = (arg0->unk4 * 8) - 0x28 + &D_800E7390; +block_50: + temp_a1 = &sp84; + sp84 = phi_v0_5->unk0 - arg0->unkC; + sp86 = phi_v0_5->unk2 + arg0->unk10; + func_800A66A8(arg0, temp_a1); + break; + case 17: /* switch 2 */ + case 18: /* switch 2 */ + phi_v0_5 = (arg0->unk4 * 8) - 0x88 + &D_800E73C0; + goto block_50; + case 20: /* switch 2 */ + case 21: /* switch 2 */ + phi_v0_5 = (arg0->unk4 * 8) - 0xA0 + &D_800E73D0; + goto block_50; + case 30: /* switch 2 */ + phi_v0_5 = (arg0->unk1C * 8) - 0x28 + &D_800E7390; + goto block_50; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A3E60.s") #endif @@ -8554,15 +11939,310 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A54EC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A5738: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +Gfx *draw_box(Gfx *, ?, ?, s32, s32, s32, s32, s32, s32); /* extern */ +? func_800921C0(s32, s32, ?); /* extern */ +s32 func_80093034(? *); /* extern */ +? func_80093324(s32, s32, ? *, ?, f32, f32); /* extern */ +? func_80093358(s16, s32, ? *, ?, f32, f32); /* extern */ +? func_80093754(?, ?, s32, ?, f32, f32); /* extern */ +? func_800A66A8(void *, s16 *); /* extern */ +? func_800A7894(s32, ? *); /* extern */ +? func_800A78F4(s32, ? *); /* extern */ +? func_800A7944(s32, ? *); /* extern */ +? func_800A79A4(s32, ? *); /* extern */ +s32 func_800B4E24(?); /* extern */ +? set_text_color(?); /* extern */ +? text_draw(?, ?, ? *, ?, f32, f32); /* extern */ +extern ? D_8018EE10; +static ? D_800E73E0; /* unable to generate initializer; const */ +static ? D_800E7410; /* unable to generate initializer; const */ +static ? D_800E7420; /* unable to generate initializer; const */ +static ? D_800E7574; /* unable to generate initializer; const */ +static ? D_800E75C4; /* unable to generate initializer; const */ +static ? D_800E7728; /* unable to generate initializer; const */ +static ? *D_800E775C[7] = { + "CONTINUE GAME", + "RETRY", + "COURSE CHANGE", + "DRIVER CHANGE", + "QUIT", + "REPLAY", + "SAVE GHOST", +}; /* const */ +static ? D_800E798C; /* unable to generate initializer; const */ +static ? *D_800E7A3C[2] = { "SELECT THE FILE ", "YOU WANT TO SAVE" }; /* const */ +static ? *D_800E7A44 = "NO DATA"; /* const */ +static ? *D_800E7A48[3] = { "CREATING ", "MARIO KART 64 ", "GAME DATA" }; /* const */ +static ? D_800E7A54; /* unable to generate initializer; const */ +static ? *D_800E7A60[3] = { "THE PREVIOUS DATA ", "WILL BE ERASED, ", "IS THIS OK?" }; /* const */ +static ? *D_800E7A6C[2] = { "QUIT", "SAVE" }; /* const */ +static ? *D_800E7A74[3] = { "SAVING GHOST DATA", "", "PLEASE WAIT" }; /* const */ +static ? *D_800E7A80[2] = { "UNABLE TO SAVE ", "THE GHOST" }; /* const */ +static ? D_800E7A88; /* unable to generate initializer; const */ +static s16 D_800E8538; /* type too large by 2; unable to generate initializer; const */ +static s16 D_800E853A; /* type too large by 2; unable to generate initializer; const */ +static ? gCupTrackOrder; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A5738.s line 570. +void func_800A5738(void *arg0) { + s16 sp9A; + s16 sp98; + ? sp84; + ? sp5D; + ? sp5C; + s32 sp54; + ? **sp50; + ? **temp_v0_2; + ? **temp_v0_4; + ? **temp_v0_5; + ? **temp_v0_6; + ? **temp_v0_7; + Gfx *temp_v0; + s16 *temp_a1; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_s0; + s32 temp_s1; + s32 temp_s1_2; + s32 temp_s1_3; + s32 temp_s1_4; + s32 temp_s1_5; + s32 temp_v1; + s32 temp_v1_2; + s8 temp_v0_3; + s32 phi_s1; + s32 phi_s2; + ? **phi_v0; + s32 phi_s1_2; + s32 phi_s0; + ? **phi_v0_2; + s32 phi_s0_2; + ? **phi_v0_3; + s32 phi_s0_3; + s32 phi_s1_3; + s32 phi_s0_4; + ? *phi_s2_2; + ? **phi_v0_4; + s32 phi_s0_5; + ? **phi_v0_5; + s32 phi_s0_6; + ? **phi_v0_6; + s32 phi_s1_4; + s32 phi_s0_7; + ? **phi_v0_7; + s32 phi_s0_8; + ? **phi_v0_8; + s32 phi_s0_9; + void *phi_v0_9; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = arg0->unk4; + if (temp_v1 == 0) { + if ((arg0->unk1C >= 0x1E) && (((gGlobalTimer / 16) % 2) != 0)) { + gDisplayListHead = draw_box(gDisplayListHead, 0xC0, 0x21, (func_80093034(D_800E775C->unk14) * 0.8f) + 0xC6, 0x32, 0, 0, 0, 0x96); + set_text_color(1); + func_80093324(0xBF, 0x30, D_800E775C->unk14, 0, 0.8f, 0.8f); + return; + } + /* Duplicate return node #43. Try simplifying control flow for better match */ + return; + } + if (temp_v1 == 1) { + temp_s1 = arg0->unk1C; + phi_s1 = temp_s1; + phi_s2 = (temp_s1 * 0xFF) / 140; + } else { + phi_s1 = 0x8C; + phi_s2 = 0xFF; + } + temp_v0 = draw_box(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, phi_s1); + gDisplayListHead = temp_v0; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = phi_s2 & 0xFF; + temp_v0->words.w0 = 0xFA000000; + set_text_color(3); + func_80093754(0xA0, 0x50, *(&D_800E7574 + (*(&gCupTrackOrder + ((gCupSelection * 8) + (gCourseSelection * 2))) * 4)), 0, 1.0f, 1.0f); + temp_v1_2 = arg0->unk4; + switch (temp_v1_2) { /* switch 1 */ + case 1: /* switch 1 */ + case 11: /* switch 1 */ + case 12: /* switch 1 */ + case 13: /* switch 1 */ + case 14: /* switch 1 */ + case 15: /* switch 1 */ + case 16: /* switch 1 */ + set_text_color(2); + func_80093754(0x9D, 0x60, D_800E7728.unk0, 0, 0.8f, 0.8f); + temp_a0 = func_800B4E24(0) & 0xFFFFF; + temp_s1_2 = temp_a0; + func_800A78F4(temp_a0, &sp84); + text_draw(0x7F, 0x6D, &sp84, 0, 0.8f, 0.8f); + func_80093358(0x8E, 0x6D, "'", 0, 0.8f, 0.8f); + func_800A7944(temp_s1_2, &sp84); + text_draw(0x98, 0x6D, &sp84, 0, 0.8f, 0.8f); + func_80093358(0xA7, 0x6D, "\"", 0, 0.8f, 0.8f); + func_800A79A4(temp_s1_2, &sp84); + text_draw(0xB3, 0x6D, &sp84, 0, 0.8f, 0.8f); + func_80093754(0x9D, 0x7C, D_800E7728.unk4, 0, 0.8f, 0.8f); + temp_a0_2 = func_800B4F2C() & 0xFFFFF; + temp_s1_3 = temp_a0_2; + func_800A78F4(temp_a0_2, &sp84); + text_draw(0x7F, 0x89, &sp84, 0, 0.8f, 0.8f); + func_80093358(0x8E, 0x89, "'", 0, 0.8f, 0.8f); + func_800A7944(temp_s1_3, &sp84); + text_draw(0x98, 0x89, &sp84, 0, 0.8f, 0.8f); + func_80093358(0xA7, 0x89, "\"", 0, 0.8f, 0.8f); + func_800A79A4(temp_s1_3, &sp84); + text_draw(0xB3, 0x89, &sp84, 0, 0.8f, 0.8f); + phi_v0 = D_800E775C; + phi_s1_2 = 0; + phi_s0 = 0; + do { + sp50 = phi_v0; + func_800921C0(arg0->unk4 - 0xB, phi_s1_2, 1); + func_80093358(D_800E8538, D_800E853A + phi_s0, phi_v0->unk4, 0, 0.75f, 0.75f); + temp_s1_4 = phi_s1_2 + 1; + phi_v0 += 4; + phi_s1_2 = temp_s1_4; + phi_s0 += 0xD; + } while (temp_s1_4 != 6); +block_36: + break; + case 21: /* switch 1 */ + case 22: /* switch 1 */ + case 23: /* switch 1 */ + case 24: /* switch 1 */ + case 25: /* switch 1 */ + case 26: /* switch 1 */ + set_text_color(3); + phi_v0_2 = ((arg0->unk4 - 0x15) * 0x1C) + &D_800E798C; + phi_s0_2 = 0x6E; + do { + sp50 = phi_v0_2; + func_80093324(0x4D, phi_s0_2, *phi_v0_2, 0, 0.8f, 0.8f); + temp_s0 = phi_s0_2 + 0xD; + phi_v0_2 += 4; + phi_s0_2 = temp_s0; + } while (temp_s0 != 0xC9); + goto block_36; + case 30: /* switch 1 */ + case 31: /* switch 1 */ + set_text_color(1); + phi_v0_3 = D_800E7A3C; + phi_s0_3 = 0; + do { + sp50 = phi_v0_3; + func_80093324(0x5A, arg0->unk10 + phi_s0_3 + 0x6E, *phi_v0_3, 0, 0.8f, 0.8f); + temp_v0_2 = phi_v0_3 + 4; + phi_v0_3 = temp_v0_2; + phi_s0_3 += 0xD; + } while (temp_v0_2 < &D_800E7A44); + phi_s1_3 = 0; + phi_s0_4 = 0x96; + phi_s2_2 = &D_8018EE10; + do { + func_800921C0(arg0->unk4 - 0x1E, phi_s1_3, 1); + temp_a0_3 = phi_s1_3 + 1; + sp54 = temp_a0_3; + func_800A7894(temp_a0_3, &sp5C); + func_80093324(0x5A - arg0->unkC, phi_s0_4, &sp5D, 0, 0.75f, 0.75f); + if (phi_s2_2->unk4 == 0) { + func_80093324(0x69 - arg0->unkC, phi_s0_4, D_800E7A44, 0, 0.75f, 0.75f); + } else { + temp_v0_3 = phi_s2_2->unk5; + func_80093324(0x69 - arg0->unkC, phi_s0_4, *(&D_800E75C4 + (*(&gCupTrackOrder + (((temp_v0_3 / 4) * 8) + ((temp_v0_3 % 4) * 2))) * 4)), 0, 0.75f, 0.75f); + } + phi_s1_3 = sp54; + phi_s0_4 += 0x14; + phi_s2_2 += 0x80; + } while (sp54 != 2); + goto block_36; + case 32: /* switch 1 */ + set_text_color(3); + phi_v0_4 = D_800E7A48; + phi_s0_5 = 0x6E; + do { + sp50 = phi_v0_4; + func_80093324(0x64, phi_s0_5, *phi_v0_4, 0, 0.8f, 0.8f); + temp_v0_4 = phi_v0_4 + 4; + phi_v0_4 = temp_v0_4; + phi_s0_5 += 0xD; + } while (temp_v0_4 != &D_800E7A54); + goto block_36; + case 35: /* switch 1 */ + case 36: /* switch 1 */ + set_text_color(3); + phi_v0_5 = D_800E7A60; + phi_s0_6 = 0; + do { + sp50 = phi_v0_5; + func_80093324(0x55, arg0->unk10 + phi_s0_6 + 0x6E, *phi_v0_5, 0, 0.8f, 0.8f); + temp_v0_5 = phi_v0_5 + 4; + phi_v0_5 = temp_v0_5; + phi_s0_6 += 0xD; + } while (temp_v0_5 < D_800E7A6C); + phi_v0_6 = D_800E7A6C; + phi_s1_4 = 0; + phi_s0_7 = 0x9B; + do { + sp50 = phi_v0_6; + func_800921C0(arg0->unk4 - 0x23, phi_s1_4, 1); + func_80093324(0x7D - arg0->unkC, phi_s0_7, *phi_v0_6, 0, 0.8f, 0.8f); + temp_s1_5 = phi_s1_4 + 1; + phi_v0_6 += 4; + phi_s1_4 = temp_s1_5; + phi_s0_7 += 0xF; + } while (temp_s1_5 != 2); + goto block_36; + case 40: /* switch 1 */ + set_text_color(3); + phi_v0_7 = D_800E7A74; + phi_s0_8 = 0x6E; + do { + sp50 = phi_v0_7; + func_80093324(0x55, phi_s0_8, *phi_v0_7, 0, 0.8f, 0.8f); + temp_v0_6 = phi_v0_7 + 4; + phi_v0_7 = temp_v0_6; + phi_s0_8 += 0xD; + } while (temp_v0_6 != D_800E7A80); + goto block_36; + case 41: /* switch 1 */ + set_text_color(3); + phi_v0_8 = D_800E7A80; + phi_s0_9 = 0x6E; + do { + sp50 = phi_v0_8; + func_80093324(0x5D, phi_s0_9, *phi_v0_8, 0, 0.8f, 0.8f); + temp_v0_7 = phi_v0_8 + 4; + phi_v0_8 = temp_v0_7; + phi_s0_9 += 0xD; + } while (temp_v0_7 != &D_800E7A88); + goto block_36; + } + switch (arg0->unk4) { /* switch 2 */ + case 11: /* switch 2 */ + case 12: /* switch 2 */ + case 13: /* switch 2 */ + case 14: /* switch 2 */ + case 15: /* switch 2 */ + case 16: /* switch 2 */ + phi_v0_9 = (arg0->unk4 * 8) - 0x58 + &D_800E73E0; +block_42: + temp_a1 = &sp98; + sp98 = phi_v0_9->unk0; + sp9A = phi_v0_9->unk2; + func_800A66A8(arg0, temp_a1); + break; + case 30: /* switch 2 */ + case 31: /* switch 2 */ + phi_v0_9 = (arg0->unk4 * 8) - 0xF0 + &D_800E7410; + goto block_42; + case 35: /* switch 2 */ + case 36: /* switch 2 */ + phi_v0_9 = (arg0->unk4 * 8) - 0x118 + &D_800E7420; + goto block_42; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A5738.s") #endif @@ -9436,15 +13116,439 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A79F4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A7A4C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E000(?); /* extern */ +? func_8009F5E0(? *); /* extern */ +? func_800A954C(? *); /* extern */ +? func_800A9710(? *); /* extern */ +? func_800A97BC(? *); /* extern */ +? func_800A9A98(? *); /* extern */ +? func_800A9B9C(? *); /* extern */ +? func_800A9C40(? *); /* extern */ +? func_800A9D5C(? *); /* extern */ +? func_800A9E58(? *); /* extern */ +? func_800AA280(? *); /* extern */ +? func_800AA2EC(? *); /* extern */ +? func_800AA69C(? *); /* extern */ +? func_800AAA9C(? *); /* extern */ +? func_800AAB90(? *); /* extern */ +? func_800AAC18(? *); /* extern */ +? func_800AADD4(? *); /* extern */ +? func_800AAE18(? *); /* extern */ +? func_800AB020(? *); /* extern */ +? func_800AB098(? *); /* extern */ +? func_800AB164(? *); /* extern */ +? func_800AB260(? *); /* extern */ +? func_800AB290(? *); /* extern */ +? func_800AB314(? *); /* extern */ +? func_800AB904(? *); /* extern */ +? func_800AB9B0(? *); /* extern */ +? func_800ABAE8(? *); /* extern */ +? func_800ABB24(? *); /* extern */ +? func_800ABBCC(? *); /* extern */ +? func_800ABC38(? *); /* extern */ +? func_800ABEAC(? *); /* extern */ +? func_800AC300(? *); /* extern */ +? func_800AC324(? *); /* extern */ +? func_800AC458(? *); /* extern */ +? func_800AC978(? *); /* extern */ +? func_800ACA14(? *); /* extern */ +? func_800ACC50(? *); /* extern */ +? func_800ACF40(? *); /* extern */ +? func_800AD1A4(? *); /* extern */ +? func_800AD2E8(? *); /* extern */ +? func_800ADF48(? *); /* extern */ +? func_800AE218(? *); /* extern */ +? func_800AEC54(? *); /* extern */ +? func_800AEDBC(? *); /* extern */ +? func_800AEE90(? *); /* extern */ +? func_800AEEBC(? *); /* extern */ +? func_800AEEE8(? *); /* extern */ +? func_800AEF14(? *); /* extern */ +? func_800AEF74(? *); /* extern */ +? func_800AF004(? *); /* extern */ +? func_800AF1AC(? *); /* extern */ +? func_800AF270(? *); /* extern */ +? func_800AF480(? *); /* extern */ +? func_800CA388(?); /* extern */ +? play_sound2(?); /* extern */ +extern ? D_8018D9E0; +extern ? D_8018DEE0; -Unable to determine jump table for jr instruction at func_800A7A4C.s line 82. +void func_800A7A4C(s32 arg0) { + ? *temp_s1; + ? *temp_s1_2; + f32 temp_f18; + f64 temp_f0; + s32 temp_s0; + s32 temp_t2; + s32 temp_t3; + s32 temp_v0; + s32 temp_v0_2; + s32 temp_v0_4; + s32 temp_v0_6; + s8 temp_t1; + s8 temp_t9; + s8 temp_v0_3; + s8 temp_v0_5; + ? *phi_s1; + s8 phi_v1; + ? *phi_s1_2; + s8 phi_v1_2; + s32 phi_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_s1 = &D_8018D9E0; + do { + temp_v0 = phi_s1->unk0; + phi_v1 = 0; + phi_v1_2 = 0; + if ((temp_v0 == 4) || (temp_v0 == 5) || (temp_v0 == 0xC7)) { + if (arg0 != 0) { + goto block_7; + } + } else if (arg0 == 0) { +block_7: + phi_v1 = 1; + } + if (phi_v1 != 0) { + if (temp_v0 >= 0x10F) { + if (temp_v0 >= 0x131) { + switch (temp_v0) { /* switch 1 */ + func_800AF480(phi_s1); + break; + } + } else { + switch (temp_v0) { /* switch 2 */ + case 0x12B: /* switch 2 */ + func_800AF004(phi_s1); + break; + case 0x12C: /* switch 2 */ + case 0x12D: /* switch 2 */ + case 0x12E: /* switch 2 */ + case 0x12F: /* switch 2 */ + func_800AF1AC(phi_s1); + break; + case 0x130: /* switch 2 */ + func_800AF270(phi_s1); + break; + } + } + } else if (temp_v0 >= 0x38) { + switch (temp_v0) { /* switch 3 */ + case 0xFA: /* switch 3 */ + temp_v0_2 = D_8018ED94; + if (temp_v0_2 < 0x50) { + D_800E8534 = 3.0f; + } else if (temp_v0_2 < 0x5A) { + temp_f0 = 0.0f; + if (temp_f0 < 1.0) { + D_800E8530 = temp_f0 + 0.1; + } + D_800E8534 = 3.0f + 0.1; + } else if (temp_v0_2 < 0xA0) { + D_800E8534 = 3.0f + 0.1; + } else if (temp_v0_2 < 0x190) { + D_800E8534 = 3.0f + 0.3; + } + temp_f18 = D_8018EDCC - 3.0f; + D_8018EDCC = temp_f18; + D_8018ED94 = temp_v0_2 + 1; + if (temp_f18 < -360.0f) { + D_8018EDCC = temp_f18 + 360.0f; + } + temp_t2 = phi_s1->unk1C + 1; + phi_s1->unk1C = temp_t2; + if (temp_t2 == 0xB4) { + func_8009E000(0x28); + func_800CA388(0x64); + D_8018EDE0 = 0; + } + if ((phi_s1->unk20 != 0) && (phi_s1->unk1C >= 3)) { + phi_s1->unk20 = 0; + play_sound2(0x49018008); + } + break; + case 0xDA: /* switch 3 */ + func_800A954C(phi_s1); + break; + case 0xD6: /* switch 3 */ + func_800A9710(phi_s1); + break; + case 0xD4: /* switch 3 */ + func_800A97BC(phi_s1); + break; + case 0x53: /* switch 3 */ + case 0x54: /* switch 3 */ + case 0x55: /* switch 3 */ + case 0x56: /* switch 3 */ + func_800AB164(phi_s1); + temp_v0_3 = D_8018EDEC; + if (temp_v0_3 != 1) { + if ((temp_v0_3 != 2) && (temp_v0_3 != 3)) { + + } else { + func_800AB098(phi_s1); + } + } else { + func_800AB020(phi_s1); + } + break; + case 0x58: /* switch 3 */ + case 0x59: /* switch 3 */ + case 0x5A: /* switch 3 */ + case 0x5B: /* switch 3 */ + func_800AB260(phi_s1); + break; + case 0x64: /* switch 3 */ + func_800AB314(phi_s1); + break; + case 0x5F: /* switch 3 */ + case 0x60: /* switch 3 */ + case 0x61: /* switch 3 */ + case 0x62: /* switch 3 */ + func_800AB290(phi_s1); + break; + case 0x65: /* switch 3 */ + case 0x66: /* switch 3 */ + func_800AB904(phi_s1); + break; + case 0x67: /* switch 3 */ + func_800AB9B0(phi_s1); + break; + case 0x78: /* switch 3 */ + case 0x79: /* switch 3 */ + case 0x7A: /* switch 3 */ + case 0x7B: /* switch 3 */ + case 0x8C: /* switch 3 */ + func_800ABAE8(phi_s1); + break; + case 0x8D: /* switch 3 */ + func_800ABB24(phi_s1); + break; + case 0x7C: /* switch 3 */ + case 0x7D: /* switch 3 */ + case 0x7E: /* switch 3 */ + case 0x7F: /* switch 3 */ + case 0x80: /* switch 3 */ + case 0x81: /* switch 3 */ + case 0x82: /* switch 3 */ + case 0x83: /* switch 3 */ + case 0x84: /* switch 3 */ + case 0x85: /* switch 3 */ + case 0x86: /* switch 3 */ + case 0x87: /* switch 3 */ + case 0x88: /* switch 3 */ + case 0x89: /* switch 3 */ + case 0x8A: /* switch 3 */ + case 0x8B: /* switch 3 */ + func_800ABBCC(phi_s1); + break; + case 0x96: /* switch 3 */ + func_800ABC38(phi_s1); + break; + case 0x97: /* switch 3 */ + func_800ABEAC(phi_s1); + break; + case 0x5E: /* switch 3 */ + func_800AC300(phi_s1); + break; + case 0xAA: /* switch 3 */ + func_800AC324(phi_s1); + break; + case 0xAB: /* switch 3 */ + func_800AC458(phi_s1); + break; + case 0xAC: /* switch 3 */ + func_800ACA14(phi_s1); + break; + case 0xAF: /* switch 3 */ + func_800AC978(phi_s1); + break; + case 0xB0: /* switch 3 */ + func_800ACC50(phi_s1); + break; + case 0xB1: /* switch 3 */ + case 0xB2: /* switch 3 */ + case 0xB3: /* switch 3 */ + case 0xB4: /* switch 3 */ + func_800ACF40(phi_s1); + break; + case 0xB9: /* switch 3 */ + func_800AD1A4(phi_s1); + break; + case 0xBA: /* switch 3 */ + func_800AD2E8(phi_s1); + break; + case 0xBC: /* switch 3 */ + func_800AEC54(phi_s1); + break; + case 0xC7: /* switch 3 */ + func_800ADF48(phi_s1); + break; + case 0xBD: /* switch 3 */ + func_800AE218(phi_s1); + break; + case 0xE6: /* switch 3 */ + func_800AEDBC(phi_s1); + break; + case 0xE8: /* switch 3 */ + func_800AEE90(phi_s1); + break; + case 0xE9: /* switch 3 */ + func_800AEEBC(phi_s1); + break; + case 0xEA: /* switch 3 */ + func_800AEEE8(phi_s1); + break; + case 0xBE: /* switch 3 */ + func_800AEF14(phi_s1); + break; + case 0x10E: /* switch 3 */ + func_800AEF74(phi_s1); + break; + } + } else { + switch (temp_v0) { /* switch 4 */ + case 0x5: /* switch 4 */ + temp_v0_4 = phi_s1->unk4; + if (temp_v0_4 != 0) { + if (temp_v0_4 != 1) { + + } + phi_s1->unk15 = 1; + } else if ((D_800DC4CC->button & 0x10) != 0) { + phi_s1->unk4 = 1; + play_sound2(0x4900801C); + } else { + phi_s1->unk15 = 0; + } + break; + case 0xA: /* switch 4 */ + func_800AA280(phi_s1); + break; + case 0x10: /* switch 4 */ + case 0x11: /* switch 4 */ + temp_t9 = D_8018EDED; + switch (temp_t9) { /* switch 5 */ + case 1: /* switch 5 */ + case 2: /* switch 5 */ + case 3: /* switch 5 */ + func_800A9B9C(phi_s1); + break; + case 4: /* switch 5 */ + case 5: /* switch 5 */ + case 6: /* switch 5 */ + case 7: /* switch 5 */ + case 8: /* switch 5 */ + func_800A9C40(phi_s1); + break; + } + break; + case 0xF: /* switch 4 */ + func_800AA280(phi_s1); + func_800A9A98(phi_s1); + break; + case 0xB: /* switch 4 */ + case 0xC: /* switch 4 */ + case 0xD: /* switch 4 */ + case 0xE: /* switch 4 */ + temp_t1 = D_8018EDED; + switch (temp_t1) { /* switch 6 */ + case 1: /* switch 6 */ + case 2: /* switch 6 */ + case 3: /* switch 6 */ + func_800A9B9C(phi_s1); + break; + case 4: /* switch 6 */ + case 5: /* switch 6 */ + case 6: /* switch 6 */ + case 7: /* switch 6 */ + case 8: /* switch 6 */ + func_800A9C40(phi_s1); + break; + } + func_800A9D5C(phi_s1); + break; + case 0x12: /* switch 4 */ + case 0x13: /* switch 4 */ + case 0x14: /* switch 4 */ + case 0x15: /* switch 4 */ + case 0x16: /* switch 4 */ + case 0x17: /* switch 4 */ + case 0x18: /* switch 4 */ + case 0x19: /* switch 4 */ + func_800A9E58(phi_s1); + break; + case 0x1B: /* switch 4 */ + func_800AA2EC(phi_s1); + break; + case 0x34: /* switch 4 */ + case 0x35: /* switch 4 */ + case 0x36: /* switch 4 */ + case 0x37: /* switch 4 */ + func_800AADD4(phi_s1); + break; + case 0x2B: /* switch 4 */ + case 0x2C: /* switch 4 */ + case 0x2D: /* switch 4 */ + case 0x2E: /* switch 4 */ + case 0x2F: /* switch 4 */ + case 0x30: /* switch 4 */ + case 0x31: /* switch 4 */ + case 0x32: /* switch 4 */ + func_800AAC18(phi_s1); + temp_t3 = phi_s1->unk0; + switch (temp_t3) { /* switch 7 */ + func_800AA69C(phi_s1); + break; + } + temp_v0_5 = D_8018EDEE; + if (temp_v0_5 != 1) { + if ((temp_v0_5 != 2) && (temp_v0_5 != 3)) { + + } else { + func_800AAA9C(phi_s1); + } + } else { + func_800AAB90(phi_s1); + } + func_800AAE18(phi_s1); + break; + case 0x33: /* switch 4 */ + case 0x5D: /* switch 3 */ + func_800A9A98(phi_s1); + break; + } + } + } + temp_s1 = phi_s1 + 0x28; + phi_s1 = temp_s1; + } while (temp_s1 != &D_8018DEE0); + phi_s0 = 0; + do { + phi_s1_2 = &D_8018D9E0; +loop_113: + temp_v0_6 = phi_s1_2->unk0; + if ((temp_v0_6 == 4) || (temp_v0_6 == 5) || (temp_v0_6 == 0xC7)) { + if (arg0 != 0) { + goto block_119; + } + } else if (arg0 == 0) { +block_119: + phi_v1_2 = 1; + } + if ((phi_v1_2 != 0) && (phi_s0 == phi_s1_2->unk14)) { + func_8009F5E0(phi_s1_2); + } + temp_s1_2 = phi_s1_2 + 0x28; + phi_s1_2 = temp_s1_2; + if (temp_s1_2 != &D_8018DEE0) { + goto loop_113; + } + temp_s0 = phi_s0 + 1; + phi_s0 = temp_s0; + } while (temp_s0 != 0x10); +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A7A4C.s") #endif @@ -10274,15 +14378,43 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A954C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A9710: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009A594(s32, ?, s32, void *); /* extern */ +static ? D_800E7D34; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A9710.s line 14. +void func_800A9710(void *arg0) { + s8 temp_t6; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = gPlayerCountSelection2; + switch (temp_t6) { + case 3: + case 4: + phi_v0 = 1; + break; + case 6: + case 7: + phi_v0 = 5; + break; + case 8: + phi_v0 = 2; + break; + case 9: + phi_v0 = 3; + break; + case 10: + phi_v0 = 4; + break; + default: + phi_v0 = 0; + break; + } + if (phi_v0 != arg0->unk4) { + arg0->unk4 = phi_v0; + arg0 = arg0; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E7D34 + (phi_v0 * 4)), MIPS2C_ERROR(Read from unset register $a1)), arg0); + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9710.s") #endif @@ -10501,57 +14633,302 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9A98.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A9B9C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800AA280(); /* extern */ -Unable to determine jump table for jr instruction at func_800A9B9C.s line 11. +void func_800A9B9C(void *arg0) { + s32 temp_t0; + s32 temp_v0; + u32 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + func_800AA280(); + return; + case 1: + func_800AA280(); + arg0->unk4 = 4; + /* fallthrough */ + case 4: + temp_v0 = arg0->unk1C; + if (temp_v0 > 0) { + temp_t0 = (temp_v0 - (temp_v0 / 12)) - 2; + arg0->unk1C = temp_t0; + if (temp_t0 < 0) { + arg0->unk1C = 0; + return; + } + default: + return; + } + arg0->unk1C = 0; + arg0->unk4 = 0; + return; + case 2: + arg0->unk4 = 3; + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9B9C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A9C40: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800AA280(); /* extern */ -Unable to determine jump table for jr instruction at func_800A9C40.s line 11. +void func_800A9C40(void *arg0) { + s32 temp_t7; + s32 temp_v0_2; + s8 temp_v0; + u32 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + func_800AA280(); + if (arg0->unk0 == (D_8018EDF3 + 0xA)) { + arg0->unk4 = 2; + return; + } + arg0->unk4 = 1; + return; + case 4: + if (arg0->unk0 == (D_8018EDF3 + 0xA)) { + arg0->unk4 = 2; + arg0->unk1C = 0; + return; + } + arg0->unk4 = 1; + case 1: + func_800AA280(); + temp_v0 = D_8018EDED; + if ((temp_v0 == 7) || (temp_v0 == 8)) { + arg0->unk1C = 0x20; + return; + } + temp_v0_2 = arg0->unk1C; + temp_t7 = temp_v0_2 + 2; + if ((temp_v0_2 < 0x20) && (arg0->unk1C = temp_t7, ((temp_t7 < 0x20) == 0))) { + arg0->unk1C = 0x20; + return; + } + default: + return; + case 3: + if (arg0->unk0 == (D_8018EDF3 + 0xA)) { + arg0->unk4 = 2; + } + /* Duplicate return node #16. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9C40.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A9D5C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800A91D8(s16, s16); /* extern */ +static ? D_800E70A0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A9D5C.s line 23. +void func_800A9D5C(void *arg0) { + void *sp1C; + s8 temp_v0; + u32 temp_t1; + void *temp_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (arg0->unk0 == (D_8018EDF3 + 0xA)) { + arg0->unk14 = 0xA; + } else { + arg0->unk14 = 6; + } + temp_t1 = arg0->unk4; + switch (temp_t1) { + case 2: + temp_v0 = D_8018EDED; + if ((temp_v0 == 7) || (temp_v0 == 8)) { + arg0->unkC = 0x80; + arg0->unk10 = 0x3E; + return; + } + func_800A91D8(0x80, 0x3E); + return; + case 3: + temp_v0_2 = (arg0->unk0 * 8) - 0x50 + &D_800E70A0; + sp1C = temp_v0_2; + func_800A91D8(temp_v0_2->unk0, temp_v0_2->unk2); + if ((temp_v0_2->unk0 == arg0->unkC) && (temp_v0_2->unk2 == arg0->unk10)) { + arg0->unk4 = 0; + } + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9D5C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800A9E58: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800A91D8(void *, s32, s32); /* extern */ +? func_800A92E8(void *, s32); /* extern */ +static ? D_800E70E8; /* unable to generate initializer; const */ +static ? D_800E86AB; /* unable to generate initializer; const */ +static ? D_800F2B70; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800A9E58.s line 80. +void func_800A9E58(void *arg0) { + void *sp2C; + s16 *sp28; + s32 sp24; + s32 sp20; + s32 sp1C; + s16 *temp_v1_3; + s32 temp_a1; + s32 temp_a1_2; + s32 temp_t2_2; + s32 temp_t5_2; + s32 temp_t6; + s32 temp_v1; + s8 temp_a2; + s8 temp_t2; + s8 temp_t5; + s8 temp_t9; + s8 temp_v0; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v1_2; + void *temp_v1_4; + s32 phi_a3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk0; + switch (temp_t6) { /* switch 1 */ + case 18: /* switch 1 */ + case 19: /* switch 1 */ + case 20: /* switch 1 */ + case 21: /* switch 1 */ + sp24 = 0x12; + sp1C = 2; + sp20 = 0; + break; + case 22: /* switch 1 */ + case 23: /* switch 1 */ + sp24 = 0x16; + sp1C = 2; + phi_a3 = 2; +block_5: + sp20 = phi_a3; + break; + case 24: /* switch 1 */ + case 25: /* switch 1 */ + sp24 = 0x18; + sp1C = 1; + phi_a3 = 1; + goto block_5; + } + temp_v0 = D_8018EDF3; + temp_v1 = arg0->unk4; + temp_a2 = *(&D_800E86AB + temp_v0); + temp_a1 = *(&D_800F2B70 + ((temp_v0 * 0xC) + (temp_a2 * 4))); + if (temp_v1 != 0) { + if (temp_v1 != 1) { + if (temp_v1 != 2) { + return; + } + temp_t9 = D_8018EDED; + switch (temp_t9) { /* switch 4 */ + if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { + arg0->unk15 = 0; + goto block_37; + } + if (arg0->unk20 != temp_a2) { + arg0->unk4 = 0; + } + temp_v0_2 = func_800AAE68(arg0, temp_a1, temp_a2); + temp_v1_2 = (arg0->unk0 * 8) + -(sp24 * 8) + &D_800E70E8; + temp_a1_2 = temp_v0_2->unkC + temp_v1_2->unk0; + arg0->unkC = temp_a1_2; + arg0->unk10 = temp_v0_2->unk10 + arg0->unk1C; + sp2C = temp_v0_2; + func_800A91D8(arg0, temp_a1_2, (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_2->unk10 + temp_v1_2->unk2); + arg0->unk1C = arg0->unk10 - sp2C->unk10; + return; + default: /* switch 4 */ + arg0->unk15 = 0; + goto block_37; + } + } else { + temp_t2 = D_8018EDED; + switch (temp_t2) { /* switch 3 */ + if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { + arg0->unk15 = 0; +block_37: + arg0->unk4 = 0; + /* Duplicate return node #38. Try simplifying control flow for better match */ + return; + } + if (arg0->unk20 != temp_a2) { + arg0->unk4 = 0; + } + temp_v0_3 = func_800AAE68(arg0, temp_a1, temp_a2); + arg0->unkC = temp_v0_3->unkC + arg0->unk1C; + temp_v1_3 = (arg0->unk0 * 8) + -(sp24 * 8) + &D_800E70E8; + sp2C = temp_v0_3; + sp28 = temp_v1_3; + func_800A92E8(arg0, temp_v0_3->unkC + *temp_v1_3); + temp_t2_2 = arg0->unkC - sp2C->unkC; + arg0->unk1C = temp_t2_2; + if (*temp_v1_3 == temp_t2_2) { + arg0->unk4 = 2; + arg0->unk1C = arg0->unk10 - sp2C->unk10; + return; + } + return; + default: /* switch 3 */ + arg0->unk15 = 0; + goto block_37; + } + } + } else { + if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { + arg0->unk15 = 0; + return; + } + arg0->unk20 = temp_a2; + temp_t5 = D_8018EDED; + switch (temp_t5) { /* switch 2 */ + case 4: /* switch 2 */ + case 5: /* switch 2 */ + case 6: /* switch 2 */ + arg0->unk15 = 1; + temp_v0_4 = func_800AAE68(arg0, temp_a1, temp_a2); + arg0->unkC = temp_v0_4->unkC; + arg0->unk1C = 0; + arg0->unk4 = 1; + arg0->unk10 = (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_4->unk10 + 0x41; + return; + case 7: /* switch 2 */ + case 8: /* switch 2 */ + temp_v0_5 = func_800AAE68(arg0, temp_a1, temp_a2); + temp_v1_4 = (arg0->unk0 * 8) + -(sp24 * 8) + &D_800E70E8; + arg0->unkC = temp_v0_5->unkC + temp_v1_4->unk0; + temp_t5_2 = (*(&D_800E86AB + D_8018EDF3) * 0x12) + temp_v0_5->unk10 + temp_v1_4->unk2; + arg0->unk10 = temp_t5_2; + arg0->unk1C = temp_t5_2 - temp_v0_5->unk10; + arg0->unk15 = 1; + arg0->unk4 = 2; + return; + default: /* switch 2 */ + arg0->unk15 = 0; + return; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A9E58.s") #endif @@ -10580,71 +14957,443 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AA280.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AA2EC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_800B5B2C(?); /* extern */ +s32 func_800CE720(? *, ? *, ?); /* extern */ +s32 osPfsFindFile(? *, u16, s32, ? *, ? *, ? *); /* extern */ +s32 osPfsFreeBlocks(? *, s32 *); /* extern */ +s32 osPfsNumFiles(? *, s32 *, s32 *); /* extern */ +extern ? D_8018E868; +extern ? D_8018EB84; +extern ? gSIEventMesgQueue; +static ? D_800E86AB; /* unable to generate initializer; const */ +static ? D_800F2E64; /* unable to generate initializer; const */ +static ? D_800F2E74; /* unable to generate initializer; const */ +u16 D_800E86F0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AA2EC.s line 15. +void func_800AA2EC(void *arg0) { + s32 sp20; + s32 temp_v0_2; + s32 temp_v0_3; + s8 temp_t6; + s8 temp_v0; + s32 phi_t1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = D_8018EDED; + phi_t1 = 0; + switch (temp_t6) { + case 1: + case 2: + case 3: + case 4: + arg0->unk4 = 0; + return; + case 5: + case 6: + case 7: + case 8: + if ((arg0->unk4 == 0) && (temp_v0 = D_8018EDF3, (temp_v0 == 1)) && (*(&D_800E86AB + temp_v0) == 1)) { + if (D_800E86F8 != 0) { + sp20 = 0; + temp_v0_2 = osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84); + if (temp_v0_2 != 0) { + if (temp_v0_2 != 2) { + if (temp_v0_2 != 5) { + goto block_12; + } + } else { +block_12: + D_800E86F8 = 0; + } + } else { + arg0->unk4 = 1; + phi_t1 = 1; + } + } + if (phi_t1 == 0) { + if (D_800E86F8 == 0) { + if (func_800B5B2C(0) == 0) { + arg0->unk4 = 2; + return; + } + temp_v0_3 = func_800CE720(&gSIEventMesgQueue, &D_8018E868, 0); + if (temp_v0_3 != 0) { + if (temp_v0_3 != 1) { + if (temp_v0_3 != 4) { + if (temp_v0_3 != 0xA) { + if (temp_v0_3 == 0xB) { + goto block_22; + } + goto block_24; + } + arg0->unk4 = 3; + return; + } +block_24: + arg0->unk4 = 3; + return; + } +block_22: + arg0->unk4 = 2; + return; + } + D_800E86F8 = 1; + if (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) == 0) { + arg0->unk4 = 1; + return; + } + if (osPfsNumFiles(&D_8018E868, &D_8018EB78, &D_8018EB7C) != 0) { + arg0->unk4 = 3; + return; + } + if (osPfsFreeBlocks(&D_8018E868, &D_8018EB80) != 0) { + arg0->unk4 = 3; + return; + } + D_8018EB80 = D_8018EB80 >> 8; + goto block_32; + } +block_32: + if (D_8018EB7C >= D_8018EB78) { + arg0->unk4 = 5; + return; + } + if (D_8018EB80 >= 0x79) { + arg0->unk4 = 1; + return; + } + arg0->unk4 = 5; + /* Duplicate return node #37. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #37. Try simplifying control flow for better match */ + return; + } + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AA2EC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AA69C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009A594(s32, s32, s32, s32 *); /* extern */ +s32 random_int(?, s32); /* extern */ +extern ? D_8018DEE4; +extern ? D_8018EDE8; +static ? D_800E8360; /* unable to generate initializer; const */ +static ? D_800E8380; /* unable to generate initializer; const */ +static ? D_800E83A0; /* unable to generate initializer; const */ +static ? D_800E83C0; /* unable to generate initializer; const */ +static ? D_800E83E0; /* unable to generate initializer; const */ +static ? D_800E8400; /* unable to generate initializer; const */ +static ? D_800E8440; /* unable to generate initializer; const */ +static ? D_800E8460; /* unable to generate initializer; const */ +static ? D_800E8480; /* unable to generate initializer; const */ +static ? D_800E84A0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AA69C.s line 24. +void func_800AA69C(void *arg0) { + s32 sp30; + s32 sp24; + s32 *sp20; + s32 *temp_a3; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a0_3; + s32 temp_a1; + s32 temp_v0; + s32 temp_v0_2; + s32 temp_v1_2; + s32 temp_v1_3; + s32 temp_v1_4; + s32 temp_v1_5; + u32 temp_v1; + s32 phi_a0; + s32 phi_v0; + s32 phi_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_a0 = arg0->unk0 - 0x2B; + sp30 = temp_a0; + temp_v0 = func_800AAFCC(temp_a0); + temp_a1 = sp30; + if (temp_v0 >= 0) { + phi_a0 = 1; + } else { + phi_a0 = 0; + } + temp_v1 = arg0->unk8; + switch (temp_v1) { + case 0: + if ((*(&D_8018EDE8 + temp_v0) != 0) && (phi_a0 != 0)) { + arg0->unk8 = 1; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E8380 + (temp_a1 * 4)), temp_a1)); + return; + } + sp30 = temp_a1; + temp_v0_2 = random_int(0xC8, temp_a1); + if (temp_v0_2 >= 0xC6) { + arg0->unk8 = 4; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E83E0 + (temp_a1 * 4)), temp_a1)); + return; + } + if (temp_v0_2 >= 0xC5) { + arg0->unk8 = 5; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E8400 + (temp_a1 * 4)), temp_a1)); + return; + } + default: + return; + case 1: + temp_v1_2 = temp_a1 * 4; + if (*(&D_8018DEE4 + (arg0->unk18 * 0x18)) >= *(&D_800E8440 + temp_v1_2)) { + arg0->unk8 = 2; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E83A0 + temp_v1_2), temp_a1)); + return; + } + if ((*(&D_8018EDE8 + temp_v0) == 0) && (phi_a0 != 0)) { + arg0->unk8 = 3; + sp24 = temp_v1_2; + temp_a0_2 = arg0->unk18; + func_8009A594(temp_a0_2, *(&D_800E8460 + temp_v1_2) - *(&D_8018DEE4 + (temp_a0_2 * 0x18)), segmented_to_virtual_dupe(*(&D_800E83C0 + temp_v1_2), temp_a1)); + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 2: + if ((*(&D_8018EDE8 + temp_v0) == 0) && (phi_a0 != 0)) { + arg0->unk8 = 3; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E83C0 + (temp_a1 * 4)), temp_a1)); + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 3: + temp_v1_3 = temp_a1 * 4; + temp_a3 = temp_v1_3 + &D_800E8460; + if (*(&D_8018DEE4 + (arg0->unk18 * 0x18)) >= *temp_a3) { + arg0->unk8 = 0; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E8360 + temp_v1_3), temp_a1)); + return; + } + if ((*(&D_8018EDE8 + temp_v0) != 0) && (phi_a0 != 0)) { + arg0->unk8 = 1; + sp20 = temp_a3; + temp_a0_3 = arg0->unk18; + func_8009A594(temp_a0_3, *temp_a3 - *(&D_8018DEE4 + (temp_a0_3 * 0x18)), segmented_to_virtual_dupe(*(&D_800E8380 + temp_v1_3), temp_a1), temp_a3); + return; + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + case 4: + case 5: + if ((*(&D_8018EDE8 + temp_v0) != 0) && (phi_a0 != 0)) { + arg0->unk8 = 1; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E8380 + (temp_a1 * 4)), temp_a1)); + return; + } + if (temp_v1 == 4) { + temp_v1_4 = temp_a1 * 4; + phi_v0 = *(&D_800E8480 + temp_v1_4); + phi_v1 = temp_v1_4; + } else { + temp_v1_5 = temp_a1 * 4; + phi_v0 = *(&D_800E84A0 + temp_v1_5); + phi_v1 = temp_v1_5; + } + if (*(&D_8018DEE4 + (arg0->unk18 * 0x18)) >= phi_v0) { + arg0->unk8 = 0; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E8360 + phi_v1), temp_a1)); + } + /* Duplicate return node #33. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AA69C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AAA9C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_800AAA9C(s32 *arg0) { + s32 *temp_a1; + s32 temp_a0; + s32 temp_t2; + s32 temp_v0; + u32 temp_t6; -Unable to determine jump table for jr instruction at func_800AAA9C.s line 12. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + temp_a1 = arg0; + switch (temp_t6) { + case 3: + temp_a1->unk4 = 1; + /* fallthrough */ + case 1: + if (D_8018EDEE == 3) { + temp_a1->unk1C = 0x20; + } else { + temp_v0 = temp_a1->unk1C; + if (temp_v0 < 0x20) { + temp_t2 = temp_v0 + (temp_v0 / 12) + 2; + temp_a1->unk1C = temp_t2; + if (temp_t2 >= 0x20) { + temp_a1->unk1C = 0x20; + } + } + } + /* fallthrough */ + case 0: + temp_a0 = temp_a1->unk0; + arg0 = temp_a1; + if (func_800AAFCC(temp_a0 - 0x2B, temp_a1) >= 0) { + arg0->unk4 = 2; +block_13: + arg0->unk1C = 0; + default: + return; + } + arg0->unk4 = 1; + return; + case 4: + arg0 = temp_a1; + if (func_800AAFCC(temp_a1->unk0 - 0x2B, temp_a1) >= 0) { + arg0->unk4 = 2; + goto block_13; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AAA9C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AAB90: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_800AAB90(void *arg0) { + s32 temp_t2; + s32 temp_v0; + u32 temp_t6; -Unable to determine jump table for jr instruction at func_800AAB90.s line 9. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 1: + if (arg0->unk1C > 0) { + arg0->unk4 = 3; + return; + } + default: + return; + case 2: + arg0->unk4 = 4; + return; + case 3: + temp_v0 = arg0->unk1C; + if (temp_v0 > 0) { + temp_t2 = (temp_v0 - (temp_v0 / 12)) - 2; + arg0->unk1C = temp_t2; + if (temp_t2 < 0) { + arg0->unk1C = 0; + return; + } + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } + arg0->unk1C = 0; + arg0->unk4 = 0; + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AAB90.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AAC18: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009A594(s32, ?, s32, void *); /* extern */ +? func_800A91D8(void *, s16, s16, void *); /* extern */ +static ? D_800E7108; /* unable to generate initializer; const */ +static ? D_800E7188; /* unable to generate initializer; const */ +static ? D_800E8340; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AAC18.s line 14. +void func_800AAC18(void *arg0) { + s32 sp24; + void *sp18; + s32 temp_a0; + s32 temp_a1; + s32 temp_v0; + s32 temp_v0_3; + u32 temp_v1; + void *temp_a3; + void *temp_a3_2; + void *temp_t0; + void *temp_v0_2; + void *temp_v0_4; + u32 phi_v1; + void *phi_a3; + void *phi_t0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v1 = arg0->unk4; + temp_a3 = arg0; + temp_a1 = arg0->unk0 - 0x2B; + phi_v1 = temp_v1; + phi_a3 = temp_a3; + switch (temp_v1) { + case 0: + temp_a0 = temp_a1; + if (D_8018EDEE == 3) { + sp24 = temp_a1; + arg0 = temp_a3; + temp_v0 = func_800AAFCC(temp_a0, temp_a1, MIPS2C_ERROR(Read from unset register $a2), temp_a3); + temp_a3_2 = arg0; + if (temp_v0 >= 0) { + temp_t0 = (D_800DC530 << 5) + (temp_v0 * 8) + &D_800E7188; + temp_a3_2->unkC = temp_t0->unk0; + temp_a3_2->unk4 = 2; + temp_a3_2->unk8 = 2; + temp_a3_2->unk10 = temp_t0->unk2; + arg0 = temp_a3_2; + func_8009A594(arg0->unk18, 0, segmented_to_virtual_dupe(*(&D_800E8340 + (temp_a1 * 4)), temp_a1, 2, temp_a3_2), arg0); + return; + } + default: + return; + } + case 1: + case 3: + temp_v0_2 = (temp_a1 * 8) + &D_800E7108; + temp_a3->unkC = temp_v0_2->unk0; + temp_a3->unk10 = temp_v0_2->unk2; + return; + case 2: + case 4: + if (temp_v1 == 2) { + arg0 = temp_a3; + temp_v0_3 = func_800AAFCC(temp_a1, temp_a1, 2, temp_a3); + phi_a3 = arg0; + if (temp_v0_3 >= 0) { + sp18 = (D_800DC530 << 5) + (temp_v0_3 * 8) + &D_800E7188; + } + phi_v1 = arg0->unk4; + phi_t0 = sp18; + goto block_13; + } + temp_v0_4 = (temp_a1 * 8) + &D_800E7108; + phi_t0 = temp_v0_4; + if ((temp_a3->unkC == temp_v0_4->unk0) && (temp_a3->unk10 == temp_v0_4->unk2)) { + temp_a3->unk4 = 0; + return; + } +block_13: + if ((phi_v1 != 2) || (phi_a3->unk8 != 1)) { + func_800A91D8(phi_a3, phi_t0->unk0, phi_t0->unk2, phi_a3); + } + /* Duplicate return node #16. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AAC18.s") #endif @@ -10843,43 +15592,124 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AAFCC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AB020: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_800AB020(void *arg0) { + s32 temp_t0; + s32 temp_v0; + u32 temp_t6; -Unable to determine jump table for jr instruction at func_800AB020.s line 9. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 1: + arg0->unk4 = 4; + /* fallthrough */ + case 4: + temp_v0 = arg0->unk1C; + if (temp_v0 > 0) { + temp_t0 = (temp_v0 - (temp_v0 / 12)) - 2; + arg0->unk1C = temp_t0; + if (temp_t0 < 0) { + arg0->unk1C = 0; + return; + } + default: + return; + } + arg0->unk1C = 0; + arg0->unk4 = 0; + return; + case 2: + arg0->unk4 = 3; + /* Duplicate return node #8. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AB020.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AB098: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_800AB098(void *arg0) { + s32 temp_t8; + s32 temp_v0; + u32 temp_t6; -Unable to determine jump table for jr instruction at func_800AB098.s line 9. - -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + if (arg0->unk0 == (gCupSelection + 0x53)) { + arg0->unk4 = 2; + return; + } + arg0->unk4 = 1; + return; + case 4: + if (arg0->unk0 == (gCupSelection + 0x53)) { + arg0->unk4 = 2; + arg0->unk1C = 0; + return; + } + arg0->unk4 = 1; + case 1: + temp_v0 = arg0->unk1C; + temp_t8 = temp_v0 + 2; + if ((temp_v0 < 0x20) && (arg0->unk1C = temp_t8, ((temp_t8 < 0x20) == 0))) { + arg0->unk1C = 0x20; + return; + } + default: + return; + case 3: + if (arg0->unk0 == (gCupSelection + 0x53)) { + arg0->unk4 = 2; + } + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AB098.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AB164: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800A91D8(s16, s16); /* extern */ +static ? D_800E7148; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AB164.s line 23. +void func_800AB164(void *arg0) { + void *sp1C; + u32 temp_t1; + void *temp_v0; + void *temp_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (arg0->unk0 == (gCupSelection + 0x53)) { + arg0->unk14 = 0xA; + } else { + arg0->unk14 = 4; + } + temp_t1 = arg0->unk4; + switch (temp_t1) { + case 0: + temp_v0 = (arg0->unk0 * 8) - 0x298 + &D_800E7148; + arg0->unkC = temp_v0->unk0; + arg0->unk10 = temp_v0->unk2; + return; + case 2: + func_800A91D8(0x80, 0x3B); + return; + case 3: + temp_v0_2 = (arg0->unk0 * 8) - 0x298 + &D_800E7148; + sp1C = temp_v0_2; + func_800A91D8(temp_v0_2->unk0, temp_v0_2->unk2); + if ((temp_v0_2->unk0 == arg0->unkC) && (temp_v0_2->unk2 == arg0->unk10)) { + arg0->unk4 = 0; + } + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AB164.s") #endif @@ -11561,15 +16391,228 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AC324.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AC458: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void *func_800921B4(); /* extern */ +void *func_800B536C(s32, s32, s32, void *); /* extern */ +void **func_800CA330(?, s32); /* extern */ +void *play_sound2(?, s32, u8 *, void *); /* extern */ +extern void *D_800DC5EC; +extern ? D_80164360; +extern ? D_80164478; +extern void *D_8018D9BC; +extern ? D_8018D9C8; +extern void *D_8018D9D0; -Unable to determine jump table for jr instruction at func_800AC458.s line 12. +void *func_800AC458(void *arg0) { + s32 sp1C; + s32 sp18; + s32 temp_a1; + s32 temp_a1_2; + s32 temp_a1_3; + s32 temp_a1_4; + s32 temp_a2; + s32 temp_t2; + s32 temp_t3; + s32 temp_t3_2; + s32 temp_t5; + s32 temp_t7; + s32 temp_t8; + s32 temp_v0_3; + s32 temp_v0_6; + s8 *temp_v1_2; + u32 temp_v0_2; + u8 *temp_a2_2; + u8 temp_t0; + void **temp_v0_4; + void *temp_a3; + void *temp_v0; + void *temp_v0_5; + void *temp_v1; + void *temp_v1_3; + s32 phi_a0; + void *phi_a3; + s32 phi_t1; + void **phi_v0; + s32 phi_a1; + void **phi_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0_2 = arg0->unk4; + temp_a3 = arg0; + phi_a3 = temp_a3; + phi_v0_2 = temp_v0_2; + switch (temp_v0_2) { + case 0: + temp_a3->unkC = -0xA0; + temp_a3->unk4 = 1; + D_8018D9BC->unk0 = D_800F0B18; + D_8018D9BC->unk1 = D_800F0B19; + D_8018D9BC->unk2 = D_800F0B1A; + D_8018D9BC->unk3 = D_800F0B1B; + temp_a3->unk20 = temp_a3->unkC; + return &D_8018D9BC; + case 1: + temp_a1 = temp_a3->unk20; + temp_a3->unkC = temp_a1; + phi_a0 = 0x10; + if (D_8018D9D8 != 0) { + phi_a0 = 0x20; + } + temp_a2 = temp_a1 + phi_a0; + if (temp_a2 < 0) { + temp_a3->unk20 = temp_a2; + temp_v0 = D_800DC5EC; + temp_v0->unk30 = temp_v0->unk30 + phi_a0; + temp_v1 = D_800DC5F0; + temp_v1->unk30 = temp_v1->unk30 - phi_a0; + return temp_v0; + } + temp_a3->unk20 = 0; + temp_a3->unkC = 0; + temp_a3->unk4 = 2; + temp_a3->unk1C = 0; + D_800DC5EC->unk30 = 0xF0; + D_800DC5F0->unk30 = 0x50; + return &D_800DC5EC; + case 2: + temp_a3->unkC = 0; + temp_t5 = temp_a3->unk1C + 1; + temp_a3->unk1C = temp_t5; + if (((D_8018D9D8 != 0) || (temp_t5 >= 0x1F)) && (D_800DDB24 != 0)) { + temp_a3->unk4 = 3; + temp_a3->unk1C = 0; + temp_a3->unk20 = 0; + return temp_v0_2; + } + default: + return phi_v0_2; + case 3: + case 4: + case 5: + case 6: + temp_t3 = temp_a3->unk1C + 1; + temp_a1_2 = temp_v0_2 - 3; + temp_a3->unk1C = temp_t3; + if (((temp_t3 % 3) == 0) || (D_8018D9D8 != 0)) { + temp_a2_2 = D_8018D9BC + temp_a1_2; + temp_t0 = *temp_a2_2; + if (temp_t0 > 0) { + *temp_a2_2 = temp_t0 - 1; + temp_v1_2 = *(&gPlayers->characterId + (*(&D_80164360 + (temp_a1_2 * 2)) * 0xDD8)) + &D_8018D9C8; + sp18 = 0; + arg0 = temp_a3; + *temp_v1_2 += 1; + sp1C = temp_a1_2; + play_sound2(0x49008017, temp_a1_2, temp_a2_2, temp_a3); + phi_a3 = arg0; + if ((*(D_8018D9BC + temp_a1_2) == 0) && (arg0->unk20 == 0)) { + arg0->unk20 = 1; + arg0->unk1C = 0; + } + } + } + phi_t1 = 0; + phi_v0_2 = &D_8018D9BC; + if ((phi_a3->unk20 != 0) && ((temp_v0_6 = phi_a3->unk1C, phi_v0_2 = temp_v0_6, ((temp_v0_6 < 0xB) == 0)) || ((D_8018D9D8 != 0) && (temp_v0_6 >= 4)))) { + phi_t1 = 1; + } + if (phi_t1 != 0) { + temp_v0_3 = phi_a3->unk4; + phi_a3->unk20 = 0; + phi_a3->unk1C = 0; + if (temp_v0_3 < 6) { + phi_a3->unk4 = temp_v0_3 + 1; + return temp_v0_3; + } + phi_a3->unk4 = 7; + return temp_v0_3; + } + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + case 7: + temp_t2 = temp_a3->unk1C + 1; + temp_a3->unk1C = temp_t2; + if ((((D_8018D9D8 != 0) && (temp_t2 >= 0xB)) || (temp_a3->unk1C >= 0x3D)) && (D_800DDB24 != 0)) { + temp_a3->unk4 = 8; + temp_a3->unk1C = 0; + return temp_v0_2; + } + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + case 8: + temp_t8 = temp_a3->unk1C + 1; + temp_a3->unk1C = temp_t8; + if (D_8018D9D8 != 0) { + temp_a3->unk1C = temp_t8 + 5; + } + if (temp_a3->unk1C >= 0x29) { + temp_a3->unk4 = 9; + return temp_v0_2; + } + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + case 9: + temp_t7 = temp_a3->unk1C - 1; + temp_a3->unk1C = temp_t7; + if (D_8018D9D8 != 0) { + temp_a3->unk1C = temp_t7 - 5; + } + if ((temp_a3->unk1C <= 0) && (temp_a3->unk4 = 0xA, temp_a3->unk1C = 0, phi_a1 = 0, phi_v0_2 = &D_8018D9D0, (gCourseSelection == 3))) { + phi_v0 = &D_8018D9D0; +loop_41: + if (*(&D_80164478 + (*phi_v0 * 2)) < D_8018EDF3) { + return func_800B536C(phi_a1, phi_a1, 8, temp_a3); + } + temp_a1_3 = phi_a1 + 1; + temp_v0_4 = phi_v0 + 1; + phi_v0 = temp_v0_4; + phi_a1 = temp_a1_3; + if (temp_a1_3 == 8) { + return temp_v0_4; + } + goto loop_41; + } + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + case 10: + temp_t3_2 = temp_a3->unk1C + 1; + temp_a3->unk1C = temp_t3_2; + if (temp_t3_2 > 0) { + temp_a3->unk4 = 0xB; + temp_a3->unk1C = 0; + return func_800921B4(); + } + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + case 11: + if ((D_8018D9D8 != 0) && (D_800DDB24 != 0)) { + temp_a3->unk4 = 0xC; + temp_a3->unk20 = temp_a3->unk10; + return play_sound2(0x49008015); + } + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + case 12: + temp_a1_4 = temp_a3->unk20; + temp_a3->unk10 = temp_a1_4; + if (temp_a1_4 < 0xF0) { + temp_a3->unk20 = temp_a1_4 + 0x10; + temp_v0_5 = D_800DC5EC; + temp_v0_5->unk32 = temp_v0_5->unk32 + 0x10; + temp_v1_3 = D_800DC5F0; + temp_v1_3->unk32 = temp_v1_3->unk32 - 0x10; + return temp_v0_5; + } + temp_a3->unk20 = 0; + temp_a3->unk4 = 0xD; + temp_a3->unk1C = 0; + D_800DC5EC->unk32 = 0x12C; + D_800DC5F0->unk32 = -0x3C; + D_8015F894 = 4; + phi_v0_2 = func_800CA330(0x19, temp_a1_4); + /* Duplicate return node #53. Try simplifying control flow for better match */ + return phi_v0_2; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AC458.s") #endif @@ -11737,99 +16780,1159 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ACA14.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800ACC50: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009DFE0(?, void *); /* extern */ +? func_8009E650(s32, ?, ?, s8); /* extern */ +void *func_800AAEF4(?, void *); /* extern */ +? play_sound2(?, void *); /* extern */ -Unable to determine jump table for jr instruction at func_800ACC50.s line 13. +void func_800ACC50(void *arg0) { + f64 temp_f0; + f64 temp_f0_2; + f64 temp_f0_3; + s32 temp_a0; + s32 temp_s0; + s32 temp_t8; + s32 temp_t9; + s32 temp_v0_3; + u16 temp_v1; + u16 temp_v1_2; + u32 temp_t6; + u32 temp_v0_2; + void *temp_a1; + void *temp_a1_2; + void *temp_t8_2; + void *temp_v0; + s32 phi_s0; + s32 phi_a0; + void *phi_a1; + u16 phi_v1; + void *phi_a1_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + temp_a1 = arg0; + switch (temp_t6) { + case 0: + temp_t8 = temp_a1->unk1C + 3; + temp_a1->unk1C = temp_t8; + if ((temp_t8 >= 0x65) && (temp_a1->unk4 = 1, temp_a1->unk1C = 0, phi_s0 = 0, (D_8018EDF3 > 0))) { + do { + func_8009E650(phi_s0 + 0xB1, 0, 0, 5 - phi_s0); + temp_s0 = phi_s0 + 1; + phi_s0 = temp_s0; + } while (temp_s0 < D_8018EDF3); + return; + } + default: + return; + case 1: + arg0 = temp_a1; + if (func_800AAEF4(0xB1, temp_a1)->unk4 >= 2) { + arg0->unk4 = 2; + return; + } + /* Duplicate return node #30. Try simplifying control flow for better match */ + return; + case 2: + temp_t9 = temp_a1->unk1C + 0x20; + temp_a1->unk1C = temp_t9; + if (temp_t9 >= 0x100) { + if (gModeSelection == 2) { + temp_a1->unk4 = D_8018EDF4; + } else { + temp_a1->unk4 = D_8018EDF6; + } + temp_a1->unk1C = 0; + return; + } + /* Duplicate return node #30. Try simplifying control flow for better match */ + return; + case 10: + case 11: + case 12: + case 13: + arg0 = temp_a1; + temp_a1_2 = arg0; + phi_a1 = temp_a1_2; + if (func_800B4520(arg0) == 0) { + temp_v0 = D_800DC4CC; + temp_v1 = temp_v0->unk6; + temp_a0 = temp_v1 | temp_v0->unkC; + phi_a0 = temp_a0; + phi_v1 = temp_v1; + if ((temp_a0 & 0x800) != 0) { + temp_v0_2 = temp_a1_2->unk4; + if (temp_v0_2 >= 0xB) { + temp_a1_2->unk4 = temp_v0_2 - 1; + arg0 = temp_a1_2; + play_sound2(0x49008000, temp_a1_2); + temp_f0 = arg0->unk24; + phi_a1 = arg0; + if (temp_f0 < 4.2) { + arg0->unk24 = temp_f0 + 4.0; + } + arg0->unk8 = -1; + temp_t8_2 = D_800DC4CC; + temp_v1_2 = temp_t8_2->unk6; + phi_a0 = temp_v1_2 | temp_t8_2->unkC; + phi_v1 = temp_v1_2; + } + } + phi_a1_2 = phi_a1; + if ((phi_a0 & 0x400) != 0) { + temp_v0_3 = phi_a1->unk4; + if (temp_v0_3 < 0xD) { + phi_a1->unk4 = temp_v0_3 + 1; + arg0 = phi_a1; + play_sound2(0x49008000, phi_a1); + temp_f0_2 = arg0->unk24; + phi_a1_2 = arg0; + if (temp_f0_2 < 4.2) { + arg0->unk24 = temp_f0_2 + 4.0; + } + arg0->unk8 = 1; + phi_v1 = D_800DC4CC->unk6; + } + } + if ((phi_v1 & 0x9000) != 0) { + arg0 = phi_a1_2; + func_8009DFE0(0x1E, phi_a1_2); + play_sound2(0x49008016); + if (gModeSelection == 2) { + D_8018EDF4 = arg0->unk4; + } else { + D_8018EDF6 = arg0->unk4; + } + temp_f0_3 = arg0->unk24; + if (temp_f0_3 < 4.2) { + arg0->unk24 = temp_f0_3 + 4.0; + } + } + } + /* Duplicate return node #30. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ACC50.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800ACF40: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009A640(s32, ?, s32, s32); /* extern */ +? func_800A9208(void *, s16, s32); /* extern */ +? func_800A9278(void *, s16); /* extern */ +void *func_800AAEF4(?, s8, s32); /* extern */ +? func_800C90F4(s32, s32, s32); /* extern */ +? func_800CA24C(s32); /* extern */ +extern ? D_801643B8; +extern ? D_8018DEE4; +static ? D_800E72F8; /* unable to generate initializer; const */ +static ? D_800E7300; /* unable to generate initializer; const */ +static ? D_800E8380; /* unable to generate initializer; const */ +static ? D_800E83A0; /* unable to generate initializer; const */ +static ? D_800E8440; /* unable to generate initializer; const */ +static ? D_800E85F7; /* unable to generate initializer; const */ +static ? D_800E86A8; /* unable to generate initializer; const */ +static ? D_800EFD64; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800ACF40.s line 21. +void func_800ACF40(void *arg0) { + s16 *sp3C; + s32 sp38; + s32 sp34; + s32 sp24; + s16 *temp_v0_2; + s32 temp_a0; + s32 temp_a2; + s32 temp_t7_2; + s32 temp_v0; + s32 temp_v0_3; + s32 temp_v0_4; + s8 temp_a1; + u32 temp_t7; + s32 phi_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk0; + temp_t7 = arg0->unk4; + temp_a1 = *(&D_800EFD64 + *(&D_800E85F7 + temp_v0)); + temp_a2 = temp_v0 - 0xB1; + switch (temp_t7) { + case 0: + arg0->unkC = D_800E72F8.unk0; + arg0->unk4 = 1; + arg0->unk10 = D_800E72F8.unk2; + return; + case 1: + temp_v0_2 = ((D_8018EDF3 << 5) + (temp_a2 * 8)) - 0x40 + &D_800E7300; + sp3C = temp_v0_2; + func_800A9208(arg0, *temp_v0_2, temp_a2); + func_800A9278(arg0, sp3C->unk2); + if (sp3C->unk0 == arg0->unkC) { + arg0->unk4 = 2; + arg0->unk20 = 0; + return; + } + default: + return; + case 2: + temp_v0_3 = gModeSelection; + phi_v1 = 0; + if (temp_v0_3 != 2) { + if (temp_v0_3 != 3) { + + } else if (temp_a2 != D_800DC5E8) { + goto block_11; + } + } else if (*(&D_801643B8 + (temp_a2 * 4)) != 0) { +block_11: + phi_v1 = 1; + } + if ((phi_v1 == 0) && (temp_t7_2 = arg0->unk20 + 1, arg0->unk20 = temp_t7_2, ((temp_t7_2 < 0x1F) == 0)) && (sp34 = temp_a1, sp38 = temp_a2, ((func_800AAEF4(0xB0, temp_a1, temp_a2)->unk4 < 2) == 0))) { + sp38 = temp_a2; + func_8009A640(arg0->unk18, 0, temp_a2, segmented_to_virtual_dupe(*(&D_800E8380 + (temp_a1 * 4)), temp_a1, temp_a2)); + arg0->unk4 = 3; + temp_a0 = temp_a2 & 0xFF; + sp24 = temp_a0; + func_800CA24C(temp_a0); + func_800C90F4(temp_a0, (*(&D_800E86A8 + temp_a2) * 0x10) + 0x29008007, temp_a2); + return; + } + /* Duplicate return node #18. Try simplifying control flow for better match */ + return; + case 3: + temp_v0_4 = temp_a1 * 4; + if (*(&D_8018DEE4 + (arg0->unk18 * 0x18)) >= *(&D_800E8440 + temp_v0_4)) { + sp38 = temp_a2; + func_8009A640(arg0->unk18, 0, temp_a2, segmented_to_virtual_dupe(*(&D_800E83A0 + temp_v0_4), temp_a1, temp_a2)); + arg0->unk4 = 4; + } + /* Duplicate return node #18. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ACF40.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AD1A4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800921B4(); /* extern */ +? func_8009E650(?, ?, ?, ?); /* extern */ +? func_800A9208(void *, ?); /* extern */ -Unable to determine jump table for jr instruction at func_800AD1A4.s line 13. +void func_800AD1A4(void *arg0) { + s32 temp_t2; + s32 temp_v0; + u32 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + arg0->unkC = 0x14A; + arg0->unk4 = 1; + func_800921B4(); + func_8009E650(0xBB, 0, 0, 0); + return; + case 1: + func_800A9208(arg0, 0xA0); + if (arg0->unkC == 0xA0) { + arg0->unk4 = 2; + arg0->unk20 = 0; + return; + } + default: + return; + case 2: + temp_t2 = arg0->unk20 + 1; + arg0->unk20 = temp_t2; + if (temp_t2 >= 0x15) { + arg0->unk4 = 3; + return; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + case 3: + if (D_8018D9D8 != 0) { + func_800921B4(); + arg0->unk4 = 4; + arg0->unk1C = arg0->unkC; + func_8009E650(0xBA, 0, 0, 0); + return; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + case 4: + temp_v0 = arg0->unk1C; + arg0->unkC = temp_v0; + if (temp_v0 < 0x14A) { + if (D_8018D9D8 != 0) { + arg0->unk1C = temp_v0 + 0x20; + return; + } + arg0->unk1C = temp_v0 + 0x10; + return; + } + arg0->unk0 = 0; + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AD1A4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AD2E8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800B6708(); /* extern */ +s32 osPfsFindFile(? *, u16, s32, ? *, ? *, ? *); /* extern */ +? play_sound2(?, u16); /* extern */ +extern ? D_8018E868; +extern ? D_8018EB84; +static ? D_800F2E64; /* unable to generate initializer; const */ +static ? D_800F2E74; /* unable to generate initializer; const */ +u16 D_800E86F0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AD2E8.s line 13. +void func_800AD2E8(void *arg0) { + s32 sp28; + f64 temp_f0; + f64 temp_f0_2; + f64 temp_f0_3; + f64 temp_f0_4; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_a2; + s32 temp_v0_7; + s32 temp_v0_8; + s8 temp_t3; + u16 temp_a1; + u16 temp_a1_2; + u32 temp_t2; + u32 temp_t9; + u32 temp_v0; + u32 temp_v0_3; + u32 temp_v0_4; + u32 temp_v0_5; + u32 temp_v0_6; + void *temp_t6; + void *temp_v0_2; + void *temp_v1; + void *temp_v1_2; + s32 phi_a1; + s32 phi_a0; + u16 phi_a1_2; + u16 phi_a1_3; + s32 phi_v1; + s32 phi_v1_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk4; + if (temp_v0 < 0x20) { + switch (temp_v0) { /* switch 1 */ + case 0: /* switch 1 */ + arg0->unkC = -0xA0; + arg0->unk4 = 1; + D_8018D9BC->unk0 = D_800F0B18; + D_8018D9BC->unk1 = D_800F0B19; + D_8018D9BC->unk2 = D_800F0B1A; + D_8018D9BC->unk3 = D_800F0B1B; + arg0->unk20 = arg0->unkC; + return; + case 1: /* switch 1 */ + temp_a0 = arg0->unk20; + arg0->unkC = temp_a0; + phi_a1 = 0x10; + if (D_8018D9D8 != 0) { + phi_a1 = 0x20; + } + temp_a2 = temp_a0 + phi_a1; + if (temp_a2 < 0) { + arg0->unk20 = temp_a2; + temp_v0_2 = D_800DC5EC; + temp_v0_2->unk30 = temp_v0_2->unk30 + phi_a1; + temp_v1 = D_800DC5F0; + temp_v1->unk30 = temp_v1->unk30 - phi_a1; + return; + } + arg0->unk20 = 0; + arg0->unkC = 0; + temp_t3 = D_8018EDF5; + arg0->unk4 = temp_t3; + if ((temp_t3 == 9) && (D_80162DF8 == 1)) { + arg0->unk4 = temp_t3 - 1; + } + D_800DC5EC->unk30 = 0xF0; + D_800DC5F0->unk30 = 0x50; + return; + case 5: /* switch 1 */ + case 6: /* switch 1 */ + case 7: /* switch 1 */ + case 8: /* switch 1 */ + case 9: /* switch 1 */ + case 10: /* switch 1 */ + if (func_800B4520() == 0) { + temp_v1_2 = D_800DC4BC; + temp_a1 = temp_v1_2->unk6; + temp_a0_2 = temp_a1 | temp_v1_2->unkC; + phi_a0 = temp_a0_2; + phi_a1_2 = temp_a1; + if ((temp_a0_2 & 0x800) != 0) { + temp_v0_3 = arg0->unk4; + temp_t2 = temp_v0_3 - 1; + if (temp_v0_3 >= 6) { + arg0->unk4 = temp_t2; + if ((D_80162DF8 == 1) && (temp_t2 == 9)) { + arg0->unk4 = temp_t2 - 1; + } + play_sound2(0x49008000, temp_a1); + temp_f0 = arg0->unk24; + if (temp_f0 < 4.2) { + arg0->unk24 = temp_f0 + 4.0; + } + arg0->unk8 = -1; + temp_t6 = D_800DC4BC; + temp_a1_2 = temp_t6->unk6; + phi_a0 = temp_a1_2 | temp_t6->unkC; + phi_a1_2 = temp_a1_2; + } + } + phi_a1_3 = phi_a1_2; + if ((phi_a0 & 0x400) != 0) { + temp_v0_4 = arg0->unk4; + temp_t9 = temp_v0_4 + 1; + if (temp_v0_4 < 0xA) { + arg0->unk4 = temp_t9; + if ((D_80162DF8 == 1) && (temp_t9 == 9)) { + arg0->unk4 = temp_t9 + 1; + } + temp_v0_5 = arg0->unk4; + if ((temp_v0_5 == 0xA) && (D_80162DD4 != 0)) { + arg0->unk4 = temp_v0_5 - 2; + phi_a1_3 = D_800DC4BC->unk6; + } else { + play_sound2(0x49008000, phi_a1_2); + temp_f0_2 = arg0->unk24; + if (temp_f0_2 < 4.2) { + arg0->unk24 = temp_f0_2 + 4.0; + } + arg0->unk8 = 1; + phi_a1_3 = D_800DC4BC->unk6; + } + } + } + if ((phi_a1_3 & 0x9000) != 0) { + temp_v0_6 = arg0->unk4; + if (temp_v0_6 == 0xA) { + temp_f0_3 = arg0->unk24; + phi_v1 = 0; + if (temp_f0_3 < 4.2) { + arg0->unk24 = temp_f0_3 + 4.0; + } + if (D_800E86F8 != 0) { + sp28 = 0; + temp_v0_7 = osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84); + if (temp_v0_7 != 0) { + if (temp_v0_7 != 2) { + if (temp_v0_7 != 5) { + goto block_42; + } + } else { +block_42: + D_800E86F8 = 0; + } + } else { + func_800B6708(); + arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x11; + sp28 = 1; + play_sound2(0x49008001); + phi_v1 = 1; + } + } + if (phi_v1 == 0) { + if (D_800E86F8 == 0) { + sp28 = phi_v1; + temp_v0_8 = func_800B5F30(); + phi_v1_2 = phi_v1; + switch (temp_v0_8) { /* switch 2 */ + case -1: /* switch 2 */ + arg0->unk4 = 0xB; + phi_v1_2 = 1; + break; + case -3: /* switch 2 */ + case -2: /* switch 2 */ + arg0->unk4 = 0xC; + phi_v1_2 = 1; + break; + case 1: /* switch 2 */ + case 11: /* switch 2 */ + arg0->unk4 = 0xB; + phi_v1_2 = 1; + break; + case 10: /* switch 2 */ + arg0->unk4 = 0xC; + phi_v1_2 = 1; + break; + default: /* switch 2 */ + arg0->unk4 = 0xC; + phi_v1_2 = 1; + break; + } + if (phi_v1_2 != 0) { + play_sound2(0x4900FF07); + return; + } + if (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) == 0) { + func_800B6708(); + arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x11; + play_sound2(0x49008001); + return; + } + goto block_56; + } +block_56: + if (D_8018EB7C >= D_8018EB78) { + arg0->unk4 = 0xE; + play_sound2(0x4900FF07); + return; + } + if (D_8018EB80 >= 0x79) { + arg0->unk4 = 0x13; + arg0->unk1C = 0; + play_sound2(0x49008001); + return; + } + arg0->unk4 = 0xE; + play_sound2(0x4900FF07); + return; + } + /* Duplicate return node #127. Try simplifying control flow for better match */ + return; + } + arg0->unk1C = temp_v0_6; + D_8018EDF5 = temp_v0_6; + arg0->unk4 = 0x1E; + arg0->unk20 = arg0->unk10; + play_sound2(0x49008015, phi_a1_3); + temp_f0_4 = arg0->unk24; + if (temp_f0_4 < 4.2) { + arg0->unk24 = temp_f0_4 + 4.0; + } + /* Duplicate return node #127. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #127. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #127. Try simplifying control flow for better match */ + return; + } + } else { + case 2: /* switch 1 */ + case 3: /* switch 1 */ + case 4: /* switch 1 */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AD2E8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800ADF48: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009DFE0(?, void *, struct Controller *, s32 *); /* extern */ +? func_800C9F90(?); /* extern */ +? func_800CA330(?); /* extern */ +? func_8028DF38(?, void *, struct Controller *, s32 *); /* extern */ +? play_sound2(?, void *, struct Controller *, s32 *); /* extern */ +static ? D_800F0B50; /* unable to generate initializer; const */ +static ? D_800F0B54; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800ADF48.s line 15. +void func_800ADF48(void *arg0) { + struct Controller *sp18; + f64 temp_f0; + f64 temp_f0_2; + f64 temp_f0_3; + s32 temp_a0; + s32 temp_t2; + s32 temp_v0_2; + s8 temp_v0_3; + struct Controller *temp_a2; + u16 temp_v1; + u16 temp_v1_2; + u32 temp_t7; + u32 temp_v0; + void *temp_a1; + s32 phi_a0; + void *phi_a1; + u16 phi_v1; + void *phi_a1_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (D_800DC5FC != 0) { + temp_t7 = arg0->unk4; + switch (temp_t7) { + case 0: + arg0->unk4 = *(&D_800F0B50 + gModeSelection); + return; + case 11: + case 12: + case 13: + case 14: + case 15: + case 21: + case 22: + case 23: + case 24: + case 31: + case 32: + case 41: + case 42: + case 43: + case 44: + arg0 = arg0; + temp_a1 = arg0; + phi_a1 = temp_a1; + if (func_800B4520(arg0) == 0) { + temp_t2 = (D_800DC5FC * 0x10) - 0x10; + temp_a2 = temp_t2 + gControllers; + temp_v1 = temp_a2->buttonPressed; + temp_a0 = temp_v1 | temp_a2->stickPressed; + phi_a0 = temp_a0; + phi_v1 = temp_v1; + if ((temp_a0 & 0x800) != 0) { + temp_v0 = temp_a1->unk4; + if (*(&D_800F0B50 + gModeSelection) < temp_v0) { + temp_a1->unk4 = temp_v0 - 1; + sp18 = temp_a2; + arg0 = temp_a1; + play_sound2(0x49008000, temp_a1, temp_a2, &gModeSelection); + temp_f0 = arg0->unk24; + phi_a1 = arg0; + if (temp_f0 < 4.2) { + arg0->unk24 = temp_f0 + 4.0; + } + arg0->unk8 = -1; + temp_v1_2 = temp_a2->buttonPressed; + phi_a0 = temp_v1_2 | temp_a2->stickPressed; + phi_v1 = temp_v1_2; + } + } + phi_a1_2 = phi_a1; + if ((phi_a0 & 0x400) != 0) { + temp_v0_2 = phi_a1->unk4; + if (temp_v0_2 < *(&D_800F0B54 + gModeSelection)) { + phi_a1->unk4 = temp_v0_2 + 1; + sp18 = temp_t2 + gControllers; + arg0 = phi_a1; + play_sound2(0x49008000, phi_a1, temp_t2 + gControllers, &gModeSelection); + temp_f0_2 = arg0->unk24; + phi_a1_2 = arg0; + if (temp_f0_2 < 4.2) { + arg0->unk24 = temp_f0_2 + 4.0; + } + arg0->unk8 = 1; + phi_v1 = (temp_t2 + gControllers)->buttonPressed; + } + } + if (((phi_v1 & 0x4000) != 0) && (temp_v0_3 = *(&D_800F0B50 + gModeSelection), (phi_a1_2->unk4 != temp_v0_3))) { + phi_a1_2->unk4 = temp_v0_3; + play_sound2(0x49008002, phi_a1_2, temp_t2 + gControllers, &gModeSelection); + return; + } + if ((phi_v1 & 0x9000) != 0) { + if (phi_a1_2->unk4 == *(&D_800F0B50 + gModeSelection)) { + phi_a1_2->unk4 = 0; + D_800DC5FC = 0; + func_8028DF38(0x1E, phi_a1_2, temp_t2 + gControllers, &gModeSelection); + func_800C9F90(0); + return; + } + arg0 = phi_a1_2; + func_8009DFE0(0x1E, phi_a1_2, temp_t2 + gControllers, &gModeSelection); + play_sound2(0x4900801B); + func_800CA330(0x3C); + temp_f0_3 = arg0->unk24; + if (temp_f0_3 < 4.2) { + arg0->unk24 = temp_f0_3 + 4.0; + return; + } + /* Duplicate return node #24. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #24. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #24. Try simplifying control flow for better match */ + return; + } + } else { + arg0->unk4 = 0; + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ADF48.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AE218: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009DFE0(?); /* extern */ +? func_800B6708(); /* extern */ +? func_800CA330(?); /* extern */ +? func_800CA388(?); /* extern */ +s32 osPfsFindFile(? *, u16, s32, ? *, ? *, ? *); /* extern */ +? play_sound2(?, s32); /* extern */ +extern ? D_8018E868; +extern ? D_8018EB84; +extern ? D_8018EE10; +static ? D_800F2E64; /* unable to generate initializer; const */ +static ? D_800F2E74; /* unable to generate initializer; const */ +s16 D_800DC5B8; /* unable to generate initializer */ +u16 D_800E86F0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AE218.s line 19. +void func_800AE218(void *arg0) { + s32 sp28; + f64 temp_f0; + f64 temp_f0_10; + f64 temp_f0_11; + f64 temp_f0_2; + f64 temp_f0_3; + f64 temp_f0_4; + f64 temp_f0_5; + f64 temp_f0_6; + f64 temp_f0_7; + f64 temp_f0_8; + f64 temp_f0_9; + s32 temp_a0_4; + s32 temp_a1; + s32 temp_a1_2; + s32 temp_a1_3; + s32 temp_t5; + s32 temp_t6_2; + s32 temp_t9; + s32 temp_v0; + s32 temp_v0_3; + s32 temp_v0_4; + s32 temp_v1; + s32 temp_v1_2; + s32 temp_v1_3; + s32 temp_v1_4; + s32 temp_v1_5; + u16 temp_a0; + u16 temp_a0_2; + u16 temp_a0_3; + u16 temp_a0_5; + u16 temp_a0_6; + void *temp_t0; + void *temp_t2; + void *temp_t6; + void *temp_v0_2; + void *temp_v0_5; + void *temp_v0_6; + s32 phi_a1; + u16 phi_a0; + s32 phi_v1; + s32 phi_v1_2; + s32 phi_a1_2; + s32 phi_a1_3; + u16 phi_a0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (arg0->unk4 != 0) { + D_800DC5B8 = 0; + } + switch (arg0->unk4) { /* switch 1 */ + case 0: /* switch 1 */ + temp_v0 = arg0->unk1C; + if (temp_v0 < 0x1E) { + arg0->unk1C = temp_v0 + 1; + } + if ((D_800DC4BC->unk6 & 0x1000) != 0) { + arg0->unk4 = 0xF; + play_sound2(0x49008005); + return; + } + if (D_8018CAE0 != 0) { + arg0->unk4 = 1; + arg0->unk1C = 0; + return; + } + default: /* switch 1 */ + return; + case 1: /* switch 1 */ + temp_t5 = arg0->unk1C + 3; + arg0->unk1C = temp_t5; + if (temp_t5 >= 0x8D) { + arg0->unk4 = 0xF; + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + case 11: /* switch 1 */ + case 12: /* switch 1 */ + case 13: /* switch 1 */ + case 14: /* switch 1 */ + case 15: /* switch 1 */ + case 16: /* switch 1 */ + if (func_800B4520() == 0) { + temp_v0_2 = D_800DC4BC; + temp_a0 = temp_v0_2->unk6; + temp_a1 = temp_a0 | temp_v0_2->unkC; + phi_a1 = temp_a1; + phi_a0 = temp_a0; + if ((temp_a1 & 0x800) != 0) { + temp_v1 = arg0->unk4; + if (temp_v1 >= 0xC) { + arg0->unk4 = temp_v1 - 1; + play_sound2(0x49008000, temp_a1); + temp_f0 = arg0->unk24; + if (temp_f0 < 4.2) { + arg0->unk24 = temp_f0 + 4.0; + } + arg0->unk8 = -1; + temp_t2 = D_800DC4BC; + temp_a0_2 = temp_t2->unk6; + phi_a1 = temp_a0_2 | temp_t2->unkC; + phi_a0 = temp_a0_2; + } + } + if ((phi_a1 & 0x400) != 0) { + temp_v1_2 = arg0->unk4; + if (temp_v1_2 < 0x10) { + arg0->unk4 = temp_v1_2 + 1; + play_sound2(0x49008000, phi_a1); + temp_f0_2 = arg0->unk24; + if (temp_f0_2 < 4.2) { + arg0->unk24 = temp_f0_2 + 4.0; + } + arg0->unk8 = 1; + phi_a0 = D_800DC4BC->unk6; + } + } + if ((phi_a0 & 0x9000) != 0) { + if (arg0->unk4 == 0x10) { + temp_f0_3 = arg0->unk24; + phi_v1 = 0; + if (temp_f0_3 < 4.2) { + arg0->unk24 = temp_f0_3 + 4.0; + } + if (D_800E86F8 != 0) { + sp28 = 0; + temp_v0_3 = osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84); + if (temp_v0_3 != 0) { + if (temp_v0_3 != 2) { + if (temp_v0_3 != 5) { + goto block_34; + } + } else { +block_34: + D_800E86F8 = 0; + } + } else { + func_800B6708(); + arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x1E; + phi_v1 = 1; + } + } + if (phi_v1 != 0) { + play_sound2(0x49008001); + return; + } + if (D_800E86F8 == 0) { + sp28 = phi_v1; + temp_v0_4 = func_800B5F30(); + phi_v1_2 = phi_v1; + switch (temp_v0_4) { /* switch 2 */ + case -1: /* switch 2 */ + arg0->unk4 = 0x15; + phi_v1_2 = 1; + break; + case -3: /* switch 2 */ + case -2: /* switch 2 */ + arg0->unk4 = 0x16; + phi_v1_2 = 1; + break; + case 1: /* switch 2 */ + case 11: /* switch 2 */ + arg0->unk4 = 0x15; + phi_v1_2 = 1; + break; + case 10: /* switch 2 */ + arg0->unk4 = 0x16; + phi_v1_2 = 1; + break; + default: /* switch 2 */ + arg0->unk4 = 0x16; + phi_v1_2 = 1; + break; + } + if (phi_v1_2 != 0) { + play_sound2(0x4900FF07); + return; + } + if (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) == 0) { + func_800B6708(); + arg0->unk4 = func_800B6348((gCupSelection * 4) + gCourseSelection) + 0x1E; + play_sound2(0x49008001); + return; + } + goto block_49; + } +block_49: + if (D_8018EB7C >= D_8018EB78) { + arg0->unk4 = 0x18; + play_sound2(0x4900FF07); + return; + } + if (D_8018EB80 >= 0x79) { + arg0->unk4 = 0x20; + arg0->unk1C = 0; + play_sound2(0x49008001); + return; + } + arg0->unk4 = 0x18; + play_sound2(0x4900FF07); + return; + } + func_8009DFE0(0x1E); + play_sound2(0x49008016); + func_800CA330(0x19); + func_800CA388(0x19); + temp_f0_4 = arg0->unk24; + if (temp_f0_4 < 4.2) { + arg0->unk24 = temp_f0_4 + 4.0; + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + case 21: /* switch 1 */ + case 22: /* switch 1 */ + case 23: /* switch 1 */ + case 24: /* switch 1 */ + case 25: /* switch 1 */ + case 26: /* switch 1 */ + case 41: /* switch 1 */ + if (((D_800DC4BC->unk6 & 0xD000) != 0) && (arg0->unk4 = 0x10, play_sound2(0x49008002), temp_f0_5 = arg0->unk24, (temp_f0_5 < 4.2))) { + arg0->unk24 = temp_f0_5 + 4.0; + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + case 30: /* switch 1 */ + case 31: /* switch 1 */ + arg0->unk20 = arg0->unk4 - 0x1E; + if (func_800B639C((gCupSelection * 4) + gCourseSelection) != arg0->unk20) { + temp_v0_5 = D_800DC4BC; + temp_a1_2 = temp_v0_5->unk6 | temp_v0_5->unkC; + phi_a1_2 = temp_a1_2; + if ((temp_a1_2 & 0x800) != 0) { + temp_v1_3 = arg0->unk4; + if (temp_v1_3 >= 0x1F) { + arg0->unk4 = temp_v1_3 - 1; + play_sound2(0x49008000, temp_a1_2); + temp_f0_6 = arg0->unk24; + if (temp_f0_6 < 4.2) { + arg0->unk24 = temp_f0_6 + 4.0; + } + arg0->unk8 = -1; + temp_t0 = D_800DC4BC; + phi_a1_2 = temp_t0->unk6 | temp_t0->unkC; + } + } + if ((phi_a1_2 & 0x400) != 0) { + temp_v1_4 = arg0->unk4; + if (temp_v1_4 < 0x1F) { + arg0->unk4 = temp_v1_4 + 1; + play_sound2(0x49008000, phi_a1_2); + temp_f0_7 = arg0->unk24; + if (temp_f0_7 < 4.2) { + arg0->unk24 = temp_f0_7 + 4.0; + } + arg0->unk8 = 1; + } + } + } + temp_a0_3 = D_800DC4BC->unk6; + if ((temp_a0_3 & 0x4000) != 0) { + arg0->unk4 = 0x10; + play_sound2(0x49008002); + return; + } + if ((temp_a0_3 & 0x9000) != 0) { + temp_a0_4 = arg0->unk20; + if (((temp_a0_4 << 7) + &D_8018EE10)->unk4 == 0) { + arg0->unk4 = 0x28; + arg0->unk1C = 0; + } else if (func_800B63F0(temp_a0_4) == 0) { + arg0->unk4 = 0x1A; + } else { + arg0->unk4 = 0x23; + } + play_sound2(0x49008001); + temp_f0_8 = arg0->unk24; + if (temp_f0_8 < 4.2) { + arg0->unk24 = temp_f0_8 + 4.0; + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + case 32: /* switch 1 */ + if ((arg0->unk1C == 1) && (func_800B6A68() != 0)) { + arg0->unk4 = 0x19; + return; + } + temp_t9 = arg0->unk1C + 1; + arg0->unk1C = temp_t9; + if (temp_t9 >= 2) { + arg0->unk4 = 0x1E; + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + case 35: /* switch 1 */ + case 36: /* switch 1 */ + temp_v0_6 = D_800DC4BC; + temp_a0_5 = temp_v0_6->unk6; + temp_a1_3 = temp_a0_5 | temp_v0_6->unkC; + phi_a1_3 = temp_a1_3; + phi_a0_2 = temp_a0_5; + if (((temp_a1_3 & 0x800) != 0) && (arg0->unk4 >= 0x24)) { + arg0->unk4 = arg0->unk4 - 1; + play_sound2(0x49008000, temp_a1_3); + temp_f0_9 = arg0->unk24; + if (temp_f0_9 < 4.2) { + arg0->unk24 = temp_f0_9 + 4.0; + } + arg0->unk8 = -1; + temp_t6 = D_800DC4BC; + temp_a0_6 = temp_t6->unk6; + phi_a1_3 = temp_a0_6 | temp_t6->unkC; + phi_a0_2 = temp_a0_6; + } + if ((phi_a1_3 & 0x400) != 0) { + temp_v1_5 = arg0->unk4; + if (temp_v1_5 < 0x24) { + arg0->unk4 = temp_v1_5 + 1; + play_sound2(0x49008000, phi_a1_3); + temp_f0_10 = arg0->unk24; + if (temp_f0_10 < 4.2) { + arg0->unk24 = temp_f0_10 + 4.0; + } + arg0->unk8 = 1; + phi_a0_2 = D_800DC4BC->unk6; + } + } + if ((phi_a0_2 & 0x4000) != 0) { + arg0->unk4 = arg0->unk20 + 0x1E; + play_sound2(0x49008002); + return; + } + if ((phi_a0_2 & 0x9000) != 0) { + if (arg0->unk4 == 0x24) { + arg0->unk4 = 0x28; + arg0->unk1C = 0; + play_sound2(0x49008001); + temp_f0_11 = arg0->unk24; + if (temp_f0_11 < 4.2) { + arg0->unk24 = temp_f0_11 + 4.0; + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + } + arg0->unk4 = arg0->unk20 + 0x1E; + play_sound2(0x49008002); + return; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + case 40: /* switch 1 */ + if (arg0->unk1C == 1) { + if (osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84) != 0) { + arg0->unk4 = 0x29; + play_sound2(0x4900FF07); + return; + } + if (func_800B6178(arg0->unk20) != 0) { + arg0->unk4 = 0x29; + play_sound2(0x4900FF07); + return; + } + goto block_107; + } +block_107: + temp_t6_2 = arg0->unk1C + 1; + arg0->unk1C = temp_t6_2; + if (temp_t6_2 >= 2) { + arg0->unk4 = 0x10; + } + /* Duplicate return node #109. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AE218.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AEC54: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_80093034(? *); /* extern */ +? func_800A9208(void *, ?); /* extern */ +? func_800A94C8(void *, ?, ?); /* extern */ +? func_800C90F4(?, s32); /* extern */ -Unable to determine jump table for jr instruction at func_800AEC54.s line 13. +void func_800AEC54(void *arg0) { + s32 temp_t5; + s32 temp_t9; + u32 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + arg0->unkC = (func_80093034("NOW-MEET THE COURSE GHOST!!!") / 2) + 0x140; + arg0->unk10 = 0xDA; + arg0->unk4 = 1; + func_800C90F4(0, (D_80162DE4 * 0x10) + 0x29008001); + return; + case 1: + func_800A9208(arg0, 0xA0); + if (arg0->unkC == 0xA0) { + arg0->unk4 = 2; + arg0->unk1C = 0; + return; + } + default: + return; + case 2: + temp_t5 = arg0->unk1C + 1; + arg0->unk1C = temp_t5; + if (temp_t5 >= 0x3D) { + arg0->unk4 = 3; + arg0->unk1C = 0; + return; + } + /* Duplicate return node #12. Try simplifying control flow for better match */ + return; + case 4: + temp_t9 = arg0->unk1C + 1; + arg0->unk1C = temp_t9; + if (temp_t9 >= 6) { + arg0->unk0 = 0; + return; + } + case 3: + func_800A94C8(arg0, 0xA0, -1); + if (((arg0->unkC + 0x14) == -(func_80093034("NOW-MEET THE COURSE GHOST!!!") / 2)) && (arg0->unk4 == 3)) { + arg0->unk4 = 4; + } + /* Duplicate return node #12. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AEC54.s") #endif @@ -11972,15 +18075,75 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AEF74.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AF004: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009DFE0(?); /* extern */ +? func_8009E650(s32, ?, ?, ?); /* extern */ +? func_800CA330(?); /* extern */ +? func_800CA388(?); /* extern */ +? play_sound2(?); /* extern */ -Unable to determine jump table for jr instruction at func_800AF004.s line 13. +void func_800AF004(void *arg0) { + s32 temp_t1; + s32 temp_t6_2; + s32 temp_t8; + u32 temp_t6; + u32 temp_t9; + void *temp_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk4; + switch (temp_t6) { + case 0: + temp_t8 = arg0->unk1C + 3; + arg0->unk1C = temp_t8; + if (temp_t8 >= 0x65) { + arg0->unk1C = 0; + arg0->unk4 = 1; + gCupSelection = gCupSelection % 4; + gCCSelection = gCCSelection % 4; + func_8009E650(0x12C, 0, 0, 4); + return; + } + default: + return; + case 1: + case 2: + case 3: + case 4: + temp_t6_2 = arg0->unk1C + 1; + arg0->unk1C = temp_t6_2; + if (temp_t6_2 >= 9) { + arg0->unk1C = 0; + temp_t9 = arg0->unk4 + 1; + arg0->unk4 = temp_t9; + func_8009E650(temp_t9 + 0x12B, 0, 0, 4); + return; + } + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + case 5: + temp_t1 = arg0->unk1C + 1; + arg0->unk1C = temp_t1; + if ((temp_t1 >= 0x65) && ((temp_v0 = D_800DC4CC, (temp_v0->unk6 != 0)) || (temp_v0->unkC != 0))) { + arg0->unk4 = 6; + arg0->unk1C = 0; + if (D_802874F5 < 3) { + play_sound2(0x49008016); + return; + } + play_sound2(0x4900801B); + return; + } + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + case 6: + func_8009DFE0(0x1E); + func_800CA330(0x19); + func_800CA388(0x19); + arg0->unk4 = 7; + /* Duplicate return node #13. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AF004.s") #endif @@ -12026,15 +18189,87 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AF1AC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AF270: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009A640(s32, ?, s32, s32); /* extern */ +? func_800A91D8(void *, s16, s16); /* extern */ +? func_800C90F4(?, s32); /* extern */ +? func_800CA0A0(); /* extern */ +? func_800CA0B8(? *, ? *); /* extern */ +s32 segmented_to_virtual_dupe(s32, ? *); /* extern */ +extern ? D_8018DEE4; +extern ? D_802874D8; +static ? D_800E7458; /* unable to generate initializer; const */ +static ? D_800E7480; /* unable to generate initializer; const */ +static ? D_800E8380; /* unable to generate initializer; const */ +static ? D_800E83A0; /* unable to generate initializer; const */ +static ? D_800E8440; /* unable to generate initializer; const */ +static ? D_800EFD64; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800AF270.s line 22. +void func_800AF270(void *arg0) { + s32 sp30; + void *sp20; + s32 temp_t2; + s32 temp_v1; + s32 temp_v1_2; + s8 temp_t6; + s8 temp_v0; + u32 temp_t8; + void *temp_v0_2; + void *temp_v0_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = D_802874D8.unk1E; + sp30 = temp_t6; + temp_t8 = arg0->unk4; + temp_v0 = *(&D_800EFD64 + temp_t6); + temp_v1 = arg0->unk0 - 0x12C; + switch (temp_t8) { + case 0: + temp_v0_2 = (temp_v1 * 8) + &D_800E7458; + arg0->unkC = temp_v0_2->unk0; + arg0->unk4 = 1; + arg0->unk10 = temp_v0_2->unk2; + return; + case 1: + temp_v0_3 = (temp_v1 * 8) + &D_800E7480; + sp20 = temp_v0_3; + func_800A91D8(arg0, temp_v0_3->unk0, temp_v0_3->unk2); + if ((temp_v0_3->unk0 == arg0->unkC) && (temp_v0_3->unk2 == arg0->unk10)) { + arg0->unk4 = 2; + arg0->unk20 = 0; + return; + } + default: + return; + case 2: + temp_t2 = arg0->unk20 + 1; + arg0->unk20 = temp_t2; + if (temp_t2 >= 0x1F) { + if (D_802874D8.unk1D >= 3) { + arg0->unk4 = 4; + func_800CA0B8(&D_800E8380, &D_802874D8); + func_800C90F4(0, (sp30 * 0x10) + 0x29008003); + func_800CA0A0(); + return; + } + arg0->unk4 = 3; + func_8009A640(arg0->unk18, 0, sp30, segmented_to_virtual_dupe(*(&D_800E8380 + (temp_v0 * 4)), &D_802874D8)); + func_800CA0B8(); + func_800C90F4(0, (sp30 * 0x10) + 0x29008007); + func_800CA0A0(); + return; + } + /* Duplicate return node #12. Try simplifying control flow for better match */ + return; + case 3: + temp_v1_2 = temp_v0 * 4; + if (*(&D_8018DEE4 + (arg0->unk18 * 0x18)) >= *(&D_800E8440 + temp_v1_2)) { + func_8009A640(arg0->unk18, 0, sp30, segmented_to_virtual_dupe(*(&D_800E83A0 + temp_v1_2), &D_802874D8)); + arg0->unk4 = 4; + } + /* Duplicate return node #12. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AF270.s") #endif @@ -12060,29 +18295,153 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AF480.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AF4DC: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800A9208(void *, s32); /* extern */ +? func_800A94C8(void *, s32, ?); /* extern */ +static ? D_802850C0; /* unable to generate initializer */ +static ? D_802854B0; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_800AF4DC.s line 21. +void func_800AF4DC(void *arg0) { + void *sp20; + f64 temp_f0; + s32 temp_t6; + s32 temp_t6_2; + s32 temp_v0; + u32 temp_t9; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t9 = arg0->unk4; + temp_v0 = arg0->unk0 - 0x190; + temp_v1 = (temp_v0 * 0x10) + &D_802850C0; + arg0->unk10 = temp_v1->unk6; + switch (temp_t9) { + case 0: + arg0->unk4 = 1; + arg0->unkC = temp_v1->unk4; + sp20 = temp_v1; + arg0->unk20 = ((func_80093034(*(&D_802854B0 + (temp_v0 * 4))) * temp_v1->unk0) / 2.0f) + temp_v1->unk8; + /* fallthrough */ + case 1: + func_800A9208(arg0, arg0->unk20); + temp_t6 = (arg0->unk20 - arg0->unkC) / 4; + arg0->unk1C = temp_t6; + if (temp_t6 >= 9) { + arg0->unk1C = 8; + } + arg0->unk24 = (arg0->unk1C * 0.05) + 1.0; + if (arg0->unkC >= (arg0->unk20 - 0x14)) { + arg0->unk4 = 2; + arg0->unk18 = 0; + return; + } + default: + return; + case 2: + func_800A9208(arg0, arg0->unk20); + temp_t6_2 = arg0->unk18 + 1; + temp_f0 = temp_t6_2 - 0xA; + arg0->unk1C = (arg0->unk20 - arg0->unkC) / 4; + arg0->unk18 = temp_t6_2; + arg0->unk24 = (temp_f0 * 0.0085 * temp_f0) + 0.4; + if ((temp_t6_2 >= 9) && (arg0->unk24 > 1.0)) { + arg0->unk4 = 3; + arg0->unk24 = 1.0f; + return; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + case 3: + if (D_8018ED91 != 0) { + arg0->unk4 = 4; + return; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + case 4: + func_800A94C8(arg0, arg0->unk20, 1); + if (arg0->unk10 > 480.0) { + arg0->unk0 = 0; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AF4DC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800AF740: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800A9208(void *, s32); /* extern */ +? func_800A94C8(void *, s32, ?); /* extern */ +static ? D_802850C0; /* unable to generate initializer */ +static ? D_802854B0; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_800AF740.s line 21. +void func_800AF740(void *arg0) { + void *sp20; + f64 temp_f0; + s32 temp_t6; + s32 temp_t6_2; + s32 temp_v0; + u32 temp_t9; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t9 = arg0->unk4; + temp_v0 = arg0->unk0 - 0x190; + temp_v1 = (temp_v0 * 0x10) + &D_802850C0; + arg0->unk10 = temp_v1->unk6; + switch (temp_t9) { + case 0: + arg0->unk4 = 1; + arg0->unkC = temp_v1->unk4; + sp20 = temp_v1; + arg0->unk20 = temp_v1->unk8 - ((func_80093034(*(&D_802854B0 + (temp_v0 * 4))) * temp_v1->unk0) / 2.0f); + /* fallthrough */ + case 1: + func_800A9208(arg0, arg0->unk20); + temp_t6 = (arg0->unkC - arg0->unk20) / 4; + arg0->unk1C = temp_t6; + if (temp_t6 >= 9) { + arg0->unk1C = 8; + } + arg0->unk24 = (arg0->unk1C * 0.05) + 1.0; + if ((arg0->unk20 + 0x14) >= arg0->unkC) { + arg0->unk4 = 2; + arg0->unk18 = 0; + return; + } + default: + return; + case 2: + func_800A9208(arg0, arg0->unk20); + temp_t6_2 = arg0->unk18 + 1; + temp_f0 = temp_t6_2 - 0xA; + arg0->unk1C = (arg0->unkC - arg0->unk20) / 4; + arg0->unk18 = temp_t6_2; + arg0->unk24 = (temp_f0 * 0.0085 * temp_f0) + 0.4; + if ((temp_t6_2 >= 9) && (arg0->unk24 > 1.0)) { + arg0->unk4 = 3; + arg0->unk24 = 1.0f; + return; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + case 3: + if (D_8018ED91 != 0) { + arg0->unk4 = 4; + return; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + case 4: + func_800A94C8(arg0, arg0->unk20, -1); + if (arg0->unk10 > 480.0) { + arg0->unk0 = 0; + } + /* Duplicate return node #14. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AF740.s") #endif diff --git a/src/code_800AF9B0.c b/src/code_800AF9B0.c index 7a7744265..81192d352 100644 --- a/src/code_800AF9B0.c +++ b/src/code_800AF9B0.c @@ -391,29 +391,659 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B0004.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800B0350: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E1C0(); /* extern */ +? func_800B053C(struct Controller *, s32); /* extern */ +? func_800B13B0(struct Controller *, s32); /* extern */ +? func_800B15AC(struct Controller *, s32); /* extern */ +? func_800B1C40(struct Controller *, s32); /* extern */ +? func_800B1C90(struct Controller *, s32); /* extern */ +? func_800B20F4(struct Controller *, s32); /* extern */ +? func_800B29D8(struct Controller *, s32); /* extern */ +? func_800B3554(struct Controller *, s32); /* extern */ +? func_800B3B58(struct Controller *, s32); /* extern */ +? func_800CA330(?); /* extern */ +? osViSetSpecialFeatures(s32); /* extern */ +? play_sound2(?); /* extern */ -Unable to determine jump table for jr instruction at func_800B0350.s line 63. +void func_800B0350(void) { + s32 temp_t2_2; + u32 temp_t2; + u32 temp_v0; + s32 phi_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (D_800E86A4 == 0) { + phi_s0 = 0; + do { + if ((func_800B4520() == 0) && (gEnableDebugMode != 0) && ((gControllers[phi_s0].buttonPressed & 0x1000) != 0)) { + temp_v0 = D_800E86A0; + if ((temp_v0 != 0xB) && (temp_v0 != 0xC)) { + if (temp_v0 == 0xD) { + func_800CA330(0x19); + goto block_9; + } + } else { +block_9: + play_sound2(0x49008016); + } + if ((D_800E86A0 != 9) && (D_800E86A0 != 0xA)) { + func_8009E1C0(); + } + } + osViSetSpecialFeatures(D_800E86E4); + temp_t2 = D_800E86A0; + switch (temp_t2) { + case 5: + func_800B053C(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 6: + func_800B13B0(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 7: + func_800B15AC(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 8: + func_800B1C40(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 9: + if (phi_s0 == 0) { + func_800B1C90(&gControllers[phi_s0], phi_s0 & 0xFFFF); + } + break; + case 0: + case 10: + func_800B20F4(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 1: + case 11: + func_800B29D8(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 2: + case 12: + func_800B3554(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + case 3: + case 13: + func_800B3B58(&gControllers[phi_s0], phi_s0 & 0xFFFF); + break; + } + temp_t2_2 = (phi_s0 + 1) & 0xFFFF; + phi_s0 = temp_t2_2; + } while (temp_t2_2 < 4); + } +} #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B0350.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800B053C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E280(); /* extern */ +void *func_800AAEF4(?); /* extern */ +? func_800B44BC(); /* extern */ +? func_800B4670(); /* extern */ +? func_800B46D0(?, u16); /* extern */ +? func_800B5948(); /* extern */ +? func_800B6088(s32); /* extern */ +? func_800B6708(); /* extern */ +? func_800B6798(); /* extern */ +s32 osPfsFindFile(? *, u16, s32, ? *, ? *, ? *); /* extern */ +? play_sound2(?, u16, u16); /* extern */ +extern ? D_8018E868; +extern ? D_8018EB84; +extern ? D_8018EE10; +extern ? D_8018EE14; +extern ? D_8018EE15; +static ? D_800F2E64; /* unable to generate initializer; const */ +static ? D_800F2E74; /* unable to generate initializer; const */ +u16 D_800E86F0; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800B053C.s line 42. +void func_800B053C(void *arg0, u16 arg1) { + u16 sp3E; + void *sp38; + void *sp30; + s32 sp2C; + s32 sp20; + f64 temp_f0; + f64 temp_f0_10; + f64 temp_f0_2; + f64 temp_f0_3; + f64 temp_f0_4; + f64 temp_f0_5; + f64 temp_f0_6; + f64 temp_f0_7; + f64 temp_f0_8; + f64 temp_f0_9; + s32 temp_t7; + s32 temp_t9_2; + s32 temp_v0_10; + s32 temp_v0_11; + s32 temp_v0_5; + s32 temp_v0_6; + s8 temp_v0_4; + s8 temp_v0_9; + s8 temp_v1; + s8 temp_v1_2; + s8 temp_v1_3; + s8 temp_v1_4; + s8 temp_v1_5; + s8 temp_v1_6; + u16 temp_t8; + u32 temp_t9; + u8 temp_v0_2; + u8 temp_v0_3; + u8 temp_v0_7; + u8 temp_v0_8; + void *temp_a0; + void *temp_t0; + void *temp_v0; + u16 phi_a2; + s32 phi_a1; + s8 *phi_t1; + s32 phi_a1_2; + s8 *phi_t1_2; + s32 phi_a1_3; + s8 *phi_t1_3; + u16 phi_a1_4; + void *phi_t0; + s8 *phi_t1_4; + s32 phi_a1_5; + s8 *phi_t1_5; + s32 phi_v0; + s32 phi_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t8 = (arg0->unk6 | arg0->unkC) & 0xFFFF; + phi_a2 = temp_t8; + if ((gEnableDebugMode == 0) && ((temp_t8 & 0x1000) != 0)) { + phi_a2 = (temp_t8 | 0x8000) & 0xFFFF; + } + sp3E = phi_a2; + if (func_800B4520(arg0) == 0) { + sp3E = phi_a2; + temp_v0 = func_800AAEF4(0xF0); + temp_v1 = D_8018EDEC; + temp_t0 = temp_v0; + sp30 = D_8018D9C0; + phi_t1_4 = &D_8018EDEC; + switch (temp_v1) { /* switch 1 */ + case 0x15: /* switch 1 */ + case 0x16: /* switch 1 */ + case 0x17: /* switch 1 */ + case 0x18: /* switch 1 */ + sp2C = 0; + phi_a1 = phi_a2; + if (((phi_a2 & 0x400) != 0) && (temp_v1 < 0x18)) { + D_8018EDEC = temp_v1 + 1; + sp20 = phi_a2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a2, phi_a2); + temp_f0 = temp_t0->unk24; + phi_a1 = sp20; + if (temp_f0 < 4.2) { + temp_t0->unk24 = temp_f0 + 4.0; + } + temp_t0->unk8 = 1; + sp2C = 1; + } + phi_t1 = &D_8018EDEC; + if ((phi_a1 & 0x800) != 0) { + temp_v1_2 = D_8018EDEC; + if (temp_v1_2 >= 0x16) { + D_8018EDEC = temp_v1_2 - 1; + sp2C = 1; + sp20 = phi_a1; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a1); + temp_f0_2 = temp_t0->unk24; + phi_t1 = &D_8018EDEC; + if (temp_f0_2 < 4.2) { + temp_t0->unk24 = temp_f0_2 + 4.0; + } + temp_t0->unk8 = -1; + } + } + if (sp2C != 0) { + temp_v0_2 = D_8018EDF2; + if (temp_t0->unk4 != temp_v0_2) { + D_8018ED14 = temp_v0_2; + sp20 = phi_a1; + sp38 = temp_t0; + func_800B4670(); + func_800B5948(); + temp_t0->unk4 = D_8018EDF2; + phi_t1 = &D_8018EDEC; + } + } + if ((phi_a1 & 0x4000) != 0) { + sp38 = temp_t0; + func_8009E280(); + play_sound2(0x49008002); + temp_v0_3 = D_8018EDF2; + if (temp_t0->unk4 != temp_v0_3) { + D_8018ED14 = temp_v0_3; + sp38 = temp_t0; + func_800B4670(); + func_800B5948(); + temp_t0->unk4 = D_8018EDF2; + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + } + if ((phi_a1 & 0x8000) != 0) { + temp_v0_4 = *phi_t1; + if (temp_v0_4 != 0x15) { + if (temp_v0_4 != 0x16) { + if (temp_v0_4 != 0x17) { + if (temp_v0_4 != 0x18) { + return; + } + *phi_t1 = 0x1E; + play_sound2(0x49008001, phi_a1); + return; + } + sp38 = temp_t0; + temp_v0_5 = func_800B5DA4(); + if (temp_v0_5 != -1) { + if (temp_v0_5 != 0) { + if (temp_v0_5 != 1) { + if (temp_v0_5 != 2) { + + } + D_8018EDEC = 0x2D; + play_sound2(0x4900FF07); + return; + } + D_8018EDEC = 0x2C; + play_sound2(0x4900FF07); + return; + } + sp38 = temp_t0; + func_800B6798(); + temp_v0_6 = func_800B5B94(); + temp_t9 = temp_v0_6 + 1; + sp2C = temp_v0_6; + switch (temp_t9) { /* switch 2 */ + case 0: /* switch 2 */ + D_8018EDEC = 0x46; + temp_t0->unk4 = 0; + play_sound2(0x49008001); + break; + case 1: /* switch 2 */ + func_800B6708(); + break; + case 2: /* switch 2 */ + D_8018EDEC = 0x34; + play_sound2(0x4900FF07); + break; + case 5: /* switch 2 */ + D_8018EDEC = 0x37; + play_sound2(0x4900FF07); + break; + default: /* switch 2 */ + D_8018EDEC = 0x35; + play_sound2(0x4900FF07); + break; + } + if ((sp2C == -1) && (sp30->unk4 == 0) && (sp30->unk84 == 0)) { + D_8018EDEC = 0x2A; + play_sound2(0x4900FF07); + return; + } + if (sp2C == 0) { + if (sp30->unk4 != 0) { + D_8018EDEC = 0x28; + play_sound2(0x49008001); + return; + } + if (sp30->unk84 != 0) { + D_8018EDEC = 0x29; + play_sound2(0x49008001); + return; + } + D_8018EDEC = 0x2A; + play_sound2(0x4900FF07); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + } + D_8018EDEC = 0x2B; + play_sound2(0x4900FF07); + return; + } + temp_v0_7 = D_8018EDF2; + if (temp_v0_7 < 3) { + D_8018EDF2 = temp_v0_7 + 1; + } else { + D_8018EDF2 = 0; + } + if (D_8018EDF2 == 2) { + D_8018EDF2 = 3; + } + func_800B44BC(); + temp_v0_8 = D_8018EDF2; + if (temp_v0_8 != 0) { + if (temp_v0_8 != 1) { + if (temp_v0_8 != 3) { + return; + } + play_sound2(0x49008029); + return; + } + play_sound2(0x49008025); + return; + } + play_sound2(0x49008024); + return; + } + func_8009E280(); + play_sound2(0x49008002); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x1E: /* switch 1 */ + case 0x1F: /* switch 1 */ + phi_a1_2 = phi_a2; + if (((phi_a2 & 0x400) != 0) && (temp_v1 < 0x1F)) { + D_8018EDEC = temp_v1 + 1; + sp20 = phi_a2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a2, phi_a2); + temp_f0_3 = temp_t0->unk24; + phi_a1_2 = sp20; + if (temp_f0_3 < 4.2) { + temp_t0->unk24 = temp_f0_3 + 4.0; + } + temp_t0->unk8 = 1; + } + phi_t1_2 = &D_8018EDEC; + if ((phi_a1_2 & 0x800) != 0) { + temp_v1_3 = D_8018EDEC; + if (temp_v1_3 >= 0x1F) { + D_8018EDEC = temp_v1_3 - 1; + sp20 = phi_a1_2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a1_2); + temp_f0_4 = temp_t0->unk24; + phi_t1_2 = &D_8018EDEC; + if (temp_f0_4 < 4.2) { + temp_t0->unk24 = temp_f0_4 + 4.0; + } + temp_t0->unk8 = -1; + } + } + if ((phi_a1_2 & 0x4000) != 0) { + *phi_t1_2 = 0x18; + play_sound2(0x49008002, phi_a1_2); + return; + } + if ((phi_a1_2 & 0x8000) != 0) { + temp_v0_9 = *phi_t1_2; + if (temp_v0_9 != 0x1E) { + if (temp_v0_9 != 0x1F) { + return; + } + *phi_t1_2 = 0x20; + func_800B46D0(0x49000000, phi_a1_2); + D_800DC5AC = 0; + play_sound2(0x4900801D); + return; + } + *phi_t1_2 = 0x18; + play_sound2(0x49008002, phi_a1_2); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x20: /* switch 1 */ + if ((phi_a2 & 0xD000) != 0) { + D_8018EDEC = 0x18; + play_sound2(0x49008002); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x28: /* switch 1 */ + case 0x29: /* switch 1 */ + phi_a1_3 = phi_a2; + if (((phi_a2 & 0x400) != 0) && (temp_v1 < 0x29) && (sp30->unk84 != 0)) { + D_8018EDEC = temp_v1 + 1; + sp20 = phi_a2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a2, phi_a2); + temp_f0_5 = temp_t0->unk24; + phi_a1_3 = sp20; + if (temp_f0_5 < 4.2) { + temp_t0->unk24 = temp_f0_5 + 4.0; + } + temp_t0->unk8 = 1; + } + phi_t1_3 = &D_8018EDEC; + if ((phi_a1_3 & 0x800) != 0) { + temp_v1_4 = D_8018EDEC; + if ((temp_v1_4 >= 0x29) && (sp30->unk4 != 0)) { + D_8018EDEC = temp_v1_4 - 1; + sp20 = phi_a1_3; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a1_3); + temp_f0_6 = temp_t0->unk24; + phi_t1_3 = &D_8018EDEC; + if (temp_f0_6 < 4.2) { + temp_t0->unk24 = temp_f0_6 + 4.0; + } + temp_t0->unk8 = -1; + } + } + if ((phi_a1_3 & 0x4000) != 0) { + *phi_t1_3 = 0x17; + play_sound2(0x49008002, phi_a1_3); + return; + } + if ((phi_a1_3 & 0x8000) != 0) { + temp_t9_2 = *phi_t1_3 - 0x28; + temp_t0->unk20 = temp_t9_2; + if (((sp30 + (temp_t9_2 << 7))->unk5 == D_8018EE95) && (D_8018EE94 != 0)) { + *phi_t1_3 = 0x33; + } else { + *phi_t1_3 = 0x32; + } + play_sound2(0x49008001, phi_a1_3); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x32: /* switch 1 */ + case 0x33: /* switch 1 */ + temp_a0 = ((temp_v1 - 0x32) << 7) + &D_8018EE10; + phi_a1_4 = phi_a2; + if (((sp30 + (temp_v0->unk20 << 7))->unk5 != temp_a0->unk5) || (phi_t0 = temp_t0, (temp_a0->unk4 == 0))) { + if (((phi_a2 & 0x400) != 0) && (temp_v1 < 0x33)) { + D_8018EDEC = temp_v1 + 1; + sp20 = phi_a2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a2, phi_a2); + temp_f0_7 = temp_t0->unk24; + if (temp_f0_7 < 4.2) { + temp_t0->unk24 = temp_f0_7 + 4.0; + } + temp_t0->unk8 = 1; + } + phi_a1_4 = phi_a2; + phi_t0 = temp_t0; + phi_t1_4 = &D_8018EDEC; + if ((phi_a2 & 0x800) != 0) { + temp_v1_5 = D_8018EDEC; + if (temp_v1_5 >= 0x33) { + D_8018EDEC = temp_v1_5 - 1; + sp20 = phi_a2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a2); + temp_f0_8 = temp_t0->unk24; + phi_a1_4 = phi_a2; + phi_t0 = temp_t0; + phi_t1_4 = &D_8018EDEC; + if (temp_f0_8 < 4.2) { + temp_t0->unk24 = temp_f0_8 + 4.0; + } + temp_t0->unk8 = -1; + } + } + } + if ((phi_a1_4 & 0x4000) != 0) { + *phi_t1_4 = phi_t0->unk20 + 0x28; + play_sound2(0x49008002, phi_a1_4); + return; + } + if ((phi_a1_4 & 0x8000) != 0) { + temp_t7 = *phi_t1_4 - 0x32; + phi_t0->unk1C = temp_t7; + if (*(&D_8018EE14 + (temp_t7 << 7)) != 0) { + *phi_t1_4 = 0x38; + } else { + *phi_t1_4 = 0x3A; + phi_t0->unk4 = 0; + } + play_sound2(0x49008001, phi_a1_4); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x2A: /* switch 1 */ + case 0x2B: /* switch 1 */ + case 0x2C: /* switch 1 */ + case 0x2D: /* switch 1 */ + case 0x34: /* switch 1 */ + case 0x35: /* switch 1 */ + case 0x37: /* switch 1 */ + case 0x3C: /* switch 1 */ + case 0x41: /* switch 1 */ + case 0x42: /* switch 1 */ + if ((phi_a2 & 0xD000) != 0) { + D_8018EDEC = 0x17; + play_sound2(0x49008002); + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x38: /* switch 1 */ + case 0x39: /* switch 1 */ + phi_a1_5 = phi_a2; + if (((phi_a2 & 0x100) != 0) && (temp_v1 < 0x39)) { + D_8018EDEC = temp_v1 + 1; + sp20 = phi_a2; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a2, phi_a2); + temp_f0_9 = temp_t0->unk24; + phi_a1_5 = sp20; + if (temp_f0_9 < 4.2) { + temp_t0->unk24 = temp_f0_9 + 4.0; + } + temp_t0->unk8 = 1; + } + phi_t1_5 = &D_8018EDEC; + if ((phi_a1_5 & 0x200) != 0) { + temp_v1_6 = D_8018EDEC; + if (temp_v1_6 >= 0x39) { + D_8018EDEC = temp_v1_6 - 1; + sp20 = phi_a1_5; + sp38 = temp_t0; + play_sound2(0x49008000, phi_a1_5); + temp_f0_10 = temp_t0->unk24; + phi_t1_5 = &D_8018EDEC; + if (temp_f0_10 < 4.2) { + temp_t0->unk24 = temp_f0_10 + 4.0; + } + temp_t0->unk8 = -1; + } + } + if ((phi_a1_5 & 0x4000) != 0) { + *phi_t1_5 = temp_t0->unk1C + 0x32; + play_sound2(0x49008002, phi_a1_5); + return; + } + if ((phi_a1_5 & 0x8000) != 0) { + if (*phi_t1_5 == 0x38) { + *phi_t1_5 = 0x17; + play_sound2(0x49008002, phi_a1_5); + return; + } + *phi_t1_5 = 0x3A; + sp38 = temp_t0; + play_sound2(0x49008001, phi_a1_5); + temp_t0->unk4 = 0; + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x3A: /* switch 1 */ + if (arg1 == 0) { + temp_v0->unk4 = temp_v0->unk4 + 1; + } + if (temp_v0->unk4 >= 3) { + D_8018EDEC = 0x3B; + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x3B: /* switch 1 */ + sp38 = temp_t0; + temp_v0_10 = func_800B5DA4(); + phi_v0 = temp_v0_10; + if (temp_v0_10 == 0) { + sp38 = temp_t0; + phi_v0 = func_800B65F4(temp_t0->unk20, temp_t0->unk1C); + } + if (phi_v0 != 0) { + D_8018EDEC = 0x42; + play_sound2(0x4900FF07); + return; + } + sp38 = temp_t0; + temp_v0_11 = osPfsFindFile(&D_8018E868, D_800E86F0, D_800E86F4, &D_800F2E64, &D_800F2E74, &D_8018EB84); + phi_v0_2 = temp_v0_11; + if (temp_v0_11 == 0) { + sp38 = temp_t0; + phi_v0_2 = func_800B6178(temp_t0->unk1C); + } + if (phi_v0_2 != 0) { + D_8018EDEC = 0x41; + play_sound2(0x4900FF07); + return; + } + D_8018EDEC = 0x3C; + *(&D_8018EE15 + (temp_t0->unk1C << 7)) = ((temp_t0->unk20 << 7) + sp30)->unk5; + func_800B6088(temp_t0->unk1C); + return; + case 0x46: /* switch 1 */ + if (arg1 == 0) { + temp_v0->unk4 = temp_v0->unk4 + 1; + } + if (temp_v0->unk4 >= 3) { + D_8018EDEC = 0x47; + return; + } + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + case 0x47: /* switch 1 */ + if (func_800B6A68() != 0) { + D_8018EDEC = 0x36; + play_sound2(0x4900FF07); + return; + } + if (sp30->unk4 != 0) { + D_8018EDEC = 0x28; + return; + } + D_8018EDEC = 0x29; + /* Duplicate return node #166. Try simplifying control flow for better match */ + return; + } + } else { + default: /* switch 1 */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B053C.s") #endif @@ -798,29 +1428,470 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B1C40.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800B1C90: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E1C0(); /* extern */ +s32 osPfsDeleteFile(? *, u16, s32, void *, void *); /* extern */ +? play_sound2(?); /* extern */ +extern ? D_8018E868; +extern ? D_8018E938; +extern ? D_8018EB38; +static ? D_800E86C6; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800B1C90.s line 22. +void func_800B1C90(void *arg0, s32 arg1) { + u16 sp36; + s32 sp2C; + void *sp20; + s32 temp_t0; + s32 temp_v0; + s8 temp_t9; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp36 = arg0->unk6 | arg0->unkC; + if (func_800B4520() == 0) { + temp_t9 = gPlayerCountSelection2; + switch (temp_t9) { + case 1: + if ((sp36 & 0x9000) != 0) { + gPlayerCountSelection2 = 5; + play_sound2(0x49008001); + return; + } + if ((sp36 & 0x300) != 0) { + gPlayerCountSelection2 = 2; + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + case 2: + if ((sp36 & 0x9000) != 0) { + play_sound2(0x49008001); + func_8009E1C0(); + D_800E86F8 = 0; + return; + } + if ((sp36 & 0x300) != 0) { + gPlayerCountSelection2 = 1; + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + case 5: + if ((sp36 & 0x9000) != 0) { + if (*(&D_8018EB38 + ((*(&D_800E86C6 + D_800E86C0) - 1) * 4)) == 0) { + gPlayerCountSelection2 = 4; + play_sound2(0x49008001); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + } + if ((sp36 & 0x4000) != 0) { + if (*D_800E86D0 == 0) { + gPlayerCountSelection2 = 1; + play_sound2(0x49008002); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + } + if ((sp36 & 0x800) != 0) { + if (*D_800E86D0 == 0) { + D_800E86C0 += -1; + if (D_800E86C0 < 0) { + D_800E86C0 = 0; + if (*(&D_800E86C6 + D_800E86C0) != 1) { + *D_800E86D0 = 2; + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + } + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + } + if (((sp36 & 0x400) != 0) && (*D_800E86D0 == 0)) { + D_800E86C0 += 1; + if (D_800E86C0 >= 5) { + D_800E86C0 = 4; + if (*(&D_800E86C6 + D_800E86C0) != 0x10) { + *D_800E86D0 = 1; + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + } + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + case 4: + if ((sp36 & 0xD000) != 0) { + gPlayerCountSelection2 = 5; + play_sound2(0x49008002); + return; + } + if ((sp36 & 0x300) != 0) { + gPlayerCountSelection2 = 3; + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + case 3: + if ((sp36 & 0x9000) != 0) { + gPlayerCountSelection2 = 6; + play_sound2(0x49008001); + return; + } + if ((sp36 & 0x4000) != 0) { + gPlayerCountSelection2 = 5; + play_sound2(0x49008002); + return; + } + if ((sp36 & 0x300) != 0) { + gPlayerCountSelection2 = 4; + play_sound2(0x49008000); + return; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + case 6: + gPlayerCountSelection2 = 7; + return; + case 7: + temp_t0 = *(&D_800E86C6 + D_800E86C0) - 1; + temp_v1 = (temp_t0 << 5) + &D_8018E938; + sp20 = temp_v1; + sp2C = temp_t0; + temp_v0 = osPfsDeleteFile(&D_8018E868, temp_v1->unk8, temp_v1->unk4, temp_v1 + 0xE, temp_v1 + 0xA); + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 2) { + gPlayerCountSelection2 = 8; + return; + } + gPlayerCountSelection2 = 0xA; + return; + } + gPlayerCountSelection2 = 9; + return; + } + *(&D_8018EB38 + (temp_t0 * 4)) = -1; + D_8018EB80 = D_8018EB80 + (((temp_v1->unk0 + 0xFF) >> 8) & 0xFF); + gPlayerCountSelection2 = 5; + return; + case 8: + case 9: + case 10: + if ((sp36 & 0x9000) != 0) { + gPlayerCountSelection2 = 5; + } + /* Duplicate return node #49. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B1C90.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800B20F4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E1C0(); /* extern */ +? func_800B44BC(); /* extern */ +? func_800B4670(); /* extern */ +? func_800B4820(); /* extern */ +? func_800B5404(s32, s32); /* extern */ +? func_800B5948(); /* extern */ +? func_800CA330(?); /* extern */ +? play_sound2(?, s32); /* extern */ +static ? D_800F2B50; /* unable to generate initializer; const */ +static ? D_800F2B58; /* unable to generate initializer; const */ +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_800B20F4.s line 34. +void func_800B20F4(void *arg0, s32 arg1) { + u16 sp2E; + s32 sp28; + s32 sp24; + s16 temp_v0; + s16 temp_v0_2; + s32 temp_a1; + s32 temp_a1_2; + s32 temp_a1_3; + s8 temp_t2; + s8 temp_v0_3; + s8 temp_v0_4; + s8 temp_v0_5; + s8 temp_v0_6; + u8 temp_t2_2; + u8 temp_t7; + u8 temp_v0_7; + u8 temp_v0_8; + s32 phi_a1; + s32 phi_s0; + s32 phi_a1_2; + s32 phi_s0_2; + s32 phi_a1_3; + s32 phi_s0_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp28 = 1; + sp2E = arg0->unk6 | arg0->unkC; + if (func_800B4520() == 0) { + if ((arg1 & 0xFFFF) == 0) { + D_8018EE04 += 1; + } + temp_t2 = D_8018EDEF; + switch (temp_t2) { + case 1: + sp28 = 0; + if ((D_8018EE04 >= 0x2E) && ((sp2E & 0x9000) != 0)) { + func_8009E1C0(); + func_800CA330(0x19); + play_sound2(0x4900801A); + } + break; + case 2: + if ((sp2E & 0x300) != 0) { + sp24 = sp2E; + play_sound2(0x49008000); + if (gEnableDebugMode != 0) { + gEnableDebugMode = 0; + } else { + gEnableDebugMode = 1; + } + } + if ((sp2E & 0x400) != 0) { + play_sound2(0x49008000); + D_8018EDEF = 3; + } + break; + case 3: + if ((sp2E & 0x100) != 0) { + sp24 = sp2E; + play_sound2(0x49008000); + temp_v0 = gCurrentCourseId; + if (temp_v0 < 0x13) { + gCurrentCourseId = temp_v0 + 1; + } else { + gCurrentCourseId = 0; + } + } + if ((sp2E & 0x200) != 0) { + sp24 = sp2E; + play_sound2(0x49008000); + temp_v0_2 = gCurrentCourseId; + if (temp_v0_2 > 0) { + gCurrentCourseId = temp_v0_2 - 1; + } else { + gCurrentCourseId = 0x13; + } + } + if ((sp2E & 0x800) != 0) { + sp24 = sp2E; + play_sound2(0x49008000); + D_8018EDEF = 2; + } + if ((sp2E & 0x400) != 0) { + play_sound2(0x49008000); + D_8018EDEF = 4; + } + break; + case 4: + if ((sp2E & 0x100) != 0) { + temp_v0_3 = D_8018EDF1; + if (temp_v0_3 < 4) { + D_8018EDF1 = temp_v0_3 + 1; + sp24 = sp2E; + play_sound2(0x49008000); + D_800DC530 = *(&D_800F2B50 + D_8018EDF1); + } + } + if ((sp2E & 0x200) != 0) { + temp_v0_4 = D_8018EDF1; + if (temp_v0_4 > 0) { + D_8018EDF1 = temp_v0_4 - 1; + sp24 = sp2E; + play_sound2(0x49008000); + D_800DC530 = *(&D_800F2B50 + D_8018EDF1); + } + } + if ((sp2E & 0x800) != 0) { + D_8018EDEF = 3; + sp24 = sp2E; + play_sound2(0x49008000); + } + if ((sp2E & 0x400) != 0) { + D_8018EDEF = 5; + play_sound2(0x49008000); + } + break; + case 5: + if ((sp2E & 0x100) != 0) { + temp_v0_5 = D_800E86A8; + if (temp_v0_5 < 7) { + D_800E86A8 = temp_v0_5 + 1; + sp24 = sp2E; + play_sound2(0x49008000); + } + } + if ((sp2E & 0x200) != 0) { + temp_v0_6 = D_800E86A8; + if (temp_v0_6 > 0) { + D_800E86A8 = temp_v0_6 - 1; + sp24 = sp2E; + play_sound2(0x49008000); + } + } + if ((sp2E & 0x800) != 0) { + D_8018EDEF = 4; + sp24 = sp2E; + play_sound2(0x49008000); + } + if ((sp2E & 0x400) != 0) { + D_8018EDEF = 6; + play_sound2(0x49008000); + } + break; + case 6: + if ((sp2E & 0x100) != 0) { + temp_v0_7 = D_8018EDF2; + temp_t2_2 = temp_v0_7 + 1; + if (temp_v0_7 < 3) { + D_8018EDF2 = temp_t2_2; + if ((temp_t2_2 & 0xFF) == 2) { + D_8018EDF2 = 3; + } + sp24 = sp2E; + play_sound2(0x49008000); + func_800B44BC(); + D_8018ED14 = D_8018EDF2; + func_800B4670(); + func_800B5948(); + } + } + if ((sp2E & 0x200) != 0) { + temp_v0_8 = D_8018EDF2; + temp_t7 = temp_v0_8 - 1; + if (temp_v0_8 > 0) { + D_8018EDF2 = temp_t7; + if ((temp_t7 & 0xFF) == 2) { + D_8018EDF2 = 1; + } + sp24 = sp2E; + play_sound2(0x49008000); + func_800B44BC(); + D_8018ED14 = D_8018EDF2; + func_800B4670(); + } + } + if ((sp2E & 0x800) != 0) { + D_8018EDEF = 5; + sp24 = sp2E; + play_sound2(0x49008000); + } + if ((sp2E & 0x400) != 0) { + D_8018EDEF = 7; + play_sound2(0x49008000); + } + break; + case 7: + if ((sp2E & 0x800) != 0) { + D_8018EDEF = 6; + sp24 = sp2E; + play_sound2(0x49008000); + } + if ((sp2E & 0x4000) != 0) { + phi_a1 = 0; + phi_s0 = 0; + do { + func_800B5404(0, phi_a1); + temp_a1 = (phi_s0 + 1) & 0xFFFF; + phi_a1 = temp_a1; + phi_s0 = temp_a1; + } while (temp_a1 < 0x10); + play_sound2(0x49008001, temp_a1); + } else if ((sp2E & 0x20) != 0) { + func_800B4820(); + phi_a1_2 = 0; + phi_s0_2 = 0; + do { + func_800B5404(phi_a1_2 / 4, phi_a1_2); + temp_a1_2 = (phi_s0_2 + 1) & 0xFFFF; + phi_a1_2 = temp_a1_2; + phi_s0_2 = temp_a1_2; + } while (temp_a1_2 < 0x10); + play_sound2(0x49008001, temp_a1_2); + } else if ((sp2E & 0x200) != 0) { + func_800B4820(); + phi_a1_3 = 0; + phi_s0_3 = 0; + do { + if ((phi_a1_3 % 4) == 2) { + func_800B5404(0, phi_a1_3); + } else { + func_800B5404(phi_a1_3 / 4, phi_a1_3); + } + temp_a1_3 = (phi_s0_3 + 1) & 0xFFFF; + phi_a1_3 = temp_a1_3; + phi_s0_3 = temp_a1_3; + } while (temp_a1_3 < 0x10); + play_sound2(0x49008001, temp_a1_3); + } + break; + default: + break; + } + D_8018EDF3 = *(&D_800F2B58 + D_8018EDF1); + gPlayerCountSelection1 = D_8018EDF3; + if (sp28 != 0) { + if ((sp2E & 0x9000) != 0) { + sp24 = sp2E; + func_8009E1C0(); + func_800CA330(0x19); + D_8018EDEF = 0x40; + if ((arg0->unk4 & 0x20) != 0) { + D_800DC51C = 1; + } else { + D_800DC51C = 0; + } + if ((arg0->unk4 & 0x2000) != 0) { + if ((sp2E & 0x8000) != 0) { + D_8018EDFA = 1; + } else { + D_8018EDFA = 3; + } + } + play_sound2(0x49008016); + return; + } + if (((sp2E & 0x4000) != 0) && ((arg0->unk4 & 0x2000) != 0)) { + func_8009E1C0(); + func_800CA330(0x19); + D_8018EDEF = 0x40; + D_8018EDFA = 2; + play_sound2(0x49008016); + return; + } + if ((sp2E & 0x10) != 0) { + D_8018EDEF = 1; + play_sound2(0x49008001); + } + /* Duplicate return node #100. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #100. Try simplifying control flow for better match */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B20F4.s") #endif @@ -882,15 +1953,358 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B28C8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800B29D8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8009E0F0(?); /* extern */ +? func_8009E1C0(); /* extern */ +? func_8009E258(s8); /* extern */ +? func_8009E280(s8); /* extern */ +? func_800B28C8(); /* extern */ +? func_800B44AC(s8, u16, u16); /* extern */ +? func_800CA330(?); /* extern */ +? play_sound2(?, u16, u16); /* extern */ +static ? D_800E86AB; /* unable to generate initializer; const */ +static ? D_800E86AC; /* unable to generate initializer; const */ +static ? D_800E86AD; /* unable to generate initializer; const */ +static ? D_800E86B0; /* unable to generate initializer; const */ +static ? D_800F2B5F; /* unable to generate initializer; const */ +static ? D_800F2B61; /* unable to generate initializer; const */ +static ? D_800F2B6D; /* unable to generate initializer; const */ +static ? D_800F2B70; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800B29D8.s line 39. +void func_800B29D8(void *arg0, u16 arg1) { + u16 sp2E; + s32 sp28; + s32 sp24; + s32 sp1C; + s32 temp_t7_3; + s32 temp_t7_5; + s32 temp_v1_3; + s32 temp_v1_4; + s32 temp_v1_7; + s8 temp_a0; + s8 temp_a0_2; + s8 temp_a0_3; + s8 temp_a0_4; + s8 temp_a0_5; + s8 temp_a0_6; + s8 temp_a0_7; + s8 temp_a1; + s8 temp_t1; + s8 temp_t1_2; + s8 temp_t2; + s8 temp_t4_2; + s8 temp_t4_3; + s8 temp_t5; + s8 temp_t5_2; + s8 temp_t6; + s8 temp_t6_2; + s8 temp_t7; + s8 temp_t7_2; + s8 temp_t7_4; + s8 temp_t7_6; + s8 temp_t8; + s8 temp_v0; + s8 temp_v0_10; + s8 temp_v0_11; + s8 temp_v0_2; + s8 temp_v0_3; + s8 temp_v0_4; + s8 temp_v0_5; + s8 temp_v0_6; + s8 temp_v0_7; + s8 temp_v0_8; + s8 temp_v0_9; + u16 temp_t9; + u8 temp_t4; + void *temp_v1; + void *temp_v1_2; + void *temp_v1_5; + void *temp_v1_6; + u16 phi_v1; + s32 phi_a2; + s32 phi_v0; + u8 *phi_t0; + s8 phi_a0; + u8 *phi_t0_2; + s32 phi_a1; + s32 phi_v1_2; + s8 phi_v0_2; + s8 phi_a0_2; + s32 *phi_v1_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t9 = (arg0->unk6 | arg0->unkC) & 0xFFFF; + phi_v1 = temp_t9; + if ((gEnableDebugMode == 0) && ((temp_t9 & 0x1000) != 0)) { + phi_v1 = (temp_t9 | 0x8000) & 0xFFFF; + } + sp2E = phi_v1; + arg1 &= 0xFFFF; + if (func_800B4520(arg0) == 0) { + temp_t4 = D_8018EDED; + switch (temp_t4) { + case 0: + temp_t5 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t5 * 0xC) + (*(&D_800E86AB + temp_t5) * 4)); + break; + case 3: + phi_a2 = phi_v1; + if ((phi_v1 & 0x100) != 0) { + temp_v0 = D_8018EDF3; + if (temp_v0 < 4) { + D_8018EDF3 = temp_v0 + 1; + sp1C = phi_v1; + func_800B44AC(); + play_sound2(0x49008000); + phi_a2 = sp1C; + } + } + temp_v0_2 = D_8018EDF3; + phi_v0 = temp_v0_2; + phi_t0 = &D_8018EDED; + if (((phi_a2 & 0x200) != 0) && (temp_v0_2 >= 2)) { + D_8018EDF3 = temp_v0_2 - 1; + sp1C = phi_a2; + func_800B44AC(); + play_sound2(0x49008000); + phi_v0 = D_8018EDF3; + phi_t0 = &D_8018EDED; + } + gPlayerCountSelection1 = phi_v0; + phi_a0 = &gPlayerCountSelection1; + if (phi_v0 != 1) { + phi_a0 = 3; + if (phi_v0 != 2) { + if ((phi_v0 != 3) && (phi_v0 != 4)) { + + } else { + D_800DC530 = 3; + } + } else { + D_800DC530 = 1; + } + } else { + D_800DC530 = 0; + } + if ((phi_a2 & 0x4000) != 0) { + func_8009E0F0(0x14); + func_800CA330(0x19); + D_8018EDE0 = 1; + play_sound2(0x49008002); + temp_t7 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t7 * 0xC) + (*(&D_800E86AB + temp_t7) * 4)); + } else if ((phi_a2 & 0x8000) != 0) { + *phi_t0 = 4; + func_800B44AC(phi_a0); + play_sound2(0x49008001); + temp_t4_2 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t4_2 * 0xC) + (*(&D_800E86AB + temp_t4_2) * 4)); + } else if ((phi_a2 & 0x20) != 0) { + *phi_t0 = 1; + func_8009E280(phi_a0); + play_sound2(0x49009010); + temp_t1 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t1 * 0xC) + (*(&D_800E86AB + temp_t1) * 4)); + } else if ((phi_a2 & 0x10) != 0) { + *phi_t0 = 2; + func_8009E258(phi_a0); + play_sound2(0x49009011); + temp_t6 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t6 * 0xC) + (*(&D_800E86AB + temp_t6) * 4)); + } else { + phi_v1_3 = &D_800F2B70 + ((phi_v0 * 0xC) + (*(&D_800E86AB + phi_v0) * 4)); + } + break; + case 4: + if ((phi_v1 & 0x400) != 0) { + temp_v0_3 = D_8018EDF3; + temp_v1 = temp_v0_3 + &D_800E86AC; + temp_a0 = temp_v1->unk-1; + if (temp_a0 < *(&D_800F2B5F + temp_v0_3)) { + temp_v1->unk-1 = temp_a0 + 1; + sp1C = phi_v1; + func_800B44AC(temp_a0, arg1, phi_v1); + play_sound2(0x49008000); + } + } + phi_t0_2 = &D_8018EDED; + if ((phi_v1 & 0x800) != 0) { + temp_v1_2 = D_8018EDF3 + &D_800E86AC; + temp_a0_2 = temp_v1_2->unk-1; + if (temp_a0_2 > 0) { + temp_v1_2->unk-1 = temp_a0_2 - 1; + sp1C = phi_v1; + func_800B44AC(temp_a0_2); + play_sound2(0x49008000); + phi_t0_2 = &D_8018EDED; + } + } + if ((phi_v1 & 0x4000) != 0) { + *phi_t0_2 = 3; + func_800B44AC(3); + play_sound2(0x49008002); + temp_t6_2 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t6_2 * 0xC) + (*(&D_800E86AB + temp_t6_2) * 4)); + } else { + temp_v0_4 = D_8018EDF3; + temp_a0_3 = *(&D_800E86AB + temp_v0_4); + if ((phi_v1 & 0x8000) != 0) { + temp_v1_3 = *(&D_800F2B70 + ((temp_v0_4 * 0xC) + (temp_a0_3 * 4))); + if (temp_v1_3 != 0) { + if (temp_v1_3 != 1) { + if (temp_v1_3 != 2) { + if (temp_v1_3 != 3) { + *phi_t0_2 = 6; + } else { + *phi_t0_2 = 6; + play_sound2(0x4900900D); + } + } else { + *phi_t0_2 = 5; + play_sound2(0x4900900C); + } + } else { + *phi_t0_2 = 5; + play_sound2(0x4900900B); + } + } else { + *phi_t0_2 = 5; + play_sound2(0x4900900A); + } + func_800B44AC(); + temp_t7_2 = D_8018EDF3; + D_8018EE00 = 0; + phi_v1_3 = &D_800F2B70 + ((temp_t7_2 * 0xC) + (*(&D_800E86AB + temp_t7_2) * 4)); + } else { + phi_v1_3 = &D_800F2B70 + ((temp_v0_4 * 0xC) + (temp_a0_3 * 4)); + } + } + break; + case 5: + case 8: + if ((arg1 == 0) && ((temp_t7_3 = D_8018EE00 + 1, D_8018EE00 = temp_t7_3, (temp_t7_3 == 0x64)) || ((temp_t7_3 % 300) == 0)) && ((temp_v0_5 = D_8018EDF3, temp_v1_4 = *(&D_800F2B70 + ((temp_v0_5 * 0xC) + (*(&D_800E86AB + temp_v0_5) * 4))), (temp_v1_4 == 0)) || (temp_v1_4 == 2))) { + sp1C = phi_v1; + play_sound2(0x4900900E, arg1, phi_v1); + } + temp_v0_6 = D_8018EDF3; + temp_v1_5 = (temp_v0_6 * 3) + *(&D_800E86AB + temp_v0_6) + &D_800E86B0; + temp_a0_4 = temp_v1_5->unk-3; + phi_a1 = temp_a0_4; + if (((phi_v1 & 0x800) != 0) && (temp_a0_4 > 0)) { + temp_v1_5->unk-3 = temp_a0_4 - 1; + sp28 = temp_a0_4; + sp1C = phi_v1; + func_800B44AC(temp_a0_4, temp_a0_4, phi_v1); + play_sound2(0x49008000); + phi_a1 = sp28; + } + if ((phi_v1 & 0x400) != 0) { + sp24 = 0; + sp28 = phi_a1; + sp1C = phi_v1; + phi_v1_2 = sp24; + if (func_800B555C() != 0) { + temp_v0_7 = D_8018EDF3; + temp_a0_5 = *(&D_800E86AB + temp_v0_7); + phi_v0_2 = temp_v0_7; + phi_a0_2 = temp_a0_5; + phi_v0_2 = temp_v0_7; + phi_a0_2 = temp_a0_5; + if (phi_a1 < *(&D_800F2B6D + ((temp_v0_7 * 3) + temp_a0_5))) { + goto block_64; + } + } else { + temp_v0_8 = D_8018EDF3; + temp_a0_6 = *(&D_800E86AB + temp_v0_8); + phi_v0_2 = temp_v0_8; + phi_a0_2 = temp_a0_6; + phi_v0_2 = temp_v0_8; + phi_a0_2 = temp_a0_6; + if (phi_a1 < *(&D_800F2B61 + ((temp_v0_8 * 3) + temp_a0_6))) { +block_64: + phi_v1_2 = 1; + } + } + if (phi_v1_2 != 0) { + temp_v1_6 = (phi_v0_2 * 3) + phi_a0_2 + &D_800E86B0; + sp1C = phi_v1; + temp_v1_6->unk-3 = temp_v1_6->unk-3 + 1; + func_800B44AC(phi_a0_2, phi_a1, phi_v1); + play_sound2(0x49008000); + } + } + temp_v0_9 = D_8018EDF3; + temp_a0_7 = *(&D_800E86AB + temp_v0_9); + temp_a1 = *(&D_800E86AD + ((temp_v0_9 * 3) + temp_a0_7)); + if ((phi_v1 & 0x4000) != 0) { + D_8018EDED = 4; + func_800B44AC(temp_a0_7, temp_a1, phi_v1); + play_sound2(0x49008002); + temp_t5_2 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t5_2 * 0xC) + (*(&D_800E86AB + temp_t5_2) * 4)); + } else if ((phi_v1 & 0x8000) != 0) { + sp28 = temp_a1; + func_800B44AC(temp_a0_7, temp_a1, phi_v1); + temp_v0_10 = D_8018EDF3; + if ((temp_v0_10 == 1) && (*(&D_800E86AB + temp_v0_10) == 1) && (temp_a1 == 1)) { + func_8009E258(); + play_sound2(0x49009011); + } else { + D_8018EDED = 6; + play_sound2(0x49008001, temp_a1); + D_8018EE00 = 0; + } + temp_t7_4 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t7_4 * 0xC) + (*(&D_800E86AB + temp_t7_4) * 4)); + } else { + phi_v1_3 = &D_800F2B70 + ((temp_v0_9 * 0xC) + (temp_a0_7 * 4)); + } + break; + case 6: + case 7: + if ((arg1 == 0) && ((temp_t7_5 = D_8018EE00 + 1, D_8018EE00 = temp_t7_5, (temp_t7_5 == 0x3C)) || ((temp_t7_5 % 300) == 0))) { + sp1C = phi_v1; + play_sound2(0x4900900F, arg1, phi_v1); + } + if ((phi_v1 & 0x4000) != 0) { + temp_v0_11 = D_8018EDF3; + temp_v1_7 = *(&D_800F2B70 + ((temp_v0_11 * 0xC) + (*(&D_800E86AB + temp_v0_11) * 4))); + if ((temp_v1_7 != 0) && (temp_v1_7 != 1) && (temp_v1_7 != 2)) { + if (temp_v1_7 != 3) { + + } + D_8018EDED = 4; + } else { + D_8018EDED = 5; + } + func_800B44AC(); + play_sound2(0x49008002); + temp_t7_6 = D_8018EDF3; + D_8018EE00 = 0; + phi_v1_3 = &D_800F2B70 + ((temp_t7_6 * 0xC) + (*(&D_800E86AB + temp_t7_6) * 4)); + } else if ((phi_v1 & 0x8000) != 0) { + func_8009E1C0(); + play_sound2(0x49008016); + func_800B28C8(); + temp_t1_2 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t1_2 * 0xC) + (*(&D_800E86AB + temp_t1_2) * 4)); + } else { + temp_t4_3 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t4_3 * 0xC) + (*(&D_800E86AB + temp_t4_3) * 4)); + } + break; + case 1: + case 2: + temp_t2 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t2 * 0xC) + (*(&D_800E86AB + temp_t2) * 4)); + break; + default: + temp_t8 = D_8018EDF3; + phi_v1_3 = &D_800F2B70 + ((temp_t8 * 0xC) + (*(&D_800E86AB + temp_t8) * 4)); + break; + } + gModeSelection = *phi_v1_3; + } +} #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B29D8.s") #endif @@ -1107,15 +2521,239 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B3B58.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_800B3F74: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000F0E0(); /* extern */ +? func_800B44AC(); /* extern */ +? func_800B5F30(); /* extern */ +? func_800C8EAC(?, s8 *, s8); /* extern */ +? func_800CA008(?, ?, s32); /* extern */ +? func_800CB2C4(); /* extern */ +? play_sound2(?, s8 *, s8 *, s8); /* extern */ +extern ? D_8018D9C8; +extern ? D_8018D9D0; +static ? D_800F2BDF; /* unable to generate initializer; const */ -Unable to determine jump table for jr instruction at func_800B3F74.s line 40. +void func_800B3F74(u32 arg0) { + ? *temp_v0_5; + s32 temp_v0; + s32 temp_v0_3; + s32 temp_v0_4; + s8 *temp_a1; + s8 *temp_a2; + s8 temp_a0; + s8 temp_a3; + s8 temp_a3_2; + s8 temp_v0_2; + s32 phi_a3; + s32 phi_v1; + s8 *phi_v0; + s8 *phi_a2; + s8 *phi_a1; + s32 phi_a0; + ? *phi_v0_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_8018EDEF = 1; + D_8018EE00 = 0; + D_8018EE04 = 0; + D_8018EE08 = 0; + D_8015F890 = 0; + D_8015F892 = 0; + D_8018EDFA = 0; + D_8018EDFB = 0; + D_8016556E = 0; + D_80162DD4 = 1; + D_80162DD8 = 1; + D_80162E00 = 0; + D_80162DC8 = 1; + D_80162DCC = 0; + switch (arg0) { + case 5: + D_8018EDEC = 0x15; + break; + case 6: + D_8018EDEC = 1; + break; + case 7: + D_8018EDEC = 0xB; + break; + case 8: + func_800CA008(0, 0); + break; + case 9: + gPlayerCountSelection2 = 1; + func_800CA008(0, 0); + break; + case 0: + case 10: + gIsMirrorMode = 0; + gEnableDebugMode = 0; + gCupSelection = 0; + gCourseSelection = 0; + D_8018EDF7 = 0; + if (D_8018EDF3 <= 0) { + D_8018EDF3 = 1; + } + phi_a3 = D_8018EDF3; + if (D_8018EDF3 >= 5) { + D_8018EDF3 = 4; + phi_a3 = D_8018EDF3; + } + D_8018EDF1 = *(&D_800F2BDF + phi_a3); + func_800CA008(0, 0); + func_800C8EAC(1); + D_8018EDFC = 0; + break; + case 1: + case 11: + gEnableDebugMode = 0; + gIsMirrorMode = 0; + D_8018EDFC = 0; + func_800B5F30(); + func_8000F0E0(); + if (D_800DC50C != 0) { + func_800CA008(0, 0); + func_800CB2C4(); + D_800DC50C = 0; + D_800DC524 = 0; + func_800C8EAC(2); + } + temp_v0 = D_8018EDE0; + if (temp_v0 != 0) { + if (temp_v0 != 1) { + if (temp_v0 != 3) { + if (temp_v0 != 4) { + + } else { + D_8018EDED = 3; + } + } else { + temp_v0_2 = D_8018EDED; + if ((temp_v0_2 != 1) && (temp_v0_2 != 2)) { + D_8018EDED = 8; + } else { + D_8018EDED = 3; + } + } + } else { + D_8018EDED = 7; + } + } else { + D_8018EDED = 3; + func_800C8EAC(2, &D_8018EDED, 3); + temp_v0_3 = D_800DC530; + D_8018EDF3 = 1; + if ((temp_v0_3 >= 4) || (temp_v0_3 < 0)) { + D_800DC530 = 0; + } + } + break; + case 2: + case 12: + temp_v0_4 = D_8018EDE0; + if (temp_v0_4 != 0) { + if (temp_v0_4 != 1) { + + } else { + D_8018EDEE = 3; + temp_a3 = D_8018EDF3; + if (temp_a3 > 0) { + D_8018EDE8 = 1; + } else { + D_8018EDE8 = 0; + } + if ((temp_a3 - 1) > 0) { + D_8018EDE9 = 1; + } else { + D_8018EDE9 = 0; + } + if ((temp_a3 - 2) > 0) { + D_8018EDEA = 1; + } else { + D_8018EDEA = 0; + } + if ((temp_a3 - 3) > 0) { + D_8018EDEB = 1; + } else { + D_8018EDEB = 0; + } + } + } else { + D_8018EDEE = 1; + if (D_800DC50C == 0) { + temp_a3_2 = D_8018EDF3; + phi_v1 = 0; + phi_v0 = &gCharacterSelections; + phi_a2 = &D_800E86A8; + phi_a1 = &D_8018EDE8; + do { + phi_a0 = phi_v1 + 1; + if (phi_v1 < temp_a3_2) { + temp_a0 = phi_v1 + 1; + *phi_v0 = temp_a0; + phi_a0 = temp_a0; + } else { + *phi_v0 = 0; + } + *phi_a2 = phi_v1; + temp_a1 = phi_a1 + 1; + temp_a2 = phi_a2 + 1; + temp_a1->unk-1 = 0; + phi_v1 = phi_a0; + phi_v0 += 1; + phi_a2 = temp_a2; + phi_a1 = temp_a1; + } while (phi_a0 != 4); + play_sound2(0x49009012, temp_a1, temp_a2, temp_a3_2); + } else { + func_800CA008(0, 0); + func_800CB2C4(); + D_800DC50C = 0; + D_800DC524 = 0; + func_800C8EAC(2); + D_8018EDE8 = 0; + D_8018EDE8 = 0; + D_8018EDE8 = 0; + D_8018EDE8 = 0; + } + } + break; + case 3: + case 13: + if (gModeSelection == 3) { + gCupSelection = 4; + D_800DC540 = 4; + D_8018EDEC = 4; + } else { + if (gCupSelection == 4) { + gCupSelection = 0; + } + D_8018EDEC = 1; + } + if (D_800DC50C != 0) { + func_800CA008(0, 0, 3); + func_800CB2C4(); + D_800DC50C = 0; + D_800DC524 = 0; + func_800C8EAC(2); + } + play_sound2(0x49009013); + D_8018EE0A = 0; + if (gModeSelection == 0) { + gCourseSelection = 0; + } + phi_v0_2 = &D_8018D9C8; + do { + temp_v0_5 = phi_v0_2 + 4; + temp_v0_5->unk-3 = 0; + temp_v0_5->unk-2 = 0; + temp_v0_5->unk-1 = 0; + temp_v0_5->unk-4 = 0; + phi_v0_2 = temp_v0_5; + } while (temp_v0_5 != &D_8018D9D0); + break; + } + func_800B44AC(); +} #else GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B3F74.s") #endif diff --git a/src/code_80290C20.c b/src/code_80290C20.c index fd4d9b53f..6a29b653d 100644 --- a/src/code_80290C20.c +++ b/src/code_80290C20.c @@ -240,29 +240,1035 @@ GLOBAL_ASM("asm/non_matchings/code_80290C20/func_802911C4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029122C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802A3E3C(); /* extern */ +? func_802B4FF8(? *, ?); /* extern */ +? func_802B53C8(? *, s32 *, Gfx **); /* extern */ +? func_802B5520(? *, f32 *, Gfx **); /* extern */ +? load_surface_map(? *, void *, Gfx **); /* extern */ +extern ? D_06009228; +extern ? D_060164B8; +extern ? D_06019578; +extern ? D_090001D0; +s16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8029122C.s line 156. +void func_8029122C(void *arg0, s32 *arg1) { + void *sp268; + ? sp228; + f32 sp224; + f32 sp220; + f32 sp21C; + s16 sp21A; + s16 sp218; + s16 sp216; + Gfx *temp_t0; + Gfx *temp_t1; + Gfx *temp_v1; + Gfx *temp_v1_100; + Gfx *temp_v1_101; + Gfx *temp_v1_102; + Gfx *temp_v1_103; + Gfx *temp_v1_104; + Gfx *temp_v1_105; + Gfx *temp_v1_106; + Gfx *temp_v1_107; + Gfx *temp_v1_108; + Gfx *temp_v1_109; + Gfx *temp_v1_10; + Gfx *temp_v1_110; + Gfx *temp_v1_111; + Gfx *temp_v1_112; + Gfx *temp_v1_113; + Gfx *temp_v1_114; + Gfx *temp_v1_115; + Gfx *temp_v1_116; + Gfx *temp_v1_117; + Gfx *temp_v1_118; + Gfx *temp_v1_119; + Gfx *temp_v1_11; + Gfx *temp_v1_120; + Gfx *temp_v1_121; + Gfx *temp_v1_122; + Gfx *temp_v1_12; + Gfx *temp_v1_13; + Gfx *temp_v1_14; + Gfx *temp_v1_15; + Gfx *temp_v1_16; + Gfx *temp_v1_17; + Gfx *temp_v1_18; + Gfx *temp_v1_19; + Gfx *temp_v1_20; + Gfx *temp_v1_21; + Gfx *temp_v1_22; + Gfx *temp_v1_23; + Gfx *temp_v1_24; + Gfx *temp_v1_25; + Gfx *temp_v1_26; + Gfx *temp_v1_27; + Gfx *temp_v1_28; + Gfx *temp_v1_29; + Gfx *temp_v1_2; + Gfx *temp_v1_30; + Gfx *temp_v1_31; + Gfx *temp_v1_32; + Gfx *temp_v1_33; + Gfx *temp_v1_34; + Gfx *temp_v1_35; + Gfx *temp_v1_36; + Gfx *temp_v1_37; + Gfx *temp_v1_38; + Gfx *temp_v1_39; + Gfx *temp_v1_3; + Gfx *temp_v1_40; + Gfx *temp_v1_41; + Gfx *temp_v1_42; + Gfx *temp_v1_43; + Gfx *temp_v1_44; + Gfx *temp_v1_45; + Gfx *temp_v1_46; + Gfx *temp_v1_47; + Gfx *temp_v1_48; + Gfx *temp_v1_49; + Gfx *temp_v1_4; + Gfx *temp_v1_50; + Gfx *temp_v1_51; + Gfx *temp_v1_52; + Gfx *temp_v1_53; + Gfx *temp_v1_54; + Gfx *temp_v1_55; + Gfx *temp_v1_56; + Gfx *temp_v1_57; + Gfx *temp_v1_58; + Gfx *temp_v1_59; + Gfx *temp_v1_5; + Gfx *temp_v1_60; + Gfx *temp_v1_61; + Gfx *temp_v1_62; + Gfx *temp_v1_63; + Gfx *temp_v1_64; + Gfx *temp_v1_65; + Gfx *temp_v1_66; + Gfx *temp_v1_67; + Gfx *temp_v1_68; + Gfx *temp_v1_69; + Gfx *temp_v1_6; + Gfx *temp_v1_70; + Gfx *temp_v1_71; + Gfx *temp_v1_72; + Gfx *temp_v1_73; + Gfx *temp_v1_74; + Gfx *temp_v1_75; + Gfx *temp_v1_76; + Gfx *temp_v1_77; + Gfx *temp_v1_78; + Gfx *temp_v1_79; + Gfx *temp_v1_7; + Gfx *temp_v1_80; + Gfx *temp_v1_81; + Gfx *temp_v1_82; + Gfx *temp_v1_83; + Gfx *temp_v1_84; + Gfx *temp_v1_85; + Gfx *temp_v1_86; + Gfx *temp_v1_87; + Gfx *temp_v1_88; + Gfx *temp_v1_89; + Gfx *temp_v1_8; + Gfx *temp_v1_90; + Gfx *temp_v1_91; + Gfx *temp_v1_92; + Gfx *temp_v1_93; + Gfx *temp_v1_94; + Gfx *temp_v1_95; + Gfx *temp_v1_96; + Gfx *temp_v1_97; + Gfx *temp_v1_98; + Gfx *temp_v1_99; + Gfx *temp_v1_9; + f32 *temp_a1; + s16 temp_t3; + s16 temp_t7; + s32 phi_t6; + Gfx *phi_v1; + s32 *phi_a1; + Gfx **phi_a2; + Gfx *phi_v1_2; + Gfx *phi_v1_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp268 = arg0->unk8; + func_802A3E3C(); + sp21A = arg0->unk38; + sp218 = arg0->unk4->unk26; + temp_t3 = arg0->unk36; + phi_a1 = arg1; + phi_a2 = &gDisplayListHead; + if (arg1 != 0) { + if (arg1 != 1) { + if (arg1 != 2) { + phi_a2 = &gDisplayListHead; + if (arg1 != 3) { + + } else { + temp_v1 = gDisplayListHead; + gDisplayListHead = temp_v1 + 8; + temp_v1->words.w0 = 0x1030040; + temp_v1->words.w1 = (gGfxPool + 0x100) & 0x1FFFFFFF; + temp_v1_2 = gDisplayListHead; + gDisplayListHead = temp_v1_2 + 8; + temp_v1_2->words.w0 = 0x1010040; + phi_t6 = (gGfxPool + 0x280) & 0x1FFFFFFF; + phi_v1 = temp_v1_2; + goto block_9; + } + } else { + temp_v1_3 = gDisplayListHead; + gDisplayListHead = temp_v1_3 + 8; + temp_v1_3->words.w0 = 0x1030040; + temp_v1_3->words.w1 = (gGfxPool + 0xC0) & 0x1FFFFFFF; + temp_v1_4 = gDisplayListHead; + gDisplayListHead = temp_v1_4 + 8; + temp_v1_4->words.w0 = 0x1010040; + temp_v1_4->words.w1 = (gGfxPool + 0x240) & 0x1FFFFFFF; + phi_a1 = &gGfxPool; + phi_a2 = &gDisplayListHead; + } + } else { + temp_v1_5 = gDisplayListHead; + gDisplayListHead = temp_v1_5 + 8; + temp_v1_5->words.w0 = 0x1030040; + temp_v1_5->words.w1 = (gGfxPool + 0x80) & 0x1FFFFFFF; + temp_v1_6 = gDisplayListHead; + gDisplayListHead = temp_v1_6 + 8; + temp_v1_6->words.w0 = 0x1010040; + phi_t6 = (gGfxPool + 0x200) & 0x1FFFFFFF; + phi_v1 = temp_v1_6; +block_9: + phi_v1->words.w1 = phi_t6; + phi_a1 = &gGfxPool; + phi_a2 = &gDisplayListHead; + } + } else { + temp_v1_7 = gDisplayListHead; + gDisplayListHead = temp_v1_7 + 8; + temp_v1_7->words.w0 = 0x1030040; + temp_v1_7->words.w1 = (gGfxPool + 0x40) & 0x1FFFFFFF; + temp_v1_8 = gDisplayListHead; + gDisplayListHead = temp_v1_8 + 8; + temp_v1_8->words.w0 = 0x1010040; + temp_v1_8->words.w1 = (gGfxPool + 0x1C0) & 0x1FFFFFFF; + phi_a1 = &gGfxPool; + } + sp216 = temp_t3; + func_802B53C8(&sp228, phi_a1, phi_a2); + func_802B4FF8(&sp228, 0); + temp_t7 = gCurrentCourseId; + switch (temp_t7) { /* switch 1 */ + case 2: /* switch 1 */ + if ((D_800DC52C == 0) && (sp21A >= 6) && (sp21A < 0xA) && ((sp21A != 9) || ((sp218 >= 0xA000) && (sp218 < 0xE001)))) { + temp_v1_9 = gDisplayListHead; + gDisplayListHead = temp_v1_9 + 8; + temp_v1_9->words.w1 = &D_06009228; + temp_v1_9->words.w0 = 0x6000000; + return; + } + default: /* switch 1 */ + return; + case 3: /* switch 1 */ + temp_v1_10 = gDisplayListHead; + gDisplayListHead = temp_v1_10 + 8; + temp_v1_10->words.w1 = 0; + temp_v1_10->words.w0 = 0xE7000000; + temp_v1_11 = gDisplayListHead; + gDisplayListHead = temp_v1_11 + 8; + temp_v1_11->words.w1 = -1; + temp_v1_11->words.w0 = 0xBB000001; + temp_v1_12 = gDisplayListHead; + gDisplayListHead = temp_v1_12 + 8; + temp_v1_12->words.w1 = 0x20000; + temp_v1_12->words.w0 = 0xB6000000; + temp_v1_13 = gDisplayListHead; + gDisplayListHead = temp_v1_13 + 8; + temp_v1_13->words.w1 = 0x4045D8; + temp_v1_13->words.w0 = 0xB900031D; + temp_v1_14 = gDisplayListHead; + gDisplayListHead = temp_v1_14 + 8; + temp_v1_14->words.w1 = 0; + temp_v1_14->words.w0 = 0xC0000000; + temp_v1_15 = gDisplayListHead; + gDisplayListHead = temp_v1_15 + 8; + temp_v1_15->words.w1 = 0xFF33FFFF; + temp_v1_15->words.w0 = 0xFC121824; + temp_v1_16 = gDisplayListHead; + gDisplayListHead = temp_v1_16 + 8; + temp_v1_16->words.w1 = 0x7000878; + temp_v1_16->words.w0 = 0x6000000; + temp_v1_17 = gDisplayListHead; + gDisplayListHead = temp_v1_17 + 8; + temp_v1_17->words.w1 = 0; + temp_v1_17->words.w0 = 0xB9000002; + temp_v1_18 = gDisplayListHead; + gDisplayListHead = temp_v1_18 + 8; + temp_v1_18->words.w1 = 0; + temp_v1_18->words.w0 = 0xE7000000; + return; + case 6: /* switch 1 */ + temp_v1_19 = gDisplayListHead; + gDisplayListHead = temp_v1_19 + 8; + temp_v1_19->words.w1 = 0; + temp_v1_19->words.w0 = 0xE7000000; + temp_v1_20 = gDisplayListHead; + gDisplayListHead = temp_v1_20 + 8; + temp_v1_20->words.w1 = -1; + temp_v1_20->words.w0 = 0xBB000001; + temp_v1_21 = gDisplayListHead; + gDisplayListHead = temp_v1_21 + 8; + temp_v1_21->words.w1 = 0x20000; + temp_v1_21->words.w0 = 0xB6000000; + temp_v1_22 = gDisplayListHead; + gDisplayListHead = temp_v1_22 + 8; + temp_v1_22->words.w1 = 0x4045D8; + temp_v1_22->words.w0 = 0xB900031D; + temp_t0 = gDisplayListHead; + gDisplayListHead = temp_t0 + 8; + temp_t0->words.w1 = 0; + temp_t0->words.w0 = 0xC0000000; + temp_t1 = gDisplayListHead; + gDisplayListHead = temp_t1 + 8; + temp_t1->words.w1 = 0xFF33FFFF; + temp_t1->words.w0 = 0xFC121824; + switch (sp21A) { /* switch 2 */ + case 22: /* switch 2 */ + case 23: /* switch 2 */ + case 29: /* switch 2 */ + case 30: /* switch 2 */ + case 31: /* switch 2 */ + case 37: /* switch 2 */ + temp_v1_23 = gDisplayListHead; + gDisplayListHead = temp_v1_23 + 8; + temp_v1_23->words.w1 = 0x2000; + temp_v1_23->words.w0 = 0xB6000000; + temp_v1_24 = gDisplayListHead; + gDisplayListHead = temp_v1_24 + 8; + temp_v1_24->words.w1 = 0x7009E70; + temp_v1_24->words.w0 = 0x6000000; + temp_v1_25 = gDisplayListHead; + gDisplayListHead = temp_v1_25 + 8; + temp_v1_25->words.w1 = 0x2000; + temp_v1_25->words.w0 = 0xB7000000; + break; + } + temp_a1 = &sp21C; + sp21C = 0.0f; + sp224 = 0.0f; + sp220 = D_8015F8E4; + func_802B5520(&sp228, temp_a1, &gDisplayListHead); + func_802B4FF8(&sp228, 0); + temp_v1_26 = gDisplayListHead; + gDisplayListHead = temp_v1_26 + 8; + temp_v1_26->words.w0 = 0xB900031D; + temp_v1_26->words.w1 = 0x4045D8; + temp_v1_27 = gDisplayListHead; + gDisplayListHead = temp_v1_27 + 8; + temp_v1_27->words.w1 = 0; + temp_v1_27->words.w0 = 0xC0000000; + temp_v1_28 = gDisplayListHead; + gDisplayListHead = temp_v1_28 + 8; + temp_v1_28->words.w1 = 0xFF33FFFF; + temp_v1_28->words.w0 = 0xFC121824; + temp_v1_29 = gDisplayListHead; + gDisplayListHead = temp_v1_29 + 8; + temp_v1_29->words.w1 = 0x2000; + temp_v1_29->words.w0 = 0xB6000000; + load_surface_map(&D_06019578, arg0, &gDisplayListHead); + temp_v1_30 = gDisplayListHead; + gDisplayListHead = temp_v1_30 + 8; + temp_v1_30->words.w1 = -1; + temp_v1_30->words.w0 = 0xBB000900; + temp_v1_31 = gDisplayListHead; + gDisplayListHead = temp_v1_31 + 8; + temp_v1_31->words.w1 = 0x2000; + temp_v1_31->words.w0 = 0xB7000000; + temp_v1_32 = gDisplayListHead; + gDisplayListHead = temp_v1_32 + 8; + temp_v1_32->words.w1 = 0; + temp_v1_32->words.w0 = 0xB9000002; + temp_v1_33 = gDisplayListHead; + gDisplayListHead = temp_v1_33 + 8; + temp_v1_33->words.w1 = 0; + temp_v1_33->words.w0 = 0xE7000000; + return; + case 12: /* switch 1 */ + temp_v1_34 = gDisplayListHead; + gDisplayListHead = temp_v1_34 + 8; + temp_v1_34->words.w1 = 0; + temp_v1_34->words.w0 = 0xE7000000; + temp_v1_35 = gDisplayListHead; + gDisplayListHead = temp_v1_35 + 8; + temp_v1_35->words.w1 = 0x20000; + temp_v1_35->words.w0 = 0xB6000000; + temp_v1_36 = gDisplayListHead; + gDisplayListHead = temp_v1_36 + 8; + temp_v1_36->words.w1 = -1; + temp_v1_36->words.w0 = 0xBB000001; + temp_v1_37 = gDisplayListHead; + gDisplayListHead = temp_v1_37 + 8; + temp_v1_37->words.w1 = 0; + temp_v1_37->words.w0 = 0xC0000000; + temp_v1_38 = gDisplayListHead; + gDisplayListHead = temp_v1_38 + 8; + temp_v1_38->words.w1 = 0xFF33FFFF; + temp_v1_38->words.w0 = 0xFC121824; + temp_v1_39 = gDisplayListHead; + gDisplayListHead = temp_v1_39 + 8; + temp_v1_39->words.w1 = 0x2000; + temp_v1_39->words.w0 = 0xBA000C02; + temp_v1_40 = gDisplayListHead; + gDisplayListHead = temp_v1_40 + 8; + temp_v1_40->words.w1 = 0x80000; + temp_v1_40->words.w0 = 0xBA001301; + func_802B53C8(&sp228); + func_802B4FF8(&sp228, 0); + load_surface_map(&D_090001D0, arg0); + temp_v1_41 = gDisplayListHead; + gDisplayListHead = temp_v1_41 + 8; + temp_v1_41->words.w1 = 0; + temp_v1_41->words.w0 = 0xB9000002; + if ((func_80290C20(arg0->unk4) == 1) && (func_802AAB4C(sp268) < sp268->unk18)) { + temp_v1_42 = gDisplayListHead; + gDisplayListHead = temp_v1_42 + 8; + temp_v1_42->words.w1 = 1; + temp_v1_42->words.w0 = 0xB7000000; + temp_v1_43 = gDisplayListHead; + gDisplayListHead = temp_v1_43 + 8; + temp_v1_43->words.w1 = 0xFFFE793C; + temp_v1_43->words.w0 = 0xFCFFFFFF; + temp_v1_44 = gDisplayListHead; + gDisplayListHead = temp_v1_44 + 8; + temp_v1_44->words.w1 = 0x552078; + temp_v1_44->words.w0 = 0xB900031D; + temp_v1_45 = gDisplayListHead; + gDisplayListHead = temp_v1_45 + 8; + temp_v1_45->words.w1 = 0x7002B48; + temp_v1_45->words.w0 = 0x6000000; + } + temp_v1_46 = gDisplayListHead; + gDisplayListHead = temp_v1_46 + 8; + temp_v1_46->words.w1 = 0; + temp_v1_46->words.w0 = 0xE7000000; + return; + case 13: /* switch 1 */ + temp_v1_47 = gDisplayListHead; + gDisplayListHead = temp_v1_47 + 8; + temp_v1_47->words.w1 = 0; + temp_v1_47->words.w0 = 0xE7000000; + func_802B53C8(&sp228); + func_802B4FF8(&sp228, 0); + temp_v1_48 = gDisplayListHead; + gDisplayListHead = temp_v1_48 + 8; + temp_v1_48->words.w1 = 0x2000; + temp_v1_48->words.w0 = 0xB6000000; + load_surface_map(&D_060164B8, arg0, &gDisplayListHead); + temp_v1_49 = gDisplayListHead; + gDisplayListHead = temp_v1_49 + 8; + temp_v1_49->words.w1 = 0x2000; + temp_v1_49->words.w0 = 0xB7000000; + temp_v1_50 = gDisplayListHead; + gDisplayListHead = temp_v1_50 + 8; + temp_v1_50->words.w1 = 0; + temp_v1_50->words.w0 = 0xB9000002; + temp_v1_51 = gDisplayListHead; + gDisplayListHead = temp_v1_51 + 8; + temp_v1_51->words.w1 = 0; + temp_v1_51->words.w0 = 0xE7000000; + return; + case 14: /* switch 1 */ + temp_v1_52 = gDisplayListHead; + gDisplayListHead = temp_v1_52 + 8; + temp_v1_52->words.w1 = 0; + temp_v1_52->words.w0 = 0xE7000000; + temp_v1_53 = gDisplayListHead; + gDisplayListHead = temp_v1_53 + 8; + temp_v1_53->words.w1 = -1; + temp_v1_53->words.w0 = 0xBB000001; + temp_v1_54 = gDisplayListHead; + gDisplayListHead = temp_v1_54 + 8; + temp_v1_54->words.w1 = 0x20000; + temp_v1_54->words.w0 = 0xB6000000; + temp_v1_55 = gDisplayListHead; + gDisplayListHead = temp_v1_55 + 8; + temp_v1_55->words.w1 = 0x4045D8; + temp_v1_55->words.w0 = 0xB900031D; + temp_v1_56 = gDisplayListHead; + gDisplayListHead = temp_v1_56 + 8; + temp_v1_56->words.w1 = 0; + temp_v1_56->words.w0 = 0xC0000000; + temp_v1_57 = gDisplayListHead; + gDisplayListHead = temp_v1_57 + 8; + temp_v1_57->words.w1 = 0xFF33FFFF; + temp_v1_57->words.w0 = 0xFC121824; + temp_v1_58 = gDisplayListHead; + gDisplayListHead = temp_v1_58 + 8; + temp_v1_58->words.w1 = 0x2000; + temp_v1_58->words.w0 = 0xBA000C02; + temp_v1_59 = gDisplayListHead; + gDisplayListHead = temp_v1_59 + 8; + temp_v1_59->words.w1 = 0x80000; + temp_v1_59->words.w0 = 0xBA001301; + func_802B53C8(&sp228); + func_802B4FF8(&sp228, 0); + temp_v1_60 = gDisplayListHead; + gDisplayListHead = temp_v1_60 + 8; + temp_v1_60->words.w1 = 0x2000; + temp_v1_60->words.w0 = 0xB6000000; + temp_v1_61 = gDisplayListHead; + gDisplayListHead = temp_v1_61 + 8; + temp_v1_61->words.w1 = -0xC07; + temp_v1_61->words.w0 = 0xFC127E24; + temp_v1_62 = gDisplayListHead; + gDisplayListHead = temp_v1_62 + 8; + temp_v1_62->words.w1 = 0x5049D8; + temp_v1_62->words.w0 = 0xB900031D; + temp_v1_63 = gDisplayListHead; + gDisplayListHead = temp_v1_63 + 8; + temp_v1_63->words.w0 = 0xFA000000; + temp_v1_63->words.w1 = 0xFFFF00FF; + temp_v1_64 = gDisplayListHead; + gDisplayListHead = temp_v1_64 + 8; + temp_v1_64->words.w1 = 0x7000EC0; + temp_v1_64->words.w0 = 0x6000000; + temp_v1_65 = gDisplayListHead; + gDisplayListHead = temp_v1_65 + 8; + temp_v1_65->words.w1 = -1; + temp_v1_65->words.w0 = 0xBB000900; + temp_v1_66 = gDisplayListHead; + gDisplayListHead = temp_v1_66 + 8; + temp_v1_66->words.w1 = 0x2000; + temp_v1_66->words.w0 = 0xB7000000; + temp_v1_67 = gDisplayListHead; + gDisplayListHead = temp_v1_67 + 8; + temp_v1_67->words.w1 = 0; + temp_v1_67->words.w0 = 0xB9000002; + temp_v1_68 = gDisplayListHead; + gDisplayListHead = temp_v1_68 + 8; + temp_v1_68->words.w1 = 0; + temp_v1_68->words.w0 = 0xE7000000; + return; + case 18: /* switch 1 */ + temp_v1_69 = gDisplayListHead; + gDisplayListHead = temp_v1_69 + 8; + temp_v1_69->words.w1 = 0; + temp_v1_69->words.w0 = 0xE7000000; + temp_v1_70 = gDisplayListHead; + gDisplayListHead = temp_v1_70 + 8; + temp_v1_70->words.w1 = 0x20000; + temp_v1_70->words.w0 = 0xB6000000; + temp_v1_71 = gDisplayListHead; + gDisplayListHead = temp_v1_71 + 8; + temp_v1_71->words.w1 = -1; + temp_v1_71->words.w0 = 0xBB000001; + temp_v1_72 = gDisplayListHead; + gDisplayListHead = temp_v1_72 + 8; + temp_v1_72->words.w1 = 0; + temp_v1_72->words.w0 = 0xC0000000; + temp_v1_73 = gDisplayListHead; + gDisplayListHead = temp_v1_73 + 8; + temp_v1_73->words.w1 = 0x2000; + temp_v1_73->words.w0 = 0xBA000C02; + temp_v1_74 = gDisplayListHead; + gDisplayListHead = temp_v1_74 + 8; + temp_v1_74->words.w1 = 0x80000; + temp_v1_74->words.w0 = 0xBA001301; + sp216 = temp_t3; + func_802B53C8(&sp228); + func_802B4FF8(&sp228, 0); + temp_v1_75 = gDisplayListHead; + gDisplayListHead = temp_v1_75 + 8; + temp_v1_75->words.w1 = 0xFF33FFFF; + temp_v1_75->words.w0 = 0xFC121824; + temp_v1_76 = gDisplayListHead; + gDisplayListHead = temp_v1_76 + 8; + temp_v1_76->words.w1 = 0x4045D8; + temp_v1_76->words.w0 = 0xB900031D; + if (sp21A < 0x11) { + temp_v1_77 = gDisplayListHead; + gDisplayListHead = temp_v1_77 + 8; + temp_v1_77->words.w1 = 0xFF33FFFF; + temp_v1_77->words.w0 = 0xFC121824; + temp_v1_78 = gDisplayListHead; + gDisplayListHead = temp_v1_78 + 8; + temp_v1_78->words.w1 = 0x7003E40; + temp_v1_78->words.w0 = 0x6000000; + temp_v1_79 = gDisplayListHead; + gDisplayListHead = temp_v1_79 + 8; + temp_v1_79->words.w1 = 0x7003EB0; + temp_v1_79->words.w0 = 0x6000000; + if ((sp21A >= 6) && (sp21A < 0xD)) { + temp_v1_80 = gDisplayListHead; + gDisplayListHead = temp_v1_80 + 8; + temp_v1_80->words.w1 = 0xFF33FFFF; + temp_v1_80->words.w0 = 0xFC121824; + temp_v1_81 = gDisplayListHead; + gDisplayListHead = temp_v1_81 + 8; + temp_v1_81->words.w1 = 0x7003DD0; + temp_v1_81->words.w0 = 0x6000000; + } + } else { + if ((sp21A == 0x15) || (sp21A == 0x16)) { + if (temp_t3 == 3) { + temp_v1_88 = gDisplayListHead; + gDisplayListHead = temp_v1_88 + 8; + temp_v1_88->words.w1 = -0xC07; + temp_v1_88->words.w0 = 0xFC127E24; + temp_v1_89 = gDisplayListHead; + gDisplayListHead = temp_v1_89 + 8; + temp_v1_89->words.w1 = 0x70036A8; + temp_v1_89->words.w0 = 0x6000000; + } + if ((temp_t3 == 1) || (temp_t3 == 0)) { + temp_v1_93 = gDisplayListHead; + gDisplayListHead = temp_v1_93 + 8; + temp_v1_93->words.w1 = -0xC07; + temp_v1_93->words.w0 = 0xFC127E24; + temp_v1_94 = gDisplayListHead; + gDisplayListHead = temp_v1_94 + 8; + temp_v1_94->words.w1 = 0x70036A8; + phi_v1_2 = temp_v1_94; + } else { + temp_v1_90 = gDisplayListHead; + gDisplayListHead = temp_v1_90 + 8; + temp_v1_90->words.w1 = 0xFF33FFFF; + temp_v1_90->words.w0 = 0xFC121824; + temp_v1_91 = gDisplayListHead; + gDisplayListHead = temp_v1_91 + 8; + temp_v1_91->words.w1 = 0x7003F30; + temp_v1_91->words.w0 = 0x6000000; + temp_v1_92 = gDisplayListHead; + gDisplayListHead = temp_v1_92 + 8; + temp_v1_92->words.w1 = 0x70036A8; + phi_v1_2 = temp_v1_92; + } + goto block_53; + } + if (sp21A == 0x18) { + if ((temp_t3 == 0) || (temp_t3 == 3)) { + temp_v1_82 = gDisplayListHead; + gDisplayListHead = temp_v1_82 + 8; + temp_v1_82->words.w1 = -0xC07; + temp_v1_82->words.w0 = 0xFC127E24; + temp_v1_83 = gDisplayListHead; + gDisplayListHead = temp_v1_83 + 8; + temp_v1_83->words.w0 = 0x6000000; + temp_v1_83->words.w1 = 0x70036A8; + } + } else if (sp21A == 0x17) { + if (temp_t3 == 3) { + temp_v1_84 = gDisplayListHead; + gDisplayListHead = temp_v1_84 + 8; + temp_v1_84->words.w1 = -0xC07; + temp_v1_84->words.w0 = 0xFC127E24; + temp_v1_85 = gDisplayListHead; + gDisplayListHead = temp_v1_85 + 8; + temp_v1_85->words.w1 = 0x70036A8; + phi_v1_2 = temp_v1_85; + goto block_53; + } + if (temp_t3 == 0) { + temp_v1_86 = gDisplayListHead; + gDisplayListHead = temp_v1_86 + 8; + temp_v1_86->words.w1 = -0xC07; + temp_v1_86->words.w0 = 0xFC127E24; + temp_v1_87 = gDisplayListHead; + gDisplayListHead = temp_v1_87 + 8; + temp_v1_87->words.w1 = 0x70036A8; + phi_v1_2 = temp_v1_87; +block_53: + phi_v1_2->words.w0 = 0x6000000; + } + } + } + temp_v1_95 = gDisplayListHead; + gDisplayListHead = temp_v1_95 + 8; + temp_v1_95->words.w1 = 0xFF33FFFF; + temp_v1_95->words.w0 = 0xFC121824; + switch (sp21A) { /* switch 3 */ + case 5: /* switch 3 */ + if (temp_t3 != 3) { + temp_v1_96 = gDisplayListHead; + gDisplayListHead = temp_v1_96 + 8; + temp_v1_96->words.w1 = 0x7003DD0; + phi_v1_3 = temp_v1_96; +block_82: + phi_v1_3->words.w0 = 0x6000000; + } + break; + case 17: /* switch 3 */ + if (temp_t3 != 0) { + if (temp_t3 != 1) { + if (temp_t3 != 2) { + if (temp_t3 != 3) { + + } else { + temp_v1_97 = gDisplayListHead; + gDisplayListHead = temp_v1_97 + 8; + temp_v1_97->words.w1 = 0x7003EB0; + temp_v1_97->words.w0 = 0x6000000; + temp_v1_98 = gDisplayListHead; + gDisplayListHead = temp_v1_98 + 8; + temp_v1_98->words.w1 = 0x7003F30; + phi_v1_3 = temp_v1_98; + goto block_82; + } + } else { + temp_v1_99 = gDisplayListHead; + gDisplayListHead = temp_v1_99 + 8; + temp_v1_99->words.w1 = 0x7003E40; + temp_v1_99->words.w0 = 0x6000000; + temp_v1_100 = gDisplayListHead; + gDisplayListHead = temp_v1_100 + 8; + temp_v1_100->words.w1 = 0x7003EB0; + temp_v1_100->words.w0 = 0x6000000; + temp_v1_101 = gDisplayListHead; + gDisplayListHead = temp_v1_101 + 8; + temp_v1_101->words.w1 = 0x7003F30; + phi_v1_3 = temp_v1_101; + goto block_82; + } + } else { + temp_v1_102 = gDisplayListHead; + gDisplayListHead = temp_v1_102 + 8; + temp_v1_102->words.w1 = 0x7003DD0; + temp_v1_102->words.w0 = 0x6000000; + temp_v1_103 = gDisplayListHead; + gDisplayListHead = temp_v1_103 + 8; + temp_v1_103->words.w1 = 0x7003E40; + temp_v1_103->words.w0 = 0x6000000; + temp_v1_104 = gDisplayListHead; + gDisplayListHead = temp_v1_104 + 8; + temp_v1_104->words.w1 = 0x7003EB0; + phi_v1_3 = temp_v1_104; + goto block_82; + } + } else { + temp_v1_105 = gDisplayListHead; + gDisplayListHead = temp_v1_105 + 8; + temp_v1_105->words.w1 = 0x7003E40; + temp_v1_105->words.w0 = 0x6000000; + temp_v1_106 = gDisplayListHead; + gDisplayListHead = temp_v1_106 + 8; + temp_v1_106->words.w1 = 0x7003EB0; + phi_v1_3 = temp_v1_106; + goto block_82; + } + break; + case 18: /* switch 3 */ + if (temp_t3 != 0) { + if (temp_t3 != 1) { + if (temp_t3 != 2) { + + } else { + temp_v1_107 = gDisplayListHead; + gDisplayListHead = temp_v1_107 + 8; + temp_v1_107->words.w1 = 0x7003E40; + temp_v1_107->words.w0 = 0x6000000; + temp_v1_108 = gDisplayListHead; + gDisplayListHead = temp_v1_108 + 8; + temp_v1_108->words.w1 = 0x7003EB0; + phi_v1_3 = temp_v1_108; + goto block_82; + } + } else { + temp_v1_109 = gDisplayListHead; + gDisplayListHead = temp_v1_109 + 8; + temp_v1_109->words.w1 = 0x7003DD0; + temp_v1_109->words.w0 = 0x6000000; + temp_v1_110 = gDisplayListHead; + gDisplayListHead = temp_v1_110 + 8; + temp_v1_110->words.w1 = 0x7003E40; + temp_v1_110->words.w0 = 0x6000000; + temp_v1_111 = gDisplayListHead; + gDisplayListHead = temp_v1_111 + 8; + temp_v1_111->words.w1 = 0x7003EB0; + phi_v1_3 = temp_v1_111; + goto block_82; + } + } else { + temp_v1_112 = gDisplayListHead; + gDisplayListHead = temp_v1_112 + 8; + temp_v1_112->words.w1 = 0x7003E40; + temp_v1_112->words.w0 = 0x6000000; + temp_v1_113 = gDisplayListHead; + gDisplayListHead = temp_v1_113 + 8; + temp_v1_113->words.w1 = 0x7003EB0; + phi_v1_3 = temp_v1_113; + goto block_82; + } + break; + case 21: /* switch 3 */ + if ((temp_t3 == 0) || (temp_t3 == 1)) { + temp_v1_115 = gDisplayListHead; + gDisplayListHead = temp_v1_115 + 8; + temp_v1_115->words.w1 = 0x7003E40; + temp_v1_115->words.w0 = 0x6000000; + temp_v1_116 = gDisplayListHead; + gDisplayListHead = temp_v1_116 + 8; + temp_v1_116->words.w1 = 0x7003EB0; + temp_v1_116->words.w0 = 0x6000000; + temp_v1_117 = gDisplayListHead; + gDisplayListHead = temp_v1_117 + 8; + temp_v1_117->words.w1 = 0x7003F30; + phi_v1_3 = temp_v1_117; + } else { + temp_v1_114 = gDisplayListHead; + gDisplayListHead = temp_v1_114 + 8; + temp_v1_114->words.w1 = 0x7003EB0; + phi_v1_3 = temp_v1_114; + } + goto block_82; + case 22: /* switch 3 */ + if (temp_t3 == 0) { + temp_v1_118 = gDisplayListHead; + gDisplayListHead = temp_v1_118 + 8; + temp_v1_118->words.w1 = 0x7003F30; + phi_v1_3 = temp_v1_118; + goto block_82; + } + break; + case 23: /* switch 3 */ + if (temp_t3 != 1) { + temp_v1_119 = gDisplayListHead; + gDisplayListHead = temp_v1_119 + 8; + temp_v1_119->words.w1 = 0x7003F30; + phi_v1_3 = temp_v1_119; + goto block_82; + } + break; + } + temp_v1_120 = gDisplayListHead; + gDisplayListHead = temp_v1_120 + 8; + temp_v1_120->words.w1 = -1; + temp_v1_120->words.w0 = 0xBB000900; + temp_v1_121 = gDisplayListHead; + gDisplayListHead = temp_v1_121 + 8; + temp_v1_121->words.w1 = 0; + temp_v1_121->words.w0 = 0xB9000002; + temp_v1_122 = gDisplayListHead; + gDisplayListHead = temp_v1_122 + 8; + temp_v1_122->words.w1 = 0; + temp_v1_122->words.w0 = 0xE7000000; + /* Duplicate return node #84. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/func_8029122C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function render_mario_raceway: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80291198(); /* extern */ +? func_802911C4(); /* extern */ +? load_surface_map(? *, void *); /* extern */ +extern ? mario_raceway_dls; -Unable to determine jump table for jr instruction at render_mario_raceway.s line 99. +void render_mario_raceway(void *arg0) { + s16 sp22; + u16 sp20; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_21; + Gfx *temp_v0_22; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + s32 temp_a0; + u16 temp_t0; + void *temp_a1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = gDisplayListHead; + sp22 = arg0->unk38; + temp_t0 = arg0->unk36; + gDisplayListHead = temp_v0 + 8; + temp_a1 = arg0; + temp_v0->words.w1 = 0x20000; + temp_v0->words.w0 = 0xB6000000; + temp_a0 = arg0->unk4; + arg0 = temp_a1; + sp20 = temp_t0; + if (func_80290C20(temp_a0, temp_a1) == 1) { + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0xFCFFFFFF; + temp_v0_2->words.w1 = 0xFFFE793C; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w0 = 0xB900031D; + temp_v0_3->words.w1 = 0x552078; + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0x6000000; + temp_v0_4->words.w1 = 0x7003050; + } + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = 0x20000; + temp_v0_5->words.w0 = 0xB6000000; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w0 = 0xFC121824; + temp_v0_6->words.w1 = 0xFF33FFFF; + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w0 = 0xB900031D; + temp_v0_7->words.w1 = 0x552078; + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w1 = -1; + temp_v0_9->words.w0 = 0xBB000001; + switch (sp22) { + case 1: + case 2: + case 17: + if ((temp_t0 == 2) || (temp_t0 == 1)) { + func_802911C4(); + } + break; + case 3: + if (temp_t0 != 0) { + func_802911C4(); + } + break; + case 4: + if (temp_t0 == 0) { + func_80291198(); + } else { + if (temp_t0 == 1) { + func_80291198(); + } + func_802911C4(); + } + break; + case 5: + case 6: + if ((temp_t0 == 2) || (temp_t0 == 3)) { + func_802911C4(); + } else { + func_80291198(); + } + break; + case 7: + sp20 = temp_t0; + func_80291198(); + if ((temp_t0 == 2) || (temp_t0 == 3)) { + func_802911C4(); + } + break; + case 8: + case 9: + if (temp_t0 != 1) { + sp20 = temp_t0; + func_802911C4(); + } + /* fallthrough */ + case 10: + if (temp_t0 != 2) { + func_80291198(); + } + break; + case 11: + if (temp_t0 == 0) { + func_802911C4(); + func_80291198(); + } else if (temp_t0 == 3) { + func_802911C4(); + } + break; + case 12: + if ((temp_t0 == 0) || (temp_t0 == 3)) { + func_802911C4(); + } + break; + case 13: + case 14: + if (temp_t0 != 1) { + case 15: + case 16: + func_802911C4(); + } + break; + } + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + temp_v0_10->words.w0 = 0xFC121824; + temp_v0_10->words.w1 = 0xFF33FFFF; + temp_v0_11 = gDisplayListHead; + gDisplayListHead = temp_v0_11 + 8; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_11->words.w1 = 0x552078; + temp_v0_12 = gDisplayListHead; + gDisplayListHead = temp_v0_12 + 8; + temp_v0_12->words.w0 = 0x6000000; + temp_v0_12->words.w1 = 0x7003508; + temp_v0_13 = gDisplayListHead; + gDisplayListHead = temp_v0_13 + 8; + temp_v0_13->words.w0 = 0x6000000; + temp_v0_13->words.w1 = 0x7003240; + temp_v0_14 = gDisplayListHead; + gDisplayListHead = temp_v0_14 + 8; + temp_v0_14->words.w1 = 0x70014A0; + temp_v0_14->words.w0 = 0x6000000; + load_surface_map(&mario_raceway_dls, arg0); + temp_v0_15 = gDisplayListHead; + gDisplayListHead = temp_v0_15 + 8; + temp_v0_15->words.w1 = -0xC07; + temp_v0_15->words.w0 = 0xFC127E24; + temp_v0_16 = gDisplayListHead; + gDisplayListHead = temp_v0_16 + 8; + temp_v0_16->words.w0 = 0xB900031D; + temp_v0_16->words.w1 = 0x553078; + temp_v0_17 = gDisplayListHead; + gDisplayListHead = temp_v0_17 + 8; + temp_v0_17->words.w1 = 0x2000; + temp_v0_17->words.w0 = 0xB6000000; + temp_v0_18 = gDisplayListHead; + gDisplayListHead = temp_v0_18 + 8; + temp_v0_18->words.w0 = 0x6000000; + temp_v0_18->words.w1 = 0x7000450; + temp_v0_19 = gDisplayListHead; + gDisplayListHead = temp_v0_19 + 8; + temp_v0_19->words.w0 = 0x6000000; + temp_v0_19->words.w1 = 0x7000240; + temp_v0_20 = gDisplayListHead; + gDisplayListHead = temp_v0_20 + 8; + temp_v0_20->words.w1 = 0x2000; + temp_v0_20->words.w0 = 0xB7000000; + temp_v0_21 = gDisplayListHead; + gDisplayListHead = temp_v0_21 + 8; + temp_v0_21->words.w1 = 0x70000E0; + temp_v0_21->words.w0 = 0x6000000; + temp_v0_22 = gDisplayListHead; + gDisplayListHead = temp_v0_22 + 8; + temp_v0_22->words.w0 = 0x6000000; + temp_v0_22->words.w1 = 0x7000160; +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/render_mario_raceway.s") #endif @@ -975,15 +1981,119 @@ GLOBAL_ASM("asm/non_matchings/code_80290C20/render_royal_raceway.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function render_luigi_raceway: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802A7658(s32, s32, ?, ?, s32, s32); /* extern */ +? load_surface_map(? *, void *); /* extern */ +extern ? luigi_raceway_dls; -Unable to determine jump table for jr instruction at render_luigi_raceway.s line 170. +void render_luigi_raceway(void *arg0) { + s16 sp22; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + s16 temp_v0_13; + s16 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + sp22 = arg0->unk38; + temp_v0->words.w1 = -1; + temp_v0->words.w0 = 0xBB000001; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w1 = 0x200; + temp_v0_2->words.w0 = 0xB7000000; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w1 = 0x20000; + temp_v0_3->words.w0 = 0xB6000000; + if (func_80290C20(arg0->unk4) == 1) { + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0xFCFFFFFF; + temp_v0_4->words.w1 = 0xFFFE793C; + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w0 = 0xB900031D; + temp_v0_5->words.w1 = 0x552078; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w0 = 0x6000000; + temp_v0_6->words.w1 = 0x7009EC0; + } + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w0 = 0xFC121824; + temp_v0_7->words.w1 = 0xFF33FFFF; + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w0 = 0xB900031D; + temp_v0_8->words.w1 = 0x552078; + load_surface_map(&luigi_raceway_dls, arg0); + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w1 = -0xC07; + temp_v0_9->words.w0 = 0xFC127E24; + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + temp_v0_10->words.w0 = 0xB900031D; + temp_v0_10->words.w1 = 0x553078; + temp_v0_11 = gDisplayListHead; + gDisplayListHead = temp_v0_11 + 8; + temp_v0_11->words.w1 = 0x70000E0; + temp_v0_11->words.w0 = 0x6000000; + temp_v0_12 = gDisplayListHead; + gDisplayListHead = temp_v0_12 + 8; + temp_v0_12->words.w1 = 0x7000068; + temp_v0_12->words.w0 = 0x6000000; + D_800DC5DC = 0x58; + D_800DC5E0 = 0x48; + if ((D_800DC52C == 0) && (sp22 >= 0xA) && (sp22 < 0x11)) { + temp_v0_13 = sRenderedFramebuffer - 1; + phi_v0 = temp_v0_13; + if (temp_v0_13 < 0) { + phi_v0 = 2; + } else if (temp_v0_13 >= 3) { + phi_v0 = 0; + } + D_802B87D8 += 1; + if (D_802B87D8 >= 6) { + D_802B87D8 = 0; + } + switch (D_802B87D8) { + case 0: + func_802A7658(D_800DC5DC, D_800DC5E0, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xF800) | 0x80000000); + return; + case 1: + func_802A7658(D_800DC5DC + 0x40, D_800DC5E0, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x10800) | 0x80000000); + return; + case 2: + func_802A7658(D_800DC5DC, D_800DC5E0 + 0x20, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x11800) | 0x80000000); + return; + case 3: + func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x20, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x12800) | 0x80000000); + return; + case 4: + func_802A7658(D_800DC5DC, D_800DC5E0 + 0x40, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x13800) | 0x80000000); + return; + case 5: + func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x40, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x14800) | 0x80000000); + /* Duplicate return node #19. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/render_luigi_raceway.s") #endif @@ -1473,15 +2583,127 @@ GLOBAL_ASM("asm/non_matchings/code_80290C20/render_rainbow_road.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function render_wario_stadium: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802A7658(s32, s32, ?, ?, s32, s32); /* extern */ +? load_surface_map(? *, void *); /* extern */ +extern ? wario_stadium_dls; -Unable to determine jump table for jr instruction at render_wario_stadium.s line 176. +void render_wario_stadium(void *arg0) { + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + s16 temp_v0_15; + s16 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = -1; + temp_v0->words.w0 = 0xBB000001; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w1 = 0x200; + temp_v0_2->words.w0 = 0xB7000000; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w1 = 0x20000; + temp_v0_3->words.w0 = 0xB6000000; + if (func_80290C20(arg0->unk4) == 1) { + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0xFCFFFFFF; + temp_v0_4->words.w1 = 0xFFFE793C; + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = 0x552078; + temp_v0_5->words.w0 = 0xB900031D; + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w0 = 0x6000000; + temp_v0_6->words.w1 = 0x700A0C8; + } + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w0 = 0xFC121824; + temp_v0_7->words.w1 = 0xFF33FFFF; + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w1 = 0x552078; + temp_v0_8->words.w0 = 0xB900031D; + load_surface_map(&wario_stadium_dls, arg0); + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w1 = 0x700A228; + temp_v0_9->words.w0 = 0x6000000; + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + temp_v0_10->words.w1 = -0xC07; + temp_v0_10->words.w0 = 0xFC127E24; + temp_v0_11 = gDisplayListHead; + gDisplayListHead = temp_v0_11 + 8; + temp_v0_11->words.w1 = 0x553078; + temp_v0_11->words.w0 = 0xB900031D; + temp_v0_12 = gDisplayListHead; + gDisplayListHead = temp_v0_12 + 8; + temp_v0_12->words.w1 = 0x2000; + temp_v0_12->words.w0 = 0xB6000000; + temp_v0_13 = gDisplayListHead; + gDisplayListHead = temp_v0_13 + 8; + temp_v0_13->words.w1 = 0x7000A88; + temp_v0_13->words.w0 = 0x6000000; + temp_v0_14 = gDisplayListHead; + gDisplayListHead = temp_v0_14 + 8; + temp_v0_14->words.w1 = 0x2000; + temp_v0_14->words.w0 = 0xB7000000; + D_800DC5DC = 0x58; + D_800DC5E0 = 0x48; + if (D_800DC52C == 0) { + temp_v0_15 = sRenderedFramebuffer - 1; + phi_v0 = temp_v0_15; + if (temp_v0_15 < 0) { + phi_v0 = 2; + } else if (temp_v0_15 >= 3) { + phi_v0 = 0; + } + D_802B87D8 += 1; + if (D_802B87D8 >= 6) { + D_802B87D8 = 0; + } + switch (D_802B87D8) { + case 0: + func_802A7658(D_800DC5DC, D_800DC5E0, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x8800) | 0x80000000); + return; + case 1: + func_802A7658(D_800DC5DC + 0x40, D_800DC5E0, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0x9800) | 0x80000000); + return; + case 2: + func_802A7658(D_800DC5DC, D_800DC5E0 + 0x20, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xA800) | 0x80000000); + return; + case 3: + func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x20, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xB800) | 0x80000000); + return; + case 4: + func_802A7658(D_800DC5DC, D_800DC5E0 + 0x40, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xC800) | 0x80000000); + return; + case 5: + func_802A7658(D_800DC5DC + 0x40, D_800DC5E0 + 0x40, 0x40, 0x20, gPhysicalFramebuffers[phi_v0] | 0x80000000, (*(gSegmentTable + 0x14) + 0xD800) | 0x80000000); + /* Duplicate return node #17. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/render_wario_stadium.s") #endif @@ -1789,29 +3011,280 @@ GLOBAL_ASM("asm/non_matchings/code_80290C20/render_big_donut.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029569C: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_060071B0; +extern ? D_060076A0; +extern ? D_06009148; +extern ? D_06009348; +extern ? D_06009AE8; +extern ? D_0600B308; +extern ? D_0600CA78; +extern ? D_0600D8E8; +extern ? D_0600FD40; +extern ? D_06013C30; +extern ? D_06014088; +extern ? D_06016220; +extern ? D_06018020; +extern ? D_06018D68; +extern ? D_06022E00; +extern ? D_06023930; +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8029569C.s line 10. +void func_8029569C(void) { + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_18; + Gfx *temp_v0_19; + Gfx *temp_v0_20; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + u16 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = gCurrentCourseId; + switch (temp_t6) { + case 0: + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w0 = 0x6000000; + temp_v0->words.w1 = &D_06009348; + return; + case 1: + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0x6000000; + temp_v0_2->words.w1 = &D_060071B0; + return; + case 2: + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w0 = 0x6000000; + temp_v0_3->words.w1 = &D_06009148; + return; + case 3: + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0x6000000; + temp_v0_4->words.w1 = &D_0600B308; + return; + case 4: + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w0 = 0x6000000; + temp_v0_5->words.w1 = &D_06018020; + return; + case 5: + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w0 = 0x6000000; + temp_v0_6->words.w1 = &D_060076A0; + return; + case 6: + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w0 = 0x6000000; + temp_v0_7->words.w1 = &D_06018D68; + return; + case 7: + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w0 = 0x6000000; + temp_v0_8->words.w1 = &D_0600D8E8; + return; + case 8: + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w0 = 0x6000000; + temp_v0_9->words.w1 = &D_0600FD40; + return; + case 9: + temp_v0_10 = gDisplayListHead; + gDisplayListHead = temp_v0_10 + 8; + temp_v0_10->words.w0 = 0x6000000; + temp_v0_10->words.w1 = &D_06014088; + return; + case 10: + temp_v0_11 = gDisplayListHead; + gDisplayListHead = temp_v0_11 + 8; + temp_v0_11->words.w0 = 0x6000000; + temp_v0_11->words.w1 = &D_06023930; + return; + case 11: + temp_v0_12 = gDisplayListHead; + gDisplayListHead = temp_v0_12 + 8; + temp_v0_12->words.w0 = 0x6000000; + temp_v0_12->words.w1 = &D_06022E00; + return; + case 12: + temp_v0_13 = gDisplayListHead; + gDisplayListHead = temp_v0_13 + 8; + temp_v0_13->words.w0 = 0x6000000; + temp_v0_13->words.w1 = &D_06009AE8; + return; + case 13: + temp_v0_14 = gDisplayListHead; + gDisplayListHead = temp_v0_14 + 8; + temp_v0_14->words.w0 = 0x6000000; + temp_v0_14->words.w1 = &D_06016220; + return; + case 14: + temp_v0_15 = gDisplayListHead; + gDisplayListHead = temp_v0_15 + 8; + temp_v0_15->words.w0 = 0x6000000; + temp_v0_15->words.w1 = &D_0600CA78; + return; + case 15: + temp_v0_16 = gDisplayListHead; + gDisplayListHead = temp_v0_16 + 8; + temp_v0_16->words.w0 = 0x6000000; + temp_v0_16->words.w1 = 0x6000000; + return; + case 16: + temp_v0_17 = gDisplayListHead; + gDisplayListHead = temp_v0_17 + 8; + temp_v0_17->words.w0 = 0x6000000; + temp_v0_17->words.w1 = 0x6000000; + return; + case 17: + temp_v0_18 = gDisplayListHead; + gDisplayListHead = temp_v0_18 + 8; + temp_v0_18->words.w0 = 0x6000000; + temp_v0_18->words.w1 = 0x6000000; + return; + case 18: + temp_v0_19 = gDisplayListHead; + gDisplayListHead = temp_v0_19 + 8; + temp_v0_19->words.w0 = 0x6000000; + temp_v0_19->words.w1 = &D_06013C30; + return; + case 19: + temp_v0_20 = gDisplayListHead; + gDisplayListHead = temp_v0_20 + 8; + temp_v0_20->words.w0 = 0x6000000; + temp_v0_20->words.w1 = 0x6000000; + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/func_8029569C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80295A38: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8029569C(); /* extern */ +? func_802B5D64(? *, s16, ?, ?); /* extern */ +? render_banshee_boardwalk(s32); /* extern */ +? render_big_donut(s32); /* extern */ +? render_block_fort(s32); /* extern */ +? render_bowsers_castle(s32); /* extern */ +? render_choco_mountain(s32); /* extern */ +? render_dks_jungle_parkway(s32); /* extern */ +? render_double_deck(s32); /* extern */ +? render_frappe_snowland(s32); /* extern */ +? render_kalimari_desert(s32); /* extern */ +? render_koopa_troopa_beach(s32); /* extern */ +? render_luigi_raceway(s32); /* extern */ +? render_mario_raceway(s32); /* extern */ +? render_moo_moo_farm(s32); /* extern */ +? render_rainbow_road(s32); /* extern */ +? render_royal_raceway(s32); /* extern */ +? render_sherbet_land(s32); /* extern */ +? render_skyscraper(s32); /* extern */ +? render_toads_turnpike(s32); /* extern */ +? render_wario_stadium(s32); /* extern */ +? render_yoshi_valley(s32); /* extern */ +static ? D_800DC610; /* unable to generate initializer */ +s16 D_802B87D4; /* unable to generate initializer */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80295A38.s line 30. +void func_80295A38(s32 arg0) { + u16 temp_t7; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + func_802B5D64(&D_800DC610, D_802B87D4, 0, 1); + if (D_800DC518 != 0) { + func_8029569C(); + return; + } + temp_t7 = gCurrentCourseId; + switch (temp_t7) { + case 0: + render_mario_raceway(arg0); + return; + case 1: + render_choco_mountain(arg0); + return; + case 2: + render_bowsers_castle(arg0); + return; + case 3: + render_banshee_boardwalk(arg0); + return; + case 4: + render_yoshi_valley(arg0); + return; + case 5: + render_frappe_snowland(arg0); + return; + case 6: + render_koopa_troopa_beach(arg0); + return; + case 7: + render_royal_raceway(arg0); + return; + case 8: + render_luigi_raceway(arg0); + return; + case 9: + render_moo_moo_farm(arg0); + return; + case 10: + render_toads_turnpike(arg0); + return; + case 11: + render_kalimari_desert(arg0); + return; + case 12: + render_sherbet_land(arg0); + return; + case 13: + render_rainbow_road(arg0); + return; + case 14: + render_wario_stadium(arg0); + return; + case 15: + render_block_fort(arg0); + return; + case 16: + render_skyscraper(arg0); + return; + case 17: + render_double_deck(arg0); + return; + case 18: + render_dks_jungle_parkway(arg0); + return; + case 19: + render_big_donut(arg0); + /* fallthrough */ + default: + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/func_80295A38.s") #endif @@ -1888,15 +3361,230 @@ GLOBAL_ASM("asm/non_matchings/code_80290C20/func_80295D6C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80295D88: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80290CAC(? *); /* extern */ +? func_80295C6C(); /* extern */ +? func_80295D6C(); /* extern */ +? func_802AAA70(?); /* extern */ +? func_802AF588(?); /* extern */ +? func_802AF5AC(?, ?); /* extern */ +? func_802AF8BC(?, ?, ?, ?, s32); /* extern */ +? func_802B5CAC(?, ?, ? *); /* extern */ +? func_802B5D64(? *, ?, ?, ?); /* extern */ +extern ? D_060072D0; +extern ? D_060079A0; +extern ? D_060093D8; +extern ? D_06009650; +extern ? D_06009C20; +extern ? D_0600B458; +extern ? D_0600CC38; +extern ? D_0600DC28; +extern ? D_0600FF28; +extern ? D_06014338; +extern ? D_060144B8; +extern ? D_06016440; +extern ? D_06016558; +extern ? D_06018240; +extern ? D_06018FD8; +extern ? D_06023070; +extern ? D_06023B68; +extern ? D_8015F590; +s16 D_800DC5BC; /* unable to generate initializer */ +s16 D_800DC5C8; /* unable to generate initializer */ +s16 D_802B87B0; /* unable to generate initializer */ +s16 D_802B87D0; /* unable to generate initializer */ +s16 D_802B87D4; /* unable to generate initializer */ +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_80295D88.s line 45. +void func_80295D88(void) { + u16 temp_t7; + f32 phi_f10; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + D_80150110 = 0; + D_8015F6EA = 0; + D_8015F6EE = 0; + D_8015F6F2 = 0; + D_8015F6E8 = 0; + D_8015F6EC = 0; + D_8015F6F0 = 0; + D_8015F59C = 0; + D_8015F5A0 = 0; + func_80295D6C(); + D_8015F58C = 0; + D_8015F588 = 0; + D_8015F580 = gPrevLoadedAddress; + D_800DC5BC = 0; + D_800DC5C8 = 0; + temp_t7 = gCurrentCourseId; + switch (temp_t7) { + case 0: + func_802AF588(0x7001140); + if (D_800DC530 == 0) { + func_802AF588(0x70008E8); + } else { + func_802AF588(0x7002D68); + } + func_80290CAC(&D_06009650); + func_80295C6C(); + phi_f10 = D_8015F6EE - 10.0f; +block_29: + D_8015F8E4 = phi_f10; + default: + return; + case 1: + D_800DC5BC = 1; + D_801625EC = 0xFF; + D_801625F4 = 0xFF; + D_801625F0 = 0xFF; + D_802B87B0 = 0x3E3; + D_802B87B4 = 0x3E8; + D_802B87D4 = 0x71C; + D_802B87D0 = 0xE38; + if ((gCCSelection != 0) && (gModeSelection != 1)) { + func_802AAA70(0x7000000); + func_802AAA70(0x7000098); + func_802AAA70(0x7000178); + func_802AAA70(0x7000280); + func_802AAA70(0x7000340); + func_802AAA70(0x70003C8); + } + func_80290CAC(&D_060072D0); + func_802B5CAC(0x238E, 0x31C7, &D_8015F590); + func_80295C6C(); + D_8015F8E4 = -80.0f; + return; + case 2: + func_80290CAC(&D_060093D8); + func_80295C6C(); + func_802AF8BC(0x7001350, 0x32, 0, 0, 0); + D_8015F8E4 = -50.0f; + return; + case 3: + D_800DC5BC = 1; + D_801625EC = 0; + D_801625F4 = 0; + D_801625F0 = 0; + func_80290CAC(&D_0600B458); + func_80295C6C(); + func_802AF8BC(0x7000878, -0x80, 0, 0, 0); + D_8015F8E4 = -80.0f; + return; + case 4: + func_802B5D64(&D_06016558, -0x38F0, 0x1C70, 1); + func_80290CAC(&D_06018240); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 5: + func_80290CAC(&D_060079A0); + func_80295C6C(); + D_8015F8E4 = -50.0f; + return; + case 6: + func_80290CAC(&D_06018FD8); + func_80295C6C(); + func_802AF8BC(0x700ADE0, -0x6A, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x700A540, -0x6A, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7009E70, -0x6A, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000358, -0x6A, 0xFF, 0xFF, 0xFF); + return; + case 7: + func_80290CAC(&D_0600DC28); + func_80295C6C(); + D_8015F8E4 = -60.0f; + return; + case 8: + func_80290CAC(&D_0600FF28); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 9: + func_80290CAC(&D_060144B8); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 10: + D_801625EC = 0x2B; + D_801625F4 = 0xD; + D_801625F0 = 4; + D_802B87B0 = 0x3E1; + D_802B87B4 = 0x3E8; + func_80290CAC(&D_06023B68); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 11: + func_80290CAC(&D_06023070); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 12: + func_80290CAC(&D_06009C20); + func_80295C6C(); + D_8015F8E4 = -18.0f; + func_802AF8BC(0x7001EB8, -0x4C, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7002308, -0x6A, 0xFF, 0xFF, 0xFF); + return; + case 13: + D_800DC5C8 = 1; + func_80290CAC(&D_06016440); + func_80295C6C(); + D_8015F8E4 = 0.0f; + func_802AF8BC(0x7002068, -0x6A, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7001E18, -0x6A, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7001318, -1, 0xFF, 0xFF, 0); + if (D_800DC50C != 9) { + func_802AF8BC(0x7001FB8, -0x6A, 0xFF, 0xFF, 0xFF); + return; + } + /* Duplicate return node #30. Try simplifying control flow for better match */ + return; + case 14: + func_80290CAC(&D_0600CC38); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + func_802AF8BC(0x7000C50, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000BD8, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000B60, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000AE8, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000CC8, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000D50, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000DD0, 0x64, 0xFF, 0xFF, 0xFF); + func_802AF8BC(0x7000E48, 0x64, 0xFF, 0xFF, 0xFF); + return; + case 15: + func_802AF5AC(0x70015C0, 1); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 16: + func_802AF5AC(0x7001110, 1); + func_802AF5AC(0x7000258, 1); + func_80295C6C(); + phi_f10 = -480.0f; + goto block_29; + case 17: + func_802AF5AC(0x7000738, 1); + func_80295C6C(); + D_8015F8E4 = D_8015F6EE - 10.0f; + return; + case 18: + func_80290CAC(&D_06014338); + func_80295C6C(); + D_8015F8E4 = D_802B94F4; + func_802AF8BC(0x7003FA8, 0x78, 0xFF, 0xFF, 0xFF); + return; + case 19: + func_802AF5AC(0x7001018, 6); + func_802AF5AC(0x7000450, 6); + func_802AF5AC(0x7000AC0, 6); + func_802AF5AC(0x7000B58, 6); + func_802AF5AC(0x7000230, 6); + func_80295C6C(); + phi_f10 = 100.0f; + goto block_29; + } +} #else GLOBAL_ASM("asm/non_matchings/code_80290C20/func_80295D88.s") #endif diff --git a/src/code_80296A50.c b/src/code_80296A50.c index e5c13a06b..b47a385f4 100644 --- a/src/code_80296A50.c +++ b/src/code_80296A50.c @@ -8,6 +8,13 @@ extern Camera *camera1; #ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000EE58(u16, void *, u16, s32); /* extern */ +? func_8029E854(void *, void *); /* extern */ +extern u16 D_8015F6FE; +extern u16 D_8015F900; +extern ? D_8015F9B8; + void func_80296A50(s32 arg0, s32 arg3) { void *sp1C; s16 temp_t3; @@ -29,68 +36,71 @@ void func_80296A50(s32 arg0, s32 arg3) { void *phi_a1_4; u16 phi_a2_6; s32 phi_a3; + temp_t1 = D_8015F900; - if ((s32) temp_t1 < 0x64) { + phi_a2 = temp_t1; + phi_a3 = arg3; + if (temp_t1 < 0x64) { phi_a1 = (temp_t1 * 0x70) + &D_8015F9B8; - phi_a2 = temp_t1; loop_2: if ((arg0 != phi_a1) && ((phi_a1->unk2 & 0xF) == 0) && (phi_a1->unk0 == 7)) { if (phi_a1->unk6 == 2) { sp1C = phi_a1; func_8000EE58(phi_a2, phi_a1, phi_a2, 2); } - D_8015F6FE = (u16) (D_8015F6FE - 1); + D_8015F6FE += -1; func_8029E854(phi_a1, phi_a1); return; } temp_a2 = phi_a2 + 1; phi_a1 += 0x70; - phi_a2 = (u16) temp_a2; + phi_a2 = temp_a2; if (temp_a2 >= 0x64) { goto block_10; } goto loop_2; } block_10: - phi_a2_3 = (s32) D_8015F900; - if ((s32) D_8015F900 < 0x64) { - phi_a1_2 = ((s32) D_8015F900 * 0x70) + &D_8015F9B8; - phi_a2_2 = (u16) (s32) D_8015F900; + phi_a2_2 = D_8015F900; + phi_a2_3 = D_8015F900; + if (D_8015F900 < 0x64) { + phi_a1_2 = (D_8015F900 * 0x70) + &D_8015F9B8; loop_12: - if ((arg0 != phi_a1_2) && ((phi_a1_2->unk2 & 0xF) == 0) && (phi_a1_2->unk0 == 8) && (temp_t3 = phi_a1_2->unk6, (((u32) (temp_t3 - 2) < 8U) != 0))) { - switch (temp_t3) { // switch 1 - case 2: // switch 1 - case 3: // switch 1 - case 4: // switch 1 - case 5: // switch 1 - case 8: // switch 1 - case 9: // switch 1 + if ((arg0 != phi_a1_2) && ((phi_a1_2->unk2 & 0xF) == 0) && (phi_a1_2->unk0 == 8)) { + temp_t3 = phi_a1_2->unk6; + switch (temp_t3) { /* switch 1 */ + case 2: /* switch 1 */ + case 3: /* switch 1 */ + case 4: /* switch 1 */ + case 5: /* switch 1 */ + case 8: /* switch 1 */ + case 9: /* switch 1 */ sp1C = phi_a1_2; func_8000EE58(phi_a2_2, phi_a1_2, phi_a2_2); - // fallthrough - case 7: // switch 1 - D_8015F6FE = (u16) (D_8015F6FE - 1); + /* fallthrough */ + case 7: /* switch 1 */ + D_8015F6FE += -1; func_8029E854(phi_a1_2, phi_a1_2); return; } } else { - default: // switch 1 + default: /* switch 1 */ temp_a2_2 = phi_a2_2 + 1; phi_a1_2 += 0x70; - phi_a2_2 = (u16) temp_a2_2; + phi_a2_2 = temp_a2_2; if (temp_a2_2 >= 0x64) { - phi_a2_3 = (s32) temp_t1; + phi_a2_3 = temp_t1; goto block_21; } goto loop_12; } } else { block_21: + phi_a2_4 = phi_a2_3; phi_a2_5 = phi_a2_3; - phi_a3 = arg3; if (phi_a2_3 < 0x64) { phi_a1_3 = (phi_a2_3 * 0x70) + &D_8015F9B8; - phi_a2_4 = (u16) phi_a2_3; + phi_a3 = 2; loop_23: if ((arg0 != phi_a1_3) && (phi_a1_3->unk0 == 7)) { temp_v0 = phi_a1_3->unk6; @@ -103,49 +113,49 @@ loop_23: sp1C = phi_a1_3; func_8000EE58(phi_a2_4, phi_a1_3, phi_a2_4, 2); block_29: - D_8015F6FE = (u16) (D_8015F6FE - 1); + D_8015F6FE += -1; func_8029E854(phi_a1_3, phi_a1_3); return; } block_30: temp_a2_3 = phi_a2_4 + 1; phi_a1_3 += 0x70; - phi_a2_4 = (u16) temp_a2_3; + phi_a2_4 = temp_a2_3; if (temp_a2_3 >= 0x64) { - phi_a2_5 = (s32) temp_t1; - phi_a3 = 2; + phi_a2_5 = temp_t1; goto block_32; } goto loop_23; } block_32: + phi_a2_6 = phi_a2_5; if (phi_a2_5 < 0x64) { phi_a1_4 = (phi_a2_5 * 0x70) + &D_8015F9B8; - phi_a2_6 = (u16) phi_a2_5; loop_34: - if ((arg0 != phi_a1_4) && (phi_a1_4->unk0 == 8) && (temp_t7 = phi_a1_4->unk6, (((u32) (temp_t7 - 2) < 8U) != 0))) { - switch (temp_t7) { // switch 2 - case 2: // switch 2 - case 3: // switch 2 - case 4: // switch 2 - case 5: // switch 2 - case 8: // switch 2 - case 9: // switch 2 + if ((arg0 != phi_a1_4) && (phi_a1_4->unk0 == 8)) { + temp_t7 = phi_a1_4->unk6; + switch (temp_t7) { /* switch 2 */ + case 2: /* switch 2 */ + case 3: /* switch 2 */ + case 4: /* switch 2 */ + case 5: /* switch 2 */ + case 8: /* switch 2 */ + case 9: /* switch 2 */ sp1C = phi_a1_4; func_8000EE58(phi_a2_6, phi_a1_4, phi_a2_6, phi_a3); - // fallthrough - case 7: // switch 2 - D_8015F6FE = (u16) (D_8015F6FE - 1); + /* fallthrough */ + case 7: /* switch 2 */ + D_8015F6FE += -1; func_8029E854(phi_a1_4, phi_a1_4); return; } } else { - default: // switch 2 + default: /* switch 2 */ temp_a2_4 = phi_a2_6 + 1; phi_a1_4 += 0x70; - phi_a2_6 = (u16) temp_a2_4; + phi_a2_6 = temp_a2_4; if (temp_a2_4 >= 0x64) { - // Duplicate return node #41. Try simplifying control flow for better match + /* Duplicate return node #41. Try simplifying control flow for better match */ return; } goto loop_34; @@ -157,9 +167,199 @@ loop_34: GLOBAL_ASM("asm/non_matchings/code_actors/func_80296A50.s") #endif -// +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80296A50(void *); /* extern */ +? func_802AAAAC(void *); /* extern */ +? func_802ADDC8(void *, f32, ?32, ?32, f32); /* extern */ +? func_802B5304(s32, s32); /* extern */ +? vec3f_copy(s32, s32); /* extern */ +extern u16 D_8015F6FE; +extern u16 D_802BA260; +static f32 D_802B95F0 = 1.925f; +static f32 D_802B95F4 = 0.35f; + +void func_80296D10(void *arg0, s32 arg2, s32 arg3, s16 arg4) { + void *sp2C; + f32 temp_f0; + u16 temp_v0; + void *temp_a0; + u16 phi_v0; + + vec3f_copy(arg0 + 0x18); + func_802B5304(arg0 + 0x10, arg2); + vec3f_copy(arg0 + 0x24, arg3); + arg0->unk2 = -0x8000; + arg0->unk4 = 0; + arg0->unk6 = 0; + temp_a0 = arg0 + 0x30; + arg0->unk0 = arg4; + arg0->unk8 = 0.0f; + arg0->unkC = 0.0f; + sp2C = temp_a0; + func_802AAAAC(temp_a0); + switch (arg4) { + case 37: + temp_v0 = D_802BA260; + phi_v0 = temp_v0; + if (temp_v0 >= 3) { + D_802BA260 = 0; + phi_v0 = 0 & 0xFFFF; + } + arg0->unk6 = phi_v0; + D_802BA260 += 1; + return; + case 9: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk2C = arg0->unk20 + 70.0f; + arg0->unk8 = 70.0f; + arg0->unkC = 20.0f; + arg0->unk24 = arg0->unk18; + arg0->unk28 = arg0->unk1C; + return; + case 45: + arg0->unk6 = 0; + arg0->unk10 = 0; + arg0->unk12 = 0; + arg0->unk14 = 0; + arg0->unkC = 2.0f; + return; + case 5: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unkC = 10.0f; + return; + case 15: + arg0->unk8 = 10.0f; + return; + case 6: + arg0->unk2 = arg0->unk2 | 0x5000; + arg0->unkC = 2.0f; + return; + case 7: + D_8015F6FE += 1; + arg0->unk4 = 0; + arg0->unkC = 4.0f; + arg0->unk2 = arg0->unk2 | 0x7000; + if (D_8015F6FE >= 0x15) { + func_80296A50(arg0); + return; + } + default: + return; + case 8: + D_8015F6FE += 1; + arg0->unk4 = 0; + arg0->unkC = 4.0f; + arg0->unk2 = arg0->unk2 | 0x7000; + if (D_8015F6FE >= 0x15) { + func_80296A50(arg0); + return; + } + /* Duplicate return node #30. Try simplifying control flow for better match */ + return; + case 2: + D_8015F6FE += 1; + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x43; + arg0->unkC = 3.0f; + arg0->unk8 = 20.0f; + return; + case 3: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x43; + arg0->unkC = 3.0f; + arg0->unk8 = 23.0f; + return; + case 4: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x43; + arg0->unkC = 3.0f; + arg0->unk8 = 17.0f; + return; + case 19: + arg0->unk6 = 0x43; + arg0->unk2 = -0x8000; + arg0->unkC = 3.0f; + arg0->unk8 = 17.0f; + return; + case 26: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x43; + arg0->unkC = 3.0f; + arg0->unk8 = 17.0f; + return; + case 28: + arg0->unk6 = 0x43; + arg0->unk2 = -0x8000; + arg0->unkC = 3.0f; + arg0->unk8 = 17.0f; + return; + case 33: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x43; + arg0->unkC = 3.0f; + arg0->unk8 = 17.0f; + return; + case 29: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x43; + arg0->unkC = 3.0f; + arg0->unk8 = 17.0f; + return; + case 30: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x19; + arg0->unkC = 3.0f; + arg0->unk8 = 7.0f; + return; + case 31: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x19; + arg0->unkC = 3.0f; + arg0->unk8 = 7.0f; + return; + case 32: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x19; + arg0->unkC = 3.0f; + arg0->unk8 = 7.0f; + return; + case 25: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x3C; + arg0->unkC = 3.0f; + arg0->unk8 = 13.0f; + return; + case 13: + temp_f0 = D_802B95F0; + arg0->unk2 = arg0->unk2 | 0x5000; + arg0->unkC = temp_f0; + arg0->unk8 = D_802B95F4; + func_802ADDC8(temp_a0, temp_f0, arg0->unk18, arg0->unk1C, arg0->unk20); + return; + case 43: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk4 = 0; + arg0->unk6 = 5; + arg0->unkC = 5.5f; + return; + case 12: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk4 = 0; + arg0->unk6 = 0; + arg0->unkC = 5.5f; + return; + case 10: + arg0->unk2 = arg0->unk2 | 0x4000; + arg0->unk6 = 0x1E; + arg0->unkC = 5.0f; + /* Duplicate return node #30. Try simplifying control flow for better match */ + return; + } +} +#else GLOBAL_ASM("asm/non_matchings/code_actors/func_80296D10.s") -// +#endif //#ifdef MIPS_TO_C // 801646F0 // 80161B68 @@ -205,9 +405,71 @@ void func_802972B8(Camera *arg0, Item *arg1) { //GLOBAL_ASM("asm/non_matchings/code_actors/func_802972B8.s") //#endif -// +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_802B4FF8(? *, ?); /* extern */ +? func_802B5520(? *, ? *); /* extern */ +extern ? D_0D001C20; +extern ? D_0D001C88; +extern s32 D_800DC50C; +extern ? D_8015F8D0; +extern s32 D_801625EC; +extern s32 D_801625F0; +extern s32 D_801625F4; +extern void *gDisplayListHead; +static u16 D_800DC5BC; /* type too large by 2; unable to generate initializer */ + +void func_80297340(void *arg0) { + ? sp38; + s16 sp36; + void *temp_v0; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + + sp36 = D_8015F8D0.unk8; + if ((D_800DC50C != 9) && (func_802B5520(&sp38, &D_8015F8D0), (func_802B4FF8(&sp38, 0) != 0))) { + if (sp36 < arg0->unk8) { + if (D_800DC5BC != 0) { + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->unk0 = 0xF8000000; + temp_v0->unk4 = (D_801625EC << 0x18) | ((D_801625F4 & 0xFF) << 0x10) | ((D_801625F0 & 0xFF) << 8) | 0xFF; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->unk0 = 0x6000000; + temp_v0_2->unk4 = &D_0D001C20; + return; + } + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->unk4 = 0xD001B90; + temp_v0_3->unk0 = 0x6000000; + return; + } + if (D_800DC5BC != 0) { + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->unk0 = 0xF8000000; + temp_v0_4->unk4 = (D_801625EC << 0x18) | ((D_801625F4 & 0xFF) << 0x10) | ((D_801625F0 & 0xFF) << 8) | 0xFF; + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->unk0 = 0x6000000; + temp_v0_5->unk4 = &D_0D001C88; + return; + } + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->unk4 = 0xD001BD8; + temp_v0_6->unk0 = 0x6000000; + /* Duplicate return node #9. Try simplifying control flow for better match */ + } +} +#else GLOBAL_ASM("asm/non_matchings/code_actors/func_80297340.s") -// +#endif void func_802976D8(struct UnkStruct_802976D8 *arg0) { arg0->unk0 = 0x4000; @@ -362,15 +624,63 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_802979F8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_80297A50: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_802B4FF8(void *, ?); /* extern */ +f32 func_802B80D0(void *, u16, ?, f32, f32); /* extern */ +extern ? D_06013C00; +extern ? D_06013CA0; +extern ? D_06013D20; +extern ? D_06013DA0; +extern ? D_06013E20; +extern ? D_80150130; -Unable to determine jump table for jr instruction at func_80297A50.s line 48. +void func_80297A50(Camera *camera, void *arg1, void *arg2) { + Gfx *temp_v0; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + u16 temp_t0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (!(func_802B80D0(arg2 + 0x18, camera->rotX2, 0, *(&D_80150130 + (((camera - camera1) / 184) * 4)), D_802B95F8) < 0.0f) && (arg1->unk30 = arg2->unk18, arg1->unk34 = arg2->unk1C, arg1->unk38 = arg2->unk20, (func_802B4FF8(arg1, 0) != 0))) { + temp_t0 = arg2->unk6; + switch (temp_t0) { + case 0: + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w0 = 0x6000000; + temp_v0->words.w1 = &D_06013C00; + return; + case 1: + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w0 = 0x6000000; + temp_v0_2->words.w1 = &D_06013CA0; + return; + case 2: + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w0 = 0x6000000; + temp_v0_3->words.w1 = &D_06013D20; + return; + case 3: + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w0 = 0x6000000; + temp_v0_4->words.w1 = &D_06013DA0; + return; + case 4: + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w0 = 0x6000000; + temp_v0_5->words.w1 = &D_06013E20; + /* Duplicate return node #9. Try simplifying control flow for better match */ + return; + } + } else { + default: + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_80297A50.s") #endif @@ -819,15 +1129,160 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_80298328.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802986B4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C98B8(? *, ? *, ?); /* extern */ +? func_800C99E0(? *, ?); /* extern */ +s32 func_802B4FF8(void *, ?); /* extern */ +extern ? D_06013C00; +extern ? D_06013CA0; +extern ? D_06013D20; +extern ? D_06013DA0; +extern ? D_06013E20; +extern ? D_06014200; +extern ? D_80150130; +extern ? D_8015F708; +static ? D_802B91C8; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_802986B4.s line 145. +void func_802986B4(Camera *camera, void *arg1, void *arg2) { + s16 *sp9C; + f32 sp90; + f32 sp8C; + f32 sp88; + Gfx *temp_v0; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + f32 *temp_a1; + f32 temp_f0; + s16 *temp_t1; + s16 temp_v0_9; + u16 temp_s1; + u16 temp_t4; + u16 temp_v0_10; + s16 phi_v0; + s16 *phi_s1; + Gfx *phi_v0_2; + s16 *phi_s5; + s16 *phi_t1; + s16 *phi_s5_2; + s16 *phi_s5_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t1 = gSegmentTable[&D_06014200 >> 0x18] + (&D_06014200 & 0xFFFFFF) + 0x80000000; + D_8015F704 = D_802B962C; + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = -1; + temp_v0->words.w0 = 0xBB000001; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w1 = -0xC07; + temp_v0_2->words.w0 = 0xFC127E24; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w1 = 0x553078; + temp_v0_3->words.w0 = 0xB900031D; + phi_s1 = temp_t1; + phi_s5 = NULL; + phi_t1 = temp_t1; + phi_s5_3 = NULL; + if (*temp_t1 != -0x8000) { + sp9C = temp_t1; + phi_v0 = *temp_t1; +loop_2: + temp_a1 = &sp88; + sp88 = phi_v0 * gCourseDirection; + sp8C = phi_s1->unk2; + sp90 = phi_s1->unk4; + temp_f0 = func_802B80D0(camera, temp_a1, camera->rotX2, 0.0f, *(&D_80150130 + (((camera - camera1) / 184) * 4)), D_802B9630); + phi_s5_2 = phi_s5_3; + phi_s5_2 = phi_s5_3; + if (temp_f0 > 0.0f) { + if (temp_f0 < D_8015F704) { + D_8015F704 = temp_f0; + phi_s5_2 = phi_s1; + } + arg1->unk30 = sp88; + arg1->unk34 = sp8C; + arg1->unk38 = sp90; + if ((D_80150112 < 0x80) && (func_802B4FF8(arg1, 0) != 0)) { + temp_t4 = phi_s1->unk6; + switch (temp_t4) { + case 0: + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w1 = &D_06013C00; + phi_v0_2 = temp_v0_4; +block_14: + phi_v0_2->words.w0 = 0x6000000; + break; + case 1: + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = &D_06013CA0; + phi_v0_2 = temp_v0_5; + goto block_14; + case 2: + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w1 = &D_06013D20; + phi_v0_2 = temp_v0_6; + goto block_14; + case 3: + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w1 = &D_06013DA0; + phi_v0_2 = temp_v0_7; + goto block_14; + case 4: + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w1 = &D_06013E20; + phi_v0_2 = temp_v0_8; + goto block_14; + } + goto block_15; + } + /* Duplicate return node #24. Try simplifying control flow for better match */ + return; + } +block_15: + temp_v0_9 = phi_s1->unk8; + phi_v0 = temp_v0_9; + phi_s1 += 8; + phi_s5 = phi_s5_2; + phi_s5_3 = phi_s5_2; + if (temp_v0_9 == -0x8000) { + phi_t1 = sp9C; + goto block_17; + } + goto loop_2; + } +block_17: + if ((camera == camera1) && (phi_s5 != 0)) { + temp_v0_10 = D_8015F700; + if (temp_v0_10 == 0) { + temp_s1 = ((phi_s5 - phi_t1) >> 3) & 0xFFFF; + if ((D_8015F702 != temp_s1) && (D_8015F704 < D_802B9648)) { + func_800C99E0(&D_8015F708, 0x1901904D); + D_8015F708.unk0 = phi_s5->unk0 * gCourseDirection; + D_8015F708.unk4 = phi_s5->unk2; + D_8015F708.unk8 = phi_s5->unk4; + D_8015F702 = temp_s1; + func_800C98B8(&D_8015F708, &D_802B91C8, 0x1901904D); + D_8015F700 = 0xF0; + return; + } + /* Duplicate return node #24. Try simplifying control flow for better match */ + return; + } + D_8015F700 = temp_v0_10 - 1; + /* Duplicate return node #24. Try simplifying control flow for better match */ + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_802986B4.s") #endif @@ -2223,15 +2678,98 @@ GLOBAL_ASM("asm/non_matchings/code_actors/update_obj_mario_raceway_sign.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029AC18: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_802B4FF8(void *, ?); /* extern */ +f32 func_802B80D0(void *, u16, ?, f32, f32); /* extern */ +extern ? D_0D001750; +extern ? D_0D001780; +extern ? D_0D001798; +extern ? D_0D0017B0; +extern ? D_0D0017C8; +extern ? D_0D0017E0; +extern ? D_0D0017F8; +extern ? D_0D001810; +extern ? D_0D001828; +extern ? D_80150130; -Unable to determine jump table for jr instruction at func_8029AC18.s line 59. +void func_8029AC18(Camera *camera, void *arg1, void *arg2) { + Gfx *temp_v0; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; + u16 temp_t2; + Gfx *phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + if (!(func_802B80D0(arg2 + 0x18, camera->rotX2, 0, *(&D_80150130 + (((camera - camera1) / 184) * 4)), D_802B96B8) < 0.0f)) { + arg1->unk30 = arg2->unk18; + arg1->unk34 = arg2->unk1C - arg2->unkC; + arg1->unk38 = arg2->unk20; + if (func_802B4FF8(arg1, 0) != 0) { + temp_v0 = gDisplayListHead; + gDisplayListHead = temp_v0 + 8; + temp_v0->words.w1 = &D_0D001750; + temp_v0->words.w0 = 0x6000000; + temp_t2 = arg2->unk6; + switch (temp_t2) { + case 0: + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->words.w1 = &D_0D001780; + phi_v0 = temp_v0_2; +block_12: + phi_v0->words.w0 = 0x6000000; + break; + case 1: + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->words.w1 = &D_0D001798; + phi_v0 = temp_v0_3; + goto block_12; + case 2: + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->words.w1 = &D_0D0017B0; + phi_v0 = temp_v0_4; + goto block_12; + case 3: + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->words.w1 = &D_0D0017C8; + phi_v0 = temp_v0_5; + goto block_12; + case 4: + temp_v0_6 = gDisplayListHead; + gDisplayListHead = temp_v0_6 + 8; + temp_v0_6->words.w1 = &D_0D0017E0; + phi_v0 = temp_v0_6; + goto block_12; + case 5: + temp_v0_7 = gDisplayListHead; + gDisplayListHead = temp_v0_7 + 8; + temp_v0_7->words.w1 = &D_0D0017F8; + phi_v0 = temp_v0_7; + goto block_12; + case 6: + temp_v0_8 = gDisplayListHead; + gDisplayListHead = temp_v0_8 + 8; + temp_v0_8->words.w1 = &D_0D001810; + phi_v0 = temp_v0_8; + goto block_12; + case 7: + temp_v0_9 = gDisplayListHead; + gDisplayListHead = temp_v0_9 + 8; + temp_v0_9->words.w1 = &D_0D001828; + phi_v0 = temp_v0_9; + goto block_12; + } + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_8029AC18.s") #endif @@ -3685,15 +4223,121 @@ GLOBAL_ASM("asm/non_matchings/code_actors/update_obj_falling_rocks.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function place_segment_06: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802976D8(void *); /* extern */ +? func_802976EC(void *, void *); /* extern */ +s32 func_8029EC88(f32 *, s16 *, ? *, s16); /* extern */ +f32 func_802ABE30(?32, f32, ?32, u16); /* extern */ +? func_802ADDC8(void *, ?, ?32, f32, ?32); /* extern */ +? load_giant_egg(? *, f32, f32, f32); /* extern */ +extern s32 D_800DC50C; +extern ? D_8015F9B8; +extern f32 gCourseDirection; +extern ? gSegmentTable; +static u16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ -Unable to determine jump table for jr instruction at place_segment_06.s line 73. +void place_segment_06(u32 arg0) { + f32 sp94; + f32 sp90; + f32 sp8C; + ? sp80; + s16 sp7C; + s16 sp7A; + s16 sp78; + s16 sp74; + s16 *temp_s3; + s16 temp_v0; + s16 temp_v0_2; + s16 temp_v0_3; + s16 temp_v0_4; + u16 temp_t3; + void *temp_s0; + void *temp_s1; + s16 phi_v0; + s16 *phi_s3; + s16 phi_s2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s3 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000; + load_giant_egg(&sp80, 0.0f, 0.0f, 0.0f); + sp78 = 0x4000; + sp7A = 0; + sp7C = 0; + temp_v0 = *temp_s3; + phi_v0 = temp_v0; + if (temp_v0 != -0x8000) { + phi_s3 = temp_s3; + phi_s2 = sp74; + do { + temp_t3 = gCurrentCourseId; + sp8C = (f32) phi_v0 * gCourseDirection; + sp94 = (f32) phi_s3->unk4; + sp90 = (f32) phi_s3->unk2; + switch (temp_t3) { + case 0: + phi_s2 = 2; + break; + case 2: + phi_s2 = 0x21; + break; + case 4: + phi_s2 = 3; + break; + case 5: + phi_s2 = 0x1D; + break; + case 7: + temp_v0_2 = phi_s3->unk6; + if (temp_v0_2 != 6) { + if (temp_v0_2 != 7) { + + } else { + phi_s2 = 4; + } + } else { + phi_s2 = 0x1C; + } + break; + case 8: + phi_s2 = 0x1A; + break; + case 9: + phi_s2 = 0x13; + break; + case 11: + temp_v0_3 = phi_s3->unk6; + if (temp_v0_3 != 5) { + if (temp_v0_3 != 6) { + if (temp_v0_3 != 7) { + + } else { + phi_s2 = 0x20; + } + } else { + phi_s2 = 0x1F; + } + } else { + phi_s2 = 0x1E; + } + break; + } + temp_s0 = &D_8015F9B8 + (func_8029EC88(&sp8C, &sp78, &sp80, phi_s2) * 0x70); + if (D_800DC50C == 9) { + func_802976D8(temp_s0 + 0x10); + } else { + temp_s1 = temp_s0 + 0x30; + func_802ADDC8(temp_s1, 0x40A00000, temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20); + if (temp_s0->unk44 < 0.0f) { + temp_s0->unk1C = func_802ABE30(temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20, temp_s0->unk3A); + } + func_802976EC(temp_s1, temp_s0 + 0x10); + } + temp_v0_4 = phi_s3->unk8; + phi_v0 = temp_v0_4; + phi_s3 += 8; + } while (temp_v0_4 != -0x8000); + sp74 = phi_s2; + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/place_segment_06.s") #endif @@ -3841,29 +4485,388 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DAB8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029DB44: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80298D10(); /* extern */ +? func_8029D9F8(); /* extern */ +s32 func_8029EC88(f32 *, ? *, ? *, ?); /* extern */ +? func_802A14BC(f32, ?, ?); /* extern */ +? func_802B52BC(? *, ?, ?, ?); /* extern */ +? load_giant_egg(f32 *, ?, ?, ?); /* extern */ +? place_all_item_boxes(? *); /* extern */ +? place_falling_rocks(? *); /* extern */ +? place_palm_trees(? *); /* extern */ +? place_piranha_plants(? *); /* extern */ +? place_segment_06(? *); /* extern */ +extern ? D_06000028; +extern ? D_06000038; +extern ? D_06000058; +extern ? D_06000080; +extern ? D_06007230; +extern ? D_06007250; +extern ? D_06007718; +extern ? D_06007810; +extern ? D_06009290; +extern ? D_06009370; +extern ? D_06009498; +extern ? D_06009518; +extern ? D_06009570; +extern ? D_06009B80; +extern ? D_0600B3D0; +extern ? D_0600CB40; +extern ? D_0600D9F0; +extern ? D_0600DA78; +extern ? D_0600DB80; +extern ? D_0600FDE8; +extern ? D_0600FE80; +extern ? D_06013EC0; +extern ? D_06014330; +extern ? D_060143E0; +extern ? D_06016338; +extern ? D_060180A0; +extern ? D_06018110; +extern ? D_06018E78; +extern ? D_06018F70; +extern ? D_06022E88; +extern ? D_06022F08; +extern ? D_06023AE0; +extern u16 D_80150110; +extern u16 D_8015F900; +extern ? D_8015F9B8; +extern ? D_8015F9BE; +extern f32 gCourseDirection; +extern s32 gPlayerCountSelection1; +static ? D_802B8850; /* unable to generate initializer */ +static ? D_802B885C; /* unable to generate initializer */ +static u16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8029DB44.s line 30. +void func_8029DB44(void) { + f32 sp40; + ? sp34; + ? sp2C; + f32 *temp_a0; + f32 *temp_a0_10; + f32 *temp_a0_2; + f32 *temp_a0_3; + f32 *temp_a0_4; + f32 *temp_a0_5; + f32 *temp_a0_6; + f32 *temp_a0_7; + f32 *temp_a0_8; + f32 *temp_a0_9; + u16 temp_t9; + void *temp_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp34.unk0 = D_802B8850.unk0; + sp34.unk4 = D_802B8850.unk4; + sp34.unk8 = D_802B8850.unk8; + sp2C.unk0 = D_802B885C.unk0; + sp2C.unk4 = D_802B885C.unk4; + temp_t9 = gCurrentCourseId; + D_8015F900 = 0; + switch (temp_t9) { + case 0: + place_segment_06(&D_06009570); + place_piranha_plants(&D_06009518); + place_all_item_boxes(&D_06009498); + load_giant_egg(&sp40, 0x43160000, 0x42200000, 0xC4A28000); + temp_a0 = &sp40; + sp40 *= gCourseDirection; + func_8029EC88(temp_a0, &sp2C, &sp34, 0x17); + load_giant_egg(&sp40, 0x451D8000, 0, 0x449B0000); + temp_a0_2 = &sp40; + sp40 *= gCourseDirection; + temp_v1 = (func_8029EC88(temp_a0_2, &sp2C, &sp34, 0x17) * 0x70) + &D_8015F9B8; + temp_v1->unk2 = temp_v1->unk2 | 0x4000; + break; + case 1: + place_all_item_boxes(&D_06007250); + place_falling_rocks(&D_06007230); + break; + case 2: + place_segment_06(&D_06009290); + place_all_item_boxes(&D_06009370); + break; + case 3: + place_all_item_boxes(&D_0600B3D0); + break; + case 4: + place_segment_06(&D_060180A0); + place_all_item_boxes(&D_06018110); + load_giant_egg(&sp40, 0xC50FC000, 0, 0x441E8000); + temp_a0_3 = &sp40; + sp40 *= gCourseDirection; + func_8029EC88(temp_a0_3, &sp2C, &sp34, 9); + break; + case 5: + place_segment_06(&D_06007718); + place_all_item_boxes(&D_06007810); + break; + case 6: + func_802A14BC(328.0f * gCourseDirection, 0x428C0000, 0x451ED000); + place_all_item_boxes(&D_06018E78); + place_palm_trees(&D_06018F70); + break; + case 7: + place_segment_06(&D_0600DA78); + place_all_item_boxes(&D_0600DB80); + place_piranha_plants(&D_0600D9F0); + break; + case 8: + place_segment_06(&D_0600FE80); + place_all_item_boxes(&D_0600FDE8); + break; + case 9: + if (gPlayerCountSelection1 != 4) { + place_segment_06(&D_06014330); + } + place_all_item_boxes(&D_060143E0); + break; + case 10: + place_all_item_boxes(&D_06023AE0); + break; + case 11: + place_segment_06(&D_06022F08); + place_all_item_boxes(&D_06022E88); + load_giant_egg(&sp40, 0xC4D20000, 0x40000000, 0x420C0000); + temp_a0_4 = &sp40; + sp40 *= gCourseDirection; + *(&D_8015F9BE + (func_8029EC88(temp_a0_4, &sp2C, &sp34, 0x27) * 0x70)) = 1; + load_giant_egg(&sp40, 0xC4C80000, 0x40000000, 0x420C0000); + temp_a0_5 = &sp40; + sp40 *= gCourseDirection; + *(&D_8015F9BE + (func_8029EC88(temp_a0_5, &sp2C, &sp34, 0x27) * 0x70)) = 1; + func_802B52BC(&sp2C, 0, -0x2000, 0); + load_giant_egg(&sp40, 0xC519B000, 0x40000000, 0x450D7000); + temp_a0_6 = &sp40; + sp40 *= gCourseDirection; + *(&D_8015F9BE + (func_8029EC88(temp_a0_6, &sp2C, &sp34, 0x27) * 0x70)) = 0; + load_giant_egg(&sp40, 0xC51A3000, 0x40000000, 0x45147000); + temp_a0_7 = &sp40; + sp40 *= gCourseDirection; + *(&D_8015F9BE + (func_8029EC88(temp_a0_7, &sp2C, &sp34, 0x27) * 0x70)) = 0; + break; + case 12: + place_all_item_boxes(&D_06009B80); + break; + case 13: + place_all_item_boxes(&D_06016338); + break; + case 14: + place_all_item_boxes(&D_0600CB40); + load_giant_egg(&sp40, 0xC3030000, 0x42A60000, 0x438F0000); + temp_a0_8 = &sp40; + sp40 *= gCourseDirection; + func_8029EC88(temp_a0_8, &sp2C, &sp34, 0x23); + load_giant_egg(&sp40, 0xC5131000, 0x42900000, 0xC4C90000); + temp_a0_9 = &sp40; + sp40 *= gCourseDirection; + func_8029EC88(temp_a0_9, &sp2C, &sp34, 0x23); + load_giant_egg(&sp40, 0xC523E000, 0x429E0000, 0x4438C000); + temp_a0_10 = &sp40; + sp40 *= gCourseDirection; + func_8029EC88(temp_a0_10, &sp2C, &sp34, 0x23); + break; + case 15: + place_all_item_boxes(&D_06000038); + break; + case 16: + place_all_item_boxes(&D_06000080); + break; + case 17: + place_all_item_boxes(&D_06000028); + break; + case 18: + place_all_item_boxes(&D_06013EC0); + func_8029D9F8(); + func_80298D10(); + break; + case 19: + place_all_item_boxes(&D_06000058); + break; + } + D_8015F900 = D_80150110; +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DB44.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029E158: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800122D8(); /* extern */ +? func_80297818(); /* extern */ +? func_8029DAB8(); /* extern */ +? func_8029DB44(); /* extern */ +s32 func_802A84F4(? *, ?, ?); /* extern */ +? set_segment_base_addr(?, s32); /* extern */ +extern ? D_0F04CBE0; +extern ? D_0F04CE30; +extern ? D_0F04D080; +extern ? D_0F04D2D8; +extern ? D_0F04D538; +extern ? D_0F04D790; +extern ? D_0F04D9FC; +extern ? D_0F04DC5C; +extern ? D_0F04DEB0; +extern ? D_0F04E0DC; +extern ? D_0F04E314; +extern ? D_0F04E554; +extern ? D_0F04E798; +extern ? D_0F04E9F0; +extern ? D_0F04EC4C; +extern ? D_0F04EE88; +extern ? D_0F04F45C; +extern ? D_0F04F7A4; +extern ? D_0F04FB3C; +extern ? D_0F04FE28; +extern ? D_0F050118; +extern ? D_0F050468; +extern ? D_0F050678; +extern ? D_0F050D50; +extern ? D_0F0513CC; +extern ? D_0F051820; +extern ? D_0F051C54; +extern ? D_0F051FD8; +extern ? D_0F05232C; +extern ? D_0F0526B8; +extern ? D_0F052A20; +extern ? D_0F052D3C; +extern ? D_0F05300C; +extern ? D_0F0532F8; +extern ? D_0F05363C; +extern ? D_0F053950; +extern ? D_0F053C34; +extern ? D_0F053F74; +extern ? D_0F054270; +extern ? D_0F054518; +extern ? D_0F05488C; +extern ? D_0F054C3C; +extern ? D_0F054ECC; +extern ? D_0F0551C8; +extern ? D_0F0554CC; +extern ? D_0F055880; +extern ? D_0F055BA0; +extern ? D_0F055F10; +extern ? D_0F0561AC; +extern ? D_0F056408; +extern ? D_0F05662C; +extern ? D_0F05688C; +extern ? D_0F056AD0; +extern ? D_0F056CF0; +extern ? D_0F056EC8; +extern ? D_0F057084; +extern ? D_0F057288; +extern ? D_0F057590; +extern ? D_0F057EB4; +extern ? D_0F0581E4; +extern ? D_0F058550; +extern ? gTexture671A88; +extern ? gTexture6774D8; +extern ? gTextureShrub; +u16 gCurrentCourseId; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_8029E158.s line 150. +void func_8029E158(void) { + u16 temp_t6; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + set_segment_base_addr(3, gPrevLoadedAddress); + D_802BA050 = func_802A84F4(&D_0F04CBE0, 0x257, 0x400); + func_802A84F4(&D_0F04CE30, 0x242, 0x400); + func_802A84F4(&D_0F04D080, 0x259, 0x400); + func_802A84F4(&D_0F04D2D8, 0x256, 0x400); + func_802A84F4(&D_0F04D538, 0x246, 0x400); + func_802A84F4(&D_0F04D790, 0x25E, 0x400); + func_802A84F4(&D_0F04D9FC, 0x25C, 0x400); + func_802A84F4(&D_0F04DC5C, 0x254, 0x400); + D_802BA054 = func_802A84F4(&D_0F04DEB0, 0x22A, 0x400); + func_802A84F4(&D_0F04E0DC, 0x237, 0x400); + func_802A84F4(&D_0F04E314, 0x23E, 0x400); + func_802A84F4(&D_0F04E554, 0x243, 0x400); + func_802A84F4(&D_0F04E798, 0x255, 0x400); + func_802A84F4(&D_0F04E9F0, 0x259, 0x400); + func_802A84F4(&D_0F04EC4C, 0x239, 0x400); + func_802A84F4(&D_0F04EE88, 0x236, 0x400); + func_802A84F4(&D_0F054C3C, 0x28E, 0x800); + func_802A84F4(&D_0F054ECC, 0x2FB, 0x800); + func_802A84F4(&D_0F0551C8, 0x302, 0x800); + func_802A84F4(&D_0F0554CC, 0x3B4, 0x800); + func_802A84F4(&D_0F055880, 0x31E, 0x800); + func_802A84F4(&D_0F055BA0, 0x36E, 0x800); + func_802A84F4(&D_0F055F10, 0x29C, 0x800); + func_802A84F4(&D_0F0561AC, 0x25B, 0x800); + func_802A84F4(&gTexture671A88, 0x400, 0x800); + func_802A84F4(&gTexture6774D8, 0x400, 0x800); + temp_t6 = gCurrentCourseId; + switch (temp_t6) { + case 0: + func_802A84F4(&D_0F04F45C, 0x35B, 0x800); + D_802BA058 = func_802A84F4(&D_0F056408, 0x3E8, 0x800); + func_802A84F4(&D_0F05662C, 0x3E8, 0x800); + func_802A84F4(&D_0F05688C, 0x3E8, 0x800); + func_802A84F4(&D_0F056AD0, 0x3E8, 0x800); + func_802A84F4(&D_0F056CF0, 0x3E8, 0x800); + func_802A84F4(&D_0F056EC8, 0x3E8, 0x800); + func_802A84F4(&D_0F057084, 0x3E8, 0x800); + func_802A84F4(&D_0F057288, 0x3E8, 0x800); + func_802A84F4(&D_0F057590, 0x3E8, 0x800); + break; + case 2: + func_802A84F4(&gTextureShrub, 0x3FF, 0x800); + break; + case 4: + func_802A84F4(&D_0F04F7A4, 0x3E8, 0x800); + break; + case 5: + func_802A84F4(&D_0F0513CC, 0x454, 0x800); + func_802A84F4(&D_0F051820, 0x432, 0x800); + break; + case 7: + func_802A84F4(&D_0F04FB3C, 0x3E8, 0x800); + func_802A84F4(&D_0F050D50, 0x3E8, 0x800); + D_802BA058 = func_802A84F4(&D_0F056408, 0x3E8, 0x800); + func_802A84F4(&D_0F05662C, 0x3E8, 0x800); + func_802A84F4(&D_0F05688C, 0x3E8, 0x800); + func_802A84F4(&D_0F056AD0, 0x3E8, 0x800); + func_802A84F4(&D_0F056CF0, 0x3E8, 0x800); + func_802A84F4(&D_0F056EC8, 0x3E8, 0x800); + func_802A84F4(&D_0F057084, 0x3E8, 0x800); + func_802A84F4(&D_0F057288, 0x3E8, 0x800); + func_802A84F4(&D_0F057590, 0x3E8, 0x800); + break; + case 8: + func_802A84F4(&D_0F050468, 0x3E8, 0x800); + func_802A84F4(&D_0F050678, 0x3E8, 0x800); + break; + case 9: + func_802A84F4(&D_0F04FE28, 0x3E8, 0x800); + func_802A84F4(&D_0F050118, 0x3E8, 0x800); + func_802A84F4(&D_0F051C54, 0x400, 0x800); + func_802A84F4(&D_0F051FD8, 0x400, 0x800); + func_802A84F4(&D_0F05232C, 0x400, 0x800); + func_802A84F4(&D_0F0526B8, 0x400, 0x800); + func_802A84F4(&D_0F052A20, 0x400, 0x800); + func_802A84F4(&D_0F052D3C, 0x400, 0x800); + func_802A84F4(&D_0F05300C, 0x400, 0x800); + func_802A84F4(&D_0F0532F8, 0x400, 0x800); + func_802A84F4(&D_0F05363C, 0x400, 0x800); + func_802A84F4(&D_0F053950, 0x400, 0x800); + break; + case 11: + func_802A84F4(&D_0F053C34, 0x33E, 0x800); + func_802A84F4(&D_0F053F74, 0x2FB, 0x800); + func_802A84F4(&D_0F054270, 0x2A8, 0x800); + func_802A84F4(&D_0F054518, 0x374, 0x800); + func_802A84F4(&D_0F05488C, 0x3AF, 0x800); + break; + case 18: + func_802A84F4(&D_0F057EB4, 0x32F, 0x400); + func_802A84F4(&D_0F0581E4, 0x369, 0x400); + func_802A84F4(&D_0F058550, 0x364, 0x400); + break; + } + func_80297818(); + func_8029DAB8(); + func_8029DB44(); + func_800122D8(); +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E158.s") #endif @@ -3908,15 +4911,174 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E854.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029E890: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000EE58(s16, s32, s32, s32); /* extern */ +? func_80296D10(void *, s32, s32, s32, s32); /* extern */ +? func_8029E7DC(void *, s32, s32, s32); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at func_8029E890.s line 186. +s16 func_8029E890(s32 arg0, s32 arg1, s32 arg2, s16 arg3) { + s16 temp_t4; + s16 temp_t4_2; + s16 temp_v0; + s16 temp_v0_2; + s16 temp_v0_3; + s16 temp_v0_4; + s16 temp_v0_5; + s16 temp_v0_6; + s16 temp_v0_7; + s16 temp_v0_8; + s32 temp_s1; + s32 temp_s1_2; + u16 temp_t3; + void *phi_s0; + s16 phi_s1; + void *phi_s0_2; + s16 phi_s1_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t3 = D_8015F900; + phi_s1 = temp_t3; + if (temp_t3 < 0x64) { + phi_s0 = (temp_t3 * 0x70) + &D_8015F9B8; +loop_2: + if ((phi_s0->unk2 & 0xF) == 0) { + temp_v0 = phi_s0->unk0; + if (temp_v0 != 6) { + if (temp_v0 != 7) { + if (temp_v0 != 8) { + if (temp_v0 != 0xD) { + goto block_24; + } + temp_v0_2 = phi_s0->unk6; + if ((temp_v0_2 == 1) || (temp_v0_2 == 2)) { + func_8029E7DC(phi_s0, 2, 6, 8); + func_80296D10(phi_s0, arg0, arg1, arg2, arg3); + return phi_s1; + } + goto block_24; + } + temp_t4 = phi_s0->unk6; + switch (temp_t4) { /* switch 1 */ + case 2: /* switch 1 */ + case 3: /* switch 1 */ + case 4: /* switch 1 */ + case 5: /* switch 1 */ + case 8: /* switch 1 */ + case 9: /* switch 1 */ + func_8000EE58(phi_s1, 2, 6, 8); + /* fallthrough */ + case 7: /* switch 1 */ + func_8029E7DC(phi_s0); + func_80296D10(phi_s0, arg0, arg1, arg2, arg3); + return phi_s1; + } + } else { + temp_v0_3 = phi_s0->unk6; + if (temp_v0_3 != 2) { + if (temp_v0_3 != 7) { + goto block_24; + } + goto block_16; + } + func_8000EE58(phi_s1, 2, 6, 8); +block_16: + func_8029E7DC(phi_s0); + func_80296D10(phi_s0, arg0, arg1, arg2, arg3); + return phi_s1; + } + } else { + temp_v0_4 = phi_s0->unk6; + if ((temp_v0_4 == 1) || (temp_v0_4 == 4) || (temp_v0_4 == 5)) { + func_8029E7DC(phi_s0, 2, 6, 8); + func_80296D10(phi_s0, arg0, arg1, arg2, arg3); + return phi_s1; + } + goto block_24; + } + } else { + default: /* switch 1 */ +block_24: + temp_s1 = phi_s1 + 1; + phi_s0 += 0x70; + phi_s1 = temp_s1; + if (temp_s1 >= 0x64) { + goto block_26; + } + goto loop_2; + } + } else { +block_26: + phi_s1_2 = D_8015F900; + if (D_8015F900 < 0x64) { + phi_s0_2 = (D_8015F900 * 0x70) + &D_8015F9B8; +loop_28: + temp_v0_5 = phi_s0_2->unk0; + if (temp_v0_5 != 6) { + if (temp_v0_5 != 7) { + if (temp_v0_5 != 8) { + if (temp_v0_5 != 0xD) { + goto block_49; + } + temp_v0_6 = phi_s0_2->unk6; + if ((temp_v0_6 == 1) || (temp_v0_6 == 2)) { + func_8029E7DC(phi_s0_2, 2, 6, 8); + func_80296D10(phi_s0_2, arg0, arg1, arg2, arg3); + return phi_s1_2; + } + goto block_49; + } + temp_t4_2 = phi_s0_2->unk6; + switch (temp_t4_2) { /* switch 2 */ + case 2: /* switch 2 */ + case 3: /* switch 2 */ + case 4: /* switch 2 */ + case 5: /* switch 2 */ + case 8: /* switch 2 */ + case 9: /* switch 2 */ + func_8000EE58(phi_s1_2, 2, 6, 8); + /* fallthrough */ + case 7: /* switch 2 */ + func_8029E7DC(phi_s0_2); + func_80296D10(phi_s0_2, arg0, arg1, arg2, arg3); + return phi_s1_2; + } + } else { + temp_v0_7 = phi_s0_2->unk6; + if (temp_v0_7 != 2) { + if (temp_v0_7 != 7) { + goto block_49; + } + goto block_41; + } + func_8000EE58(phi_s1_2, 2, 6, 8); +block_41: + func_8029E7DC(phi_s0_2); + func_80296D10(phi_s0_2, arg0, arg1, arg2, arg3); + return phi_s1_2; + } + } else { + temp_v0_8 = phi_s0_2->unk6; + if ((temp_v0_8 == 1) || (temp_v0_8 == 4) || (temp_v0_8 == 5)) { + func_8029E7DC(phi_s0_2, 2, 6, 8); + func_80296D10(phi_s0_2, arg0, arg1, arg2, arg3); + return phi_s1_2; + } + default: /* switch 2 */ +block_49: + temp_s1_2 = phi_s1_2 + 1; + phi_s0_2 += 0x70; + phi_s1_2 = temp_s1_2; + if (temp_s1_2 >= 0x64) { + goto block_50; + } + goto loop_28; + } + } else { +block_50: + return -1; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E890.s") #endif @@ -4516,15 +5678,156 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_8029FCA4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_8029FDC8: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000EE58(s32); /* extern */ +? func_800C9EF4(void *, ?, void *, s16); /* extern */ +? func_802B02B4(void *, ?, void *, s16); /* extern */ +? func_802B0570(void *); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at func_8029FDC8.s line 29. +void func_8029FDC8(void *arg0) { + s16 temp_t7; + s16 temp_v0; + s16 temp_v1; + s16 temp_v1_2; + s16 temp_v1_3; + s32 temp_f18; + u16 temp_t6; + void *temp_a0; + void *temp_a2; + void *phi_a2; + void *phi_a2_2; + void *phi_a2_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk0; + temp_a2 = arg0; + phi_a2 = temp_a2; + phi_a2_2 = temp_a2; + phi_a2_3 = temp_a2; + if (temp_v0 != 6) { + if (temp_v0 != 7) { + if (temp_v0 != 8) { + if (temp_v0 != 0xD) { + if (temp_v0 != 0x2A) { + return; + } + temp_v1 = temp_a2->unk6; + if (temp_v1 != 7) { + switch (temp_v1) { /* switch 2 */ + case 2: /* switch 2 */ + case 3: /* switch 2 */ + case 4: /* switch 2 */ + case 5: /* switch 2 */ + case 8: /* switch 2 */ + case 9: /* switch 2 */ + temp_a0 = temp_a2 + 0x18; + arg0 = temp_a2; + func_800C9EF4(temp_a0, 0x51018008, temp_a2, 7); + func_8000EE58((arg0 - &D_8015F9B8) / 112); + phi_a2 = arg0; + /* fallthrough */ + case 0: /* switch 2 */ + case 1: /* switch 2 */ + phi_a2->unk2 = -0x8000; + phi_a2->unk12 = 0; + phi_a2->unk4 = 0x3C; + phi_a2->unk6 = 7; + phi_a2->unk28 = 3.0f; + return; + } + } else { + /* Duplicate return node #34. Try simplifying control flow for better match */ + } + } else { + temp_f18 = temp_a2->unk24; + if (temp_a2->unk6 == 0) { + gPlayers[temp_f18].unk_00C &= 0xFFFBFFFF; + } + temp_a2->unk6 = 2; + temp_a2->unk2 = -0x8000; + temp_a2->unk4 = 0; + /* Duplicate return node #34. Try simplifying control flow for better match */ + } + } else { + temp_v1_2 = temp_a2->unk6; + if (temp_v1_2 != 7) { + switch (temp_v1_2) { /* switch 3 */ + case 2: /* switch 3 */ + case 3: /* switch 3 */ + case 4: /* switch 3 */ + case 5: /* switch 3 */ + case 8: /* switch 3 */ + case 9: /* switch 3 */ + arg0 = temp_a2; + func_8000EE58((temp_a2 - &D_8015F9B8) / 112); + phi_a2_2 = arg0; + /* fallthrough */ + case 0: /* switch 3 */ + case 1: /* switch 3 */ + phi_a2_2->unk2 = -0x8000; + phi_a2_2->unk12 = 0; + phi_a2_2->unk4 = 0x3C; + phi_a2_2->unk6 = 7; + phi_a2_2->unk28 = 3.0f; + return; + case 6: /* switch 3 */ + func_802B02B4(temp_a2, 8, temp_a2, 7); + return; + } + } else { + /* Duplicate return node #34. Try simplifying control flow for better match */ + } + } + } else { + temp_v1_3 = temp_a2->unk6; + if (temp_v1_3 != 5) { + if ((temp_v1_3 != 0) && (temp_v1_3 != 1)) { + if (temp_v1_3 != 2) { + if (temp_v1_3 != 4) { + return; + } + func_802B02B4(temp_a2, 7, temp_a2, 7); + return; + } + arg0 = temp_a2; + func_8000EE58((temp_a2 - &D_8015F9B8) / 112); + phi_a2_3 = arg0; + goto block_18; + } +block_18: + phi_a2_3->unk2 = -0x8000; + phi_a2_3->unk12 = 0; + phi_a2_3->unk4 = 0x3C; + phi_a2_3->unk6 = 5; + phi_a2_3->unk28 = 3.0f; + return; + } + /* Duplicate return node #34. Try simplifying control flow for better match */ + } + } else { + temp_t6 = temp_a2->unk6; + switch (temp_t6) { /* switch 1 */ + case 2: /* switch 1 */ + case 3: /* switch 1 */ + func_802B0570(temp_a2); + return; + case 0: /* switch 1 */ + temp_t7 = temp_a2->unk10; + gPlayers[temp_t7].unk_00C &= 0xFFFBFFFF; + /* fallthrough */ + case 4: /* switch 1 */ + temp_a2->unk2 = -0x8000; + temp_a2->unk4 = 0x3C; + temp_a2->unk6 = 5; + temp_a2->unk28 = 3.0f; + return; + default: /* switch 1 */ + default: /* switch 3 */ + default: /* switch 2 */ + return; + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_8029FDC8.s") #endif @@ -4665,15 +5968,248 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_802A0350.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802A0450: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8007ABFC(s32, ?); /* extern */ +? func_8008DABC(Player *, s8); /* extern */ +? func_800C90F4(s32, s32); /* extern */ +? func_800C98B8(f32 *, f32 *, ?, Player *); /* extern */ +? func_8029F1F8(Player *, void *); /* extern */ +? func_8029F2FC(Player *, void *); /* extern */ +? func_8029F408(Player *, void *); /* extern */ +? func_8029F69C(Player *, void *); /* extern */ +? func_8029FDC8(void *); /* extern */ -Unable to determine jump table for jr instruction at func_802A0450.s line 23. +void func_802A0450(Player *player, void *arg1) { + s16 sp42; + s16 sp36; + void *sp24; + Player *temp_a0; + Player *temp_a0_2; + Player *temp_a0_3; + Player *temp_a0_4; + Player *temp_a0_5; + Player *temp_a0_6; + Player *temp_a0_7; + Player *temp_a0_8; + Player *temp_a3; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f2; + f32 temp_f2_2; + s16 temp_t0; + s16 temp_t2; + s16 temp_v1; + s16 temp_v1_2; + s16 temp_v1_3; + s16 temp_v1_4; + s32 temp_f16; + Player *phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t2 = arg1->unk0; + temp_t0 = (player - D_800DC4DC) / 3544; + switch (temp_t2) { + case 9: + if (((player->unk_0BC << 0) >= 0) && ((player->unk_000 & 0x100) == 0)) { + func_8029F408(player, arg1); + return; + } + default: + return; + case 6: + if (((player->unk_0BC & 0x800008C0) == 0) && ((player->unk_00C & 1) == 0) && ((temp_v1 = arg1->unk10, temp_a0 = player, (temp_t0 != temp_v1)) || ((arg1->unk2 & 0x1000) == 0)) && (sp36 = temp_v1, player = player, sp42 = temp_t0, (func_8029FB80(temp_a0, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1))) { + player->unk_00C |= 1; + if ((gPlayers[temp_v1].unk_000 & 0x4000) != 0) { + if ((arg1->unk2 & 0xF) != 0) { + if (temp_t0 != temp_v1) { + func_800C90F4(temp_v1 & 0xFF, (gPlayers[temp_v1].characterId * 0x10) + 0x29008006); + } + } else { + temp_f0 = arg1->unk18 - gPlayers[temp_v1].posX; + temp_f2 = arg1->unk20 - gPlayers[temp_v1].posZ; + if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < D_802B99C4) && (temp_t0 != temp_v1)) { + func_800C90F4(temp_v1 & 0xFF, (gPlayers[temp_v1].characterId * 0x10) + 0x29008006); + } + } + } + func_8029FDC8(arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 7: + if (((player->unk_0BC & 0x80000400) == 0) && ((player->unk_00C & 4) == 0) && ((temp_v1_2 = arg1->unk14, temp_a0_2 = player, (temp_t0 != temp_v1_2)) || ((arg1->unk2 & 0x1000) == 0)) && (sp36 = temp_v1_2, player = player, sp42 = temp_t0, (func_8029FB80(temp_a0_2, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1))) { + player->unk_00C |= 4; + sp42 = temp_t0; + sp36 = temp_v1_2; + func_800C98B8(&player->posX, &player->unk_034, 0x19018010, player); + if (((gPlayers[temp_v1_2].unk_000 & 0x4000) != 0) && (temp_t0 != temp_v1_2)) { + func_800C90F4(temp_v1_2 & 0xFF, (gPlayers[temp_v1_2].characterId * 0x10) + 0x29008006); + } + func_8029FDC8(arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 42: + if (((player->unk_00C & 2) == 0) && ((temp_v1_3 = arg1->unk14, temp_a0_3 = player, (temp_t0 != temp_v1_3)) || ((arg1->unk2 & 0x1000) == 0)) && (sp36 = temp_v1_3, player = player, sp42 = temp_t0, (func_8029FB80(temp_a0_3, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1))) { + if ((player->unk_0BC << 0) >= 0) { + player->unk_00C |= 2; + sp42 = temp_t0; + sp36 = temp_v1_3; + func_800C98B8(&player->posX, &player->unk_034, 0x19018010, player); + } + if (((gPlayers[arg1->unk14].unk_000 & 0x4000) != 0) && (temp_t0 != arg1->unk14)) { + sp42 = temp_t0; + func_800C90F4(arg1->unk14 & 0xFF, (gPlayers[arg1->unk14].characterId * 0x10) + 0x29008006); + } + if (temp_t0 == arg1->unk4) { + func_8029FDC8(arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 8: + if (((player->unk_0BC << 7) >= 0) && ((player->unk_00C & 2) == 0) && ((temp_v1_4 = arg1->unk14, temp_a0_4 = player, (temp_t0 != temp_v1_4)) || ((arg1->unk2 & 0x1000) == 0)) && (sp36 = temp_v1_4, player = player, sp42 = temp_t0, (func_8029FB80(temp_a0_4, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1))) { + if ((player->unk_0BC << 0) >= 0) { + player->unk_00C |= 2; + sp42 = temp_t0; + sp36 = temp_v1_4; + func_800C98B8(&player->posX, &player->unk_034, 0x19018010, player); + } + if (((gPlayers[arg1->unk14].unk_000 & 0x4000) != 0) && (temp_t0 != arg1->unk14)) { + func_800C90F4(arg1->unk14 & 0xFF, (gPlayers[arg1->unk14].characterId * 0x10) + 0x29008006); + } + func_8029FDC8(arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 10: + if ((player->unk_0BC << 0) >= 0) { + func_8029F2FC(player, arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 23: + if ((player->unk_0BC << 0) >= 0) { + func_8029F1F8(player, arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 2: + case 3: + case 4: + case 19: + case 25: + case 26: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + if ((player->unk_0BC << 0) >= 0) { + func_8029F69C(player, arg1); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 5: + if (((player->unk_0BC << 0) >= 0) && (temp_a0_5 = player, ((player->unk_000 & 0x100) == 0)) && (player = player, temp_a3 = player, (func_8029FB80(temp_a0_5, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1))) { + player = temp_a3; + func_800C98B8(arg1 + 0x18, arg1 + 0x24, 0x19009005, temp_a3); + if ((gModeSelection == 1) && ((player->unk_000 & 0x1000) == 0)) { + D_80162DF8 = 1; + } + if ((player->unk_0BC & 0x200) != 0) { + arg1->unk28 = 10.0f; + return; + } + func_8008DABC(player, (player - D_800DC4DC) / 3544); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 13: + if (((player->unk_0BC << 0) >= 0) && ((temp_a0_6 = player, temp_f16 = arg1->unk24, (temp_t0 != temp_f16)) || ((arg1->unk2 & 0x1000) == 0)) && (sp36 = temp_f16, player = player, sp42 = temp_t0, (func_8029FB80(temp_a0_6, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1))) { + player->unk_00C |= 0x400000; + phi_v0 = &gPlayers[temp_f16]; + if ((gPlayers[temp_f16].unk_000 & 0x4000) != 0) { + if ((arg1->unk2 & 0xF) != 0) { + if (temp_t0 != temp_f16) { + sp24 = &gPlayers[temp_f16]; + func_800C90F4(temp_f16 & 0xFF, (gPlayers[temp_f16].characterId * 0x10) + 0x29008006); + goto block_75; + } + } else { + temp_f0_2 = arg1->unk18 - gPlayers[temp_f16].posX; + temp_f2_2 = arg1->unk20 - gPlayers[temp_f16].posZ; + if ((((temp_f0_2 * temp_f0_2) + (temp_f2_2 * temp_f2_2)) < D_802B99C8) && (temp_t0 != temp_f16)) { + sp24 = &gPlayers[temp_f16]; + func_800C90F4(temp_f16 & 0xFF, (gPlayers[temp_f16].characterId * 0x10) + 0x29008006); +block_75: + phi_v0 = sp24; + } + } + if (arg1->unk6 == 0) { + phi_v0->unk_00C &= 0xFFFBFFFF; + } + } + arg1->unk6 = 2; + arg1->unk2 = -0x8000; + arg1->unk4 = 0; + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 43: + temp_a0_7 = player; + player = player; + if (func_8029FB80(temp_a0_7, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1) { + arg1->unk6 = 3; + arg1->unk2 = -0x8000; + arg1->unk4 = 0; + if ((player->unk_000 & 0x4000) != 0) { + func_8007ABFC((player - D_800DC4DC) / 3544, 7); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + } + if (arg1->unk6 == 0) { + arg1->unk6 = 1; +block_89: + arg1->unk2 = -0x8000; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + case 12: + temp_a0_8 = player; + player = player; + if (func_8029FB80(temp_a0_8, arg1, MIPS2C_ERROR(Read from unset register $a2)) == 1) { + arg1->unk6 = 3; + arg1->unk2 = -0x8000; + arg1->unk4 = 0; + if ((player->unk_000 & 0x4000) != 0) { + func_8007ABFC((player - D_800DC4DC) / 3544, 0); + return; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + } + if (arg1->unk6 == 0) { + arg1->unk6 = 1; + goto block_89; + } + /* Duplicate return node #90. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_802A0450.s") #endif @@ -6087,29 +7623,364 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_802A2F34.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802A3008: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_80297340(f32, f32, void *); /* extern */ +? func_80297A50(void *, ? *, ? *); /* extern */ +? func_80298328(void *, ? *, ? *); /* extern */ +? func_802986B4(void *, ? *, ? *); /* extern */ +? func_80298D7C(void *, ? *, ? *); /* extern */ +? func_80299144(void *, ? *, ? *); /* extern */ +? func_8029930C(void *, ? *, ? *); /* extern */ +? func_802994D4(void *, ? *, ? *); /* extern */ +? func_8029969C(void *, ? *, ? *); /* extern */ +? func_80299864(void *, ? *, ? *); /* extern */ +? func_80299A2C(void *, ? *, ? *); /* extern */ +? func_80299BF4(void *, ? *, ? *); /* extern */ +? func_80299DBC(void *, ? *, ? *); /* extern */ +? func_80299EDC(void *, ? *, ? *); /* extern */ +? func_80299FFC(void *, ? *, ? *); /* extern */ +? func_8029A11C(void *, ? *, ? *); /* extern */ +? func_8029A23C(void *, ? *, ? *); /* extern */ +? func_8029A690(void *, ? *, ? *); /* extern */ +? func_8029A75C(void *, ? *, ? *); /* extern */ +? func_8029A828(void *, ? *, ? *); /* extern */ +? func_8029A8F4(void *, ? *, ? *); /* extern */ +? func_8029AC18(void *, ? *, ? *); /* extern */ +? func_8029AE1C(void *, ? *, ? *, u16); /* extern */ +? func_8029B06C(void *, ? *); /* extern */ +? func_8029B2E4(void *, ? *); /* extern */ +? func_8029B4E0(void *, ? *); /* extern */ +? func_8029B6EC(void *, ? *); /* extern */ +? func_8029B8E8(void *, ? *); /* extern */ +? func_8029BFB0(void *, ? *); /* extern */ +? func_8029C3CC(void *, ? *); /* extern */ +? func_8029CA90(void *, ? *); /* extern */ +? func_802A269C(void *, ? *); /* extern */ +? func_802A27A0(void *, ? *, ? *, u16); /* extern */ +? func_802A29BC(void *, ? *, ? *); /* extern */ +? func_802A2AD0(void *, ? *); /* extern */ +? func_802A2C78(void *, ? *, ? *); /* extern */ +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ +extern ? D_801502C0; +extern s32 D_8015F8E0; +extern ? D_8015F9B8; +extern ? D_80162578; +extern void *gDisplayListHead; +extern s32 gModeSelection; +static ? D_800DC628; /* unable to generate initializer */ +static ? D_800DC630; /* unable to generate initializer */ +static ? D_802B8874; /* unable to generate initializer */ +static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */ -Unable to determine jump table for jr instruction at func_802A3008.s line 121. +void func_802A3008(void *arg0) { + s16 sp92; + ? *sp58; + ? sp4C; + f32 sp48; + ? *temp_s0; + f32 temp_f0; + s16 temp_t4; + s16 temp_v0_6; + void *temp_s1; + void *temp_v0; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + ? *phi_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s1 = arg0->unk4; + sp92 = arg0->unk38; + sp4C.unk0 = D_802B8874.unk0; + sp4C.unk4 = D_802B8874.unk4; + sp4C.unk8 = D_802B8874.unk8; + sp48 = func_802B8018((temp_s1->unk26 - 0x8000) & 0xFFFF); + temp_f0 = func_802B8038((temp_s1->unk26 - 0x8000) & 0xFFFF); + temp_v0 = gDisplayListHead; + D_801502C0.unk0 = temp_f0; + D_801502C0.unk8 = -sp48; + D_801502C0.unk28 = temp_f0; + gDisplayListHead = temp_v0 + 8; + D_801502C0.unk10 = 0.0f; + D_801502C0.unk4 = 0.0f; + D_801502C0.unk24 = 0.0f; + D_801502C0.unk18 = 0.0f; + D_801502C0.unkC = 0.0f; + D_801502C0.unk1C = 0.0f; + D_801502C0.unk2C = 0.0f; + D_801502C0.unk20 = sp48; + D_801502C0.unk14 = 1.0f; + D_801502C0.unk3C = 1.0f; + temp_v0->unk4 = 0x20000; + temp_v0->unk0 = 0xB6000000; + temp_v0_2 = gDisplayListHead; + gDisplayListHead = temp_v0_2 + 8; + temp_v0_2->unk0 = 0xBC000002; + temp_v0_2->unk4 = 0x80000040; + temp_v0_3 = gDisplayListHead; + gDisplayListHead = temp_v0_3 + 8; + temp_v0_3->unk0 = 0x3860010; + temp_v0_3->unk4 = &D_800DC630; + temp_v0_4 = gDisplayListHead; + gDisplayListHead = temp_v0_4 + 8; + temp_v0_4->unk0 = 0x3880010; + temp_v0_4->unk4 = &D_800DC628; + temp_v0_5 = gDisplayListHead; + gDisplayListHead = temp_v0_5 + 8; + temp_v0_5->unk4 = -1; + temp_v0_5->unk0 = 0xBB000001; + if (gModeSelection != 3) { + func_80297340(sp48, 1.0f, temp_s1); + } + D_8015F8E0 = 0; + phi_s0 = &D_8015F9B8; + do { + sp58 = phi_s0; + if (phi_s0->unk2 != 0) { + temp_t4 = phi_s0->unk0; + switch (temp_t4) { + case 2: + func_80299144(temp_s1, &D_801502C0, phi_s0); + break; + case 3: + func_8029930C(temp_s1, &D_801502C0, phi_s0); + break; + case 4: + func_802994D4(temp_s1, &D_801502C0, phi_s0); + break; + case 19: + func_8029969C(temp_s1, &D_801502C0, phi_s0); + break; + case 26: + func_80299864(temp_s1, &D_801502C0, phi_s0); + break; + case 28: + func_80299A2C(temp_s1, &D_801502C0, phi_s0); + break; + case 33: + func_80299BF4(temp_s1, &D_801502C0, phi_s0); + break; + case 29: + func_80299DBC(temp_s1, &D_801502C0, phi_s0); + break; + case 30: + func_80299EDC(temp_s1, &D_801502C0, phi_s0); + break; + case 31: + func_80299FFC(temp_s1, &D_801502C0, phi_s0); + break; + case 32: + func_8029A11C(temp_s1, &D_801502C0, phi_s0); + break; + case 5: + func_8029CA90(temp_s1, phi_s0); + break; + case 45: + func_8029A23C(temp_s1, &D_801502C0, phi_s0); + break; + case 6: + func_8029A8F4(temp_s1, &D_801502C0, phi_s0); + break; + case 7: + func_8029A690(temp_s1, &D_801502C0, phi_s0); + break; + case 8: + func_8029A75C(temp_s1, &D_801502C0, phi_s0); + break; + case 42: + func_8029A828(temp_s1, &D_801502C0, phi_s0); + break; + case 10: + func_80298328(temp_s1, &D_801502C0, phi_s0); + break; + case 15: + func_8029B8E8(temp_s1, phi_s0); + break; + case 16: + func_8029BFB0(temp_s1, phi_s0); + break; + case 17: + func_8029C3CC(temp_s1, phi_s0); + break; + case 18: + func_80297A50(temp_s1, &D_801502C0, phi_s0); + break; + case 20: + func_8029AC18(temp_s1, &D_801502C0, phi_s0); + break; + case 23: + func_802A29BC(temp_s1, &D_801502C0, phi_s0); + break; + case 35: + func_802A269C(temp_s1, phi_s0); + break; + case 25: + func_802A2C78(temp_s1, &D_801502C0, phi_s0); + break; + case 38: + func_8029AE1C(temp_s1, phi_s0, &D_801502C0, sp92); + break; + case 37: + func_8029B06C(temp_s1, phi_s0); + break; + case 40: + func_8029B2E4(temp_s1, phi_s0); + break; + case 41: + func_8029B6EC(temp_s1, phi_s0); + break; + case 44: + func_8029B4E0(temp_s1, phi_s0); + break; + case 39: + func_802A2AD0(temp_s1, phi_s0); + break; + case 9: + func_802A27A0(temp_s1, &D_801502C0, phi_s0, sp92); + break; + } + } + temp_s0 = phi_s0 + 0x70; + phi_s0 = temp_s0; + } while (temp_s0 != &D_80162578); + temp_v0_6 = gCurrentCourseId; + if (temp_v0_6 != 9) { + if (temp_v0_6 != 0x12) { + return; + } + func_80298D7C(temp_s1, &D_801502C0, sp58); + return; + } + func_802986B4(temp_s1, &D_801502C0, sp58); +} #else GLOBAL_ASM("asm/non_matchings/code_actors/func_802A3008.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function update_simple_objects: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802A0E44(); /* extern */ +? func_802B30EC(); /* extern */ +? update_obj_banana(? *); /* extern */ +? update_obj_banana_bunch(? *); /* extern */ +? update_obj_fake_item_box(? *); /* extern */ +? update_obj_falling_rocks(? *); /* extern */ +? update_obj_green_shell(? *); /* extern */ +? update_obj_item_box(? *); /* extern */ +? update_obj_item_box_hot_air_balloon(? *); /* extern */ +? update_obj_kiwano_fruit(? *); /* extern */ +? update_obj_mario_raceway_sign(? *); /* extern */ +? update_obj_paddle_wheel(? *); /* extern */ +? update_obj_piranha_plant(? *); /* extern */ +? update_obj_railroad_crossing(? *); /* extern */ +? update_obj_red_blue_shell(? *); /* extern */ +? update_obj_train_car1(? *); /* extern */ +? update_obj_train_car2(? *); /* extern */ +? update_obj_train_engine(? *); /* extern */ +? update_obj_trees_cacti_shrubs(? *); /* extern */ +? update_obj_triple_shell(? *, ?); /* extern */ +? update_obj_wario_stadium_sign(? *); /* extern */ +? update_obj_yoshi_valley_egg(? *); /* extern */ +extern ? D_8015F9B8; +extern ? D_80162578; -Unable to determine jump table for jr instruction at update_simple_objects.s line 19. +void update_simple_objects(void) { + ? *temp_s0; + s16 temp_t7; + ? *phi_s0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + phi_s0 = &D_8015F9B8; + do { + if (phi_s0->unk2 != 0) { + temp_t7 = phi_s0->unk0; + switch (temp_t7) { + case 5: + update_obj_falling_rocks(phi_s0); + break; + case 7: + update_obj_green_shell(phi_s0); + break; + case 8: + update_obj_red_blue_shell(phi_s0); + break; + case 42: + update_obj_red_blue_shell(phi_s0); + break; + case 45: + update_obj_kiwano_fruit(phi_s0); + break; + case 6: + update_obj_banana(phi_s0); + break; + case 38: + update_obj_paddle_wheel(phi_s0); + break; + case 15: + update_obj_train_engine(phi_s0); + break; + case 16: + update_obj_train_car1(phi_s0); + break; + case 17: + update_obj_train_car2(phi_s0); + break; + case 12: + update_obj_item_box(phi_s0); + break; + case 43: + update_obj_item_box_hot_air_balloon(phi_s0); + break; + case 13: + update_obj_fake_item_box(phi_s0); + break; + case 10: + update_obj_piranha_plant(phi_s0); + break; + case 14: + update_obj_banana_bunch(phi_s0); + break; + case 21: + update_obj_triple_shell(phi_s0, 7); + break; + case 22: + update_obj_triple_shell(phi_s0, 8); + break; + case 23: + update_obj_mario_raceway_sign(phi_s0); + break; + case 35: + update_obj_wario_stadium_sign(phi_s0); + break; + case 39: + update_obj_railroad_crossing(phi_s0); + break; + case 2: + case 3: + case 4: + case 19: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + update_obj_trees_cacti_shrubs(phi_s0); + break; + case 9: + update_obj_yoshi_valley_egg(phi_s0); + break; + } + } + temp_s0 = phi_s0 + 0x70; + phi_s0 = temp_s0; + } while (temp_s0 != &D_80162578); + func_802A0E44(); + func_802B30EC(); +} #else GLOBAL_ASM("asm/non_matchings/code_actors/update_simple_objects.s") #endif diff --git a/src/code_802B0210.c b/src/code_802B0210.c index a5ea58dea..c01fa8fa4 100644 --- a/src/code_802B0210.c +++ b/src/code_802B0210.c @@ -361,15 +361,156 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B09C0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function update_obj_banana_bunch: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C9060(s32, ?); /* extern */ +? func_8029E854(void *, s32); /* extern */ +? func_802B0648(void *); /* extern */ +? func_802B0788(s16, void *, Player *, Player *); /* extern */ +? func_802B2914(void *, Player *, ?, Player *); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at update_obj_banana_bunch.s line 24. +void update_obj_banana_bunch(void *arg0) { + void *sp2C; + void *sp28; + void *sp24; + s16 temp_a0_2; + s16 temp_t4; + s16 temp_t6; + s16 temp_v1_2; + u16 temp_t9; + u16 temp_v1; + void *temp_a0; + void *temp_a1; + void *temp_a2; + void *temp_a3; + void *temp_t0; + void *phi_v1; + void *phi_v1_2; + void *phi_v1_3; + void *phi_v1_4; + void *phi_v1_5; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk10; + temp_t9 = arg0->unk6; + switch (temp_t9) { + case 0: + func_802B2914(arg0, &gPlayers[temp_t6], 0, &gPlayers[temp_t6]); + arg0->unk4 = 4; + arg0->unk6 = 1; + arg0->unk1C = 1; + return; + case 1: + arg0->unk4 = arg0->unk4 - 1; + if (arg0->unk4 == 0) { + func_802B2914(arg0, &gPlayers[temp_t6], 1, &gPlayers[temp_t6]); + arg0->unk4 = 4; + arg0->unk6 = 2; + arg0->unk1C = arg0->unk1C + 1; + return; + } + default: + return; + case 2: + arg0->unk4 = arg0->unk4 - 1; + if (arg0->unk4 == 0) { + func_802B2914(arg0, &gPlayers[temp_t6], 2, &gPlayers[temp_t6]); + arg0->unk4 = 4; + arg0->unk6 = 3; + arg0->unk1C = arg0->unk1C + 1; + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 3: + arg0->unk4 = arg0->unk4 - 1; + if (arg0->unk4 == 0) { + func_802B2914(arg0, &gPlayers[temp_t6], 3, &gPlayers[temp_t6]); + arg0->unk4 = 4; + arg0->unk6 = 4; + arg0->unk1C = arg0->unk1C + 1; + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 4: + arg0->unk4 = arg0->unk4 - 1; + if (arg0->unk4 == 0) { + func_802B2914(arg0, &gPlayers[temp_t6], 4, &gPlayers[temp_t6]); + arg0->unk4 = 4; + arg0->unk6 = 5; + arg0->unk1C = arg0->unk1C + 1; + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + case 5: + arg0->unk6 = 6; + temp_a0 = &D_8015F9B8 + (arg0->unk12 * 0x70); + temp_a0->unk2 = temp_a0->unk2 | 0x5000; + temp_a1 = &D_8015F9B8 + (arg0->unk14 * 0x70); + temp_a1->unk2 = temp_a1->unk2 | 0x5000; + temp_a2 = &D_8015F9B8 + (arg0->unk16 * 0x70); + temp_a2->unk2 = temp_a2->unk2 | 0x5000; + temp_a3 = &D_8015F9B8 + (arg0->unk18 * 0x70); + temp_a3->unk2 = temp_a3->unk2 | 0x5000; + temp_t0 = &D_8015F9B8 + (arg0->unk1A * 0x70); + temp_t0->unk2 = temp_t0->unk2 | 0x5000; + return; + case 6: + sp2C = &gPlayers[temp_t6]; + sp24 = NULL; + phi_v1 = sp24; + if (func_802B09C0(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) == 1) { + phi_v1 = 1; + } + sp2C = &gPlayers[temp_t6]; + sp24 = phi_v1; + phi_v1_2 = phi_v1; + if (func_802B09C0(arg0->unk14, 1) == 1) { + phi_v1_2 = phi_v1 + 1; + } + sp2C = &gPlayers[temp_t6]; + sp24 = phi_v1_2; + phi_v1_3 = phi_v1_2; + if (func_802B09C0(arg0->unk16, 1) == 1) { + phi_v1_3 = phi_v1_2 + 1; + } + sp2C = &gPlayers[temp_t6]; + sp24 = phi_v1_3; + phi_v1_4 = phi_v1_3; + if (func_802B09C0(arg0->unk18, 1) == 1) { + phi_v1_4 = phi_v1_3 + 1; + } + sp2C = &gPlayers[temp_t6]; + sp24 = phi_v1_4; + phi_v1_5 = phi_v1_4; + if (func_802B09C0(arg0->unk1A, 1) == 1) { + phi_v1_5 = phi_v1_4 + 1; + } + if (phi_v1_5 == 0) { + sp2C = &gPlayers[temp_t6]; + func_8029E854(arg0, 1); + gPlayers[temp_t6].unk_00C &= 0xFFFBFFFF; + return; + } + if (((gPlayers[temp_t6].unk_000 & 0x4000) != 0) && (temp_t4 = arg0->unk10, temp_v1 = gControllers[temp_t4].buttonPressed, ((temp_v1 & 0x2000) != 0))) { + gControllers[temp_t4].buttonPressed = temp_v1 & 0xDFFF; + sp2C = &gPlayers[temp_t6]; + sp28 = &gControllers[temp_t4]; + func_800C9060(((&gPlayers[temp_t6] - D_800DC4DC) / 3544) & 0xFF, 0x19008012); + temp_a0_2 = gControllers[temp_t4].rawStickY; + if ((temp_a0_2 >= 0x1F) && (temp_v1_2 = gControllers[temp_t4].rawStickX, ((temp_v1_2 < 0x28) != 0)) && (temp_v1_2 >= -0x27)) { + func_802B0788(temp_a0_2, arg0, &gPlayers[temp_t6], &gPlayers[temp_t6]); + return; + } + func_802B0648(arg0); + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #31. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_banana_bunch.s") #endif @@ -401,15 +542,238 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B0E14.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function update_obj_triple_shell: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000ED80(s32); /* extern */ +? func_8000EDC8(s32); /* extern */ +? func_800C9060(u8, ?); /* extern */ +? func_800C90F4(u8, s32); /* extern */ +? func_8029E854(void *); /* extern */ +s32 func_802B19EC(void *, Player *, s16, ?); /* extern */ +? func_802B64C4(f32 *, s16); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at update_obj_triple_shell.s line 23. +void update_obj_triple_shell(void *arg0, s16 arg1) { + s16 sp4E; + void *sp44; + f32 sp40; + f32 sp3C; + f32 sp38; + s16 sp32; + void *sp28; + f32 *temp_a0; + f32 *temp_a0_2; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + s16 temp_t0; + s16 temp_t7; + s16 temp_t8; + s16 temp_v0; + s16 temp_v1_2; + s16 temp_v1_3; + s16 temp_v1_4; + s32 temp_v1; + u16 temp_t9; + void *temp_v0_2; + void *temp_v0_3; + void *temp_v0_4; + void *temp_v0_5; + void *temp_v0_6; + void *temp_v0_7; + s16 phi_v1; + s16 phi_v1_2; + s16 phi_v1_3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_v0 = arg0->unk10; + temp_t9 = arg0->unk6; + temp_t8 = arg0->unk12 + temp_v0; + temp_t0 = arg0->unk14; + arg0->unk12 = temp_t8; + temp_v1 = temp_t8 & 0xFFFF; + switch (temp_t9) { + case 0: + sp4E = temp_t0; + if (func_802B19EC(arg0, &gPlayers[temp_t0], arg1, 0) != -1) { + func_800C9060(temp_t0 & 0xFF, 0x19008012); + arg0->unk4 = arg0->unk4 + 1; + } + arg0->unk6 = 1; + return; + case 1: + if (temp_v0 > 0) { + if (temp_v1 >= 0xD556) { + sp4E = temp_t0; + if (func_802B19EC(arg0, &gPlayers[temp_t0], arg1, 1) != -1) { + func_800C9060(temp_t0 & 0xFF, 0x19008012); + arg0->unk4 = arg0->unk4 + 1; + } + arg0->unk6 = 2; + return; + } + /* Duplicate return node #61. Try simplifying control flow for better match */ + return; + } + if (temp_v1 < 0x2AAA) { + sp4E = temp_t0; + if (func_802B19EC(arg0, &gPlayers[temp_t0], arg1, 1) != -1) { + func_800C9060(temp_t0 & 0xFF, 0x19008012); + arg0->unk4 = arg0->unk4 + 1; + } + arg0->unk6 = 2; + return; + } + default: + return; + case 2: + if (temp_v0 > 0) { + if ((temp_v1 >= 0x2AAB) && (temp_v1 < 0x31C7)) { + sp4E = temp_t0; + if (func_802B19EC(arg0, &gPlayers[temp_t0], arg1, 2) != -1) { + func_800C9060(temp_t0 & 0xFF, 0x19008012); + arg0->unk4 = arg0->unk4 + 1; + } + arg0->unk6 = 3; + return; + } + /* Duplicate return node #61. Try simplifying control flow for better match */ + return; + } + if ((temp_v1 < 0xD555) && (temp_v1 >= 0xCE39)) { + sp4E = temp_t0; + if (func_802B19EC(arg0, &gPlayers[temp_t0], arg1, 2) != -1) { + func_800C9060(temp_t0 & 0xFF, 0x19008012); + arg0->unk4 = arg0->unk4 + 1; + } + arg0->unk6 = 3; + return; + } + /* Duplicate return node #61. Try simplifying control flow for better match */ + return; + case 3: + arg0->unk6 = 4; + temp_v0_2 = &D_8015F9B8 + (arg0->unk24 * 0x70); + temp_v0_2->unk2 = temp_v0_2->unk2 | 0x4000; + temp_v0_3 = &D_8015F9B8 + (arg0->unk28 * 0x70); + temp_v0_3->unk2 = temp_v0_3->unk2 | 0x4000; + temp_v0_4 = &D_8015F9B8 + (arg0->unk2C * 0x70); + temp_v0_4->unk2 = temp_v0_4->unk2 | 0x4000; + return; + case 4: + sp4E = temp_t0; + sp32 = 0; + phi_v1 = sp32; + if (func_802B0E14(arg0->unk24, arg1) == 1) { + phi_v1 = 1; + } else { + arg0->unk24 = -1.0f; + } + sp4E = temp_t0; + sp32 = phi_v1; + phi_v1_2 = phi_v1; + if (func_802B0E14(arg0->unk28, MIPS2C_ERROR(Read from unset register $a1)) == 1) { + phi_v1_2 = phi_v1 + 1; + } else { + arg0->unk28 = -1.0f; + } + sp4E = temp_t0; + sp32 = phi_v1_2; + phi_v1_3 = phi_v1_2; + if (func_802B0E14(arg0->unk2C, MIPS2C_ERROR(Read from unset register $a1)) == 1) { + phi_v1_3 = phi_v1_2 + 1; + } else { + arg0->unk2C = -1.0f; + } + if (phi_v1_3 == 0) { + func_8029E854(arg0); + return; + } + temp_t7 = arg0->unk14; + if ((gControllers[temp_t7].buttonPressed & 0x2000) != 0) { + arg0->unk8 = arg0->unk8 + 1.0f; + gControllers[temp_t7].buttonPressed &= 0xDFFF; + } + if (arg0->unk8 > 0.0f) { + temp_f0 = arg0->unk24; + if ((temp_f0 > 0.0f) && ((temp_v0_5 = &D_8015F9B8 + (temp_f0 * 0x70), temp_v1_2 = temp_v0_5->unk12, temp_a0 = &sp38, ((temp_v1_2 < 0x38E) != 0)) || (temp_v1_2 >= -0x38D))) { + sp38 = 0.0f; + sp3C = 0.0f; + sp40 = 8.0f; + sp28 = &gPlayers[temp_t0]; + sp44 = temp_v0_5; + func_802B64C4(temp_a0, gPlayers[temp_t0].unk_02E + gPlayers[temp_t0].unk_0C0); + temp_v0_5->unk24 = sp38; + temp_v0_5->unk28 = sp3C; + temp_v0_5->unk6 = 2; + temp_v0_5->unk4 = 0x1E; + temp_v0_5->unk2C = sp40; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (gPlayers[temp_t0].characterId * 0x10) + 0x29008000); + if (arg0->unk0 == 0x16) { + func_8000ED80(arg0->unk24); + } else { + func_8000EDC8(arg0->unk24); + } + arg0->unk24 = -1.0f; + arg0->unk4 = arg0->unk4 - 1; + arg0->unk8 = arg0->unk8 - 1.0f; + return; + } + temp_f0_2 = arg0->unk28; + if ((temp_f0_2 > 0.0f) && ((temp_v0_6 = &D_8015F9B8 + (temp_f0_2 * 0x70), temp_v1_3 = temp_v0_6->unk12, ((temp_v1_3 < 0xAA1) != 0)) || (temp_v1_3 >= 0x38F))) { + sp38 = 0.0f; + sp3C = 0.0f; + sp40 = 8.0f; + sp28 = &gPlayers[temp_t0]; + sp44 = temp_v0_6; + func_802B64C4(&sp38, gPlayers[temp_t0].unk_02E + gPlayers[temp_t0].unk_0C0); + temp_v0_6->unk24 = sp38; + temp_v0_6->unk28 = sp3C; + temp_v0_6->unk6 = 2; + temp_v0_6->unk4 = 0x1E; + temp_v0_6->unk2C = sp40; + func_800C90F4(arg0->unk15, (gPlayers[temp_t0].characterId * 0x10) + 0x29008000); + func_800C9060(arg0->unk15, 0x19008004); + if (arg0->unk0 == 0x16) { + func_8000ED80(arg0->unk28); + } else { + func_8000EDC8(arg0->unk28); + } + arg0->unk28 = -1.0f; + arg0->unk4 = arg0->unk4 - 1; + arg0->unk8 = arg0->unk8 - 1.0f; + return; + } + temp_f0_3 = arg0->unk2C; + if ((temp_f0_3 > 0.0f) && ((temp_v0_7 = &D_8015F9B8 + (temp_f0_3 * 0x70), temp_v1_4 = temp_v0_7->unk12, temp_a0_2 = &sp38, ((temp_v1_4 < -0x38E) != 0)) || (temp_v1_4 >= -0x71B))) { + sp38 = 0.0f; + sp3C = 0.0f; + sp40 = 8.0f; + sp28 = &gPlayers[temp_t0]; + sp44 = temp_v0_7; + func_802B64C4(temp_a0_2, gPlayers[temp_t0].unk_02E + gPlayers[temp_t0].unk_0C0); + temp_v0_7->unk24 = sp38; + temp_v0_7->unk28 = sp3C; + temp_v0_7->unk6 = 2; + temp_v0_7->unk4 = 0x1E; + temp_v0_7->unk2C = sp40; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (gPlayers[temp_t0].characterId * 0x10) + 0x29008000); + if (arg0->unk0 == 0x16) { + func_8000ED80(arg0->unk2C); + } else { + func_8000EDC8(arg0->unk2C); + } + arg0->unk2C = -1.0f; + arg0->unk4 = arg0->unk4 - 1; + arg0->unk8 = arg0->unk8 - 1.0f; + } + /* Duplicate return node #61. Try simplifying control flow for better match */ + return; + } + /* Duplicate return node #61. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_triple_shell.s") #endif @@ -694,29 +1058,366 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B1FFC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function update_obj_banana: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C9060(s32, ?, u16); /* extern */ +? func_8029E854(void *); /* extern */ +? func_8029FDC8(f32, void *); /* extern */ +? func_802ADDC8(f32, void *, void *, f32, f32, f32, f32); /* extern */ +? func_802B4E30(void *); /* extern */ +? func_802B64C4(f32 *, s16); /* extern */ +? load_giant_egg(f32, f32 *, ?, f32, f32); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at update_obj_banana.s line 24. +void update_obj_banana(void *arg0) { + void *sp88; + void *sp84; + void *sp80; + f32 sp7C; + f32 sp78; + f32 sp74; + f32 sp70; + f32 sp6C; + f32 sp68; + f32 sp48; + f32 sp44; + f32 sp40; + f32 sp3C; + f32 sp38; + f32 sp34; + f32 temp_f0; + f32 temp_f0_10; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f0_5; + f32 temp_f0_6; + f32 temp_f0_7; + f32 temp_f0_8; + f32 temp_f0_9; + f32 temp_f10; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f12_3; + f32 temp_f14; + f32 temp_f14_2; + f32 temp_f14_3; + f32 temp_f14_4; + f32 temp_f14_5; + f32 temp_f16; + f32 temp_f16_2; + f32 temp_f16_3; + f32 temp_f18; + f32 temp_f2; + f32 temp_f2_2; + f32 temp_f2_3; + f32 temp_f2_4; + f32 temp_f2_5; + s16 temp_a0; + s16 temp_t6; + s16 temp_v0; + u16 temp_a2; + u16 temp_t9; + void *temp_v0_2; + f32 phi_f6; + void *phi_f14; + void *phi_v1; + f32 phi_f12; + f32 phi_f8; + void *phi_f14_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_t6 = arg0->unk10; + temp_t9 = arg0->unk6; + switch (temp_t9) { + case 0: + temp_f2 = gPlayers[temp_t6].posX - arg0->unk18; + temp_f14 = gPlayers[temp_t6].posY - arg0->unk1C; + sp48 = temp_f2; + temp_f16 = gPlayers[temp_t6].posZ - arg0->unk20; + sp44 = temp_f14; + sp88 = &gPlayers[temp_t6]; + sp40 = temp_f16; + temp_f12 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16), temp_f14) / 10.0f; + phi_f14 = (bitwise void *) temp_f14; + if (temp_f12 == 0.0f) { + temp_f0 = D_802B9EE0; + arg0->unk18 = gPlayers[temp_t6].posX + temp_f0; + arg0->unk1C = gPlayers[temp_t6].posY + temp_f0; + phi_f6 = gPlayers[temp_t6].posZ + temp_f0; + } else { + temp_f14_2 = temp_f14 / temp_f12; + arg0->unk18 = gPlayers[temp_t6].posX - (temp_f2 / temp_f12); + arg0->unk1C = (gPlayers[temp_t6].posY - temp_f14_2) - 2.0f; + phi_f6 = gPlayers[temp_t6].posZ - (temp_f16 / temp_f12); + phi_f14 = (bitwise void *) temp_f14_2; + } + arg0->unk20 = phi_f6; + sp88 = &gPlayers[temp_t6]; + func_802ADDC8(temp_f12, phi_f14, arg0 + 0x30, arg0->unkC + 1.0f, arg0->unk18, arg0->unk1C, arg0->unk20); + func_802B4E30(arg0); + if ((gPlayers[temp_t6].unk_000 & 0x4000) != 0) { + if (D_800DC51C != 0) { + phi_v1 = D_800DC4BC; + } else { + phi_v1 = &gControllers[arg0->unk10]; + } + temp_a2 = phi_v1->unk8; + if ((temp_a2 & 0x2000) != 0) { + phi_v1->unk8 = temp_a2 & 0xDFFF; + arg0->unk6 = 1; + arg0->unk4 = 0xB4; + gPlayers[temp_t6].unk_00C &= 0xFFFBFFFF; + sp80 = phi_v1; + sp88 = &gPlayers[temp_t6]; + func_800C9060(((&gPlayers[temp_t6] - D_800DC4DC) / 3544) & 0xFF, 0x19008012, temp_a2); + temp_f0_2 = phi_v1->unk2; + if ((temp_f0_2 > 30.0f) && (temp_a0 = phi_v1->unk0, ((temp_a0 < 0xA) != 0)) && (temp_a0 >= -9)) { + temp_f2_2 = gPlayers[temp_t6].unk_094; + temp_f0_3 = ((temp_f0_2 - 30.0f) / 20.0f) + 0.5f; + if (temp_f2_2 < 2.0f) { + phi_f12 = 4.0f; + } else { + phi_f12 = (temp_f2_2 * 0.75f) + 3.5f + temp_f0_3; + } + sp88 = &gPlayers[temp_t6]; + load_giant_egg(phi_f12, &sp68, 0, temp_f0_3, phi_f12); + func_802B64C4(&sp68, gPlayers[temp_t6].unk_02E + gPlayers[temp_t6].unk_0C0); + arg0->unk24 = sp68; + arg0->unk28 = sp6C; + arg0->unk2C = sp70; + return; + } + arg0->unk24 = 0.0f; + arg0->unk2C = 0.0f; + arg0->unk28 = 1.5f; + return; + } + /* Duplicate return node #45. Try simplifying control flow for better match */ + return; + } + default: + return; + case 1: + temp_v0 = arg0->unk4; + if (temp_v0 != 0) { + arg0->unk4 = temp_v0 - 1; + if (arg0->unk4 == 0) { + arg0->unk2 = arg0->unk2 & 0xEFFF; + } + } + temp_f0_4 = arg0->unk28; + arg0->unk18 = arg0->unk18 + arg0->unk24; + arg0->unk20 = arg0->unk20 + arg0->unk2C; + if (temp_f0_4 > -1.0f) { + arg0->unk28 = temp_f0_4 - D_802B9EE4; + } + temp_f12_2 = arg0->unk20; + arg0->unk1C = arg0->unk1C + arg0->unk28; + if ((temp_f12_2 < D_8015F6F2) || (D_8015F6F0 < temp_f12_2) || (temp_f0_5 = arg0->unk18, (temp_f0_5 < D_8015F6EA)) || (D_8015F6E8 < temp_f0_5) || (temp_f2_3 = arg0->unk1C, (temp_f2_3 < D_8015F6EE))) { + func_8029FDC8(temp_f12_2, arg0); + return; + } + func_802ADDC8(temp_f12_2, arg0 + 0x30, (bitwise void *) (arg0->unkC + 1.0f), temp_f0_5, temp_f2_3, temp_f12_2); + arg0->unk34 = 1; + if (((1 & 0xFFFF) != 0) && (arg0->unk44 < 0.0f)) { + sp74 = -arg0->unk60; + sp78 = -arg0->unk64; + sp7C = -arg0->unk68; + temp_f0_6 = arg0->unk44; + arg0->unk18 = arg0->unk18 + (sp74 * temp_f0_6); + arg0->unk1C = arg0->unk1C + (sp78 * temp_f0_6); + arg0->unk2 = arg0->unk2 & 0xEFFF; + arg0->unk6 = 4; + arg0->unk20 = arg0->unk20 + (sp7C * temp_f0_6); + return; + } + /* Duplicate return node #45. Try simplifying control flow for better match */ + return; + case 2: + sp68 = 0.0f; + sp6C = 0.0f; + sp70 = -5.0f; + sp88 = &gPlayers[temp_t6]; + func_802B64C4(&sp68, gPlayers[temp_t6].unk_02E + gPlayers[temp_t6].unk_0C0); + temp_f18 = sp68 + gPlayers[temp_t6].posX; + temp_f0_7 = sp6C + gPlayers[temp_t6].posY; + temp_f10 = sp70 + gPlayers[temp_t6].posZ; + sp34 = temp_f10; + temp_f2_4 = temp_f18 - arg0->unk18; + sp3C = temp_f18; + sp38 = temp_f0_7; + temp_f14_3 = temp_f0_7 - arg0->unk1C; + sp48 = temp_f2_4; + temp_f16_2 = temp_f10 - arg0->unk20; + sp44 = temp_f14_3; + sp40 = temp_f16_2; + temp_f0_8 = sqrtf((temp_f2_4 * temp_f2_4) + (temp_f14_3 * temp_f14_3) + (temp_f16_2 * temp_f16_2), temp_f14_3); + if (temp_f0_8 == 0.0f) { + temp_f0_9 = D_802B9EE8; + arg0->unk18 = gPlayers[temp_t6].posX + temp_f0_9; + arg0->unk1C = gPlayers[temp_t6].posY + temp_f0_9; + arg0->unk20 = gPlayers[temp_t6].posZ + temp_f0_9; + } else { + arg0->unk18 = sp68 + (temp_f18 - (temp_f2_4 / temp_f0_8)); + arg0->unk1C = (sp38 - (temp_f14_3 / temp_f0_8)) - 2.0f; + arg0->unk20 = sp34 - (temp_f16_2 / temp_f0_8); + } + func_802ADDC8((bitwise f32) (arg0 + 0x30), (bitwise void *) (arg0->unkC + 1.0f), (bitwise void *) arg0->unk18, arg0->unk1C, arg0->unk20); + func_802B4E30(arg0); + return; + case 3: + temp_v0_2 = (arg0->unk12 * 0x70) + &D_8015F9B8; + temp_f2_5 = temp_v0_2->unk18 - arg0->unk18; + temp_f14_4 = temp_v0_2->unk1C - arg0->unk1C; + sp48 = temp_f2_5; + temp_f16_3 = temp_v0_2->unk20 - arg0->unk20; + sp44 = temp_f14_4; + sp84 = temp_v0_2; + sp40 = temp_f16_3; + temp_f12_3 = sqrtf((temp_f2_5 * temp_f2_5) + (temp_f14_4 * temp_f14_4) + (temp_f16_3 * temp_f16_3), temp_f14_4) / 5.0f; + phi_f14_2 = (bitwise void *) temp_f14_4; + if (temp_f12_3 == 0.0f) { + temp_f0_10 = D_802B9EEC; + arg0->unk18 = temp_v0_2->unk18 + temp_f0_10; + arg0->unk1C = temp_v0_2->unk1C + temp_f0_10; + phi_f8 = temp_v0_2->unk20 + temp_f0_10; + } else { + temp_f14_5 = temp_f14_4 / temp_f12_3; + arg0->unk18 = temp_v0_2->unk18 - (temp_f2_5 / temp_f12_3); + arg0->unk1C = (temp_v0_2->unk1C - temp_f14_5) - 2.0f; + phi_f8 = temp_v0_2->unk20 - (temp_f16_3 / temp_f12_3); + phi_f14_2 = (bitwise void *) temp_f14_5; + } + arg0->unk20 = phi_f8; + func_802ADDC8(temp_f12_3, phi_f14_2, arg0 + 0x30, arg0->unkC + 1.0f, arg0->unk18, arg0->unk1C, arg0->unk20); + func_802B4E30(arg0); + return; + case 5: + arg0->unk28 = arg0->unk28 - D_802B9EF0; + if (arg0->unk28 < -5.0f) { + arg0->unk28 = -5.0f; + } + arg0->unk4 = arg0->unk4 - 1; + arg0->unk1C = arg0->unk1C + arg0->unk28; + arg0->unk10 = arg0->unk10 + 0x16C; + arg0->unk12 = arg0->unk12 - 0x5B0; + arg0->unk14 = arg0->unk14 + 0x38E; + if (arg0->unk4 == 0) { + func_8029E854(arg0); + return; + } + /* Duplicate return node #45. Try simplifying control flow for better match */ + return; + case 4: + arg0->unk2 = arg0->unk2 | 0xC000; + arg0->unk2 = arg0->unk2 & 0xEFFF; + /* Duplicate return node #45. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_banana.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802B2914: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_800C9060(s32, ?, s32 *, s32); /* extern */ +s32 func_8029EC88(f32 *, s16 *, f32 *, ?); /* extern */ +? func_802AD950(void *, f32, s32, s32, f32, f32, f32, f32); /* extern */ +? func_802B4E30(void *); /* extern */ +? func_802B63B8(f32 *, f32 *); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at func_802B2914.s line 128. +void func_802B2914(void *arg0, Player *player, s16 arg2) { + s16 sp6E; + f32 sp68; + f32 sp64; + f32 sp60; + s16 sp5C; + s16 sp5A; + s16 sp58; + f32 sp54; + f32 sp50; + f32 sp4C; + f32 *temp_a0; + f32 *temp_a2; + s16 *temp_a1; + s16 temp_t6; + s32 temp_lo; + s32 temp_v0; + void *temp_s0; + void *phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp4C = 0.0f; + sp50 = -player->unk_070; + sp54 = -(player->unk_070 + 4.0f); + func_802B63B8(&sp4C, player->unk_174); + temp_a0 = &sp4C; + temp_a1 = &sp58; + temp_a2 = &sp60; + sp4C += player->posX; + sp50 += player->posY; + sp54 += player->posZ; + sp60 = player->unk_034; + sp64 = player->unk_038; + sp58 = 0; + sp5A = 0; + sp5C = 0; + sp68 = player->unk_03C; + temp_v0 = func_8029EC88(temp_a0, temp_a1, temp_a2, 6); + temp_t6 = temp_v0; + if (temp_v0 >= 0) { + temp_lo = temp_t6 * 0x70; + sp4C = player->posX; + sp50 = player->posY; + temp_s0 = &D_8015F9B8 + temp_lo; + sp54 = player->posZ; + sp6E = temp_t6; + func_802AD950(temp_s0 + 0x30, temp_s0->unkC + 1.0f, temp_s0->unk18, temp_s0->unk1C, temp_s0->unk20, sp4C, sp50, sp54); + func_802B4E30(temp_s0); + temp_s0->unk2 = -0x7000; + temp_s0->unk10 = (player - D_800DC4DC) / 3544; + temp_s0->unk8 = (arg0 - &D_8015F9B8) / 112; + temp_s0->unk14 = -1; + temp_s0->unk4 = 0x14; + temp_s0->unkA = arg2; + switch (arg2) { + case 0: + temp_s0->unk6 = 2; + arg0->unk12 = sp6E; + temp_s0->unk12 = -1; + break; + case 1: + temp_s0->unk6 = 3; + arg0->unk14 = sp6E; + temp_s0->unk12 = arg0->unk12; + phi_v0 = &D_8015F9B8 + (arg0->unk12 * 0x70); +block_8: + phi_v0->unk14 = sp6E; + break; + case 2: + temp_s0->unk6 = 3; + arg0->unk16 = sp6E; + temp_s0->unk12 = arg0->unk14; + phi_v0 = &D_8015F9B8 + (arg0->unk14 * 0x70); + goto block_8; + case 3: + temp_s0->unk6 = 3; + arg0->unk18 = sp6E; + temp_s0->unk12 = arg0->unk16; + phi_v0 = &D_8015F9B8 + (arg0->unk16 * 0x70); + goto block_8; + case 4: + temp_s0->unk6 = 3; + arg0->unk1A = sp6E; + temp_s0->unk12 = arg0->unk18; + phi_v0 = &D_8015F9B8 + (arg0->unk18 * 0x70); + goto block_8; + } + if ((player->unk_000 & 0x4000) != 0) { + func_800C9060(((player - D_800DC4DC) / 3544) & 0xFF, 0x19008012, &D_800DC4DC, 0xDD8); + } + } +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B2914.s") #endif @@ -886,15 +1587,72 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B2EBC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802B2FA0: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8007AC9C(s32); /* extern */ +? func_802B17F4(); /* extern */ +? func_802B18E4(?); /* extern */ +? func_802B1C9C(); /* extern */ +? func_802B1E48(); /* extern */ +? func_802B1FFC(); /* extern */ +? func_802B2C40(); /* extern */ +? func_802B2D70(); /* extern */ +? func_802B2EBC(); /* extern */ -Unable to determine jump table for jr instruction at func_802B2FA0.s line 19. +void func_802B2FA0(Player *player) { + s32 sp1C; + s16 temp_t9; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp1C = (player - D_800DC4DC) / 3544; + temp_t9 = player->unk10; + switch (temp_t9) { + case 3: + func_802B1C9C(); + break; + case 5: + func_802B1E48(); + break; + case 7: + func_802B1FFC(); + break; + case 1: + func_802B2D70(); + break; + case 2: + func_802B17F4(); + break; + case 12: + player->unk_00C |= 0x200; + break; + case 13: + player->unk_00C |= 0x200; + break; + case 14: + player->unk_00C |= 0x200; + break; + case 15: + player->unk_00C |= 0x200; + break; + case 11: + player->unk_00C |= 0x800; + break; + case 10: + player->unk_00C |= 0x2000; + break; + case 8: + func_802B2EBC(); + break; + case 9: + func_802B2C40(); + break; + case 4: + func_802B18E4(0x15); + break; + case 6: + func_802B18E4(0x16); + break; + } + func_8007AC9C(sp1C); +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B2FA0.s") #endif @@ -950,15 +1708,226 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B30EC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function update_obj_green_shell: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000EDC8(s32); /* extern */ +? func_800C9060(u8, ?); /* extern */ +? func_800C90F4(u8, s32); /* extern */ +? func_800C98B8(void *, void *, ?); /* extern */ +? func_8029E854(f32, void *); /* extern */ +? func_8029FDC8(f32, void *); /* extern */ +? func_802AC098(void *, void *); /* extern */ +? func_802AD950(void *, ?, f32, f32, f32, f32, f32, f32); /* extern */ +? func_802B0210(s16 *, void *); /* extern */ +? func_802B4E30(void *); /* extern */ +? func_802B63B8(f32 *, f32 *, f32 *); /* extern */ +? func_802B64C4(f32 *, s16); /* extern */ +extern ? D_8015F9B8; -Unable to determine jump table for jr instruction at update_obj_green_shell.s line 68. +void update_obj_green_shell(void *arg0) { + f32 sp80; + f32 sp7C; + f32 sp78; + f32 sp74; + f32 sp70; + f32 sp6C; + f32 sp54; + void *sp34; + Player *temp_s1; + Player *temp_s1_2; + Player *temp_s1_4; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f12; + f32 temp_f14; + f32 temp_f18; + f32 temp_f2; + f32 temp_f2_2; + s16 temp_t4; + s16 temp_t9; + s16 temp_v0; + s16 temp_v0_2; + u16 temp_t3; + u16 temp_v1; + void *temp_a0; + void *temp_s1_3; + void *temp_v0_3; + f32 phi_f2; + f32 phi_f2_2; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_f2 = arg0->unk20; + temp_f0 = arg0->unk18; + temp_f12 = arg0->unk1C; + if ((temp_f2 < D_8015F6F2) || (D_8015F6F0 < temp_f2) || (temp_f0 < D_8015F6EA) || (D_8015F6E8 < temp_f0) || (temp_f12 < D_8015F6EE)) { + func_8029FDC8(temp_f12, arg0); + } + temp_t3 = arg0->unk6; + arg0->unk10 = arg0->unk10 + 0x71C; + switch (temp_t3) { + case 0: + temp_s1 = &gPlayers[arg0->unk14]; + func_802B0210(&temp_s1->unk_110, arg0 + 0x30); + sp6C = 0.0f; + sp70 = temp_s1->unk_070; + sp74 = -(temp_s1->unk_070 + arg0->unkC + 2.0f); + func_802B63B8(&sp6C, temp_s1->unk_174); + arg0->unk18 = sp6C + temp_s1->posX; + temp_f14 = temp_s1->posY - sp70; + arg0->unk20 = sp74 + temp_s1->posZ; + sp54 = temp_f14; + temp_f0_2 = func_802ABE30(arg0->unk18, temp_f14, arg0->unk20, temp_s1->unk_11A); + temp_f2_2 = temp_f14 - temp_f0_2; + if ((temp_f2_2 < 5.0f) && (temp_f2_2 > -5.0f)) { + arg0->unk1C = arg0->unkC + temp_f0_2; + } else { + arg0->unk1C = temp_f14; + } + if (((temp_s1->unk_000 & 0x4000) != 0) && (temp_t9 = arg0->unk14, temp_v1 = gControllers[temp_t9].buttonDepressed, ((temp_v1 & 0x2000) != 0))) { + gControllers[temp_t9].buttonDepressed = temp_v1 & 0xDFFF; + if (gControllers[temp_t9].rawStickY < -0x2D) { + temp_f0_3 = temp_s1->unk_094; + phi_f2 = 8.0f; + if (temp_f0_3 > 8.0f) { + phi_f2 = temp_f0_3 * D_802B9F5C; + } + sp6C = 0.0f; + sp70 = 0.0f; + sp74 = -phi_f2; + func_802B64C4(&sp6C, temp_s1->unk_02E + temp_s1->unk_0C0); + arg0->unk24 = sp6C; + arg0->unk28 = sp70; + arg0->unk6 = 2; + arg0->unk2C = sp74; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (temp_s1->characterId * 0x10) + 0x29008000); + func_8000EDC8((arg0 - &D_8015F9B8) / 112); + return; + } + arg0->unk6 = 1; + if (temp_s1->unk_0C0 > 0) { + arg0->unk12 = 0x78E3; + return; + } + arg0->unk12 = -0x78E4; + return; + } + default: + return; + case 1: + temp_v0 = arg0->unk12; + temp_s1_2 = &gPlayers[arg0->unk14]; + if (temp_v0 > 0) { + arg0->unk12 = temp_v0 - 0xE38; + if (arg0->unk12 < 0) { + arg0->unk6 = 2; + arg0->unk4 = 0x1E; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (temp_s1_2->characterId * 0x10) + 0x29008000); + func_8000EDC8((arg0 - &D_8015F9B8) / 112); + } + } else { + arg0->unk12 = temp_v0 + 0xE38; + if (arg0->unk12 > 0) { + arg0->unk6 = 2; + arg0->unk4 = 0x1E; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (temp_s1_2->characterId * 0x10) + 0x29008000); + func_8000EDC8((arg0 - &D_8015F9B8) / 112); + } + } + if (arg0->unk6 == 2) { + temp_f0_4 = temp_s1_2->unk_094; + phi_f2_2 = 8.0f; + if (temp_f0_4 > 8.0f) { + phi_f2_2 = temp_f0_4 * D_802B9F60; + } + sp6C = 0.0f; + sp70 = 0.0f; + sp74 = phi_f2_2; + func_802B64C4(&sp6C, temp_s1_2->unk_02E + temp_s1_2->unk_0C0); + arg0->unk24 = sp6C; + arg0->unk28 = sp70; + arg0->unk2C = sp74; + return; + } + sp6C = func_802B8018(arg0->unk12) * 6.0f; + sp70 = arg0->unkC - temp_s1_2->unk_070; + sp74 = func_802B8038(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) * 6.0f; + func_802B63B8(&sp6C, temp_s1_2->unk_174); + arg0->unk18 = sp6C + temp_s1_2->posX; + arg0->unk1C = sp70 + temp_s1_2->posY; + arg0->unk20 = sp74 + temp_s1_2->posZ; + return; + case 2: + temp_v0_2 = arg0->unk4; + if (temp_v0_2 > 0) { + arg0->unk4 = temp_v0_2 - 1; + if (arg0->unk4 == 0) { + arg0->unk2 = arg0->unk2 & 0xEFFF; + } + } + arg0->unk28 = arg0->unk28 - 0.5f; + if (arg0->unk28 < -2.0f) { + arg0->unk28 = -2.0f; + } + temp_a0 = arg0 + 0x30; + sp78 = arg0->unk18; + sp7C = arg0->unk1C; + sp80 = arg0->unk20; + arg0->unk18 = arg0->unk18 + arg0->unk24; + arg0->unk1C = arg0->unk1C + arg0->unk28; + arg0->unk20 = arg0->unk20 + arg0->unk2C; + sp34 = temp_a0; + func_802AD950(temp_a0, 0x40800000, arg0->unk18, arg0->unk1C, arg0->unk20, sp78, sp7C, sp80); + func_802B4E30(arg0); + temp_s1_3 = arg0 + 0x24; + if ((arg0->unk3C < 0.0f) || (arg0->unk40 < 0.0f)) { + func_802AC098(temp_a0, temp_s1_3); + func_800C98B8(arg0 + 0x18, temp_s1_3, 0x19008054); + arg0->unk2 = arg0->unk2 | 0x80; + return; + } + /* Duplicate return node #46. Try simplifying control flow for better match */ + return; + case 4: + temp_v0_3 = (arg0->unk4 * 0x70) + &D_8015F9B8; + temp_s1_4 = &gPlayers[arg0->unk14]; + if (temp_v0_3->unk0 != 0x15) { + func_8029FDC8((bitwise f32) arg0); + return; + } + temp_t4 = arg0->unk12 + temp_v0_3->unk10; + arg0->unk12 = temp_t4; + sp6C = func_802B8018(temp_t4 & 0xFFFF) * 8.0f; + sp70 = arg0->unkC - temp_s1_4->unk_070; + temp_f18 = func_802B8038(arg0->unk12, MIPS2C_ERROR(Read from unset register $a1)) * 8.0f; + sp74 = temp_f18; + func_802B63B8((bitwise f32 *) 8.0f, &sp6C, temp_s1_4->unk_174); + sp78 = arg0->unk18; + sp7C = arg0->unk1C; + sp80 = arg0->unk20; + arg0->unk18 = sp6C + temp_s1_4->posX; + arg0->unk1C = sp70 + temp_s1_4->posY; + arg0->unk20 = temp_f18 + temp_s1_4->posZ; + func_802AD950(arg0 + 0x30, 0x40800000, arg0->unk18, arg0->unk1C, arg0->unk20, sp78, sp7C, sp80); + func_802B4E30(arg0); + return; + case 5: + arg0->unk28 = arg0->unk28 - D_802B9F64; + if (arg0->unk28 < -5.0f) { + arg0->unk28 = -5.0f; + } + arg0->unk4 = arg0->unk4 - 1; + arg0->unk12 = arg0->unk12 + 0x5B0; + arg0->unk1C = arg0->unk1C + arg0->unk28; + if (arg0->unk4 == 0) { + func_8029E854(-5.0f, arg0); + } + /* Duplicate return node #46. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_green_shell.s") #endif @@ -1218,15 +2187,335 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B4104.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function update_obj_red_blue_shell: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_8000ED80(s32); /* extern */ +? func_8000EE10(s32); /* extern */ +? func_800C9060(u8, ?); /* extern */ +? func_800C90F4(u8, s32); /* extern */ +? func_800C9D80(void *, void *, ?); /* extern */ +? func_8029E854(f32, void *); /* extern */ +? func_8029FDC8(f32, void *); /* extern */ +? func_802AD950(void *, ?, f32, f32, f32, f32, f32, f32); /* extern */ +? func_802B0210(s16 *, void *); /* extern */ +? func_802B3B44(void *); /* extern */ +? func_802B3E7C(void *, Player *); /* extern */ +? func_802B4104(void *); /* extern */ +? func_802B4E30(void *); /* extern */ +? func_802B63B8(f32 *, f32 *); /* extern */ +? func_802B64C4(f32 *, s16); /* extern */ +extern ? D_8015F9B8; +extern ? D_80164438; -Unable to determine jump table for jr instruction at update_obj_red_blue_shell.s line 69. +void update_obj_red_blue_shell(void *arg0) { + f32 sp94; + f32 sp90; + f32 sp8C; + f32 sp68; + s16 sp56; + f32 sp40; + f32 sp3C; + f32 sp38; + Player *temp_s1; + Player *temp_s1_2; + Player *temp_s1_3; + f32 *temp_a0; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f10; + f32 temp_f12; + f32 temp_f14; + f32 temp_f16; + f32 temp_f2; + f32 temp_f2_2; + f32 temp_f2_3; + f32 temp_f2_4; + f32 temp_f2_5; + f32 temp_f4; + s16 temp_t3; + s16 temp_t4_2; + s16 temp_t6; + s16 temp_t7; + s16 temp_v0; + s16 temp_v0_2; + s16 temp_v0_3; + s16 temp_v0_4; + s16 temp_v0_5; + s16 temp_v0_6; + u16 temp_t4; + u16 temp_v1; + u16 temp_v1_2; + u16 temp_v1_3; + u16 temp_v1_4; + void *temp_v0_7; + struct Controller *phi_v0; + f32 phi_f0; + s16 phi_v0_2; + s16 phi_v0_3; + s16 phi_v0_4; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_f2 = arg0->unk20; + temp_f0 = arg0->unk18; + temp_f12 = arg0->unk1C; + sp56 = arg0->unk0; + if ((temp_f2 < D_8015F6F2) || (D_8015F6F0 < temp_f2) || (temp_f0 < D_8015F6EA) || (D_8015F6E8 < temp_f0) || (temp_f12 < D_8015F6EE)) { + func_8029FDC8(temp_f12, arg0); + } + temp_t4 = arg0->unk6; + arg0->unk10 = arg0->unk10 + 0x71C; + switch (temp_t4) { + case 0: + temp_s1 = &gPlayers[arg0->unk14]; + func_802B0210(&temp_s1->unk_110, arg0 + 0x30); + sp8C = 0.0f; + sp90 = temp_s1->unk_070; + temp_f16 = -(temp_s1->unk_070 + arg0->unkC + 2.0f); + sp94 = temp_f16; + func_802B63B8(&sp8C, temp_s1->unk_174); + arg0->unk18 = sp8C + temp_s1->posX; + temp_f14 = temp_s1->posY - sp90; + arg0->unk20 = temp_f16 + temp_s1->posZ; + sp68 = temp_f14; + temp_f0_2 = func_802ABE30(arg0->unk18, temp_f14, arg0->unk20, temp_s1->unk_11A); + temp_f2_2 = temp_f14 - temp_f0_2; + if ((temp_f2_2 < 5.0f) && (temp_f2_2 > -5.0f)) { + arg0->unk1C = arg0->unkC + temp_f0_2; + } else { + arg0->unk1C = temp_f14; + } + if ((temp_s1->unk_000 & 0x4000) != 0) { + if (D_800DC51C != 0) { + goto block_16; + } + phi_v0 = &gControllers[arg0->unk14]; + } else { +block_16: + phi_v0 = D_800DC4BC; + } + temp_v1 = phi_v0->buttonDepressed; + if ((temp_v1 & 0x2000) != 0) { + phi_v0->buttonDepressed = temp_v1 & 0xDFFF; + arg0->unk6 = 1; + if (temp_s1->unk_0C0 > 0) { + arg0->unk12 = 0x78E3; + return; + } + arg0->unk12 = -0x78E4; + return; + } + default: + return; + case 1: + temp_v0 = arg0->unk12; + temp_s1_2 = &gPlayers[arg0->unk14]; + if (temp_v0 > 0) { + arg0->unk12 = temp_v0 - 0x71C; + if (arg0->unk12 < 0) { + arg0->unk6 = 2; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (temp_s1_2->characterId * 0x10) + 0x29008000); + if (sp56 == 8) { + func_8000ED80((arg0 - &D_8015F9B8) / 112); + } else { + func_8000EE10((arg0 - &D_8015F9B8) / 112); + func_800C9D80(arg0 + 0x18, arg0 + 0x24, 0x51018008); + } + } + } else { + arg0->unk12 = temp_v0 + 0x71C; + if (arg0->unk12 > 0) { + arg0->unk6 = 2; + func_800C9060(arg0->unk15, 0x19008004); + func_800C90F4(arg0->unk15, (temp_s1_2->characterId * 0x10) + 0x29008000); + if (sp56 == 8) { + func_8000ED80((arg0 - &D_8015F9B8) / 112); + } else { + func_8000EE10((arg0 - &D_8015F9B8) / 112); + func_800C9D80(arg0 + 0x18, arg0 + 0x24, 0x51018008); + } + } + } + if (arg0->unk6 == 2) { + arg0->unk4 = 0x1E; + temp_f2_3 = temp_s1_2->unk_094; + phi_f0 = 8.0f; + if (temp_f2_3 > 8.0f) { + phi_f0 = temp_f2_3 * D_802B9F94; + } + sp94 = phi_f0; + temp_a0 = &sp8C; + sp8C = 0.0f; + sp90 = 0.0f; + func_802B64C4(temp_a0, temp_s1_2->unk_02E + temp_s1_2->unk_0C0); + arg0->unk24 = sp8C; + arg0->unk28 = sp90; + arg0->unk2C = sp94; + return; + } + temp_f10 = func_802B8018(arg0->unk12) * 8.0f; + sp8C = temp_f10; + temp_f4 = arg0->unkC - temp_s1_2->unk_070; + sp90 = temp_f4; + sp94 = func_802B8038(arg0->unk12) * 8.0f; + func_802B63B8(&sp8C, temp_s1_2->unk_174); + arg0->unk18 = temp_f10 + temp_s1_2->posX; + arg0->unk1C = temp_f4 + temp_s1_2->posY; + arg0->unk20 = sp94 + temp_s1_2->posZ; + return; + case 2: + temp_t7 = arg0->unk14; + arg0->unk4 = arg0->unk4 - 1; + if (arg0->unk4 == 0) { + arg0->unk2 = arg0->unk2 & 0xEFFF; + if (arg0->unk0 == 0x2A) { + arg0->unk6 = 8; + arg0->unk4 = D_8015F8F0; + arg0->unk8 = 1000.0f; + temp_v1_2 = D_80164430; + temp_v0_2 = *(&D_80164438 + (((&gPlayers[temp_t7] - D_800DC4DC) / 3544) * 2)) + 8; + phi_v0_2 = temp_v0_2; + if (temp_v1_2 < temp_v0_2) { + phi_v0_2 = temp_v0_2 - temp_v1_2; + } + arg0->unk12 = phi_v0_2; + } else if (gModeSelection == 3) { + arg0->unk8 = 1000.0f; + arg0->unk4 = func_802B3FD0(&gPlayers[temp_t7], arg0); + if (arg0->unk4 < 0) { + arg0->unk2 = -0x8000; + arg0->unk12 = 0; + arg0->unk4 = 0x3C; + arg0->unk6 = 7; + arg0->unk28 = 3.0f; + } else { + arg0->unk6 = 3; + } + } else { + temp_v0_3 = gPlayers[temp_t7].unk_004; + if (temp_v0_3 == 0) { + arg0->unk6 = 4; + arg0->unk4 = 0x258; + temp_v1_3 = D_80164430; + temp_v0_4 = *(&D_80164438 + (((&gPlayers[temp_t7] - D_800DC4DC) / 3544) * 2)) + 8; + phi_v0_3 = temp_v0_4; + if (temp_v1_3 < temp_v0_4) { + phi_v0_3 = temp_v0_4 - temp_v1_3; + } + arg0->unk12 = phi_v0_3; + } else if (temp_v0_3 >= 5) { + arg0->unk6 = 5; + arg0->unk8 = 1000.0f; + temp_v1_4 = D_80164430; + temp_v0_5 = *(&D_80164438 + (((&gPlayers[temp_t7] - D_800DC4DC) / 3544) * 2)) + 8; + phi_v0_4 = temp_v0_5; + if (temp_v1_4 < temp_v0_5) { + phi_v0_4 = temp_v0_5 - temp_v1_4; + } + arg0->unk12 = phi_v0_4; + arg0->unk4 = (&D_8015F8F0)[gPlayers[temp_t7].unk_004].unk-2; + } else { + arg0->unk6 = 3; + arg0->unk8 = 1000.0f; + arg0->unk4 = (&D_8015F8F0)[gPlayers[temp_t7].unk_004].unk-2; + } + } + } + arg0->unk28 = arg0->unk28 - 0.5; + if (arg0->unk28 < -2.0f) { + arg0->unk28 = -2.0f; + } + sp38 = arg0->unk18; + sp3C = arg0->unk1C; + sp40 = arg0->unk20; + arg0->unk18 = arg0->unk18 + arg0->unk24; + arg0->unk1C = arg0->unk1C + arg0->unk28; + arg0->unk20 = arg0->unk20 + arg0->unk2C; + func_802AD950(arg0 + 0x30, 0x40800000, arg0->unk18, arg0->unk1C, arg0->unk20, sp38, sp3C, sp40); + func_802B4E30(arg0); + func_802B4104(arg0); + return; + case 3: + func_802B3E7C(arg0, &gPlayers[arg0->unk4]); + return; + case 4: + func_802B3B44(arg0); + temp_v0_6 = arg0->unk4; + if (temp_v0_6 == 0) { + if ((arg0->unk2 & 0xF) == 0) { + func_8029FDC8((bitwise f32) arg0); + return; + } + arg0->unk4 = temp_v0_6 - 1; + return; + } + /* Duplicate return node #73. Try simplifying control flow for better match */ + return; + case 5: + func_802B3B44(arg0); + temp_t4_2 = arg0->unk4; + temp_f0_3 = gPlayers[temp_t4_2].posX - arg0->unk18; + temp_f2_4 = gPlayers[temp_t4_2].posZ - arg0->unk20; + if (((temp_f0_3 * temp_f0_3) + (temp_f2_4 * temp_f2_4)) < D_802B9F98) { + arg0->unk6 = 3; + return; + } + /* Duplicate return node #73. Try simplifying control flow for better match */ + return; + case 6: + temp_v0_7 = (arg0->unk4 * 0x70) + &D_8015F9B8; + temp_s1_3 = &gPlayers[arg0->unk14]; + if (temp_v0_7->unk0 != 0x16) { + func_8029FDC8((bitwise f32) arg0); + return; + } + temp_t6 = arg0->unk12 + temp_v0_7->unk10; + arg0->unk12 = temp_t6; + sp8C = func_802B8018(temp_t6 & 0xFFFF) * 8.0f; + sp90 = arg0->unkC - temp_s1_3->unk_070; + sp94 = func_802B8038(arg0->unk12) * 8.0f; + func_802B63B8(&sp8C, temp_s1_3->unk_174); + sp38 = arg0->unk18; + sp3C = arg0->unk1C; + sp40 = arg0->unk20; + arg0->unk18 = sp8C + temp_s1_3->posX; + arg0->unk1C = sp90 + temp_s1_3->posY; + arg0->unk20 = sp94 + temp_s1_3->posZ; + func_802AD950(arg0 + 0x30, 0x40800000, arg0->unk18, arg0->unk1C, arg0->unk20, sp38, sp3C, sp40); + func_802B4E30(arg0); + return; + case 7: + arg0->unk28 = arg0->unk28 - D_802B9F9C; + if (arg0->unk28 < -5.0f) { + arg0->unk28 = -5.0f; + } + arg0->unk4 = arg0->unk4 - 1; + arg0->unk12 = arg0->unk12 + 0x5B0; + arg0->unk1C = arg0->unk1C + arg0->unk28; + if (arg0->unk4 == 0) { + func_8029E854(-5.0f, arg0); + return; + } + /* Duplicate return node #73. Try simplifying control flow for better match */ + return; + case 8: + func_802B3B44(arg0); + arg0->unk4 = D_8015F8F0; + temp_t3 = D_8015F8F0; + temp_f0_4 = gPlayers[temp_t3].posX - arg0->unk18; + temp_f2_5 = gPlayers[temp_t3].posZ - arg0->unk20; + if (((temp_f0_4 * temp_f0_4) + (temp_f2_5 * temp_f2_5)) < D_802B9FA0) { + arg0->unk6 = 9; + return; + } + /* Duplicate return node #73. Try simplifying control flow for better match */ + return; + case 9: + func_802B3E7C(arg0, &gPlayers[arg0->unk4]); + /* Duplicate return node #73. Try simplifying control flow for better match */ + return; + } +} #else GLOBAL_ASM("asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s") #endif diff --git a/src/crash_screen.c b/src/crash_screen.c index eca23b645..437404037 100644 --- a/src/crash_screen.c +++ b/src/crash_screen.c @@ -63,11 +63,12 @@ void crash_screen_draw_glyph(u16 *framebuffer, s32 x, s32 y, s32 glyph) { } } -GLOBAL_ASM("asm/non_matchings/crash_screen/crash_screen.s") +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? osViSwapBuffer(s32); /* extern */ +? osWritebackDCacheAll(s32, s32, s16, s16); /* extern */ -/* - -void crash_screen_draw_square(uint_ptr arg0, s32 arg1) { +void crash_screen_draw_square(s32 arg0, s32 arg1) { s32 temp_a0; s32 temp_a1; s32 temp_a1_2; @@ -103,26 +104,26 @@ void crash_screen_draw_square(uint_ptr arg0, s32 arg1) { phi_a1_4 = phi_a1_3; if (phi_s2 < phi_s0) { do { + phi_v1 = phi_s2; + phi_v1_2 = phi_s2; if (phi_s2 < phi_s0) { temp_a0 = phi_s0 - phi_s2; temp_t0 = temp_a0 & 3; temp_ra = arg0 + (phi_s1 * 0x280); - phi_v1_2 = phi_s2; + phi_a0_3 = temp_a0; if (temp_t0 != 0) { phi_v0 = temp_ra + (phi_s2 * 2); - phi_v1 = phi_s2; do { temp_v1 = phi_v1 + 1; + phi_v1 = temp_v1; + phi_v1_2 = temp_v1; if (temp_a0 == 6) { *phi_v0 = 0xF801; } else { *phi_v0 = 0xFFFF; } phi_v0 += 2; - phi_v1 = temp_v1; } while ((temp_t0 + phi_s2) != temp_v1); - phi_v1_2 = temp_v1; - phi_a0_3 = temp_a0; phi_a1_4 = temp_v1 * 2; if (temp_v1 != phi_s0) { goto block_10; @@ -134,6 +135,8 @@ block_10: phi_a1 = temp_a1; do { temp_a1_2 = phi_a1 + 8; + phi_a1 = temp_a1_2; + phi_a1_4 = temp_a1_2; if (temp_a0 == 6) { phi_v0_2->unk0 = 0xF801; } else { @@ -155,9 +158,6 @@ block_10: phi_v0_2->unk6 = 0xFFFF; } phi_v0_2 += 8; - phi_a1 = temp_a1_2; - phi_a0_3 = temp_a0; - phi_a1_4 = temp_a1_2; } while (temp_a1_2 != (phi_s0 * 2)); } } @@ -176,8 +176,18 @@ block_10: osWritebackDCacheAll(phi_a0, phi_a1_2, 0xF801, 0xFFFF); osViSwapBuffer(arg0); } +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/crash_screen_draw_square.s") +#endif -void crash_screen_draw_info(uint_ptr arg0, void *arg1) { +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? crash_screen_draw_glyph(s32, s32, s32, u32); /* extern */ +? osViSwapBuffer(s32); /* extern */ +? osWritebackDCacheAll(); /* extern */ +extern s32 D_800DC670; + +void crash_screen_draw_info(s32 arg0, void *arg1) { s32 temp_a2; s32 temp_s0; s32 temp_s1; @@ -229,52 +239,54 @@ loop_3: } temp_t0 = phi_t0 + 0x14; phi_t0 = temp_t0; - } while ((temp_t0 < 0x3C) != 0); + } while (temp_t0 < 0x3C); temp_s0 = (D_800DC670 * 0x18) + 0x35; - func_800040C0(arg0, 0x6C, temp_s0, arg1->unk14 & 0xF); - func_800040C0(arg0, 0x74, temp_s0, 0x10U); + crash_screen_draw_glyph(arg0, 0x6C, temp_s0, arg1->unk14 & 0xF); + crash_screen_draw_glyph(arg0, 0x74, temp_s0, 0x10); temp_s2 = arg1 + 0x20; phi_s1 = 0xB4; phi_s4 = temp_s2->unkFC; + phi_s1_2 = 0xB4; + phi_s1_3 = 0xB4; do { - func_800040C0(arg0, phi_s1, temp_s0, phi_s4 & 0xF); + crash_screen_draw_glyph(arg0, phi_s1, temp_s0, phi_s4 & 0xF); temp_s1 = phi_s1 - 8; phi_s1 = temp_s1; phi_s4 = phi_s4 >> 4; - } while ((temp_s1 < 0x7C) == 0); - temp_s1_2 = ((u32) temp_s2->unk100 >> 2) & 0x1F; - func_800040C0(arg0, 0xBC, temp_s0, 0x10U); - func_800040C0(arg0, 0xC4, temp_s0, temp_s1_2 >> 4); - func_800040C0(arg0, 0xCC, temp_s0, temp_s1_2 & 0xF); - phi_s1_2 = 0xB4; + } while (temp_s1 >= 0x7C); + temp_s1_2 = (temp_s2->unk100 >> 2) & 0x1F; + crash_screen_draw_glyph(arg0, 0xBC, temp_s0, 0x10); + crash_screen_draw_glyph(arg0, 0xC4, temp_s0, temp_s1_2 >> 4); + crash_screen_draw_glyph(arg0, 0xCC, temp_s0, temp_s1_2 & 0xF); phi_s4_2 = temp_s2->unkE4; do { - func_800040C0(arg0, phi_s1_2, 0x49, phi_s4_2 & 0xF); + crash_screen_draw_glyph(arg0, phi_s1_2, 0x49, phi_s4_2 & 0xF); temp_s1_3 = phi_s1_2 - 8; temp_t3 = phi_s4_2 >> 4; phi_s1_2 = temp_s1_3; phi_s4_2 = temp_t3; - } while ((temp_s1_3 < 0x7C) == 0); - temp_t4 = temp_s2->unkFC & ~3; - phi_s1_3 = 0xB4; - phi_s4_3 = temp_t3; - if (temp_t4 >= 0x80000001U) { - phi_s1_3 = 0xB4; phi_s4_3 = temp_t3; - if (temp_t4 < 0x803FFF7FU) { - phi_s1_3 = 0xB4; - phi_s4_3 = *temp_t4; - } + } while (temp_s1_3 >= 0x7C); + temp_t4 = temp_s2->unkFC & ~3; + if ((temp_t4 >= 0x80000001) && (temp_t4 < 0x803FFF7F)) { + phi_s4_3 = *temp_t4; } do { - func_800040C0(arg0, phi_s1_3, 0x5D, phi_s4_3 & 0xF); + crash_screen_draw_glyph(arg0, phi_s1_3, 0x5D, phi_s4_3 & 0xF); temp_s1_4 = phi_s1_3 - 8; phi_s1_3 = temp_s1_4; phi_s4_3 = phi_s4_3 >> 4; - } while ((temp_s1_4 < 0x7C) == 0); + } while (temp_s1_4 >= 0x7C); osWritebackDCacheAll(); osViSwapBuffer(arg0); } +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/crash_screen_draw_info.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void *__osGetCurrFaultedThread(); /* extern */ void *get_faulted_thread(void) { s32 temp_v0_2; @@ -284,9 +296,9 @@ void *get_faulted_thread(void) { void *phi_v1; temp_v0 = __osGetCurrFaultedThread(); + phi_v1 = temp_v0; if (temp_v0->unk4 != -1) { phi_v0 = temp_v0->unk4; - phi_v1 = temp_v0; loop_2: if ((phi_v0 > 0) && (phi_v0 < 0x80) && ((phi_v1->unk12 & 3) != 0)) { return phi_v1; @@ -303,12 +315,31 @@ loop_2: block_7: return NULL; } +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/get_faulted_thread.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? crash_screen_draw_info(s32, s32); /* extern */ +? crash_screen_draw_square(s32); /* extern */ +s32 get_faulted_thread(); /* extern */ +? osRecvMesg(? *, ? *, ?); /* extern */ +? osSetEventMesg(?, ? *, ?); /* extern */ +? read_controllers(); /* extern */ +extern void *D_800DC4BC; +extern s32 D_800DC670; +extern ? D_800DC6FC; +extern ? D_80162D40; +extern s32 D_80162D60; +extern s32 D_80162D64; +extern s32 pFramebuffer; void thread9_crash_screen(s32 arg0) { ? sp44; + s32 temp_v0; s32 temp_v1; u16 temp_v0_2; - void *temp_v0; osSetEventMesg(0xC, &D_80162D40, 0x10); osSetEventMesg(0xA, &D_80162D40, 0x10); @@ -320,49 +351,70 @@ loop_1: if (temp_v0 == 0) { goto loop_1; } - if (D_800DC670 != 0) { - goto block_10; - } - crash_screen_draw_square(pFramebuffer); + if (D_800DC670 == 0) { + crash_screen_draw_square(pFramebuffer); + do { loop_4: - read_controllers(); - temp_v0_2 = D_800DC4BC->unk6; - if (temp_v0_2 == 0) { - goto loop_4; + read_controllers(); + temp_v0_2 = D_800DC4BC->unk6; + if (temp_v0_2 == 0) { + goto loop_4; + } + temp_v1 = D_80162D60; + if (temp_v0_2 == *(&D_800DC6FC + (temp_v1 * 2))) { + D_80162D60 = temp_v1 + 1; + } else { + D_80162D60 = 0; + } + } while (*(&D_800DC6FC + (D_80162D60 * 2)) != 0xFFFF); + crash_screen_draw_info(pFramebuffer, D_80162D64); } - temp_v1 = D_80162D60; - if (temp_v0_2 != *(&D_800DC6FC + (temp_v1 * 2))) { - goto block_7; - } - D_80162D60 = (s32) (temp_v1 + 1); - goto block_8; -block_7: - D_80162D60 = 0; -block_8: - if (*(&D_800DC6FC + (D_80162D60 * 2)) != 0xFFFF) { - goto loop_4; - } - crash_screen_draw_info(pFramebuffer, D_80162D64); -block_10: if (D_800DC670 >= 5) { goto loop_1; } - D_800DC670 = (s32) (D_800DC670 + 1); + D_800DC670 += 1; goto loop_1; } +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/thread9_crash_screen.s") +#endif -// crash_screen_set_framebuffer -void func_800046AC(uintptr_t framebuffer) { - pFramebuffer = framebuffer; +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern s32 pFramebuffer; + +void func_800046AC(s32 arg0) { + pFramebuffer = arg0; } +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/func_800046AC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? osCreateMesgQueue(? *, ? *, ?); /* extern */ +? osCreateThread(? *, ?, ? *, ?, ? *, s32); /* extern */ +extern ? D_80162790; +extern ? D_80162D40; +extern ? D_80162D58; +extern ? thread9_crash_screen; void create_debug_thread(void) { osCreateMesgQueue(&D_80162D40, &D_80162D58, 1); - osCreateThread(&D_80162790, 9, thread9_crash_screen, 0, &D_80162D40, 0x7F); + osCreateThread(&D_80162790, 9, &thread9_crash_screen, 0, &D_80162D40, 0x7F); } +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/create_debug_thread.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? osStartThread(? *); /* extern */ +extern ? D_80162790; void start_debug_thread(void) { osStartThread(&D_80162790); } - -*/ +#else +GLOBAL_ASM("asm/non_matchings/crash_screen/start_debug_thread.s") +#endif diff --git a/src/math_util.c b/src/math_util.c index 2754a314e..36f64dd58 100644 --- a/src/math_util.c +++ b/src/math_util.c @@ -162,7 +162,9 @@ void *func_802B5320(Vec3f dest, f32 x, f32 y, f32 z) { dest[2] = z; return &dest; } -/* + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 void func_802B5350(void *arg0, void *arg1) { s32 temp_v0; void *temp_a2; @@ -177,19 +179,22 @@ void func_802B5350(void *arg0, void *arg1) { do { temp_v0 = phi_v0 + 1; temp_v1 = phi_v1 + 0x10; - temp_v1->unk-10 = (f32) phi_a2->unk0; + temp_v1->unk-10 = phi_a2->unk0; temp_a2 = phi_a2 + 0x10; - temp_v1->unk-C = (f32) phi_a2->unk4; - temp_v1->unk-8 = (f32) temp_a2->unk-8; - temp_v1->unk-4 = (f32) temp_a2->unk-4; + temp_v1->unk-C = phi_a2->unk4; + temp_v1->unk-8 = temp_a2->unk-8; + temp_v1->unk-4 = temp_a2->unk-4; phi_a2 = temp_a2; phi_v1 = temp_v1; phi_v0 = temp_v0; } while (temp_v0 != 4); } -*/ +#else GLOBAL_ASM("asm/non_matchings/math_util/func_802B5350.s") -/* +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 void func_802B5398(void *arg0, s32 *arg1, s32 arg2) { void *temp_a0; s32 *phi_a1; @@ -202,49 +207,1931 @@ void func_802B5398(void *arg0, s32 *arg1, s32 arg2) { if (arg2 > 0) { do { temp_a0 = phi_a0 + 4; - temp_a0->unk-4 = (s32) *phi_a1; + temp_a0->unk-4 = *phi_a1; phi_a1 += 4; phi_a0 = temp_a0; phi_a2 += -1; - } while ((phi_a2 > 0) != 0); + } while (phi_a2 > 0); } } -*/ +#else GLOBAL_ASM("asm/non_matchings/math_util/func_802B5398.s") -/* -void func_802B53C8(struct UnkStruct_802B53C8 *arg0) { +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B53C8(void *arg0) { s32 temp_v0; s32 phi_v0; + void *phi_v1; phi_v0 = 0; + phi_v1 = arg0; do { if (phi_v0 == 0) { - arg0->unk0 = 1.0f; + phi_v1->unk0 = 1.0f; } else { - arg0->unk0 = 0.0f; + phi_v1->unk0 = 0.0f; } if (phi_v0 == 1) { - arg0->unk4 = 1.0f; + phi_v1->unk4 = 1.0f; } else { - arg0->unk4 = 0.0f; + phi_v1->unk4 = 0.0f; } if (phi_v0 == 2) { - arg0->unk8 = 1.0f; + phi_v1->unk8 = 1.0f; } else { - arg0->unk8 = 0.0f; + phi_v1->unk8 = 0.0f; } if (phi_v0 == 3) { - arg0->unkC = 1.0f; + phi_v1->unkC = 1.0f; } else { - arg0->unkC = 0.0f; + phi_v1->unkC = 0.0f; } temp_v0 = phi_v0 + 1; phi_v0 = temp_v0; - arg0 += 0x10; + phi_v1 += 0x10; } while (temp_v0 != 4); } -*/ +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B53C8.s") +#endif +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B5450(void *arg0, void *arg1, void *arg2) { + arg1->unk30 = arg2->unk0 + arg0->unk30; + arg1->unk34 = arg2->unk4 + arg0->unk34; + arg1->unk38 = arg2->unk8 + arg0->unk38; + arg1->unk3C = arg0->unk3C; + arg1->unk0 = arg0->unk0; + arg1->unk4 = arg0->unk4; + arg1->unk8 = arg0->unk8; + arg1->unkC = arg0->unkC; + arg1->unk10 = arg0->unk10; + arg1->unk14 = arg0->unk14; + arg1->unk18 = arg0->unk18; + arg1->unk1C = arg0->unk1C; + arg1->unk20 = arg0->unk20; + arg1->unk24 = arg0->unk24; + arg1->unk28 = arg0->unk28; + arg1->unk2C = arg0->unk2C; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5450.s") +#endif -GLOBAL_ASM("asm/non_matchings/math_util/code_cont.s") +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B53C8(); /* extern */ +void func_802B5520(void *arg0, void *arg1) { + func_802B53C8(); + arg0->unk30 = arg1->unk0; + arg0->unk34 = arg1->unk4; + arg0->unk38 = arg1->unk8; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5520.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 cosf(f32, f32); /* extern */ +? func_802B53C8(f32); /* extern */ +f32 sinf(f32); /* extern */ +static f64 D_802B9FB0 = 0.017453292222222222; + +void func_802B5564(void *arg0, s16 *arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { + f32 sp20; + f32 sp1C; + f32 temp_f10; + f32 temp_f10_2; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f12_3; + f32 temp_f12_4; + f32 temp_f14; + f32 temp_f14_2; + f32 temp_f14_3; + f32 temp_f14_4; + f32 temp_f16; + f32 temp_f16_2; + f32 temp_f18; + f32 temp_f2; + f64 temp_f0; + s32 temp_v1; + u32 temp_t8; + void *temp_v0; + void *temp_v0_2; + f32 phi_f10; + void *phi_v0; + f32 phi_f16; + f32 phi_f12; + f32 phi_f14; + s32 phi_v1; + f32 phi_f10_2; + void *phi_v0_2; + f32 phi_f16_2; + f32 phi_f12_2; + f32 phi_f14_2; + + temp_f14 = arg2; + arg2 = temp_f14; + func_802B53C8(temp_f14); + temp_f14_2 = arg2 * D_802B9FB0; + temp_f12 = temp_f14_2 / 2.0f; + sp1C = temp_f12; + sp20 = cosf(temp_f12, temp_f14_2); + temp_f2 = sp20 / sinf(temp_f12); + temp_f18 = arg4 + arg5; + temp_f12_2 = arg4 - arg5; + arg0->unk2C = -1.0f; + arg0->unk14 = temp_f2; + arg0->unk28 = temp_f18 / temp_f12_2; + arg0->unk0 = temp_f2 / arg3; + arg0->unk3C = 0.0f; + arg0->unk38 = (2.0f * arg4 * arg5) / temp_f12_2; + temp_f16 = arg0->unk4; + temp_f10 = arg0->unk0 * arg6; + temp_f12_3 = arg0->unk8; + temp_f14_3 = arg0->unkC; + phi_f10 = temp_f10; + phi_v0 = arg0; + phi_f16 = temp_f16; + phi_f12 = temp_f12_3; + phi_f14 = temp_f14_3; + phi_v1 = 1; + phi_f10_2 = temp_f10; + phi_v0_2 = arg0; + phi_f16_2 = temp_f16; + phi_f12_2 = temp_f12_3; + phi_f14_2 = temp_f14_3; + if (1 != 4) { + do { + temp_f16_2 = phi_v0->unk14; + temp_f12_4 = phi_v0->unk18; + temp_v1 = phi_v1 + 1; + temp_f14_4 = phi_v0->unk1C; + phi_v0->unk0 = phi_f10; + temp_f10_2 = phi_v0->unk10 * arg6; + phi_v0->unk4 = phi_f16 * arg6; + phi_v0->unk8 = phi_f12 * arg6; + temp_v0 = phi_v0 + 0x10; + temp_v0->unk-4 = phi_f14 * arg6; + phi_f10 = temp_f10_2; + phi_v0 = temp_v0; + phi_f16 = temp_f16_2; + phi_f12 = temp_f12_4; + phi_f14 = temp_f14_4; + phi_v1 = temp_v1; + phi_f10_2 = temp_f10_2; + phi_v0_2 = temp_v0; + phi_f16_2 = temp_f16_2; + phi_f12_2 = temp_f12_4; + phi_f14_2 = temp_f14_4; + } while (temp_v1 != 4); + } + temp_v0_2 = phi_v0_2 + 0x10; + temp_v0_2->unk-10 = phi_f10_2; + temp_v0_2->unk-C = phi_f16_2 * arg6; + temp_v0_2->unk-8 = phi_f12_2 * arg6; + temp_v0_2->unk-4 = phi_f14_2 * arg6; + if (arg1 != 0) { + temp_f0 = temp_f18; + if (temp_f0 <= 2.0) { + *arg1 = 0xFFFF; + return; + } + temp_t8 = 131072.0 / temp_f0; + *arg1 = temp_t8; + if ((temp_t8 & 0xFFFF) <= 0) { + *arg1 = 1; + } + /* Duplicate return node #7. Try simplifying control flow for better match */ + } +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5564.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B5794(void *arg0, void *arg1, void *arg2) { + f32 sp4C; + f32 sp48; + f32 sp30; + f32 temp_f10; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f14; + f32 temp_f14_2; + f32 temp_f16; + f32 temp_f16_2; + f32 temp_f16_3; + f32 temp_f18; + f32 temp_f18_2; + f32 temp_f20; + f32 temp_f20_2; + f32 temp_f22; + f32 temp_f22_2; + f32 temp_f28; + f32 temp_f2; + f32 temp_f2_2; + f32 temp_f6; + + temp_f12 = arg2->unk0 - arg1->unk0; + temp_f14 = arg2->unk4 - arg1->unk4; + temp_f2 = arg2->unk8 - arg1->unk8; + temp_f16 = -1.0 / sqrtf((temp_f12 * temp_f12) + (temp_f14 * temp_f14) + (temp_f2 * temp_f2)); + temp_f12_2 = temp_f12 * temp_f16; + temp_f14_2 = temp_f14 * temp_f16; + temp_f2_2 = temp_f2 * temp_f16; + temp_f16_2 = 0.0f - (1.0f * temp_f12_2); + temp_f22 = 1.0 / sqrtf((temp_f2_2 * temp_f2_2) + 0.0f + (temp_f16_2 * temp_f16_2)); + temp_f28 = temp_f2_2 * temp_f22; + temp_f18 = temp_f16_2 * temp_f22; + temp_f6 = temp_f14_2 * temp_f18; + sp30 = temp_f18; + temp_f20 = temp_f6 - (temp_f2_2 * 0.0f); + temp_f16_3 = (temp_f2_2 * temp_f28) - (temp_f12_2 * sp30); + temp_f18_2 = (temp_f12_2 * 0.0f) - (temp_f14_2 * temp_f28); + temp_f22_2 = 1.0 / sqrtf((temp_f20 * temp_f20) + (temp_f16_3 * temp_f16_3) + (temp_f18_2 * temp_f18_2)); + temp_f20_2 = temp_f20 * temp_f22_2; + temp_f10 = temp_f18_2 * temp_f22_2; + sp4C = temp_f16_3 * temp_f22_2; + sp48 = temp_f10; + arg0->unk0 = temp_f28; + arg0->unk10 = 0.0f; + arg0->unk20 = sp30; + arg0->unk30 = -((arg1->unk8 * sp30) + ((arg1->unk0 * temp_f28) + (arg1->unk4 * 0.0f))); + arg0->unk4 = temp_f20_2; + arg0->unk24 = sp48; + arg0->unk14 = sp4C; + arg0->unk8 = temp_f12_2; + arg0->unk18 = temp_f14_2; + arg0->unk28 = temp_f2_2; + arg0->unk34 = -((arg1->unk8 * sp48) + ((arg1->unk0 * temp_f20_2) + (arg1->unk4 * sp4C))); + arg0->unkC = 0.0f; + arg0->unk1C = 0.0f; + arg0->unk2C = 0.0f; + arg0->unk3C = 1.0f; + arg0->unk38 = -((arg1->unk8 * temp_f2_2) + ((arg1->unk0 * temp_f12_2) + (arg1->unk4 * temp_f14_2))); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5794.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B53C8(void *); /* extern */ +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B59DC(void *arg0, s32 arg1) { + f32 sp2C; + f32 sp28; + s32 sp24; + f32 temp_f0; + s32 temp_a0; + + temp_a0 = arg1 & 0xFFFF; + sp24 = temp_a0; + temp_f0 = func_802B8018(temp_a0); + sp2C = temp_f0; + sp28 = func_802B8038(temp_a0); + func_802B53C8(arg0); + arg0->unk18 = temp_f0; + arg0->unk24 = -temp_f0; + arg0->unk14 = sp28; + arg0->unk28 = sp28; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B59DC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_802B53C8(void *); /* extern */ +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B5A44(void *arg0, s32 arg1) { + f32 sp2C; + f32 sp28; + s32 sp24; + f32 temp_f0; + s32 temp_a0; + + temp_a0 = arg1 & 0xFFFF; + sp24 = temp_a0; + temp_f0 = func_802B8018(temp_a0); + sp2C = temp_f0; + sp28 = func_802B8038(temp_a0); + func_802B53C8(arg0); + arg0->unk20 = temp_f0; + arg0->unk8 = -temp_f0; + arg0->unk0 = sp28; + arg0->unk28 = sp28; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5A44.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_802B53C8(void *); /* extern */ +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B5AAC(void *arg0, s32 arg1) { + f32 sp2C; + f32 sp28; + s32 sp24; + f32 temp_f0; + s32 temp_a0; + + temp_a0 = arg1 & 0xFFFF; + sp24 = temp_a0; + temp_f0 = func_802B8018(temp_a0); + sp2C = temp_f0; + sp28 = func_802B8038(temp_a0); + func_802B53C8(arg0); + arg0->unk4 = temp_f0; + arg0->unk10 = -temp_f0; + arg0->unk0 = sp28; + arg0->unk14 = sp28; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5AAC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 func_802B8018(u16); /* extern */ +f32 func_802B8038(u16); /* extern */ + +void func_802B5B14(void *arg0, void *arg1) { + f32 sp70; + f32 sp6C; + f32 sp68; + f32 sp60; + f32 sp5C; + f32 sp58; + f32 sp50; + f32 sp4C; + f32 sp48; + f32 sp40; + f32 sp3C; + f32 sp38; + f32 sp30; + f32 sp2C; + f32 sp28; + f32 temp_f0; + f32 temp_f10; + f32 temp_f12; + f32 temp_f18; + f32 temp_f20; + f32 temp_f4; + f32 temp_f6; + + sp38 = func_802B8018(arg1->unk0); + temp_f20 = func_802B8038(arg1->unk0); + sp30 = func_802B8018(arg1->unk2); + sp2C = func_802B8038(arg1->unk2); + sp28 = func_802B8018(arg1->unk4); + temp_f0 = func_802B8038(arg1->unk4); + temp_f4 = arg0->unk0; + temp_f12 = sp38 * sp30; + sp3C = temp_f4; + sp40 = arg0->unk4; + temp_f6 = (sp2C * temp_f0) + (temp_f12 * sp28); + sp48 = temp_f6; + sp58 = (-sp2C * sp28) + (temp_f12 * temp_f0); + sp68 = temp_f20 * sp30; + sp4C = temp_f20 * sp28; + temp_f18 = sp38 * sp2C; + sp5C = temp_f20 * temp_f0; + sp6C = -sp38; + temp_f10 = (-sp30 * temp_f0) + (temp_f18 * sp28); + sp50 = temp_f10; + sp60 = (sp30 * sp28) + (temp_f18 * temp_f0); + sp70 = temp_f20 * sp2C; + arg0->unk0 = (temp_f10 * sp40) + ((temp_f4 * temp_f6) + (sp40 * sp4C)); + arg0->unk4 = (sp60 * sp40) + ((temp_f4 * sp58) + (sp40 * sp5C)); + arg0->unk8 = (sp70 * sp40) + ((sp3C * sp68) + (sp40 * sp6C)); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5B14.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B5CAC(u16 arg0, s32 arg1, void *arg2) { + f32 sp2C; + f32 sp28; + f32 sp24; + s32 sp1C; + f32 temp_f10; + s32 temp_a0; + + temp_a0 = arg1 & 0xFFFF; + sp1C = temp_a0; + sp2C = func_802B8018(temp_a0); + sp28 = func_802B8038(temp_a0); + sp1C = arg0; + sp24 = func_802B8018(arg0); + temp_f10 = sp28 * func_802B8038(arg0); + arg2->unk0 = sp28 * sp24; + arg2->unk4 = sp2C; + arg2->unk8 = -temp_f10; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5CAC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_802B5D64(?, s16, s16, ?); /* extern */ + +void func_802B5D30(s16 arg0, s16 arg1, ? arg2) { + func_802B5D64(0x9000000, arg0, arg1, arg2); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5D30.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ +extern ? gSegmentTable; + +void func_802B5D64(u32 arg0, u16 arg1, s32 arg2, s32 arg3) { + f32 sp48; + f32 sp44; + f32 sp40; + s8 sp2E; + s8 sp2D; + s8 sp2C; + s32 sp20; + f32 temp_f10; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_v0; + s32 temp_v0_2; + void *temp_s0; + void *temp_s0_2; + void *temp_s0_3; + void *phi_s0; + s32 phi_v0; + void *phi_s0_2; + s32 phi_v0_2; + + temp_a0 = arg2 & 0xFFFF; + temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000; + sp20 = temp_a0; + sp48 = func_802B8018(temp_a0); + sp44 = func_802B8038(temp_a0); + sp20 = arg1; + sp40 = func_802B8018(arg1); + temp_a0_2 = arg3 & 3; + temp_f10 = sp44 * func_802B8038(arg1) * -120.0f; + sp2C = sp44 * sp40 * 120.0f; + sp2D = 120.0f * sp48; + sp2E = temp_f10; + phi_v0 = 0; + phi_v0_2 = 0; + if (arg3 > 0) { + phi_s0 = temp_s0; + phi_s0_2 = temp_s0; + if (temp_a0_2 != 0) { + do { + temp_v0 = phi_v0 + 1; + temp_s0_2 = phi_s0 + 0x18; + temp_s0_2->unk-8 = sp2C; + temp_s0_2->unk-7 = sp2D; + temp_s0_2->unk-6 = sp2E; + phi_s0 = temp_s0_2; + phi_v0 = temp_v0; + phi_s0_2 = temp_s0_2; + phi_v0_2 = temp_v0; + } while (temp_a0_2 != temp_v0); + if (temp_v0 != arg3) { + goto loop_4; + } + } else { + do { +loop_4: + temp_v0_2 = phi_v0_2 + 4; + temp_s0_3 = phi_s0_2 + 0x60; + temp_s0_3->unk-50 = sp2C; + temp_s0_3->unk-4F = sp2D; + temp_s0_3->unk-4E = sp2E; + temp_s0_3->unk-38 = sp2C; + temp_s0_3->unk-37 = sp2D; + temp_s0_3->unk-36 = sp2E; + temp_s0_3->unk-20 = sp2C; + temp_s0_3->unk-1F = sp2D; + temp_s0_3->unk-1E = sp2E; + temp_s0_3->unk-8 = sp2C; + temp_s0_3->unk-7 = sp2D; + temp_s0_3->unk-6 = sp2E; + phi_s0_2 = temp_s0_3; + phi_v0_2 = temp_v0_2; + } while (temp_v0_2 != arg3); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5D64.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B5F00(void *arg0, f32 arg1) { + arg0->unk0 = arg0->unk0 * arg1; + arg0->unk10 = arg0->unk10 * arg1; + arg0->unk20 = arg0->unk20 * arg1; + arg0->unk4 = arg0->unk4 * arg1; + arg0->unk14 = arg0->unk14 * arg1; + arg0->unk24 = arg0->unk24 * arg1; + arg0->unk8 = arg0->unk8 * arg1; + arg0->unk18 = arg0->unk18 * arg1; + arg0->unk28 = arg0->unk28 * arg1; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5F00.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 func_802B8018(u16); /* extern */ +f32 func_802B8038(u16); /* extern */ + +void func_802B5F74(void *arg0, void *arg1, void *arg2) { + f32 sp3C; + f32 sp34; + f32 sp30; + f32 sp2C; + f32 temp_f0; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f20; + f32 temp_f6; + + sp3C = func_802B8018(arg2->unk0); + temp_f20 = func_802B8038(arg2->unk0); + sp34 = func_802B8018(arg2->unk2); + sp30 = func_802B8038(arg2->unk2); + sp2C = func_802B8018(arg2->unk4); + temp_f0 = func_802B8038(arg2->unk4); + temp_f12 = sp3C * sp34; + temp_f6 = temp_f12 * temp_f0; + arg0->unk0 = (sp30 * temp_f0) + (temp_f12 * sp2C); + arg0->unk20 = temp_f20 * sp34; + arg0->unk10 = (-sp30 * sp2C) + temp_f6; + arg0->unk24 = -sp3C; + temp_f12_2 = sp3C * sp30; + arg0->unk4 = temp_f20 * sp2C; + arg0->unk30 = arg1->unk0; + arg0->unk14 = temp_f20 * temp_f0; + arg0->unk34 = arg1->unk4; + arg0->unk8 = (-sp34 * temp_f0) + (temp_f12_2 * sp2C); + arg0->unk28 = temp_f20 * sp30; + arg0->unk18 = (sp34 * sp2C) + (temp_f12_2 * temp_f0); + arg0->unkC = 0.0f; + arg0->unk1C = 0.0f; + arg0->unk2C = 0.0f; + arg0->unk3C = 1.0f; + arg0->unk38 = arg1->unk8; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B5F74.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B8018(u16); /* extern */ +f32 func_802B8038(u16); /* extern */ + +void func_802B60B4(void *arg0, void *arg1, void *arg2) { + f32 sp3C; + f32 sp34; + f32 sp30; + f32 sp2C; + f32 temp_f0; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f20; + f32 temp_f6; + + sp3C = func_802B8018(arg2->unk0); + temp_f20 = func_802B8038(arg2->unk0); + sp34 = func_802B8018(arg2->unk2); + sp30 = func_802B8038(arg2->unk2); + sp2C = func_802B8018(arg2->unk4); + temp_f0 = func_802B8038(arg2->unk4); + temp_f12 = sp3C * sp34; + temp_f6 = temp_f12 * temp_f0; + arg0->unk0 = (sp30 * temp_f0) + (temp_f12 * sp2C); + arg0->unk8 = temp_f20 * sp34; + arg0->unk4 = (-sp30 * sp2C) + temp_f6; + arg0->unk10 = temp_f20 * sp2C; + temp_f12_2 = sp3C * sp30; + arg0->unk14 = temp_f20 * temp_f0; + arg0->unkC = arg1->unk0; + arg0->unk18 = -sp3C; + arg0->unk1C = arg1->unk2; + arg0->unk20 = (-sp34 * temp_f0) + (temp_f12_2 * sp2C); + arg0->unk28 = temp_f20 * sp30; + arg0->unk24 = (sp34 * sp2C) + (temp_f12_2 * temp_f0); + arg0->unk30 = 0.0f; + arg0->unk34 = 0.0f; + arg0->unk38 = 0.0f; + arg0->unk3C = 1.0f; + arg0->unk2C = arg1->unk4; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B60B4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B8018(u16); /* extern */ +f32 func_802B8038(u16); /* extern */ + +void func_802B6214(void *arg0, void *arg1, void *arg2) { + f32 sp3C; + f32 sp34; + f32 sp30; + f32 sp2C; + f32 temp_f0; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f20; + f32 temp_f6; + + sp3C = func_802B8018(arg2->unk0); + temp_f20 = func_802B8038(arg2->unk0); + sp34 = func_802B8018(arg2->unk2); + sp30 = func_802B8038(arg2->unk2); + sp2C = func_802B8018(arg2->unk4); + temp_f0 = func_802B8038(arg2->unk4); + temp_f12 = sp3C * sp34; + temp_f6 = temp_f12 * temp_f0; + arg0->unk0 = (sp30 * temp_f0) + (temp_f12 * sp2C); + arg0->unk20 = temp_f20 * sp34; + arg0->unk10 = (-sp30 * sp2C) + temp_f6; + arg0->unk4 = temp_f20 * sp2C; + temp_f12_2 = sp3C * sp30; + arg0->unk14 = temp_f20 * temp_f0; + arg0->unk30 = arg1->unk0; + arg0->unk24 = -sp3C; + arg0->unk34 = arg1->unk2; + arg0->unk8 = (-sp34 * temp_f0) + (temp_f12_2 * sp2C); + arg0->unk28 = temp_f20 * sp30; + arg0->unk18 = (sp34 * sp2C) + (temp_f12_2 * temp_f0); + arg0->unkC = 0.0f; + arg0->unk1C = 0.0f; + arg0->unk2C = 0.0f; + arg0->unk3C = 1.0f; + arg0->unk38 = arg1->unk4; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6214.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +void func_802B6374(void *arg0) { + f32 temp_f0; + f32 temp_f12; + f32 temp_f14; + f32 temp_f18; + f32 temp_f2; + + temp_f12 = arg0->unk0; + temp_f14 = arg0->unk4; + temp_f2 = arg0->unk8; + temp_f0 = sqrtf((temp_f2 * temp_f2) + ((temp_f12 * temp_f12) + (temp_f14 * temp_f14))); + temp_f18 = temp_f14 / temp_f0; + arg0->unk0 = temp_f12 / temp_f0; + arg0->unk4 = temp_f18; + arg0->unk8 = temp_f2 / temp_f0; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6374.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B63B8(void *arg0, void *arg1) { + f32 temp_f12; + f32 temp_f14; + f32 temp_f16; + f32 temp_f2; + f32 temp_f6; + + temp_f12 = arg0->unk0; + temp_f14 = arg0->unk4; + temp_f2 = arg0->unk8; + temp_f6 = arg1->unk18 * temp_f12; + temp_f16 = (temp_f2 * arg1->unk14) + ((arg1->unkC * temp_f12) + (arg1->unk10 * temp_f14)); + arg0->unk0 = (temp_f2 * arg1->unk8) + ((arg1->unk0 * temp_f12) + (arg1->unk4 * temp_f14)); + arg0->unk4 = temp_f16; + arg0->unk8 = (temp_f2 * arg1->unk20) + (temp_f6 + (arg1->unk1C * temp_f14)); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B63B8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B6434(void *arg0, void *arg1) { + f32 temp_f12; + f32 temp_f14; + f32 temp_f16; + f32 temp_f2; + f32 temp_f6; + + temp_f12 = arg0->unk0; + temp_f14 = arg0->unk4; + temp_f2 = arg0->unk8; + temp_f6 = arg1->unk20 * temp_f12; + temp_f16 = (temp_f2 * arg1->unk18) + ((arg1->unk10 * temp_f12) + (arg1->unk14 * temp_f14)); + arg0->unk0 = (temp_f2 * arg1->unk8) + ((arg1->unk0 * temp_f12) + (arg1->unk4 * temp_f14)); + arg0->unk4 = temp_f16; + arg0->unk8 = (temp_f2 * arg1->unk28) + (temp_f6 + (arg1->unk24 * temp_f14)); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6434.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +void func_802B64B0(s32 arg0, ? arg1, ? arg2, ? arg3) { + +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B64B0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +f32 func_802B8018(s32, void *); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B64C4(void *arg0, s32 arg1) { + f32 sp2C; + s32 sp18; + f32 temp_f0; + f32 temp_f10; + f32 temp_f12; + f32 temp_f2; + f32 temp_f4; + s32 temp_a0; + void *temp_a2; + + temp_a2 = arg0; + temp_a0 = arg1 & 0xFFFF; + sp18 = temp_a0; + arg0 = temp_a2; + sp2C = func_802B8018(temp_a0, temp_a2); + temp_f0 = func_802B8038(temp_a0); + temp_f2 = arg0->unk0; + temp_f12 = arg0->unk8; + temp_f4 = temp_f0 * temp_f2; + arg0->unk4 = arg0->unk4; + temp_f10 = sp2C * temp_f2; + arg0->unk0 = temp_f4 - (sp2C * temp_f12); + arg0->unk8 = temp_f10 + (temp_f0 * temp_f12); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B64C4.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B6A84(f32, ?, f32 *, s16, f32, ?, f32); /* extern */ +f32 func_802B7CE8(f32, f32, s32); /* extern */ +f32 func_802B8018(u16); /* extern */ +f32 func_802B8038(u16); /* extern */ +static f64 D_802B9FB8 = 3.141592653589793; +static f64 D_802B9FC0 = 360.0; + +void func_802B6540(void *arg0, f32 arg1, f32 arg2, f32 arg3, u16 arg4) { + f32 spAC; + f32 spA8; + f32 spA4; + f32 spA0; + f32 sp9C; + f32 sp98; + f32 sp94; + f32 sp90; + f32 sp8C; + f32 sp78; + f32 sp68; + f32 sp40; + s32 sp38; + f32 temp_f0; + f32 temp_f0_2; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_v0; + s32 temp_v0_2; + s32 phi_a0; + s32 phi_v0; + f32 *phi_v1; + s32 phi_a0_2; + s32 phi_v0_2; + f32 *phi_v1_2; + f32 *phi_a3; + f32 *phi_a3_2; + + sp38 = arg4; + sp40 = func_802B8018(arg4); + temp_f0 = func_802B8038(arg4); + sp8C = temp_f0; + spAC = temp_f0; + sp94 = -sp40; + sp9C = 1.0f; + spA8 = 0.0f; + spA0 = 0.0f; + spA4 = sp40; + sp98 = 0.0f; + sp90 = 0.0f; + if (arg2 == 1.0f) { + phi_a0 = 0; + phi_a3 = &sp68; + do { + phi_v0 = 0; + phi_v1 = phi_a3; +loop_3: + if ((phi_a0 * 4) == phi_v0) { + *phi_v1 = 1.0f; + } else { + *phi_v1 = 0.0f; + } + temp_v0 = phi_v0 + 4; + phi_v0 = temp_v0; + phi_v1 += 4; + if (temp_v0 != 0xC) { + goto loop_3; + } + temp_a0 = phi_a0 + 1; + phi_a0 = temp_a0; + phi_a3 += 0xC; + } while (temp_a0 != 3); + } else { + phi_a0_2 = 0; + phi_a3_2 = &sp68; + if (arg2 == -1.0f) { + do { + phi_v0_2 = 0; + phi_v1_2 = phi_a3_2; +loop_12: + if ((phi_a0_2 * 4) == phi_v0_2) { + *phi_v1_2 = 1.0f; + } else { + *phi_v1_2 = 0.0f; + } + temp_v0_2 = phi_v0_2 + 4; + phi_v0_2 = temp_v0_2; + phi_v1_2 += 4; + if (temp_v0_2 != 0xC) { + goto loop_12; + } + temp_a0_2 = phi_a0_2 + 1; + phi_a0_2 = temp_a0_2; + phi_a3_2 += 0xC; + } while (temp_a0_2 != 3); + sp78 = -1.0f; + } else { + temp_f0_2 = sqrtf((arg1 * arg1) + (arg3 * arg3)); + func_802B6A84(arg1, 0, &sp68, -(D_802B9FC0 - ((func_802B7CE8(arg2, 0.0f, 0) * 180.0f) / D_802B9FB8)), -arg3 / temp_f0_2, 0, arg1 / temp_f0_2); + } + } + arg0->unk0 = (sp80 * sp94) + ((sp8C * sp68) + (sp90 * sp74)); + arg0->unkC = (sp80 * spA0) + ((sp98 * sp68) + (sp9C * sp74)); + arg0->unk18 = (sp80 * spAC) + ((spA4 * sp68) + (spA8 * sp74)); + arg0->unk4 = (sp84 * sp94) + ((sp8C * sp6C) + (sp90 * sp78)); + arg0->unk10 = (sp84 * spA0) + ((sp98 * sp6C) + (sp9C * sp78)); + arg0->unk1C = (sp84 * spAC) + ((spA4 * sp6C) + (spA8 * sp78)); + arg0->unk8 = (sp88 * sp94) + ((sp8C * sp70) + (sp90 * sp7C)); + arg0->unk14 = (sp88 * spA0) + ((sp98 * sp70) + (sp9C * sp7C)); + arg0->unk20 = (sp88 * spAC) + ((spA4 * sp70) + (spA8 * sp7C)); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6540.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B6A84(f32, f32, f32 *, s16, f32, ?, f32); /* extern */ +f32 func_802B7CE8(f32, f32, s32, f32 *); /* extern */ +static f64 D_802B9FC8 = 3.141592653589793; +static f64 D_802B9FD0 = 360.0; + +void func_802B68F8(f32 *arg0, f32 arg1, f32 arg2, f32 arg3) { + f32 temp_f0; + f32 temp_f14; + s32 temp_a0; + s32 temp_a0_2; + s32 temp_v0; + s32 temp_v0_2; + s32 phi_a0; + s32 phi_v0; + f32 *phi_v1; + s32 phi_a0_2; + s32 phi_v0_2; + f32 *phi_v1_2; + f32 *phi_a3; + f32 *phi_a3_2; + + temp_f14 = arg1; + if (arg2 == 1.0f) { + phi_a0 = 0; + phi_a3 = arg0; + do { + phi_v0 = 0; + phi_v1 = phi_a3; +loop_3: + if ((phi_a0 * 4) == phi_v0) { + *phi_v1 = 1.0f; + } else { + *phi_v1 = 0.0f; + } + temp_v0 = phi_v0 + 4; + phi_v0 = temp_v0; + phi_v1 += 4; + if (temp_v0 != 0xC) { + goto loop_3; + } + temp_a0 = phi_a0 + 1; + phi_a0 = temp_a0; + phi_a3 += 0xC; + } while (temp_a0 != 3); + return; + } + phi_a0_2 = 0; + phi_a3_2 = arg0; + if (arg2 == -1.0f) { + do { + phi_v0_2 = 0; + phi_v1_2 = phi_a3_2; +loop_12: + if ((phi_a0_2 * 4) == phi_v0_2) { + *phi_v1_2 = 1.0f; + } else { + *phi_v1_2 = 0.0f; + } + temp_v0_2 = phi_v0_2 + 4; + phi_v0_2 = temp_v0_2; + phi_v1_2 += 4; + if (temp_v0_2 != 0xC) { + goto loop_12; + } + temp_a0_2 = phi_a0_2 + 1; + phi_a0_2 = temp_a0_2; + phi_a3_2 += 0xC; + } while (temp_a0_2 != 3); + arg0->unk10 = -1.0f; + return; + } + arg1 = temp_f14; + temp_f0 = sqrtf((arg1 * arg1) + (arg3 * arg3)); + func_802B6A84(arg3, arg1, arg0, -(D_802B9FD0 - ((func_802B7CE8(arg2, temp_f14, 0, arg0) * 180.0f) / D_802B9FC8)), -arg3 / temp_f0, 0, arg1 / temp_f0); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B68F8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B8018(s32, void *); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B6A84(void *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) { + f32 sp54; + s32 sp34; + f32 sp30; + f32 sp2C; + f32 temp_f0; + f32 temp_f10; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f14; + f32 temp_f14_2; + f32 temp_f16; + f32 temp_f2; + f32 temp_f2_2; + f32 temp_f6; + s32 temp_a0; + void *temp_a2; + + temp_a2 = arg0; + temp_a0 = arg1 & 0xFFFF; + sp34 = temp_a0; + arg0 = temp_a2; + sp54 = func_802B8018(temp_a0, temp_a2); + temp_f0 = func_802B8038(temp_a0); + temp_f12 = arg2 * arg2; + temp_f6 = 1.0f - temp_f0; + arg0->unk0 = ((1.0f - temp_f12) * temp_f0) + temp_f12; + sp34 = (bitwise s32) temp_f6; + temp_f2 = arg3 * arg4 * temp_f6; + temp_f14 = arg2 * sp54; + temp_f16 = arg3 * arg3; + arg0->unk1C = temp_f2 - temp_f14; + arg0->unk14 = temp_f14 + temp_f2; + arg0->unk10 = ((1.0f - temp_f16) * temp_f0) + temp_f16; + sp2C = arg3 * sp54; + temp_f10 = arg4 * arg2 * (bitwise f32) sp34; + sp30 = temp_f10; + arg0->unk18 = sp2C + temp_f10; + temp_f12_2 = arg4 * arg4; + arg0->unk8 = sp30 - sp2C; + arg0->unk20 = ((1.0f - temp_f12_2) * temp_f0) + temp_f12_2; + temp_f2_2 = arg2 * arg3 * (bitwise f32) sp34; + temp_f14_2 = arg4 * sp54; + arg0->unkC = temp_f2_2 - temp_f14_2; + arg0->unk4 = temp_f14_2 + temp_f2_2; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6A84.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B8018(f32, s32, void *); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B6BC0(void *arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) { + f32 sp3C; + f32 sp30; + s32 sp2C; + f32 sp28; + f32 sp24; + f32 temp_f0; + f32 temp_f12; + f32 temp_f14; + f32 temp_f18; + f32 temp_f6; + s32 temp_a0; + void *temp_a2; + + temp_f14 = arg2; + temp_a2 = arg0; + temp_a0 = arg1 & 0xFFFF; + sp2C = temp_a0; + arg0 = temp_a2; + arg2 = temp_f14; + sp3C = func_802B8018(temp_f14, temp_a0, temp_a2); + temp_f18 = func_802B8038(temp_a0); + temp_f0 = sqrtf((arg2 * arg2) + (arg4 * arg4)); + if (temp_f0 != 0.0f) { + temp_f12 = 1.0f / temp_f0; + sp2C = (bitwise s32) -arg4; + temp_f6 = sp3C * arg3; + sp28 = temp_f6; + sp30 = temp_f12; + arg0->unk0 = (((bitwise f32) sp2C * temp_f18) - (sp28 * arg2)) * temp_f12; + sp24 = temp_f18 * arg3; + arg0->unk18 = -arg2; + arg0->unkC = ((arg4 * sp3C) - (sp24 * arg2)) * temp_f12; + arg0->unk4 = sp3C * temp_f0; + arg0->unk10 = temp_f18 * temp_f0; + arg0->unk1C = -arg3; + arg0->unk8 = ((temp_f18 * arg2) - (temp_f6 * arg4)) * sp30; + arg0->unk14 = ((-sp3C * arg2) - (sp24 * arg4)) * sp30; + arg0->unkC = 0.0f; + arg0->unk18 = 0.0f; + arg0->unk24 = 0.0f; + arg0->unk20 = sp2C; + return; + } + arg0->unk4 = 0.0f; + arg0->unk1C = 0.0f; + arg0->unk8 = 0.0f; + arg0->unk14 = 0.0f; + arg0->unkC = 0.0f; + arg0->unk18 = 0.0f; + arg0->unk24 = 0.0f; + arg0->unk0 = 1.0f; + arg0->unk10 = 1.0f; + arg0->unk20 = (bitwise s32) 1.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6BC0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B8018(s32); /* extern */ +f32 func_802B8038(s32); /* extern */ + +void func_802B6D58(void *arg0, void *arg1, void *arg2) { + f32 sp3C; + f32 sp34; + f32 sp30; + f32 sp2C; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f0_4; + f32 temp_f12; + f32 temp_f12_2; + f32 temp_f20; + f32 temp_f6; + + sp3C = func_802B8018(arg2->unk0 & 0xFFFF); + temp_f20 = func_802B8038(arg2->unk0 & 0xFFFF); + temp_f0 = func_802B8018(arg2->unk4 & 0xFFFF); + sp34 = temp_f0; + temp_f0_2 = func_802B8038(arg2->unk4 & 0xFFFF); + sp30 = temp_f0_2; + temp_f0_3 = func_802B8018(arg2->unk8 & 0xFFFF); + sp2C = temp_f0_3; + temp_f0_4 = func_802B8038(arg2->unk8 & 0xFFFF); + temp_f12 = sp3C * temp_f0; + temp_f6 = temp_f12 * temp_f0_4; + arg0->unk0 = (temp_f0_2 * temp_f0_4) + (temp_f12 * temp_f0_3); + arg0->unk20 = temp_f20 * temp_f0; + arg0->unk10 = (-temp_f0_2 * temp_f0_3) + temp_f6; + arg0->unk24 = -sp3C; + temp_f12_2 = sp3C * temp_f0_2; + arg0->unk4 = temp_f20 * temp_f0_3; + arg0->unk30 = arg1->unk0; + arg0->unk14 = temp_f20 * temp_f0_4; + arg0->unk34 = arg1->unk4; + arg0->unk8 = (-temp_f0 * temp_f0_4) + (temp_f12_2 * temp_f0_3); + arg0->unk28 = temp_f20 * temp_f0_2; + arg0->unk18 = (temp_f0 * temp_f0_3) + (temp_f12_2 * temp_f0_4); + arg0->unkC = 0.0f; + arg0->unk1C = 0.0f; + arg0->unk2C = 0.0f; + arg0->unk3C = 1.0f; + arg0->unk38 = arg1->unk8; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B6D58.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B5398(f32 *, ?); /* extern */ + +void func_802B71CC(void *arg1, void *arg2) { + f32 sp5C; + f32 sp58; + f32 sp54; + f32 sp50; + f32 sp4C; + f32 sp48; + f32 sp44; + f32 sp40; + f32 sp3C; + f32 sp38; + f32 sp34; + f32 sp30; + f32 sp2C; + f32 sp28; + f32 sp24; + f32 sp20; + + sp20 = (arg2->unk30 * arg1->unkC) + ((arg1->unk0 * arg2->unk0) + (arg1->unk4 * arg2->unk10) + (arg1->unk8 * arg2->unk20)); + sp24 = (arg2->unk34 * arg1->unkC) + ((arg1->unk0 * arg2->unk4) + (arg1->unk4 * arg2->unk14) + (arg1->unk8 * arg2->unk24)); + sp28 = (arg2->unk38 * arg1->unkC) + ((arg1->unk0 * arg2->unk8) + (arg1->unk4 * arg2->unk18) + (arg1->unk8 * arg2->unk28)); + sp2C = (arg2->unk3C * arg1->unkC) + ((arg1->unk0 * arg2->unkC) + (arg1->unk4 * arg2->unk1C) + (arg1->unk8 * arg2->unk2C)); + sp30 = (arg2->unk30 * arg1->unk1C) + ((arg1->unk10 * arg2->unk0) + (arg1->unk14 * arg2->unk10) + (arg1->unk18 * arg2->unk20)); + sp34 = (arg2->unk34 * arg1->unk1C) + ((arg1->unk10 * arg2->unk4) + (arg1->unk14 * arg2->unk14) + (arg1->unk18 * arg2->unk24)); + sp38 = (arg2->unk38 * arg1->unk1C) + ((arg1->unk10 * arg2->unk8) + (arg1->unk14 * arg2->unk18) + (arg1->unk18 * arg2->unk28)); + sp3C = (arg2->unk3C * arg1->unk1C) + ((arg1->unk10 * arg2->unkC) + (arg1->unk14 * arg2->unk1C) + (arg1->unk18 * arg2->unk2C)); + sp40 = (arg2->unk30 * arg1->unk2C) + ((arg1->unk20 * arg2->unk0) + (arg1->unk24 * arg2->unk10) + (arg1->unk28 * arg2->unk20)); + sp44 = (arg2->unk34 * arg1->unk2C) + ((arg1->unk20 * arg2->unk4) + (arg1->unk24 * arg2->unk14) + (arg1->unk28 * arg2->unk24)); + sp48 = (arg2->unk38 * arg1->unk2C) + ((arg1->unk20 * arg2->unk8) + (arg1->unk24 * arg2->unk18) + (arg1->unk28 * arg2->unk28)); + sp4C = (arg2->unk3C * arg1->unk2C) + ((arg1->unk20 * arg2->unkC) + (arg1->unk24 * arg2->unk1C) + (arg1->unk28 * arg2->unk2C)); + sp50 = (arg2->unk30 * arg1->unk3C) + ((arg1->unk30 * arg2->unk0) + (arg1->unk34 * arg2->unk10) + (arg1->unk38 * arg2->unk20)); + sp54 = (arg2->unk34 * arg1->unk3C) + ((arg1->unk30 * arg2->unk4) + (arg1->unk34 * arg2->unk14) + (arg1->unk38 * arg2->unk24)); + sp58 = (arg2->unk38 * arg1->unk3C) + ((arg1->unk30 * arg2->unk8) + (arg1->unk34 * arg2->unk18) + (arg1->unk38 * arg2->unk28)); + sp5C = (arg2->unk3C * arg1->unk3C) + ((arg1->unk30 * arg2->unkC) + (arg1->unk34 * arg2->unk1C) + (arg1->unk38 * arg2->unk2C)); + func_802B5398(&sp20, 0x10); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B71CC.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +void func_802B75F8(void *arg0, f32 *arg1) { + s32 sp14; + f32 *temp_a2; + f32 temp_f18; + f32 temp_f18_2; + s32 *temp_a0; + s32 temp_a3; + void *temp_a2_2; + void *temp_v0; + void *temp_v0_2; + void *temp_v1; + void *temp_v1_2; + void *temp_v1_3; + f32 phi_f18; + void *phi_v0; + void *phi_v1; + f32 *phi_a2; + s32 phi_a3; + f32 phi_f18_2; + void *phi_v0_2; + void *phi_v1_2; + f32 *phi_a2_2; + + temp_v1 = arg0 + 0x20; + temp_a0 = &sp14; + temp_f18 = *arg1 * 65536.0f; + phi_f18 = temp_f18; + phi_v0 = arg0; + phi_v1 = temp_v1; + phi_a2 = arg1; + phi_a3 = 4; + phi_f18_2 = temp_f18; + phi_v0_2 = arg0; + phi_v1_2 = temp_v1; + phi_a2_2 = arg1; + if (4 != 0x10) { + do { + temp_a3 = phi_a3 + 4; + temp_a2 = phi_a2 + 0x10; + temp_v0 = phi_v0 + 8; + temp_v1_2 = phi_v1 + 8; + sp14 = phi_f18; + temp_v0->unk-8 = temp_a0->unk0; + temp_v1_2->unk-8 = temp_a0->unk2; + sp14 = temp_a2->unk-C * 65536.0f; + temp_v0->unk-6 = temp_a0->unk0; + temp_v1_2->unk-6 = temp_a0->unk2; + sp14 = temp_a2->unk-8 * 65536.0f; + temp_v0->unk-4 = temp_a0->unk0; + temp_v1_2->unk-4 = temp_a0->unk2; + sp14 = temp_a2->unk-4 * 65536.0f; + temp_v0->unk-2 = temp_a0->unk0; + temp_v1_2->unk-2 = temp_a0->unk2; + temp_f18_2 = temp_a2->unk0 * 65536.0f; + phi_f18 = temp_f18_2; + phi_v0 = temp_v0; + phi_v1 = temp_v1_2; + phi_a2 = temp_a2; + phi_a3 = temp_a3; + phi_f18_2 = temp_f18_2; + phi_v0_2 = temp_v0; + phi_v1_2 = temp_v1_2; + phi_a2_2 = temp_a2; + } while (temp_a3 != 0x10); + } + temp_a2_2 = phi_a2_2 + 0x10; + temp_v0_2 = phi_v0_2 + 8; + temp_v1_3 = phi_v1_2 + 8; + sp14 = phi_f18_2; + temp_v0_2->unk-8 = temp_a0->unk0; + temp_v1_3->unk-8 = temp_a0->unk2; + sp14 = temp_a2_2->unk-C * 65536.0f; + temp_v0_2->unk-6 = temp_a0->unk0; + temp_v1_3->unk-6 = temp_a0->unk2; + sp14 = temp_a2_2->unk-8 * 65536.0f; + temp_v0_2->unk-4 = temp_a0->unk0; + temp_v1_3->unk-4 = temp_a0->unk2; + sp14 = temp_a2_2->unk-4 * 65536.0f; + temp_v0_2->unk-2 = temp_a0->unk0; + temp_v1_3->unk-2 = temp_a0->unk2; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B75F8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern u16 D_802BF370; +static f32 D_802B9FD8 = 1000000.0f; + +u16 func_802B7790(f32 arg0, f32 arg1) { + f32 temp_f0; + + if (arg1 == 0.0f) { + return D_802BF370; + } + temp_f0 = arg0 / arg1; + if (D_802B9FD8 < temp_f0) { + if (arg0 > 0.0f) { + return 0x4000; + } + return 0xC000; + } + return (&D_802BF370)[(temp_f0 * 1024.0f) + 0.5f]; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7790.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_802B7790(f32, f32); /* extern */ + +s32 func_802B7830(f32 arg0, f32 arg1) { + f32 temp_f20; + f32 temp_f20_2; + f32 temp_f22; + s32 phi_v1; + + if (arg0 >= 0.0f) { + if (arg1 >= 0.0f) { + if (arg0 <= arg1) { + phi_v1 = func_802B7790() & 0xFFFF; + } else { + phi_v1 = (0x4000 - func_802B7790(arg1, arg0)) & 0xFFFF; + } + } else { + temp_f20 = -arg1; + if (temp_f20 < arg0) { + phi_v1 = (func_802B7790(temp_f20, arg0) + 0x4000) & 0xFFFF; + } else { + phi_v1 = (0x8000 - func_802B7790(arg0, temp_f20)) & 0xFFFF; + } + } + } else { + temp_f22 = -arg0; + if (arg1 < 0.0f) { + temp_f20_2 = -arg1; + if (temp_f22 <= temp_f20_2) { + phi_v1 = (func_802B7790(temp_f22, temp_f20_2) + 0x8000) & 0xFFFF; + } else { + phi_v1 = (0xC000 - func_802B7790(temp_f20_2, temp_f22)) & 0xFFFF; + } + } else if (arg1 < temp_f22) { + phi_v1 = (func_802B7790(arg1, temp_f22) + 0xC000) & 0xFFFF; + } else { + phi_v1 = -func_802B7790(temp_f22, arg1) & 0xFFFF; + } + } + return phi_v1; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7830.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +u32 func_802B7830(); /* extern */ + +f32 func_802B79B8(void) { + return func_802B7830(); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B79B8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +static f32 D_802B9FDC = -0.01600503f; +static f32 D_802B9FE0 = 0.00283406f; +static f32 D_802B9FE4 = -0.07495445f; +static f32 D_802B9FE8 = 0.04258761f; +static f32 D_802B9FEC = -0.14202571f; +static f32 D_802B9FF0 = 0.10636754f; +static f32 D_802B9FF4 = -0.33333066f; +static f32 D_802B9FF8 = 0.19992484f; +static f64 D_802BA000 = 1.5707963267948966; +static f64 D_802BA008 = 1.5707963267948966; +static f32 D_802BA010 = 3.1415927f; + +f32 func_802B79F0(f32 arg0, f32 arg1) { + f32 temp_f0; + f32 temp_f14; + f32 temp_f16; + f32 temp_f2; + s32 phi_v0; + f32 phi_f16; + f32 phi_f2; + + phi_v0 = 0; + phi_f16 = arg0 / arg1; + if (fabs(arg1) < fabs(arg0)) { + phi_v0 = 1; + } + if (phi_v0 != 0) { + phi_f16 = arg1 / arg0; + } + temp_f0 = phi_f16 * phi_f16; + temp_f2 = temp_f0 * temp_f0; + temp_f16 = phi_f16 + (((((temp_f2 * (D_802B9FDC + (temp_f0 * D_802B9FE0))) + D_802B9FE4 + (temp_f0 * D_802B9FE8)) * (temp_f2 * temp_f2)) + ((D_802B9FEC + (temp_f0 * D_802B9FF0)) * temp_f2) + D_802B9FF4 + (temp_f0 * D_802B9FF8)) * (phi_f16 * temp_f0)); + if (phi_v0 != 0) { + if (arg0 < 0.0f) { + return -D_802BA000 - temp_f16; + } + return D_802BA008 - temp_f16; + } + if (arg1 >= 0.0f) { + return temp_f16; + } + temp_f14 = D_802BA010; + phi_f2 = temp_f16 + temp_f14; + if (arg0 < 0.0f) { + phi_f2 = temp_f16 - temp_f14; + } + return phi_f2; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B79F0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B79B8(); /* extern */ +static f64 D_802BA018 = 3.141592653589793; + +s32 func_802B7B50(void) { + return ((func_802B79B8() * 32768.0f) / D_802BA018) & 0xFFFF; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7B50.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_802B79B8(?); /* extern */ + +void func_802B7C18(void) { + func_802B79B8(0x3F800000); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7C18.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_802B7830(?); /* extern */ + +s16 func_802B7C40(void) { + return func_802B7830(0x3F800000); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7C40.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_802B79B8(f32); /* extern */ + +void func_802B7C6C(f32 arg0) { + func_802B79B8(sqrtf(1.0 - (arg0 * arg0))); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7C6C.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_802B7830(f32); /* extern */ + +s16 func_802B7CA8(f32 arg0) { + return func_802B7830(sqrtf(1.0 - (arg0 * arg0))); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7CA8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B79B8(f32, f32); /* extern */ + +void func_802B7CE8(f32 arg0) { + func_802B79B8(sqrtf(1.0 - (arg0 * arg0)), arg0); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7CE8.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +f32 func_802B79B8(f32, f32); /* extern */ +static f64 D_802BA020 = 3.141592653589793; + +s16 func_802B7D28(f32 arg0) { + return (func_802B79B8(sqrtf(1.0 - (arg0 * arg0)), arg0) * 32768.0f) / D_802BA020; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7D28.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern u16 D_802BA290; + +u16 random_u16(void) { + s32 temp_a1; + s32 temp_t5; + s32 temp_t8; + s32 temp_v0_2; + u16 temp_t4; + u16 temp_v0; + u16 phi_v0; + + temp_v0 = D_802BA290; + phi_v0 = temp_v0; + if (temp_v0 == 0x560A) { + D_802BA290 = 0; + phi_v0 = 0 & 0xFFFF; + } + temp_t8 = (phi_v0 << 8) ^ phi_v0; + temp_a1 = temp_t8 & 0xFF; + temp_t4 = (temp_a1 << 8) + ((temp_t8 & 0xFF00) >> 8); + temp_t5 = ((temp_a1 * 2) ^ temp_t4) & 0xFFFF; + D_802BA290 = temp_t4; + if ((temp_t5 & 1) == 0) { + temp_v0_2 = ((temp_t5 >> 1) ^ 0xFF80) & 0xFFFF; + if (temp_v0_2 == 0xAA55) { + D_802BA290 = 0; + } else { + D_802BA290 = temp_v0_2 ^ 0x1FF4; + } + } else { + D_802BA290 = (temp_t5 >> 1) ^ 0xFF80 ^ 0x8180; + } + return D_802BA290; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/random_u16.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +u32 random_u16(); /* extern */ +static f64 D_802BA028 = 65535.0; + +s32 random_int(u16 arg0) { + f64 temp_f8; + f64 phi_f8; + + temp_f8 = arg0; + phi_f8 = temp_f8; + if (arg0 < 0) { + phi_f8 = temp_f8 + 4294967296.0; + } + return ((random_u16() / D_802BA028) * phi_f8) & 0xFFFF; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/random_int.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_802B7830(f32, f32); /* extern */ + +s16 func_802B7F34(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { + return func_802B7830(arg2 - arg0, arg3 - arg1); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7F34.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s16 func_802B7F34(f32, f32, ?32, ?32); /* extern */ + +void func_802B7F7C(void *arg0, void *arg1, void *arg2) { + f32 sp2C; + f32 sp28; + f32 sp24; + ?32 sp20; + ?32 sp1C; + ?32 sp18; + ?32 temp_f0; + ?32 temp_f2; + f32 temp_f12; + f32 temp_f14; + + temp_f14 = arg0->unk0; + sp28 = arg0->unk4; + temp_f12 = arg0->unk8; + temp_f2 = arg1->unk0; + sp1C = arg1->unk4; + temp_f0 = arg1->unk8; + sp2C = temp_f14; + sp24 = temp_f12; + sp20 = temp_f2; + sp18 = temp_f0; + arg2->unk2 = func_802B7F34(temp_f12, temp_f14, temp_f0, temp_f2); + arg2->unk0 = func_802B7F34(sp28, sp24, sp1C, temp_f0); + arg2->unk4 = func_802B7F34(sp2C, sp28, sp20, sp1C); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B7F7C.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_802BA370; + +f32 func_802B8018(s32 arg0) { + return *(&D_802BA370 + (((arg0 & 0xFFFF) >> 4) * 4)); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B8018.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +extern ? D_802BB370; + +f32 func_802B8038(s32 arg0) { + return *(&D_802BB370 + (((arg0 & 0xFFFF) >> 4) * 4)); +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B8038.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802B8058(s32 arg0, s32 arg1, s32 arg2) { + s32 temp_t7; + s32 temp_t8; + s32 temp_v1; + + temp_v1 = arg0 & 0xFFFF; + temp_t7 = arg1 & 0xFFFF; + temp_t8 = arg2 & 0xFFFF; + if (temp_t7 < temp_v1) { + if (temp_t7 >= temp_t8) { + return 0; + } + if (temp_t8 >= temp_v1) { + return 0; + } + /* Duplicate return node #8. Try simplifying control flow for better match */ + return 1; + } + if ((temp_t7 >= temp_t8) && (temp_t8 >= temp_v1)) { + return 0; + } + return 1; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B8058.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +s32 func_802B5224(f32, f32, u16); /* extern */ +u16 func_802B7CA8(f32, f32); /* extern */ +s32 func_802B8058(s32, s32, u16, u16); /* extern */ + +f32 func_802B80D0(void *arg0, void *arg1, u16 arg2, f32 arg3, f32 arg4, f32 arg5) { + u16 sp5E; + u16 sp5A; + s32 sp28; + s32 sp24; + s32 sp20; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f14; + f32 temp_f20; + f32 temp_f2; + f32 temp_f2_2; + s32 temp_t6; + s32 temp_t7; + s32 temp_v1; + s32 temp_v1_2; + u16 temp_a2; + u16 temp_a3; + u16 temp_v0; + + temp_f14 = arg3; + temp_f0 = arg1->unk0 - arg0->unk0; + temp_a3 = arg2; + temp_f0_2 = temp_f0 * temp_f0; + if (arg5 < temp_f0_2) { + return -1.0f; + } + temp_f2 = arg1->unk8 - arg0->unk8; + temp_f2_2 = temp_f2 * temp_f2; + if (arg5 < temp_f2_2) { + return -1.0f; + } + temp_f20 = temp_f0_2 + temp_f2_2; + if (temp_f20 < temp_f14) { + return temp_f20; + } + if (arg5 < temp_f20) { + return -1.0f; + } + arg2 = temp_a3; + arg3 = temp_f14; + temp_a2 = func_802B5224(arg5, temp_f14, temp_a3) & 0xFFFF; + if (arg3 == 0.0f) { + temp_v1 = (arg4 * 0xB6) & 0xFFFF; + if (func_802B8058((arg2 + temp_v1) & 0xFFFF, (arg2 - temp_v1) & 0xFFFF, temp_a2, arg2) == 1) { + return temp_f20; + } + return -1.0f; + } + temp_v1_2 = (arg4 * 0xB6) & 0xFFFF; + temp_t7 = (arg2 - temp_v1_2) & 0xFFFF; + temp_t6 = (arg2 + temp_v1_2) & 0xFFFF; + sp24 = temp_t6; + sp20 = temp_t7; + sp5E = temp_a2; + arg3 = arg3; + if (func_802B8058(temp_t6, temp_t7, temp_a2, arg2) == 1) { + return temp_f20; + } + temp_v0 = func_802B7CA8(arg3 / temp_f20, arg3); + sp5A = temp_v0; + sp28 = sp5E; + if (func_802B8058(unksp26, unksp22, (sp5E + temp_v0) & 0xFFFF, sp5E) == 1) { + return temp_f20; + } + if (func_802B8058(unksp26, unksp22, (sp5E - sp5A) & 0xFFFF, sp5E) == 1) { + return temp_f20; + } + return -1.0f; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B80D0.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +? func_802B8018(s32); /* extern */ +? func_802B8038(s32); /* extern */ +extern ? gSegmentTable; + +void func_802B8414(u32 arg0, void *arg1, u16 arg2, s32 arg3, s32 arg4) { + f32 sp48; + f32 sp44; + f32 sp40; + s8 sp3E; + s8 sp3D; + s8 sp3C; + s32 sp20; + s32 temp_a0; + s32 temp_a1; + s32 temp_v0; + s32 temp_v0_2; + void *temp_s0; + void *temp_s0_2; + void *temp_s0_3; + void *phi_s0; + s32 phi_v0; + void *phi_s0_2; + s32 phi_v0_2; + + temp_a0 = arg3 & 0xFFFF; + temp_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000; + sp20 = temp_a0; + func_802B8018(temp_a0); + func_802B8038(temp_a0); + sp20 = arg2; + func_802B8018(arg2); + func_802B8038(arg2); + sp40 = 0.0f; + sp44 = 0.0f; + sp48 = 1.0f; + temp_a1 = arg4 & 3; + sp3C = ((arg1->unk20 * 1.0f) + ((sp40 * arg1->unk0) + (sp44 * arg1->unk10))) * 127.0f; + sp3D = ((arg1->unk24 * 1.0f) + ((sp40 * arg1->unk4) + (sp44 * arg1->unk14))) * 127.0f; + sp3E = ((arg1->unk28 * 1.0f) + ((sp40 * arg1->unk8) + (sp44 * arg1->unk18))) * 127.0f; + phi_v0 = 0; + phi_v0_2 = 0; + if (arg4 > 0) { + phi_s0 = temp_s0; + phi_s0_2 = temp_s0; + if (temp_a1 != 0) { + do { + temp_v0 = phi_v0 + 1; + temp_s0_2 = phi_s0 + 0x18; + temp_s0_2->unk-8 = sp3C; + temp_s0_2->unk-7 = sp3D; + temp_s0_2->unk-6 = sp3E; + phi_s0 = temp_s0_2; + phi_v0 = temp_v0; + phi_s0_2 = temp_s0_2; + phi_v0_2 = temp_v0; + } while (temp_a1 != temp_v0); + if (temp_v0 != arg4) { + goto loop_4; + } + } else { + do { +loop_4: + temp_v0_2 = phi_v0_2 + 4; + temp_s0_3 = phi_s0_2 + 0x60; + temp_s0_3->unk-50 = sp3C; + temp_s0_3->unk-4F = sp3D; + temp_s0_3->unk-4E = sp3E; + temp_s0_3->unk-38 = sp3C; + temp_s0_3->unk-37 = sp3D; + temp_s0_3->unk-36 = sp3E; + temp_s0_3->unk-20 = sp3C; + temp_s0_3->unk-1F = sp3D; + temp_s0_3->unk-1E = sp3E; + temp_s0_3->unk-8 = sp3C; + temp_s0_3->unk-7 = sp3D; + temp_s0_3->unk-6 = sp3E; + phi_s0_2 = temp_s0_3; + phi_v0_2 = temp_v0_2; + } while (temp_v0_2 != arg4); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B8414.s") +#endif + +#ifdef MIPS_TO_C +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +//This function did not have a glabel in the original assembly, as such it may +//be unused/unnamed +void func_802B8614(void *arg0) { + f64 sp78; + f64 sp70; + f64 sp68; + f64 sp58; + f64 sp50; + f64 sp48; + f64 sp40; + f64 sp38; + f64 temp_f12; + f64 temp_f14; + f64 temp_f16; + f64 temp_f18; + f64 temp_f20; + f64 temp_f2; + f64 temp_f30; + f64 temp_f4; + f64 temp_f6; + + temp_f6 = arg0->unk1B0; + sp78 = temp_f6; + sp70 = arg0->unk1C0; + sp68 = arg0->unk1B8; + temp_f30 = arg0->unk198; + sp58 = arg0->unk1A8; + sp50 = arg0->unk1A0; + sp48 = arg0->unk1E0; + sp40 = arg0->unk1F0; + temp_f4 = arg0->unk1E8; + temp_f2 = sp58 - sp70; + sp38 = temp_f4; + temp_f12 = temp_f4 - sp50; + temp_f14 = sp50 - sp68; + temp_f16 = sp40 - sp58; + temp_f18 = sp48 - temp_f30; + temp_f20 = temp_f30 - temp_f6; + if (0.0 == 0.0) { + arg0->unk58 = 0.0f; + arg0->unk60 = 0.0f; + arg0->unk5C = 1.0f; + return; + } + arg0->unk58 = ((temp_f2 * temp_f12) - (temp_f14 * temp_f16)) / 0.0; + arg0->unk5C = ((temp_f14 * temp_f18) - (temp_f20 * temp_f12)) / 0.0; + arg0->unk60 = ((temp_f20 * temp_f16) - (temp_f2 * temp_f18)) / 0.0; +} +#else +GLOBAL_ASM("asm/non_matchings/math_util/func_802B8614.s") +#endif diff --git a/src/memory.c b/src/memory.c index 605e2791a..505e4d839 100644 --- a/src/memory.c +++ b/src/memory.c @@ -789,29 +789,197 @@ GLOBAL_ASM("asm/non_matchings/memory/func_802A8F14.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802A8F80: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +static ? D_802B8D58; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_802A8F80.s line 24. +void func_802A8F80(s32 arg0, s32 arg1, s8 arg2) { + s32 sp58; + s32 sp48; + s32 sp44; + s32 sp40; + s32 temp_a1; + s32 temp_t5; + s32 temp_t8; + s32 temp_t9; + u8 temp_a0; + u8 temp_a0_2; + s32 phi_v1; + s32 phi_v0; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp58.unk0 = D_802B8D58.unk0; + sp58.unk4 = D_802B8D58.unk4; + phi_v0 = 0; + phi_v0 = 0; + switch (arg2) { + case 26: + sp44 = 0x20; + sp40 = 0; + phi_v1 = 0x20; +block_9: + sp48 = phi_v1; + break; + case 44: + sp44 = 0x20; + sp40 = 0; + phi_v1 = 0x20; + phi_v0 = 0x100; + goto block_9; + case 27: + sp44 = 0x20; + sp40 = 0; + phi_v1 = 0x40; + goto block_9; + case 28: + sp44 = 0x40; + sp40 = 0; + phi_v1 = 0x20; + goto block_9; + case 29: + sp44 = 0x20; + sp40 = 3; + phi_v1 = 0x20; + goto block_9; + case 30: + sp44 = 0x20; + sp40 = 3; + phi_v1 = 0x40; + goto block_9; + case 31: + sp44 = 0x40; + sp40 = 3; + phi_v1 = 0x20; + goto block_9; + } + temp_a1 = D_802BA274; + temp_a0 = *(temp_a1 + arg1); + temp_t9 = temp_a1 + 1; + D_802BA274 = temp_t9; + temp_a0_2 = *(temp_t9 + arg1); + D_802BA274 = temp_t9 + 1; + *(arg0 + (D_802BA270 * 8)) = sp58; + (arg0 + (D_802BA270 * 8))->unk4 = sp5C; + D_802BA270 += 1; + *(arg0 + (D_802BA270 * 8)) = (sp40 << 0x15) | 0xF5000000 | 0x100000 | ((((sp48 * 2) + 7) >> 3) << 9) | phi_v0; + (arg0 + (D_802BA270 * 8))->unk4 = ((temp_a0_2 & 0xF) << 0x12) | (((temp_a0_2 & 0xF0) >> 4) << 0xE) | ((temp_a0 & 0xF) << 8) | (((temp_a0 & 0xF0) >> 4) * 0x10); + temp_t5 = D_802BA270 + 1; + temp_t8 = temp_t5 * 8; + D_802BA270 = temp_t5; + *(arg0 + temp_t8) = 0xF2000000; + (arg0 + (D_802BA270 * 8))->unk4 = ((sp48 - 1) << 0xE) | ((sp44 - 1) * 4); + D_802BA270 += 1; +} #else GLOBAL_ASM("asm/non_matchings/memory/func_802A8F80.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function func_802A91E4: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +static ? D_802B8D60; /* unable to generate initializer */ +static ? D_802B8D68; /* unable to generate initializer */ -Unable to determine jump table for jr instruction at func_802A91E4.s line 27. +void func_802A91E4(s32 arg0, s32 arg1, s8 arg2) { + s32 sp48; + s32 sp40; + s32 sp2C; + s32 sp28; + s32 sp24; + s32 temp_t1; + s32 temp_t6; + s32 temp_t6_2; + s32 temp_t8; + s32 temp_t9; + s32 temp_t9_2; + s32 temp_v1; + u32 temp_t2; + u32 temp_t6_3; + u8 temp_a2; + u8 temp_a3; + s32 phi_v0; + u32 phi_v0_2; + u32 phi_a2; + u32 phi_v1; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + sp48.unk0 = D_802B8D60.unk0; + sp48.unk4 = D_802B8D60.unk4; + sp40.unk0 = D_802B8D68.unk0; + sp40.unk4 = D_802B8D68.unk4; + switch (arg2) { + case 32: + sp28 = 0x20; + sp24 = 0; + phi_v0 = 0x20; +block_8: + sp2C = phi_v0; + break; + case 33: + sp28 = 0x20; + sp24 = 0; + phi_v0 = 0x40; + goto block_8; + case 34: + sp28 = 0x40; + sp24 = 0; + phi_v0 = 0x20; + goto block_8; + case 35: + sp28 = 0x20; + sp24 = 3; + phi_v0 = 0x20; + goto block_8; + case 36: + sp28 = 0x20; + sp24 = 3; + phi_v0 = 0x40; + goto block_8; + case 37: + sp28 = 0x40; + sp24 = 3; + phi_v0 = 0x20; + goto block_8; + } + temp_v1 = D_802BA274; + temp_a2 = *(arg1 + temp_v1); + temp_t9 = temp_v1 + 1; + D_802BA274 = temp_t9; + temp_t8 = temp_t9 + 1; + D_802BA274 = temp_t8; + temp_a3 = *(temp_t8 + arg1); + D_802BA274 = temp_t8 + 1; + temp_t6 = sp24 << 0x15; + *(arg0 + (D_802BA270 * 8)) = temp_t6 | 0xFD000000 | 0x100000; + (arg0 + (D_802BA270 * 8))->unk4 = (temp_a2 << 0xB) + 0x5000000; + temp_t9_2 = D_802BA270 + 1; + D_802BA270 = temp_t9_2; + *(arg0 + (temp_t9_2 * 8)) = sp48; + (arg0 + (D_802BA270 * 8))->unk4 = sp4C; + D_802BA270 += 1; + *(arg0 + (D_802BA270 * 8)) = temp_t6 | 0xF5000000 | 0x100000 | (temp_a3 & 0xF); + temp_t1 = ((temp_a3 & 0xF0) >> 4) << 0x18; + (arg0 + (D_802BA270 * 8))->unk4 = temp_t1; + temp_t6_2 = D_802BA270 + 1; + D_802BA270 = temp_t6_2; + *(arg0 + (temp_t6_2 * 8)) = sp40; + (arg0 + (D_802BA270 * 8))->unk4 = sp44; + temp_t6_3 = (sp2C * 2) >> 3; + D_802BA270 += 1; + temp_t2 = (sp2C * sp28) - 1; + phi_v1 = 0x7FF; + if (temp_t2 < 0x7FF) { + phi_v1 = temp_t2; + } + if (temp_t6_3 == 0) { + phi_v0_2 = 1; + } else { + phi_v0_2 = temp_t6_3; + } + phi_a2 = temp_t6_3; + if (temp_t6_3 == 0) { + phi_a2 = 1; + } + *(arg0 + (D_802BA270 * 8)) = 0xF3000000; + (arg0 + (D_802BA270 * 8))->unk4 = ((phi_v0_2 + 0x7FF) / phi_a2) | temp_t1 | (phi_v1 << 0xC); + D_802BA270 += 1; +} #else GLOBAL_ASM("asm/non_matchings/memory/func_802A91E4.s") #endif @@ -1069,15 +1237,408 @@ GLOBAL_ASM("asm/non_matchings/memory/func_802A99A4.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -/* -Failed to decompile function display_list_unpack: +//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 +? func_802A884C(s32, s32, s8, s32 *); /* extern */ +? func_802A8940(s32, s32, s8, s32 *); /* extern */ +? func_802A89C0(s32, s32, s8, s32 *); /* extern */ +? func_802A8A04(s32, s32, s8, s32 *); /* extern */ +? func_802A8A70(s32, s32, s8, s32 *); /* extern */ +? func_802A8ADC(s32, s32, s8, s32 *); /* extern */ +? func_802A8B48(s32, s32, s32, s32 *); /* extern */ +? func_802A8BB4(s32, s32, s32, s32 *); /* extern */ +? func_802A8C20(s32, s32, s32, s32 *); /* extern */ +? func_802A8C8C(s32, s32, s32, s32 *); /* extern */ +? func_802A8CF8(s32, s32, s32, s32 *); /* extern */ +? func_802A8D64(s32, s32, s32, s32 *); /* extern */ +? func_802A8DD0(s32, s32, s32, s32 *); /* extern */ +? func_802A8E3C(s32, s32, s32, s32 *); /* extern */ +? func_802A8EA8(s32, s32, s32, s32 *); /* extern */ +? func_802A8F14(s32, s32, s32, s32 *); /* extern */ +? func_802A8F80(s32, s32, s8, s32 *); /* extern */ +? func_802A91E4(s32, s32, s8, s32 *); /* extern */ +? func_802A94D8(s32, s32, s8, s32 *); /* extern */ +? func_802A9544(s32, s32, s8, s32 *); /* extern */ +? func_802A95B0(s32, s32, s8, s32 *); /* extern */ +? func_802A9674(s32, s32, s8, s32 *); /* extern */ +? func_802A9714(s32, s32, s8, s32 *); /* extern */ +? func_802A980C(s32, s32, s8, s32 *); /* extern */ +? func_802A99A4(s32, s32, s8, s32 *); /* extern */ +? set_segment_base_addr(?, s32); /* extern */ -Unable to determine jump table for jr instruction at display_list_unpack.s line 52. +void display_list_unpack(u32 arg0, s32 arg1, s32 arg2) { + s32 sp2C; + s32 temp_s0; + s32 temp_s1; + s32 temp_v1; + u8 temp_a0; + s32 *phi_a3; -There must be a read of a variable in the same block as -the instruction, which has a name starting with "jtbl"/"jpt_". -*/ + temp_s0 = gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF) + 0x80000000; + temp_s1 = gHeapEndPtr - (((arg1 + 0xF) & ~0xF) + 8); + gHeapEndPtr = temp_s1; + D_802BA270 = 0; + sp2C = temp_s1; + D_802BA274 = 0; + phi_a3 = &D_802BA274; +loop_1: + temp_v1 = *phi_a3; + temp_a0 = *(temp_v1 + temp_s0); + *phi_a3 = temp_v1 + 1; + if (temp_a0 != 0xFF) { + switch (temp_a0) { + case 0x0: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x5: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x6: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x7: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x8: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x9: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0xA: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0xB: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0xC: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0xD: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0xE: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0xF: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x10: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x11: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x12: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x13: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x14: + func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x15: + func_802A8B48(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x16: + func_802A8BB4(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x17: + func_802A8C20(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2E: + func_802A8C8C(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x53: + func_802A8CF8(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x18: + func_802A8D64(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x19: + func_802A8DD0(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2F: + func_802A8E3C(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x54: + func_802A8EA8(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x55: + func_802A8F14(temp_s1, temp_s0, arg2, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1A: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2C: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1B: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1C: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1D: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1E: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x1F: + func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x20: + func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x21: + func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x22: + func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x23: + func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x24: + func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x25: + func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x26: + func_802A94D8(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x27: + func_802A9544(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x28: + func_802A95B0(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x33: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x34: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x35: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x36: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x37: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x38: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x39: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3A: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3B: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3C: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3D: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3E: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x3F: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x40: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x41: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x42: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x43: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x44: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x45: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x46: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x47: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x48: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x49: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4A: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4B: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4C: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4D: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4E: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x4F: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x50: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x51: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x52: + func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x29: + func_802A9714(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x58: + func_802A980C(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x30: + func_802A99A4(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2D: + func_802A8ADC(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2A: + func_802A89C0(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x56: + func_802A8A04(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x57: + func_802A8A70(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + case 0x2B: + func_802A8940(temp_s1, temp_s0, temp_a0, phi_a3); + phi_a3 = &D_802BA274; + break; + } + goto loop_1; + } + set_segment_base_addr(7, sp2C); +} #else GLOBAL_ASM("asm/non_matchings/memory/display_list_unpack.s") #endif