mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-28 14:59:48 -04:00
feat(phase-31): t6-recover gate — +1 fns x0 propagated (fleet 95.3%)
This commit is contained in:
@@ -1255,7 +1255,37 @@ DEFINE_func_80139A8C() /* dedup: shared engine-core @0x80139a8c (src/shared) */
|
||||
DEFINE_func_80139B18() /* dedup: shared engine-core @0x80139b18 (src/shared) */
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_MAIN_012/nonmatchings/ov_MAIN_012_jr_801380E0", func_80139BE0);
|
||||
extern unsigned char D_8017E94C[];
|
||||
|
||||
void func_80139BE0(int param_1)
|
||||
{
|
||||
extern unsigned char D_8017E94C[];
|
||||
int v;
|
||||
if ((*(unsigned int *)(param_1 + 8) & 0x2000) == 0) {
|
||||
int t = *(unsigned char *)(param_1 + 0x22) & 0x60;
|
||||
int h = *(unsigned short *)(param_1 + 0x18);
|
||||
unsigned int idx;
|
||||
__asm__("" : "=r"(t) : "0"(t));
|
||||
idx = (unsigned char)t;
|
||||
if (h < 7) {
|
||||
if (h >= 2) {
|
||||
v = D_8017E94C[idx >> 5];
|
||||
} else {
|
||||
v = D_8017E94C[0];
|
||||
}
|
||||
} else {
|
||||
v = D_8017E94C[0];
|
||||
}
|
||||
*(short *)(param_1 + 0x2e) = 3;
|
||||
*(short *)(param_1 + 0x2c) = v;
|
||||
}
|
||||
*(short *)(param_1 + 0x34) = *(short *)(param_1 + 0x2c) * 6;
|
||||
{
|
||||
int x = *(short *)(param_1 + 0x2e);
|
||||
*(short *)(param_1 + 0x36) = x * 12 + (x - 1) * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DEFINE_func_80139C7C() /* dedup: shared engine-core @0x80139c7c (src/shared) */
|
||||
|
||||
|
||||
@@ -6754,7 +6754,39 @@ DEFINE_func_801534D8() /* dedup: shared engine-core @0x801534d8 (src/shared) */
|
||||
DEFINE_func_80153550() /* dedup: shared engine-core @0x80153550 (src/shared) */
|
||||
|
||||
|
||||
DEFINE_func_801535F4() /* dedup: shared engine-core @0x801535F4 (src/shared) */
|
||||
/* de-macroized: per-overlay-local decl for func_8014ED28 (byte-true sig); do NOT re-macroize */
|
||||
extern void func_8014ED28(void);
|
||||
extern void func_80146D90(s32 a0);
|
||||
extern void func_8014CC28(s32 a0);
|
||||
extern void func_8014FA04(s32 a0);
|
||||
s32 func_801535F4(void *arg0) {
|
||||
s32 var_s1;
|
||||
register u32 flags __asm__("$4");
|
||||
register u32 fcopy __asm__("$3");
|
||||
s32 ret;
|
||||
var_s1 = 0;
|
||||
if (((s32 (*)(void))func_8014ED28)() != 0) {
|
||||
func_80146D90((s32)arg0);
|
||||
}
|
||||
if ((*(s32 *)((u8 *)arg0 + 0x34) > 0) &&
|
||||
(((s32 (*)(s32))func_8014CC28)((s32)arg0) != 0)) {
|
||||
var_s1 = 1;
|
||||
}
|
||||
flags = ((s32 (*)(s32))func_8014FA04)((s32)arg0);
|
||||
fcopy = flags;
|
||||
if (flags & 0x4000) {
|
||||
ret = 2;
|
||||
} else if (flags & 0x2000) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 4;
|
||||
if ((fcopy & 0x8000) == 0) {
|
||||
ret = var_s1;
|
||||
}
|
||||
}
|
||||
__asm__ __volatile__("" : : "r"(flags));
|
||||
return ret;
|
||||
} /* dedup: shared engine-core @0x801535F4 (src/shared) */
|
||||
|
||||
DEFINE_func_8015369C() /* dedup: shared engine-core @0x8015369c (src/shared) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user