papermario/asm/nonmatchings/code_190B20/func_802636E4.s
2021-01-13 00:42:27 +09:00

158 lines
8.2 KiB
ArmAsm
Generated

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802636E4
/* 191FC4 802636E4 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 191FC8 802636E8 AFB40020 */ sw $s4, 0x20($sp)
/* 191FCC 802636EC 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 191FD0 802636F0 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 191FD4 802636F4 AFB7002C */ sw $s7, 0x2c($sp)
/* 191FD8 802636F8 3C178011 */ lui $s7, %hi(gPlayerData)
/* 191FDC 802636FC 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData)
/* 191FE0 80263700 2403FFFF */ addiu $v1, $zero, -1
/* 191FE4 80263704 AFBF0034 */ sw $ra, 0x34($sp)
/* 191FE8 80263708 AFBE0030 */ sw $fp, 0x30($sp)
/* 191FEC 8026370C AFB60028 */ sw $s6, 0x28($sp)
/* 191FF0 80263710 AFB50024 */ sw $s5, 0x24($sp)
/* 191FF4 80263714 AFB3001C */ sw $s3, 0x1c($sp)
/* 191FF8 80263718 AFB20018 */ sw $s2, 0x18($sp)
/* 191FFC 8026371C AFB10014 */ sw $s1, 0x14($sp)
/* 192000 80263720 AFB00010 */ sw $s0, 0x10($sp)
/* 192004 80263724 82E20001 */ lb $v0, 1($s7)
/* 192008 80263728 8E9500D8 */ lw $s5, 0xd8($s4)
/* 19200C 8026372C 14430003 */ bne $v0, $v1, .L8026373C
/* 192010 80263730 24120017 */ addiu $s2, $zero, 0x17
/* 192014 80263734 08098E39 */ j .L802638E4
/* 192018 80263738 A280007F */ sb $zero, 0x7f($s4)
.L8026373C:
/* 19201C 8026373C 02921021 */ addu $v0, $s4, $s2
.L80263740:
/* 192020 80263740 A04001DE */ sb $zero, 0x1de($v0)
/* 192024 80263744 2652FFFF */ addiu $s2, $s2, -1
/* 192028 80263748 0641FFFD */ bgez $s2, .L80263740
/* 19202C 8026374C 2442FFFF */ addiu $v0, $v0, -1
/* 192030 80263750 24060001 */ addiu $a2, $zero, 1
/* 192034 80263754 92E20001 */ lbu $v0, 1($s7)
/* 192038 80263758 24030155 */ addiu $v1, $zero, 0x155
/* 19203C 8026375C A68301AE */ sh $v1, 0x1ae($s4)
/* 192040 80263760 24420003 */ addiu $v0, $v0, 3
/* 192044 80263764 A28201DE */ sb $v0, 0x1de($s4)
/* 192048 80263768 0000902D */ daddu $s2, $zero, $zero
/* 19204C 8026376C 3C098009 */ lui $t1, %hi(D_8008F060)
/* 192050 80263770 2529F060 */ addiu $t1, $t1, %lo(D_8008F060)
/* 192054 80263774 3C088008 */ lui $t0, %hi(gItemTable)
/* 192058 80263778 250878E0 */ addiu $t0, $t0, %lo(gItemTable)
/* 19205C 8026377C 00C0382D */ daddu $a3, $a2, $zero
/* 192060 80263780 02E0202D */ daddu $a0, $s7, $zero
/* 192064 80263784 26850002 */ addiu $a1, $s4, 2
.L80263788:
/* 192068 80263788 84820208 */ lh $v0, 0x208($a0)
/* 19206C 8026378C 10400011 */ beqz $v0, .L802637D4
/* 192070 80263790 26520001 */ addiu $s2, $s2, 1
/* 192074 80263794 00021140 */ sll $v0, $v0, 5
/* 192078 80263798 00481021 */ addu $v0, $v0, $t0
/* 19207C 8026379C 9043001A */ lbu $v1, 0x1a($v0)
/* 192080 802637A0 00031080 */ sll $v0, $v1, 2
/* 192084 802637A4 00431021 */ addu $v0, $v0, $v1
/* 192088 802637A8 00021080 */ sll $v0, $v0, 2
/* 19208C 802637AC 00498821 */ addu $s1, $v0, $t1
/* 192090 802637B0 82220010 */ lb $v0, 0x10($s1)
/* 192094 802637B4 14470007 */ bne $v0, $a3, .L802637D4
/* 192098 802637B8 00000000 */ nop
/* 19209C 802637BC 02861021 */ addu $v0, $s4, $a2
/* 1920A0 802637C0 A04301DE */ sb $v1, 0x1de($v0)
/* 1920A4 802637C4 94820208 */ lhu $v0, 0x208($a0)
/* 1920A8 802637C8 24C60001 */ addiu $a2, $a2, 1
/* 1920AC 802637CC A4A201AE */ sh $v0, 0x1ae($a1)
/* 1920B0 802637D0 24A50002 */ addiu $a1, $a1, 2
.L802637D4:
/* 1920B4 802637D4 2A420040 */ slti $v0, $s2, 0x40
/* 1920B8 802637D8 1440FFEB */ bnez $v0, .L80263788
/* 1920BC 802637DC 24840002 */ addiu $a0, $a0, 2
/* 1920C0 802637E0 A286020E */ sb $a2, 0x20e($s4)
/* 1920C4 802637E4 0000902D */ daddu $s2, $zero, $zero
/* 1920C8 802637E8 30C200FF */ andi $v0, $a2, 0xff
/* 1920CC 802637EC 10400039 */ beqz $v0, .L802638D4
/* 1920D0 802637F0 0240B02D */ daddu $s6, $s2, $zero
/* 1920D4 802637F4 0286F021 */ addu $fp, $s4, $a2
/* 1920D8 802637F8 0280982D */ daddu $s3, $s4, $zero
.L802637FC:
/* 1920DC 802637FC 926301DE */ lbu $v1, 0x1de($s3)
/* 1920E0 80263800 3C0A8009 */ lui $t2, %hi(D_8008F060)
/* 1920E4 80263804 254AF060 */ addiu $t2, $t2, %lo(D_8008F060)
/* 1920E8 80263808 00031080 */ sll $v0, $v1, 2
/* 1920EC 8026380C 00431021 */ addu $v0, $v0, $v1
/* 1920F0 80263810 00021080 */ sll $v0, $v0, 2
/* 1920F4 80263814 004A8821 */ addu $s1, $v0, $t2
/* 1920F8 80263818 82300011 */ lb $s0, 0x11($s1)
/* 1920FC 8026381C 1200000B */ beqz $s0, .L8026384C
/* 192100 80263820 02A0202D */ daddu $a0, $s5, $zero
/* 192104 80263824 0C099CAB */ jal heroes_is_ability_active
/* 192108 80263828 24050018 */ addiu $a1, $zero, 0x18
/* 19210C 8026382C 02028023 */ subu $s0, $s0, $v0
/* 192110 80263830 02A0202D */ daddu $a0, $s5, $zero
/* 192114 80263834 0C099CAB */ jal heroes_is_ability_active
/* 192118 80263838 24050026 */ addiu $a1, $zero, 0x26
/* 19211C 8026383C 00021040 */ sll $v0, $v0, 1
/* 192120 80263840 02028023 */ subu $s0, $s0, $v0
/* 192124 80263844 5A000001 */ blezl $s0, .L8026384C
/* 192128 80263848 24100001 */ addiu $s0, $zero, 1
.L8026384C:
/* 19212C 8026384C 92E30001 */ lbu $v1, 1($s7)
/* 192130 80263850 24020001 */ addiu $v0, $zero, 1
/* 192134 80263854 A2820178 */ sb $v0, 0x178($s4)
/* 192138 80263858 00031E00 */ sll $v1, $v1, 0x18
/* 19213C 8026385C 00031E03 */ sra $v1, $v1, 0x18
/* 192140 80263860 A683017A */ sh $v1, 0x17a($s4)
/* 192144 80263864 8E220004 */ lw $v0, 4($s1)
/* 192148 80263868 02A0202D */ daddu $a0, $s5, $zero
/* 19214C 8026386C 0C098C0B */ jal player_create_target_list
/* 192150 80263870 AE820184 */ sw $v0, 0x184($s4)
/* 192154 80263874 82A2040C */ lb $v0, 0x40c($s5)
/* 192158 80263878 10400003 */ beqz $v0, .L80263888
/* 19215C 8026387C 00000000 */ nop
/* 192160 80263880 24160001 */ addiu $s6, $zero, 1
/* 192164 80263884 A27601F6 */ sb $s6, 0x1f6($s3)
.L80263888:
/* 192168 80263888 82E20005 */ lb $v0, 5($s7)
/* 19216C 8026388C 0050102A */ slt $v0, $v0, $s0
/* 192170 80263890 54400001 */ bnel $v0, $zero, .L80263898
/* 192174 80263894 A26001F6 */ sb $zero, 0x1f6($s3)
.L80263898:
/* 192178 80263898 82A2040C */ lb $v0, 0x40c($s5)
/* 19217C 8026389C 14400002 */ bnez $v0, .L802638A8
/* 192180 802638A0 2402FFFE */ addiu $v0, $zero, -2
/* 192184 802638A4 A26201F6 */ sb $v0, 0x1f6($s3)
.L802638A8:
/* 192188 802638A8 3C02800E */ lui $v0, %hi(gBattleStatus+0x4)
/* 19218C 802638AC 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0)
/* 192190 802638B0 30421000 */ andi $v0, $v0, 0x1000
/* 192194 802638B4 10400002 */ beqz $v0, .L802638C0
/* 192198 802638B8 2402FFFF */ addiu $v0, $zero, -1
/* 19219C 802638BC A3C201F6 */ sb $v0, 0x1f6($fp)
.L802638C0:
/* 1921A0 802638C0 9282020E */ lbu $v0, 0x20e($s4)
/* 1921A4 802638C4 26520001 */ addiu $s2, $s2, 1
/* 1921A8 802638C8 0242102A */ slt $v0, $s2, $v0
/* 1921AC 802638CC 1440FFCB */ bnez $v0, .L802637FC
/* 1921B0 802638D0 26730001 */ addiu $s3, $s3, 1
.L802638D4:
/* 1921B4 802638D4 16C00002 */ bnez $s6, .L802638E0
/* 1921B8 802638D8 24020001 */ addiu $v0, $zero, 1
/* 1921BC 802638DC 2402FFFF */ addiu $v0, $zero, -1
.L802638E0:
/* 1921C0 802638E0 A282007F */ sb $v0, 0x7f($s4)
.L802638E4:
/* 1921C4 802638E4 8FBF0034 */ lw $ra, 0x34($sp)
/* 1921C8 802638E8 8FBE0030 */ lw $fp, 0x30($sp)
/* 1921CC 802638EC 8FB7002C */ lw $s7, 0x2c($sp)
/* 1921D0 802638F0 8FB60028 */ lw $s6, 0x28($sp)
/* 1921D4 802638F4 8FB50024 */ lw $s5, 0x24($sp)
/* 1921D8 802638F8 8FB40020 */ lw $s4, 0x20($sp)
/* 1921DC 802638FC 8FB3001C */ lw $s3, 0x1c($sp)
/* 1921E0 80263900 8FB20018 */ lw $s2, 0x18($sp)
/* 1921E4 80263904 8FB10014 */ lw $s1, 0x14($sp)
/* 1921E8 80263908 8FB00010 */ lw $s0, 0x10($sp)
/* 1921EC 8026390C 03E00008 */ jr $ra
/* 1921F0 80263910 27BD0038 */ addiu $sp, $sp, 0x38