phase12: match func_80066DA0 (710 bodies / 719 regions)
This commit is contained in:
+939
-940
File diff suppressed because it is too large
Load Diff
@@ -307,6 +307,7 @@
|
||||
0x80065930 0x80065980 src/func_80065930.c
|
||||
0x80065B6C 0x80065B8C src/func_80065B6C.c
|
||||
0x800668A8 0x800668F0 src/func_800668A8.c
|
||||
0x80066DA0 0x80066E2C src/func_80066DA0.c
|
||||
0x80066E2C 0x80066E58 src/func_80066E2C.c
|
||||
0x800681A4 0x800681E0 src/func_800681A4.c
|
||||
0x800681E0 0x8006821C src/func_800681E0.c
|
||||
|
||||
|
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* func_80066DA0 — 140 bytes at 0x80066DA0..0x80066E2C
|
||||
*
|
||||
* For index 23, writes one to *a2 when the absolute halfword at 0x80122514 is
|
||||
* zero, otherwise writes zero; it also clears *a3 when non-null. For other
|
||||
* indices, loads the table pointer at object+0x20, forms a row at index*4, and
|
||||
* copies the halfword at +0x46 to *a2 and +0x44 to *a3 when those outputs exist.
|
||||
*
|
||||
* The special-index arm uses an explicit nonzero-to-zero-store label so the
|
||||
* target's bnez/jump/delay-slot layout is preserved. The absolute halfword read
|
||||
* is intentionally a literal address rather than the gp-marked symbol: the target
|
||||
* materializes 0x80122514 with lui/lh.
|
||||
*
|
||||
* LIMITS: the object table and output meanings are not inferred. The selector
|
||||
* value 23, absolute halfword address, object table offset 0x20, row offsets
|
||||
* 0x44/0x46, null checks, and return are byte evidence.
|
||||
*/
|
||||
|
||||
typedef struct Obj {
|
||||
char pad[32];
|
||||
unsigned char *table;
|
||||
} Obj;
|
||||
|
||||
void func_80066DA0(Obj *a0, int a1, int *a2, int *a3)
|
||||
{
|
||||
unsigned short *row;
|
||||
|
||||
if (a1 == 23) {
|
||||
if (a2 != 0) {
|
||||
if (*(short *)0x80122514 != 0)
|
||||
goto store_zero;
|
||||
*a2 = 1;
|
||||
goto common;
|
||||
store_zero:
|
||||
*a2 = 0;
|
||||
common:
|
||||
;
|
||||
}
|
||||
if (a3 != 0)
|
||||
*a3 = 0;
|
||||
} else {
|
||||
if (a2 != 0) {
|
||||
row = (unsigned short *)((char *)a0->table + a1 * 4);
|
||||
*a2 = row[35];
|
||||
}
|
||||
if (a3 != 0) {
|
||||
row = (unsigned short *)((char *)a0->table + a1 * 4);
|
||||
*a3 = row[34];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user