phase12: match func_800B62C8 (715 bodies / 724 regions)

This commit is contained in:
Christopher Williams
2026-09-25 08:08:58 -04:00
parent 4b46fcb2ea
commit 3d96b5be77
3 changed files with 871 additions and 821 deletions
+820 -821
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -551,6 +551,7 @@
0x800B58C8 0x800B5924 src/func_800B58C8.c
0x800B5AF0 0x800B5AF8 src/func_80042088.c
0x800B5CB4 0x800B5CF8 src/func_800B5CB4.c
0x800B62C8 0x800B6330 src/func_800B62C8.c
0x800B67B8 0x800B6838 src/func_800B67B8.c
0x800B6838 0x800B6894 src/func_800B6838.c
0x800B6AE0 0x800B6B50 src/func_800B6AE0.c
1 # Code-region registry: one C region per matched function.
551 0x800B58C8
552 0x800B5AF0
553 0x800B5CB4
554 0x800B62C8
555 0x800B67B8
556 0x800B6838
557 0x800B6AE0
+50
View File
@@ -0,0 +1,50 @@
/*
* func_800B62C8 — 104 bytes at 0x800B62C8..0x800B6330
*
* Sign-extends its input to 16 bits, stores it at gp-relative D_80122090, and
* only performs the two-call update when D_80122094 is nonzero and the input
* differs from D_8012204C. The update calls func_800FB028 with the address
* 0x80140730, loads D_80122734, clears D_80122094, and calls func_800B6090.
*
* The explicit unequal-to-end guard is intentional: the target branches with
* `bne` to the epilogue when the values differ, allowing the call block to be
* the fallthrough path. The s0 binding preserves the shared address across both
* calls and the 24-byte saved-register frame.
*
* LIMITS: the globals, callees, and object meaning are not inferred. The signed
* input conversion, gp offsets, compare polarity, address 0x80140730, call order,
* flag clear, and frame are byte evidence.
*/
extern int D_80122094;
extern int D_80122090;
extern int D_8012204C;
extern int D_80122734;
extern char D_80140730[];
extern void func_800FB028(void *);
extern void func_800B6090(void *, int);
void func_800B62C8(int a0)
{
register void *s0 __asm__("$16");
int a1;
int v0;
a1 = D_80122094;
a0 = (short)a0;
D_80122090 = a0;
if (a1 == 0)
goto end;
v0 = D_8012204C;
if (a0 != v0)
goto end;
{
s0 = D_80140730;
func_800FB028(s0);
a1 = D_80122734;
D_80122094 = 0;
func_800B6090(s0, a1);
}
end:
return;
}