phase12: match func_800BC9C4 (696 bodies / 705 regions)

This commit is contained in:
Christopher Williams
2026-09-24 23:01:12 -04:00
parent 4f253f9018
commit f80e4ab21d
3 changed files with 1018 additions and 980 deletions
+979 -980
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -548,6 +548,7 @@
0x800BBAC8 0x800BBB10 src/func_800BBAC8.c
0x800BBDEC 0x800BBDF8 src/func_800BBDEC.c
0x800BC960 0x800BC9C4 src/func_800BC960.c
0x800BC9C4 0x800BCA14 src/func_800BC9C4.c
0x800BFE80 0x800BFEA0 src/func_800BFE80.c
0x800BFEA0 0x800BFEC0 src/func_800BFEA0.c
0x800BFEC0 0x800BFEE0 src/func_800BFEC0.c
1 # Code-region registry: one C region per matched function.
548 0x800BBAC8
549 0x800BBDEC
550 0x800BC960
551 0x800BC9C4
552 0x800BFE80
553 0x800BFEA0
554 0x800BFEC0
+38
View File
@@ -0,0 +1,38 @@
/*
* func_800BC9C4 — 80 bytes at 0x800BC9C4..0x800BCA14
*
* Copies a 0x14F0-byte region from the fixed source at D_80118350 to a destination
* reached through a0+32 -> +0x120 -> +0x30F4. The loop copies four words per iteration,
* then copies the first word after the end pointer in the return delay slot.
*
* The source shape is byte-required. A do/while V4 assignment produces the target's
* four-load/four-store loop body without an entry guard. The end pointer is expressed
* through a char pointer because the target's 0x14F0 is a byte displacement; using
* `base + 0x14F0` on an int pointer scales it to 0x53C0. The source pointer is bound
* to a3 so the fixed source remains live in the target's source register while the
* destination is allocated to a2. The final one-word copy is deliberately outside
* the loop.
*
* LIMITS: the names and meanings of the source table, pointer chain, and copied words
* are not inferred. The fixed address, pointer offsets, 0x14F0 byte extent, four-word
* copy, loop termination, final word copy, and register allocation are byte evidence.
*/
typedef struct { int x0, x1, x2, x3; } V4;
extern int D_80118350[];
void func_800BC9C4(int *a0)
{
int *dst = (int *)(*(int *)(*(int *)((char *)a0 + 32) + 288) + 0x30f4);
register int *src __asm__("$7") = D_80118350;
int *end = (int *)((char *)D_80118350 + 0x14f0);
do {
*(V4 *)dst = *(V4 *)src;
src += 4;
dst += 4;
} while (src != end);
dst[0] = src[0];
}