papermario/asm/nonmatchings/code_13870_len_6980/func_8003E0D4.s
2020-08-12 22:37:16 -04:00

71 lines
3.2 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003E0D4
/* 0194D4 8003E0D4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0194D8 8003E0D8 AFB00010 */ sw $s0, 0x10($sp)
/* 0194DC 8003E0DC 0080802D */ daddu $s0, $a0, $zero
/* 0194E0 8003E0E0 3C048007 */ lui $a0, 0x8007
/* 0194E4 8003E0E4 24847C38 */ addiu $a0, $a0, 0x7c38
/* 0194E8 8003E0E8 AFBF0014 */ sw $ra, 0x14($sp)
/* 0194EC 8003E0EC F7B40018 */ sdc1 $f20, 0x18($sp)
/* 0194F0 8003E0F0 94820000 */ lhu $v0, ($a0)
/* 0194F4 8003E0F4 24430001 */ addiu $v1, $v0, 1
/* 0194F8 8003E0F8 00021400 */ sll $v0, $v0, 0x10
/* 0194FC 8003E0FC 00021403 */ sra $v0, $v0, 0x10
/* 019500 8003E100 28420004 */ slti $v0, $v0, 4
/* 019504 8003E104 1440002D */ bnez $v0, .L8003E1BC
/* 019508 8003E108 A4830000 */ sh $v1, ($a0)
/* 01950C 8003E10C C60C000C */ lwc1 $f12, 0xc($s0)
/* 019510 8003E110 A4800000 */ sh $zero, ($a0)
/* 019514 8003E114 0C00A6C9 */ jal clamp_angle
/* 019518 8003E118 46006307 */ neg.s $f12, $f12
/* 01951C 8003E11C 3C0140C9 */ lui $at, 0x40c9
/* 019520 8003E120 34210FD0 */ ori $at, $at, 0xfd0
/* 019524 8003E124 44811000 */ mtc1 $at, $f2
/* 019528 8003E128 00000000 */ nop
/* 01952C 8003E12C 46020502 */ mul.s $f20, $f0, $f2
/* 019530 8003E130 00000000 */ nop
/* 019534 8003E134 3C0143B4 */ lui $at, 0x43b4
/* 019538 8003E138 44810000 */ mtc1 $at, $f0
/* 01953C 8003E13C 00000000 */ nop
/* 019540 8003E140 4600A503 */ div.s $f20, $f20, $f0
/* 019544 8003E144 0C00A85B */ jal sin_rad
/* 019548 8003E148 4600A306 */ mov.s $f12, $f20
/* 01954C 8003E14C 4600A306 */ mov.s $f12, $f20
/* 019550 8003E150 0C00A874 */ jal cos_rad
/* 019554 8003E154 46000506 */ mov.s $f20, $f0
/* 019558 8003E158 860200A6 */ lh $v0, 0xa6($s0)
/* 01955C 8003E15C 44821000 */ mtc1 $v0, $f2
/* 019560 8003E160 00000000 */ nop
/* 019564 8003E164 468010A0 */ cvt.s.w $f2, $f2
/* 019568 8003E168 46141502 */ mul.s $f20, $f2, $f20
/* 01956C 8003E16C 00000000 */ nop
/* 019570 8003E170 46001082 */ mul.s $f2, $f2, $f0
/* 019574 8003E174 00000000 */ nop
/* 019578 8003E178 3C013E4C */ lui $at, 0x3e4c
/* 01957C 8003E17C 3421CCCD */ ori $at, $at, 0xcccd
/* 019580 8003E180 44810000 */ mtc1 $at, $f0
/* 019584 8003E184 00000000 */ nop
/* 019588 8003E188 4600A502 */ mul.s $f20, $f20, $f0
/* 01958C 8003E18C 00000000 */ nop
/* 019590 8003E190 46001082 */ mul.s $f2, $f2, $f0
/* 019594 8003E194 00000000 */ nop
/* 019598 8003E198 C6000038 */ lwc1 $f0, 0x38($s0)
/* 01959C 8003E19C 46140000 */ add.s $f0, $f0, $f20
/* 0195A0 8003E1A0 44050000 */ mfc1 $a1, $f0
/* 0195A4 8003E1A4 C6000040 */ lwc1 $f0, 0x40($s0)
/* 0195A8 8003E1A8 46020000 */ add.s $f0, $f0, $f2
/* 0195AC 8003E1AC 3C064220 */ lui $a2, 0x4220
/* 0195B0 8003E1B0 44070000 */ mfc1 $a3, $f0
/* 0195B4 8003E1B4 0C01C244 */ jal func_80070910
/* 0195B8 8003E1B8 24040001 */ addiu $a0, $zero, 1
.L8003E1BC:
/* 0195BC 8003E1BC 8FBF0014 */ lw $ra, 0x14($sp)
/* 0195C0 8003E1C0 8FB00010 */ lw $s0, 0x10($sp)
/* 0195C4 8003E1C4 D7B40018 */ ldc1 $f20, 0x18($sp)
/* 0195C8 8003E1C8 03E00008 */ jr $ra
/* 0195CC 8003E1CC 27BD0020 */ addiu $sp, $sp, 0x20