papermario/asm/nonmatchings/code_197F40/get_nearest_home_index.s
2020-10-14 23:49:49 -04:00

54 lines
2.5 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_nearest_home_index
/* 197F78 80269698 3C014220 */ lui $at, 0x4220
/* 197F7C 8026969C 44810000 */ mtc1 $at, $f0
/* 197F80 802696A0 00000000 */ nop
/* 197F84 802696A4 4600703C */ c.lt.s $f14, $f0
/* 197F88 802696A8 00000000 */ nop
/* 197F8C 802696AC 45010010 */ bc1t .L802696F0
/* 197F90 802696B0 0000102D */ daddu $v0, $zero, $zero
/* 197F94 802696B4 3C0142AA */ lui $at, 0x42aa
/* 197F98 802696B8 44810000 */ mtc1 $at, $f0
/* 197F9C 802696BC 00000000 */ nop
/* 197FA0 802696C0 4600703C */ c.lt.s $f14, $f0
/* 197FA4 802696C4 00000000 */ nop
/* 197FA8 802696C8 45010009 */ bc1t .L802696F0
/* 197FAC 802696CC 24020001 */ addiu $v0, $zero, 1
/* 197FB0 802696D0 3C0142C8 */ lui $at, 0x42c8
/* 197FB4 802696D4 44810000 */ mtc1 $at, $f0
/* 197FB8 802696D8 00000000 */ nop
/* 197FBC 802696DC 4600703C */ c.lt.s $f14, $f0
/* 197FC0 802696E0 00000000 */ nop
/* 197FC4 802696E4 45000002 */ bc1f .L802696F0
/* 197FC8 802696E8 24020003 */ addiu $v0, $zero, 3
/* 197FCC 802696EC 24020002 */ addiu $v0, $zero, 2
.L802696F0:
/* 197FD0 802696F0 3C0141C8 */ lui $at, 0x41c8
/* 197FD4 802696F4 44810000 */ mtc1 $at, $f0
/* 197FD8 802696F8 00000000 */ nop
/* 197FDC 802696FC 4600603C */ c.lt.s $f12, $f0
/* 197FE0 80269700 00000000 */ nop
/* 197FE4 80269704 45010010 */ bc1t .L80269748
/* 197FE8 80269708 0000182D */ daddu $v1, $zero, $zero
/* 197FEC 8026970C 3C014282 */ lui $at, 0x4282
/* 197FF0 80269710 44810000 */ mtc1 $at, $f0
/* 197FF4 80269714 00000000 */ nop
/* 197FF8 80269718 4600603C */ c.lt.s $f12, $f0
/* 197FFC 8026971C 00000000 */ nop
/* 198000 80269720 45010009 */ bc1t .L80269748
/* 198004 80269724 24030001 */ addiu $v1, $zero, 1
/* 198008 80269728 3C0142D2 */ lui $at, 0x42d2
/* 19800C 8026972C 44810000 */ mtc1 $at, $f0
/* 198010 80269730 00000000 */ nop
/* 198014 80269734 4600603C */ c.lt.s $f12, $f0
/* 198018 80269738 00000000 */ nop
/* 19801C 8026973C 45000002 */ bc1f .L80269748
/* 198020 80269740 24030003 */ addiu $v1, $zero, 3
/* 198024 80269744 24030002 */ addiu $v1, $zero, 2
.L80269748:
/* 198028 80269748 00021080 */ sll $v0, $v0, 2
/* 19802C 8026974C 03E00008 */ jr $ra
/* 198030 80269750 00621025 */ or $v0, $v1, $v0