phase-36: T7 burst — five more banks (631 bodies) and two concurrency defects the agents found

Banked: func_80136334 (126, all four levers), func_8016B234 (129), func_8015FBE0 (125), func_80143D28 (131),
func_8014D820 (126 of 128). 27,984 -> 26,714 sites.
  lever_census --check: 26,714 pin/asm sites, 26,714 marked !FAKE, 0 UNMARKED — OK

THE MISSING CALL ARGUMENT CLASS IS NOW CONFIRMED SIX TIMES, independently, by six agents that never saw each other's
work: a7, a8, a11, a12, a13, a25. In every case the source declares a call with fewer arguments than the callee really
takes — m2c drops arguments at unprototyped and indirect call sites — and the register pin was hired to fake the
instruction the missing argument would have produced. Mechanisms differ and were each proven on bytes: combine.c:1458's
added_sets_2 gate; set_preference (global.c:1535/1589) applied ahead of first-fit at :997-1030, the argument copy
degenerating to a self-move deleted at toplev.c:3142 / jump.c:424-443 so it costs zero instructions; and reorg.c:3374's
liveness half, where restoring the argument adds a use to CALL_INSN_FUNCTION_USAGE (reorg.c:428) so a delay-slot steal
is refused. No generator can reach any of it: every family rewrites statements and declarations, none edits a call's
argument list.

Two concurrency defects, both found by agents rather than by me:
- the includers cache wrote through a FIXED temp name, so concurrent processes clobbered each other's os.replace and the
  loser saw FileNotFoundError, which reads like a compiler crash on the candidate. Now a unique tempfile per process.
- the agent brief now mandates PACK/scratch/ for helper scripts and dumps, and says to retry once when a --try failure
  names something that is not your own text. Three agents had scripts overwritten mid-run by another agent.

One valuable negative: func_80178970 does not close, and the agent proved why by construction rather than by exhaustion
— only a call or a return writes $v0 in plain C, and a return's hard write is always emitted after its guarding branch,
so combine deletes the call-result copy (combine.c:914-917, use_crosses_set_p at :10127-10130; the SMALL_REGISTER_CLASSES
arm at :944-957 is not defined for MIPS). Its early-return rewrite still improves the source from 6 to 2 and reads
better than the pinned original.
This commit is contained in:
Drew T
2026-09-10 10:46:06 -06:00
parent c6b380fcd0
commit 3464a25cd0
645 changed files with 3714 additions and 3686 deletions
+9 -11
View File
@@ -3,11 +3,11 @@
s32 func_80136334(void *arg0, s32 arg1, s32 arg2) {
extern u8 D_801152A8[];
extern s16 D_801152AA;
extern s16 D_801152AC;
extern s16 D_801152AC[];
extern s16 D_80126722;
extern s16 D_80126724;
s32 a1v;
register s32 a2v __asm__("$12"); // !FAKE: pin $12 — NEEDED DIFFERS (P36 rung A headers2)
u16 a1v;
s16 a2v;
s32 n;
s16 *b4;
s32 d;
@@ -16,16 +16,16 @@ s32 func_80136334(void *arg0, s32 arg1, s32 arg2) {
s32 result;
s32 frame_pad[2];
(void)&frame_pad;
__asm__("" : "=r"(a1v) : "0"(arg1)); // !FAKE: launder — NEEDED DIFFERS (P36 rung A headers2)
a1v = arg1;
a2v = arg2;
if (!(arg1 & 1)) {
dx = (s16) arg2 - (*(s16 **)&D_8017F054)[2];
if (!(a1v & 1)) {
dx = a2v - (*(s16 **)&D_8017F054)[2];
d = dx;
denom = -(*(s16 **)&D_8017F060)[2];
} else {
denom = (*(s16 **)&D_8017F060)[2];
d = (*(s16 **)&D_8017F054)[2] - (s16) arg2;
d = (*(s16 **)&D_8017F054)[2] - a2v;
dx = -d;
}
n = -d;
@@ -51,13 +51,11 @@ s32 func_80136334(void *arg0, s32 arg1, s32 arg2) {
(*(s16 *)D_801152A8) = 0;
if (a1v & 1) {
D_8017F05C[2] = a2v + 2;
__asm__ __volatile__(""); // !FAKE: barrier — NEEDED DIFFERS (P36 rung A headers2)
D_801152AC = 0xFFF;
D_801152AC[0] = 0xFFF;
} else {
D_801152AC = -0xFFF;
D_801152AC[0] = -0xFFF;
D_8017F05C[2] = a2v - 2;
}
__asm__ __volatile__("" :: "r"(a1v), "r"(a2v)); // !FAKE: keepalive — NEEDED DIFFERS (P36 rung A headers2)
(*(s16 *)D_80126720) = (M2C_FIELD(arg0, s16 *, 4) + M2C_FIELD(arg0, s16 *, 6)) >> 1;
D_80126722 = (M2C_FIELD(arg0, s16 *, 8) + M2C_FIELD(arg0, s16 *, 0xA)) >> 1;
result = 1;
+9 -11
View File
@@ -3,11 +3,11 @@
s32 func_80136334(void *arg0, s32 arg1, s32 arg2) {
extern u8 D_801152A8[];
extern s16 D_801152AA;
extern s16 D_801152AC;
extern s16 D_801152AC[];
extern s16 D_80126722;
extern s16 D_80126724;
s32 a1v;
register s32 a2v __asm__("$12"); // !FAKE: pin $12 — NEEDED DIFFERS (P36 rung A headers1)
u16 a1v;
s16 a2v;
s32 n;
s16 *b4;
s32 d;
@@ -16,16 +16,16 @@ s32 func_80136334(void *arg0, s32 arg1, s32 arg2) {
s32 result;
s32 frame_pad[2];
(void)&frame_pad;
__asm__("" : "=r"(a1v) : "0"(arg1)); // !FAKE: launder — NEEDED DIFFERS (P36 rung A headers1)
a1v = arg1;
a2v = arg2;
if (!(arg1 & 1)) {
dx = (s16) arg2 - (*(s16 **)&D_8017F808)[2];
if (!(a1v & 1)) {
dx = a2v - (*(s16 **)&D_8017F808)[2];
d = dx;
denom = -(*(s16 **)&D_8017F814)[2];
} else {
denom = (*(s16 **)&D_8017F814)[2];
d = (*(s16 **)&D_8017F808)[2] - (s16) arg2;
d = (*(s16 **)&D_8017F808)[2] - a2v;
dx = -d;
}
n = -d;
@@ -51,13 +51,11 @@ s32 func_80136334(void *arg0, s32 arg1, s32 arg2) {
(*(s16 *)D_801152A8) = 0;
if (a1v & 1) {
D_8017F810[2] = a2v + 2;
__asm__ __volatile__(""); // !FAKE: barrier — NEEDED DIFFERS (P36 rung A headers1)
D_801152AC = 0xFFF;
D_801152AC[0] = 0xFFF;
} else {
D_801152AC = -0xFFF;
D_801152AC[0] = -0xFFF;
D_8017F810[2] = a2v - 2;
}
__asm__ __volatile__("" :: "r"(a1v), "r"(a2v)); // !FAKE: keepalive — NEEDED DIFFERS (P36 rung A headers1)
(*(s16 *)D_80126720) = (M2C_FIELD(arg0, s16 *, 4) + M2C_FIELD(arg0, s16 *, 6)) >> 1;
D_80126722 = (M2C_FIELD(arg0, s16 *, 8) + M2C_FIELD(arg0, s16 *, 0xA)) >> 1;
result = 1;
+3 -2
View File
@@ -3,13 +3,14 @@
void func_80143D28(s32 param_1) {
extern MatEntry D_80180420[];
register s32 iVar3 __asm__("$18") = *(s32 *)(param_1 + 0x20); /* $s2 */ // !FAKE: pin $18 — NEEDED DIFFERS (P36 rung A headers2)
s32 iVar2 = *(s32 *)(param_1 + 0x64); /* $s1 */
MatEntry *p = &D_80180420[*(s16 *)(param_1 + 0x70)];
u16 uVar5 = p->f8;
s32 iVar3 = *(s32 *)(param_1 + 0x20);
s32 sVar4;
s32 iVar1;
*(s16 *)(iVar3 + 0x14) = p->f8;
*(s16 *)(iVar3 + 0x14) = uVar5;
*(u16 *)(iVar3 + 0x12) = *(u16 *)(iVar3 + 0x12) + p->fa;
sVar4 = 0x1000;
((void (*)(void *, void *, void *))ApplyMatrixSV)((void *)(*(s32 *)(param_1 + 0x20) + 0x34), p, (void *)(param_1 + 0x50));
+3 -2
View File
@@ -3,13 +3,14 @@
void func_80143D28(s32 param_1) {
extern MatEntry D_80180BD4[];
register s32 iVar3 __asm__("$18") = *(s32 *)(param_1 + 0x20); /* $s2 */ // !FAKE: pin $18 — NEEDED DIFFERS (P36 rung A headers2)
s32 iVar2 = *(s32 *)(param_1 + 0x64); /* $s1 */
MatEntry *p = &D_80180BD4[*(s16 *)(param_1 + 0x70)];
u16 uVar5 = p->f8;
s32 iVar3 = *(s32 *)(param_1 + 0x20);
s32 sVar4;
s32 iVar1;
*(s16 *)(iVar3 + 0x14) = p->f8;
*(s16 *)(iVar3 + 0x14) = uVar5;
*(u16 *)(iVar3 + 0x12) = *(u16 *)(iVar3 + 0x12) + p->fa;
sVar4 = 0x1000;
((void (*)(void *, void *, void *))ApplyMatrixSV)((void *)(*(s32 *)(param_1 + 0x20) + 0x34), p, (void *)(param_1 + 0x50));
+2 -4
View File
@@ -1,6 +1,6 @@
/* func_8014D820 — shared body (overlay slot 0x80128158, h_exact 9ab0f3b9). ONE source: instantiated by #include at each
* member's site in address order; the members are recorded in config/dedup.us.yaml (Phase 35). */
s32 func_8014D820(s32 a0, u16 *a1, u16 *a2x)
s32 func_8014D820(s32 a0, u16 *a1, u16 *a2)
{
extern u8 D_801202A0[];
@@ -36,7 +36,6 @@ s32 func_8014D820(s32 a0, u16 *a1, u16 *a2x)
} Ent;
int new_var2;
s16 new_var3;
register u16 *a2 __asm__("$7"); // !FAKE: pin $7 — NEEDED DIFFERS (P36 rung A headers2)
V4 out[3];
V4 pos;
Desc desc;
@@ -60,7 +59,6 @@ register u16 *a2 __asm__("$7"); // !FAKE: pin $7 — NEEDED DIFFERS (P36 rung A
s32 t;
s32 u;
s32 a0v;
__asm__ __volatile__("" : "=r"(a2) : "0"(a2x)); // !FAKE: launder — NEEDED DIFFERS (P36 rung A headers2)
t = a2[0];
u = a1[0];
dx = t - u;
@@ -89,7 +87,7 @@ a0v = a0;
{
goto fail;
}
if (((s32 (*)(s32, s32, s32)) func_80135A4C)(ent->f20, ent->f58, (s32) a1) == 0)
if (func_80135A4C(ent->f20, ent->f58, (s32 *) a1, (s32) a2) == 0)
{
goto fail;
}
+2 -4
View File
@@ -1,6 +1,6 @@
/* func_8014D820 — shared body (overlay slot 0x80128158, h_exact ce76d008). ONE source: instantiated by #include at each
* member's site in address order; the members are recorded in config/dedup.us.yaml (Phase 35). */
s32 func_8014D820(s32 a0, u16 *a1, u16 *a2x)
s32 func_8014D820(s32 a0, u16 *a1, u16 *a2)
{
extern u8 D_801202A0[];
@@ -36,7 +36,6 @@ s32 func_8014D820(s32 a0, u16 *a1, u16 *a2x)
} Ent;
int new_var2;
s16 new_var3;
register u16 *a2 __asm__("$7"); // !FAKE: pin $7 — NEEDED DIFFERS (P36 rung A headers2)
V4 out[3];
V4 pos;
Desc desc;
@@ -60,7 +59,6 @@ register u16 *a2 __asm__("$7"); // !FAKE: pin $7 — NEEDED DIFFERS (P36 rung A
s32 t;
s32 u;
s32 a0v;
__asm__ __volatile__("" : "=r"(a2) : "0"(a2x)); // !FAKE: launder — NEEDED DIFFERS (P36 rung A headers2)
t = a2[0];
u = a1[0];
dx = t - u;
@@ -89,7 +87,7 @@ a0v = a0;
{
goto fail;
}
if (((s32 (*)(s32, s32, s32)) func_80135A4C)(ent->f20, ent->f58, (s32) a1) == 0)
if (func_80135A4C(ent->f20, ent->f58, (s32 *) a1, (s32) a2) == 0)
{
goto fail;
}
+1 -2
View File
@@ -5,11 +5,10 @@ void func_8015FBE0(s32 *param_1)
extern u8 D_800B9A17;
if (param_1[0x61] < 0) {
((void (**)())D_80181160)[*(u16 *)param_1]();
((void (**)(s32 *))D_80181160)[*(u16 *)param_1](param_1);
((void (*)(s32 *, s16))func_80147078)(param_1, 0);
((void (*)(s32 *))func_80159B70)(param_1);
} else {
__asm__ __volatile__(""); // !FAKE: barrier — NEEDED DIFFERS (P36 rung B headers2)
D_80078EC1 = 0;
((void (*)(s32 *, s32))func_80154150)(param_1, 0x20);
((void (*)(s32 *, s32))func_80154A74)(param_1, 0x18);
+1 -2
View File
@@ -5,11 +5,10 @@ void func_8015FBE0(s32 *param_1)
extern u8 D_800B9A17;
if (param_1[0x61] < 0) {
((void (**)())D_80181914)[*(u16 *)param_1]();
((void (**)(s32 *))D_80181914)[*(u16 *)param_1](param_1);
((void (*)(s32 *, s16))func_80147078)(param_1, 0);
((void (*)(s32 *))func_80159B70)(param_1);
} else {
__asm__ __volatile__(""); // !FAKE: barrier — NEEDED DIFFERS (P36 rung B headers2)
D_80078EC1 = 0;
((void (*)(s32 *, s32))func_80154150)(param_1, 0x20);
((void (*)(s32 *, s32))func_80154A74)(param_1, 0x18);
+7 -8
View File
@@ -8,12 +8,12 @@ void func_8016B234(s32 param_1) {
Prim_B234 prim;
struct { s16 xy[2]; s32 sp1c; s32 flag; } out;
void *dp;
u32 uVar1;
u32 uVar1; /* the projected screen Y, then the UV column index */
s16 iVar2;
s32 X, Y0, Y1, base, ni;
register s32 sy __asm__("$16"); // !FAKE: pin $16 — NEEDED DIFFERS (P36 rung A headers2)
s16 xtmp;
register s32 sxy __asm__("$3"); // !FAKE: pin $3 — NEEDED DIFFERS (P36 rung A headers2)
s32 sxy;
s32 hh;
dp = &D_800AF648;
func_8004914C(dp);
@@ -26,16 +26,15 @@ void func_8016B234(s32 param_1) {
sxy = *(s32 *)out.xy;
prim.a04 = 0x10;
X = *(u16 *)(param_1 + 0x2a) + sxy;
sy = (u16)out.xy[1];
uVar1 = (u16)out.xy[1];
prim.ax = prim.cx = X;
prim.bx = prim.dx = X + 8;
Y0 = sy - *(u16 *)(param_1 + 0x26);
Y0 = uVar1 - *(u16 *)(param_1 + 0x26);
prim.ay = prim.by = Y0;
sxy = *(u16 *)(param_1 + 0x26);
hh = *(u16 *)(param_1 + 0x26);
prim.v0 = prim.v1 = 0x1d0;
prim.v2 = prim.v3 = 0x1d8;
sxy = sy + sxy;
prim.cy = prim.dy = sxy;
prim.cy = prim.dy = uVar1 + hh;
prim.r = prim.g = prim.b = *(u8 *)(param_1 + 0x24);
prim.code = (&D_80181C28)[*(s32 *)(param_1 + 0x2c)];
if (*(s16 *)(param_1 + 0x26) < 5) {
+7 -8
View File
@@ -8,12 +8,12 @@ void func_8016B234(s32 param_1) {
Prim_B234 prim;
struct { s16 xy[2]; s32 sp1c; s32 flag; } out;
void *dp;
u32 uVar1;
u32 uVar1; /* the projected screen Y, then the UV column index */
s16 iVar2;
s32 X, Y0, Y1, base, ni;
register s32 sy __asm__("$16"); // !FAKE: pin $16 — NEEDED DIFFERS (P36 rung A headers2)
s16 xtmp;
register s32 sxy __asm__("$3"); // !FAKE: pin $3 — NEEDED DIFFERS (P36 rung A headers2)
s32 sxy;
s32 hh;
dp = &D_800AF648;
func_8004914C(dp);
@@ -26,16 +26,15 @@ void func_8016B234(s32 param_1) {
sxy = *(s32 *)out.xy;
prim.a04 = 0x10;
X = *(u16 *)(param_1 + 0x2a) + sxy;
sy = (u16)out.xy[1];
uVar1 = (u16)out.xy[1];
prim.ax = prim.cx = X;
prim.bx = prim.dx = X + 8;
Y0 = sy - *(u16 *)(param_1 + 0x26);
Y0 = uVar1 - *(u16 *)(param_1 + 0x26);
prim.ay = prim.by = Y0;
sxy = *(u16 *)(param_1 + 0x26);
hh = *(u16 *)(param_1 + 0x26);
prim.v0 = prim.v1 = 0x1d0;
prim.v2 = prim.v3 = 0x1d8;
sxy = sy + sxy;
prim.cy = prim.dy = sxy;
prim.cy = prim.dy = uVar1 + hh;
prim.r = prim.g = prim.b = *(u8 *)(param_1 + 0x24);
prim.code = (&D_801823DC)[*(s32 *)(param_1 + 0x2c)];
if (*(s16 *)(param_1 + 0x26) < 5) {