mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
76 lines
3.3 KiB
ArmAsm
76 lines
3.3 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
glabel clamp_angle
|
|
/* 4F24 80029B24 3C014561 */ lui $at, 0x4561
|
|
/* 4F28 80029B28 44811000 */ mtc1 $at, $f2
|
|
/* 4F2C 80029B2C 46006005 */ abs.s $f0, $f12
|
|
/* 4F30 80029B30 4600103C */ c.lt.s $f2, $f0
|
|
/* 4F34 80029B34 00000000 */ nop
|
|
/* 4F38 80029B38 45000026 */ bc1f .L80029BD4
|
|
/* 4F3C 80029B3C 00000000 */ nop
|
|
/* 4F40 80029B40 4600610D */ trunc.w.s $f4, $f12
|
|
/* 4F44 80029B44 44042000 */ mfc1 $a0, $f4
|
|
/* 4F48 80029B48 00000000 */ nop
|
|
/* 4F4C 80029B4C 0480000F */ bltz $a0, .L80029B8C
|
|
/* 4F50 80029B50 3C02B60B */ lui $v0, 0xb60b
|
|
/* 4F54 80029B54 344260B7 */ ori $v0, $v0, 0x60b7
|
|
/* 4F58 80029B58 00820018 */ mult $a0, $v0
|
|
/* 4F5C 80029B5C 00041FC3 */ sra $v1, $a0, 0x1f
|
|
/* 4F60 80029B60 00002810 */ mfhi $a1
|
|
/* 4F64 80029B64 00A41021 */ addu $v0, $a1, $a0
|
|
/* 4F68 80029B68 00021203 */ sra $v0, $v0, 8
|
|
/* 4F6C 80029B6C 00431023 */ subu $v0, $v0, $v1
|
|
/* 4F70 80029B70 00021840 */ sll $v1, $v0, 1
|
|
/* 4F74 80029B74 00621821 */ addu $v1, $v1, $v0
|
|
/* 4F78 80029B78 00031100 */ sll $v0, $v1, 4
|
|
/* 4F7C 80029B7C 00431023 */ subu $v0, $v0, $v1
|
|
/* 4F80 80029B80 000210C0 */ sll $v0, $v0, 3
|
|
/* 4F84 80029B84 0800A6F1 */ j .L80029BC4
|
|
/* 4F88 80029B88 00822023 */ subu $a0, $a0, $v0
|
|
.L80029B8C:
|
|
/* 4F8C 80029B8C 00042023 */ negu $a0, $a0
|
|
/* 4F90 80029B90 344260B7 */ ori $v0, $v0, 0x60b7
|
|
/* 4F94 80029B94 00820018 */ mult $a0, $v0
|
|
/* 4F98 80029B98 00041FC3 */ sra $v1, $a0, 0x1f
|
|
/* 4F9C 80029B9C 00002810 */ mfhi $a1
|
|
/* 4FA0 80029BA0 00A41021 */ addu $v0, $a1, $a0
|
|
/* 4FA4 80029BA4 00021203 */ sra $v0, $v0, 8
|
|
/* 4FA8 80029BA8 00431023 */ subu $v0, $v0, $v1
|
|
/* 4FAC 80029BAC 00021840 */ sll $v1, $v0, 1
|
|
/* 4FB0 80029BB0 00621821 */ addu $v1, $v1, $v0
|
|
/* 4FB4 80029BB4 00031100 */ sll $v0, $v1, 4
|
|
/* 4FB8 80029BB8 00431023 */ subu $v0, $v0, $v1
|
|
/* 4FBC 80029BBC 000210C0 */ sll $v0, $v0, 3
|
|
/* 4FC0 80029BC0 00442023 */ subu $a0, $v0, $a0
|
|
.L80029BC4:
|
|
/* 4FC4 80029BC4 44840000 */ mtc1 $a0, $f0
|
|
/* 4FC8 80029BC8 00000000 */ nop
|
|
/* 4FCC 80029BCC 03E00008 */ jr $ra
|
|
/* 4FD0 80029BD0 46800020 */ cvt.s.w $f0, $f0
|
|
.L80029BD4:
|
|
/* 4FD4 80029BD4 44801000 */ mtc1 $zero, $f2
|
|
/* 4FD8 80029BD8 3C0143B4 */ lui $at, 0x43b4
|
|
/* 4FDC 80029BDC 44810000 */ mtc1 $at, $f0
|
|
.L80029BE0:
|
|
/* 4FE0 80029BE0 4602603C */ c.lt.s $f12, $f2
|
|
/* 4FE4 80029BE4 00000000 */ nop
|
|
/* 4FE8 80029BE8 45030001 */ bc1tl .L80029BF0
|
|
/* 4FEC 80029BEC 46006300 */ add.s $f12, $f12, $f0
|
|
.L80029BF0:
|
|
/* 4FF0 80029BF0 460C003E */ c.le.s $f0, $f12
|
|
/* 4FF4 80029BF4 00000000 */ nop
|
|
/* 4FF8 80029BF8 45030001 */ bc1tl .L80029C00
|
|
/* 4FFC 80029BFC 46006301 */ sub.s $f12, $f12, $f0
|
|
.L80029C00:
|
|
/* 5000 80029C00 460C103E */ c.le.s $f2, $f12
|
|
/* 5004 80029C04 00000000 */ nop
|
|
/* 5008 80029C08 4500FFF5 */ bc1f .L80029BE0
|
|
/* 500C 80029C0C 00000000 */ nop
|
|
/* 5010 80029C10 4600603C */ c.lt.s $f12, $f0
|
|
/* 5014 80029C14 00000000 */ nop
|
|
/* 5018 80029C18 4500FFF1 */ bc1f .L80029BE0
|
|
/* 501C 80029C1C 00000000 */ nop
|
|
/* 5020 80029C20 03E00008 */ jr $ra
|
|
/* 5024 80029C24 46006006 */ mov.s $f0, $f12
|