papermario/asm/nonmatchings/code_13870_len_6980/func_8003DC38.s

229 lines
11 KiB
ArmAsm
Raw Normal View History

2020-08-04 08:49:11 +02:00
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003DC38
/* 019038 8003DC38 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 01903C 8003DC3C 3C028007 */ lui $v0, 0x8007
/* 019040 8003DC40 24427C2C */ addiu $v0, $v0, 0x7c2c
/* 019044 8003DC44 AFBF0020 */ sw $ra, 0x20($sp)
/* 019048 8003DC48 AFB3001C */ sw $s3, 0x1c($sp)
/* 01904C 8003DC4C AFB20018 */ sw $s2, 0x18($sp)
/* 019050 8003DC50 AFB10014 */ sw $s1, 0x14($sp)
/* 019054 8003DC54 AFB00010 */ sw $s0, 0x10($sp)
/* 019058 8003DC58 F7BE0050 */ sdc1 $f30, 0x50($sp)
/* 01905C 8003DC5C F7BC0048 */ sdc1 $f28, 0x48($sp)
/* 019060 8003DC60 F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 019064 8003DC64 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 019068 8003DC68 F7B60030 */ sdc1 $f22, 0x30($sp)
/* 01906C 8003DC6C F7B40028 */ sdc1 $f20, 0x28($sp)
/* 019070 8003DC70 C4400000 */ lwc1 $f0, ($v0)
/* 019074 8003DC74 3C013DCC */ lui $at, 0x3dcc
/* 019078 8003DC78 3421CCCD */ ori $at, $at, 0xcccd
/* 01907C 8003DC7C 44811000 */ mtc1 $at, $f2
/* 019080 8003DC80 00000000 */ nop
/* 019084 8003DC84 46020000 */ add.s $f0, $f0, $f2
/* 019088 8003DC88 E4400000 */ swc1 $f0, ($v0)
/* 01908C 8003DC8C 24020002 */ addiu $v0, $zero, 2
/* 019090 8003DC90 14A2006B */ bne $a1, $v0, .L8003DE40
/* 019094 8003DC94 0080882D */ daddu $s1, $a0, $zero
/* 019098 8003DC98 3C108007 */ lui $s0, 0x8007
/* 01909C 8003DC9C 26107C24 */ addiu $s0, $s0, 0x7c24
/* 0190A0 8003DCA0 C62E003C */ lwc1 $f14, 0x3c($s1)
/* 0190A4 8003DCA4 3C014160 */ lui $at, 0x4160
/* 0190A8 8003DCA8 44810000 */ mtc1 $at, $f0
/* 0190AC 8003DCAC C62C0038 */ lwc1 $f12, 0x38($s1)
/* 0190B0 8003DCB0 46007380 */ add.s $f14, $f14, $f0
/* 0190B4 8003DCB4 3C0140A0 */ lui $at, 0x40a0
/* 0190B8 8003DCB8 44810000 */ mtc1 $at, $f0
/* 0190BC 8003DCBC 8E260040 */ lw $a2, 0x40($s1)
/* 0190C0 8003DCC0 8E070000 */ lw $a3, ($s0)
/* 0190C4 8003DCC4 0C01BF14 */ jal func_8006FC50
/* 0190C8 8003DCC8 46007381 */ sub.s $f14, $f14, $f0
/* 0190CC 8003DCCC C6000000 */ lwc1 $f0, ($s0)
/* 0190D0 8003DCD0 3C01420C */ lui $at, 0x420c
/* 0190D4 8003DCD4 44816000 */ mtc1 $at, $f12
/* 0190D8 8003DCD8 0000982D */ daddu $s3, $zero, $zero
/* 0190DC 8003DCDC 460C0300 */ add.s $f12, $f0, $f12
/* 0190E0 8003DCE0 3C01BE99 */ lui $at, 0xbe99
/* 0190E4 8003DCE4 3421999A */ ori $at, $at, 0x999a
/* 0190E8 8003DCE8 4481F000 */ mtc1 $at, $f30
/* 0190EC 8003DCEC 0C00A6C9 */ jal clamp_angle
/* 0190F0 8003DCF0 0260902D */ daddu $s2, $s3, $zero
/* 0190F4 8003DCF4 E6000000 */ swc1 $f0, ($s0)
.L8003DCF8:
/* 0190F8 8003DCF8 0C00A67F */ jal rand_int
/* 0190FC 8003DCFC 2404000A */ addiu $a0, $zero, 0xa
/* 019100 8003DD00 2442FFFB */ addiu $v0, $v0, -5
/* 019104 8003DD04 4482B000 */ mtc1 $v0, $f22
/* 019108 8003DD08 00000000 */ nop
/* 01910C 8003DD0C 4680B5A0 */ cvt.s.w $f22, $f22
/* 019110 8003DD10 0C00A67F */ jal rand_int
/* 019114 8003DD14 2404000A */ addiu $a0, $zero, 0xa
/* 019118 8003DD18 4616B082 */ mul.s $f2, $f22, $f22
/* 01911C 8003DD1C 00000000 */ nop
/* 019120 8003DD20 2442FFFB */ addiu $v0, $v0, -5
/* 019124 8003DD24 4482C000 */ mtc1 $v0, $f24
/* 019128 8003DD28 00000000 */ nop
/* 01912C 8003DD2C 4680C620 */ cvt.s.w $f24, $f24
/* 019130 8003DD30 4618C102 */ mul.s $f4, $f24, $f24
/* 019134 8003DD34 00000000 */ nop
/* 019138 8003DD38 C62C000C */ lwc1 $f12, 0xc($s1)
/* 01913C 8003DD3C 44920000 */ mtc1 $s2, $f0
/* 019140 8003DD40 00000000 */ nop
/* 019144 8003DD44 46800020 */ cvt.s.w $f0, $f0
/* 019148 8003DD48 46006307 */ neg.s $f12, $f12
/* 01914C 8003DD4C 46006300 */ add.s $f12, $f12, $f0
/* 019150 8003DD50 3C01C000 */ lui $at, 0xc000
/* 019154 8003DD54 4481A000 */ mtc1 $at, $f20
/* 019158 8003DD58 3C0140A0 */ lui $at, 0x40a0
/* 01915C 8003DD5C 44810000 */ mtc1 $at, $f0
/* 019160 8003DD60 46041080 */ add.s $f2, $f2, $f4
/* 019164 8003DD64 3C018007 */ lui $at, 0x8007
/* 019168 8003DD68 A4207C28 */ sh $zero, 0x7c28($at)
/* 01916C 8003DD6C 46001083 */ div.s $f2, $f2, $f0
/* 019170 8003DD70 0C00A6C9 */ jal clamp_angle
/* 019174 8003DD74 4602A501 */ sub.s $f20, $f20, $f2
/* 019178 8003DD78 3C0140C9 */ lui $at, 0x40c9
/* 01917C 8003DD7C 34210FD0 */ ori $at, $at, 0xfd0
/* 019180 8003DD80 44811000 */ mtc1 $at, $f2
/* 019184 8003DD84 00000000 */ nop
/* 019188 8003DD88 46020002 */ mul.s $f0, $f0, $f2
/* 01918C 8003DD8C 00000000 */ nop
/* 019190 8003DD90 3C0143B4 */ lui $at, 0x43b4
/* 019194 8003DD94 44811000 */ mtc1 $at, $f2
/* 019198 8003DD98 00000000 */ nop
/* 01919C 8003DD9C 46020683 */ div.s $f26, $f0, $f2
/* 0191A0 8003DDA0 0C00A85B */ jal sin_rad
/* 0191A4 8003DDA4 4600D306 */ mov.s $f12, $f26
/* 0191A8 8003DDA8 46000706 */ mov.s $f28, $f0
/* 0191AC 8003DDAC 0C00A874 */ jal cos_rad
/* 0191B0 8003DDB0 4600D306 */ mov.s $f12, $f26
/* 0191B4 8003DDB4 862200A6 */ lh $v0, 0xa6($s1)
/* 0191B8 8003DDB8 44822000 */ mtc1 $v0, $f4
/* 0191BC 8003DDBC 00000000 */ nop
/* 0191C0 8003DDC0 46802120 */ cvt.s.w $f4, $f4
/* 0191C4 8003DDC4 461C2182 */ mul.s $f6, $f4, $f28
/* 0191C8 8003DDC8 00000000 */ nop
/* 0191CC 8003DDCC 46002102 */ mul.s $f4, $f4, $f0
/* 0191D0 8003DDD0 00000000 */ nop
/* 0191D4 8003DDD4 3C014178 */ lui $at, 0x4178
/* 0191D8 8003DDD8 44811000 */ mtc1 $at, $f2
/* 0191DC 8003DDDC C620003C */ lwc1 $f0, 0x3c($s1)
/* 0191E0 8003DDE0 46020000 */ add.s $f0, $f0, $f2
/* 0191E4 8003DDE4 46140000 */ add.s $f0, $f0, $f20
/* 0191E8 8003DDE8 461E3182 */ mul.s $f6, $f6, $f30
/* 0191EC 8003DDEC 00000000 */ nop
/* 0191F0 8003DDF0 44060000 */ mfc1 $a2, $f0
/* 0191F4 8003DDF4 C6200038 */ lwc1 $f0, 0x38($s1)
/* 0191F8 8003DDF8 46060000 */ add.s $f0, $f0, $f6
/* 0191FC 8003DDFC 46160000 */ add.s $f0, $f0, $f22
/* 019200 8003DE00 461E2102 */ mul.s $f4, $f4, $f30
/* 019204 8003DE04 00000000 */ nop
/* 019208 8003DE08 44050000 */ mfc1 $a1, $f0
/* 01920C 8003DE0C C6200040 */ lwc1 $f0, 0x40($s1)
/* 019210 8003DE10 46040000 */ add.s $f0, $f0, $f4
/* 019214 8003DE14 46180000 */ add.s $f0, $f0, $f24
/* 019218 8003DE18 2652005A */ addiu $s2, $s2, 0x5a
/* 01921C 8003DE1C 26730001 */ addiu $s3, $s3, 1
/* 019220 8003DE20 44070000 */ mfc1 $a3, $f0
/* 019224 8003DE24 0C01BF2C */ jal func_8006FCB0
/* 019228 8003DE28 24040001 */ addiu $a0, $zero, 1
/* 01922C 8003DE2C 2A620004 */ slti $v0, $s3, 4
/* 019230 8003DE30 1040004E */ beqz $v0, .L8003DF6C
/* 019234 8003DE34 00000000 */ nop
/* 019238 8003DE38 0800F73E */ j .L8003DCF8
/* 01923C 8003DE3C 00000000 */ nop
.L8003DE40:
/* 019240 8003DE40 0C00A67F */ jal rand_int
/* 019244 8003DE44 2404000A */ addiu $a0, $zero, 0xa
/* 019248 8003DE48 2442FFFB */ addiu $v0, $v0, -5
/* 01924C 8003DE4C 4482C000 */ mtc1 $v0, $f24
/* 019250 8003DE50 00000000 */ nop
/* 019254 8003DE54 4680C620 */ cvt.s.w $f24, $f24
/* 019258 8003DE58 0C00A67F */ jal rand_int
/* 01925C 8003DE5C 2404000A */ addiu $a0, $zero, 0xa
/* 019260 8003DE60 4618C002 */ mul.s $f0, $f24, $f24
/* 019264 8003DE64 00000000 */ nop
/* 019268 8003DE68 2442FFFB */ addiu $v0, $v0, -5
/* 01926C 8003DE6C 4482B000 */ mtc1 $v0, $f22
/* 019270 8003DE70 00000000 */ nop
/* 019274 8003DE74 4680B5A0 */ cvt.s.w $f22, $f22
/* 019278 8003DE78 4616B082 */ mul.s $f2, $f22, $f22
/* 01927C 8003DE7C 00000000 */ nop
/* 019280 8003DE80 C62C000C */ lwc1 $f12, 0xc($s1)
/* 019284 8003DE84 3C01C000 */ lui $at, 0xc000
/* 019288 8003DE88 4481A000 */ mtc1 $at, $f20
/* 01928C 8003DE8C 46020000 */ add.s $f0, $f0, $f2
/* 019290 8003DE90 3C018007 */ lui $at, 0x8007
/* 019294 8003DE94 A4207C28 */ sh $zero, 0x7c28($at)
/* 019298 8003DE98 3C0140A0 */ lui $at, 0x40a0
/* 01929C 8003DE9C 44811000 */ mtc1 $at, $f2
/* 0192A0 8003DEA0 46006307 */ neg.s $f12, $f12
/* 0192A4 8003DEA4 46020003 */ div.s $f0, $f0, $f2
/* 0192A8 8003DEA8 0C00A6C9 */ jal clamp_angle
/* 0192AC 8003DEAC 4600A501 */ sub.s $f20, $f20, $f0
/* 0192B0 8003DEB0 3C0140C9 */ lui $at, 0x40c9
/* 0192B4 8003DEB4 34210FD0 */ ori $at, $at, 0xfd0
/* 0192B8 8003DEB8 44811000 */ mtc1 $at, $f2
/* 0192BC 8003DEBC 00000000 */ nop
/* 0192C0 8003DEC0 46020002 */ mul.s $f0, $f0, $f2
/* 0192C4 8003DEC4 00000000 */ nop
/* 0192C8 8003DEC8 3C0143B4 */ lui $at, 0x43b4
/* 0192CC 8003DECC 44811000 */ mtc1 $at, $f2
/* 0192D0 8003DED0 00000000 */ nop
/* 0192D4 8003DED4 46020683 */ div.s $f26, $f0, $f2
/* 0192D8 8003DED8 0C00A85B */ jal sin_rad
/* 0192DC 8003DEDC 4600D306 */ mov.s $f12, $f26
/* 0192E0 8003DEE0 46000706 */ mov.s $f28, $f0
/* 0192E4 8003DEE4 0C00A874 */ jal cos_rad
/* 0192E8 8003DEE8 4600D306 */ mov.s $f12, $f26
/* 0192EC 8003DEEC 862200A6 */ lh $v0, 0xa6($s1)
/* 0192F0 8003DEF0 44822000 */ mtc1 $v0, $f4
/* 0192F4 8003DEF4 00000000 */ nop
/* 0192F8 8003DEF8 46802120 */ cvt.s.w $f4, $f4
/* 0192FC 8003DEFC 461C2182 */ mul.s $f6, $f4, $f28
/* 019300 8003DF00 00000000 */ nop
/* 019304 8003DF04 46002102 */ mul.s $f4, $f4, $f0
/* 019308 8003DF08 00000000 */ nop
/* 01930C 8003DF0C 3C01BE99 */ lui $at, 0xbe99
/* 019310 8003DF10 3421999A */ ori $at, $at, 0x999a
/* 019314 8003DF14 44810000 */ mtc1 $at, $f0
/* 019318 8003DF18 00000000 */ nop
/* 01931C 8003DF1C 46003182 */ mul.s $f6, $f6, $f0
/* 019320 8003DF20 00000000 */ nop
/* 019324 8003DF24 46002102 */ mul.s $f4, $f4, $f0
/* 019328 8003DF28 00000000 */ nop
/* 01932C 8003DF2C 3C014178 */ lui $at, 0x4178
/* 019330 8003DF30 44811000 */ mtc1 $at, $f2
/* 019334 8003DF34 C620003C */ lwc1 $f0, 0x3c($s1)
/* 019338 8003DF38 46020000 */ add.s $f0, $f0, $f2
/* 01933C 8003DF3C 46140000 */ add.s $f0, $f0, $f20
/* 019340 8003DF40 44060000 */ mfc1 $a2, $f0
/* 019344 8003DF44 C6200038 */ lwc1 $f0, 0x38($s1)
/* 019348 8003DF48 46060000 */ add.s $f0, $f0, $f6
/* 01934C 8003DF4C 46180000 */ add.s $f0, $f0, $f24
/* 019350 8003DF50 44050000 */ mfc1 $a1, $f0
/* 019354 8003DF54 C6200040 */ lwc1 $f0, 0x40($s1)
/* 019358 8003DF58 46040000 */ add.s $f0, $f0, $f4
/* 01935C 8003DF5C 46160000 */ add.s $f0, $f0, $f22
/* 019360 8003DF60 44070000 */ mfc1 $a3, $f0
/* 019364 8003DF64 0C01BF2C */ jal func_8006FCB0
/* 019368 8003DF68 24040001 */ addiu $a0, $zero, 1
.L8003DF6C:
/* 01936C 8003DF6C 8FBF0020 */ lw $ra, 0x20($sp)
/* 019370 8003DF70 8FB3001C */ lw $s3, 0x1c($sp)
/* 019374 8003DF74 8FB20018 */ lw $s2, 0x18($sp)
/* 019378 8003DF78 8FB10014 */ lw $s1, 0x14($sp)
/* 01937C 8003DF7C 8FB00010 */ lw $s0, 0x10($sp)
/* 019380 8003DF80 D7BE0050 */ ldc1 $f30, 0x50($sp)
/* 019384 8003DF84 D7BC0048 */ ldc1 $f28, 0x48($sp)
/* 019388 8003DF88 D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 01938C 8003DF8C D7B80038 */ ldc1 $f24, 0x38($sp)
/* 019390 8003DF90 D7B60030 */ ldc1 $f22, 0x30($sp)
/* 019394 8003DF94 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 019398 8003DF98 03E00008 */ jr $ra
/* 01939C 8003DF9C 27BD0058 */ addiu $sp, $sp, 0x58