feat(phase-26a): A3f — 33 functions banked that the project had written off as compiler walls

The payoff of A3e, byte-verified. These 33 sat in the backlog at closeness==0 -- match_one said
their bodies were BYTE-EXACT -- and the whole-binary gate rejected them, so they were logged as
`near`/`failed`, i.e. AS MATCHING PROBLEMS, and filed as intrinsic compiler residuals.

They were not hard. They were UNREACHABLE. gate_stage passed `--src src/<ov>/<ov>.c`
unconditionally, which restricts the byte-gate to ONE translation unit -- and every one of these
functions has its stub in a SPLIT TU. Look at where they landed:

    src/ov_SC01_077/ov_SC01_077_a.c
    src/ov_SC01_077/ov_SC01_077_after.c
    src/ov_SC01_077/ov_SC01_077_jr_8012ACE0.c
    src/ov_SC01_077/ov_SC01_077_jr_8015AE2C.c
    src/ov_SC01_077/ov_SC01_077_jr_8016AB6C.c
    src/ov_SC01_077/ov_SC01_077_jr_801734BC.c
    src/ov_SC01_077/ov_SC01_077_jr_80178D40.c
    src/ov_SC01_077/ov_SC01_077_jr_80182268.c

8 files. SEVEN of them are _jr_/_a/_after carves. NOT ONE is the main .c -- the only file the gate
was ever allowed to look at.

  gate: 63 drafts -> banked 33, near 30, FAILED 0   (--no-propagate; the gate and the propagation
        are different jobs, and letting an experiment tow an unbounded fleet-wide propagation is
        what broke the tree an hour ago)

  R22 CLEAN-FLEET: make clean + extract-all + check-all -> 136 passed, 0 failed of 136
  dedup-check: 1823 validated, 0 failed | C1 coverage 224933/224933

METRICS, ×1, HONESTLY (no propagation yet -- the multiplier is still ahead):
    functions byte-identical  284,526 -> 284,559   (+33)
    instructions              8,470,381 -> 8,471,912   (+1,531)
    fn-count %                82.79% -> 82.80%
    instr-weighted %          66.7%  -> 66.7%   (flat: ×1 banks do not move the headline)

WHAT THIS MEASURES, beyond the 33: the backlog holds 1,588 entries at closeness==0. 1,215 have been
banked since by other paths. 373 ARE STILL OPEN STUBS WITH BYTE-EXACT BODIES. 63 of them were in
ov_SC01_077 and 33 banked -- a 52% rate on functions the ledger calls unrecoverable. The other 310
are spread across the remaining overlays: same class, same fix, not yet attempted.

Cookbook §51g LAW 11 -- a fix is not landed until its caller stops overriding it. And the reason
this hid for 26 phases, which belongs in the posterity doc: A TOOL THAT CANNOT BANK A FUNCTION IS
INDISTINGUISHABLE, IN EVERY LOG THIS PROJECT KEEPS, FROM A FUNCTION THAT CANNOT BE BANKED.
This commit is contained in:
Drew T
2026-07-14 15:49:13 -06:00
parent b89fcc2edc
commit 8ffcf9646e
10 changed files with 2336 additions and 2952 deletions
+1376 -2913
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -4,14 +4,14 @@
# cross-binary collapsible-byte leverage: docs/duplicates.cross.md.
# THREE progress metrics (all matter — see the labels):
FLEET fn-count byte-ident: 284526 / 343677 = 82.79% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
FLEET instr-weighted : 8470381 / 12707182 = 66.7% (shipped .text across resident+134 overlays; the decomp.dev-DISPLAY number)
FLEET distinct-code(uniq): 2530389 / 5410077 = 46.8% (51830/84996 unique fns; the DISTINCT-RE number; main EXE not sig'd)
FLEET fn-count byte-ident: 284559 / 343677 = 82.80% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
FLEET instr-weighted : 8471912 / 12707182 = 66.7% (shipped .text across resident+134 overlays; the decomp.dev-DISPLAY number)
FLEET distinct-code(uniq): 2531879 / 5410077 = 46.8% (51862/84996 unique fns; the DISTINCT-RE number; main EXE not sig'd)
FLEET REAL substantive : 282998 (of which dedup-shared 224889 via 1823 groups / 224933 instances)
FLEET REAL substantive : 283031 (of which dedup-shared 224889 via 1823 groups / 224933 instances)
FLEET LINKED PsyQ objs : 959
FLEET NON_MATCHING : 7 (0 in any default build — G4)
FLEET INCLUDE_ASM stubs : 59144
FLEET INCLUDE_ASM stubs : 59111
FLEET matchable : 343677
| binary | REAL | shared | LINKED | byte-ident | matchable | byte-ident % |
@@ -26,7 +26,7 @@ FLEET matchable : 343677
| ov_SC01_008 | 2080 | 1672 | 0 | 2082 | 2426 | 85.8% |
| ov_SC01_009 | 2101 | 1673 | 0 | 2102 | 2507 | 83.8% |
| ov_SC01_074 | 2085 | 1673 | 0 | 2087 | 2425 | 86.1% |
| ov_SC01_077 | 2320 | 1641 | 0 | 2322 | 2585 | 89.8% |
| ov_SC01_077 | 2353 | 1641 | 0 | 2355 | 2585 | 91.1% |
| ov_SC01_080 | 2117 | 1676 | 0 | 2117 | 2512 | 84.3% |
| ov_SC01_084 | 2124 | 1676 | 0 | 2129 | 2579 | 82.6% |
| ov_SC02_000 | 2170 | 1711 | 0 | 2170 | 2683 | 80.9% |
+41 -2
View File
@@ -530,7 +530,32 @@ DEFINE_func_801298F4() /* dedup: shared engine-core @0x801298F4 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_a", func_801299C8);
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_a", func_80129C40);
extern struct BigCopy D_80126DB8;
extern u8 D_80126948[];
extern struct BigCopy D_80114EE8;
extern s32 D_80126E60[];
extern s8 D_801150D6;
extern s8 D_801152C0;
extern u8 D_80127504;
extern void func_80016714(void *a0, s32 a1);
extern void func_800144D4(void);
void func_80129C40(s32 _arg0)
{
func_80016714(((u8 *)&D_80126DB8), 0xA4);
func_80016714(D_80126948, 0xA4);
func_80016714(((u8 *)&D_80114EE8), 0xA4);
func_80016714(((u8 *)&D_80114EE8) + 0xA4, 0xA4);
func_80016714(((u8 *)&D_80114EE8) + 0x148, 0xA4);
func_80016714(((u8 *)D_80126E60), 0xA4);
func_80016714(((u8 *)D_80126E60) + 0xA4, 0xA4);
func_80016714(((u8 *)D_80126E60) + 0x148, 0xA4);
D_801150D6 = 0;
D_801152C0 = 0;
(*(s8 *)&D_80127504) = 0;
func_800144D4();
}
DEFINE_func_80129CF8() /* dedup: shared engine-core @0x80129CF8 (src/shared) */
@@ -614,7 +639,21 @@ DEFINE_func_8012A62C() /* dedup: shared engine-core @0x8012A62C (src/shared) */
DEFINE_func_8012A68C() /* dedup: shared engine-core @0x8012A68C (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_a", func_8012A6D0);
extern s32 func_80047D3C(s32 a0);
extern s32 ratan2(s32 a0, s32 a1);
s32 func_8012A6D0(void* a0, void* a1)
{
s32 s0 = a0;
s32 s1 = a1;
s32 dy = *(s16 *)(s0 + 0x4) - *(s16 *)(s1 + 0x4);
s32 dx = *(s16 *)(s0 + 0x0) - *(s16 *)(s1 + 0x0);
s32 d;
d = func_80047D3C(dy * dy + dx * dx);
return (s16)ratan2(*(s16 *)(s0 + 0x2) - *(s16 *)(s1 + 0x2), (s16)d);
}
DEFINE_func_8012A758() /* dedup: shared engine-core @0x8012A758 (src/shared) */
+150 -8
View File
@@ -407,7 +407,23 @@ INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_80146AFC);
DEFINE_func_80146B9C() /* dedup: shared engine-core @0x80146B9C (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_80146C3C);
extern void func_80016714(void *a0, s32 a1);
void func_80146C3C(u8 *a0) {
u8 *s0 = a0;
u16 *p = *(u16 **)(s0 + 0x20);
if (p != 0) {
s32 a1;
if (*p == 1) {
a1 = 0x84;
} else {
a1 = 0x38;
}
func_80016714(p, a1);
}
func_80016714(s0, 0x58);
}
DEFINE_func_80146C98() /* dedup: shared engine-core @0x80146C98 (src/shared) */
@@ -571,7 +587,33 @@ DEFINE_func_80147E44() /* dedup: shared engine-core @0x80147E44 (src/shared) */
DEFINE_func_80147F50() /* dedup: shared engine-core @0x80147F50 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_80147F78);
extern void func_80147928(int a0, int a1);
extern void func_8014799C(int a0, int a1);
extern void func_80147A10(int a0, int a1);
extern volatile s32 D_80127090;
extern volatile s32 D_80127094;
extern volatile s32 D_80127098;
void func_80147F78(s32 a0, s32 a1, s32 a2, s32 a3) {
s32 reserved[16];
s32 t;
func_80147928(a0, a1);
func_8014799C(a0, a2);
func_80147A10(a0, a3);
D_80127090 = *(s32 *)(a0 + 0x24);
t = D_80127090;
D_80127094 = *(s32 *)(a0 + 0x28);
D_80127098 = *(s32 *)(a0 + 0x2C);
*(s32 *)(a0 + 0x10) = t;
*(s32 *)(a0 + 0x14) = D_80127094;
*(s32 *)(a0 + 0x18) = D_80127098;
D_80127090 = 0;
D_80127094 = 0;
D_80127098 = 0;
(void)reserved;
}
DEFINE_func_80148038() /* dedup: shared engine-core @0x80148038 (src/shared) */
@@ -874,9 +916,36 @@ DEFINE_func_801493D0() /* dedup: shared engine-core @0x801493D0 (src/shared) */
DEFINE_func_8014942C() /* dedup: shared engine-core @0x8014942C (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_80149450);
extern void func_8012F038(s32);
void func_80149450(s32 a0, s16 *a1) {
s16 *s0 = a1;
s16 sp10[3];
s16 sp18[3];
sp18[0] = *(u16 *)((char *)s0 + 0x2);
sp18[1] = *(u16 *)((char *)s0 + 0x6);
sp18[2] = *(u16 *)((char *)s0 + 0xA);
((void (*)(s32, s32, s32))func_8012F038)(*(s32 *)(a0 + 0x20) + 0x34, (s32)sp18, (s32)sp10);
*(s16 *)((char *)s0 + 0x2) = *(u16 *)((char *)sp10 + 0x0);
*(s16 *)((char *)s0 + 0x6) = *(u16 *)((char *)sp10 + 0x2);
*(s16 *)((char *)s0 + 0xA) = *(u16 *)((char *)sp10 + 0x4);
}
extern void func_8012F038(s32);
void func_801494CC(s32 a0, u16 *a1, u16 *a2) {
u16 dst[3];
u16 src[3];
src[0] = a1[1];
src[1] = a1[3];
src[2] = a1[5];
((void (*)(s32, u16 *, u16 *))func_8012F038)(*(s32 *)(a0 + 0x20) + 0x34, src, dst);
a2[1] = dst[0];
a2[3] = dst[1];
a2[5] = dst[2];
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_801494CC);
DEFINE_func_80149544() /* dedup: shared engine-core @0x80149544 (src/shared) */
@@ -953,7 +1022,27 @@ DEFINE_func_80149DD8() /* dedup: shared engine-core @0x80149DD8 (src/shared) */
DEFINE_func_80149E94() /* dedup: shared engine-core @0x80149E94 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_80149F2C);
extern s32 func_80144A04(s32 *a0);
extern void func_801599A4(void *a0);
extern void func_80159B3C(void *a0);
extern void func_8016EDEC(s32 a0, s32 a1);
s32 func_80149F2C(s32 a0, s32 a1)
{
void *s1 = a0;
s32 *s0;
if (*(u16 *)a1 == 0x83 || *(u16 *)a1 == 0x61) {
s0 = (s32 *)func_80144A04((s32 *)a1);
if (s0 != 0) {
func_801599A4(s1);
func_80159B3C(s1);
func_8016EDEC((s32)s0, 0x1000000);
return 1;
}
}
return 0;
}
DEFINE_func_80149FA8() /* dedup: shared engine-core @0x80149FA8 (src/shared) */
@@ -1214,7 +1303,26 @@ void func_8014C1A0(s32 arg0, s32 arg1) {
func_8014C1C8(arg0, arg1, D_8018875C);
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_8014C1C8);
extern s32 func_80133784(s32 a0, void *a1, s32 a2);
void func_8014C1C8(s32 a0, s32 a1, void* a2)
{
s16 buf[4];
s16 out[4];
s32 s0 = a1;
buf[0] = *(u16 *)(a0 + 6);
buf[1] = *(u16 *)(a0 + 0xA);
buf[2] = *(u16 *)(a0 + 0xE);
out[0] = *(u16 *)(s0 + 6) + *(u16 *)(a2 + 0);
out[1] = *(u16 *)(s0 + 0xA) + *(u16 *)(a2 + 2);
out[2] = *(u16 *)(s0 + 0xE) + *(u16 *)(a2 + 4);
if (func_80133784(1, buf, (s32)out) != 0) {
*(s16 *)(s0 + 6) = out[0];
*(s16 *)(s0 + 0xA) = out[1];
*(s16 *)(s0 + 0xE) = out[2];
}
}
DEFINE_func_8014C278() /* dedup: shared engine-core @0x8014C278 (src/shared) */
@@ -1238,7 +1346,12 @@ DEFINE_func_8014C43C() /* dedup: shared engine-core @0x8014C43C (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_8014C4AC);
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_8014C568);
extern s32 ratan2(s32 x, s32 y);
s32 func_8014C568(s16 *a0, s16 *a1) {
return ratan2(a0[3] - a1[0], a0[7] - a1[2]) & 0xFFF;
}
DEFINE_func_8014C59C() /* dedup: shared engine-core @0x8014C59C (src/shared) */
@@ -2648,7 +2761,36 @@ DEFINE_func_80152BF0() /* dedup: shared engine-core @0x80152BF0 (src/shared) */
DEFINE_func_80152C40() /* dedup: shared engine-core @0x80152C40 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_after", func_80152C80);
extern void func_8014BC44(s32 a0, s32 a1);
extern void func_80154A74(s32 a0, s32 a1);
extern void func_801553C0(s32 a0);
extern void func_801470AC(s32 *a0);
extern void func_801472B4(void *a0);
extern void func_801477E8(s32 *a0, s32 a1);
extern void func_80153C18();
void func_80152C80(s32* a0)
{
s32 s0 = a0;
func_8014BC44(s0, *(s16 *)(s0 + 0xF2));
*(s8 *)(s0 + 0xA8) = 0x20;
func_80154A74(s0, 0x11);
func_801553C0(s0);
func_801470AC((s32 *)s0);
func_801472B4((void *)s0);
*(s16 *)(s0 + 0x3E) = 0;
*(s16 *)(s0 + 0x40) = 0;
*(s16 *)(s0 + 0x42) = 0;
*(s8 *)(s0 + 0xDD) = 0;
*(s16 *)(s0 + 0x3C) = *(u16 *)(s0 + 0x3C) & 0xFFFE;
*(s16 *)(*(s32 *)(s0 + 0x20) + 0x10) = 0;
*(s16 *)(s0 + 0x60) = 0x1000;
*(s16 *)(s0 + 0x62) = 0x1000;
*(s16 *)(s0 + 0x64) = 0x1000;
func_801477E8((s32 *)s0, 0);
func_80153C18(s0);
}
extern void (*D_801888D8[])(void *);
+100 -4
View File
@@ -1348,7 +1348,40 @@ DEFINE_func_80130514() /* dedup: shared engine-core @0x80130514 (src/shared) */
DEFINE_func_801305CC() /* dedup: shared engine-core @0x801305CC (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_80130650);
extern void func_801319E0(s32 a0);
extern s32 func_8012BEE8(s32 a0);
extern void func_8012CBF4(s32);
extern s32 func_80131D68(s32 a0, s32 a1);
extern void func_80131C78(s32 a0);
extern void func_80131CA8(int a0, int a1);
void func_80130650(s32 a0) {
s32 s1;
if (*(s32 *)(a0 + 0xB4) & 0x1000) {
if (*(s16 *)(a0 + 0xA) >= 0x10) {
func_801319E0(a0);
return;
}
if (func_8012BEE8(a0) != 0) {
func_801319E0(a0);
return;
}
if (*(s32 *)(a0 + 0xC4) & 0x4) {
s32 v1 = *(s32 *)(a0 + 0x20);
*(s16 *)(v1 + 0x10) = *(u16 *)(v1 + 0x10) - 0x100;
}
s1 = ((s32 (*)(s32))func_8012CBF4)(a0);
if (func_80131D68(a0, s1) == 1) {
return;
}
if (s1 & 0x2000) {
func_80131C78(a0);
}
}
func_80131CA8(a0, 0x23);
}
DEFINE_func_80130740() /* dedup: shared engine-core @0x80130740 (src/shared) */
@@ -1366,7 +1399,29 @@ DEFINE_func_801308DC() /* dedup: shared engine-core @0x801308DC (src/shared) */
DEFINE_func_80130974() /* dedup: shared engine-core @0x80130974 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_80130A18);
extern void func_80131CA8(int, int);
extern s32 func_80133784(s32 a0, void *a1, s32 a2);
void func_80130A18(u8 *a0) {
s16 b1[4];
s16 b2[4];
*(u16 *)(a0 + 0x5C) = *(u16 *)(a0 + 0x5C) & 0xFFFE;
if (((s32 (*)(int, int))func_80131CA8)((int)a0, 0x34) != 0) {
return;
}
b1[0] = *(u16 *)(a0 + 6);
b1[1] = *(u16 *)(a0 + 0xA) - 0x10;
b1[2] = *(u16 *)(a0 + 0xE);
b2[0] = *(u16 *)(a0 + 6);
b2[1] = *(u16 *)(a0 + 0xA) + 8;
b2[2] = *(u16 *)(a0 + 0xE);
if ((func_80133784(0x11, b1, (s32)b2) & 0x6000) != 0) {
*(s8 *)(a0 + 0xC1) = 0x11;
*(s16 *)(a0 + 0xAC) = 0x78;
}
}
DEFINE_func_80130AC4() /* dedup: shared engine-core @0x80130AC4 (src/shared) */
@@ -1721,7 +1776,33 @@ INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_80131CA
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_80131CF4);
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_80131D68);
struct S80131E00;
extern void func_80131E00(struct S80131E00 *a0, s32 a1);
extern void func_80131CA8(int, int);
extern void func_8002A04C(s32 a0);
extern void func_8012C218(void *a0);
int func_80131D68(int a0, int a1)
{
s32 s0 = a0;
s32 c = a1 & 0xFF;
if (c == 2 || c == 0x1B) {
func_80131E00((struct S80131E00 *)s0, 0x12);
return 1;
}
if (c == 0x1A || c == 0x1C) {
if (((s32 (*)(int, int))func_80131CA8)(s0, 0x11) != 0) {
return 1;
}
if (*(s32 *)(s0 + 0x78) != 0) {
func_8002A04C(s0);
}
func_8012C218((void *)s0);
return 1;
}
return 0;
}
extern void (*D_80186FEC[])(struct S80131E00 *a0);
@@ -3389,7 +3470,22 @@ DEFINE_func_80136D00() /* dedup: shared engine-core @0x80136D00 (src/shared) */
DEFINE_func_80136D08() /* dedup: shared engine-core @0x80136D08 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8012ACE0", func_80136DFC);
extern u16 D_80126B5E;
extern u16 D_80126B62;
extern u16 D_80126B66;
extern s32 *D_80126B78;
extern u16 D_80126CC4;
extern M2C_UNK func_800153CC(M2C_UNK, u16, M2C_UNK, M2C_UNK, s32, s32);
void func_80136DFC(void) {
((void (*)(s32, s32, s32, s32, s32, s32))func_800153CC)(0xA, (*(s16 *)&D_80126B5E), 0x110, 0x3C, 4, 0);
((void (*)(s32, s32, s32, s32, s32, s32))func_800153CC)(0xB, (*(s16 *)&D_80126B62), 0x110, 0x44, 4, 0);
((void (*)(s32, s32, s32, s32, s32, s32))func_800153CC)(0xC, (*(s16 *)&D_80126B66), 0x110, 0x4C, 4, 0);
((void (*)(s32, s32, s32, s32, s32, s32))func_800153CC)(0xD, *(s16 *)((s32)D_80126B78 + 0x12), 0x110, 0x54, 4, 0);
((void (*)(s32, s32, s32, s32, s32, s32))func_800153CC)(0xE, D_80126CC4, 0x110, 0x5C, 4, 0);
}
DEFINE_func_80136EC4() /* dedup: shared engine-core @0x80136EC4 (src/shared) */
+264 -8
View File
@@ -1656,7 +1656,67 @@ DEFINE_func_8015C750() /* dedup: shared engine-core @0x8015C750 (src/shared) */
DEFINE_func_8015C788() /* dedup: shared engine-core @0x8015C788 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_8015C7E4);
// @class: struct
// @stuck: none — MATCH (match_one 88/88); fn-ptr-array dispatch, top-level if/else needed branch-polarity invert (small block falls through, big block at L854)
extern s32 func_80161B18(void *a0);
extern s32 func_80161B84(void *a0);
extern s32 func_801496D4(void *a0);
extern u16 func_801487F4(s32 *a0);
extern s32 func_801488A8(u8 *a0);
extern void func_80161240(void *a0);
extern s32 func_80146E98(s32 a0);
extern void func_80149704(void);
extern void func_80147078(s32 *a0, s16 a1);
extern void func_80159B70(void *a0);
extern void func_80148AAC(u8 *a0);
extern void func_80146DB8(s32 *a0, s32 *a1);
extern void func_80146E90(s32 *a0, s32 a1);
extern void func_80146CA0(void *a0);
extern void func_80161C24(s32, s32);
extern void func_8014C010(s32 a0, s32 a1);
extern void (*D_801891B8[])(void*);
extern int D_8018915C;
void func_8015C7E4(u16 *param_1)
{
s32 iVar1;
u32 uVar2;
iVar1 = ((s32 (*)(u16 *))func_80161B18)(param_1);
if ((iVar1 == 0) && (iVar1 = ((s32 (*)(u16 *))func_80161B84)(param_1), iVar1 == 0)) {
iVar1 = ((s32 (*)(u16 *))func_801496D4)(param_1);
if (iVar1 != 0) {
((void (**)(u16*))D_801891B8)[*param_1](param_1);
((void (*)(u16 *))func_80149704)(param_1);
} else {
uVar2 = ((s32 (*)(u16 *))func_801487F4)(param_1);
if (((uVar2 & 0x80) == 0) && (iVar1 = ((s32 (*)(u16 *))func_801488A8)(param_1), iVar1 == 0)) {
((void (**)(u16*))D_801891B8)[*param_1](param_1);
((void (*)(u16 *, s32))func_80147078)(param_1, 0);
((void (*)(u16 *))func_80159B70)(param_1);
} else {
iVar1 = ((s32 (*)(u16 *))func_80161240)(param_1);
if (iVar1 == 0) {
iVar1 = ((s32 (*)(u16 *))func_80146E98)(param_1);
if (iVar1 != 0) {
((void (*)(u16 *))func_80148AAC)(param_1);
((void (*)(u16 *, void *))func_80146DB8)(param_1, &D_8018915C);
((void (*)(u16 *, s32))func_80146E90)(param_1, 0x14);
((void (*)(u16 *))func_80146CA0)(param_1);
}
if ((param_1[0x5c] & 0x2000) != 0) {
((void (*)(u16 *, s32))func_80161C24)(param_1, param_1[0xb7]);
((void (*)(u16 *, s32))func_8014C010)(param_1, 2);
}
}
}
}
}
return;
}
// @class: struct
// @stuck: none — dispatch + control flow on a single callee-saved param; expect MATCH
@@ -1695,7 +1755,61 @@ void func_8015C944(int param_1) {
}
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_8015CA28);
// @class: schedule
// @stuck: none — MATCH (goto forces the func_80161240 block to the function tail; bnez-to-end layout vs early-return fall-through)
extern s32 func_80149FB0(s32 a0);
extern s32 func_80161B18(void *a0);
extern s32 func_80161B84(void *a0);
extern s32 func_801496D4(void *a0);
extern u16 func_801487F4(s32 *a0);
extern s32 func_801488A8(u8 *a0);
extern void func_80148AAC(u8 *a0);
extern void func_80147AD4(s32 a0, s32 a1, s32 a2, s32 a3);
extern void func_801473EC(s32 *a0);
extern void func_8014D738(void);
extern void func_80146DB8(s32 *a0, s32 *a1);
extern void func_80146E90(s32 *a0, s32 a1);
extern void func_80146C98(s32 *a0, s16 a1);
extern void func_80161240(void *a0);
extern void func_80147078(s32 *a0, s16 a1);
extern void func_80159B70(void *a0);
extern void func_80149704(void);
extern void (*D_801891B8[])(void*);
extern int D_8018915C;
void func_8015CA28(u16 *param_1) {
((void (*)(void))func_80149FB0)();
if (((int (*)(u16 *))func_80161B18)(param_1) != 0) return;
if (((int (*)(u16 *))func_80161B84)(param_1) != 0) return;
if (((int (*)(u16 *))func_801496D4)(param_1) != 0) {
((void (**)(u16*))D_801891B8)[*param_1](param_1);
((void (*)(u16 *))func_80149704)(param_1);
return;
}
if ((((u32 (*)(u16 *))func_801487F4)(param_1) & 0x80) != 0 || ((int (*)(u16 *))func_801488A8)(param_1) != 0) {
if ((((int (*)(u16 *))func_80148AAC)(param_1) & 0xff) != 0) {
((void (*)(u16 *, int, int, int))func_80147AD4)(param_1, 0, 0, 0);
((void (*)(u16 *))func_801473EC)(param_1);
}
if (((int (*)(u16 *))func_8014D738)(param_1) != 0) {
((void (*)(u16 *, void *))func_80146DB8)(param_1, &D_8018915C);
((void (*)(u16 *, int))func_80146E90)(param_1, 0x14);
((void (*)(u16 *, int))func_80146C98)(param_1, 2);
}
if (*(int *)(param_1 + 0xb8) != 0)
goto do161240;
}
((void (**)(u16*))D_801891B8)[*param_1](param_1);
((void (*)(u16 *, int))func_80147078)(param_1, 0);
((void (*)(u16 *))func_80159B70)(param_1);
return;
do161240:
((void (*)(u16 *))func_80161240)(param_1);
}
DEFINE_func_8015CB94() /* dedup: shared engine-core @0x8015CB94 (src/shared) */
@@ -2114,7 +2228,38 @@ DEFINE_func_8015E22C() /* dedup: shared engine-core @0x8015E22C (src/shared) */
DEFINE_func_8015E288() /* dedup: shared engine-core @0x8015E288 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_8015E344);
// @class: struct
// @stuck: none — MATCH (pending whole-binary gate); fn-ptr table folds %lo via extern array, 0x234 single word store
extern void func_8015E40C(s32 a0);
extern s32 func_80161B18(void *a0);
extern s32 func_80161B84(void *a0);
extern s32 func_80161208();
extern void func_8015E5B0(u8*);
extern void func_80147078(s32 *a0, s16 a1);
extern void func_80159BE4(s32 arg0);
extern void (*D_801891B8[])(void*);
void func_8015E344(u16 *param_1)
{
((s32 (*)(void))func_8015E40C)();
if (((s32 (*)(u16 *))func_80161B18)(param_1) == 0 &&
((s32 (*)(u16 *))func_80161B84)(param_1) == 0 &&
((s32 (*)(u16 *))func_80161208)(param_1) == 0) {
if ((param_1[0x5c] & 0x4000) != 0) {
((void (*)(u16 *))func_8015E5B0)(param_1);
*(s32 *)((char *)param_1 + 0x234) = 1;
}
if ((param_1[0x5c] & 0x8000) != 0) {
((void (**)(u16*))D_801891B8)[param_1[0]](param_1);
((s32 (*)(u16 *, s32))func_80147078)(param_1, 0);
((s32 (*)(u16 *))func_80159BE4)(param_1);
}
}
}
DEFINE_func_8015E40C() /* dedup: shared engine-core @0x8015E40C (src/shared) */
@@ -2157,7 +2302,26 @@ void func_8015E588(void) {
DEFINE_func_8015E5B0() /* dedup: shared engine-core @0x8015E5B0 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_8015E698);
// @class: struct
// @stuck: none — MATCH (clean -O2 reconstruction; table-of-fnptr indexed by param_1[0])
extern s32 func_80161208();
extern void func_80147078(s32 *a0, s16 a1);
extern void func_80159BE4(s32 arg0);
/* function-pointer dispatch table */
extern void (*D_801891B8[])(void*);
void func_8015E698(u16 *param_1)
{
if (func_80161208() == 0 && (param_1[0x5c] & 0x8000) != 0) {
((void (**)(u16*))D_801891B8)[param_1[0]](param_1);
((void (*)(u16 *, s32))func_80147078)(param_1, 0);
((void (*)(u16 *))func_80159BE4)(param_1);
}
}
DEFINE_func_8015E714() /* dedup: shared engine-core @0x8015E714 (src/shared) */
@@ -2529,7 +2693,33 @@ void func_8015FD74(int param_1)
DEFINE_func_8015FDCC() /* dedup: shared engine-core @0x8015FDCC (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_8015FE70);
// @class: struct
// @stuck: none — MATCH expected (fn-ptr-table dispatch + ushort struct fields)
extern void (*D_801891B8[])(void*);
extern void func_80147078(s32 *a0, s16 a1);
extern void func_80159B70(void *a0);
extern void func_80154A74(s32 a0, s32 a1);
extern s32 func_80161208();
void func_8015FE70(u16 *param_1)
{
if ((param_1[0x5c] & 0x8000) != 0) {
if (param_1[0x5d] == 0) {
((void (**)())D_801891B8)[param_1[0]]();
((void (*)(u16 *, s16))func_80147078)(param_1, 0);
((void (*)(u16 *))func_80159B70)(param_1);
return;
}
param_1[0x5c] = param_1[0x5d];
}
if ((param_1[0x5c] & 0x4000) != 0) {
((void (*)(u16 *, s16))func_80154A74)(param_1, 0x11);
}
((void (*)(u16 *))func_80161208)(param_1);
}
// @class: struct
// @stuck: none — MATCH (75 ins). Key: share func_8016004C via if/else join (do NOT duplicate it in the v2<0 arm — that emits an extra move a0,s0 + shifts the tail schedule); reload 0x1A0 byte after the inner if for the two global stores + func_80165670
@@ -2634,7 +2824,28 @@ DEFINE_func_801601E4() /* dedup: shared engine-core @0x801601E4 (src/shared) */
DEFINE_func_80160244() /* dedup: shared engine-core @0x80160244 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_801602A4);
// @class: struct
// @stuck: none — MATCH (template = matched twin func_801601E4; lhu+0x8000 == compare, fnptr-table dispatch ((void (**)())D_801891B8)[*(u16*)a0]() no-arg, then 3-call setup in target order; func_80161208 in else)
#include "common.h"
extern void (*D_801891B8[])(void*);
extern void func_80154A74(s32 a0, s32 a1);
extern void func_80147078(s32 *a0, s16 a1);
extern void func_80159B70(void *a0);
extern s32 func_80161208();
void func_801602A4(s32 *a0) {
if (*(u16 *)((u8 *)a0 + 0xB8) == 0x8000) {
((void (**)())D_801891B8)[*(u16 *)a0]();
func_80154A74((s32)a0, 0x11);
((void (*)(s32, s32))func_80147078)((s32)a0, 0);
func_80159B70(a0);
} else {
((s32 (*)(s32 *))func_80161208)(a0);
}
}
DEFINE_func_8016032C() /* dedup: shared engine-core @0x8016032C (src/shared) */
@@ -2694,9 +2905,54 @@ DEFINE_func_80160888() /* dedup: shared engine-core @0x80160888 (src/shared) */
DEFINE_func_801608C0() /* dedup: shared engine-core @0x801608C0 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_80160920);
// @class: struct
// @stuck: none — MATCH (function-pointer table folds %lo via extern array indexed by halfword)
typedef void (*code)(unsigned short *);
extern void (*D_801891B8[])(void*);
extern u16 func_801487F4(s32 *a0);
extern s32 func_80161208();
extern void func_80160A74(s32 *a0);
extern void func_80154150(s32 a0, s32 a1);
extern void func_80146CA0(void *a0);
void func_80160920(unsigned short *param_1)
{
if ((((int (*)(void))func_801487F4)() & 8) == 0) {
((code *)D_801891B8)[*param_1](param_1);
((void (*)(unsigned short *))func_80160A74)(param_1);
} else {
if (((int (*)(unsigned short *))func_80161208)(param_1) == 0 && param_1[0x5c] == 0x8000) {
((void (*)(unsigned short *, int))func_80154150)(param_1, 0x25);
((void (*)(unsigned short *))func_80146CA0)(param_1);
}
}
return;
}
// @class: struct
// @stuck: none — MATCH (pending byte-gate); function-pointer table %lo-fold via extern array
extern u16 func_801487F4(s32 *a0);
extern void func_80160A74(s32 *a0);
extern s32 func_80161208();
/* function-pointer dispatch table; indexed by *param_1 (×4 = ptr size) */
extern void (*D_801891B8[])(void*);
void func_801609B8(u16 *param_1) {
if ((((u32 (*)(void))func_801487F4)() & 8) == 0) {
((void (**)(u16*))D_801891B8)[*param_1](param_1);
((void (*)(u16 *))func_80160A74)(param_1);
} else {
((void (*)(u16 *))func_80161208)(param_1);
}
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8015AE2C", func_801609B8);
DEFINE_func_80160A28() /* dedup: shared engine-core @0x80160A28 (src/shared) */
+26 -2
View File
@@ -4030,7 +4030,21 @@ DEFINE_func_8017197C() /* dedup: shared engine-core @0x8017197C (src/shared) */
DEFINE_func_80171990() /* dedup: shared engine-core @0x80171990 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8016AB6C", func_801719A4);
extern void *D_8011F738;
void func_801719A4(int a0, int a1)
{
u32 i;
s32 off;
s32 pad[1];
for (i = 0; i < a1; i++) {
off = i * 4;
*(s32*)((s32)&D_8011F738 + off) =
*(s32*)(((*(u8*)(a0 + 0x214) + i) << 2) + *(s32*)(a0 + 0x1FC));
}
*(u8*)(a0 + 0x214) += i;
}
DEFINE_func_80171A04() /* dedup: shared engine-core @0x80171A04 (src/shared) */
@@ -4229,7 +4243,17 @@ DEFINE_func_80172BC8() /* dedup: shared engine-core @0x80172BC8 (src/shared) */
DEFINE_func_80172C48() /* dedup: shared engine-core @0x80172C48 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_8016AB6C", func_80172C50);
extern void func_80174684(void *);
extern s32 func_80172CA0(void*);
struct S80172C50 { s32 a; s32 b; } __attribute__((packed));
extern s16 D_80126B30;
void func_80172C50(struct S80172C50 *a0) {
(*(struct S80172C50 *)&D_80126B30) = *a0;
func_80174684((void *)func_80172CA0);
}
extern s32 (*D_8018A0D0[])(void *);
+139 -4
View File
@@ -2699,7 +2699,41 @@ DEFINE_func_80173A20() /* dedup: shared engine-core @0x80173A20 (src/shared) */
DEFINE_func_80173A28() /* dedup: shared engine-core @0x80173A28 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_801734BC", func_80173A60);
extern s32 func_8014C118(void*, s32, s32);
extern void func_80174684(void *);
extern s32 D_80126B58;
extern s32 D_80127508;
extern s16 D_80126B30;
extern struct S80126B38 D_80126B38;
extern s16 D_80126B3A;
extern s16 D_80126B3C;
extern s16 D_8011F9C8;
extern s16 D_80126938;
extern s32 D_8012750C;
extern s32 func_80173B4C(void*);
void func_80173A60(s32 a0, s32 a1, s32 a2, s32 a3, s32 arg5)
{
s32 *s1 = &D_80126B58;
s32 v0;
if (a2 != 0) {
D_80127508 = ((s32 (*)(s32, s32, s32))func_8014C118)((s32)s1, a2, (s16)a3);
} else {
D_80127508 = 0;
}
v0 = s1[8];
__builtin_memcpy(&D_80126B30, arg5, 8);
(*(s16 *)&D_80126B38) = a0;
D_80126B3A = a1;
D_80126B3C = *(u16 *)(v0 + 0x12);
func_80174684((void *)func_80173B4C);
D_8011F9C8 = 0;
D_80126938 = 0;
D_8012750C = 0;
}
extern s32 (*D_8018A13C[])(void *);
@@ -2709,11 +2743,102 @@ s32 func_80173B4C(void *a0) {
DEFINE_func_80173B88() /* dedup: shared engine-core @0x80173B88 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_801734BC", func_80173BC0);
extern s16 D_80126B3A;
extern struct S80126B38 D_80126B38;
extern s16 D_8011F9C8;
extern s32 func_800D0EC4(void);
extern void func_8013E588(void*);
extern s32 func_80174650(s32);
extern void func_80171A34(s32 *a0, s8 a1);
extern void func_80171A1C(u8 *a0);
void func_80173BC0(u8* a0)
{
s32 v = D_80126B3A;
if (v != 0 && v < 0x6F && func_800D0EC4() == 0) {
if ((*(s16 *)&D_80126B38) & 0x8000) {
((void (*)(void))func_8013E588)();
} else {
func_80174650((s32)a0);
D_8011F9C8 = 2;
func_80171A34(a0, 7);
return;
}
}
func_80171A1C((u8 *)a0);
}
DEFINE_func_80173C64() /* dedup: shared engine-core @0x80173C64 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_801734BC", func_80173CB4);
extern s16 func_80171AB0(s32 a0, void *a1);
extern void func_8014706C(void *a0);
extern void func_80154274(s32 *a0, s32 a1);
extern void func_801553A8(s32 *a0);
extern void func_8016BADC(void *a0, s32 a1, s32 a2);
extern void func_80147324(s32 a0);
extern s32 func_8013767C(s32 a0);
extern void func_80171A1C(u8 *a0);
extern s32 D_801151D4;
extern struct S80126B38 D_80126B38;
extern u8 D_800D5DA8;
extern u8 D_800D5DB8;
extern s32 D_8012750C;
void func_80173CB4(s32 a0) {
s32 s0 = a0;
s32 v1 = D_801151D4;
s16 tmp[4];
s32 a;
s32 d;
tmp[0] = *(s32 *)(v1 + 0x3C);
tmp[1] = *(s32 *)(v1 + 0x40);
tmp[2] = *(s32 *)(v1 + 0x44);
if (func_80171AB0(a0, tmp) != 0) {
return;
}
func_8014706C((void *)s0);
switch ((u8)(*(u8 *)&D_80126B38)) {
case 0:
func_80154274((s32 *)s0, (s32)&D_800D5DA8);
*(s32 *)(s0 + 0x200) = 0x20;
a = 0x843;
goto ld0;
case 1:
func_80154274((s32 *)s0, (s32)&D_800D5DA8);
goto lb8;
case 2:
func_80154274((s32 *)s0, (s32)&D_800D5DA8);
__asm__ __volatile__("");
goto lb8;
case 3:
func_80154274((s32 *)s0, (s32)&D_800D5DB8);
func_801553A8((s32 *)s0);
goto lb8;
default:
goto ld8;
}
lb8:
func_8016BADC((void *)s0, -0x40, 0x40);
*(s32 *)(s0 + 0x200) = 0x80;
a = 0x6A6;
ld0:
func_80147324(a);
ld8:
d = D_8012750C;
if (d != 0) {
*(s32 *)(s0 + 0x198) = func_8013767C(d);
} else {
*(s32 *)(s0 + 0x198) = 0;
}
func_80171A1C((u8 *)s0);
}
// @class: schedule
// @stuck: none — MATCH (55 ins). Levers: pin param_1->$s0 ($16) + a register ptr &D_80127508->$s1 ($17)
@@ -2821,7 +2946,17 @@ DEFINE_func_80174650() /* dedup: shared engine-core @0x80174650 (src/shared) */
DEFINE_func_80174674() /* dedup: shared engine-core @0x80174674 (src/shared) */
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_801734BC", func_80174684);
extern u8 D_80126D6C;
extern void (*D_80127088)(void);
extern s32 D_801270BC;
void func_80174684(void* a0)
{
D_80126D6C = 0;
(*(void * *)&D_80127088) = a0;
D_801270BC = 0;
}
// @class: plumbing
// @stuck: none — MATCH (straight stub: two calls, fn-ptr args + 0x1000000 immediate)
+132 -4
View File
@@ -4547,9 +4547,65 @@ void func_8017D8F0(void) {
D_8012694C = 0;
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_80178D40", func_8017D900);
// @class: plumbing
// @stuck: none — expect MATCH (STUB: ordered global stores + single tail call, sibling of func_8017D840)
extern void func_80174E9C(s32 a0);
extern s32 D_80126950;
extern s32 D_80126954;
extern s32 D_8012695C;
extern s16 D_80126968;
extern s16 D_8012696A;
extern s16 D_8012696C;
extern s16 D_80126976;
extern s16 D_80126978;
extern s16 D_8012697A;
extern u8 D_801B1DAC;
M2C_UNK func_8017D900(void)
{
D_80126950 = 0x1F4;
D_80126954 = 0x1F4;
D_8012695C = 0x320;
D_80126968 = 0x60;
D_8012696A = 0x800;
D_80126976 = 0x18;
D_80126978 = -0x80;
D_8012696C = 0;
D_8012697A = -0x7D;
((void (*)(void *))func_80174E9C)(&D_801B1DAC);
}
// @class: plumbing
// @stuck: none — MATCH (expected): straight global stores + tail call; const 0x140 reused for two halves
extern s32 D_80126954;
extern s32 D_8012695C;
extern s16 D_80126968;
extern s16 D_8012696A;
extern s16 D_8012696C;
extern s16 D_80126976;
extern s16 D_80126978;
extern s16 D_8012697A;
extern s32 func_8017DA08(void *a0);
extern void func_8012A018(s32 a, s32 b);
M2C_UNK func_8017D98C(void)
{
D_80126954 = 0x15E;
D_8012695C = 600;
D_80126968 = 0x1C2;
D_8012696A = 0x600;
D_8012696C = 0;
D_80126976 = 0x140;
D_80126978 = 0;
D_8012697A = 0x140;
((void (*)(void (*fn)(void), int))func_8012A018)(func_8017DA08, 0);
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_80178D40", func_8017D98C);
extern s32 (*D_8018A530[])(void *);
@@ -5371,9 +5427,81 @@ void func_8017F0B4(u8 *a0) {
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_80178D40", func_8017F114);
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_80178D40", func_8017F240);
// @class: regalloc-order
// @stuck: none — MATCH (base &D_801270D0 pinned to $s0 holds across call; one lui/addiu reused for load+store)
extern s32 D_801270D0;
extern u8 D_8018A868;
extern s32 func_8012C51C(void *a0, s32 a1);
M2C_UNK func_8017F240(void)
{
register s32 *p __asm__("$16");
p = &D_801270D0;
if (*p == 0) {
((void (*)(u8 *, s32))func_8012C51C)(&D_8018A868, 0);
*p = 1;
}
}
// @class: regalloc-order
// @stuck: none — MATCH. Two levers: (1) hold &D_801270CC in a `int *state` local so its
// address lives in a saved reg ($s0) across calls (raw `D_801270CC` re-materializes per access);
// (2) write case 0 as `if(==8){...state=2}else{...state=1;return;}` so the ==8 path falls
// through to the gcc-cross-jump-merged CC=2 tail (the !=8 path branches out to L32C, matching `bne`).
extern int D_801270CC;
extern int D_801270D4;
extern u16 D_80126B66;
extern unsigned char D_80078EC1;
extern void func_8016EDEC(s32 a0, s32 a1, s32 a2);
extern void func_8017E1D4(void *arg0);
extern void func_8017E748(void *arg0);
extern void func_8017E868(void *arg0);
void func_8017F290(void)
{
int *state = &D_801270CC;
switch (*state) {
case 0:
if ((*(short *)&D_80126B66) < 0x600) {
return;
}
if ((D_80078EC1 & 0x7F) == 8) {
((void (*)(void *, int))func_8016EDEC)(func_8017E1D4, 0x1000000);
*state = 2;
} else {
((void (*)(void *, int))func_8016EDEC)(func_8017E1D4, 0x1000000);
*state = 1;
return;
}
break;
case 1:
if ((D_80078EC1 & 0x7F) != 8) {
return;
}
((void (*)(void *, int))func_8016EDEC)(func_8017E748, 0x1000000);
*state = 2;
break;
case 2:
if (D_801270D4 == 0) {
return;
}
*state = 3;
D_801270D4 = D_801270D4 + 1;
((void (*)(void *, int))func_8016EDEC)(func_8017E868, 0x1000000);
break;
case 3:
if (D_801270D4 == 0) {
return;
}
D_801270D4 = D_801270D4 + 1;
break;
}
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_80178D40", func_8017F290);
extern s32 (*D_8018A87C[])();
+102 -1
View File
@@ -3317,7 +3317,108 @@ void func_80182420(int param_1)
return;
}
INCLUDE_ASM("asm/ov_SC01_077/nonmatchings/ov_SC01_077_jr_80182268", func_801824D0);
// @class: plumbing
// @stuck: none — MATCH (181 ins). switch(bVar1) dispatch; counters as *p+=1;if(*p<K) (store-to-load
// CSE keeps value in $v0, nop in branch delay); *p = *p*15/16 in-place (no temp → immediate store);
// C3&1 if inverted (!= 0 puts CBA4 inline / CBF4 out-of-line); gcc reuses $s2(==2) for the ==2 compare.
extern void func_8012DBD0(s32 a0, s32 a1, s32 a2, s32 a3);
extern s32 func_8012CC64(s32 a0, void *a1);
extern void func_8012CBF4(s32);
extern s32 func_8012CBA4(s32 a0);
extern s32 func_80143B6C(s32 a0, s32 a1);
extern void func_80182FD0(s32 a0);
extern void func_80182E30(short*);
extern void func_8018294C(void*);
extern u8 D_8018AB10[];
void func_801824D0(int param_1)
{
u8 bVar1;
s32 uVar3;
s32 uVar4;
func_8012DBD0(param_1, 0x50, *(s16 *)(*(s32 *)(param_1 + 0x20) + 0x12) + 0x800, 0x1D);
bVar1 = *(u8 *)(param_1 + 0xC2);
switch (bVar1) {
case 0:
*(u16 *)(*(s32 *)(param_1 + 0x20) + 0x10) -= 0x100;
*(s32 *)(param_1 + 0x1C) += 1;
if (*(s32 *)(param_1 + 0x1C) < 0x29) {
if (*(s32 *)(param_1 + 0x14) < 1)
uVar3 = ((s32 (*)(s32))func_8012CBF4)(param_1);
else
uVar3 = func_8012CC64(param_1, &D_8018AB10);
if ((uVar3 & 0x2000) == 0)
return;
if ((uVar3 & 0xFF) != 2) {
*(u8 *)(param_1 + 0xC2) = 1;
func_80143B6C(param_1, 1);
*(s32 *)(param_1 + 0x14) = 0xFFF30000;
*(s32 *)(param_1 + 0x1C) = 0;
return;
}
goto LAB_80182750;
}
goto LAB_80182780;
case 1:
*(u16 *)(*(s32 *)(param_1 + 0x20) + 0x10) -= 0x100;
*(s32 *)(param_1 + 0x1C) += 1;
if (*(s32 *)(param_1 + 0x1C) < 0x29) {
uVar4 = *(s32 *)(param_1 + 0x14);
uVar3 = func_8012CC64(param_1, &D_8018AB10);
if ((uVar3 & 0x2000) == 0)
return;
if ((uVar3 & 0xFF) != 2) {
func_80143B6C(param_1, 1);
*(s32 *)(param_1 + 0x14) = uVar4;
*(u8 *)(param_1 + 0xC2) = 2;
*(s32 *)(param_1 + 0x1C) = 0;
*(u16 *)(*(s32 *)(param_1 + 0x20) + 0x10) = 0;
return;
}
goto LAB_80182750;
}
goto LAB_80182780;
case 2:
*(s32 *)(param_1 + 0x10) = *(s32 *)(param_1 + 0x10) * 15 / 16;
*(s32 *)(param_1 + 0x18) = *(s32 *)(param_1 + 0x18) * 15 / 16;
if ((*(u8 *)(param_1 + 0xC3) & 1) != 0) {
uVar3 = func_8012CBA4(param_1);
if ((uVar3 & 0x2000) == 0)
goto LAB_80182780;
if ((uVar3 & 0xFF) == 2)
goto LAB_80182750;
} else {
uVar3 = ((s32 (*)(s32))func_8012CBF4)(param_1);
if ((uVar3 & 0x2000) != 0)
*(u8 *)(param_1 + 0xC3) |= 1;
}
if ((*(s32 *)(param_1 + 0x1C) & 3) == 3)
func_80143B6C(param_1, 1);
*(s32 *)(param_1 + 0x1C) += 1;
if (*(s32 *)(param_1 + 0x1C) < 0x11)
return;
if ((uVar3 & 0x2000) == 0)
goto LAB_80182780;
if ((uVar3 & 0xFF) != 2)
goto LAB_80182760;
LAB_80182750:
func_80182FD0(param_1);
return;
LAB_80182760:
if (*(s16 *)(param_1 + 0x76) <= 0)
goto LAB_80182780;
((void (*)(s32))func_80182E30)(param_1);
return;
LAB_80182780:
((void (*)(s32))func_8018294C)(param_1);
return;
default:
return;
}
}
// @class: plumbing
// @stuck: none — MATCH (30 ins)