papermario/asm/nonmatchings/code_163400/func_8024381C.s
Ethan Roseman 84f211a2ae First pass
2020-10-14 22:56:47 -04:00

38 lines
1.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024381C
/* 16407C 8024381C 3C028016 */ lui $v0, %hi(D_80159D50)
/* 164080 80243820 24429D50 */ addiu $v0, $v0, %lo(D_80159D50)
/* 164084 80243824 00042140 */ sll $a0, $a0, 5
/* 164088 80243828 00822021 */ addu $a0, $a0, $v0
/* 16408C 8024382C 9083001C */ lbu $v1, 0x1c($a0)
/* 164090 80243830 8FA60020 */ lw $a2, 0x20($sp)
/* 164094 80243834 14600005 */ bnez $v1, .L8024384C
/* 164098 80243838 28620010 */ slti $v0, $v1, 0x10
/* 16409C 8024383C 90820000 */ lbu $v0, ($a0)
/* 1640A0 80243840 304200FB */ andi $v0, $v0, 0xfb
/* 1640A4 80243844 A0820000 */ sb $v0, ($a0)
/* 1640A8 80243848 28620010 */ slti $v0, $v1, 0x10
.L8024384C:
/* 1640AC 8024384C 5040000E */ beql $v0, $zero, .L80243888
/* 1640B0 80243850 ACA00000 */ sw $zero, ($a1)
/* 1640B4 80243854 00031040 */ sll $v0, $v1, 1
/* 1640B8 80243858 3C018025 */ lui $at, 0x8025
/* 1640BC 8024385C 00220821 */ addu $at, $at, $v0
/* 1640C0 80243860 84229CF4 */ lh $v0, -0x630c($at)
/* 1640C4 80243864 C4C00000 */ lwc1 $f0, ($a2)
/* 1640C8 80243868 44821000 */ mtc1 $v0, $f2
/* 1640CC 8024386C 00000000 */ nop
/* 1640D0 80243870 468010A0 */ cvt.s.w $f2, $f2
/* 1640D4 80243874 46020000 */ add.s $f0, $f0, $f2
/* 1640D8 80243878 24020009 */ addiu $v0, $zero, 9
/* 1640DC 8024387C E4C00000 */ swc1 $f0, ($a2)
/* 1640E0 80243880 03E00008 */ jr $ra
/* 1640E4 80243884 ACA20000 */ sw $v0, ($a1)
.L80243888:
/* 1640E8 80243888 90820000 */ lbu $v0, ($a0)
/* 1640EC 8024388C 304200F7 */ andi $v0, $v0, 0xf7
/* 1640F0 80243890 03E00008 */ jr $ra
/* 1640F4 80243894 A0820000 */ sb $v0, ($a0)