papermario/asm/nonmatchings/code_18F340/func_80261FB4.s
2020-10-14 23:49:49 -04:00

92 lines
4.6 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80261FB4
/* 190894 80261FB4 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 190898 80261FB8 AFB20018 */ sw $s2, 0x18($sp)
/* 19089C 80261FBC 0080902D */ daddu $s2, $a0, $zero
/* 1908A0 80261FC0 AFBF001C */ sw $ra, 0x1c($sp)
/* 1908A4 80261FC4 AFB10014 */ sw $s1, 0x14($sp)
/* 1908A8 80261FC8 AFB00010 */ sw $s0, 0x10($sp)
/* 1908AC 80261FCC F7B40020 */ sdc1 $f20, 0x20($sp)
/* 1908B0 80261FD0 8E4400AC */ lw $a0, 0xac($s2)
/* 1908B4 80261FD4 0C04C3D6 */ jal get_item_entity
/* 1908B8 80261FD8 00A0802D */ daddu $s0, $a1, $zero
/* 1908BC 80261FDC 3C04800E */ lui $a0, 0x800e
/* 1908C0 80261FE0 8C84C148 */ lw $a0, -0x3eb8($a0)
/* 1908C4 80261FE4 12000004 */ beqz $s0, .L80261FF8
/* 1908C8 80261FE8 0040882D */ daddu $s1, $v0, $zero
/* 1908CC 80261FEC 2402000A */ addiu $v0, $zero, 0xa
/* 1908D0 80261FF0 AE400070 */ sw $zero, 0x70($s2)
/* 1908D4 80261FF4 AE420074 */ sw $v0, 0x74($s2)
.L80261FF8:
/* 1908D8 80261FF8 8E430070 */ lw $v1, 0x70($s2)
/* 1908DC 80261FFC 10600005 */ beqz $v1, .L80262014
/* 1908E0 80262000 24020001 */ addiu $v0, $zero, 1
/* 1908E4 80262004 10620032 */ beq $v1, $v0, .L802620D0
/* 1908E8 80262008 0000102D */ daddu $v0, $zero, $zero
/* 1908EC 8026200C 08098837 */ j .L802620DC
/* 1908F0 80262010 00000000 */ nop
.L80262014:
/* 1908F4 80262014 C4880144 */ lwc1 $f8, 0x144($a0)
/* 1908F8 80262018 C62A0008 */ lwc1 $f10, 8($s1)
/* 1908FC 8026201C C4840148 */ lwc1 $f4, 0x148($a0)
/* 190900 80262020 460A4201 */ sub.s $f8, $f8, $f10
/* 190904 80262024 3C014140 */ lui $at, 0x4140
/* 190908 80262028 44816000 */ mtc1 $at, $f12
/* 19090C 8026202C C482014C */ lwc1 $f2, 0x14c($a0)
/* 190910 80262030 460C2100 */ add.s $f4, $f4, $f12
/* 190914 80262034 3C0140A0 */ lui $at, 0x40a0
/* 190918 80262038 4481A000 */ mtc1 $at, $f20
/* 19091C 8026203C 00000000 */ nop
/* 190920 80262040 46141081 */ sub.s $f2, $f2, $f20
/* 190924 80262044 C620000C */ lwc1 $f0, 0xc($s1)
/* 190928 80262048 46002101 */ sub.s $f4, $f4, $f0
/* 19092C 8026204C C6460074 */ lwc1 $f6, 0x74($s2)
/* 190930 80262050 468031A0 */ cvt.s.w $f6, $f6
/* 190934 80262054 46064203 */ div.s $f8, $f8, $f6
/* 190938 80262058 46085280 */ add.s $f10, $f10, $f8
/* 19093C 8026205C C6200010 */ lwc1 $f0, 0x10($s1)
/* 190940 80262060 46001081 */ sub.s $f2, $f2, $f0
/* 190944 80262064 C628000C */ lwc1 $f8, 0xc($s1)
/* 190948 80262068 46062103 */ div.s $f4, $f4, $f6
/* 19094C 8026206C 46044200 */ add.s $f8, $f8, $f4
/* 190950 80262070 46061083 */ div.s $f2, $f2, $f6
/* 190954 80262074 46020000 */ add.s $f0, $f0, $f2
/* 190958 80262078 E62A0008 */ swc1 $f10, 8($s1)
/* 19095C 8026207C E628000C */ swc1 $f8, 0xc($s1)
/* 190960 80262080 E6200010 */ swc1 $f0, 0x10($s1)
/* 190964 80262084 C4800148 */ lwc1 $f0, 0x148($a0)
/* 190968 80262088 460C0000 */ add.s $f0, $f0, $f12
/* 19096C 8026208C 46004386 */ mov.s $f14, $f8
/* 190970 80262090 8C860144 */ lw $a2, 0x144($a0)
/* 190974 80262094 44070000 */ mfc1 $a3, $f0
/* 190978 80262098 0C00A7B5 */ jal dist2D
/* 19097C 8026209C 46005306 */ mov.s $f12, $f10
/* 190980 802620A0 C622000C */ lwc1 $f2, 0xc($s1)
/* 190984 802620A4 46140003 */ div.s $f0, $f0, $f20
/* 190988 802620A8 46001080 */ add.s $f2, $f2, $f0
/* 19098C 802620AC E622000C */ swc1 $f2, 0xc($s1)
/* 190990 802620B0 8E430074 */ lw $v1, 0x74($s2)
/* 190994 802620B4 24020001 */ addiu $v0, $zero, 1
/* 190998 802620B8 50620001 */ beql $v1, $v0, .L802620C0
/* 19099C 802620BC AE430070 */ sw $v1, 0x70($s2)
.L802620C0:
/* 1909A0 802620C0 8E420074 */ lw $v0, 0x74($s2)
/* 1909A4 802620C4 2442FFFF */ addiu $v0, $v0, -1
/* 1909A8 802620C8 08098836 */ j .L802620D8
/* 1909AC 802620CC AE420074 */ sw $v0, 0x74($s2)
.L802620D0:
/* 1909B0 802620D0 08098837 */ j .L802620DC
/* 1909B4 802620D4 24020002 */ addiu $v0, $zero, 2
.L802620D8:
/* 1909B8 802620D8 0000102D */ daddu $v0, $zero, $zero
.L802620DC:
/* 1909BC 802620DC 8FBF001C */ lw $ra, 0x1c($sp)
/* 1909C0 802620E0 8FB20018 */ lw $s2, 0x18($sp)
/* 1909C4 802620E4 8FB10014 */ lw $s1, 0x14($sp)
/* 1909C8 802620E8 8FB00010 */ lw $s0, 0x10($sp)
/* 1909CC 802620EC D7B40020 */ ldc1 $f20, 0x20($sp)
/* 1909D0 802620F0 03E00008 */ jr $ra
/* 1909D4 802620F4 27BD0028 */ addiu $sp, $sp, 0x28