From 3995237eb050a82dba34073e9614e6baae9ec476 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Sat, 5 Sep 2026 01:03:40 -0600 Subject: [PATCH] =?UTF-8?q?feat(phase-32):=20T3=20(4)=20=E2=80=94=20main:?= =?UTF-8?q?=20func=5F80039B20=20(79=20ins)=20BANKED=20byte-identical=20143?= =?UTF-8?q?dbb89=20via=20gate=5Fmain=20=E2=80=94=20the=20S80=20permuter=20?= =?UTF-8?q?plateau=20at=207=20was=20an=20ALIAS=20FLAG,=20not=20a=20schedul?= =?UTF-8?q?er=20tie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the redundant D_80073140[i] re-read was spelled *(s32*)(base1 + i*4): a cast-wrapped PLUS is DENIED the /s (MEM_IN_STRUCT_P) grant (expr.c:4570-4576, §30a#1), so true_dependence kept the edge to the fixed-address D_800C7D20 store and pinned the re-read below it. ((s32*)base1)[i] makes the INDIRECT_REF operand a top-level PLUS_EXPR -> /s granted -> the load hoists into the D_800C7D20 load-delay slot. Zero drift, first compile. Load-bearing kept: $6/$7 pins on i/off (-23 without), the volatile launder on the D_80073140 base (-39 without). - lesson for the router: "redundant re-read scheduled at point-of-use" -> §30 first, never the permuter (it cannot reach an alias flag from C — why S80's ILS plateaued at 7 from a seed of 7). Harvest note in .run/P32/t3/. - rtu_match MATCH 79/79 (coordinator-verified); gate_main --apply: 1/1 compatible, BANKED, main byte-identical --- src/800_c.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/800_c.c b/src/800_c.c index 6852ee00e0..2159590123 100644 --- a/src/800_c.c +++ b/src/800_c.c @@ -3311,7 +3311,47 @@ void func_80039300(void) { INCLUDE_ASM("asm/nonmatchings/800_c", func_80039308); -INCLUDE_ASM("asm/nonmatchings/800_c", func_80039B20); +extern s32 D_80073140[]; +extern u8 *D_800762B0; +extern s32 D_800C7D20; +extern u8 D_800762B4[]; +extern s32 D_800A2B98; +extern u8 D_800C6DD0[]; +extern u8 D_800C6DD4[]; + +void func_80039B20(s32 *arg0, s16 arg1) { + register s32 i __asm__("$6"); + register s32 off __asm__("$7"); + u8 c; + s32 t1; + + i = 0; + t1 = (s32)arg0 + arg1 * 26; + c = *(u8 *)((*arg0)++); + off = 0; + do { + if (*(u8 *)(t1 + i + 0x23) != 0 && (*(s16 *)(D_800C6DD4 + off) == c)) { + u8 *p = D_800C6DD0 + (s16)i * 0x60; + if (p[0x5A] != 0) { + s16 f6 = *(s16 *)(p + 6); + s32 off2 = f6 * 26; + s32 base = *(s32 *)(p + 0x50); + *(u8 *)(base + off2 + (s16)i + 0x23) = 0; + p[0x5A] = 0; + } + { + s32 base1 = (s32)D_80073140; + __asm__ __volatile__("" : "=r"(base1) : "0"(base1)); + D_800C7D20 &= ~((s32 *)base1)[i]; + D_800A2B98 |= ((s32 *)base1)[i]; + } + D_800762B0[i] = 2; + D_800762B4[i] = 0; + } + i++; + off += 0x60; + } while (i < 0x10); +} void func_80039C5C(s32 *param_1) { *param_1 += 2;