feat(phase-30 S48-T6): propagate func_801850F4 to its zero-crack siblings

This commit is contained in:
Drew T
2026-08-11 20:59:56 -06:00
parent 124d5198ef
commit 116cf96877
5 changed files with 412 additions and 9 deletions
+80 -1
View File
@@ -3968,7 +3968,86 @@ void func_8017EDE4(s32 p)
}
INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020_jr_8017C24C", func_8017F264);
/* Host TU: src/ov_SC06_018/ov_SC06_018_jr_8017C24C.c
* Insertion point replaces the INCLUDE_ASM at line 6996, in scope after the
* decl block that begins at line 6786 (#include "common.h"). That block
* ALREADY declares (in scope, do not redeclare):
* extern s32 func_8012BEE8(); (line 6789)
* extern void func_8012A828(s32 a0, void *a1); (line 6790)
* extern u8 D_801B6098[]; (line 6803)
* and elsewhere earlier in the SAME TU (still in scope, file-scope extern):
* extern void func_80013350(s32 a0, void *a1); (line 6647)
* -- loose prototype (real callee takes/returns s32,s32->s32); per
* cookbook §161c do NOT add a conflicting extern here, cast at the
* call site instead (matches the TU's own sibling func_8018457C).
* New decls needed for this function (not yet declared in this TU's scope
* at the insertion point):
* func_8012B6D4, func_8012B608, func_8012B178, func_801817CC,
* func_8012C218, func_8001C924, D_801B6918[], D_801A58C0[]
* (func_8012B6D4/B608/B178/8765C signatures copied verbatim from this TU's
* other declarations of the same symbols, e.g. lines 6643-6646/7043-7045;
* func_8012C218/func_8001C924 copied from lines 6639-6640.)
*/
extern s32 func_8012BEE8();
extern void func_8012A828(s32 a0, void *a1);
extern void func_80013350(s32 a0, void *a1); /* loose proto, real TU decl (line 6647); cast at call site per §161c */
extern s32 func_8012B6D4(s16 *a0, s16 *a1);
extern s32 func_8012B608(s32 a0, s32 a1, s32 a2);
extern void func_8012B178(s32 a0, s32 a1);
extern s32 func_801817CC(s32 a0);
extern void func_8012C218(void *a0);
extern void func_8001C924(s32 a0, void *a1);
void func_8017F264(s32 p)
{
extern u8 D_801B6918[];
extern u8 D_801B6098[];
extern u8 D_801A58C0[];
s32 s1;
s32 r;
if (*(u16 *)(p + 0x34) == 0) {
s1 = *(s32 *)(p + 0xCC);
if (s1 == 0 || *(s16 *)(s1 + 0x36) != *(s16 *)(p + 0xEC) ||
func_8012BEE8(p) != 0) {
*(u16 *)(p + 2) = 0x23;
*(u32 *)(p + 0xE0) |= 0x800;
return;
}
r = func_8012B6D4((s16 *)(p + 4), (s16 *)(s1 + 4));
*(s32 *)(p + 0xE8) = r;
r = func_8012B608(*(s16 *)(*(s32 *)(p + 0x20) + 0x12), *(s32 *)(p + 0xE8), 8);
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) =
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) + r;
func_8012B178(p, 0xFFF8D000);
func_801817CC(p);
r = ((s32 (*)(s32, s32))func_80013350)(p + 4, s1 + 4);
if (r < 0x900) {
*(u16 *)(p + 0x34) = *(u16 *)(p + 0x34) + 1;
func_8012A828(p, D_801B6918);
}
} else {
if (*(s16 *)(p + 0x98) != 0) {
return;
}
func_8012C218((void *)*(s32 *)(p + 0xCC));
*(s32 *)(p + 0xCC) = 0;
func_8001C924(*(s32 *)(p + 0x20), D_801A58C0);
func_8012A828(p, D_801B6098);
*(s32 *)(p + 0x48) = 0x4650;
*(s16 *)(p + 2) = 0x12;
*(u32 *)(p + 0xE0) &= ~4;
}
}
/* func_8017F3D8 — randomised state entry (state word 0x19):
+84 -3
View File
@@ -2742,7 +2742,6 @@ extern void func_80182610(s32 p);
extern s32 func_8012BDBC(s32 a0, s32 a1);
extern void func_80142414(s32 a0, s16 a1);
extern void func_801828D8(s32 p);
extern u8 D_801D47C0[];
extern void func_80182998(s32 param_1);
/* ==== end §8b carried decl layer ==== */
@@ -2762,11 +2761,14 @@ extern u8 D_801BCEB4[];
extern u8 D_801BD0CC[];
extern u8 D_801D4488[];
extern u8 D_801D44F0[];
extern u8 D_801D47C0[];
extern u8 D_801D4878[];
void func_80182D08(s32 p)
{
/* [T51] scoped in from file scope: a file-scope decl of these symbols constrains every
LATER function in this TU, which blocks a byte-true decl of a different type.
Declaration-only move (cookbook §103); the whole-binary byte-gate is the arbiter. */
extern u8 D_801D47C0[];
s16 v18[4]; /* sp+0x18 */
s32 mat[8]; /* sp+0x20 - MATRIX: 3x3 s16 + pad, 3 s32 at +0x14 */
s32 s0;
@@ -2954,7 +2956,86 @@ void func_80182D08(s32 p)
}
}
INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022_jr_80182D08", func_80183188);
/* Host TU: src/ov_SC06_018/ov_SC06_018_jr_8017C24C.c
* Insertion point replaces the INCLUDE_ASM at line 6996, in scope after the
* decl block that begins at line 6786 (#include "common.h"). That block
* ALREADY declares (in scope, do not redeclare):
* extern s32 func_8012BEE8(); (line 6789)
* extern void func_8012A828(s32 a0, void *a1); (line 6790)
* extern u8 D_801D47C0[]; (line 6803)
* and elsewhere earlier in the SAME TU (still in scope, file-scope extern):
* extern void func_80013350(s32 a0, void *a1); (line 6647)
* -- loose prototype (real callee takes/returns s32,s32->s32); per
* cookbook §161c do NOT add a conflicting extern here, cast at the
* call site instead (matches the TU's own sibling func_8018457C).
* New decls needed for this function (not yet declared in this TU's scope
* at the insertion point):
* func_8012B6D4, func_8012B608, func_8012B178, func_801856F0,
* func_8012C218, func_8001C924, D_801D5040[], D_801C3FE8[]
* (func_8012B6D4/B608/B178/8765C signatures copied verbatim from this TU's
* other declarations of the same symbols, e.g. lines 6643-6646/7043-7045;
* func_8012C218/func_8001C924 copied from lines 6639-6640.)
*/
extern s32 func_8012BEE8();
extern void func_8012A828(s32 a0, void *a1);
extern void func_80013350(s32 a0, void *a1); /* loose proto, real TU decl (line 6647); cast at call site per §161c */
extern s32 func_8012B6D4(s16 *a0, s16 *a1);
extern s32 func_8012B608(s32 a0, s32 a1, s32 a2);
extern void func_8012B178(s32 a0, s32 a1);
extern s32 func_801856F0(s32 a0);
extern void func_8012C218(void *a0);
extern void func_8001C924(s32 a0, void *a1);
void func_80183188(s32 p)
{
extern u8 D_801D5040[];
extern u8 D_801D47C0[];
extern u8 D_801C3FE8[];
s32 s1;
s32 r;
if (*(u16 *)(p + 0x34) == 0) {
s1 = *(s32 *)(p + 0xCC);
if (s1 == 0 || *(s16 *)(s1 + 0x36) != *(s16 *)(p + 0xEC) ||
func_8012BEE8(p) != 0) {
*(u16 *)(p + 2) = 0x23;
*(u32 *)(p + 0xE0) |= 0x800;
return;
}
r = func_8012B6D4((s16 *)(p + 4), (s16 *)(s1 + 4));
*(s32 *)(p + 0xE8) = r;
r = func_8012B608(*(s16 *)(*(s32 *)(p + 0x20) + 0x12), *(s32 *)(p + 0xE8), 8);
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) =
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) + r;
func_8012B178(p, 0xFFF8D000);
func_801856F0(p);
r = ((s32 (*)(s32, s32))func_80013350)(p + 4, s1 + 4);
if (r < 0x900) {
*(u16 *)(p + 0x34) = *(u16 *)(p + 0x34) + 1;
func_8012A828(p, D_801D5040);
}
} else {
if (*(s16 *)(p + 0x98) != 0) {
return;
}
func_8012C218((void *)*(s32 *)(p + 0xCC));
*(s32 *)(p + 0xCC) = 0;
func_8001C924(*(s32 *)(p + 0x20), D_801C3FE8);
func_8012A828(p, D_801D47C0);
*(s32 *)(p + 0x48) = 0x4650;
*(s16 *)(p + 2) = 0x12;
*(u32 *)(p + 0xE0) &= ~4;
}
}
/* func_801832FC — randomised state entry (state word 0x19):
+84 -2
View File
@@ -2801,11 +2801,14 @@ extern u8 D_801BBFF8[];
extern u8 D_801BC210[];
extern u8 D_801D35CC[];
extern u8 D_801D3634[];
extern u8 D_801D3904[];
extern u8 D_801D39BC[];
void func_801851E0(s32 p)
{
/* [T51] scoped in from file scope: a file-scope decl of these symbols constrains every
LATER function in this TU, which blocks a byte-true decl of a different type.
Declaration-only move (cookbook §103); the whole-binary byte-gate is the arbiter. */
extern u8 D_801D3904[];
s16 v18[4]; /* sp+0x18 */
s32 mat[8]; /* sp+0x20 - MATRIX: 3x3 s16 + pad, 3 s32 at +0x14 */
s32 s0;
@@ -2993,7 +2996,86 @@ void func_801851E0(s32 p)
}
}
INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024_jr_801851E0", func_80185660);
/* Host TU: src/ov_SC06_018/ov_SC06_018_jr_8017C24C.c
* Insertion point replaces the INCLUDE_ASM at line 6996, in scope after the
* decl block that begins at line 6786 (#include "common.h"). That block
* ALREADY declares (in scope, do not redeclare):
* extern s32 func_8012BEE8(); (line 6789)
* extern void func_8012A828(s32 a0, void *a1); (line 6790)
* extern u8 D_801D3904[]; (line 6803)
* and elsewhere earlier in the SAME TU (still in scope, file-scope extern):
* extern void func_80013350(s32 a0, void *a1); (line 6647)
* -- loose prototype (real callee takes/returns s32,s32->s32); per
* cookbook §161c do NOT add a conflicting extern here, cast at the
* call site instead (matches the TU's own sibling func_8018457C).
* New decls needed for this function (not yet declared in this TU's scope
* at the insertion point):
* func_8012B6D4, func_8012B608, func_8012B178, func_80187BC8,
* func_8012C218, func_8001C924, D_801D4184[], D_801C312C[]
* (func_8012B6D4/B608/B178/8765C signatures copied verbatim from this TU's
* other declarations of the same symbols, e.g. lines 6643-6646/7043-7045;
* func_8012C218/func_8001C924 copied from lines 6639-6640.)
*/
extern s32 func_8012BEE8();
extern void func_8012A828(s32 a0, void *a1);
extern void func_80013350(s32 a0, void *a1); /* loose proto, real TU decl (line 6647); cast at call site per §161c */
extern s32 func_8012B6D4(s16 *a0, s16 *a1);
extern s32 func_8012B608(s32 a0, s32 a1, s32 a2);
extern void func_8012B178(s32 a0, s32 a1);
extern s32 func_80187BC8(s32 a0);
extern void func_8012C218(s32);
extern void func_8001C924(s32 a0, void *a1);
void func_80185660(s32 p)
{
extern u8 D_801D4184[];
extern u8 D_801D3904[];
extern u8 D_801C312C[];
s32 s1;
s32 r;
if (*(u16 *)(p + 0x34) == 0) {
s1 = *(s32 *)(p + 0xCC);
if (s1 == 0 || *(s16 *)(s1 + 0x36) != *(s16 *)(p + 0xEC) ||
func_8012BEE8(p) != 0) {
*(u16 *)(p + 2) = 0x23;
*(u32 *)(p + 0xE0) |= 0x800;
return;
}
r = func_8012B6D4((s16 *)(p + 4), (s16 *)(s1 + 4));
*(s32 *)(p + 0xE8) = r;
r = func_8012B608(*(s16 *)(*(s32 *)(p + 0x20) + 0x12), *(s32 *)(p + 0xE8), 8);
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) =
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) + r;
func_8012B178(p, 0xFFF8D000);
func_80187BC8(p);
r = ((s32 (*)(s32, s32))func_80013350)(p + 4, s1 + 4);
if (r < 0x900) {
*(u16 *)(p + 0x34) = *(u16 *)(p + 0x34) + 1;
func_8012A828(p, D_801D4184);
}
} else {
if (*(s16 *)(p + 0x98) != 0) {
return;
}
((void (*)(void *))func_8012C218)((void *)*(s32 *)(p + 0xCC));
*(s32 *)(p + 0xCC) = 0;
func_8001C924(*(s32 *)(p + 0x20), D_801C312C);
func_8012A828(p, D_801D3904);
*(s32 *)(p + 0x48) = 0x4650;
*(s16 *)(p + 2) = 0x12;
*(u32 *)(p + 0xE0) &= ~4;
}
}
/* func_801857D4 — randomised state entry (state word 0x19):
+84 -2
View File
@@ -4208,11 +4208,14 @@ extern u8 D_801A63EC[];
extern u8 D_801A6604[];
extern u8 D_801BD9C0[];
extern u8 D_801BDA28[];
extern u8 D_801BDCF8[];
extern u8 D_801BDDB0[];
void func_8017FA18(s32 p)
{
/* [T51] scoped in from file scope: a file-scope decl of these symbols constrains every
LATER function in this TU, which blocks a byte-true decl of a different type.
Declaration-only move (cookbook §103); the whole-binary byte-gate is the arbiter. */
extern u8 D_801BDCF8[];
s16 v18[4]; /* sp+0x18 */
s32 mat[8]; /* sp+0x20 - MATRIX: 3x3 s16 + pad, 3 s32 at +0x14 */
s32 s0;
@@ -4401,7 +4404,86 @@ void func_8017FA18(s32 p)
}
INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_8017C24C", func_8017FE98);
/* Host TU: src/ov_SC06_018/ov_SC06_018_jr_8017C24C.c
* Insertion point replaces the INCLUDE_ASM at line 6996, in scope after the
* decl block that begins at line 6786 (#include "common.h"). That block
* ALREADY declares (in scope, do not redeclare):
* extern s32 func_8012BEE8(); (line 6789)
* extern void func_8012A828(s32 a0, void *a1); (line 6790)
* extern u8 D_801BDCF8[]; (line 6803)
* and elsewhere earlier in the SAME TU (still in scope, file-scope extern):
* extern void func_80013350(s32 a0, void *a1); (line 6647)
* -- loose prototype (real callee takes/returns s32,s32->s32); per
* cookbook §161c do NOT add a conflicting extern here, cast at the
* call site instead (matches the TU's own sibling func_8018457C).
* New decls needed for this function (not yet declared in this TU's scope
* at the insertion point):
* func_8012B6D4, func_8012B608, func_8012B178, func_80182400,
* func_8012C218, func_8001C924, D_801BE578[], D_801AD520[]
* (func_8012B6D4/B608/B178/8765C signatures copied verbatim from this TU's
* other declarations of the same symbols, e.g. lines 6643-6646/7043-7045;
* func_8012C218/func_8001C924 copied from lines 6639-6640.)
*/
extern s32 func_8012BEE8();
extern void func_8012A828(s32 a0, void *a1);
extern void func_80013350(s32 a0, void *a1); /* loose proto, real TU decl (line 6647); cast at call site per §161c */
extern s32 func_8012B6D4(s16 *a0, s16 *a1);
extern s32 func_8012B608(s32 a0, s32 a1, s32 a2);
extern void func_8012B178(s32 a0, s32 a1);
extern s32 func_80182400(s32 a0);
extern void func_8012C218(void *a0);
extern void func_8001C924(s32 a0, void *a1);
void func_8017FE98(s32 p)
{
extern u8 D_801BE578[];
extern u8 D_801BDCF8[];
extern u8 D_801AD520[];
s32 s1;
s32 r;
if (*(u16 *)(p + 0x34) == 0) {
s1 = *(s32 *)(p + 0xCC);
if (s1 == 0 || *(s16 *)(s1 + 0x36) != *(s16 *)(p + 0xEC) ||
func_8012BEE8(p) != 0) {
*(u16 *)(p + 2) = 0x23;
*(u32 *)(p + 0xE0) |= 0x800;
return;
}
r = func_8012B6D4((s16 *)(p + 4), (s16 *)(s1 + 4));
*(s32 *)(p + 0xE8) = r;
r = func_8012B608(*(s16 *)(*(s32 *)(p + 0x20) + 0x12), *(s32 *)(p + 0xE8), 8);
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) =
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) + r;
func_8012B178(p, 0xFFF8D000);
func_80182400(p);
r = ((s32 (*)(s32, s32))func_80013350)(p + 4, s1 + 4);
if (r < 0x900) {
*(u16 *)(p + 0x34) = *(u16 *)(p + 0x34) + 1;
func_8012A828(p, D_801BE578);
}
} else {
if (*(s16 *)(p + 0x98) != 0) {
return;
}
func_8012C218((void *)*(s32 *)(p + 0xCC));
*(s32 *)(p + 0xCC) = 0;
func_8001C924(*(s32 *)(p + 0x20), D_801AD520);
func_8012A828(p, D_801BDCF8);
*(s32 *)(p + 0x48) = 0x4650;
*(s16 *)(p + 2) = 0x12;
*(u32 *)(p + 0xE0) &= ~4;
}
}
+80 -1
View File
@@ -3023,7 +3023,86 @@ void func_801836FC(s32 p)
}
}
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_801836FC", func_80183B7C);
/* Host TU: src/ov_SC06_018/ov_SC06_018_jr_8017C24C.c
* Insertion point replaces the INCLUDE_ASM at line 6996, in scope after the
* decl block that begins at line 6786 (#include "common.h"). That block
* ALREADY declares (in scope, do not redeclare):
* extern s32 func_8012BEE8(); (line 6789)
* extern void func_8012A828(s32 a0, void *a1); (line 6790)
* extern u8 D_801C708C[]; (line 6803)
* and elsewhere earlier in the SAME TU (still in scope, file-scope extern):
* extern void func_80013350(s32 a0, void *a1); (line 6647)
* -- loose prototype (real callee takes/returns s32,s32->s32); per
* cookbook §161c do NOT add a conflicting extern here, cast at the
* call site instead (matches the TU's own sibling func_8018457C).
* New decls needed for this function (not yet declared in this TU's scope
* at the insertion point):
* func_8012B6D4, func_8012B608, func_8012B178, func_801860E4,
* func_8012C218, func_8001C924, D_801C790C[], D_801B68B4[]
* (func_8012B6D4/B608/B178/8765C signatures copied verbatim from this TU's
* other declarations of the same symbols, e.g. lines 6643-6646/7043-7045;
* func_8012C218/func_8001C924 copied from lines 6639-6640.)
*/
extern s32 func_8012BEE8();
extern void func_8012A828(s32 a0, void *a1);
extern void func_80013350(s32 a0, void *a1); /* loose proto, real TU decl (line 6647); cast at call site per §161c */
extern s32 func_8012B6D4(s16 *a0, s16 *a1);
extern s32 func_8012B608(s32 a0, s32 a1, s32 a2);
extern void func_8012B178(s32 a0, s32 a1);
extern s32 func_801860E4(s32 a0);
extern void func_8012C218(void *a0);
extern void func_8001C924(s32 a0, void *a1);
void func_80183B7C(s32 p)
{
extern u8 D_801C790C[];
extern u8 D_801C708C[];
extern u8 D_801B68B4[];
s32 s1;
s32 r;
if (*(u16 *)(p + 0x34) == 0) {
s1 = *(s32 *)(p + 0xCC);
if (s1 == 0 || *(s16 *)(s1 + 0x36) != *(s16 *)(p + 0xEC) ||
func_8012BEE8(p) != 0) {
*(u16 *)(p + 2) = 0x23;
*(u32 *)(p + 0xE0) |= 0x800;
return;
}
r = func_8012B6D4((s16 *)(p + 4), (s16 *)(s1 + 4));
*(s32 *)(p + 0xE8) = r;
r = func_8012B608(*(s16 *)(*(s32 *)(p + 0x20) + 0x12), *(s32 *)(p + 0xE8), 8);
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) =
*(u16 *)(*(s32 *)(p + 0x20) + 0x12) + r;
func_8012B178(p, 0xFFF8D000);
func_801860E4(p);
r = ((s32 (*)(s32, s32))func_80013350)(p + 4, s1 + 4);
if (r < 0x900) {
*(u16 *)(p + 0x34) = *(u16 *)(p + 0x34) + 1;
func_8012A828(p, D_801C790C);
}
} else {
if (*(s16 *)(p + 0x98) != 0) {
return;
}
func_8012C218((void *)*(s32 *)(p + 0xCC));
*(s32 *)(p + 0xCC) = 0;
func_8001C924(*(s32 *)(p + 0x20), D_801B68B4);
func_8012A828(p, D_801C708C);
*(s32 *)(p + 0x48) = 0x4650;
*(s16 *)(p + 2) = 0x12;
*(u32 *)(p + 0xE0) &= ~4;
}
}
/* func_80183CF0 — randomised state entry (state word 0x19):