phase12: match func_800BC8C4 (697 bodies / 706 regions)
This commit is contained in:
+721
-722
File diff suppressed because it is too large
Load Diff
@@ -547,6 +547,7 @@
|
||||
0x800B74D0 0x800B7524 src/func_800B74D0.c
|
||||
0x800BBAC8 0x800BBB10 src/func_800BBAC8.c
|
||||
0x800BBDEC 0x800BBDF8 src/func_800BBDEC.c
|
||||
0x800BC8C4 0x800BC960 src/func_800BC8C4.c
|
||||
0x800BC960 0x800BC9C4 src/func_800BC960.c
|
||||
0x800BC9C4 0x800BCA14 src/func_800BC9C4.c
|
||||
0x800BFE80 0x800BFEA0 src/func_800BFE80.c
|
||||
|
||||
|
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* func_800BC8C4 — 156 bytes at 0x800BC8C4..0x800BC960
|
||||
*
|
||||
* Increments the gp counter D_801220A0. When the old counter value is nonpositive,
|
||||
* an unsigned-byte argument conditionally selects a first pair of calls to
|
||||
* func_800BC658; the nonpositive-counter arm then unconditionally performs the
|
||||
* corresponding func_800BC6EC pair. The D_80122374 byte conditionally selects the
|
||||
* second call in each pair.
|
||||
*
|
||||
* The outer condition is deliberately `v <= 0`: the original branches with bgtz to
|
||||
* the epilogue for a positive old counter, so both call pairs are skipped in that
|
||||
* case. The unsigned-byte test supplies the target's `andi` in the first branch's
|
||||
* delay slot. The gp counter and flag are accessed through the registry-marked
|
||||
* symbols; the two handle addresses are absolute address-named symbols.
|
||||
*
|
||||
* LIMITS: the counter, handles, flag, and callees are not semantically identified.
|
||||
* Their addresses, access widths, branch polarity, call order, frame, and return
|
||||
* sequence are byte evidence from the USA executable.
|
||||
*/
|
||||
|
||||
extern int D_801220A0;
|
||||
extern int D_8012D79C;
|
||||
extern int D_8012DD30;
|
||||
extern unsigned char D_80122374;
|
||||
extern void func_800BC658(int);
|
||||
extern void func_800BC6EC(int);
|
||||
|
||||
void func_800BC8C4(unsigned char a0)
|
||||
{
|
||||
int v = D_801220A0;
|
||||
|
||||
D_801220A0 = v + 1;
|
||||
if (v <= 0) {
|
||||
if (a0 != 0) {
|
||||
func_800BC658(D_8012D79C);
|
||||
if (D_80122374 != 0)
|
||||
func_800BC658(D_8012DD30);
|
||||
}
|
||||
func_800BC6EC(D_8012D79C);
|
||||
if (D_80122374 != 0)
|
||||
func_800BC6EC(D_8012DD30);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user