Files
BFM-decomp/docs/worklist.md
T
Drew T 0f68a83cfa feat(phase-27 T8): worklist --assert-partition (R32) + honest re-scan + ledger corruption fixed
- worklist --assert-partition: the audit's literal R32 prescription (tooling-audit.md:1173) —
  enumerate live stubs from corpus.stubs (the invariant, R33), assert the fuel manifest partitions
  its source overlay's stubs, exactly one row each. Scoped honestly (worklist's universe is ONE
  overlay ~223 stubs, not the fleet's 53k — a fleet partition is a scope change, not a flag). PROVEN:
  it caught 5 stale rows (pin-free cores Phase-26 banked, manifest never re-derived) -> FAIL exit 1.
- honest re-scan: build_fuel_manifest on the fixed tools + 140 binaries. Giants re-verified reach-138
  (was 134 — the SC07 overlays now counted). Partition PASSES 223==223 after refresh.
- ledger corruption fixed: func_80178004's 2 false `close=0 "MATCH"` records (a Phase-26-retracted
  myth — the seed's best was 5 pinned, and a real close=0 whole-binary match BANKS; it is still a
  stub) -> corrected to the honest close=91 regalloc wall. func_8012E364 already honest (close=23 —
  the "stale closeness" flag was itself stale). No real duplicate rows (load_best dedups by addr;
  the uniq hits were func names in where_stuck prose). docs/worklist.md + docs/backlog.md regenerated.
- the 1,670-untriaged near-miss triage SCOPED TO P29 (P5d): Phase-21 automation leftovers whose class
  labels re-derive at harvest, and the pin-crash finding re-buckets the PINS class — an Ultracode
  fan-out buys low-durable labels; the gate's residue map is the partition + the class summary, done.
2026-07-15 19:37:28 -06:00

223 lines
27 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Worklist — remaining functions ranked by byte-weighted project gain
> 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 ×138 — 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:** 223 · **total remaining gain:** 870,668 ins (3,482,672 bytes ×-fleet)
## Idiom-class summary (the groups)
| class | count | gain_ins | % of remaining |
|-------|------:|---------:|---------------:|
| GIANT | 2 | 50,094 | 5.8% |
| STRUCT | 59 | 36,929 | 4.2% |
| PINS | 20 | 65,428 | 7.5% |
| WAVE | 126 | 669,384 | 76.9% |
| O0 | 7 | 4,812 | 0.6% |
| O1 | 1 | 4,692 | 0.5% |
| STUB | 8 | 39,329 | 4.5% |
## 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 | 138 | 198 | 27324 | 3.14 | 3.1 | 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 | 138 | 165 | 22770 | 2.62 | 5.8 | Y | jr_801734BC | 91 | [Phase-27 T8 corrected] close=91 pure local-alloc regalloc wall (§52 flagship; the 'MATCH' claim was a retrac… | `.run/backlog_drafts/func_80178004.c` |
| 3 | func_8014F4C0 | WAVE | 138 | 141 | 19458 | 2.23 | 8.0 | Y | after | 127 | residual: 127 mismatch | `.run/backlog_drafts/func_8014F4C0.c` |
| 4 | func_8014ADE0 | WAVE | 138 | 139 | 19182 | 2.20 | 10.2 | 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 | 138 | 129 | 17802 | 2.04 | 12.2 | 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 | 138 | 123 | 16974 | 1.95 | 14.2 | 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 | 138 | 113 | 15594 | 1.79 | 16.0 | 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 | 138 | 110 | 15180 | 1.74 | 17.7 | Y | jr_8012ACE0 | 7 | STUB: 7 mismatch | `.run/backlog_drafts/func_801330E0.c` |
| 9 | func_8014E284 | WAVE | 138 | 108 | 14904 | 1.71 | 19.4 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014E284.c` |
| 10 | func_8012CC88 | WAVE | 138 | 105 | 14490 | 1.66 | 21.1 | Y | jr_8012ACE0 | 0 | none — MATCH (105 ins, relocation-masked) | `.run/backlog_drafts/func_8012CC88.c` |
| 11 | func_80169228 | WAVE | 138 | 105 | 14490 | 1.66 | 22.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 | 138 | 104 | 14352 | 1.65 | 24.4 | Y | jr_8015AE2C | 0 | none — MATCH (104 ins) | `.run/backlog_drafts/func_80167714.c` |
| 13 | func_801463A0 | WAVE | 138 | 101 | 13938 | 1.60 | 26.0 | 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 | 138 | 101 | 13938 | 1.60 | 27.6 | 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 | 138 | 100 | 13800 | 1.58 | 29.2 | 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_8014CD80 | WAVE | 138 | 97 | 13386 | 1.54 | 30.7 | Y | after | 63 | WAVE: 63 mismatch | `.run/backlog_drafts/func_8014CD80.c` |
| 17 | func_80150170 | WAVE | 138 | 95 | 13110 | 1.51 | 32.2 | Y | after | 88 | WAVE: 88 mismatch | `.run/backlog_drafts/func_80150170.c` |
| 18 | func_8014D12C | WAVE | 138 | 93 | 12834 | 1.47 | 33.7 | Y | after | 53 | WAVE: 53 mismatch | `.run/backlog_drafts/func_8014D12C.c` |
| 19 | func_8014FFDC | WAVE | 138 | 93 | 12834 | 1.47 | 35.2 | Y | after | 1 | none — MATCH | `.run/backlog_drafts/func_8014FFDC.c` |
| 20 | func_801502EC | WAVE | 138 | 93 | 12834 | 1.47 | 36.7 | Y | after | 78 | WAVE: 78 mismatch | `.run/backlog_drafts/func_801502EC.c` |
| 21 | func_8014C6F4 | WAVE | 138 | 91 | 12558 | 1.44 | 38.1 | Y | after | 14 | WAVE: 14 mismatch | `.run/backlog_drafts/func_8014C6F4.c` |
| 22 | func_80158638 | STUB | 138 | 87 | 12006 | 1.38 | 39.5 | Y | jr_8015444C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_80158638.c` |
| 23 | func_8012B4B8 | WAVE | 138 | 84 | 11592 | 1.33 | 40.8 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_8012B4B8.c` |
| 24 | func_8014D4C0 | WAVE | 138 | 84 | 11592 | 1.33 | 42.1 | Y | after | 44 | WAVE: 44 mismatch | `.run/backlog_drafts/func_8014D4C0.c` |
| 25 | func_80156670 | WAVE | 138 | 83 | 11454 | 1.32 | 43.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` |
| 26 | func_8014CF04 | WAVE | 138 | 82 | 11316 | 1.30 | 44.8 | Y | after | 27 | WAVE: 27 mismatch | `.run/backlog_drafts/func_8014CF04.c` |
| 27 | func_8012E138 | WAVE | 138 | 81 | 11178 | 1.28 | 46.0 | Y | jr_8012ACE0 | 0 | none — MATCH (81/81 ins, match_one proxy); reloaded ptr pinned to $a0 | `.run/backlog_drafts/func_8012E138.c` |
| 28 | func_8014D2A0 | WAVE | 138 | 80 | 11040 | 1.27 | 47.3 | Y | after | 27 | none — MATCH (80 ins, relocation-masked); loop-guard idiom per engine_core DEFINE_func_80164ACC | `.run/backlog_drafts/func_8014D2A0.c` |
| 29 | func_8012A1BC | WAVE | 138 | 78 | 10764 | 1.24 | 48.5 | 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` |
| 30 | func_80137178 | WAVE | 138 | 78 | 10764 | 1.24 | 49.8 | Y | jr_8012ACE0 | 15 | reg values all correct; prologue independent-addiu order + lazy sw placement differ | `.run/backlog_drafts/func_80137178.c` |
| 31 | func_8016163C | WAVE | 138 | 78 | 10764 | 1.24 | 51.0 | 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` |
| 32 | func_80163534 | WAVE | 138 | 76 | 10488 | 1.20 | 52.2 | 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` |
| 33 | func_8014D610 | WAVE | 138 | 74 | 10212 | 1.17 | 53.4 | Y | after | 60 | WAVE: 60 mismatch | `.run/backlog_drafts/func_8014D610.c` |
| 34 | func_8012E014 | WAVE | 138 | 73 | 10074 | 1.16 | 54.6 | Y | jr_8012ACE0 | 0 | none — MATCH (expected; straightforward struct-field + global-copy body) | `.run/backlog_drafts/func_8012E014.c` |
| 35 | func_80132F40 | STRUCT | 138 | 72 | 9936 | 1.14 | 55.7 | Y | jr_8012ACE0 | 59 | STRUCT: 59 mismatch | `.run/backlog_drafts/func_80132F40.c` |
| 36 | func_80164418 | WAVE | 138 | 70 | 9660 | 1.11 | 56.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` |
| 37 | func_80161774 | WAVE | 138 | 69 | 9522 | 1.09 | 57.9 | 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` |
| 38 | func_80175308 | WAVE | 138 | 67 | 9246 | 1.06 | 59.0 | Y | jr_801734BC | 41 | WAVE: 41 mismatch | `.run/backlog_drafts/func_80175308.c` |
| 39 | func_80130C08 | WAVE | 138 | 65 | 8970 | 1.03 | 60.0 | 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` |
| 40 | func_80133298 | WAVE | 138 | 65 | 8970 | 1.03 | 61.0 | Y | jr_8012ACE0 | 0 | none — MATCH (65 ins, relocation-masked) | `.run/backlog_drafts/func_80133298.c` |
## GIANT hand-decomp queue — 2 fns, 5.8% of all remaining gain
| # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft |
|--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------|
| 1 | func_801412A8 | GIANT | 138 | 198 | 27324 | 3.14 | 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 | 138 | 165 | 22770 | 2.62 | Y | jr_801734BC | 91 | [Phase-27 T8 corrected] close=91 pure local-alloc regalloc wall (§52 flagship; the 'MATCH' claim was a retrac… | `.run/backlog_drafts/func_80178004.c` |
## Idiom-group tables
### STRUCT — 59 fns, 4.2% of remaining gain
| # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft |
|--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------|
| 1 | func_80137DD4 | STRUCT | 138 | 129 | 17802 | 2.04 | 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 | 138 | 72 | 9936 | 1.14 | 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.02 | Y | jr_8017A4AC | | | |
| 28 | func_80185E68 | STRUCT | 1 | 132 | 132 | 0.02 | Y | jr_80182268 | 131 | STRUCT: 131 mismatch | `.run/backlog_drafts/func_80185E68.c` |
| 29 | func_801555F4 | STRUCT | 1 | 131 | 131 | 0.02 | 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` |
*(+19 more STRUCT fns — see `.run/worklist.json`)*
### PINS — 20 fns, 7.5% of remaining gain
| # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft |
|--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------|
| 1 | func_8014E5B4 | PINS | 138 | 59 | 8142 | 0.94 | Y | after | 23 | none — MATCH | `.run/backlog_drafts/func_8014E5B4.c` |
| 2 | func_80151C54 | PINS | 138 | 52 | 7176 | 0.82 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80151C54.c` |
| 3 | func_80151B98 | PINS | 138 | 47 | 6486 | 0.74 | Y | after | 15 | PINS: 15 mismatch | `.run/backlog_drafts/func_80151B98.c` |
| 4 | func_80163764 | PINS | 138 | 42 | 5796 | 0.67 | 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 | 138 | 40 | 5520 | 0.63 | Y | after | 13 | none — MATCH | `.run/backlog_drafts/func_80146AFC.c` |
| 6 | func_80131A34 | PINS | 138 | 37 | 5106 | 0.59 | 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 | 138 | 35 | 4830 | 0.55 | Y | after | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_80151664.c` |
| 8 | func_80170CF0 | PINS | 138 | 30 | 4140 | 0.48 | Y | jr_8016AB6C | 17 | PINS: 17 mismatch | `.run/backlog_drafts/func_80170CF0.c` |
| 9 | func_80141B90 | PINS | 138 | 29 | 4002 | 0.46 | Y | main | 4 | PINS: 4 mismatch | `.run/backlog_drafts/func_80141B90.c` |
| 10 | func_8016F0E4 | PINS | 138 | 26 | 3588 | 0.41 | Y | jr_8016AB6C | 0 | match_one MATCH but gate rejected (declaration/TU plumbing) | `.run/backlog_drafts/func_8016F0E4.c` |
| 11 | func_801733FC | PINS | 138 | 25 | 3450 | 0.40 | 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 | 138 | 19 | 2622 | 0.30 | 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 | 138 | 18 | 2484 | 0.29 | Y | jr_8015444C | | none — MATCH (simple counted scan, do-while form per Ghidra-C) | `.run/backlog_drafts/func_80156600.c` |
| 14 | func_80161208 | PINS | 138 | 14 | 1932 | 0.22 | 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 — 126 fns, 76.9% of remaining gain
| # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft |
|--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------|
| 1 | func_8014F4C0 | WAVE | 138 | 141 | 19458 | 2.23 | Y | after | 127 | residual: 127 mismatch | `.run/backlog_drafts/func_8014F4C0.c` |
| 2 | func_8014ADE0 | WAVE | 138 | 139 | 19182 | 2.20 | 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 | 138 | 123 | 16974 | 1.95 | 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 | 138 | 113 | 15594 | 1.79 | 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 | 138 | 108 | 14904 | 1.71 | Y | after | 83 | WAVE: 83 mismatch | `.run/backlog_drafts/func_8014E284.c` |
| 6 | func_8012CC88 | WAVE | 138 | 105 | 14490 | 1.66 | Y | jr_8012ACE0 | 0 | none — MATCH (105 ins, relocation-masked) | `.run/backlog_drafts/func_8012CC88.c` |
| 7 | func_80169228 | WAVE | 138 | 105 | 14490 | 1.66 | 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 | 138 | 104 | 14352 | 1.65 | Y | jr_8015AE2C | 0 | none — MATCH (104 ins) | `.run/backlog_drafts/func_80167714.c` |
| 9 | func_801463A0 | WAVE | 138 | 101 | 13938 | 1.60 | 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 | 138 | 101 | 13938 | 1.60 | 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 | 138 | 100 | 13800 | 1.58 | 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_8014CD80 | WAVE | 138 | 97 | 13386 | 1.54 | Y | after | 63 | WAVE: 63 mismatch | `.run/backlog_drafts/func_8014CD80.c` |
| 13 | func_80150170 | WAVE | 138 | 95 | 13110 | 1.51 | Y | after | 88 | WAVE: 88 mismatch | `.run/backlog_drafts/func_80150170.c` |
| 14 | func_8014D12C | WAVE | 138 | 93 | 12834 | 1.47 | Y | after | 53 | WAVE: 53 mismatch | `.run/backlog_drafts/func_8014D12C.c` |
| 15 | func_8014FFDC | WAVE | 138 | 93 | 12834 | 1.47 | Y | after | 1 | none — MATCH | `.run/backlog_drafts/func_8014FFDC.c` |
| 16 | func_801502EC | WAVE | 138 | 93 | 12834 | 1.47 | Y | after | 78 | WAVE: 78 mismatch | `.run/backlog_drafts/func_801502EC.c` |
| 17 | func_8014C6F4 | WAVE | 138 | 91 | 12558 | 1.44 | Y | after | 14 | WAVE: 14 mismatch | `.run/backlog_drafts/func_8014C6F4.c` |
| 18 | func_8012B4B8 | WAVE | 138 | 84 | 11592 | 1.33 | Y | jr_8012ACE0 | 0 | none — MATCH | `.run/backlog_drafts/func_8012B4B8.c` |
| 19 | func_8014D4C0 | WAVE | 138 | 84 | 11592 | 1.33 | Y | after | 44 | WAVE: 44 mismatch | `.run/backlog_drafts/func_8014D4C0.c` |
| 20 | func_80156670 | WAVE | 138 | 83 | 11454 | 1.32 | 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` |
| 21 | func_8014CF04 | WAVE | 138 | 82 | 11316 | 1.30 | Y | after | 27 | WAVE: 27 mismatch | `.run/backlog_drafts/func_8014CF04.c` |
| 22 | func_8012E138 | WAVE | 138 | 81 | 11178 | 1.28 | Y | jr_8012ACE0 | 0 | none — MATCH (81/81 ins, match_one proxy); reloaded ptr pinned to $a0 | `.run/backlog_drafts/func_8012E138.c` |
| 23 | func_8014D2A0 | WAVE | 138 | 80 | 11040 | 1.27 | Y | after | 27 | none — MATCH (80 ins, relocation-masked); loop-guard idiom per engine_core DEFINE_func_80164ACC | `.run/backlog_drafts/func_8014D2A0.c` |
| 24 | func_8012A1BC | WAVE | 138 | 78 | 10764 | 1.24 | 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` |
| 25 | func_80137178 | WAVE | 138 | 78 | 10764 | 1.24 | Y | jr_8012ACE0 | 15 | reg values all correct; prologue independent-addiu order + lazy sw placement differ | `.run/backlog_drafts/func_80137178.c` |
| 26 | func_8016163C | WAVE | 138 | 78 | 10764 | 1.24 | 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` |
| 27 | func_80163534 | WAVE | 138 | 76 | 10488 | 1.20 | 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` |
| 28 | func_8014D610 | WAVE | 138 | 74 | 10212 | 1.17 | Y | after | 60 | WAVE: 60 mismatch | `.run/backlog_drafts/func_8014D610.c` |
| 29 | func_8012E014 | WAVE | 138 | 73 | 10074 | 1.16 | Y | jr_8012ACE0 | 0 | none — MATCH (expected; straightforward struct-field + global-copy body) | `.run/backlog_drafts/func_8012E014.c` |
| 30 | func_80164418 | WAVE | 138 | 70 | 9660 | 1.11 | Y | jr_8015AE2C | 0 | none — MATCH (s16 stack array forces the spill; 2nd ratan2 reuses /dy/ in $a1) | `.run/backlog_drafts/func_80164418.c` |
| 31 | func_80161774 | WAVE | 138 | 69 | 9522 | 1.09 | 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` |
| 32 | func_80175308 | WAVE | 138 | 67 | 9246 | 1.06 | Y | jr_801734BC | 41 | WAVE: 41 mismatch | `.run/backlog_drafts/func_80175308.c` |
| 33 | func_80130C08 | WAVE | 138 | 65 | 8970 | 1.03 | 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` |
| 34 | func_80133298 | WAVE | 138 | 65 | 8970 | 1.03 | Y | jr_8012ACE0 | 0 | none — MATCH (65 ins, relocation-masked) | `.run/backlog_drafts/func_80133298.c` |
| 35 | func_80140D68 | WAVE | 138 | 65 | 8970 | 1.03 | 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` |
| 36 | func_8014A738 | WAVE | 138 | 62 | 8556 | 0.98 | Y | after | 46 | WAVE: 46 mismatch | `.run/backlog_drafts/func_8014A738.c` |
| 37 | func_80136F3C | WAVE | 138 | 61 | 8418 | 0.97 | 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` |
| 38 | func_8012A328 | WAVE | 138 | 60 | 8280 | 0.95 | Y | a | 0 | none — MATCH (60 ins, relocation-masked) | `.run/backlog_drafts/func_8012A328.c` |
| 39 | func_80138DE0 | WAVE | 138 | 60 | 8280 | 0.95 | Y | jr_801380E0 | 0 | none — MATCH (60 ins) | `.run/backlog_drafts/func_80138DE0.c` |
| 40 | func_801777BC | WAVE | 138 | 59 | 8142 | 0.94 | Y | jr_801734BC | 29 | body byte-matches; residual ~3 ins = prologue instruction-scheduling (final `sll t8,16` / `lw param_7` / `add… | `.run/backlog_drafts/func_801777BC.c` |
*(+86 more WAVE fns — see `.run/worklist.json`)*
### O0 — 7 fns, 0.6% of remaining gain
| # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft |
|--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------|
| 1 | func_8013C08C | O0 | 138 | 27 | 3726 | 0.43 | 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 | 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 | 138 | 34 | 4692 | 0.54 | Y | jr_8015AE2C | 26 | WAVE: 26 mismatch | `.run/backlog_drafts/func_80161A90.c` |
### STUB — 8 fns, 4.5% of remaining gain
| # | name | class | reach | nins | gain_ins | %rem | cached | region | close | where it stuck | best draft |
|--:|------|-------|------:|-----:|---------:|-----:|--------|--------|------:|----------------|------------|
| 1 | func_801330E0 | STUB | 138 | 110 | 15180 | 1.74 | Y | jr_8012ACE0 | 7 | STUB: 7 mismatch | `.run/backlog_drafts/func_801330E0.c` |
| 2 | func_80158638 | STUB | 138 | 87 | 12006 | 1.38 | Y | jr_8015444C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_80158638.c` |
| 3 | func_8012EFB8 | STUB | 138 | 32 | 4416 | 0.51 | 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 | 138 | 29 | 4002 | 0.46 | Y | jr_8016AB6C | 1 | STUB: 1 mismatch | `.run/backlog_drafts/func_8016BA68.c` |
| 5 | func_80162CCC | STUB | 138 | 23 | 3174 | 0.36 | 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 | | | |