papermario/asm/nonmatchings/code_6FFD80/func_80238CE0_700A60.s
Ethan Roseman d5018e6a9f 🐟 🐟 🐟
2021-01-10 21:00:17 +09:00

92 lines
4.6 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80238CE0_700A60
/* 700A60 80238CE0 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 700A64 80238CE4 AFB00010 */ sw $s0, 0x10($sp)
/* 700A68 80238CE8 3C10800E */ lui $s0, %hi(gBattleStatus+0xDC)
/* 700A6C 80238CEC 8E10C14C */ lw $s0, %lo(gBattleStatus+0xDC)($s0)
/* 700A70 80238CF0 AFB20018 */ sw $s2, 0x18($sp)
/* 700A74 80238CF4 0080902D */ daddu $s2, $a0, $zero
/* 700A78 80238CF8 AFBF001C */ sw $ra, 0x1c($sp)
/* 700A7C 80238CFC AFB10014 */ sw $s1, 0x14($sp)
/* 700A80 80238D00 0C09A75B */ jal get_actor
/* 700A84 80238D04 86040428 */ lh $a0, 0x428($s0)
/* 700A88 80238D08 0040882D */ daddu $s1, $v0, $zero
/* 700A8C 80238D0C 82050426 */ lb $a1, 0x426($s0)
/* 700A90 80238D10 0C099117 */ jal get_actor_part
/* 700A94 80238D14 0220202D */ daddu $a0, $s1, $zero
/* 700A98 80238D18 822401B8 */ lb $a0, 0x1b8($s1)
/* 700A9C 80238D1C 00041840 */ sll $v1, $a0, 1
/* 700AA0 80238D20 00641821 */ addu $v1, $v1, $a0
/* 700AA4 80238D24 000318C0 */ sll $v1, $v1, 3
/* 700AA8 80238D28 00641821 */ addu $v1, $v1, $a0
/* 700AAC 80238D2C 822401B9 */ lb $a0, 0x1b9($s1)
/* 700AB0 80238D30 00031880 */ sll $v1, $v1, 2
/* 700AB4 80238D34 14800002 */ bnez $a0, .L80238D40
/* 700AB8 80238D38 0064001A */ div $zero, $v1, $a0
/* 700ABC 80238D3C 0007000D */ break 7
.L80238D40:
/* 700AC0 80238D40 2401FFFF */ addiu $at, $zero, -1
/* 700AC4 80238D44 14810004 */ bne $a0, $at, .L80238D58
/* 700AC8 80238D48 3C018000 */ lui $at, 0x8000
/* 700ACC 80238D4C 14610002 */ bne $v1, $at, .L80238D58
/* 700AD0 80238D50 00000000 */ nop
/* 700AD4 80238D54 0006000D */ break 6
.L80238D58:
/* 700AD8 80238D58 00001812 */ mflo $v1
/* 700ADC 80238D5C 0040282D */ daddu $a1, $v0, $zero
/* 700AE0 80238D60 8E240008 */ lw $a0, 8($s1)
/* 700AE4 80238D64 24020064 */ addiu $v0, $zero, 0x64
/* 700AE8 80238D68 90840019 */ lbu $a0, 0x19($a0)
/* 700AEC 80238D6C 00433023 */ subu $a2, $v0, $v1
/* 700AF0 80238D70 82230218 */ lb $v1, 0x218($s1)
/* 700AF4 80238D74 2402000E */ addiu $v0, $zero, 0xe
/* 700AF8 80238D78 50620001 */ beql $v1, $v0, .L80238D80
/* 700AFC 80238D7C 0000202D */ daddu $a0, $zero, $zero
.L80238D80:
/* 700B00 80238D80 8CA2007C */ lw $v0, 0x7c($a1)
/* 700B04 80238D84 30420020 */ andi $v0, $v0, 0x20
/* 700B08 80238D88 54400001 */ bnel $v0, $zero, .L80238D90
/* 700B0C 80238D8C 0000202D */ daddu $a0, $zero, $zero
.L80238D90:
/* 700B10 80238D90 1880001C */ blez $a0, .L80238E04
/* 700B14 80238D94 00860018 */ mult $a0, $a2
/* 700B18 80238D98 00001812 */ mflo $v1
/* 700B1C 80238D9C 3C0551EB */ lui $a1, 0x51eb
/* 700B20 80238DA0 34A5851F */ ori $a1, $a1, 0x851f
/* 700B24 80238DA4 00650018 */ mult $v1, $a1
/* 700B28 80238DA8 00031FC3 */ sra $v1, $v1, 0x1f
/* 700B2C 80238DAC 00003010 */ mfhi $a2
/* 700B30 80238DB0 00061143 */ sra $v0, $a2, 5
/* 700B34 80238DB4 00431023 */ subu $v0, $v0, $v1
/* 700B38 80238DB8 00822021 */ addu $a0, $a0, $v0
/* 700B3C 80238DBC 28820065 */ slti $v0, $a0, 0x65
/* 700B40 80238DC0 50400001 */ beql $v0, $zero, .L80238DC8
/* 700B44 80238DC4 24040064 */ addiu $a0, $zero, 0x64
.L80238DC8:
/* 700B48 80238DC8 82220210 */ lb $v0, 0x210($s1)
/* 700B4C 80238DCC 1040000D */ beqz $v0, .L80238E04
/* 700B50 80238DD0 00041880 */ sll $v1, $a0, 2
/* 700B54 80238DD4 00641821 */ addu $v1, $v1, $a0
/* 700B58 80238DD8 00031100 */ sll $v0, $v1, 4
/* 700B5C 80238DDC 00431023 */ subu $v0, $v0, $v1
/* 700B60 80238DE0 00021040 */ sll $v0, $v0, 1
/* 700B64 80238DE4 00450018 */ mult $v0, $a1
/* 700B68 80238DE8 000217C3 */ sra $v0, $v0, 0x1f
/* 700B6C 80238DEC 00003810 */ mfhi $a3
/* 700B70 80238DF0 00071943 */ sra $v1, $a3, 5
/* 700B74 80238DF4 00622023 */ subu $a0, $v1, $v0
/* 700B78 80238DF8 28820097 */ slti $v0, $a0, 0x97
/* 700B7C 80238DFC 50400001 */ beql $v0, $zero, .L80238E04
/* 700B80 80238E00 24040096 */ addiu $a0, $zero, 0x96
.L80238E04:
/* 700B84 80238E04 AE440084 */ sw $a0, 0x84($s2)
/* 700B88 80238E08 8FBF001C */ lw $ra, 0x1c($sp)
/* 700B8C 80238E0C 8FB20018 */ lw $s2, 0x18($sp)
/* 700B90 80238E10 8FB10014 */ lw $s1, 0x14($sp)
/* 700B94 80238E14 8FB00010 */ lw $s0, 0x10($sp)
/* 700B98 80238E18 24020002 */ addiu $v0, $zero, 2
/* 700B9C 80238E1C 03E00008 */ jr $ra
/* 700BA0 80238E20 27BD0020 */ addiu $sp, $sp, 0x20