papermario/asm/nonmatchings/battle/area_omo/5134B0/func_80218FB0_513580.s

140 lines
7.3 KiB
ArmAsm
Raw Normal View History

2020-12-28 06:34:30 +01:00
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80218FB0_513580
/* 513580 80218FB0 27BDFF30 */ addiu $sp, $sp, -0xd0
/* 513584 80218FB4 AFB500AC */ sw $s5, 0xac($sp)
/* 513588 80218FB8 AFBF00B0 */ sw $ra, 0xb0($sp)
/* 51358C 80218FBC AFB400A8 */ sw $s4, 0xa8($sp)
/* 513590 80218FC0 AFB300A4 */ sw $s3, 0xa4($sp)
/* 513594 80218FC4 AFB200A0 */ sw $s2, 0xa0($sp)
/* 513598 80218FC8 AFB1009C */ sw $s1, 0x9c($sp)
/* 51359C 80218FCC AFB00098 */ sw $s0, 0x98($sp)
/* 5135A0 80218FD0 F7B800C8 */ sdc1 $f24, 0xc8($sp)
/* 5135A4 80218FD4 F7B600C0 */ sdc1 $f22, 0xc0($sp)
/* 5135A8 80218FD8 F7B400B8 */ sdc1 $f20, 0xb8($sp)
/* 5135AC 80218FDC 10A0001F */ beqz $a1, .L8021905C
/* 5135B0 80218FE0 0080A82D */ daddu $s5, $a0, $zero
/* 5135B4 80218FE4 0C00AB39 */ jal heap_malloc
/* 5135B8 80218FE8 24040018 */ addiu $a0, $zero, 0x18
/* 5135BC 80218FEC 0040902D */ daddu $s2, $v0, $zero
/* 5135C0 80218FF0 0000A02D */ daddu $s4, $zero, $zero
/* 5135C4 80218FF4 2650000C */ addiu $s0, $s2, 0xc
/* 5135C8 80218FF8 3C138023 */ lui $s3, %hi(D_8022DA34)
/* 5135CC 80218FFC 2673DA34 */ addiu $s3, $s3, %lo(D_8022DA34)
/* 5135D0 80219000 3C014060 */ lui $at, 0x4060
/* 5135D4 80219004 4481A000 */ mtc1 $at, $f20
/* 5135D8 80219008 3C118023 */ lui $s1, %hi(D_8022DA30)
/* 5135DC 8021900C 2631DA30 */ addiu $s1, $s1, %lo(D_8022DA30)
/* 5135E0 80219010 AEB20070 */ sw $s2, 0x70($s5)
.L80219014:
/* 5135E4 80219014 8E220000 */ lw $v0, ($s1)
/* 5135E8 80219018 26310004 */ addiu $s1, $s1, 4
/* 5135EC 8021901C 26940001 */ addiu $s4, $s4, 1
/* 5135F0 80219020 AE020004 */ sw $v0, 4($s0)
/* 5135F4 80219024 0040202D */ daddu $a0, $v0, $zero
/* 5135F8 80219028 8E620000 */ lw $v0, ($s3)
/* 5135FC 8021902C 26730004 */ addiu $s3, $s3, 4
/* 513600 80219030 0C046C04 */ jal get_model_list_index_from_tree_index
/* 513604 80219034 AE020008 */ sw $v0, 8($s0)
/* 513608 80219038 0C046B4C */ jal get_model_from_list_index
/* 51360C 8021903C 0040202D */ daddu $a0, $v0, $zero
/* 513610 80219040 AE400000 */ sw $zero, ($s2)
/* 513614 80219044 AE00FFF8 */ sw $zero, -8($s0)
/* 513618 80219048 E614FFFC */ swc1 $f20, -4($s0)
/* 51361C 8021904C AE000000 */ sw $zero, ($s0)
/* 513620 80219050 26100018 */ addiu $s0, $s0, 0x18
/* 513624 80219054 1280FFEF */ beqz $s4, .L80219014
/* 513628 80219058 26520018 */ addiu $s2, $s2, 0x18
.L8021905C:
/* 51362C 8021905C 0000A02D */ daddu $s4, $zero, $zero
/* 513630 80219060 27B30058 */ addiu $s3, $sp, 0x58
/* 513634 80219064 8EB20070 */ lw $s2, 0x70($s5)
/* 513638 80219068 4480C000 */ mtc1 $zero, $f24
/* 51363C 8021906C 26510004 */ addiu $s1, $s2, 4
.L80219070:
/* 513640 80219070 C62C0008 */ lwc1 $f12, 8($s1)
/* 513644 80219074 C6200004 */ lwc1 $f0, 4($s1)
/* 513648 80219078 46006300 */ add.s $f12, $f12, $f0
/* 51364C 8021907C 0C00A6C9 */ jal clamp_angle
/* 513650 80219080 E62C0008 */ swc1 $f12, 8($s1)
/* 513654 80219084 3C014048 */ lui $at, 0x4048
/* 513658 80219088 3421F5C3 */ ori $at, $at, 0xf5c3
/* 51365C 8021908C 44816000 */ mtc1 $at, $f12
/* 513660 80219090 00000000 */ nop
/* 513664 80219094 460C0302 */ mul.s $f12, $f0, $f12
/* 513668 80219098 00000000 */ nop
/* 51366C 8021909C 3C014334 */ lui $at, 0x4334
/* 513670 802190A0 44811000 */ mtc1 $at, $f2
/* 513674 802190A4 E6200008 */ swc1 $f0, 8($s1)
/* 513678 802190A8 0C00A85B */ jal sin_rad
/* 51367C 802190AC 46026303 */ div.s $f12, $f12, $f2
/* 513680 802190B0 3C0141A0 */ lui $at, 0x41a0
/* 513684 802190B4 44811000 */ mtc1 $at, $f2
/* 513688 802190B8 00000000 */ nop
/* 51368C 802190BC 46020502 */ mul.s $f20, $f0, $f2
/* 513690 802190C0 00000000 */ nop
/* 513694 802190C4 4614A582 */ mul.s $f22, $f20, $f20
/* 513698 802190C8 00000000 */ nop
/* 51369C 802190CC 26940001 */ addiu $s4, $s4, 1
/* 5136A0 802190D0 3C0142B4 */ lui $at, 0x42b4
/* 5136A4 802190D4 44810000 */ mtc1 $at, $f0
/* 5136A8 802190D8 8E24000C */ lw $a0, 0xc($s1)
/* 5136AC 802190DC 0C046C04 */ jal get_model_list_index_from_tree_index
/* 5136B0 802190E0 4600B583 */ div.s $f22, $f22, $f0
/* 5136B4 802190E4 0C046B4C */ jal get_model_from_list_index
/* 5136B8 802190E8 0040202D */ daddu $a0, $v0, $zero
/* 5136BC 802190EC 0040802D */ daddu $s0, $v0, $zero
/* 5136C0 802190F0 96020000 */ lhu $v0, ($s0)
/* 5136C4 802190F4 4406C000 */ mfc1 $a2, $f24
/* 5136C8 802190F8 34421400 */ ori $v0, $v0, 0x1400
/* 5136CC 802190FC A6020000 */ sh $v0, ($s0)
/* 5136D0 80219100 C6400000 */ lwc1 $f0, ($s2)
/* 5136D4 80219104 C6220000 */ lwc1 $f2, ($s1)
/* 5136D8 80219108 46000007 */ neg.s $f0, $f0
/* 5136DC 8021910C 46001087 */ neg.s $f2, $f2
/* 5136E0 80219110 44050000 */ mfc1 $a1, $f0
/* 5136E4 80219114 44071000 */ mfc1 $a3, $f2
/* 5136E8 80219118 0C019E40 */ jal guTranslateF
/* 5136EC 8021911C 27A40018 */ addiu $a0, $sp, 0x18
/* 5136F0 80219120 4405A000 */ mfc1 $a1, $f20
/* 5136F4 80219124 4406C000 */ mfc1 $a2, $f24
/* 5136F8 80219128 4407C000 */ mfc1 $a3, $f24
/* 5136FC 8021912C 3C013F80 */ lui $at, 0x3f80
/* 513700 80219130 44810000 */ mtc1 $at, $f0
/* 513704 80219134 0260202D */ daddu $a0, $s3, $zero
/* 513708 80219138 0C019EC8 */ jal guRotateF
/* 51370C 8021913C E7A00010 */ swc1 $f0, 0x10($sp)
/* 513710 80219140 27A40018 */ addiu $a0, $sp, 0x18
/* 513714 80219144 0260282D */ daddu $a1, $s3, $zero
/* 513718 80219148 26100058 */ addiu $s0, $s0, 0x58
/* 51371C 8021914C 0C019D80 */ jal guMtxCatF
/* 513720 80219150 0200302D */ daddu $a2, $s0, $zero
/* 513724 80219154 27A40018 */ addiu $a0, $sp, 0x18
/* 513728 80219158 8E270000 */ lw $a3, ($s1)
/* 51372C 8021915C 26310018 */ addiu $s1, $s1, 0x18
/* 513730 80219160 8E450000 */ lw $a1, ($s2)
/* 513734 80219164 4406B000 */ mfc1 $a2, $f22
/* 513738 80219168 0C019E40 */ jal guTranslateF
/* 51373C 8021916C 26520018 */ addiu $s2, $s2, 0x18
/* 513740 80219170 0200202D */ daddu $a0, $s0, $zero
/* 513744 80219174 27A50018 */ addiu $a1, $sp, 0x18
/* 513748 80219178 0C019D80 */ jal guMtxCatF
/* 51374C 8021917C 0080302D */ daddu $a2, $a0, $zero
/* 513750 80219180 1280FFBB */ beqz $s4, .L80219070
/* 513754 80219184 0000102D */ daddu $v0, $zero, $zero
/* 513758 80219188 8FBF00B0 */ lw $ra, 0xb0($sp)
/* 51375C 8021918C 8FB500AC */ lw $s5, 0xac($sp)
/* 513760 80219190 8FB400A8 */ lw $s4, 0xa8($sp)
/* 513764 80219194 8FB300A4 */ lw $s3, 0xa4($sp)
/* 513768 80219198 8FB200A0 */ lw $s2, 0xa0($sp)
/* 51376C 8021919C 8FB1009C */ lw $s1, 0x9c($sp)
/* 513770 802191A0 8FB00098 */ lw $s0, 0x98($sp)
/* 513774 802191A4 D7B800C8 */ ldc1 $f24, 0xc8($sp)
/* 513778 802191A8 D7B600C0 */ ldc1 $f22, 0xc0($sp)
/* 51377C 802191AC D7B400B8 */ ldc1 $f20, 0xb8($sp)
/* 513780 802191B0 03E00008 */ jr $ra
/* 513784 802191B4 27BD00D0 */ addiu $sp, $sp, 0xd0
/* 513788 802191B8 00000000 */ nop
/* 51378C 802191BC 00000000 */ nop