mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
feat(phase-30 S48-T6): propagate func_80186D80 to its zero-crack siblings
This commit is contained in:
@@ -2893,7 +2893,45 @@ void func_80180B04(s32 a0) {
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020_jr_80180B04", func_80180EF0);
|
||||
|
||||
/* §160g STEP 0 sibling hit: identical shape already matched inline inside
|
||||
* func_80131340 (src/ov_SC03_099/ov_SC03_099_jr_8012ACE0.c and its dedup
|
||||
* siblings), where the "delta" struct is a LOCAL computed earlier in that
|
||||
* function. Here the delta is passed in directly via a1 — same struct-copy /
|
||||
* add / dead-copy / call / subtract / store shape, adapted to a pointer
|
||||
* parameter instead of a local. */
|
||||
|
||||
void func_80180EF0(s32 a0, s32 a1)
|
||||
{
|
||||
struct V8_80180EF0 {
|
||||
u16 vx, vy, vz, pad;
|
||||
};
|
||||
extern s32 func_8012CEB0(void*, void*, s32);
|
||||
|
||||
struct V8_80180EF0 sp10;
|
||||
struct V8_80180EF0 sp18;
|
||||
struct V8_80180EF0 sp20;
|
||||
|
||||
sp10.vx = *(u16 *)(a0 + 0x3A);
|
||||
sp10.vy = *(u16 *)(a0 + 0x3E);
|
||||
sp10.vz = *(u16 *)(a0 + 0x42);
|
||||
sp18 = sp10;
|
||||
sp18.vx += *(u16 *)(a1 + 0x0);
|
||||
sp18.vy += *(u16 *)(a1 + 0x2);
|
||||
sp18.vz += *(u16 *)(a1 + 0x4);
|
||||
sp20 = sp18; /* load-bearing dead aggregate copy — gcc-2.7.2 has no aggregate DSE (§160e-family) */
|
||||
((s32 (*)(s32, s32, s32))func_8012CEB0)((s32)&sp10, (s32)&sp18, 1);
|
||||
sp18.vx -= *(u16 *)(a1 + 0x0);
|
||||
sp18.vy -= *(u16 *)(a1 + 0x2);
|
||||
sp18.vz -= *(u16 *)(a1 + 0x4);
|
||||
*(u16 *)(a0 + 0x3A) = sp18.vx;
|
||||
*(u16 *)(a0 + 0x3E) = sp18.vy;
|
||||
*(u16 *)(a0 + 0x42) = sp18.vz;
|
||||
*(u16 *)(a0 + 0x6) = sp18.vx;
|
||||
*(u16 *)(a0 + 0xA) = sp18.vy;
|
||||
*(u16 *)(a0 + 0xE) = sp18.vz;
|
||||
}
|
||||
|
||||
|
||||
extern void func_80183FD0(s32 arg0, s32 arg1);
|
||||
void func_80181044(void *arg0) {
|
||||
|
||||
@@ -2926,7 +2926,45 @@ void func_80184A28(s32 a0) {
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022_jr_80184A28", func_80184E14);
|
||||
|
||||
/* §160g STEP 0 sibling hit: identical shape already matched inline inside
|
||||
* func_80131340 (src/ov_SC03_099/ov_SC03_099_jr_8012ACE0.c and its dedup
|
||||
* siblings), where the "delta" struct is a LOCAL computed earlier in that
|
||||
* function. Here the delta is passed in directly via a1 — same struct-copy /
|
||||
* add / dead-copy / call / subtract / store shape, adapted to a pointer
|
||||
* parameter instead of a local. */
|
||||
|
||||
void func_80184E14(s32 a0, s32 a1)
|
||||
{
|
||||
struct V8_80184E14 {
|
||||
u16 vx, vy, vz, pad;
|
||||
};
|
||||
extern s32 func_8012CEB0(void*, void*, s32);
|
||||
|
||||
struct V8_80184E14 sp10;
|
||||
struct V8_80184E14 sp18;
|
||||
struct V8_80184E14 sp20;
|
||||
|
||||
sp10.vx = *(u16 *)(a0 + 0x3A);
|
||||
sp10.vy = *(u16 *)(a0 + 0x3E);
|
||||
sp10.vz = *(u16 *)(a0 + 0x42);
|
||||
sp18 = sp10;
|
||||
sp18.vx += *(u16 *)(a1 + 0x0);
|
||||
sp18.vy += *(u16 *)(a1 + 0x2);
|
||||
sp18.vz += *(u16 *)(a1 + 0x4);
|
||||
sp20 = sp18; /* load-bearing dead aggregate copy — gcc-2.7.2 has no aggregate DSE (§160e-family) */
|
||||
((s32 (*)(s32, s32, s32))func_8012CEB0)((s32)&sp10, (s32)&sp18, 1);
|
||||
sp18.vx -= *(u16 *)(a1 + 0x0);
|
||||
sp18.vy -= *(u16 *)(a1 + 0x2);
|
||||
sp18.vz -= *(u16 *)(a1 + 0x4);
|
||||
*(u16 *)(a0 + 0x3A) = sp18.vx;
|
||||
*(u16 *)(a0 + 0x3E) = sp18.vy;
|
||||
*(u16 *)(a0 + 0x42) = sp18.vz;
|
||||
*(u16 *)(a0 + 0x6) = sp18.vx;
|
||||
*(u16 *)(a0 + 0xA) = sp18.vy;
|
||||
*(u16 *)(a0 + 0xE) = sp18.vz;
|
||||
}
|
||||
|
||||
|
||||
extern void func_80187EF4(s32 arg0, s32 arg1);
|
||||
void func_80184F68(s32 arg0) {
|
||||
|
||||
@@ -2958,7 +2958,45 @@ void func_80186F00(s32 a0) {
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024_jr_80186F00", func_801872EC);
|
||||
|
||||
/* §160g STEP 0 sibling hit: identical shape already matched inline inside
|
||||
* func_80131340 (src/ov_SC03_099/ov_SC03_099_jr_8012ACE0.c and its dedup
|
||||
* siblings), where the "delta" struct is a LOCAL computed earlier in that
|
||||
* function. Here the delta is passed in directly via a1 — same struct-copy /
|
||||
* add / dead-copy / call / subtract / store shape, adapted to a pointer
|
||||
* parameter instead of a local. */
|
||||
|
||||
void func_801872EC(s32 a0, s32 a1)
|
||||
{
|
||||
struct V8_801872EC {
|
||||
u16 vx, vy, vz, pad;
|
||||
};
|
||||
extern s32 func_8012CEB0(void*, void*, s32);
|
||||
|
||||
struct V8_801872EC sp10;
|
||||
struct V8_801872EC sp18;
|
||||
struct V8_801872EC sp20;
|
||||
|
||||
sp10.vx = *(u16 *)(a0 + 0x3A);
|
||||
sp10.vy = *(u16 *)(a0 + 0x3E);
|
||||
sp10.vz = *(u16 *)(a0 + 0x42);
|
||||
sp18 = sp10;
|
||||
sp18.vx += *(u16 *)(a1 + 0x0);
|
||||
sp18.vy += *(u16 *)(a1 + 0x2);
|
||||
sp18.vz += *(u16 *)(a1 + 0x4);
|
||||
sp20 = sp18; /* load-bearing dead aggregate copy — gcc-2.7.2 has no aggregate DSE (§160e-family) */
|
||||
((s32 (*)(s32, s32, s32))func_8012CEB0)((s32)&sp10, (s32)&sp18, 1);
|
||||
sp18.vx -= *(u16 *)(a1 + 0x0);
|
||||
sp18.vy -= *(u16 *)(a1 + 0x2);
|
||||
sp18.vz -= *(u16 *)(a1 + 0x4);
|
||||
*(u16 *)(a0 + 0x3A) = sp18.vx;
|
||||
*(u16 *)(a0 + 0x3E) = sp18.vy;
|
||||
*(u16 *)(a0 + 0x42) = sp18.vz;
|
||||
*(u16 *)(a0 + 0x6) = sp18.vx;
|
||||
*(u16 *)(a0 + 0xA) = sp18.vy;
|
||||
*(u16 *)(a0 + 0xE) = sp18.vz;
|
||||
}
|
||||
|
||||
|
||||
extern void func_8018A3CC(s32 arg0, s32 arg1);
|
||||
void func_80187440(s32 arg0) {
|
||||
|
||||
@@ -2967,7 +2967,45 @@ INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80181014", func_801816C
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80181014", func_80181738);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80181014", func_80181B24);
|
||||
|
||||
/* §160g STEP 0 sibling hit: identical shape already matched inline inside
|
||||
* func_80131340 (src/ov_SC03_099/ov_SC03_099_jr_8012ACE0.c and its dedup
|
||||
* siblings), where the "delta" struct is a LOCAL computed earlier in that
|
||||
* function. Here the delta is passed in directly via a1 — same struct-copy /
|
||||
* add / dead-copy / call / subtract / store shape, adapted to a pointer
|
||||
* parameter instead of a local. */
|
||||
|
||||
void func_80181B24(s32 a0, s32 a1)
|
||||
{
|
||||
struct V8_80181B24 {
|
||||
u16 vx, vy, vz, pad;
|
||||
};
|
||||
extern s32 func_8012CEB0(void*, void*, s32);
|
||||
|
||||
struct V8_80181B24 sp10;
|
||||
struct V8_80181B24 sp18;
|
||||
struct V8_80181B24 sp20;
|
||||
|
||||
sp10.vx = *(u16 *)(a0 + 0x3A);
|
||||
sp10.vy = *(u16 *)(a0 + 0x3E);
|
||||
sp10.vz = *(u16 *)(a0 + 0x42);
|
||||
sp18 = sp10;
|
||||
sp18.vx += *(u16 *)(a1 + 0x0);
|
||||
sp18.vy += *(u16 *)(a1 + 0x2);
|
||||
sp18.vz += *(u16 *)(a1 + 0x4);
|
||||
sp20 = sp18; /* load-bearing dead aggregate copy — gcc-2.7.2 has no aggregate DSE (§160e-family) */
|
||||
((s32 (*)(s32, s32, s32))func_8012CEB0)((s32)&sp10, (s32)&sp18, 1);
|
||||
sp18.vx -= *(u16 *)(a1 + 0x0);
|
||||
sp18.vy -= *(u16 *)(a1 + 0x2);
|
||||
sp18.vz -= *(u16 *)(a1 + 0x4);
|
||||
*(u16 *)(a0 + 0x3A) = sp18.vx;
|
||||
*(u16 *)(a0 + 0x3E) = sp18.vy;
|
||||
*(u16 *)(a0 + 0x42) = sp18.vz;
|
||||
*(u16 *)(a0 + 0x6) = sp18.vx;
|
||||
*(u16 *)(a0 + 0xA) = sp18.vy;
|
||||
*(u16 *)(a0 + 0xE) = sp18.vz;
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80181014", func_80181C78);
|
||||
|
||||
|
||||
@@ -3050,7 +3050,45 @@ INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_80184CF8", func_801853B
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_80184CF8", func_8018541C);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_80184CF8", func_80185808);
|
||||
|
||||
/* §160g STEP 0 sibling hit: identical shape already matched inline inside
|
||||
* func_80131340 (src/ov_SC03_099/ov_SC03_099_jr_8012ACE0.c and its dedup
|
||||
* siblings), where the "delta" struct is a LOCAL computed earlier in that
|
||||
* function. Here the delta is passed in directly via a1 — same struct-copy /
|
||||
* add / dead-copy / call / subtract / store shape, adapted to a pointer
|
||||
* parameter instead of a local. */
|
||||
|
||||
void func_80185808(s32 a0, s32 a1)
|
||||
{
|
||||
struct V8_80185808 {
|
||||
u16 vx, vy, vz, pad;
|
||||
};
|
||||
extern s32 func_8012CEB0(void*, void*, s32);
|
||||
|
||||
struct V8_80185808 sp10;
|
||||
struct V8_80185808 sp18;
|
||||
struct V8_80185808 sp20;
|
||||
|
||||
sp10.vx = *(u16 *)(a0 + 0x3A);
|
||||
sp10.vy = *(u16 *)(a0 + 0x3E);
|
||||
sp10.vz = *(u16 *)(a0 + 0x42);
|
||||
sp18 = sp10;
|
||||
sp18.vx += *(u16 *)(a1 + 0x0);
|
||||
sp18.vy += *(u16 *)(a1 + 0x2);
|
||||
sp18.vz += *(u16 *)(a1 + 0x4);
|
||||
sp20 = sp18; /* load-bearing dead aggregate copy — gcc-2.7.2 has no aggregate DSE (§160e-family) */
|
||||
((s32 (*)(s32, s32, s32))func_8012CEB0)((s32)&sp10, (s32)&sp18, 1);
|
||||
sp18.vx -= *(u16 *)(a1 + 0x0);
|
||||
sp18.vy -= *(u16 *)(a1 + 0x2);
|
||||
sp18.vz -= *(u16 *)(a1 + 0x4);
|
||||
*(u16 *)(a0 + 0x3A) = sp18.vx;
|
||||
*(u16 *)(a0 + 0x3E) = sp18.vy;
|
||||
*(u16 *)(a0 + 0x42) = sp18.vz;
|
||||
*(u16 *)(a0 + 0x6) = sp18.vx;
|
||||
*(u16 *)(a0 + 0xA) = sp18.vy;
|
||||
*(u16 *)(a0 + 0xE) = sp18.vz;
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_80184CF8", func_8018595C);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user