mirror of
https://github.com/pmret/papermario.git
synced 2024-11-19 01:12:28 +01:00
112 lines
5.4 KiB
ArmAsm
112 lines
5.4 KiB
ArmAsm
|
.set noat # allow manual use of $at
|
||
|
.set noreorder # don't insert nops after branches
|
||
|
|
||
|
glabel func_802186F0_557AD0
|
||
|
/* 557AD0 802186F0 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||
|
/* 557AD4 802186F4 F7B60020 */ sdc1 $f22, 0x20($sp)
|
||
|
/* 557AD8 802186F8 46006586 */ mov.s $f22, $f12
|
||
|
/* 557ADC 802186FC F7B40018 */ sdc1 $f20, 0x18($sp)
|
||
|
/* 557AE0 80218700 AFBF0010 */ sw $ra, 0x10($sp)
|
||
|
/* 557AE4 80218704 0C00A3FC */ jal length2D
|
||
|
/* 557AE8 80218708 46007506 */ mov.s $f20, $f14
|
||
|
/* 557AEC 8021870C 4600A18D */ trunc.w.s $f6, $f20
|
||
|
/* 557AF0 80218710 44023000 */ mfc1 $v0, $f6
|
||
|
/* 557AF4 80218714 00000000 */ nop
|
||
|
/* 557AF8 80218718 04420001 */ bltzl $v0, .L80218720
|
||
|
/* 557AFC 8021871C 00021023 */ negu $v0, $v0
|
||
|
.L80218720:
|
||
|
/* 557B00 80218720 44821000 */ mtc1 $v0, $f2
|
||
|
/* 557B04 80218724 00000000 */ nop
|
||
|
/* 557B08 80218728 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 557B0C 8021872C 46001103 */ div.s $f4, $f2, $f0
|
||
|
/* 557B10 80218730 0000202D */ daddu $a0, $zero, $zero
|
||
|
/* 557B14 80218734 2406005A */ addiu $a2, $zero, 0x5a
|
||
|
/* 557B18 80218738 0080282D */ daddu $a1, $a0, $zero
|
||
|
/* 557B1C 8021873C 3C078022 */ lui $a3, %hi(D_8021DCD4)
|
||
|
/* 557B20 80218740 24E7DCD4 */ addiu $a3, $a3, %lo(D_8021DCD4)
|
||
|
/* 557B24 80218744 30C2FFFF */ andi $v0, $a2, 0xffff
|
||
|
.L80218748:
|
||
|
/* 557B28 80218748 3083FFFF */ andi $v1, $a0, 0xffff
|
||
|
/* 557B2C 8021874C 00431023 */ subu $v0, $v0, $v1
|
||
|
/* 557B30 80218750 00021FC2 */ srl $v1, $v0, 0x1f
|
||
|
/* 557B34 80218754 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 557B38 80218758 00021043 */ sra $v0, $v0, 1
|
||
|
/* 557B3C 8021875C 00821821 */ addu $v1, $a0, $v0
|
||
|
/* 557B40 80218760 3062FFFF */ andi $v0, $v1, 0xffff
|
||
|
/* 557B44 80218764 00021080 */ sll $v0, $v0, 2
|
||
|
/* 557B48 80218768 00471021 */ addu $v0, $v0, $a3
|
||
|
/* 557B4C 8021876C C4400000 */ lwc1 $f0, ($v0)
|
||
|
/* 557B50 80218770 4604003C */ c.lt.s $f0, $f4
|
||
|
/* 557B54 80218774 00000000 */ nop
|
||
|
/* 557B58 80218778 45020002 */ bc1fl .L80218784
|
||
|
/* 557B5C 8021877C 0060302D */ daddu $a2, $v1, $zero
|
||
|
/* 557B60 80218780 0060202D */ daddu $a0, $v1, $zero
|
||
|
.L80218784:
|
||
|
/* 557B64 80218784 24A50001 */ addiu $a1, $a1, 1
|
||
|
/* 557B68 80218788 30A2FFFF */ andi $v0, $a1, 0xffff
|
||
|
/* 557B6C 8021878C 2C420007 */ sltiu $v0, $v0, 7
|
||
|
/* 557B70 80218790 1440FFED */ bnez $v0, .L80218748
|
||
|
/* 557B74 80218794 30C2FFFF */ andi $v0, $a2, 0xffff
|
||
|
/* 557B78 80218798 3082FFFF */ andi $v0, $a0, 0xffff
|
||
|
/* 557B7C 8021879C 00021080 */ sll $v0, $v0, 2
|
||
|
/* 557B80 802187A0 30C3FFFF */ andi $v1, $a2, 0xffff
|
||
|
/* 557B84 802187A4 3C018022 */ lui $at, %hi(D_8021DCD4)
|
||
|
/* 557B88 802187A8 00220821 */ addu $at, $at, $v0
|
||
|
/* 557B8C 802187AC C422DCD4 */ lwc1 $f2, %lo(D_8021DCD4)($at)
|
||
|
/* 557B90 802187B0 00031880 */ sll $v1, $v1, 2
|
||
|
/* 557B94 802187B4 46041081 */ sub.s $f2, $f2, $f4
|
||
|
/* 557B98 802187B8 3C018022 */ lui $at, %hi(D_8021DCD4)
|
||
|
/* 557B9C 802187BC 00230821 */ addu $at, $at, $v1
|
||
|
/* 557BA0 802187C0 C420DCD4 */ lwc1 $f0, %lo(D_8021DCD4)($at)
|
||
|
/* 557BA4 802187C4 46040001 */ sub.s $f0, $f0, $f4
|
||
|
/* 557BA8 802187C8 46001085 */ abs.s $f2, $f2
|
||
|
/* 557BAC 802187CC 46000005 */ abs.s $f0, $f0
|
||
|
/* 557BB0 802187D0 4600103C */ c.lt.s $f2, $f0
|
||
|
/* 557BB4 802187D4 00000000 */ nop
|
||
|
/* 557BB8 802187D8 45000002 */ bc1f .L802187E4
|
||
|
/* 557BBC 802187DC 00C0182D */ daddu $v1, $a2, $zero
|
||
|
/* 557BC0 802187E0 0080182D */ daddu $v1, $a0, $zero
|
||
|
.L802187E4:
|
||
|
/* 557BC4 802187E4 44800000 */ mtc1 $zero, $f0
|
||
|
/* 557BC8 802187E8 00000000 */ nop
|
||
|
/* 557BCC 802187EC 4600B03C */ c.lt.s $f22, $f0
|
||
|
/* 557BD0 802187F0 00000000 */ nop
|
||
|
/* 557BD4 802187F4 4500000A */ bc1f .L80218820
|
||
|
/* 557BD8 802187F8 00000000 */ nop
|
||
|
/* 557BDC 802187FC 4614003E */ c.le.s $f0, $f20
|
||
|
/* 557BE0 80218800 00000000 */ nop
|
||
|
/* 557BE4 80218804 45000004 */ bc1f .L80218818
|
||
|
/* 557BE8 80218808 240200B4 */ addiu $v0, $zero, 0xb4
|
||
|
/* 557BEC 8021880C 00431823 */ subu $v1, $v0, $v1
|
||
|
/* 557BF0 80218810 44800000 */ mtc1 $zero, $f0
|
||
|
/* 557BF4 80218814 00000000 */ nop
|
||
|
.L80218818:
|
||
|
/* 557BF8 80218818 4600B03C */ c.lt.s $f22, $f0
|
||
|
/* 557BFC 8021881C 00000000 */ nop
|
||
|
.L80218820:
|
||
|
/* 557C00 80218820 45000005 */ bc1f .L80218838
|
||
|
/* 557C04 80218824 00000000 */ nop
|
||
|
/* 557C08 80218828 4600A03C */ c.lt.s $f20, $f0
|
||
|
/* 557C0C 8021882C 00000000 */ nop
|
||
|
/* 557C10 80218830 45030001 */ bc1tl .L80218838
|
||
|
/* 557C14 80218834 246300B4 */ addiu $v1, $v1, 0xb4
|
||
|
.L80218838:
|
||
|
/* 557C18 80218838 44800000 */ mtc1 $zero, $f0
|
||
|
/* 557C1C 8021883C 00000000 */ nop
|
||
|
/* 557C20 80218840 4616003E */ c.le.s $f0, $f22
|
||
|
/* 557C24 80218844 00000000 */ nop
|
||
|
/* 557C28 80218848 45000006 */ bc1f .L80218864
|
||
|
/* 557C2C 8021884C 00000000 */ nop
|
||
|
/* 557C30 80218850 4600A03C */ c.lt.s $f20, $f0
|
||
|
/* 557C34 80218854 00000000 */ nop
|
||
|
/* 557C38 80218858 45000002 */ bc1f .L80218864
|
||
|
/* 557C3C 8021885C 24020168 */ addiu $v0, $zero, 0x168
|
||
|
/* 557C40 80218860 00431823 */ subu $v1, $v0, $v1
|
||
|
.L80218864:
|
||
|
/* 557C44 80218864 8FBF0010 */ lw $ra, 0x10($sp)
|
||
|
/* 557C48 80218868 D7B60020 */ ldc1 $f22, 0x20($sp)
|
||
|
/* 557C4C 8021886C D7B40018 */ ldc1 $f20, 0x18($sp)
|
||
|
/* 557C50 80218870 3062FFFF */ andi $v0, $v1, 0xffff
|
||
|
/* 557C54 80218874 03E00008 */ jr $ra
|
||
|
/* 557C58 80218878 27BD0028 */ addiu $sp, $sp, 0x28
|