feat(phase-24): T7 whale func_80144B9C CRACKED + banked ×1 (-O0 struct-assign) + ×134 infra

- CRACK (cheap Opus, no Fable5/calls.c): the 770-ins reach-134 whale's 2-insn residual was a
  STRUCT ASSIGN `D_80078E50 = *ent;` (sizeof(ENT)==0x24), NOT an explicit memcpy() call — gcc-2.7.2
  -O0 expands a >MOVE_RATIO-word struct copy via emit_block_move->emit_library_call(memcpy),
  precomputing dst/src into pseudos then addu into $a0/$a1 = the exact 2 missing moves.
- -O0 SPLIT: whale is a 2nd -O0 region (prologue 21F0A003) in the -O2 'after' segment; carved into
  its own -O0 object o0b (splat.ov_SC01_077.yaml 3-way + Makefile CC1FLAGS=-O0; address-sorted
  line-split preserves all banked C). ov_SC01_077 == d19c9580.
- memcpy: memcpy=0x8005C324 in symbols.resident.txt (overlays+resident only; main untouched vs its
  MEMCPY.o) + __asm__("memcpy") on the engine_core.h block-copy macro (non-builtin C name -> no
  built-in codegen, same call).
- MILESTONE: CLEAN fleet check-all 136/136 byte-identical (R22), dedup 1810/0. reach-134 -> ×134 (W9) next.
This commit is contained in:
Drew T
2026-07-07 22:01:58 -06:00
parent c106774776
commit 3b0cc190b2
9 changed files with 12544 additions and 12184 deletions
+4
View File
@@ -444,6 +444,10 @@ build/src/boot.o: CC1FLAGS := -quiet -O0 -G0 -mips1 -mcpu=3000 -mgas -msoft-floa
# (config/splat.ov_SC01_077.yaml) so this override reaches just that .o.
build/src/ov_SC01_077/ov_SC01_077_o0.o: CC1FLAGS := -quiet -O0 -G0 -mips1 -mcpu=3000 -mgas -msoft-float -fgnu-linker
# Phase-24: the whale func_80144B9C is a 2nd -O0 region (0x80144B9C..0x801457A4), carved into its
# own object o0b by the splat config; same -O0 override (struct-assign memcpy matches only at -O0).
build/src/ov_SC01_077/ov_SC01_077_o0b.o: CC1FLAGS := -quiet -O0 -G0 -mips1 -mcpu=3000 -mgas -msoft-float -fgnu-linker
# link (the .ld pulls in the .o by path) + objcopy to the raw PS-X EXE image.
$(OUT): $(OBJS) $(ASSET_OBJS) $(LD_SCRIPT)
@set -e
+6 -1
View File
@@ -59,7 +59,12 @@ segments:
# rewritten), after KEEPS the ov_SC01_077 name (the bulk matched C + asm paths unchanged).
- [0x0, c, ov_SC01_077_a] # -O2 before: vram 0x80128158..0x8013B568 (file 0x0..0x13410)
- [0x13410, c, ov_SC01_077_o0] # -O0 cluster: 16 fns vram 0x8013B568..0x8013C98C (file 0x13410..0x14834)
- [0x14834, c, ov_SC01_077] # -O2 after: vram 0x8013C98C..0x80186AD0 (file 0x14834..0x5E978)
# Phase-24 whale: func_80144B9C is a SECOND -O0 region (prologue 21F0A003) stranded in the
# -O2 "after" segment (0x80144B9C..0x801457A4). Carve it into its own -O0 object (o0b), splitting
# the -O2 "after" into before-whale (keeps the ov_SC01_077 name) and after-whale (ov_SC01_077_after).
- [0x14834, c, ov_SC01_077] # -O2 after part 1: vram 0x8013C98C..0x80144B9C (file 0x14834..0x1CA44)
- [0x1CA44, c, ov_SC01_077_o0b] # -O0 WHALE func_80144B9C: vram 0x80144B9C..0x801457A4 (file 0x1CA44..0x1D64C)
- [0x1D64C, c, ov_SC01_077_after] # -O2 after part 2: vram 0x801457A4..0x80186AD0 (file 0x1D64C..0x5E978)
- [0x5E978, data, tail] # data tail (word-aligned bulk): file 0x5E978..0xB29D4
- [0xB29D4, bin, trailing] # final 3 bytes (EOF 0xB29D7 not word-aligned; spimdisasm drops
# a trailing partial word and a <4-byte `data` carve emits nothing,
+8
View File
@@ -15,3 +15,11 @@
// 4.7 libsnd links byte-identical in Phase 11. Plausible (resident holds the sound driver; addr is
// a splat function boundary). Name is version-stable even if the bytes differ slightly across 4.0/4.7.
DsMix = 0x800D1BD8; // func
// Phase-24: memcpy at 0x8005C324 (libc2 MEMCPY.o; proto-sep8 + main map confirmed). Resolves the
// whale func_80144B9C's -O0 struct-assign block-move (gcc emits `jal memcpy`), in ALL overlays.
// Placed here (overlays + resident stack this; main does NOT) so main — where 0x8005C324 is DEFINED
// by MEMCPY.o — is untouched (no multiple-definition). func_8005C324 aliases the SAME address: the
// engine_core.h block-copy macro's variable-size calls keep the NON-builtin C name func_8005C324
// (naming them `memcpy` triggers gcc-2.7.2 built-in codegen → byte mismatch) but get an
// __asm__("memcpy") label so they emit this same 0x8005C324 call. One symbol resolves both.
memcpy = 0x8005C324; // func (whale -O0 block-move + engine_core.h block-copy via __asm__ label)
+4 -4
View File
@@ -3,11 +3,11 @@
# source-derived (committed src/*.c + config/dedup.us.yaml). Live byte gate: `make check-all`;
# cross-binary collapsible-byte leverage: docs/duplicates.cross.md.
FLEET REAL substantive : 225815 (of which dedup-shared 223272 via 1810 groups / 223323 instances)
FLEET REAL substantive : 225816 (of which dedup-shared 223272 via 1810 groups / 223323 instances)
FLEET LINKED PsyQ objs : 959
FLEET byte-identical : 227344 / 344941 = 65.91% (REAL+LINKED+empties)
FLEET byte-identical : 227345 / 344941 = 65.91% (REAL+LINKED+empties)
FLEET NON_MATCHING : 7 (0 in any default build — G4)
FLEET INCLUDE_ASM stubs : 117590
FLEET INCLUDE_ASM stubs : 117589
FLEET matchable : 344941
| binary | REAL | shared | LINKED | byte-ident | matchable | byte-ident % |
@@ -22,7 +22,7 @@ FLEET matchable : 344941
| ov_SC01_008 | 1673 | 1660 | 0 | 1675 | 2435 | 68.8% |
| ov_SC01_009 | 1694 | 1661 | 0 | 1695 | 2517 | 67.3% |
| ov_SC01_074 | 1673 | 1661 | 0 | 1675 | 2434 | 68.8% |
| ov_SC01_077 | 2190 | 1621 | 0 | 2192 | 2586 | 84.8% |
| ov_SC01_077 | 2191 | 1621 | 0 | 2193 | 2586 | 84.8% |
| ov_SC01_080 | 1691 | 1664 | 0 | 1691 | 2522 | 67.0% |
| ov_SC01_084 | 1696 | 1664 | 0 | 1701 | 2588 | 65.7% |
| ov_SC02_000 | 1710 | 1699 | 0 | 1710 | 2691 | 63.5% |
+1
View File
@@ -46,6 +46,7 @@ Whole-binary byte-gate (`tools/harvest_verify.py`) is the SOLE arbiter (G3/P9).
## Progress log
*(append one line per task on completion — the crash-recovery trail)*
- **🐋 T7 WHALE func_80144B9C CRACKED + banked ×1 (-O0), clean fleet 136/136 (2026-07-07):** the 770-ins reach-134 whale — the single biggest byte-weight lever (≈ next ~8 giants combined). **CRACK (cheap Opus, NO Fable5/calls.c — both retired):** the close=2 residual was a STRUCT ASSIGN `D_80078E50 = *ent;` (sizeof(ENT)==0x24), NOT an explicit memcpy() — gcc-2.7.2 -O0 expands a >MOVE_RATIO struct copy via emit_block_move→emit_library_call(memcpy): args go through copy_to_mode_reg (pseudos) then `addu $a0,$v1 ; addu $a1,$v0` = the exact 2 missing moves. **BANK INFRA (byte-neutral, reusable for ×134):** (1) 2nd per-file -O0 split — the whale is a 2nd -O0 region (prologue 21F0A003) in the -O2 "after" segment, carved into its own -O0 object `o0b` (splat.ov_SC01_077.yaml 3-way + Makefile CC1FLAGS=-O0; the file is splat-emitted in vram order → a LINE-based split at the whale preserves all banked C, no item-parsing/DEFINE_ hazard — `.run/t7b/split_whale.py`). (2) `memcpy=0x8005C324` in symbols.resident.txt (overlays+resident ONLY — main defines memcpy via MEMCPY.o, so a shared-symbol add would multiple-def) + `__asm__("memcpy")` on the engine_core.h block-copy macro (keeps the non-builtin C name to avoid gcc's built-in-memcpy codegen, emits the same 0x8005C324 call; benign "conflicting types for built-in memcpy" warning). splat REJECTS two symbols at one addr (tried func_8005C324+memcpy → error) → the asm-label is the fix. ov_SC01_077 == d19c9580; **CLEAN fleet check-all 136/136 (R22)**, dedup 1810/0. **W9 NEXT: script the ×134 -O0 rollout** (per-overlay o0b split via split_whale-style tool + a DEFINE_func_80144B9C() macro w/ TU-local typedefs — no engine_types.h collision; 133 single-file overlays, whale stubbed at file 0x1CA44 in each) → ~+1.6% byte-weight. Commit: (this).
- **T7 §G BATCH CLOSE ✅ (2026-07-07, committed; TRUE clean fleet 136/136) — 6/8 reach-134 giants cracked, 4 propagated ×134, fleet 65.75→65.91%:** MATCHED: `func_801571C4` (permuter, after the p16_permute comment-fix), `func_8014EA4C`/`func_801372B0`/`func_801770E0`/`func_80176D94`/`func_80148094` (Fable5, sequential idiom-banking chain). 2 WALLS (stay INCLUDE_ASM, G4): `func_80178004` (biv-init emit-order, close=7), `func_801412A8` (allocation placement-knot, close=29). **Propagated ×134:** 571C4/EA4C/76D94/48094 (134 overlays byte-identical; dedup **1810 groups / 0 failed**; genuinely-clean `make clean`+extract-all-136+check-all = **136/136**). **×1 (×134 follow-up — §A `dedup_propagate.compiles_standalone` gaps):** `func_801372B0` (asm-label-alias bank; blocked by local SVEC/GLINE typedefs — need unique-renamed lift — + register-asm pins), `func_801770E0` (anon-struct'd; blocked by register-asm pins). **NEW TOOLS:** `tools/p16_permute.py` comment-fix (a silent bug that had no-op'd the permuter on EVERY commented draft → immediately cracked 571C4) + `tools/permuter_ils.py` (warm-restart iterated-local-search). **KNOWLEDGE (durable):** cookbook **§37** + `docs/gcc-2.7.2-map/t7g-giant-harvest.md` (sibling-isomorphism law · `/s`-dep-lattice load+store dual · allocno ref-boost · coalescable-copy insn_count bump · RC-6-exemplar downgrade · "RTL dumps NOT stripped" · asm-label-alias/anon-struct banking). **REMAINING:** the WHALE `func_80144B9C` (close=2, DISCOVERED -O0 — needs a 2nd per-file -O0 split + gcc-2.7.2 `calls.c` + Fable5) + the 2 ×1 giants' ×134 (a pin/asm self-containment shim). Commit: (this).
- **T7 §G IN PROGRESS — parallel-attack session (2026-07-07, uncommitted; NOT yet clean-verified):** worked the ~9 reach-134 §G giants via 8 parallel Opus draft-agents (draft-only) + directed permuter + Fable5 chain; banking serial in main loop. **R14 re-measure overturned §G's stale closeness** (func_8014EA4C "~c6"→really 128; func_80178004 "close=0"→91; the REAL closest was func_801571C4 @11). **FLYWHEEL FIX:** found+fixed a silent permuter bug — `make_base_c` didn't strip draft header comments → `cpp` "unterminated comment" → decomp-permuter no-op'd `(0s)` on EVERY commented giant draft (`tools/p16_permute.py` `strip_c_comments`). Immediately cracked **func_801571C4 (SCHEDULE, 11→0 in 40s) → banked ×1** (`.run/t7b/matched/`; needed the byte-neutral `extern void`→`u32` caller reconcile at ov_SC01_077.c:4721; propagate ×134 at batch close). Built **`tools/permuter_ils.py`** (warm-restart iterated-local-search; 48094 72→38 where cold plateaus). **7 giants driven count-exact to precise single-class cc1-internal walls → FABLE5 BATCH (Drew authorized full, closest-first sequential + idiom-banking):** EA4C(6,frame-0x60-knife-edge) · 372B0(8,sched1 live-range) · 78004(37,const-hoist⊗regalloc) · 770E0(47,RC-6) · 76D94(52,S3 mutual-excl) · 48094(72,local-vs-global $a0; ILS→38) · 412A8(80,S3; ILS→45). **EA4C Fable5 RUNNING (1st).** 🐋 **WHALE func_80144B9C CLOSE=2 (768/770) — DISCOVERED -O0, not -O2** (prologue `21F0A003`; -O2 reads only 458/770) — a 2nd -O0 region @0x80144B9C stranded in the -O2 segment; needs a **2nd per-file -O0 split** (config) + **gcc-2.7.2 `calls.c`** (not in tools/reference, only 2.8.1) + Fable5 for the memcpy(=func_8005C324) -O0 arg-precompute. All drafts in `.run/t7b/{matched,close}/`; all levers + the -O0 idiom set + banking recipe in **`.run/t7b/LEVERS_HARVEST.md`** (→ cookbook at close). Fleet still 65.75% (571C4 ×1 negligible until ×134). NEXT: bank each Fable5 MATCH ×1 → one `dedup_propagate --auto-from --recover` at close → R22 clean-verify 136/136. **GEN2 RELEASE CANDIDATES (Drew 2026-07-07 → put in PhaseEnd):** (1) upstream an ILS/warm-restart mode to decomp-permuter (it appears to lack one); (2) release our gcc-2.7.2 codegen map §31/§36 + the "shipped cc1 RTL dumps are NOT stripped (`-dr -dj -dc -dl -dg`)" method — high value to any gcc-2.7.x decomp project; (3) the ILS *idea* (not the harness-coupled wrapper). Sequence at the Gen2 public flip. **FOCUS DIRECTIVE (Drew 2026-07-07):** pursue the largest-%-gain giants ONLY — NO small-function backlog sweeps (declined a ~52-candidate sweep); crack ALL giants incl. the WHALE func_80144B9C (the single biggest lever, ≈ next ~8 giants combined in byte-weight), THEN decide what's next.
- **T7 Fable5 batch COMPLETE — 3 giants cracked + banked ×134 (2026-07-04, `commit:0460`; clean fleet 136/136):** the 3 residual monsters (close=2/10/15) all → **MATCH** via sequential Fable5 (idiom-banking between): `func_801392FC` (cross-BB combine law + volatile-frame-parity), `func_8013A530` (the RC-6 "reload knot" was the pins → the **$0-add opaque copy** `iVar7=fc+zr` + 3 zero-byte levers; regalloc.md RC-12/13), `func_8013AF20` (the "impossible" const-hoist order was libgpu addPrim's 24-bit **bitfield store** → `store_fixed_bit_field` emits 0x00ffffff first; P_TAG lifted to engine_types.h byte-neutral). Banked via the §35 recipe; cookbook **§36** + loop.md + regalloc.md fed; gcc-2.7.2 reference tree extended (expmed.c/mips.md/…). **SESSION TOTAL: 7 giants ×134** (func_80129CF8 R14-free + func_8012D098/EC04 Opus-solo + func_80138ED0/801392FC/8013A530/8013AF20 Opus→Fable5); **fleet 65.48→65.75%**, 136/136, 0 NON_MATCHING. **NEXT SESSION: the ~9 remaining reach-134 giants per §G** (closest-first + the 770-ins whale func_80144B9C fast-tracked). Bank this session's §36 idioms are already in §31 → next-session Opus starts richer.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+312
View File
@@ -0,0 +1,312 @@
/* ============================================================================
* func_80144B9C (ov_SC01_077, vram 0x80144B9C) -- 770 ins, the single biggest
* byte-weight lever in the T7 batch.
*
* OUTCOME: MATCH (770 ins), banked as compiled -O0 C, whole-binary byte-gated
* (ov_SC01_077 == d19c9580). reach-134 (byte-identical in all 134 overlays) ->
* ~+1.6% byte-weight when propagated x134. The crack was the memcpy (see below).
*
* >>> THIS IS AN -O0 FUNCTION <<< prologue sig 21F0A003 (frame pointer $fp),
* every local reloaded before each use, unfilled load-delay nops. It sits at
* 0x80144B9C -- ABOVE the already-split -O0 cluster (0x8013B568..0x8013C98C in
* ov_SC01_077_o0.c), so it is a SECOND -O0 region in the -O2 "after" segment.
* The standard match_one.py compiles -O2 (only 458/770); an -O0 clone verified it
* (.run/t7b/work/func_80144B9C/match_o0.py). Banked via a 2nd per-file -O0 split:
* config/splat.ov_SC01_077.yaml carves the o0b subseg + the Makefile forces
* CC1FLAGS=-O0 on build/src/ov_SC01_077/ov_SC01_077_o0b.o (ov_SC01_077_o0.o precedent).
*
* -O0 IDIOMS CRACKED (cookbook-worthy):
* 1. Far-global $s0 base (boot.c GameModeDispatch precedent): `register u8 *p =
* D_800AF630;` -> $s0 held across all calls; globals at p+0xA3D8/0xA3DA/0xA3DC
* (currentLocationId etc.) assemble via the +0x10000/-0x5Cxx split automatically.
* 2. STRUCT-MEMBER FOLD: at -O0, `struct->field` folds to `lw off(reg)`, but
* `*(T*)(base+const)` AND array `b[k]` both MATERIALIZE an extra `addu`. All
* bases (p10/p14/p18/p1C/hdr/ent) must be struct pointers with exact offsets.
* p10->f20 is a pointer-to-struct field: `p10->f20->f12` folds to `sh 0x12(reg)`.
* 3. Chained store `a->x = a->y = a->z = SRC;` reproduces the -O0 shared-value
* multi-store (one load, base addresses computed left-to-right, stored C..A).
* 4. Loop counter `for(i=0;i<8;i++)` (i++ NOT i=i+1): i++ emits the extra
* `addiu v1,v0,1; addu v0,v1,0; sh v0` copy the target has; i=i+1 omits it.
* 5. Branch polarity read off the OPCODE: first if is `if (p18->f8 == 0)` (full-
* init in the fall-through arm) to get `bnez ...,else`, not Ghidra's `!= 0`.
*
* THE CRACK (the last 2 insns) -- STRUCT ASSIGN, not an explicit memcpy() call.
* The target marshals the memcpy args through temp pseudos (src ent->$v0, dst
* &D_80078E50->$v1, then `addu $a0,$v1 ; addu $a1,$v0`), which an explicit
* `memcpy(&D_80078E50, ent, 0x24)` does NOT emit. That precompute is the signature
* of gcc's emit_block_move -> emit_library_call(memcpy): the original C was
* D_80078E50 = *ent; (sizeof(ENT) == 0x24)
* gcc-2.7.2 -O0 expands a >MOVE_RATIO-word struct copy to a memcpy library call whose
* args go through copy_to_mode_reg (pseudos) then into $a0/$a1 = the 2 `addu` moves.
* memcpy is named at 0x8005C324 via symbols.resident.txt (overlays only; main keeps
* its own MEMCPY.o symbol). Reusable -O0 idiom: struct-assign for the precompute form.
* ============================================================================ */
#include "common.h"
/* func_80144B9C — -O0 function (prologue sig 21F0A003). Struct-base idiom: at -O0 struct member
* access folds to lw off(reg) but raw casts / array-index materialize an extra addu, so the bases
* are struct pointers. Far-global $s0 base p=D_800AF630 (boot.c GameModeDispatch precedent):
* globals p+0xA3D8.. via the +0x10000/-0x5Cxx split. */
typedef struct { u8 _0[0x12]; u16 f12; } F20T;
typedef struct { /* D_80126B58 */
u8 _0[6]; u16 f6;
u8 _8[2]; u16 fA;
u8 _C[2]; u16 fE;
u8 _10[0x10];
F20T *f20; /* 0x20 pointer field */
u8 _24[0x29]; u8 f4D;
u8 _4E[0x3A];
u16 f88, f8A, f8C; u8 _8E[2]; u16 f90, f92, f94;
u8 _96[0x1A]; s32 fB0;
u8 _B4[0x18]; s32 fCC;
u8 _D0[0x84];
u16 f154, f156, f158; u8 _15A[2]; u16 f15C, f15E, f160;
u8 _162[0x36]; s32 f198, f19C;
u8 _1A0[0x48]; s32 f1E8;
u8 _1EC[4]; s32 f1F0;
} P10;
typedef struct { u8 _0[0x3A]; u16 f3A; u8 _3C[2]; u16 f3E; } P14; /* D_80078E78 */
typedef struct { /* D_800AE6A8 */
u8 _0[4]; s32 f4; s32 f8; s32 fC;
u8 _10[4]; u8 f14; u8 _15; u8 f16; u8 _17; u8 f18;
u8 _19[3]; s32 f1C;
u16 f20, f22, f24, f26;
} P18;
typedef struct { u8 _0[0xA0]; u8 fA0; } P1C; /* D_80126948 */
typedef struct { /* table entry (ent), D_80078E50-shaped */
u8 _0[3]; u8 f3; u8 _4[4]; s32 f8; s32 fC;
u16 f10, f12, f14, f16;
void (*f18)(void); u8 _1C[4]; void (*f20)(void);
} ENT;
typedef struct { /* func_801457A4 buffer (hdr) */
s16 f0, f2, f4, f6, f8, fA;
u8 fC, fD, fE, _F;
s16 f10, f12, f14; u8 f16, f17, f18, _19;
s16 f1A, f1C, f1E; u8 f20, f21, f22, _23;
u16 f24, f26; u32 f28, f2C, f30, f34;
u16 f38, f3A, f3C, f3E;
u8 f40[12];
u32 f4C, f50, f54, f58, f5C, f60, f64;
u8 _68[0x20];
u32 f88, f8C, f90, f94, f98, f9C, fA0, fA4, fA8;
u8 _AC[8];
u32 fB4, fB8, fBC, fC0, fC4, fC8;
u8 _CC[8];
u32 fD4, fD8;
} HDR;
extern u8 D_800AF630[];
extern u8 D_80126B58[];
extern u8 D_80078E78[];
extern u8 D_800AE6A8[];
extern u8 D_80126948[];
extern ENT D_80078E50;
extern u8 D_8010F5C8[];
extern u8 D_80126DB0[];
extern u8 D_801151F0[];
extern s32 D_8011DB14;
extern s32 D_8011DB1C;
extern s32 D_80128150;
extern s16 D_80126DB6;
extern s32 D_800A5E88, D_800A5E8C, D_800A5E90;
extern u8 D_800A5E94, D_800A5E95, D_800A5E96;
extern s32 D_800A5E98, D_800A5E9C, D_800A5EA0;
extern u8 D_800A5EA4, D_800A5EA5, D_800A5EA6;
extern s32 D_800A5EA8, D_800A5EAC, D_800A5EB0;
extern u8 D_800A5EB4, D_800A5EB5, D_800A5EB6;
extern s16 D_800B9AAC, D_800B9B00;
extern s32 D_800B9AC4, D_800B9B18, D_800B9AC8, D_800B9B1C;
extern s16 D_800B9AB2, D_800B9B06, D_800B9AB6, D_800B9B0A;
extern u8 D_800B9ABC, D_800B9ABD, D_800B9ABE, D_800B9B10, D_800B9B11, D_800B9B12;
extern u8 D_800B9ABF, D_800B9AC0, D_800B9AC1, D_800B9B13, D_800B9B14, D_800B9B15;
extern s32 D_80126728, D_8011DB08, D_80126AEC;
extern s32 D_801274C8, D_801274CC, D_801274D0, D_801274D4, D_801270B8, D_80127520;
extern s32 D_801151D8, D_8011DB28, D_801151D4;
extern void *func_801457A4(s32 a0);
extern void func_80019018(void);
extern void func_80018E78(void);
extern void func_8002AB64(void);
extern void func_80015978(void *a0, void *a1);
extern void func_8012A1BC(void);
extern void func_8002850C(s32 a0, s32 a1, s32 a2);
extern void func_80028620(s32 a0, void *a1);
extern void func_80129398(void);
extern void func_8012944C(void);
extern void func_801336E8(s32 a0, s32 a1, s32 a2);
extern void func_8013B83C(s32 a0, s32 a1, s32 a2);
extern void func_8013B568(s32 a0);
extern void func_800D02C0(s32 a0);
extern void func_80011E84(s32 a0);
extern void func_8013D3D4(s32 a0, s32 a1);
extern void func_8002D4C8(s32 a0, s32 a1);
extern void func_8005C324(void *a0, ENT *a1, s32 a2);
extern s32 func_800CF854(void);
extern void func_8001C14C(void);
extern void func_8012A110(void);
void func_80144B9C(void) {
P10 *p10 = (P10 *)D_80126B58;
P14 *p14 = (P14 *)D_80078E78;
register u8 *p = D_800AF630;
P18 *p18 = (P18 *)D_800AE6A8;
P1C *p1C = (P1C *)D_80126948;
HDR *hdr;
ENT *ent;
s32 tbl;
s16 i;
void (*calltmp)(void);
s32 flag;
func_80019018();
func_80018E78();
if (p18->f8 == 0) {
hdr = (HDR *)func_801457A4(*(s16 *)(p + 0xA3D8));
p18->f16 = 0;
flag = 1;
D_8011DB14 = p14->f3A;
D_8011DB1C = p14->f3E;
D_80128150 = 100;
func_8002AB64();
} else {
hdr = (HDR *)func_801457A4(*(s16 *)(p + 0xA3D8));
flag = 0;
}
p18->f1C = hdr->fC8;
tbl = hdr->fC8;
if (p18->f16 == 0xFF) {
ent = &D_80078E50;
} else {
ent = (ENT *)*(s32 *)(p18->f16 * 4 + tbl);
}
p18->fC = ent->f8;
p18->f14 = 0;
p10->f4D = 0;
if (ent->fC != (s32)D_8010F5C8) {
p10->f198 = ent->fC;
}
if (*(s16 *)(p + 0xA3DA) == 0x1000 && *(s16 *)(p + 0xA3DC) == 0x1000) {
p10->f6 = p10->f88 = p10->f90 = p18->f20;
p10->fA = p10->f8A = p10->f92 = p18->f22;
p10->fE = p10->f8C = p10->f94 = p18->f24;
p10->f20->f12 = p18->f26;
p18->f18 = 0;
} else {
p10->f6 = p10->f88 = p10->f90 = ent->f10;
p10->fA = p10->f8A = p10->f92 = ent->f12;
p10->fE = p10->f8C = p10->f94 = ent->f14;
p10->f20->f12 = ent->f16;
}
p10->f154 = p10->f15C = p10->f6;
p10->f156 = p10->f15E = p10->fA;
p10->f158 = p10->f160 = p10->fE;
func_80015978((void *)((s32)p10 + 4), D_80126DB0);
D_80126DB6 = p10->f20->f12;
if (*(s16 *)(p + 0xA3DA) == 0x1000 &&
(*(s16 *)(p + 0xA3DC) == 0x1000 || *(s16 *)(p + 0xA3DC) == 0x2000) && flag == 0) {
ent->f18();
func_8012A1BC();
} else {
if (*(s16 *)(p + 0xA3DA) == 0x1000 && *(s16 *)(p + 0xA3DC) == 0x3000) {
p1C->fA0 = ent->f3;
} else {
p1C->fA0 = 0;
}
ent->f18();
}
if (*(s16 *)(p + 0xA3D8) == 0x3069) {
p1C->fA0 = ent->f3;
}
D_801151D4 = (s32)p1C;
func_8002850C(hdr->f0, hdr->f2, hdr->f4);
D_800A5E88 = hdr->f6;
D_800A5E8C = hdr->f8;
D_800A5E90 = hdr->fA;
D_800A5E94 = hdr->fC;
D_800A5E95 = hdr->fD;
D_800A5E96 = hdr->fE;
func_80028620(0, &D_800A5E88);
D_800A5E98 = hdr->f10;
D_800A5E9C = hdr->f12;
D_800A5EA0 = hdr->f14;
D_800A5EA4 = hdr->f16;
D_800A5EA5 = hdr->f17;
D_800A5EA6 = hdr->f18;
func_80028620(1, &D_800A5E98);
D_800A5EA8 = hdr->f1A;
D_800A5EAC = hdr->f1C;
D_800A5EB0 = hdr->f1E;
D_800A5EB4 = hdr->f20;
D_800A5EB5 = hdr->f21;
D_800A5EB6 = hdr->f22;
func_80028620(2, &D_800A5EA8);
func_80129398();
D_800B9AAC = hdr->f24;
D_800B9B00 = hdr->f26;
D_800B9AC4 = hdr->f28;
D_800B9B18 = hdr->f2C;
D_800B9AC8 = hdr->f30;
D_800B9B1C = hdr->f34;
D_800B9AB2 = hdr->f38;
D_800B9B06 = hdr->f3A;
D_800B9AB6 = hdr->f3C;
D_800B9B0A = hdr->f3E;
D_800B9ABC = hdr->f40[0];
D_800B9ABD = hdr->f40[1];
D_800B9ABE = hdr->f40[2];
D_800B9B10 = hdr->f40[3];
D_800B9B11 = hdr->f40[4];
D_800B9B12 = hdr->f40[5];
D_800B9ABF = hdr->f40[6];
D_800B9AC0 = hdr->f40[7];
D_800B9AC1 = hdr->f40[8];
D_800B9B13 = hdr->f40[9];
D_800B9B14 = hdr->f40[10];
D_800B9B15 = hdr->f40[11];
func_8012944C();
p10->fB0 = hdr->f4C;
p10->fCC = hdr->f50;
p10->f1E8 = hdr->f54;
p10->f1F0 = hdr->f58;
D_80126728 = hdr->f5C;
D_8011DB08 = hdr->f60;
D_80126AEC = hdr->f64;
p10->f19C = (s32)hdr + 0x68;
func_801336E8(hdr->f88, hdr->f8C, hdr->f90);
func_8013B83C(hdr->f94, hdr->f98, hdr->f9C);
func_8013B568(hdr->fA8);
func_800D02C0(hdr->fD4);
func_80011E84(hdr->fD8);
for (i = 0; i < 8; i++) {
D_801151F0[i] = *(u8 *)((s32)hdr + i + 0xAC);
}
D_801274C8 = hdr->fB4;
D_801274CC = hdr->fB8;
D_801274D0 = hdr->fBC;
D_801274D4 = hdr->fC0;
D_801270B8 = hdr->fC4;
D_80127520 = hdr->fC4;
D_801151D8 = 0;
D_8011DB28 = 0;
calltmp = ent->f20;
calltmp();
func_8013D3D4(hdr->fA0, hdr->fA4);
func_8002D4C8(0x1E, 0);
if (p18->f8 == 0) {
D_80078E50 = *ent;
}
p18->f4 = (s32)&D_80078E50;
p18->f8 = p18->f8 & 0x7F000000;
if (func_800CF854() != 0) {
func_8001C14C();
func_8012A110();
}
}
+1 -1
View File
@@ -22739,7 +22739,7 @@
}
#define DEFINE_func_80132288() \
extern void func_8005C324(int dst, int src, int n); \
extern void func_8005C324(int dst, int src, int n) __asm__("memcpy"); /* Phase-24: 0x8005C324 is named memcpy for overlays (whale needs it); keep the non-builtin C name here (else built-in codegen), emit via asm-label */ \
extern void func_801325B8(int a0, int a1, int a2, int a3, int a4); \
void func_80132288(int *param_1, int *param_2, int param_3) { \
int src; int dst; \