papermario/asm/nonmatchings/code_13870_len_6980/func_8003B500.s
2021-01-11 21:40:52 +09:00

53 lines
2.5 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003B500
/* 16900 8003B500 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 16904 8003B504 AFBF0018 */ sw $ra, 0x18($sp)
/* 16908 8003B508 808200B6 */ lb $v0, 0xb6($a0)
/* 1690C 8003B50C 10400007 */ beqz $v0, .L8003B52C
/* 16910 8003B510 00000000 */ nop
/* 16914 8003B514 3C013F80 */ lui $at, 0x3f80
/* 16918 8003B518 44810000 */ mtc1 $at, $f0
/* 1691C 8003B51C AC800318 */ sw $zero, 0x318($a0)
/* 16920 8003B520 AC80031C */ sw $zero, 0x31c($a0)
/* 16924 8003B524 A08000B6 */ sb $zero, 0xb6($a0)
/* 16928 8003B528 E4800320 */ swc1 $f0, 0x320($a0)
.L8003B52C:
/* 1692C 8003B52C 8C820000 */ lw $v0, ($a0)
/* 16930 8003B530 3C034000 */ lui $v1, 0x4000
/* 16934 8003B534 00431024 */ and $v0, $v0, $v1
/* 16938 8003B538 54400016 */ bnel $v0, $zero, .L8003B594
/* 1693C 8003B53C AFA60010 */ sw $a2, 0x10($sp)
/* 16940 8003B540 908300AC */ lbu $v1, 0xac($a0)
/* 16944 8003B544 908200AD */ lbu $v0, 0xad($a0)
/* 16948 8003B548 00620018 */ mult $v1, $v0
/* 1694C 8003B54C 00001812 */ mflo $v1
/* 16950 8003B550 3C028080 */ lui $v0, 0x8080
/* 16954 8003B554 34428081 */ ori $v0, $v0, 0x8081
/* 16958 8003B558 00620018 */ mult $v1, $v0
/* 1695C 8003B55C 8C820024 */ lw $v0, 0x24($a0)
/* 16960 8003B560 0000382D */ daddu $a3, $zero, $zero
/* 16964 8003B564 AFA60010 */ sw $a2, 0x10($sp)
/* 16968 8003B568 00004810 */ mfhi $t1
/* 1696C 8003B56C 01233021 */ addu $a2, $t1, $v1
/* 16970 8003B570 000631C3 */ sra $a2, $a2, 7
/* 16974 8003B574 00031FC3 */ sra $v1, $v1, 0x1f
/* 16978 8003B578 00C33023 */ subu $a2, $a2, $v1
/* 1697C 8003B57C 28C400FF */ slti $a0, $a2, 0xff
/* 16980 8003B580 000427C0 */ sll $a0, $a0, 0x1f
/* 16984 8003B584 0C0B78F6 */ jal func_802DE3D8
/* 16988 8003B588 00442025 */ or $a0, $v0, $a0
/* 1698C 8003B58C 0800ED6A */ j .L8003B5A8
/* 16990 8003B590 00000000 */ nop
.L8003B594:
/* 16994 8003B594 3C044000 */ lui $a0, 0x4000
/* 16998 8003B598 34840001 */ ori $a0, $a0, 1
/* 1699C 8003B59C 0000302D */ daddu $a2, $zero, $zero
/* 169A0 8003B5A0 0C0B7710 */ jal render_sprite
/* 169A4 8003B5A4 00C0382D */ daddu $a3, $a2, $zero
.L8003B5A8:
/* 169A8 8003B5A8 8FBF0018 */ lw $ra, 0x18($sp)
/* 169AC 8003B5AC 03E00008 */ jr $ra
/* 169B0 8003B5B0 27BD0020 */ addiu $sp, $sp, 0x20