papermario/asm/nonmatchings/os/code_42e70_len_390/guRotateF.s
2020-08-12 22:37:16 -04:00

95 lines
4.6 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel guRotateF
/* 042F20 80067B20 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 042F24 80067B24 AFB00010 */ sw $s0, 0x10($sp)
/* 042F28 80067B28 00808021 */ addu $s0, $a0, $zero
/* 042F2C 80067B2C 27A40050 */ addiu $a0, $sp, 0x50
/* 042F30 80067B30 F7B40018 */ sdc1 $f20, 0x18($sp)
/* 042F34 80067B34 4485A000 */ mtc1 $a1, $f20
/* 042F38 80067B38 27A50054 */ addiu $a1, $sp, 0x54
/* 042F3C 80067B3C AFA60050 */ sw $a2, 0x50($sp)
/* 042F40 80067B40 27A60058 */ addiu $a2, $sp, 0x58
/* 042F44 80067B44 AFBF0014 */ sw $ra, 0x14($sp)
/* 042F48 80067B48 F7BE0040 */ sdc1 $f30, 0x40($sp)
/* 042F4C 80067B4C F7BC0038 */ sdc1 $f28, 0x38($sp)
/* 042F50 80067B50 F7BA0030 */ sdc1 $f26, 0x30($sp)
/* 042F54 80067B54 F7B80028 */ sdc1 $f24, 0x28($sp)
/* 042F58 80067B58 F7B60020 */ sdc1 $f22, 0x20($sp)
/* 042F5C 80067B5C 0C01B2F0 */ jal guNormalize
/* 042F60 80067B60 AFA70054 */ sw $a3, 0x54($sp)
/* 042F64 80067B64 3C018009 */ lui $at, 0x8009
/* 042F68 80067B68 C42058C0 */ lwc1 $f0, 0x58c0($at)
/* 042F6C 80067B6C 4600A502 */ mul.s $f20, $f20, $f0
/* 042F70 80067B70 0C00A85B */ jal sin_rad
/* 042F74 80067B74 4600A306 */ mov.s $f12, $f20
/* 042F78 80067B78 4600A306 */ mov.s $f12, $f20
/* 042F7C 80067B7C 0C00A874 */ jal cos_rad
/* 042F80 80067B80 46000786 */ mov.s $f30, $f0
/* 042F84 80067B84 C7A20050 */ lwc1 $f2, 0x50($sp)
/* 042F88 80067B88 C7B60054 */ lwc1 $f22, 0x54($sp)
/* 042F8C 80067B8C 46161702 */ mul.s $f28, $f2, $f22
/* 042F90 80067B90 C7B40058 */ lwc1 $f20, 0x58($sp)
/* 042F94 80067B94 4614B582 */ mul.s $f22, $f22, $f20
/* 042F98 80067B98 3C013F80 */ lui $at, 0x3f80
/* 042F9C 80067B9C 4481D000 */ mtc1 $at, $f26
/* 042FA0 80067BA0 4602A502 */ mul.s $f20, $f20, $f2
/* 042FA4 80067BA4 46000606 */ mov.s $f24, $f0
/* 042FA8 80067BA8 4618D301 */ sub.s $f12, $f26, $f24
/* 042FAC 80067BAC 460CE702 */ mul.s $f28, $f28, $f12
/* 042FB0 80067BB0 00000000 */ nop
/* 042FB4 80067BB4 460CB582 */ mul.s $f22, $f22, $f12
/* 042FB8 80067BB8 00000000 */ nop
/* 042FBC 80067BBC 460CA502 */ mul.s $f20, $f20, $f12
/* 042FC0 80067BC0 0C019D28 */ jal guMtxIdentF
/* 042FC4 80067BC4 02002021 */ addu $a0, $s0, $zero
/* 042FC8 80067BC8 C7A20050 */ lwc1 $f2, 0x50($sp)
/* 042FCC 80067BCC 46021302 */ mul.s $f12, $f2, $f2
/* 042FD0 80067BD0 460CD001 */ sub.s $f0, $f26, $f12
/* 042FD4 80067BD4 4600C002 */ mul.s $f0, $f24, $f0
/* 042FD8 80067BD8 C7A40054 */ lwc1 $f4, 0x54($sp)
/* 042FDC 80067BDC C7A80058 */ lwc1 $f8, 0x58($sp)
/* 042FE0 80067BE0 46006000 */ add.s $f0, $f12, $f0
/* 042FE4 80067BE4 461E2102 */ mul.s $f4, $f4, $f30
/* 042FE8 80067BE8 E6000000 */ swc1 $f0, ($s0)
/* 042FEC 80067BEC C7A00054 */ lwc1 $f0, 0x54($sp)
/* 042FF0 80067BF0 46000302 */ mul.s $f12, $f0, $f0
/* 042FF4 80067BF4 00000000 */ nop
/* 042FF8 80067BF8 461E1082 */ mul.s $f2, $f2, $f30
/* 042FFC 80067BFC 460CD181 */ sub.s $f6, $f26, $f12
/* 043000 80067C00 4604A000 */ add.s $f0, $f20, $f4
/* 043004 80067C04 4606C182 */ mul.s $f6, $f24, $f6
/* 043008 80067C08 4602B281 */ sub.s $f10, $f22, $f2
/* 04300C 80067C0C E6000020 */ swc1 $f0, 0x20($s0)
/* 043010 80067C10 C7A00058 */ lwc1 $f0, 0x58($sp)
/* 043014 80067C14 46066180 */ add.s $f6, $f12, $f6
/* 043018 80067C18 46000302 */ mul.s $f12, $f0, $f0
/* 04301C 80067C1C 4602B580 */ add.s $f22, $f22, $f2
/* 043020 80067C20 4604A501 */ sub.s $f20, $f20, $f4
/* 043024 80067C24 461E4202 */ mul.s $f8, $f8, $f30
/* 043028 80067C28 460CD681 */ sub.s $f26, $f26, $f12
/* 04302C 80067C2C 4608E001 */ sub.s $f0, $f28, $f8
/* 043030 80067C30 461AC602 */ mul.s $f24, $f24, $f26
/* 043034 80067C34 4608E700 */ add.s $f28, $f28, $f8
/* 043038 80067C38 E60A0024 */ swc1 $f10, 0x24($s0)
/* 04303C 80067C3C E6160018 */ swc1 $f22, 0x18($s0)
/* 043040 80067C40 E6140008 */ swc1 $f20, 8($s0)
/* 043044 80067C44 46186600 */ add.s $f24, $f12, $f24
/* 043048 80067C48 E61C0004 */ swc1 $f28, 4($s0)
/* 04304C 80067C4C E6000010 */ swc1 $f0, 0x10($s0)
/* 043050 80067C50 E6060014 */ swc1 $f6, 0x14($s0)
/* 043054 80067C54 E6180028 */ swc1 $f24, 0x28($s0)
/* 043058 80067C58 8FBF0014 */ lw $ra, 0x14($sp)
/* 04305C 80067C5C 8FB00010 */ lw $s0, 0x10($sp)
/* 043060 80067C60 D7BE0040 */ ldc1 $f30, 0x40($sp)
/* 043064 80067C64 D7BC0038 */ ldc1 $f28, 0x38($sp)
/* 043068 80067C68 D7BA0030 */ ldc1 $f26, 0x30($sp)
/* 04306C 80067C6C D7B80028 */ ldc1 $f24, 0x28($sp)
/* 043070 80067C70 D7B60020 */ ldc1 $f22, 0x20($sp)
/* 043074 80067C74 D7B40018 */ ldc1 $f20, 0x18($sp)
/* 043078 80067C78 03E00008 */ jr $ra
/* 04307C 80067C7C 27BD0048 */ addiu $sp, $sp, 0x48