From b7f73e7187a1affa8705fed5d0412a7e7b257577 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Fri, 4 Sep 2026 21:49:33 -0600 Subject: [PATCH] =?UTF-8?q?feat(phase-31):=20S80=20#10=20(1)=20=E2=80=94?= =?UTF-8?q?=20md=5FMAIN=5F020:=20func=5F800CB17C=20(30=20ins)=20DECOMPILED?= =?UTF-8?q?=20=E2=80=94=20the=20S79=20#7=20"raw=20splice"=20had=20banked?= =?UTF-8?q?=20its=20assembly=20as=20a=20verbatim=20=5F=5Fasm=5F=5F=20body?= =?UTF-8?q?=20(P9=20correction:=20that=20was=20not=20a=20decompile,=20verb?= =?UTF-8?q?atim=5Fcheck=20--strict=20caught=20it=20as=20a=20new=20verbatim?= =?UTF-8?q?);=20the=20C=20is=20seven=20straight=20calls=20(s0=20=3D=20a0;?= =?UTF-8?q?=20func=5F8012A304(*(s16*)(s0+0xA),=200x80);=20func=5F801477E8(?= =?UTF-8?q?s0,=200xFFE80000);=20func=5F80154274(s0,=20D=5F800CB1F4);=20fun?= =?UTF-8?q?c=5F80147324(0x47A);=20func=5F8014C010(s0,=202);=20func=5F80148?= =?UTF-8?q?3E8(s0);=20func=5F80019064(D=5F80062BD0))=20as=20an=20s32=20fun?= =?UTF-8?q?ction=20with=20no=20return=20(the=20target=20sets=20no=20$v0);?= =?UTF-8?q?=20the=20TU's=20block-scope=20`struct=20S`=20decl=20needed=20a?= =?UTF-8?q?=20file-scope=20tag=20(commit:3894);=20match=5Fone=2030/30,=20r?= =?UTF-8?q?tu=5Fmatch=20MATCH,=20worktree=20gate=20+=20in-tree=20byte-iden?= =?UTF-8?q?tical=200990e041?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/md_MAIN_020/md_MAIN_020.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/md_MAIN_020/md_MAIN_020.c b/src/md_MAIN_020/md_MAIN_020.c index 08aa19658..73440aa0a 100644 --- a/src/md_MAIN_020/md_MAIN_020.c +++ b/src/md_MAIN_020/md_MAIN_020.c @@ -150,6 +150,35 @@ void func_800CB148(s32 a0) { } -INCLUDE_ASM("asm/md_MAIN_020/nonmatchings/md_MAIN_020", func_800CB17C); +#include "common.h" + +struct S; + +/* func_800CB17C (md_MAIN_020, 30 ins) — S80 #10. The S79 #7 "raw splice" had banked this + * function's ASSEMBLY as a verbatim __asm__ body (every stored draft was the asm); this is + * the decompile. The TU declares it `s32 (struct S *)` and both callers discard the result; + * the target sets no $v0 of its own (it falls off the end after the last jal), which is what + * an s32 function with no `return` compiles to. 0xFFE80000 is the `lui $a1,65512` literal. */ +s32 func_800CB17C(struct S *a0) { + extern void func_8012A304(s32 a0, s32 a1); + extern void func_801477E8(s32 a0, s32 a1); + extern void func_80154274(s32 *a0, s32 a1); + extern void func_80147324(s32 a0); + extern void func_8014C010(s32 a0, s32 a1); + extern void func_801483E8(s32 a0); + extern void func_80019064(void *a0); + extern s32 D_800CB1F4[]; + extern u8 D_80062BD0[]; + s32 s0 = (s32)a0; + + func_8012A304(*(s16 *)(s0 + 0xA), 0x80); + func_801477E8(s0, 0xFFE80000); + func_80154274((s32 *)s0, (s32)D_800CB1F4); + func_80147324(0x47A); + func_8014C010(s0, 2); + func_801483E8(s0); + func_80019064(D_80062BD0); +} +