mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
122 lines
5.1 KiB
ArmAsm
122 lines
5.1 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel atan2
|
|
/* 005080 80029C80 44863000 */ mtc1 $a2, $f6
|
|
/* 005084 80029C84 27BDFFC8 */ addiu $sp, $sp, -0x38
|
|
/* 005088 80029C88 F7BA0030 */ sdc1 $f26, 0x30($sp)
|
|
/* 00508C 80029C8C 460C3681 */ sub.s $f26, $f6, $f12
|
|
/* 005090 80029C90 44873000 */ mtc1 $a3, $f6
|
|
/* 005094 80029C94 AFBF0010 */ sw $ra, 0x10($sp)
|
|
/* 005098 80029C98 F7B80028 */ sdc1 $f24, 0x28($sp)
|
|
/* 00509C 80029C9C 460E3601 */ sub.s $f24, $f6, $f14
|
|
/* 0050A0 80029CA0 F7B60020 */ sdc1 $f22, 0x20($sp)
|
|
/* 0050A4 80029CA4 F7B40018 */ sdc1 $f20, 0x18($sp)
|
|
/* 0050A8 80029CA8 4600D105 */ abs.s $f4, $f26
|
|
/* 0050AC 80029CAC 4600C005 */ abs.s $f0, $f24
|
|
/* 0050B0 80029CB0 4604003C */ c.lt.s $f0, $f4
|
|
/* 0050B4 80029CB4 00000000 */ nop
|
|
/* 0050B8 80029CB8 45000029 */ bc1f .L80029D60
|
|
/* 0050BC 80029CBC 00000000 */ nop
|
|
/* 0050C0 80029CC0 3C014234 */ lui $at, 0x4234
|
|
/* 0050C4 80029CC4 44811000 */ mtc1 $at, $f2
|
|
/* 0050C8 80029CC8 46040003 */ div.s $f0, $f0, $f4
|
|
/* 0050CC 80029CCC 46020502 */ mul.s $f20, $f0, $f2
|
|
/* 0050D0 80029CD0 00000000 */ nop
|
|
/* 0050D4 80029CD4 0C00A6B1 */ jal round
|
|
/* 0050D8 80029CD8 4614A300 */ add.s $f12, $f20, $f20
|
|
/* 0050DC 80029CDC 00021080 */ sll $v0, $v0, 2
|
|
/* 0050E0 80029CE0 3C018007 */ lui $at, 0x8007
|
|
/* 0050E4 80029CE4 00220821 */ addu $at, $at, $v0
|
|
/* 0050E8 80029CE8 C4204414 */ lwc1 $f0, 0x4414($at)
|
|
/* 0050EC 80029CEC 4600A502 */ mul.s $f20, $f20, $f0
|
|
/* 0050F0 80029CF0 00000000 */ nop
|
|
/* 0050F4 80029CF4 44800000 */ mtc1 $zero, $f0
|
|
/* 0050F8 80029CF8 00000000 */ nop
|
|
/* 0050FC 80029CFC 461A003E */ c.le.s $f0, $f26
|
|
/* 005100 80029D00 00000000 */ nop
|
|
/* 005104 80029D04 4500000D */ bc1f .L80029D3C
|
|
/* 005108 80029D08 00000000 */ nop
|
|
/* 00510C 80029D0C 4618003E */ c.le.s $f0, $f24
|
|
/* 005110 80029D10 00000000 */ nop
|
|
/* 005114 80029D14 45000005 */ bc1f .L80029D2C
|
|
/* 005118 80029D18 00000000 */ nop
|
|
/* 00511C 80029D1C 3C0142B4 */ lui $at, 0x42b4
|
|
/* 005120 80029D20 44810000 */ mtc1 $at, $f0
|
|
/* 005124 80029D24 0800A781 */ j .L80029E04
|
|
/* 005128 80029D28 4600A000 */ add.s $f0, $f20, $f0
|
|
|
|
.L80029D2C:
|
|
/* 00512C 80029D2C 3C0142B4 */ lui $at, 0x42b4
|
|
/* 005130 80029D30 44810000 */ mtc1 $at, $f0
|
|
/* 005134 80029D34 0800A781 */ j .L80029E04
|
|
/* 005138 80029D38 46140001 */ sub.s $f0, $f0, $f20
|
|
|
|
.L80029D3C:
|
|
/* 00513C 80029D3C 4618003E */ c.le.s $f0, $f24
|
|
/* 005140 80029D40 3C014387 */ lui $at, 0x4387
|
|
/* 005144 80029D44 44810000 */ mtc1 $at, $f0
|
|
/* 005148 80029D48 4503002E */ bc1tl .L80029E04
|
|
/* 00514C 80029D4C 46140001 */ sub.s $f0, $f0, $f20
|
|
/* 005150 80029D50 3C014387 */ lui $at, 0x4387
|
|
/* 005154 80029D54 44810000 */ mtc1 $at, $f0
|
|
/* 005158 80029D58 0800A781 */ j .L80029E04
|
|
/* 00515C 80029D5C 4600A000 */ add.s $f0, $f20, $f0
|
|
|
|
.L80029D60:
|
|
/* 005160 80029D60 4480B000 */ mtc1 $zero, $f22
|
|
/* 005164 80029D64 00000000 */ nop
|
|
/* 005168 80029D68 46160032 */ c.eq.s $f0, $f22
|
|
/* 00516C 80029D6C 00000000 */ nop
|
|
/* 005170 80029D70 45020003 */ bc1fl .L80029D80
|
|
/* 005174 80029D74 46002003 */ div.s $f0, $f4, $f0
|
|
/* 005178 80029D78 0800A781 */ j .L80029E04
|
|
/* 00517C 80029D7C 4600B006 */ mov.s $f0, $f22
|
|
|
|
.L80029D80:
|
|
/* 005180 80029D80 3C014234 */ lui $at, 0x4234
|
|
/* 005184 80029D84 44811000 */ mtc1 $at, $f2
|
|
/* 005188 80029D88 00000000 */ nop
|
|
/* 00518C 80029D8C 46020502 */ mul.s $f20, $f0, $f2
|
|
/* 005190 80029D90 00000000 */ nop
|
|
/* 005194 80029D94 0C00A6B1 */ jal round
|
|
/* 005198 80029D98 4614A300 */ add.s $f12, $f20, $f20
|
|
/* 00519C 80029D9C 00021080 */ sll $v0, $v0, 2
|
|
/* 0051A0 80029DA0 3C018007 */ lui $at, 0x8007
|
|
/* 0051A4 80029DA4 00220821 */ addu $at, $at, $v0
|
|
/* 0051A8 80029DA8 C4204414 */ lwc1 $f0, 0x4414($at)
|
|
/* 0051AC 80029DAC 4618B03E */ c.le.s $f22, $f24
|
|
/* 0051B0 80029DB0 4600A502 */ mul.s $f20, $f20, $f0
|
|
/* 0051B4 80029DB4 00000000 */ nop
|
|
/* 0051B8 80029DB8 4500000A */ bc1f .L80029DE4
|
|
/* 0051BC 80029DBC 00000000 */ nop
|
|
/* 0051C0 80029DC0 461AB03E */ c.le.s $f22, $f26
|
|
/* 0051C4 80029DC4 3C014334 */ lui $at, 0x4334
|
|
/* 0051C8 80029DC8 44810000 */ mtc1 $at, $f0
|
|
/* 0051CC 80029DCC 4503000D */ bc1tl .L80029E04
|
|
/* 0051D0 80029DD0 46140001 */ sub.s $f0, $f0, $f20
|
|
/* 0051D4 80029DD4 3C014334 */ lui $at, 0x4334
|
|
/* 0051D8 80029DD8 44810000 */ mtc1 $at, $f0
|
|
/* 0051DC 80029DDC 0800A781 */ j .L80029E04
|
|
/* 0051E0 80029DE0 4600A000 */ add.s $f0, $f20, $f0
|
|
|
|
.L80029DE4:
|
|
/* 0051E4 80029DE4 461AB03E */ c.le.s $f22, $f26
|
|
/* 0051E8 80029DE8 00000000 */ nop
|
|
/* 0051EC 80029DEC 45010005 */ bc1t .L80029E04
|
|
/* 0051F0 80029DF0 4600A006 */ mov.s $f0, $f20
|
|
/* 0051F4 80029DF4 3C0143B4 */ lui $at, 0x43b4
|
|
/* 0051F8 80029DF8 44810000 */ mtc1 $at, $f0
|
|
/* 0051FC 80029DFC 00000000 */ nop
|
|
/* 005200 80029E00 46140001 */ sub.s $f0, $f0, $f20
|
|
.L80029E04:
|
|
/* 005204 80029E04 8FBF0010 */ lw $ra, 0x10($sp)
|
|
/* 005208 80029E08 D7BA0030 */ ldc1 $f26, 0x30($sp)
|
|
/* 00520C 80029E0C D7B80028 */ ldc1 $f24, 0x28($sp)
|
|
/* 005210 80029E10 D7B60020 */ ldc1 $f22, 0x20($sp)
|
|
/* 005214 80029E14 D7B40018 */ ldc1 $f20, 0x18($sp)
|
|
/* 005218 80029E18 03E00008 */ jr $ra
|
|
/* 00521C 80029E1C 27BD0038 */ addiu $sp, $sp, 0x38
|
|
|