From 8f3e4a12ba0e30ad59cdae37f77fbce3f32290db Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Wed, 15 Jul 2026 11:15:54 -0600 Subject: [PATCH] =?UTF-8?q?docs(phase-26):=20T7=20re-baseline=20+=20=C2=A7?= =?UTF-8?q?52=20walker-family=20regalloc=20idiom=20(func=5F80178004=20wall?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - re-baseline the target frontier from the fixed tools (R14): 228 ov077 stubs (broken manifest saw 30); worklist/family-hseq regenerated. 68.6% instr / 49.2% distinct. - R14 corrections to the audit handoff: the '~1,200 type-heavy' was already banked by A3h (+2,675); the real remaining lever is 128 matched-sib families (~2.64M templ ins), and register pins are NOT a banking blocker (func_8017A4AC banked ×134 with pins). - Task 7 is near-miss CLOSING (close 1-5 re-gate = 0/13 through the fixed pipeline), not fresh crack. - §52: single Fable5 on func_80178004 (regalloc-order class exemplar) = honest wall (P9), structure-exact 163/165, residual = 3 compiler-internal register-alloc integers, likely intrinsic; byte-verified 126/165. Correction: the 'pinned MATCH' was a myth (never matched). 6 byte-proven walker-family levers + the skeleton idiom transfer to the 11 regalloc-order siblings (Fable5 discovers, cheap-Opus applies). decision-log entry (R31). --- docs/decision-log.md | 30 ++++ docs/family-hseq.md | 104 ++++++------ docs/matching-cookbook.md | 46 +++++ docs/worklist.md | 344 ++++++++++++++++++-------------------- 4 files changed, 295 insertions(+), 229 deletions(-) diff --git a/docs/decision-log.md b/docs/decision-log.md index b491b466b..3c50d5e4b 100644 --- a/docs/decision-log.md +++ b/docs/decision-log.md @@ -1032,3 +1032,33 @@ to manufacture a wall out of a lookup miss. **Handed forward:** #4 the type-heavy harvest (~1,200 members; `build_engine_types` unblocked but not yet wired into the family path — Phase-26 Task-8 integration, not a re-test). Substrate for the retrospective + the public "how to AI-decomp" wiki (R31): *audit your instruments before you trust their silence.* + +### 2026-07-15 — Phase 26 Task 7 resume: re-baseline corrections + the flagship regalloc wall (single Fable5, likely intrinsic) + +**Re-baseline before cracking (R14).** Task 7 resumed at xHigh after the audit. Regenerating the target +frontier from the FIXED tools corrected the handoff twice, both byte-grounded: (1) the "~1,200-member +type-heavy harvest" from the audit ledger was **already banked** by A3h's post-fix h_seq re-run (+2,675) — the +current STRUCT-excluded tail is ~6 substantial members, not 1,200. (2) The real remaining deterministic lever is +bigger and different: **128 matched-sibling families ≈ 2.64M templatable ins**, and **register pins are NOT a +banking blocker** (`func_8017A4AC` banked ×134 with 4 pins/sibling) — so most of that is *un-run ×N sweeps*, not +a wall. Also: all 97 reach-134 tractable cores are already walled, and re-gating the close 1-5 seeds through the +fixed pipeline banked **0/13** — Task 7 is a near-miss CLOSING campaign, not fresh cracking. + +**The single-Fable5 test ("can we crack not on Max?" — Drew).** One Fable5 (xHigh orchestration, 477k tokens, +93 min) on `func_80178004` (165 ins ×134, the regalloc-order class exemplar shared by 12 siblings). Result: an +**honest wall** (P9). A pin-free draft driven to structure-exact (163/165); residual = pure register identity, +reduced by a gdb-on-cc1 oracle to **three compiler-internal integers**, each ruled unreachable under every legal +C construct with file:line evidence. Byte-verified: `match_one` 126/165, the 126 dominated by one `$s0`↔`$s2` +swap. **R14 ledger correction:** the historic "pinned MATCH / close=0" was a myth — the seed was never a match +(best historic permuter score 5, pinned). Likely intrinsic to gcc-2.7.2; ONE untested lever remains +(`qty_n_refs` tie-shape, local-alloc.c:1869). The parallel permuter could not crack `func_801325B8` either (best 25). + +**Payoff despite the wall (R16 flywheel).** The pass produced 6 byte-proven "walker-family" levers + the +skeleton idiom (cookbook §52) that transfer to the 11 regalloc-order siblings: **Fable5 DISCOVERS the skeleton, +cheap-Opus APPLIES it.** So a walled exemplar still fed the flywheel. + +**Pivot (pending Drew's Max call, R27).** Per Drew's instruction the failed single-Fable5 → prompt for Max. +Recommendation to be logged on decision: Max-grinding `func_80178004` itself is low-EV (Fable5 already went to +depth; one untested lever); the higher-ROI use of the perishable window is the §52 sibling-idiom wave +(cheap-Opus) + the deterministic matched-sib harvest (2.6M-ins ceiling, pins OK) — both higher-certainty than +grinding an intrinsic wall. diff --git a/docs/family-hseq.md b/docs/family-hseq.md index 5072ec65d..1d4ceddd9 100644 --- a/docs/family-hseq.md +++ b/docs/family-hseq.md @@ -2,11 +2,11 @@ > Generated by `tools/family_hseq.py` from the 134 overlay sigs + per-overlay src stubs. Ranked by TEMPLATABLE byte-weight (PURE+IMM members × nins × 4). The byte-gate is the arbiter. -**Fleet (overlays):** 83.7% fn / 67.4% instr / 46.8% distinct-code matched. Unmatched: 55,795 instances / 4,142,910 ins (33,113 distinct classes). +**Fleet (overlays):** 84.5% fn / 68.6% instr / 49.2% distinct-code matched. Unmatched: 52,986 instances / 3,984,105 ins (31,551 distinct classes). -**Tail cross-check (Phase-25 close):** 38,810 tail fns / 1,971,155 ins → 596 h_seq families ≥2, **175 substantial (nins≥80) / 1,372,708 ins**. +**Tail cross-check (Phase-25 close):** 37,205 tail fns / 1,842,053 ins → 581 h_seq families ≥2, **172 substantial (nins≥80) / 1,282,261 ins**. -**Full frontier (all unmatched by h_seq):** 2705 target families (≥2 members or a matched sibling) + 3550 singletons (Step-D residue). Substantial: **567 families / 2,634,284 templatable ins**, 33 with a matched sibling (zero-crack). Substantial member classes: 15,718 PURE · 39 IMM · 6 STRUCT-excluded. +**Full frontier (all unmatched by h_seq):** 2645 target families (≥2 members or a matched sibling) + 3550 singletons (Step-D residue). Substantial: **563 families / 2,538,291 templatable ins**, 30 with a matched sibling (zero-crack). Substantial member classes: 15,316 PURE · 39 IMM · 6 STRUCT-excluded. ## Top substantial families (by templatable byte-weight) @@ -14,52 +14,52 @@ | # | nins | members (P/I/S) | #addr/#ov | tag | class | matched | jr | exemplar | templ. ins | |--:|--:|--|--|--|--|--:|:-:|--|--:| | 1 | 952 | 112 (106/6/0) | 21/112 | scattered | IMM | 1 | Y | 0x8017bebc matched | 106,624 | -| 2 | 536 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8017a4ac draft-ov077 | 71,824 | -| 3 | 490 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013f350 draft-ov077 | 65,660 | -| 4 | 424 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80131340 draft-ov077 | 56,816 | -| 5 | 371 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80176734 draft-ov077 | 49,714 | -| 6 | 337 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80159c84 draft-ov077 | 45,158 | -| 7 | 329 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013c414 draft-ov077 | 44,086 | -| 8 | 327 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80176218 draft-ov077 | 43,818 | -| 9 | 312 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8013faf8 draft-ov077 | 41,808 | -| 10 | 304 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8014d820 draft-ov077 | 40,736 | -| 11 | 289 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80135eb0 draft-ov077 | 38,726 | -| 12 | 279 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x801670e4 draft-ov077 | 37,386 | -| 13 | 272 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013b83c draft-ov077 | 36,448 | -| 14 | 271 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8015b950 draft-ov077 | 36,314 | -| 15 | 260 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80140958 draft-ov077 | 34,840 | -| 16 | 249 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8013cb84 draft-ov077 | 33,366 | -| 17 | 240 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8013d53c draft-ov077 | 32,160 | -| 18 | 231 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80175da8 draft-ov077 | 30,954 | -| 19 | 226 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8012956c draft-ov077 | 30,284 | -| 20 | 222 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8015c32c draft-ov077 | 29,748 | -| 21 | 209 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8016cbc0 draft-ov077 | 28,006 | -| 22 | 204 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8015ea3c draft-ov077 | 27,336 | -| 23 | 201 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8015d738 draft-ov077 | 26,934 | -| 24 | 198 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013bd74 draft-ov077 | 26,532 | -| 25 | 198 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x801412a8 draft-ov077 | 26,532 | -| 26 | 188 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8015f448 draft-ov077 | 25,192 | -| 27 | 188 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80175ab8 draft-ov077 | 25,192 | -| 28 | 93 | 268 (268/0/0) | 2/134 | cross-address | PURE | 0 | · | 0x8014ffdc draft-ov077 | 24,924 | -| 29 | 183 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8014032c draft-ov077 | 24,522 | -| 30 | 181 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80135a4c draft-ov077 | 24,254 | -| 31 | 174 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8017ae2c draft-ov077 | 23,316 | -| 32 | 173 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80154c24 draft-ov077 | 23,182 | -| 33 | 165 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80178004 draft-ov077 | 22,110 | -| 34 | 162 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80169bbc draft-ov077 | 21,708 | -| 35 | 161 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80160534 draft-ov077 | 21,574 | -| 36 | 161 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x8016dc20 matched-ov077 | 21,413 | -| 37 | 158 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x801299c8 draft-ov077 | 21,172 | -| 38 | 156 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x8016df5c matched-ov077 | 20,748 | -| 39 | 154 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013c0f8 draft-ov077 | 20,636 | -| 40 | 155 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x801365b8 matched-ov077 | 20,615 | -| 41 | 154 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x80144090 matched-ov077 | 20,482 | -| 42 | 148 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8016d1d8 draft-ov077 | 19,832 | -| 43 | 147 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80177b5c draft-ov077 | 19,698 | -| 44 | 141 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8014f4c0 draft-ov077 | 18,894 | -| 45 | 141 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x8013d9b0 matched-ov077 | 18,753 | -| 46 | 139 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8014ade0 draft-ov077 | 18,626 | -| 47 | 136 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80135260 draft-ov077 | 18,224 | -| 48 | 137 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x80133ab0 matched-ov077 | 18,221 | -| 49 | 131 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x801555f4 draft-ov077 | 17,554 | -| 50 | 129 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80137dd4 draft-ov077 | 17,286 | +| 2 | 490 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013f350 draft-ov077 | 65,660 | +| 3 | 424 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80131340 draft-ov077 | 56,816 | +| 4 | 371 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80176734 draft-ov077 | 49,714 | +| 5 | 337 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80159c84 draft-ov077 | 45,158 | +| 6 | 329 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013c414 draft-ov077 | 44,086 | +| 7 | 327 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80176218 draft-ov077 | 43,818 | +| 8 | 312 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8013faf8 draft-ov077 | 41,808 | +| 9 | 304 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8014d820 draft-ov077 | 40,736 | +| 10 | 289 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80135eb0 draft-ov077 | 38,726 | +| 11 | 279 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x801670e4 draft-ov077 | 37,386 | +| 12 | 272 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013b83c draft-ov077 | 36,448 | +| 13 | 271 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8015b950 draft-ov077 | 36,314 | +| 14 | 260 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80140958 draft-ov077 | 34,840 | +| 15 | 249 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8013cb84 draft-ov077 | 33,366 | +| 16 | 240 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8013d53c draft-ov077 | 32,160 | +| 17 | 231 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80175da8 draft-ov077 | 30,954 | +| 18 | 226 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8012956c draft-ov077 | 30,284 | +| 19 | 222 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8015c32c draft-ov077 | 29,748 | +| 20 | 209 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8016cbc0 draft-ov077 | 28,006 | +| 21 | 204 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8015ea3c draft-ov077 | 27,336 | +| 22 | 201 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8015d738 draft-ov077 | 26,934 | +| 23 | 198 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013bd74 draft-ov077 | 26,532 | +| 24 | 198 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x801412a8 draft-ov077 | 26,532 | +| 25 | 188 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8015f448 draft-ov077 | 25,192 | +| 26 | 188 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80175ab8 draft-ov077 | 25,192 | +| 27 | 93 | 268 (268/0/0) | 2/134 | cross-address | PURE | 0 | · | 0x8014ffdc draft-ov077 | 24,924 | +| 28 | 183 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8014032c draft-ov077 | 24,522 | +| 29 | 181 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80135a4c draft-ov077 | 24,254 | +| 30 | 174 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8017ae2c draft-ov077 | 23,316 | +| 31 | 173 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80154c24 draft-ov077 | 23,182 | +| 32 | 165 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80178004 draft-ov077 | 22,110 | +| 33 | 162 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80169bbc draft-ov077 | 21,708 | +| 34 | 161 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80160534 draft-ov077 | 21,574 | +| 35 | 161 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x8016dc20 matched-ov077 | 21,413 | +| 36 | 158 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x801299c8 draft-ov077 | 21,172 | +| 37 | 156 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x8016df5c matched-ov077 | 20,748 | +| 38 | 154 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8013c0f8 draft-ov077 | 20,636 | +| 39 | 155 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x801365b8 matched-ov077 | 20,615 | +| 40 | 154 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x80144090 matched-ov077 | 20,482 | +| 41 | 148 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8016d1d8 draft-ov077 | 19,832 | +| 42 | 147 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80177b5c draft-ov077 | 19,698 | +| 43 | 141 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8014f4c0 draft-ov077 | 18,894 | +| 44 | 141 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x8013d9b0 matched-ov077 | 18,753 | +| 45 | 139 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x8014ade0 draft-ov077 | 18,626 | +| 46 | 136 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x80135260 draft-ov077 | 18,224 | +| 47 | 137 | 133 (133/0/0) | 1/133 | per-location | PURE | 1 | · | 0x80133ab0 matched-ov077 | 18,221 | +| 48 | 131 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x801555f4 draft-ov077 | 17,554 | +| 49 | 129 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | · | 0x80137dd4 draft-ov077 | 17,286 | +| 50 | 125 | 134 (134/0/0) | 1/134 | per-location | PURE | 0 | Y | 0x8012aaac draft-ov077 | 16,750 | diff --git a/docs/matching-cookbook.md b/docs/matching-cookbook.md index 5cfcfaaba..95e7852a1 100644 --- a/docs/matching-cookbook.md +++ b/docs/matching-cookbook.md @@ -3755,3 +3755,49 @@ its own caller's default*. **Checklist item, promoted to the top:** after fixing a scanner, `grep` every call site and ask *does any caller pass a default that re-disables this?* An audit that stops at the callee is half an audit. + +## §52 — The WALKER-FAMILY skeleton: 6 regalloc-order levers + a deeply-characterized intrinsic wall (`func_80178004`, 165 ins ×134; Phase 26, Fable5, 2026-07-15) + +`func_80178004` is the exemplar of the **regalloc-order** residual class (12 reach-134 siblings share it: the +9 close=0 + 3 close-21+ cores). A ~93-min / 477k-token Fable5 pass drove a PIN-FREE draft to +**structure-exact (163 vs 165 ins); residual = pure register identity** — byte-verified (`match_one` 126/165 +masked; the 126 is dominated by one `$s0`↔`$s2` swap rippling ~90 lines). It did **not** byte-match: the wall +reduces to **three compiler-internal integers** and is (probably) intrinsic to vanilla gcc-2.7.2. +**Correction (R14):** the historic "pinned MATCH" was a myth — the pinned seed was NEVER a match (best +historic permuter score 5, pinned); this is the deepest state the function has reached. Artifacts + gdb +oracles under `.run/fable_80178004/` (repro `runorc.sh`); Fable5-derived, headline byte-verified. + +### The 6 levers (the "walker-family skeleton" — apply to the 12 siblings; levers 1-5 retire ~half the residual) +1. **Mutated-parameter pointer.** Declare the walking pointer AS the mutated parameter (`u32 *p`=arg0, then + `p += …`). Any `p = (u32*)a0` COPY leaves the initial value live in the param pseudo → cse1 rebases every + store block onto constant offsets and DELETES the pointer-walk. The single biggest lever; transfers to + every walker-style function. +2. **No derived-base variable.** Never declare the second pointer — write `p[1..3]` directly and let loop.c + mint a combined DEST_ADDR giv of the biv (anchor = last-recorded giv → the -8/-4/0 offsets; preheader init + reads the biv reg). A source-level `q` biv makes loop.c reduce the (q-4,q-8) pair into an EXTRA pointer + (loop.c:3824 worthwhile test). +3. **In-loop constant remat.** A constant the target recomputes in-loop must be a **user variable assigned in + BOTH if/else arms** (`n_times_set==2` fails scan_loop's movable gate, loop.c:698-712 → stays in-loop). A + bare literal is hoisted. +4. **Split the OR across two statements.** `t = …|0x4000; p[3] = t|0x6d160000;` beats tree-level constant + reassociation → in-loop `ori` + a hoisted lui-only temp. +5. **Break biv-recognition.** Interpose one statement between `n = i+1` and `i = n` (basic_induction_var + follows a copy only to the immediately-previous insn, loop.c:4862) → the target's literal counter survives + instead of a `<<16` giv. +6. **Diagnose allocation walls with gdb-on-cc1 FIRST.** `peek2.gdb` (allocno_order/find_reg) + a 3-integer + oracle (`reg_n_deaths`/`reg_n_refs`) tells you in minutes whether a register identity is even reachable — + before grinding C. + +### Why the wall is (probably) intrinsic +The walker is a block-local 1-death qty → **local-alloc runs first and hands it the first free callee-saved +`$s0`** (local-alloc.c:472/2103; nothing can pre-occupy s0/s1 for a call-crossing qty). Force it global +(deaths≥2) and its priority `floor_log2(44)*44/103 ≈ 21000` dominates → allocated first → pass-1 first-fit +`$s0` again (global.c:924, callee prefs stripped for call-crossers). The target needs `pri < 2400` ⇒ effective +refs ≤ ~10-12, but **REG_N_REFS counts RTL mentions, fixed at 44 by the bytes**, and every legal construct +only pushes it UP (each ruled out with file:line). **One untested lever:** instrument `qty_n_refs` (local-alloc +SUMS at tying, local-alloc.c:1869) vs flow's per-reg `REG_N_REFS` with `peek2.gdb` on tied-copy chains — if a +tie shape yields a low-ref *global* view of an s2-window value, the wall falls; else it's the ×1-pinned + +whole-binary-gate route. + +**Flywheel note (R16):** even walled, this pass paid off — a cheap-Opus wave applying levers 1-5 should crack +the siblings that are NOT at the intrinsic wall. Fable5 DISCOVERS the skeleton; cheap-Opus APPLIES it. diff --git a/docs/worklist.md b/docs/worklist.md index b222cddb5..c856f9451 100644 --- a/docs/worklist.md +++ b/docs/worklist.md @@ -2,231 +2,221 @@ > Generated by `tools/worklist.py` from `.run/fuel_manifest.json` + `.run/backlog.jsonl`. Ranked by **byte-weighted gain** `gain_ins = reach × nins` (fleet instructions made byte-identical once matched **and** propagated ×134 — the decomp.dev-comparable metric the giants move, NOT function-count). `%rem` = share of ALL remaining gain; `cum%` = running total (shows how few giants capture most of it). `close` = backlog match_one mismatch count (lower = nearer; blank = not yet attempted). Byte-gate (harvest_verify) is the sole arbiter (G3/P9). -**Live stubs:** 263 · **total remaining gain:** 994,633 ins (3,978,532 bytes ×-fleet) +**Live stubs:** 228 · **total remaining gain:** 884,130 ins (3,536,520 bytes ×-fleet) ## Idiom-class summary (the groups) | class | count | gain_ins | % of remaining | |-------|------:|---------:|---------------:| -| GIANT | 2 | 48,642 | 4.9% | -| STRUCT | 69 | 40,281 | 4.0% | -| PINS | 24 | 87,388 | 8.8% | -| WAVE | 146 | 755,917 | 76.0% | +| GIANT | 2 | 48,642 | 5.5% | +| STRUCT | 59 | 36,125 | 4.1% | +| PINS | 20 | 63,536 | 7.2% | +| WAVE | 131 | 688,362 | 77.9% | | O0 | 7 | 4,704 | 0.5% | | O1 | 1 | 4,556 | 0.5% | -| STUB | 14 | 53,145 | 5.3% | +| STUB | 8 | 38,205 | 4.3% | ## Top 40 remaining gains (all classes) | # | name | class | reach | nins | gain_ins | %rem | cum% | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_801412A8 | GIANT | 134 | 198 | 26532 | 2.67 | 2.7 | Y | main | 110 | 110 mismatch (count-exact 198/198). S11 LUID(x)alloc: register-assignment permutation + prim2 store-schedule.… | `.run/backlog_drafts/func_801412A8.c` | -| 2 | func_80178004 | GIANT | 134 | 165 | 22110 | 2.22 | 4.9 | Y | jr_801734BC | 0 | none — MATCH (full register pins per sibling func_80177EA4; running-ptr $s2 to stop unroll-rebase; | `.run/backlog_drafts/func_80178004.c` | -| 3 | func_8014F4C0 | WAVE | 134 | 141 | 18894 | 1.90 | 6.8 | Y | after | 127 | residual: 127 mismatch | `.run/backlog_drafts/func_8014F4C0.c` | -| 4 | func_8014ADE0 | WAVE | 134 | 139 | 18626 | 1.87 | 8.7 | Y | after | 19 | 16 ins off — all compiler-internal ties: (1) 0xAAA8 const lands $v0 vs target $v1; | `.run/backlog_drafts/func_8014ADE0.c` | -| 5 | func_80137DD4 | STRUCT | 134 | 129 | 17286 | 1.74 | 10.4 | Y | jr_8012ACE0 | 107 | regalloc fully matches (frame -0x30; s4/s3/s5=params, s2=mask, s1=ptr w/ in-place +0x24 reuse, s0=acc+reused … | `.run/backlog_drafts/func_80137DD4.c` | -| 6 | func_80174CB0 | WAVE | 134 | 123 | 16482 | 1.66 | 12.1 | Y | jr_801734BC | 0 | close=0 match_one MATCH but its anon typedef is named 'Buf' which COLLIDES with the existing 'Buf' (s16 h[8],… | `.run/backlog_drafts/func_80174CB0.c` | -| 7 | func_801325B8 | WAVE | 134 | 113 | 15142 | 1.52 | 13.6 | Y | jr_8012ACE0 | 4 | 4/113 — prologue save-order of the $s0(cur/p3) vs $s5(p1) pair; gcc emits | `.run/backlog_drafts/func_801325B8.c` | -| 8 | func_801330E0 | STUB | 134 | 110 | 14740 | 1.48 | 15.1 | Y | jr_8012ACE0 | 79 | none — MATCH (110/110 words byte-identical via objcopy raw .text, reloc-masked on jal+%hi/%lo(D_800AF648)). m… | `.run/backlog_drafts/func_801330E0.c` | -| 9 | func_8014E284 | WAVE | 134 | 108 | 14472 | 1.46 | 16.5 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014E284.c` | -| 10 | func_8012CC88 | WAVE | 134 | 105 | 14070 | 1.41 | 17.9 | Y | jr_8012ACE0 | 0 | none — MATCH (105 ins, relocation-masked) | `.run/backlog_drafts/func_8012CC88.c` | -| 11 | func_80169228 | WAVE | 134 | 105 | 14070 | 1.41 | 19.3 | Y | jr_8015AE2C | 0 | none — MATCH (105 ins, relocation-masked). Key levers: arg0/p pinned $s1/$s0, | `.run/backlog_drafts/func_80169228.c` | -| 12 | func_80167714 | WAVE | 134 | 104 | 13936 | 1.40 | 20.7 | Y | jr_8015AE2C | 0 | none — MATCH (104 ins) | `.run/backlog_drafts/func_80167714.c` | -| 13 | func_801463A0 | WAVE | 134 | 101 | 13534 | 1.36 | 22.1 | Y | after | 0 | none — MATCH (101 ins, match_one); real symbol names; misaligned 8B copy + s16 stores + masked B9C last | `.run/backlog_drafts/func_801463A0.c` | -| 14 | func_80177940 | WAVE | 134 | 101 | 13534 | 1.36 | 23.5 | Y | jr_801734BC | 65 | prologue+setup (35 ins) byte-match exactly; loop body diverges on gcc loop-invariant hoist ORDERING (schedule… | `.run/backlog_drafts/func_80177940.c` | -| 15 | func_801387B8 | WAVE | 134 | 100 | 13400 | 1.35 | 24.8 | Y | jr_801380E0 | 50 | the two scanned bytes land in $a0/$a1 not $a1/$a2 (gcc-2.7.2 grabs the freed incoming-arg $a0 for the first l… | `.run/backlog_drafts/func_801387B8.c` | -| 16 | func_801379FC | WAVE | 134 | 97 | 12998 | 1.31 | 26.1 | Y | jr_8012ACE0 | 0 | none — MATCH (match_one 97/97) | `.run/backlog_drafts/func_801379FC.c` | -| 17 | func_8014CD80 | WAVE | 134 | 97 | 12998 | 1.31 | 27.4 | Y | after | | none — MATCH (97 ins). iVar3 pinned to $v1 (register __asm__("$3")) so | `.run/backlog_drafts/func_8014CD80.c` | -| 18 | func_80150170 | WAVE | 134 | 95 | 12730 | 1.28 | 28.7 | Y | after | | none — MATCH (95/95). Keys: (1) two parallel 3-halfword groups via chained assign `sp10.x = sp18.x = v` (sp18… | `.run/backlog_drafts/func_80150170.c` | -| 19 | func_8014D12C | WAVE | 134 | 93 | 12462 | 1.25 | 30.0 | Y | after | 53 | WAVE: 53 mismatch | `.run/backlog_drafts/func_8014D12C.c` | -| 20 | func_8014FFDC | WAVE | 134 | 93 | 12462 | 1.25 | 31.2 | Y | after | 1 | none — MATCH | `.run/backlog_drafts/func_8014FFDC.c` | -| 21 | func_801502EC | WAVE | 134 | 93 | 12462 | 1.25 | 32.5 | Y | after | 95 | WAVE: 95 mismatch | `.run/backlog_drafts/func_801502EC.c` | -| 22 | func_8014C6F4 | WAVE | 134 | 91 | 12194 | 1.23 | 33.7 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014C6F4.c` | -| 23 | func_80173CB4 | WAVE | 134 | 90 | 12060 | 1.21 | 34.9 | Y | jr_801734BC | | none — MATCH (switch form keeps cases unmerged; final block: reuse one temp for the D_8012750C test + the fun… | `.run/backlog_drafts/func_80173CB4.c` | -| 24 | func_80158638 | STUB | 134 | 87 | 11658 | 1.17 | 36.1 | Y | jr_8015444C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_80158638.c` | -| 25 | func_8012B4B8 | WAVE | 134 | 84 | 11256 | 1.13 | 37.2 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_8012B4B8.c` | -| 26 | func_8014D4C0 | WAVE | 134 | 84 | 11256 | 1.13 | 38.3 | Y | after | 65 | WAVE: 65 mismatch | `.run/backlog_drafts/func_8014D4C0.c` | -| 27 | func_80156670 | WAVE | 134 | 83 | 11122 | 1.12 | 39.5 | Y | jr_8015444C | | none — MATCH (83 ins). Key: hoist `iVar1 = uVar3*4;` as its OWN statement before the if so gcc schedules `sll… | `.run/backlog_drafts/func_80156670.c` | -| 28 | func_8014CF04 | WAVE | 134 | 82 | 10988 | 1.10 | 40.6 | Y | after | 73 | WAVE: 73 mismatch | `.run/backlog_drafts/func_8014CF04.c` | -| 29 | func_8012E138 | WAVE | 134 | 81 | 10854 | 1.09 | 41.7 | Y | jr_8012ACE0 | 0 | none — MATCH (81/81 ins, match_one proxy); reloaded ptr pinned to $a0 | `.run/backlog_drafts/func_8012E138.c` | -| 30 | func_8014D2A0 | WAVE | 134 | 80 | 10720 | 1.08 | 42.7 | Y | after | 27 | none — MATCH (80 ins, relocation-masked); loop-guard idiom per engine_core DEFINE_func_80164ACC | `.run/backlog_drafts/func_8014D2A0.c` | -| 31 | func_8012A1BC | WAVE | 134 | 78 | 10452 | 1.05 | 43.8 | Y | a | 42 | 42/78 — block-copy bytes correct (char[8] => lwl/lwr/swl/swr); residual is gcc's load-hoist split. Target hoi… | `.run/backlog_drafts/func_8012A1BC.c` | -| 32 | func_80137178 | WAVE | 134 | 78 | 10452 | 1.05 | 44.8 | Y | jr_8012ACE0 | 15 | reg values all correct; prologue independent-addiu order + lazy sw placement differ | `.run/backlog_drafts/func_80137178.c` | -| 33 | func_8016163C | WAVE | 134 | 78 | 10452 | 1.05 | 45.9 | Y | jr_8015AE2C | 50 | none — MATCH (78 ins). First arm calls func_801599A4 with NO arg (asm nop delay slot) via fn-ptr cast ((void(… | `.run/backlog_drafts/func_8016163C.c` | -| 34 | func_80163534 | WAVE | 134 | 76 | 10184 | 1.02 | 46.9 | Y | jr_8015AE2C | | mismatch=13, a single 1-position scheduling tie. Instrs 1-30 byte-perfect; all registers correct | `.run/backlog_drafts/func_80163534.c` | -| 35 | func_8014D610 | WAVE | 134 | 74 | 9916 | 1.00 | 47.9 | Y | after | | none — MATCH (74 ins). for-loop + continue, single IV pointer p; gcc derives the $s0 = p+0x75 second inductio… | `.run/backlog_drafts/func_8014D610.c` | -| 36 | func_8012E014 | WAVE | 134 | 73 | 9782 | 0.98 | 48.9 | Y | jr_8012ACE0 | 0 | none — MATCH (expected; straightforward struct-field + global-copy body) | `.run/backlog_drafts/func_8012E014.c` | -| 37 | func_80132F40 | STRUCT | 134 | 72 | 9648 | 0.97 | 49.9 | Y | jr_8012ACE0 | | gcc gives src (sp+0x10) a 5th saved reg ($s3, frame 0x38 not 0x40); target rematerializes | `.run/backlog_drafts/func_80132F40.c` | -| 38 | func_80164418 | WAVE | 134 | 70 | 9380 | 0.94 | 50.8 | Y | jr_8015AE2C | 0 | none — MATCH (s16 stack array forces the spill; 2nd ratan2 reuses /dy/ in $a1) | `.run/backlog_drafts/func_80164418.c` | -| 39 | func_80161774 | WAVE | 134 | 69 | 9246 | 0.93 | 51.7 | Y | jr_8015AE2C | 53 | none — MATCH (69 ins, match_one verified; clean nested-if; param_1 -> $s0 call-crossing) | `.run/backlog_drafts/func_80161774.c` | -| 40 | func_80175308 | WAVE | 134 | 67 | 8978 | 0.90 | 52.6 | Y | jr_801734BC | 61 | WAVE: 61 mismatch | `.run/backlog_drafts/func_80175308.c` | +| 1 | func_801412A8 | GIANT | 134 | 198 | 26532 | 3.00 | 3.0 | Y | main | 110 | 110 mismatch (count-exact 198/198). S11 LUID(x)alloc: register-assignment permutation + prim2 store-schedule.… | `.run/backlog_drafts/func_801412A8.c` | +| 2 | func_80178004 | GIANT | 134 | 165 | 22110 | 2.50 | 5.5 | Y | jr_801734BC | 0 | none — MATCH (full register pins per sibling func_80177EA4; running-ptr $s2 to stop unroll-rebase; | `.run/backlog_drafts/func_80178004.c` | +| 3 | func_8014F4C0 | WAVE | 134 | 141 | 18894 | 2.14 | 7.6 | Y | after | 127 | residual: 127 mismatch | `.run/backlog_drafts/func_8014F4C0.c` | +| 4 | func_8014ADE0 | WAVE | 134 | 139 | 18626 | 2.11 | 9.7 | Y | after | 19 | 16 ins off — all compiler-internal ties: (1) 0xAAA8 const lands $v0 vs target $v1; | `.run/backlog_drafts/func_8014ADE0.c` | +| 5 | func_80137DD4 | STRUCT | 134 | 129 | 17286 | 1.96 | 11.7 | Y | jr_8012ACE0 | 107 | regalloc fully matches (frame -0x30; s4/s3/s5=params, s2=mask, s1=ptr w/ in-place +0x24 reuse, s0=acc+reused … | `.run/backlog_drafts/func_80137DD4.c` | +| 6 | func_80174CB0 | WAVE | 134 | 123 | 16482 | 1.86 | 13.6 | Y | jr_801734BC | 0 | close=0 match_one MATCH but its anon typedef is named 'Buf' which COLLIDES with the existing 'Buf' (s16 h[8],… | `.run/backlog_drafts/func_80174CB0.c` | +| 7 | func_801325B8 | WAVE | 134 | 113 | 15142 | 1.71 | 15.3 | Y | jr_8012ACE0 | 4 | 4/113 — prologue save-order of the $s0(cur/p3) vs $s5(p1) pair; gcc emits | `.run/backlog_drafts/func_801325B8.c` | +| 8 | func_801330E0 | STUB | 134 | 110 | 14740 | 1.67 | 16.9 | Y | jr_8012ACE0 | 7 | STUB: 7 mismatch | `.run/backlog_drafts/func_801330E0.c` | +| 9 | func_8014E284 | WAVE | 134 | 108 | 14472 | 1.64 | 18.6 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014E284.c` | +| 10 | func_8012CC88 | WAVE | 134 | 105 | 14070 | 1.59 | 20.2 | Y | jr_8012ACE0 | 0 | none — MATCH (105 ins, relocation-masked) | `.run/backlog_drafts/func_8012CC88.c` | +| 11 | func_80169228 | WAVE | 134 | 105 | 14070 | 1.59 | 21.8 | Y | jr_8015AE2C | 0 | none — MATCH (105 ins, relocation-masked). Key levers: arg0/p pinned $s1/$s0, | `.run/backlog_drafts/func_80169228.c` | +| 12 | func_80167714 | WAVE | 134 | 104 | 13936 | 1.58 | 23.3 | Y | jr_8015AE2C | 0 | none — MATCH (104 ins) | `.run/backlog_drafts/func_80167714.c` | +| 13 | func_801463A0 | WAVE | 134 | 101 | 13534 | 1.53 | 24.9 | Y | after | 0 | none — MATCH (101 ins, match_one); real symbol names; misaligned 8B copy + s16 stores + masked B9C last | `.run/backlog_drafts/func_801463A0.c` | +| 14 | func_80177940 | WAVE | 134 | 101 | 13534 | 1.53 | 26.4 | Y | jr_801734BC | 65 | prologue+setup (35 ins) byte-match exactly; loop body diverges on gcc loop-invariant hoist ORDERING (schedule… | `.run/backlog_drafts/func_80177940.c` | +| 15 | func_801387B8 | WAVE | 134 | 100 | 13400 | 1.52 | 27.9 | Y | jr_801380E0 | 50 | the two scanned bytes land in $a0/$a1 not $a1/$a2 (gcc-2.7.2 grabs the freed incoming-arg $a0 for the first l… | `.run/backlog_drafts/func_801387B8.c` | +| 16 | func_801379FC | WAVE | 134 | 97 | 12998 | 1.47 | 29.4 | Y | jr_8012ACE0 | 0 | none — MATCH (match_one 97/97) | `.run/backlog_drafts/func_801379FC.c` | +| 17 | func_8014CD80 | WAVE | 134 | 97 | 12998 | 1.47 | 30.9 | Y | after | 63 | WAVE: 63 mismatch | `.run/backlog_drafts/func_8014CD80.c` | +| 18 | func_80150170 | WAVE | 134 | 95 | 12730 | 1.44 | 32.3 | Y | after | 88 | WAVE: 88 mismatch | `.run/backlog_drafts/func_80150170.c` | +| 19 | func_8014D12C | WAVE | 134 | 93 | 12462 | 1.41 | 33.7 | Y | after | 53 | WAVE: 53 mismatch | `.run/backlog_drafts/func_8014D12C.c` | +| 20 | func_8014FFDC | WAVE | 134 | 93 | 12462 | 1.41 | 35.1 | Y | after | 1 | none — MATCH | `.run/backlog_drafts/func_8014FFDC.c` | +| 21 | func_801502EC | WAVE | 134 | 93 | 12462 | 1.41 | 36.5 | Y | after | 78 | WAVE: 78 mismatch | `.run/backlog_drafts/func_801502EC.c` | +| 22 | func_8014C6F4 | WAVE | 134 | 91 | 12194 | 1.38 | 37.9 | Y | after | 14 | WAVE: 14 mismatch | `.run/backlog_drafts/func_8014C6F4.c` | +| 23 | func_80158638 | STUB | 134 | 87 | 11658 | 1.32 | 39.2 | Y | jr_8015444C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_80158638.c` | +| 24 | func_8012B4B8 | WAVE | 134 | 84 | 11256 | 1.27 | 40.5 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_8012B4B8.c` | +| 25 | func_8014D4C0 | WAVE | 134 | 84 | 11256 | 1.27 | 41.8 | Y | after | 44 | WAVE: 44 mismatch | `.run/backlog_drafts/func_8014D4C0.c` | +| 26 | func_80156670 | WAVE | 134 | 83 | 11122 | 1.26 | 43.0 | Y | jr_8015444C | | none — MATCH (83 ins). Key: hoist `iVar1 = uVar3*4;` as its OWN statement before the if so gcc schedules `sll… | `.run/backlog_drafts/func_80156670.c` | +| 27 | func_8014CF04 | WAVE | 134 | 82 | 10988 | 1.24 | 44.3 | Y | after | 27 | WAVE: 27 mismatch | `.run/backlog_drafts/func_8014CF04.c` | +| 28 | func_8012E138 | WAVE | 134 | 81 | 10854 | 1.23 | 45.5 | Y | jr_8012ACE0 | 0 | none — MATCH (81/81 ins, match_one proxy); reloaded ptr pinned to $a0 | `.run/backlog_drafts/func_8012E138.c` | +| 29 | func_8014D2A0 | WAVE | 134 | 80 | 10720 | 1.21 | 46.7 | Y | after | 27 | none — MATCH (80 ins, relocation-masked); loop-guard idiom per engine_core DEFINE_func_80164ACC | `.run/backlog_drafts/func_8014D2A0.c` | +| 30 | func_8012A1BC | WAVE | 134 | 78 | 10452 | 1.18 | 47.9 | Y | a | 42 | 42/78 — block-copy bytes correct (char[8] => lwl/lwr/swl/swr); residual is gcc's load-hoist split. Target hoi… | `.run/backlog_drafts/func_8012A1BC.c` | +| 31 | func_80137178 | WAVE | 134 | 78 | 10452 | 1.18 | 49.1 | Y | jr_8012ACE0 | 15 | reg values all correct; prologue independent-addiu order + lazy sw placement differ | `.run/backlog_drafts/func_80137178.c` | +| 32 | func_8016163C | WAVE | 134 | 78 | 10452 | 1.18 | 50.3 | Y | jr_8015AE2C | 50 | none — MATCH (78 ins). First arm calls func_801599A4 with NO arg (asm nop delay slot) via fn-ptr cast ((void(… | `.run/backlog_drafts/func_8016163C.c` | +| 33 | func_80163534 | WAVE | 134 | 76 | 10184 | 1.15 | 51.4 | Y | jr_8015AE2C | | mismatch=13, a single 1-position scheduling tie. Instrs 1-30 byte-perfect; all registers correct | `.run/backlog_drafts/func_80163534.c` | +| 34 | func_8014D610 | WAVE | 134 | 74 | 9916 | 1.12 | 52.5 | Y | after | 60 | WAVE: 60 mismatch | `.run/backlog_drafts/func_8014D610.c` | +| 35 | func_8012E014 | WAVE | 134 | 73 | 9782 | 1.11 | 53.6 | Y | jr_8012ACE0 | 0 | none — MATCH (expected; straightforward struct-field + global-copy body) | `.run/backlog_drafts/func_8012E014.c` | +| 36 | func_80132F40 | STRUCT | 134 | 72 | 9648 | 1.09 | 54.7 | Y | jr_8012ACE0 | 59 | STRUCT: 59 mismatch | `.run/backlog_drafts/func_80132F40.c` | +| 37 | func_80164418 | WAVE | 134 | 70 | 9380 | 1.06 | 55.8 | Y | jr_8015AE2C | 0 | none — MATCH (s16 stack array forces the spill; 2nd ratan2 reuses /dy/ in $a1) | `.run/backlog_drafts/func_80164418.c` | +| 38 | func_80161774 | WAVE | 134 | 69 | 9246 | 1.05 | 56.8 | Y | jr_8015AE2C | 53 | none — MATCH (69 ins, match_one verified; clean nested-if; param_1 -> $s0 call-crossing) | `.run/backlog_drafts/func_80161774.c` | +| 39 | func_80175308 | WAVE | 134 | 67 | 8978 | 1.02 | 57.9 | Y | jr_801734BC | 41 | WAVE: 41 mismatch | `.run/backlog_drafts/func_80175308.c` | +| 40 | func_801775E0 | WAVE | 134 | 67 | 8978 | 1.02 | 58.9 | Y | jr_801734BC | 1 | 1 ins — target `sb $v0,0x6($s0)` vs mine `sb $v0,26($s1)` (same store P1+0x1a; gcc address-CSE picks $s1 base… | `.run/backlog_drafts/func_801775E0.c` | -## GIANT hand-decomp queue — 2 fns, 4.9% of all remaining gain +## GIANT hand-decomp queue — 2 fns, 5.5% of all remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_801412A8 | GIANT | 134 | 198 | 26532 | 2.67 | Y | main | 110 | 110 mismatch (count-exact 198/198). S11 LUID(x)alloc: register-assignment permutation + prim2 store-schedule.… | `.run/backlog_drafts/func_801412A8.c` | -| 2 | func_80178004 | GIANT | 134 | 165 | 22110 | 2.22 | Y | jr_801734BC | 0 | none — MATCH (full register pins per sibling func_80177EA4; running-ptr $s2 to stop unroll-rebase; | `.run/backlog_drafts/func_80178004.c` | +| 1 | func_801412A8 | GIANT | 134 | 198 | 26532 | 3.00 | Y | main | 110 | 110 mismatch (count-exact 198/198). S11 LUID(x)alloc: register-assignment permutation + prim2 store-schedule.… | `.run/backlog_drafts/func_801412A8.c` | +| 2 | func_80178004 | GIANT | 134 | 165 | 22110 | 2.50 | Y | jr_801734BC | 0 | none — MATCH (full register pins per sibling func_80177EA4; running-ptr $s2 to stop unroll-rebase; | `.run/backlog_drafts/func_80178004.c` | ## Idiom-group tables -### STRUCT — 69 fns, 4.0% of remaining gain +### STRUCT — 59 fns, 4.1% of remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_80137DD4 | STRUCT | 134 | 129 | 17286 | 1.74 | Y | jr_8012ACE0 | 107 | regalloc fully matches (frame -0x30; s4/s3/s5=params, s2=mask, s1=ptr w/ in-place +0x24 reuse, s0=acc+reused … | `.run/backlog_drafts/func_80137DD4.c` | -| 2 | func_80132F40 | STRUCT | 134 | 72 | 9648 | 0.97 | Y | jr_8012ACE0 | | gcc gives src (sp+0x10) a 5th saved reg ($s3, frame 0x38 not 0x40); target rematerializes | `.run/backlog_drafts/func_80132F40.c` | -| 3 | func_801719A4 | STRUCT | 134 | 24 | 3216 | 0.32 | Y | jr_8016AB6C | 25 | none — MATCH (24 ins, relocation-masked) | `.run/backlog_drafts/func_801719A4.c` | -| 4 | func_8017C974 | STRUCT | 1 | 947 | 947 | 0.10 | Y | jr_80178D40 | | | | -| 5 | func_8018103C | STRUCT | 1 | 579 | 579 | 0.06 | Y | jr_80178D40 | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_8018103C.c` | -| 6 | func_8017A4AC | STRUCT | 1 | 536 | 536 | 0.05 | Y | jr_80178D40 | | | | -| 7 | func_8013F350 | STRUCT | 1 | 490 | 490 | 0.05 | Y | main | | | | -| 8 | func_80131340 | STRUCT | 1 | 424 | 424 | 0.04 | n | jr_8012ACE0 | | | | -| 9 | func_80159C84 | STRUCT | 1 | 337 | 337 | 0.03 | Y | jr_8015444C | | | | -| 10 | func_80183324 | STRUCT | 1 | 324 | 324 | 0.03 | Y | jr_80182268 | | | | -| 11 | func_80135EB0 | STRUCT | 1 | 289 | 289 | 0.03 | n | jr_8012ACE0 | | | | -| 12 | func_8015B950 | STRUCT | 1 | 271 | 271 | 0.03 | Y | jr_8015AE2C | | | | -| 13 | func_8017FD14 | STRUCT | 1 | 249 | 249 | 0.03 | Y | jr_80178D40 | | | | -| 14 | func_8015C32C | STRUCT | 1 | 222 | 222 | 0.02 | Y | jr_8015AE2C | | | | -| 15 | func_8015EA3C | STRUCT | 1 | 204 | 204 | 0.02 | Y | jr_8015AE2C | | | | -| 16 | func_8015D738 | STRUCT | 1 | 201 | 201 | 0.02 | Y | jr_8015AE2C | | | | -| 17 | func_80181BE4 | STRUCT | 1 | 201 | 201 | 0.02 | Y | jr_80178D40 | | | | -| 18 | func_8015F448 | STRUCT | 1 | 188 | 188 | 0.02 | Y | jr_8015AE2C | | | | -| 19 | func_8014032C | STRUCT | 1 | 183 | 183 | 0.02 | Y | main | | | | -| 20 | func_80135A4C | STRUCT | 1 | 181 | 181 | 0.02 | n | jr_8012ACE0 | | | | -| 21 | func_8017AE2C | STRUCT | 1 | 174 | 174 | 0.02 | Y | jr_80178D40 | | | | -| 22 | func_80154C24 | STRUCT | 1 | 173 | 173 | 0.02 | Y | jr_8015444C | | | | -| 23 | func_8018308C | STRUCT | 1 | 166 | 166 | 0.02 | Y | jr_80182268 | | | | -| 24 | func_80160534 | STRUCT | 1 | 161 | 161 | 0.02 | Y | jr_8015AE2C | | | | -| 25 | func_80180C90 | STRUCT | 1 | 160 | 160 | 0.02 | Y | jr_80178D40 | | | | -| 26 | func_801299C8 | STRUCT | 1 | 158 | 158 | 0.02 | n | a | | | | -| 27 | func_80135260 | STRUCT | 1 | 136 | 136 | 0.01 | n | jr_8012ACE0 | | | | -| 28 | func_80183834 | STRUCT | 1 | 135 | 135 | 0.01 | Y | jr_80182268 | | | | -| 29 | func_80181948 | STRUCT | 1 | 132 | 132 | 0.01 | Y | jr_80178D40 | | | | -| 30 | func_80185E68 | STRUCT | 1 | 132 | 132 | 0.01 | Y | jr_80182268 | 131 | STRUCT: 131 mismatch | `.run/backlog_drafts/func_80185E68.c` | -| 31 | func_801555F4 | STRUCT | 1 | 131 | 131 | 0.01 | Y | jr_8015444C | | | | -| 32 | func_8015CD20 | STRUCT | 1 | 129 | 129 | 0.01 | Y | jr_8015AE2C | | | | -| 33 | func_8012AAAC | STRUCT | 1 | 125 | 125 | 0.01 | n | a | | | | -| 34 | func_80140608 | STRUCT | 1 | 123 | 123 | 0.01 | Y | main | | | | -| 35 | func_801588CC | STRUCT | 1 | 122 | 122 | 0.01 | Y | jr_8015444C | | | | -| 36 | func_80181F08 | STRUCT | 1 | 117 | 117 | 0.01 | Y | jr_80178D40 | | | | -| 37 | func_80135888 | STRUCT | 1 | 113 | 113 | 0.01 | n | jr_8012ACE0 | | | | -| 38 | func_80179B74 | STRUCT | 1 | 111 | 111 | 0.01 | Y | jr_80178D40 | | | | -| 39 | func_801594E8 | STRUCT | 1 | 108 | 108 | 0.01 | Y | jr_8015444C | | | | -| 40 | func_80182C9C | STRUCT | 1 | 101 | 101 | 0.01 | Y | jr_80182268 | | none — MATCH (101 ins). Inner-switch break-to-shared-tail must be written as | `.run/backlog_drafts/func_80182C9C.c` | +| 1 | func_80137DD4 | STRUCT | 134 | 129 | 17286 | 1.96 | Y | jr_8012ACE0 | 107 | regalloc fully matches (frame -0x30; s4/s3/s5=params, s2=mask, s1=ptr w/ in-place +0x24 reuse, s0=acc+reused … | `.run/backlog_drafts/func_80137DD4.c` | +| 2 | func_80132F40 | STRUCT | 134 | 72 | 9648 | 1.09 | Y | jr_8012ACE0 | 59 | STRUCT: 59 mismatch | `.run/backlog_drafts/func_80132F40.c` | +| 3 | func_8017C974 | STRUCT | 1 | 947 | 947 | 0.11 | Y | jr_8017A4AC | | | | +| 4 | func_8018103C | STRUCT | 1 | 579 | 579 | 0.07 | Y | jr_8017A4AC | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_8018103C.c` | +| 5 | func_8013F350 | STRUCT | 1 | 490 | 490 | 0.06 | Y | main | | | | +| 6 | func_80131340 | STRUCT | 1 | 424 | 424 | 0.05 | n | jr_8012ACE0 | | | | +| 7 | func_80159C84 | STRUCT | 1 | 337 | 337 | 0.04 | Y | jr_8015444C | | | | +| 8 | func_80183324 | STRUCT | 1 | 324 | 324 | 0.04 | Y | jr_80182268 | | | | +| 9 | func_80135EB0 | STRUCT | 1 | 289 | 289 | 0.03 | n | jr_8012ACE0 | | | | +| 10 | func_8015B950 | STRUCT | 1 | 271 | 271 | 0.03 | Y | jr_8015AE2C | | | | +| 11 | func_8017FD14 | STRUCT | 1 | 249 | 249 | 0.03 | Y | jr_8017A4AC | | | | +| 12 | func_8015C32C | STRUCT | 1 | 222 | 222 | 0.03 | Y | jr_8015AE2C | | | | +| 13 | func_8015EA3C | STRUCT | 1 | 204 | 204 | 0.02 | Y | jr_8015AE2C | | | | +| 14 | func_8015D738 | STRUCT | 1 | 201 | 201 | 0.02 | Y | jr_8015AE2C | | | | +| 15 | func_80181BE4 | STRUCT | 1 | 201 | 201 | 0.02 | Y | jr_8017A4AC | | | | +| 16 | func_8015F448 | STRUCT | 1 | 188 | 188 | 0.02 | Y | jr_8015AE2C | | | | +| 17 | func_8014032C | STRUCT | 1 | 183 | 183 | 0.02 | Y | main | | | | +| 18 | func_80135A4C | STRUCT | 1 | 181 | 181 | 0.02 | n | jr_8012ACE0 | | | | +| 19 | func_8017AE2C | STRUCT | 1 | 174 | 174 | 0.02 | Y | jr_8017A4AC | | | | +| 20 | func_80154C24 | STRUCT | 1 | 173 | 173 | 0.02 | Y | jr_8015444C | | | | +| 21 | func_8018308C | STRUCT | 1 | 166 | 166 | 0.02 | Y | jr_80182268 | | | | +| 22 | func_80160534 | STRUCT | 1 | 161 | 161 | 0.02 | Y | jr_8015AE2C | | | | +| 23 | func_80180C90 | STRUCT | 1 | 160 | 160 | 0.02 | Y | jr_8017A4AC | | | | +| 24 | func_801299C8 | STRUCT | 1 | 158 | 158 | 0.02 | n | a | | | | +| 25 | func_80135260 | STRUCT | 1 | 136 | 136 | 0.02 | n | jr_8012ACE0 | | | | +| 26 | func_80183834 | STRUCT | 1 | 135 | 135 | 0.02 | Y | jr_80182268 | | | | +| 27 | func_80181948 | STRUCT | 1 | 132 | 132 | 0.01 | Y | jr_8017A4AC | | | | +| 28 | func_80185E68 | STRUCT | 1 | 132 | 132 | 0.01 | Y | jr_80182268 | 131 | STRUCT: 131 mismatch | `.run/backlog_drafts/func_80185E68.c` | +| 29 | func_801555F4 | STRUCT | 1 | 131 | 131 | 0.01 | Y | jr_8015444C | | | | +| 30 | func_8015CD20 | STRUCT | 1 | 129 | 129 | 0.01 | Y | jr_8015AE2C | | | | +| 31 | func_8012AAAC | STRUCT | 1 | 125 | 125 | 0.01 | n | a | | | | +| 32 | func_80140608 | STRUCT | 1 | 123 | 123 | 0.01 | Y | main | | | | +| 33 | func_801588CC | STRUCT | 1 | 122 | 122 | 0.01 | Y | jr_8015444C | | | | +| 34 | func_80181F08 | STRUCT | 1 | 117 | 117 | 0.01 | Y | jr_8017A4AC | | | | +| 35 | func_80135888 | STRUCT | 1 | 113 | 113 | 0.01 | n | jr_8012ACE0 | | | | +| 36 | func_80179B74 | STRUCT | 1 | 111 | 111 | 0.01 | Y | jr_80178D40 | | | | +| 37 | func_801594E8 | STRUCT | 1 | 108 | 108 | 0.01 | Y | jr_8015444C | | | | +| 38 | func_80182C9C | STRUCT | 1 | 101 | 101 | 0.01 | Y | jr_80182268 | | none — MATCH (101 ins). Inner-switch break-to-shared-tail must be written as | `.run/backlog_drafts/func_80182C9C.c` | +| 39 | func_80135D20 | STRUCT | 1 | 100 | 100 | 0.01 | n | jr_8012ACE0 | | | | +| 40 | func_801820DC | STRUCT | 1 | 94 | 94 | 0.01 | Y | jr_8017A4AC | 0 | none — MATCH (switch on entity state at 0x34, inner jtbl on (s8)(u70>>8)) | `.run/backlog_drafts/func_801820DC.c` | -*(+29 more STRUCT fns — see `.run/worklist.json`)* +*(+19 more STRUCT fns — see `.run/worklist.json`)* -### PINS — 24 fns, 8.8% of remaining gain +### PINS — 20 fns, 7.2% of remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_8014E5B4 | PINS | 134 | 59 | 7906 | 0.79 | Y | after | 23 | none — MATCH | `.run/backlog_drafts/func_8014E5B4.c` | -| 2 | func_80151C54 | PINS | 134 | 52 | 6968 | 0.70 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80151C54.c` | -| 3 | func_80136DFC | PINS | 134 | 50 | 6700 | 0.67 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_80136DFC.c` | -| 4 | func_80151B98 | PINS | 134 | 47 | 6298 | 0.63 | Y | after | 15 | PINS: 15 mismatch | `.run/backlog_drafts/func_80151B98.c` | -| 5 | func_80129C40 | PINS | 134 | 46 | 6164 | 0.62 | Y | a | 0 | none — MATCH (array-of-struct %lo-fold for the two 3-element 0xA4-stride bases) | `.run/backlog_drafts/func_80129C40.c` | -| 6 | func_80163764 | PINS | 134 | 42 | 5628 | 0.57 | Y | jr_8015AE2C | 10 | none — MATCH (42 ins). pins $s2/$s1/$s0/$s3 + u32 counter (sltiu) + init order s2,s3,i,p | `.run/backlog_drafts/func_80163764.c` | -| 7 | func_801522CC | PINS | 134 | 41 | 5494 | 0.55 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_801522CC.c` | -| 8 | func_80152C80 | PINS | 134 | 41 | 5494 | 0.55 | Y | after | | none — MATCH expected (linear call/store sequence, no regalloc tension) | `.run/backlog_drafts/func_80152C80.c` | -| 9 | func_80146AFC | PINS | 134 | 40 | 5360 | 0.54 | Y | after | 13 | none — MATCH | `.run/backlog_drafts/func_80146AFC.c` | -| 10 | func_80131A34 | PINS | 134 | 37 | 4958 | 0.50 | Y | jr_8012ACE0 | 3 | 3-off — (a) prologue saves $ra before $s0 (target: $s0 then $ra) and (b) return-0 path reuses $a1's proven-ze… | `.run/backlog_drafts/func_80131A34.c` | -| 11 | func_80151664 | PINS | 134 | 35 | 4690 | 0.47 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80151664.c` | -| 12 | func_80170CF0 | PINS | 134 | 30 | 4020 | 0.40 | Y | jr_8016AB6C | | 4-ins PROLOGUE-ORDER residual (body insns 4-29 byte-identical). My cc1 hoists the funcptr lui/lw ABOVE the fr… | `.run/backlog_drafts/func_80170CF0.c` | -| 13 | func_80141B90 | PINS | 134 | 29 | 3886 | 0.39 | Y | main | 24 | none — MATCH (29 ins); array-of-int %lo-fold + call + u16 if-block; volatile-double reserves the target's 8-b… | `.run/backlog_drafts/func_80141B90.c` | -| 14 | func_8016F0E4 | PINS | 134 | 26 | 3484 | 0.35 | Y | jr_8016AB6C | 1 | none — MATCH (26 ins); natural C form, param_1 auto-allocated to $s0 | `.run/backlog_drafts/func_8016F0E4.c` | -| 15 | func_801733FC | PINS | 134 | 25 | 3350 | 0.34 | Y | jr_8016AB6C | 0 | none — modeled on sibling func_80173460 (packed 8-byte struct copy + two s16=1 stores) | `.run/backlog_drafts/func_801733FC.c` | -| 16 | func_80131CA8 | PINS | 134 | 19 | 2546 | 0.26 | Y | jr_8012ACE0 | 0 | none — MATCH (call-through-fnptr dispatcher: explicit return 1/return 0) | `.run/backlog_drafts/func_80131CA8.c` | -| 17 | func_80156600 | PINS | 134 | 18 | 2412 | 0.24 | Y | jr_8015444C | | none — MATCH (simple counted scan, do-while form per Ghidra-C) | `.run/backlog_drafts/func_80156600.c` | -| 18 | func_80161208 | PINS | 134 | 14 | 1876 | 0.19 | Y | jr_8015AE2C | 0 | none — MATCH expected (param saved across call → natural $s0, no pin needed) | `.run/backlog_drafts/func_80161208.c` | -| 19 | func_80184C0C | PINS | 1 | 48 | 48 | 0.00 | Y | jr_80182268 | 1 | none — MATCH (array-of-struct %lo-fold for &D_8018AEB8[idx], stride 0x34) | `.run/backlog_drafts/func_80184C0C.c` | -| 20 | func_80161C24 | PINS | 1 | 29 | 29 | 0.00 | Y | jr_8015AE2C | 1 | none — MATCH (array-of-struct %lo-fold; even/odd u16 fields at off 0/2, stride 4) | `.run/backlog_drafts/func_80161C24.c` | -| 21 | func_80182988 | PINS | 1 | 22 | 22 | 0.00 | Y | jr_80182268 | 6 | none — MATCH (0x5c store must be unsigned short so 0xaa10 stays +43536 → ori, not addiu/sign-extend) | `.run/backlog_drafts/func_80182988.c` | -| 22 | func_80157D20 | PINS | 1 | 21 | 21 | 0.00 | Y | jr_8015444C | 0 | none — MATCH expected (call, indexed u16-global load as 2nd arg, then call; param_1 saved across all three ca… | `.run/backlog_drafts/func_80157D20.c` | -| 23 | func_80161CD0 | PINS | 1 | 20 | 20 | 0.00 | Y | jr_8015AE2C | 14 | param_2 must survive the call in $s0; try plain C first then pin to $16 | `.run/backlog_drafts/func_80161CD0.c` | -| 24 | func_80161D20 | PINS | 1 | 14 | 14 | 0.00 | Y | jr_8015AE2C | 1 | none — MATCH (array-of-u16 %lo-fold, §18) | `.run/backlog_drafts/func_80161D20.c` | +| 1 | func_8014E5B4 | PINS | 134 | 59 | 7906 | 0.89 | Y | after | 23 | none — MATCH | `.run/backlog_drafts/func_8014E5B4.c` | +| 2 | func_80151C54 | PINS | 134 | 52 | 6968 | 0.79 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80151C54.c` | +| 3 | func_80151B98 | PINS | 134 | 47 | 6298 | 0.71 | Y | after | 15 | PINS: 15 mismatch | `.run/backlog_drafts/func_80151B98.c` | +| 4 | func_80163764 | PINS | 134 | 42 | 5628 | 0.64 | Y | jr_8015AE2C | 10 | none — MATCH (42 ins). pins $s2/$s1/$s0/$s3 + u32 counter (sltiu) + init order s2,s3,i,p | `.run/backlog_drafts/func_80163764.c` | +| 5 | func_80146AFC | PINS | 134 | 40 | 5360 | 0.61 | Y | after | 13 | none — MATCH | `.run/backlog_drafts/func_80146AFC.c` | +| 6 | func_80131A34 | PINS | 134 | 37 | 4958 | 0.56 | Y | jr_8012ACE0 | 3 | 3-off — (a) prologue saves $ra before $s0 (target: $s0 then $ra) and (b) return-0 path reuses $a1's proven-ze… | `.run/backlog_drafts/func_80131A34.c` | +| 7 | func_80151664 | PINS | 134 | 35 | 4690 | 0.53 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80151664.c` | +| 8 | func_80170CF0 | PINS | 134 | 30 | 4020 | 0.45 | Y | jr_8016AB6C | 17 | PINS: 17 mismatch | `.run/backlog_drafts/func_80170CF0.c` | +| 9 | func_80141B90 | PINS | 134 | 29 | 3886 | 0.44 | Y | main | 4 | PINS: 4 mismatch | `.run/backlog_drafts/func_80141B90.c` | +| 10 | func_8016F0E4 | PINS | 134 | 26 | 3484 | 0.39 | Y | jr_8016AB6C | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_8016F0E4.c` | +| 11 | func_801733FC | PINS | 134 | 25 | 3350 | 0.38 | Y | jr_8016AB6C | 0 | none — modeled on sibling func_80173460 (packed 8-byte struct copy + two s16=1 stores) | `.run/backlog_drafts/func_801733FC.c` | +| 12 | func_80131CA8 | PINS | 134 | 19 | 2546 | 0.29 | Y | jr_8012ACE0 | 0 | none — MATCH (call-through-fnptr dispatcher: explicit return 1/return 0) | `.run/backlog_drafts/func_80131CA8.c` | +| 13 | func_80156600 | PINS | 134 | 18 | 2412 | 0.27 | Y | jr_8015444C | | none — MATCH (simple counted scan, do-while form per Ghidra-C) | `.run/backlog_drafts/func_80156600.c` | +| 14 | func_80161208 | PINS | 134 | 14 | 1876 | 0.21 | Y | jr_8015AE2C | 0 | none — MATCH expected (param saved across call → natural $s0, no pin needed) | `.run/backlog_drafts/func_80161208.c` | +| 15 | func_80184C0C | PINS | 1 | 48 | 48 | 0.01 | Y | jr_80182268 | 1 | none — MATCH (array-of-struct %lo-fold for &D_8018AEB8[idx], stride 0x34) | `.run/backlog_drafts/func_80184C0C.c` | +| 16 | func_80161C24 | PINS | 1 | 29 | 29 | 0.00 | Y | jr_8015AE2C | 1 | none — MATCH (array-of-struct %lo-fold; even/odd u16 fields at off 0/2, stride 4) | `.run/backlog_drafts/func_80161C24.c` | +| 17 | func_80182988 | PINS | 1 | 22 | 22 | 0.00 | Y | jr_80182268 | 6 | none — MATCH (0x5c store must be unsigned short so 0xaa10 stays +43536 → ori, not addiu/sign-extend) | `.run/backlog_drafts/func_80182988.c` | +| 18 | func_80157D20 | PINS | 1 | 21 | 21 | 0.00 | Y | jr_8015444C | 0 | none — MATCH expected (call, indexed u16-global load as 2nd arg, then call; param_1 saved across all three ca… | `.run/backlog_drafts/func_80157D20.c` | +| 19 | func_80161CD0 | PINS | 1 | 20 | 20 | 0.00 | Y | jr_8015AE2C | 14 | param_2 must survive the call in $s0; try plain C first then pin to $16 | `.run/backlog_drafts/func_80161CD0.c` | +| 20 | func_80161D20 | PINS | 1 | 14 | 14 | 0.00 | Y | jr_8015AE2C | 1 | none — MATCH (array-of-u16 %lo-fold, §18) | `.run/backlog_drafts/func_80161D20.c` | -### WAVE — 146 fns, 76.0% of remaining gain +### WAVE — 131 fns, 77.9% of remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_8014F4C0 | WAVE | 134 | 141 | 18894 | 1.90 | Y | after | 127 | residual: 127 mismatch | `.run/backlog_drafts/func_8014F4C0.c` | -| 2 | func_8014ADE0 | WAVE | 134 | 139 | 18626 | 1.87 | Y | after | 19 | 16 ins off — all compiler-internal ties: (1) 0xAAA8 const lands $v0 vs target $v1; | `.run/backlog_drafts/func_8014ADE0.c` | -| 3 | func_80174CB0 | WAVE | 134 | 123 | 16482 | 1.66 | Y | jr_801734BC | 0 | close=0 match_one MATCH but its anon typedef is named 'Buf' which COLLIDES with the existing 'Buf' (s16 h[8],… | `.run/backlog_drafts/func_80174CB0.c` | -| 4 | func_801325B8 | WAVE | 134 | 113 | 15142 | 1.52 | Y | jr_8012ACE0 | 4 | 4/113 — prologue save-order of the $s0(cur/p3) vs $s5(p1) pair; gcc emits | `.run/backlog_drafts/func_801325B8.c` | -| 5 | func_8014E284 | WAVE | 134 | 108 | 14472 | 1.46 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014E284.c` | -| 6 | func_8012CC88 | WAVE | 134 | 105 | 14070 | 1.41 | Y | jr_8012ACE0 | 0 | none — MATCH (105 ins, relocation-masked) | `.run/backlog_drafts/func_8012CC88.c` | -| 7 | func_80169228 | WAVE | 134 | 105 | 14070 | 1.41 | Y | jr_8015AE2C | 0 | none — MATCH (105 ins, relocation-masked). Key levers: arg0/p pinned $s1/$s0, | `.run/backlog_drafts/func_80169228.c` | -| 8 | func_80167714 | WAVE | 134 | 104 | 13936 | 1.40 | Y | jr_8015AE2C | 0 | none — MATCH (104 ins) | `.run/backlog_drafts/func_80167714.c` | -| 9 | func_801463A0 | WAVE | 134 | 101 | 13534 | 1.36 | Y | after | 0 | none — MATCH (101 ins, match_one); real symbol names; misaligned 8B copy + s16 stores + masked B9C last | `.run/backlog_drafts/func_801463A0.c` | -| 10 | func_80177940 | WAVE | 134 | 101 | 13534 | 1.36 | Y | jr_801734BC | 65 | prologue+setup (35 ins) byte-match exactly; loop body diverges on gcc loop-invariant hoist ORDERING (schedule… | `.run/backlog_drafts/func_80177940.c` | -| 11 | func_801387B8 | WAVE | 134 | 100 | 13400 | 1.35 | Y | jr_801380E0 | 50 | the two scanned bytes land in $a0/$a1 not $a1/$a2 (gcc-2.7.2 grabs the freed incoming-arg $a0 for the first l… | `.run/backlog_drafts/func_801387B8.c` | -| 12 | func_801379FC | WAVE | 134 | 97 | 12998 | 1.31 | Y | jr_8012ACE0 | 0 | none — MATCH (match_one 97/97) | `.run/backlog_drafts/func_801379FC.c` | -| 13 | func_8014CD80 | WAVE | 134 | 97 | 12998 | 1.31 | Y | after | | none — MATCH (97 ins). iVar3 pinned to $v1 (register __asm__("$3")) so | `.run/backlog_drafts/func_8014CD80.c` | -| 14 | func_80150170 | WAVE | 134 | 95 | 12730 | 1.28 | Y | after | | none — MATCH (95/95). Keys: (1) two parallel 3-halfword groups via chained assign `sp10.x = sp18.x = v` (sp18… | `.run/backlog_drafts/func_80150170.c` | -| 15 | func_8014D12C | WAVE | 134 | 93 | 12462 | 1.25 | Y | after | 53 | WAVE: 53 mismatch | `.run/backlog_drafts/func_8014D12C.c` | -| 16 | func_8014FFDC | WAVE | 134 | 93 | 12462 | 1.25 | Y | after | 1 | none — MATCH | `.run/backlog_drafts/func_8014FFDC.c` | -| 17 | func_801502EC | WAVE | 134 | 93 | 12462 | 1.25 | Y | after | 95 | WAVE: 95 mismatch | `.run/backlog_drafts/func_801502EC.c` | -| 18 | func_8014C6F4 | WAVE | 134 | 91 | 12194 | 1.23 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014C6F4.c` | -| 19 | func_80173CB4 | WAVE | 134 | 90 | 12060 | 1.21 | Y | jr_801734BC | | none — MATCH (switch form keeps cases unmerged; final block: reuse one temp for the D_8012750C test + the fun… | `.run/backlog_drafts/func_80173CB4.c` | -| 20 | func_8012B4B8 | WAVE | 134 | 84 | 11256 | 1.13 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_8012B4B8.c` | -| 21 | func_8014D4C0 | WAVE | 134 | 84 | 11256 | 1.13 | Y | after | 65 | WAVE: 65 mismatch | `.run/backlog_drafts/func_8014D4C0.c` | -| 22 | func_80156670 | WAVE | 134 | 83 | 11122 | 1.12 | Y | jr_8015444C | | none — MATCH (83 ins). Key: hoist `iVar1 = uVar3*4;` as its OWN statement before the if so gcc schedules `sll… | `.run/backlog_drafts/func_80156670.c` | -| 23 | func_8014CF04 | WAVE | 134 | 82 | 10988 | 1.10 | Y | after | 73 | WAVE: 73 mismatch | `.run/backlog_drafts/func_8014CF04.c` | -| 24 | func_8012E138 | WAVE | 134 | 81 | 10854 | 1.09 | Y | jr_8012ACE0 | 0 | none — MATCH (81/81 ins, match_one proxy); reloaded ptr pinned to $a0 | `.run/backlog_drafts/func_8012E138.c` | -| 25 | func_8014D2A0 | WAVE | 134 | 80 | 10720 | 1.08 | Y | after | 27 | none — MATCH (80 ins, relocation-masked); loop-guard idiom per engine_core DEFINE_func_80164ACC | `.run/backlog_drafts/func_8014D2A0.c` | -| 26 | func_8012A1BC | WAVE | 134 | 78 | 10452 | 1.05 | Y | a | 42 | 42/78 — block-copy bytes correct (char[8] => lwl/lwr/swl/swr); residual is gcc's load-hoist split. Target hoi… | `.run/backlog_drafts/func_8012A1BC.c` | -| 27 | func_80137178 | WAVE | 134 | 78 | 10452 | 1.05 | Y | jr_8012ACE0 | 15 | reg values all correct; prologue independent-addiu order + lazy sw placement differ | `.run/backlog_drafts/func_80137178.c` | -| 28 | func_8016163C | WAVE | 134 | 78 | 10452 | 1.05 | Y | jr_8015AE2C | 50 | none — MATCH (78 ins). First arm calls func_801599A4 with NO arg (asm nop delay slot) via fn-ptr cast ((void(… | `.run/backlog_drafts/func_8016163C.c` | -| 29 | func_80163534 | WAVE | 134 | 76 | 10184 | 1.02 | Y | jr_8015AE2C | | mismatch=13, a single 1-position scheduling tie. Instrs 1-30 byte-perfect; all registers correct | `.run/backlog_drafts/func_80163534.c` | -| 30 | func_8014D610 | WAVE | 134 | 74 | 9916 | 1.00 | Y | after | | none — MATCH (74 ins). for-loop + continue, single IV pointer p; gcc derives the $s0 = p+0x75 second inductio… | `.run/backlog_drafts/func_8014D610.c` | -| 31 | func_8012E014 | WAVE | 134 | 73 | 9782 | 0.98 | Y | jr_8012ACE0 | 0 | none — MATCH (expected; straightforward struct-field + global-copy body) | `.run/backlog_drafts/func_8012E014.c` | -| 32 | func_80164418 | WAVE | 134 | 70 | 9380 | 0.94 | Y | jr_8015AE2C | 0 | none — MATCH (s16 stack array forces the spill; 2nd ratan2 reuses /dy/ in $a1) | `.run/backlog_drafts/func_80164418.c` | -| 33 | func_80161774 | WAVE | 134 | 69 | 9246 | 0.93 | Y | jr_8015AE2C | 53 | none — MATCH (69 ins, match_one verified; clean nested-if; param_1 -> $s0 call-crossing) | `.run/backlog_drafts/func_80161774.c` | -| 34 | func_80175308 | WAVE | 134 | 67 | 8978 | 0.90 | Y | jr_801734BC | 61 | WAVE: 61 mismatch | `.run/backlog_drafts/func_80175308.c` | -| 35 | func_801775E0 | WAVE | 134 | 67 | 8978 | 0.90 | Y | jr_801734BC | 1 | 1 ins — target `sb $v0,0x6($s0)` vs mine `sb $v0,26($s1)` (same store P1+0x1a; gcc address-CSE picks $s1 base… | `.run/backlog_drafts/func_801775E0.c` | -| 36 | func_80130C08 | WAVE | 134 | 65 | 8710 | 0.88 | Y | jr_8012ACE0 | 5 | tail shares one jal func_80131CA8 between the a1=5 and a1=0x38 arms via `j .L80130CEC` with a DUPLICATED `mov… | `.run/backlog_drafts/func_80130C08.c` | -| 37 | func_80133298 | WAVE | 134 | 65 | 8710 | 0.88 | Y | jr_8012ACE0 | 0 | none — MATCH (65 ins, relocation-masked) | `.run/backlog_drafts/func_80133298.c` | -| 38 | func_80140D68 | WAVE | 134 | 65 | 8710 | 0.88 | Y | main | 5 | 5-ins near-miss — gcc hoists `lui 0xff00` (the 0xFF000000 mask) one slot too early in the first AddPrim block… | `.run/backlog_drafts/func_80140D68.c` | -| 39 | func_8014A738 | WAVE | 134 | 62 | 8308 | 0.84 | Y | after | | none — MATCH | `.run/backlog_drafts/func_8014A738.c` | -| 40 | func_80136F3C | WAVE | 134 | 61 | 8174 | 0.82 | Y | jr_8012ACE0 | 10 | 10/61 — regalloc EXACT (param-copy + corner register-pins). residual = gcc list-scheduler permutation of the … | `.run/backlog_drafts/func_80136F3C.c` | +| 1 | func_8014F4C0 | WAVE | 134 | 141 | 18894 | 2.14 | Y | after | 127 | residual: 127 mismatch | `.run/backlog_drafts/func_8014F4C0.c` | +| 2 | func_8014ADE0 | WAVE | 134 | 139 | 18626 | 2.11 | Y | after | 19 | 16 ins off — all compiler-internal ties: (1) 0xAAA8 const lands $v0 vs target $v1; | `.run/backlog_drafts/func_8014ADE0.c` | +| 3 | func_80174CB0 | WAVE | 134 | 123 | 16482 | 1.86 | Y | jr_801734BC | 0 | close=0 match_one MATCH but its anon typedef is named 'Buf' which COLLIDES with the existing 'Buf' (s16 h[8],… | `.run/backlog_drafts/func_80174CB0.c` | +| 4 | func_801325B8 | WAVE | 134 | 113 | 15142 | 1.71 | Y | jr_8012ACE0 | 4 | 4/113 — prologue save-order of the $s0(cur/p3) vs $s5(p1) pair; gcc emits | `.run/backlog_drafts/func_801325B8.c` | +| 5 | func_8014E284 | WAVE | 134 | 108 | 14472 | 1.64 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014E284.c` | +| 6 | func_8012CC88 | WAVE | 134 | 105 | 14070 | 1.59 | Y | jr_8012ACE0 | 0 | none — MATCH (105 ins, relocation-masked) | `.run/backlog_drafts/func_8012CC88.c` | +| 7 | func_80169228 | WAVE | 134 | 105 | 14070 | 1.59 | Y | jr_8015AE2C | 0 | none — MATCH (105 ins, relocation-masked). Key levers: arg0/p pinned $s1/$s0, | `.run/backlog_drafts/func_80169228.c` | +| 8 | func_80167714 | WAVE | 134 | 104 | 13936 | 1.58 | Y | jr_8015AE2C | 0 | none — MATCH (104 ins) | `.run/backlog_drafts/func_80167714.c` | +| 9 | func_801463A0 | WAVE | 134 | 101 | 13534 | 1.53 | Y | after | 0 | none — MATCH (101 ins, match_one); real symbol names; misaligned 8B copy + s16 stores + masked B9C last | `.run/backlog_drafts/func_801463A0.c` | +| 10 | func_80177940 | WAVE | 134 | 101 | 13534 | 1.53 | Y | jr_801734BC | 65 | prologue+setup (35 ins) byte-match exactly; loop body diverges on gcc loop-invariant hoist ORDERING (schedule… | `.run/backlog_drafts/func_80177940.c` | +| 11 | func_801387B8 | WAVE | 134 | 100 | 13400 | 1.52 | Y | jr_801380E0 | 50 | the two scanned bytes land in $a0/$a1 not $a1/$a2 (gcc-2.7.2 grabs the freed incoming-arg $a0 for the first l… | `.run/backlog_drafts/func_801387B8.c` | +| 12 | func_801379FC | WAVE | 134 | 97 | 12998 | 1.47 | Y | jr_8012ACE0 | 0 | none — MATCH (match_one 97/97) | `.run/backlog_drafts/func_801379FC.c` | +| 13 | func_8014CD80 | WAVE | 134 | 97 | 12998 | 1.47 | Y | after | 63 | WAVE: 63 mismatch | `.run/backlog_drafts/func_8014CD80.c` | +| 14 | func_80150170 | WAVE | 134 | 95 | 12730 | 1.44 | Y | after | 88 | WAVE: 88 mismatch | `.run/backlog_drafts/func_80150170.c` | +| 15 | func_8014D12C | WAVE | 134 | 93 | 12462 | 1.41 | Y | after | 53 | WAVE: 53 mismatch | `.run/backlog_drafts/func_8014D12C.c` | +| 16 | func_8014FFDC | WAVE | 134 | 93 | 12462 | 1.41 | Y | after | 1 | none — MATCH | `.run/backlog_drafts/func_8014FFDC.c` | +| 17 | func_801502EC | WAVE | 134 | 93 | 12462 | 1.41 | Y | after | 78 | WAVE: 78 mismatch | `.run/backlog_drafts/func_801502EC.c` | +| 18 | func_8014C6F4 | WAVE | 134 | 91 | 12194 | 1.38 | Y | after | 14 | WAVE: 14 mismatch | `.run/backlog_drafts/func_8014C6F4.c` | +| 19 | func_8012B4B8 | WAVE | 134 | 84 | 11256 | 1.27 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_8012B4B8.c` | +| 20 | func_8014D4C0 | WAVE | 134 | 84 | 11256 | 1.27 | Y | after | 44 | WAVE: 44 mismatch | `.run/backlog_drafts/func_8014D4C0.c` | +| 21 | func_80156670 | WAVE | 134 | 83 | 11122 | 1.26 | Y | jr_8015444C | | none — MATCH (83 ins). Key: hoist `iVar1 = uVar3*4;` as its OWN statement before the if so gcc schedules `sll… | `.run/backlog_drafts/func_80156670.c` | +| 22 | func_8014CF04 | WAVE | 134 | 82 | 10988 | 1.24 | Y | after | 27 | WAVE: 27 mismatch | `.run/backlog_drafts/func_8014CF04.c` | +| 23 | func_8012E138 | WAVE | 134 | 81 | 10854 | 1.23 | Y | jr_8012ACE0 | 0 | none — MATCH (81/81 ins, match_one proxy); reloaded ptr pinned to $a0 | `.run/backlog_drafts/func_8012E138.c` | +| 24 | func_8014D2A0 | WAVE | 134 | 80 | 10720 | 1.21 | Y | after | 27 | none — MATCH (80 ins, relocation-masked); loop-guard idiom per engine_core DEFINE_func_80164ACC | `.run/backlog_drafts/func_8014D2A0.c` | +| 25 | func_8012A1BC | WAVE | 134 | 78 | 10452 | 1.18 | Y | a | 42 | 42/78 — block-copy bytes correct (char[8] => lwl/lwr/swl/swr); residual is gcc's load-hoist split. Target hoi… | `.run/backlog_drafts/func_8012A1BC.c` | +| 26 | func_80137178 | WAVE | 134 | 78 | 10452 | 1.18 | Y | jr_8012ACE0 | 15 | reg values all correct; prologue independent-addiu order + lazy sw placement differ | `.run/backlog_drafts/func_80137178.c` | +| 27 | func_8016163C | WAVE | 134 | 78 | 10452 | 1.18 | Y | jr_8015AE2C | 50 | none — MATCH (78 ins). First arm calls func_801599A4 with NO arg (asm nop delay slot) via fn-ptr cast ((void(… | `.run/backlog_drafts/func_8016163C.c` | +| 28 | func_80163534 | WAVE | 134 | 76 | 10184 | 1.15 | Y | jr_8015AE2C | | mismatch=13, a single 1-position scheduling tie. Instrs 1-30 byte-perfect; all registers correct | `.run/backlog_drafts/func_80163534.c` | +| 29 | func_8014D610 | WAVE | 134 | 74 | 9916 | 1.12 | Y | after | 60 | WAVE: 60 mismatch | `.run/backlog_drafts/func_8014D610.c` | +| 30 | func_8012E014 | WAVE | 134 | 73 | 9782 | 1.11 | Y | jr_8012ACE0 | 0 | none — MATCH (expected; straightforward struct-field + global-copy body) | `.run/backlog_drafts/func_8012E014.c` | +| 31 | func_80164418 | WAVE | 134 | 70 | 9380 | 1.06 | Y | jr_8015AE2C | 0 | none — MATCH (s16 stack array forces the spill; 2nd ratan2 reuses /dy/ in $a1) | `.run/backlog_drafts/func_80164418.c` | +| 32 | func_80161774 | WAVE | 134 | 69 | 9246 | 1.05 | Y | jr_8015AE2C | 53 | none — MATCH (69 ins, match_one verified; clean nested-if; param_1 -> $s0 call-crossing) | `.run/backlog_drafts/func_80161774.c` | +| 33 | func_80175308 | WAVE | 134 | 67 | 8978 | 1.02 | Y | jr_801734BC | 41 | WAVE: 41 mismatch | `.run/backlog_drafts/func_80175308.c` | +| 34 | func_801775E0 | WAVE | 134 | 67 | 8978 | 1.02 | Y | jr_801734BC | 1 | 1 ins — target `sb $v0,0x6($s0)` vs mine `sb $v0,26($s1)` (same store P1+0x1a; gcc address-CSE picks $s1 base… | `.run/backlog_drafts/func_801775E0.c` | +| 35 | func_80130C08 | WAVE | 134 | 65 | 8710 | 0.99 | Y | jr_8012ACE0 | 5 | tail shares one jal func_80131CA8 between the a1=5 and a1=0x38 arms via `j .L80130CEC` with a DUPLICATED `mov… | `.run/backlog_drafts/func_80130C08.c` | +| 36 | func_80133298 | WAVE | 134 | 65 | 8710 | 0.99 | Y | jr_8012ACE0 | 0 | none — MATCH (65 ins, relocation-masked) | `.run/backlog_drafts/func_80133298.c` | +| 37 | func_80140D68 | WAVE | 134 | 65 | 8710 | 0.99 | Y | main | 5 | 5-ins near-miss — gcc hoists `lui 0xff00` (the 0xFF000000 mask) one slot too early in the first AddPrim block… | `.run/backlog_drafts/func_80140D68.c` | +| 38 | func_8014A738 | WAVE | 134 | 62 | 8308 | 0.94 | Y | after | 46 | WAVE: 46 mismatch | `.run/backlog_drafts/func_8014A738.c` | +| 39 | func_80136F3C | WAVE | 134 | 61 | 8174 | 0.92 | Y | jr_8012ACE0 | 10 | 10/61 — regalloc EXACT (param-copy + corner register-pins). residual = gcc list-scheduler permutation of the … | `.run/backlog_drafts/func_80136F3C.c` | +| 40 | func_8012A328 | WAVE | 134 | 60 | 8040 | 0.91 | Y | a | 0 | none — MATCH (60 ins, relocation-masked) | `.run/backlog_drafts/func_8012A328.c` | -*(+106 more WAVE fns — see `.run/worklist.json`)* +*(+91 more WAVE fns — see `.run/worklist.json`)* ### O0 — 7 fns, 0.5% of remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_8013C08C | O0 | 134 | 27 | 3618 | 0.36 | Y | o0 | | | | -| 2 | func_8013C414 | O0 | 1 | 329 | 329 | 0.03 | Y | o0 | 322 | none — MATCH (329 ins, relocation-masked) | `.run/backlog_drafts/func_8013C414.c` | +| 1 | func_8013C08C | O0 | 134 | 27 | 3618 | 0.41 | Y | o0 | 26 | WAVE: 26 mismatch | `.run/backlog_drafts/func_8013C08C.c` | +| 2 | func_8013C414 | O0 | 1 | 329 | 329 | 0.04 | Y | o0 | 322 | none — MATCH (329 ins, relocation-masked) | `.run/backlog_drafts/func_8013C414.c` | | 3 | func_8013B83C | O0 | 1 | 272 | 272 | 0.03 | Y | o0 | | | | | 4 | func_8013BD74 | O0 | 1 | 198 | 198 | 0.02 | Y | o0 | 192 | none — MATCH | `.run/backlog_drafts/func_8013BD74.c` | | 5 | func_8013C0F8 | O0 | 1 | 154 | 154 | 0.02 | Y | o0 | 153 | none — MATCH (154 ins). Levers: (1) local_c/local_10 = STRUCT pointers so field offsets FOLD into lw/lbu off(… | `.run/backlog_drafts/func_8013C0F8.c` | | 6 | func_8013B6A0 | O0 | 1 | 67 | 67 | 0.01 | Y | o0 | | | | -| 7 | func_8013B598 | O0 | 1 | 66 | 66 | 0.01 | Y | o0 | | | | +| 7 | func_8013B598 | O0 | 1 | 66 | 66 | 0.01 | Y | o0 | 66 | WAVE: 66 mismatch | `.run/backlog_drafts/func_8013B598.c` | ### O1 — 1 fns, 0.5% of remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_80161A90 | O1 | 134 | 34 | 4556 | 0.46 | Y | jr_8015AE2C | | none — MATCH (34 ins) at the overlay's STANDARD -O2 (match_one reports MATCH). NO -O1 split needed. | `.run/backlog_drafts/func_80161A90.c` | +| 1 | func_80161A90 | O1 | 134 | 34 | 4556 | 0.52 | Y | jr_8015AE2C | 26 | WAVE: 26 mismatch | `.run/backlog_drafts/func_80161A90.c` | -### STUB — 14 fns, 5.3% of remaining gain +### STUB — 8 fns, 4.3% of remaining gain | # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft | |--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------| -| 1 | func_801330E0 | STUB | 134 | 110 | 14740 | 1.48 | Y | jr_8012ACE0 | 79 | none — MATCH (110/110 words byte-identical via objcopy raw .text, reloc-masked on jal+%hi/%lo(D_800AF648)). m… | `.run/backlog_drafts/func_801330E0.c` | -| 2 | func_80158638 | STUB | 134 | 87 | 11658 | 1.17 | Y | jr_8015444C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_80158638.c` | -| 3 | func_80173BC0 | STUB | 134 | 41 | 5494 | 0.55 | Y | jr_801734BC | | none — MATCH. Keys: invert mask branch (else-block = 80174650 path so func_8013E588 | `.run/backlog_drafts/func_80173BC0.c` | -| 4 | func_8012A6D0 | STUB | 134 | 34 | 4556 | 0.46 | Y | a | 0 | none — MATCH (sum order p[2]^2 + p[0]^2, then ratan2(p1[1]-p2[1], (s16)dist)) | `.run/backlog_drafts/func_8012A6D0.c` | -| 5 | func_8012EFB8 | STUB | 134 | 32 | 4288 | 0.43 | Y | jr_8012ACE0 | 11 | none — MATCH (32 ins, byte-verified via objdump -dz; match_one's default objdump elides the 2 consecutive rtp… | `.run/backlog_drafts/func_8012EFB8.c` | -| 6 | func_8016BA68 | STUB | 134 | 29 | 3886 | 0.39 | Y | jr_8016AB6C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_8016BA68.c` | -| 7 | func_80146C3C | STUB | 134 | 23 | 3082 | 0.31 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80146C3C.c` | -| 8 | func_80162CCC | STUB | 134 | 23 | 3082 | 0.31 | Y | jr_8015AE2C | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80162CCC.c` | -| 9 | func_8014C568 | STUB | 134 | 13 | 1742 | 0.18 | Y | after | 0 | none — MATCH expected; straightforward ratan2 wrapper with two s16 deltas & 0xFFF | `.run/backlog_drafts/func_8014C568.c` | -| 10 | func_8013CB84 | STUB | 1 | 249 | 249 | 0.03 | Y | main | | | | -| 11 | func_8013D53C | STUB | 1 | 240 | 240 | 0.02 | Y | main | | | | -| 12 | func_80138C60 | STUB | 1 | 62 | 62 | 0.01 | n | jr_801380E0 | | | | -| 13 | func_8017D900 | STUB | 1 | 35 | 35 | 0.00 | Y | jr_80178D40 | 0 | none — expect MATCH (STUB: ordered global stores + single tail call, sibling of func_8017D840) | `.run/backlog_drafts/func_8017D900.c` | -| 14 | func_8017D98C | STUB | 1 | 31 | 31 | 0.00 | Y | jr_80178D40 | 0 | none — MATCH (expected): straight global stores + tail call; const 0x140 reused for two halves | `.run/backlog_drafts/func_8017D98C.c` | +| 1 | func_801330E0 | STUB | 134 | 110 | 14740 | 1.67 | Y | jr_8012ACE0 | 7 | STUB: 7 mismatch | `.run/backlog_drafts/func_801330E0.c` | +| 2 | func_80158638 | STUB | 134 | 87 | 11658 | 1.32 | Y | jr_8015444C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_80158638.c` | +| 3 | func_8012EFB8 | STUB | 134 | 32 | 4288 | 0.48 | Y | jr_8012ACE0 | 11 | none — MATCH (32 ins, byte-verified via objdump -dz; match_one's default objdump elides the 2 consecutive rtp… | `.run/backlog_drafts/func_8012EFB8.c` | +| 4 | func_8016BA68 | STUB | 134 | 29 | 3886 | 0.44 | Y | jr_8016AB6C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_8016BA68.c` | +| 5 | func_80162CCC | STUB | 134 | 23 | 3082 | 0.35 | Y | jr_8015AE2C | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80162CCC.c` | +| 6 | func_8013CB84 | STUB | 1 | 249 | 249 | 0.03 | Y | main | | | | +| 7 | func_8013D53C | STUB | 1 | 240 | 240 | 0.03 | Y | main | | | | +| 8 | func_80138C60 | STUB | 1 | 62 | 62 | 0.01 | n | jr_801380E0 | | | |