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

187 lines
9.8 KiB
ArmAsm
Generated

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802616F4
/* 18FFD4 802616F4 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 18FFD8 802616F8 AFB20020 */ sw $s2, 0x20($sp)
/* 18FFDC 802616FC 0080902D */ daddu $s2, $a0, $zero
/* 18FFE0 80261700 AFB00018 */ sw $s0, 0x18($sp)
/* 18FFE4 80261704 00A0802D */ daddu $s0, $a1, $zero
/* 18FFE8 80261708 2404FFF6 */ addiu $a0, $zero, -0xa
/* 18FFEC 8026170C AFBF0024 */ sw $ra, 0x24($sp)
/* 18FFF0 80261710 0C00EABB */ jal get_npc_unsafe
/* 18FFF4 80261714 AFB1001C */ sw $s1, 0x1c($sp)
/* 18FFF8 80261718 12000024 */ beqz $s0, .L802617AC
/* 18FFFC 8026171C 0040882D */ daddu $s1, $v0, $zero
/* 190000 80261720 AE400074 */ sw $zero, 0x74($s2)
/* 190004 80261724 C622003C */ lwc1 $f2, 0x3c($s1)
/* 190008 80261728 3C013ECC */ lui $at, 0x3ecc
/* 19000C 8026172C 3421CCCD */ ori $at, $at, 0xcccd
/* 190010 80261730 44810000 */ mtc1 $at, $f0
/* 190014 80261734 AFA00014 */ sw $zero, 0x14($sp)
/* 190018 80261738 E7A00010 */ swc1 $f0, 0x10($sp)
/* 19001C 8026173C 8E250038 */ lw $a1, 0x38($s1)
/* 190020 80261740 8E26003C */ lw $a2, 0x3c($s1)
/* 190024 80261744 8E270040 */ lw $a3, 0x40($s1)
/* 190028 80261748 3C01802A */ lui $at, %hi(D_8029FB94)
/* 19002C 8026174C E422FB94 */ swc1 $f2, %lo(D_8029FB94)($at)
/* 190030 80261750 0C01C5D4 */ jal func_80071750
/* 190034 80261754 0000202D */ daddu $a0, $zero, $zero
/* 190038 80261758 3C013727 */ lui $at, 0x3727
/* 19003C 8026175C 3421C5AC */ ori $at, $at, 0xc5ac
/* 190040 80261760 44810000 */ mtc1 $at, $f0
/* 190044 80261764 AFA00014 */ sw $zero, 0x14($sp)
/* 190048 80261768 E7A00010 */ swc1 $f0, 0x10($sp)
/* 19004C 8026176C 8E250038 */ lw $a1, 0x38($s1)
/* 190050 80261770 8E26003C */ lw $a2, 0x3c($s1)
/* 190054 80261774 8E270040 */ lw $a3, 0x40($s1)
/* 190058 80261778 3C01802A */ lui $at, %hi(D_8029FB98)
/* 19005C 8026177C AC22FB98 */ sw $v0, %lo(D_8029FB98)($at)
/* 190060 80261780 0C01C5D4 */ jal func_80071750
/* 190064 80261784 24040003 */ addiu $a0, $zero, 3
/* 190068 80261788 3C01802A */ lui $at, %hi(D_8029FB9C)
/* 19006C 8026178C AC22FB9C */ sw $v0, %lo(D_8029FB9C)($at)
/* 190070 80261790 2402000C */ addiu $v0, $zero, 0xc
/* 190074 80261794 3C01802A */ lui $at, %hi(D_8029FBA4)
/* 190078 80261798 A420FBA4 */ sh $zero, %lo(D_8029FBA4)($at)
/* 19007C 8026179C 3C01802A */ lui $at, %hi(D_8029FB90)
/* 190080 802617A0 AC22FB90 */ sw $v0, %lo(D_8029FB90)($at)
/* 190084 802617A4 0C05272D */ jal play_sound
/* 190088 802617A8 24042074 */ addiu $a0, $zero, 0x2074
.L802617AC:
/* 19008C 802617AC 3C0140C9 */ lui $at, 0x40c9
/* 190090 802617B0 34210FD0 */ ori $at, $at, 0xfd0
/* 190094 802617B4 44810000 */ mtc1 $at, $f0
/* 190098 802617B8 C64C0074 */ lwc1 $f12, 0x74($s2)
/* 19009C 802617BC 46806320 */ cvt.s.w $f12, $f12
/* 1900A0 802617C0 46006302 */ mul.s $f12, $f12, $f0
/* 1900A4 802617C4 00000000 */ nop
/* 1900A8 802617C8 3C0143B4 */ lui $at, 0x43b4
/* 1900AC 802617CC 44810000 */ mtc1 $at, $f0
/* 1900B0 802617D0 0C00A85B */ jal sin_rad
/* 1900B4 802617D4 46006303 */ div.s $f12, $f12, $f0
/* 1900B8 802617D8 3C014040 */ lui $at, 0x4040
/* 1900BC 802617DC 44811000 */ mtc1 $at, $f2
/* 1900C0 802617E0 00000000 */ nop
/* 1900C4 802617E4 46020002 */ mul.s $f0, $f0, $f2
/* 1900C8 802617E8 00000000 */ nop
/* 1900CC 802617EC 3C01802A */ lui $at, %hi(D_8029FB94)
/* 1900D0 802617F0 C422FB94 */ lwc1 $f2, %lo(D_8029FB94)($at)
/* 1900D4 802617F4 46001080 */ add.s $f2, $f2, $f0
/* 1900D8 802617F8 E622003C */ swc1 $f2, 0x3c($s1)
/* 1900DC 802617FC 8E420074 */ lw $v0, 0x74($s2)
/* 1900E0 80261800 2442000A */ addiu $v0, $v0, 0xa
/* 1900E4 80261804 44826000 */ mtc1 $v0, $f12
/* 1900E8 80261808 00000000 */ nop
/* 1900EC 8026180C 46806320 */ cvt.s.w $f12, $f12
/* 1900F0 80261810 0C00A6C9 */ jal clamp_angle
/* 1900F4 80261814 AE420074 */ sw $v0, 0x74($s2)
/* 1900F8 80261818 4600018D */ trunc.w.s $f6, $f0
/* 1900FC 8026181C E6460074 */ swc1 $f6, 0x74($s2)
/* 190100 80261820 3C05802A */ lui $a1, %hi(D_8029FB98)
/* 190104 80261824 8CA5FB98 */ lw $a1, %lo(D_8029FB98)($a1)
/* 190108 80261828 C6200038 */ lwc1 $f0, 0x38($s1)
/* 19010C 8026182C 3C014180 */ lui $at, 0x4180
/* 190110 80261830 44811000 */ mtc1 $at, $f2
/* 190114 80261834 8CA2000C */ lw $v0, 0xc($a1)
/* 190118 80261838 E4400004 */ swc1 $f0, 4($v0)
/* 19011C 8026183C C620003C */ lwc1 $f0, 0x3c($s1)
/* 190120 80261840 46020000 */ add.s $f0, $f0, $f2
/* 190124 80261844 3C08802A */ lui $t0, %hi(D_8029FB9C)
/* 190128 80261848 2508FB9C */ addiu $t0, $t0, %lo(D_8029FB9C)
/* 19012C 8026184C E4400008 */ swc1 $f0, 8($v0)
/* 190130 80261850 C6200040 */ lwc1 $f0, 0x40($s1)
/* 190134 80261854 8D040000 */ lw $a0, ($t0)
/* 190138 80261858 E440000C */ swc1 $f0, 0xc($v0)
/* 19013C 8026185C 8C82000C */ lw $v0, 0xc($a0)
/* 190140 80261860 C6200038 */ lwc1 $f0, 0x38($s1)
/* 190144 80261864 E4400004 */ swc1 $f0, 4($v0)
/* 190148 80261868 C620003C */ lwc1 $f0, 0x3c($s1)
/* 19014C 8026186C 46020000 */ add.s $f0, $f0, $f2
/* 190150 80261870 3C0140A0 */ lui $at, 0x40a0
/* 190154 80261874 44811000 */ mtc1 $at, $f2
/* 190158 80261878 E4400008 */ swc1 $f0, 8($v0)
/* 19015C 8026187C C6200040 */ lwc1 $f0, 0x40($s1)
/* 190160 80261880 46020000 */ add.s $f0, $f0, $f2
/* 190164 80261884 3C07802A */ lui $a3, %hi(D_8029FBA4)
/* 190168 80261888 24E7FBA4 */ addiu $a3, $a3, %lo(D_8029FBA4)
/* 19016C 8026188C E440000C */ swc1 $f0, 0xc($v0)
/* 190170 80261890 84E30000 */ lh $v1, ($a3)
/* 190174 80261894 24060002 */ addiu $a2, $zero, 2
/* 190178 80261898 14660011 */ bne $v1, $a2, .L802618E0
/* 19017C 8026189C 24020001 */ addiu $v0, $zero, 1
/* 190180 802618A0 8CA2000C */ lw $v0, 0xc($a1)
/* 190184 802618A4 3C013727 */ lui $at, 0x3727
/* 190188 802618A8 3421C5AC */ ori $at, $at, 0xc5ac
/* 19018C 802618AC 44810000 */ mtc1 $at, $f0
/* 190190 802618B0 00000000 */ nop
/* 190194 802618B4 E4400030 */ swc1 $f0, 0x30($v0)
/* 190198 802618B8 8C82000C */ lw $v0, 0xc($a0)
/* 19019C 802618BC E4400030 */ swc1 $f0, 0x30($v0)
/* 1901A0 802618C0 8CA20000 */ lw $v0, ($a1)
/* 1901A4 802618C4 34420010 */ ori $v0, $v0, 0x10
/* 1901A8 802618C8 ACA20000 */ sw $v0, ($a1)
/* 1901AC 802618CC 8C830000 */ lw $v1, ($a0)
/* 1901B0 802618D0 24020001 */ addiu $v0, $zero, 1
/* 1901B4 802618D4 34630010 */ ori $v1, $v1, 0x10
/* 1901B8 802618D8 08098667 */ j .L8026199C
/* 1901BC 802618DC AC830000 */ sw $v1, ($a0)
.L802618E0:
/* 1901C0 802618E0 1462002E */ bne $v1, $v0, .L8026199C
/* 1901C4 802618E4 0000102D */ daddu $v0, $zero, $zero
/* 1901C8 802618E8 8CA2000C */ lw $v0, 0xc($a1)
/* 1901CC 802618EC C4400030 */ lwc1 $f0, 0x30($v0)
/* 1901D0 802618F0 3C01802A */ lui $at, %hi(D_8029D590)
/* 1901D4 802618F4 D422D590 */ ldc1 $f2, %lo(D_8029D590)($at)
/* 1901D8 802618F8 46000021 */ cvt.d.s $f0, $f0
/* 1901DC 802618FC 46220000 */ add.d $f0, $f0, $f2
/* 1901E0 80261900 3C01400C */ lui $at, 0x400c
/* 1901E4 80261904 44812800 */ mtc1 $at, $f5
/* 1901E8 80261908 44802000 */ mtc1 $zero, $f4
/* 1901EC 8026190C 46200020 */ cvt.s.d $f0, $f0
/* 1901F0 80261910 460000A1 */ cvt.d.s $f2, $f0
/* 1901F4 80261914 4622203C */ c.lt.d $f4, $f2
/* 1901F8 80261918 00000000 */ nop
/* 1901FC 8026191C 45000005 */ bc1f .L80261934
/* 190200 80261920 E4400030 */ swc1 $f0, 0x30($v0)
/* 190204 80261924 3C014060 */ lui $at, 0x4060
/* 190208 80261928 44810000 */ mtc1 $at, $f0
/* 19020C 8026192C 00000000 */ nop
/* 190210 80261930 E4400030 */ swc1 $f0, 0x30($v0)
.L80261934:
/* 190214 80261934 3C03802A */ lui $v1, %hi(D_8029FB90)
/* 190218 80261938 2463FB90 */ addiu $v1, $v1, %lo(D_8029FB90)
/* 19021C 8026193C 8C620000 */ lw $v0, ($v1)
/* 190220 80261940 10400003 */ beqz $v0, .L80261950
/* 190224 80261944 2442FFFF */ addiu $v0, $v0, -1
/* 190228 80261948 08098666 */ j .L80261998
/* 19022C 8026194C AC620000 */ sw $v0, ($v1)
.L80261950:
/* 190230 80261950 8D020000 */ lw $v0, ($t0)
/* 190234 80261954 8C42000C */ lw $v0, 0xc($v0)
/* 190238 80261958 C4400030 */ lwc1 $f0, 0x30($v0)
/* 19023C 8026195C 3C013FE0 */ lui $at, 0x3fe0
/* 190240 80261960 44811800 */ mtc1 $at, $f3
/* 190244 80261964 44801000 */ mtc1 $zero, $f2
/* 190248 80261968 46000021 */ cvt.d.s $f0, $f0
/* 19024C 8026196C 46220000 */ add.d $f0, $f0, $f2
/* 190250 80261970 3C014014 */ lui $at, 0x4014
/* 190254 80261974 44812800 */ mtc1 $at, $f5
/* 190258 80261978 44802000 */ mtc1 $zero, $f4
/* 19025C 8026197C 46200020 */ cvt.s.d $f0, $f0
/* 190260 80261980 460000A1 */ cvt.d.s $f2, $f0
/* 190264 80261984 4622203C */ c.lt.d $f4, $f2
/* 190268 80261988 00000000 */ nop
/* 19026C 8026198C 45000002 */ bc1f .L80261998
/* 190270 80261990 E4400030 */ swc1 $f0, 0x30($v0)
/* 190274 80261994 A4E60000 */ sh $a2, ($a3)
.L80261998:
/* 190278 80261998 0000102D */ daddu $v0, $zero, $zero
.L8026199C:
/* 19027C 8026199C 8FBF0024 */ lw $ra, 0x24($sp)
/* 190280 802619A0 8FB20020 */ lw $s2, 0x20($sp)
/* 190284 802619A4 8FB1001C */ lw $s1, 0x1c($sp)
/* 190288 802619A8 8FB00018 */ lw $s0, 0x18($sp)
/* 19028C 802619AC 03E00008 */ jr $ra
/* 190290 802619B0 27BD0028 */ addiu $sp, $sp, 0x28