papermario/asm/nonmatchings/code_105700_len_2130/func_802E421C.s

169 lines
8.5 KiB
ArmAsm
Raw Normal View History

2020-09-24 05:16:13 +02:00
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802E421C
/* 105A9C 802E421C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 105AA0 802E4220 AFB1001C */ sw $s1, 0x1c($sp)
/* 105AA4 802E4224 0080882D */ daddu $s1, $a0, $zero
/* 105AA8 802E4228 AFBF0024 */ sw $ra, 0x24($sp)
/* 105AAC 802E422C AFB20020 */ sw $s2, 0x20($sp)
/* 105AB0 802E4230 AFB00018 */ sw $s0, 0x18($sp)
/* 105AB4 802E4234 0C0441A9 */ jal get_entity_type
/* 105AB8 802E4238 92240004 */ lbu $a0, 4($s1)
/* 105ABC 802E423C 3C04802F */ lui $a0, 0x802f
/* 105AC0 802E4240 2484A07C */ addiu $a0, $a0, -0x5f84
/* 105AC4 802E4244 0040182D */ daddu $v1, $v0, $zero
/* 105AC8 802E4248 28620015 */ slti $v0, $v1, 0x15
/* 105ACC 802E424C 10400005 */ beqz $v0, .L802E4264
/* 105AD0 802E4250 28620012 */ slti $v0, $v1, 0x12
/* 105AD4 802E4254 14400003 */ bnez $v0, .L802E4264
/* 105AD8 802E4258 00000000 */ nop
/* 105ADC 802E425C 3C04802F */ lui $a0, 0x802f
/* 105AE0 802E4260 2484A0A0 */ addiu $a0, $a0, -0x5f60
.L802E4264:
/* 105AE4 802E4264 C6220048 */ lwc1 $f2, 0x48($s1)
/* 105AE8 802E4268 C624004C */ lwc1 $f4, 0x4c($s1)
/* 105AEC 802E426C C6260050 */ lwc1 $f6, 0x50($s1)
/* 105AF0 802E4270 C6200064 */ lwc1 $f0, 0x64($s1)
/* 105AF4 802E4274 3C028000 */ lui $v0, 0x8000
/* 105AF8 802E4278 AFA20014 */ sw $v0, 0x14($sp)
/* 105AFC 802E427C 4600020D */ trunc.w.s $f8, $f0
/* 105B00 802E4280 E7A80010 */ swc1 $f8, 0x10($sp)
/* 105B04 802E4284 4600120D */ trunc.w.s $f8, $f2
/* 105B08 802E4288 44054000 */ mfc1 $a1, $f8
/* 105B0C 802E428C 4600220D */ trunc.w.s $f8, $f4
/* 105B10 802E4290 44064000 */ mfc1 $a2, $f8
/* 105B14 802E4294 4600320D */ trunc.w.s $f8, $f6
/* 105B18 802E4298 44074000 */ mfc1 $a3, $f8
/* 105B1C 802E429C 0C044631 */ jal create_entity
/* 105B20 802E42A0 00000000 */ nop
/* 105B24 802E42A4 0040902D */ daddu $s2, $v0, $zero
/* 105B28 802E42A8 0C04417A */ jal get_entity_by_index
/* 105B2C 802E42AC 0240202D */ daddu $a0, $s2, $zero
/* 105B30 802E42B0 0040802D */ daddu $s0, $v0, $zero
/* 105B34 802E42B4 8E020000 */ lw $v0, ($s0)
/* 105B38 802E42B8 34430001 */ ori $v1, $v0, 1
/* 105B3C 802E42BC AE030000 */ sw $v1, ($s0)
/* 105B40 802E42C0 8E220000 */ lw $v0, ($s1)
/* 105B44 802E42C4 3C040004 */ lui $a0, 4
/* 105B48 802E42C8 00441024 */ and $v0, $v0, $a0
/* 105B4C 802E42CC 10400002 */ beqz $v0, .L802E42D8
/* 105B50 802E42D0 00641025 */ or $v0, $v1, $a0
/* 105B54 802E42D4 AE020000 */ sw $v0, ($s0)
.L802E42D8:
/* 105B58 802E42D8 8E220000 */ lw $v0, ($s1)
/* 105B5C 802E42DC 30420004 */ andi $v0, $v0, 4
/* 105B60 802E42E0 10400004 */ beqz $v0, .L802E42F4
/* 105B64 802E42E4 00000000 */ nop
/* 105B68 802E42E8 8E020000 */ lw $v0, ($s0)
/* 105B6C 802E42EC 34420004 */ ori $v0, $v0, 4
/* 105B70 802E42F0 AE020000 */ sw $v0, ($s0)
.L802E42F4:
/* 105B74 802E42F4 0C044181 */ jal get_shadow_by_index
/* 105B78 802E42F8 86040016 */ lh $a0, 0x16($s0)
/* 105B7C 802E42FC 0040282D */ daddu $a1, $v0, $zero
/* 105B80 802E4300 3C020040 */ lui $v0, 0x40
/* 105B84 802E4304 34420001 */ ori $v0, $v0, 1
/* 105B88 802E4308 8CA30000 */ lw $v1, ($a1)
/* 105B8C 802E430C 0220202D */ daddu $a0, $s1, $zero
/* 105B90 802E4310 00621825 */ or $v1, $v1, $v0
/* 105B94 802E4314 0C044AC8 */ jal func_80112B20
/* 105B98 802E4318 ACA30000 */ sw $v1, ($a1)
/* 105B9C 802E431C 92240004 */ lbu $a0, 4($s1)
/* 105BA0 802E4320 0C0441A9 */ jal get_entity_type
/* 105BA4 802E4324 0040802D */ daddu $s0, $v0, $zero
/* 105BA8 802E4328 0040182D */ daddu $v1, $v0, $zero
/* 105BAC 802E432C 24020012 */ addiu $v0, $zero, 0x12
/* 105BB0 802E4330 10620003 */ beq $v1, $v0, .L802E4340
/* 105BB4 802E4334 24020014 */ addiu $v0, $zero, 0x14
/* 105BB8 802E4338 14620005 */ bne $v1, $v0, .L802E4350
/* 105BBC 802E433C 00000000 */ nop
.L802E4340:
/* 105BC0 802E4340 3C04802F */ lui $a0, 0x802f
/* 105BC4 802E4344 2484A660 */ addiu $a0, $a0, -0x59a0
/* 105BC8 802E4348 080B90DA */ j .L802E4368
/* 105BCC 802E434C 00000000 */ nop
.L802E4350:
/* 105BD0 802E4350 3C04802F */ lui $a0, 0x802f
/* 105BD4 802E4354 2484A63C */ addiu $a0, $a0, -0x59c4
/* 105BD8 802E4358 12000003 */ beqz $s0, .L802E4368
/* 105BDC 802E435C 00000000 */ nop
/* 105BE0 802E4360 3C04802F */ lui $a0, 0x802f
/* 105BE4 802E4364 2484A618 */ addiu $a0, $a0, -0x59e8
.L802E4368:
/* 105BE8 802E4368 C6220048 */ lwc1 $f2, 0x48($s1)
/* 105BEC 802E436C C624004C */ lwc1 $f4, 0x4c($s1)
/* 105BF0 802E4370 C6260050 */ lwc1 $f6, 0x50($s1)
/* 105BF4 802E4374 C6200064 */ lwc1 $f0, 0x64($s1)
/* 105BF8 802E4378 3C028000 */ lui $v0, 0x8000
/* 105BFC 802E437C AFA20014 */ sw $v0, 0x14($sp)
/* 105C00 802E4380 4600020D */ trunc.w.s $f8, $f0
/* 105C04 802E4384 E7A80010 */ swc1 $f8, 0x10($sp)
/* 105C08 802E4388 4600120D */ trunc.w.s $f8, $f2
/* 105C0C 802E438C 44054000 */ mfc1 $a1, $f8
/* 105C10 802E4390 4600220D */ trunc.w.s $f8, $f4
/* 105C14 802E4394 44064000 */ mfc1 $a2, $f8
/* 105C18 802E4398 4600320D */ trunc.w.s $f8, $f6
/* 105C1C 802E439C 44074000 */ mfc1 $a3, $f8
/* 105C20 802E43A0 0C044631 */ jal create_entity
/* 105C24 802E43A4 00000000 */ nop
/* 105C28 802E43A8 0C04417A */ jal get_entity_by_index
/* 105C2C 802E43AC 0040202D */ daddu $a0, $v0, $zero
/* 105C30 802E43B0 9223000B */ lbu $v1, 0xb($s1)
/* 105C34 802E43B4 0040802D */ daddu $s0, $v0, $zero
/* 105C38 802E43B8 A203000B */ sb $v1, 0xb($s0)
/* 105C3C 802E43BC 8E220000 */ lw $v0, ($s1)
/* 105C40 802E43C0 30420001 */ andi $v0, $v0, 1
/* 105C44 802E43C4 14400005 */ bnez $v0, .L802E43DC
/* 105C48 802E43C8 24020020 */ addiu $v0, $zero, 0x20
/* 105C4C 802E43CC 9222000B */ lbu $v0, 0xb($s1)
/* 105C50 802E43D0 2C4200FF */ sltiu $v0, $v0, 0xff
/* 105C54 802E43D4 10400002 */ beqz $v0, .L802E43E0
/* 105C58 802E43D8 24020020 */ addiu $v0, $zero, 0x20
.L802E43DC:
/* 105C5C 802E43DC A202000B */ sb $v0, 0xb($s0)
.L802E43E0:
/* 105C60 802E43E0 8E220000 */ lw $v0, ($s1)
/* 105C64 802E43E4 3C030004 */ lui $v1, 4
/* 105C68 802E43E8 00431024 */ and $v0, $v0, $v1
/* 105C6C 802E43EC 10400004 */ beqz $v0, .L802E4400
/* 105C70 802E43F0 00000000 */ nop
/* 105C74 802E43F4 8E020000 */ lw $v0, ($s0)
/* 105C78 802E43F8 00431025 */ or $v0, $v0, $v1
/* 105C7C 802E43FC AE020000 */ sw $v0, ($s0)
.L802E4400:
/* 105C80 802E4400 8E020040 */ lw $v0, 0x40($s0)
/* 105C84 802E4404 A4520012 */ sh $s2, 0x12($v0)
/* 105C88 802E4408 8E220000 */ lw $v0, ($s1)
/* 105C8C 802E440C 30420004 */ andi $v0, $v0, 4
/* 105C90 802E4410 10400004 */ beqz $v0, .L802E4424
/* 105C94 802E4414 2403FEFF */ addiu $v1, $zero, -0x101
/* 105C98 802E4418 8E020000 */ lw $v0, ($s0)
/* 105C9C 802E441C 34420004 */ ori $v0, $v0, 4
/* 105CA0 802E4420 AE020000 */ sw $v0, ($s0)
.L802E4424:
/* 105CA4 802E4424 8E220000 */ lw $v0, ($s1)
/* 105CA8 802E4428 86240016 */ lh $a0, 0x16($s1)
/* 105CAC 802E442C 00431024 */ and $v0, $v0, $v1
/* 105CB0 802E4430 0C044181 */ jal get_shadow_by_index
/* 105CB4 802E4434 AE220000 */ sw $v0, ($s1)
/* 105CB8 802E4438 0040282D */ daddu $a1, $v0, $zero
/* 105CBC 802E443C 3C031000 */ lui $v1, 0x1000
/* 105CC0 802E4440 8CA20000 */ lw $v0, ($a1)
/* 105CC4 802E4444 34630001 */ ori $v1, $v1, 1
/* 105CC8 802E4448 00431025 */ or $v0, $v0, $v1
/* 105CCC 802E444C ACA20000 */ sw $v0, ($a1)
/* 105CD0 802E4450 0C044181 */ jal get_shadow_by_index
/* 105CD4 802E4454 86040016 */ lh $a0, 0x16($s0)
/* 105CD8 802E4458 0040282D */ daddu $a1, $v0, $zero
/* 105CDC 802E445C 8CA20000 */ lw $v0, ($a1)
/* 105CE0 802E4460 3C030040 */ lui $v1, 0x40
/* 105CE4 802E4464 00431025 */ or $v0, $v0, $v1
/* 105CE8 802E4468 ACA20000 */ sw $v0, ($a1)
/* 105CEC 802E446C 8FBF0024 */ lw $ra, 0x24($sp)
/* 105CF0 802E4470 8FB20020 */ lw $s2, 0x20($sp)
/* 105CF4 802E4474 8FB1001C */ lw $s1, 0x1c($sp)
/* 105CF8 802E4478 8FB00018 */ lw $s0, 0x18($sp)
/* 105CFC 802E447C 03E00008 */ jr $ra
/* 105D00 802E4480 27BD0028 */ addiu $sp, $sp, 0x28