papermario/asm/nonmatchings/code_1A5830/RunToGoal.s

278 lines
14 KiB
ArmAsm
Raw Normal View History

2020-09-24 05:16:13 +02:00
.set noat # allow manual use of $at
2020-08-04 08:49:11 +02:00
.set noreorder # don't insert nops after branches
glabel RunToGoal
2020-09-24 05:16:13 +02:00
/* 1A8744 80279E64 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 1A8748 80279E68 AFB20020 */ sw $s2, 0x20($sp)
/* 1A874C 80279E6C 0080902D */ daddu $s2, $a0, $zero
/* 1A8750 80279E70 AFBF0024 */ sw $ra, 0x24($sp)
/* 1A8754 80279E74 AFB1001C */ sw $s1, 0x1c($sp)
/* 1A8758 80279E78 AFB00018 */ sw $s0, 0x18($sp)
/* 1A875C 80279E7C F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 1A8760 80279E80 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 1A8764 80279E84 F7B60030 */ sdc1 $f22, 0x30($sp)
/* 1A8768 80279E88 F7B40028 */ sdc1 $f20, 0x28($sp)
/* 1A876C 80279E8C 8E51000C */ lw $s1, 0xc($s2)
/* 1A8770 80279E90 54A00001 */ bnel $a1, $zero, .L80279E98
/* 1A8774 80279E94 AE400070 */ sw $zero, 0x70($s2)
2020-08-04 08:49:11 +02:00
.L80279E98:
2020-09-24 05:16:13 +02:00
/* 1A8778 80279E98 8E420070 */ lw $v0, 0x70($s2)
/* 1A877C 80279E9C 14400067 */ bnez $v0, .L8027A03C
/* 1A8780 80279EA0 00000000 */ nop
/* 1A8784 80279EA4 8E250000 */ lw $a1, ($s1)
/* 1A8788 80279EA8 26310004 */ addiu $s1, $s1, 4
/* 1A878C 80279EAC 0C0B1EAF */ jal get_variable
/* 1A8790 80279EB0 0240202D */ daddu $a0, $s2, $zero
/* 1A8794 80279EB4 0040202D */ daddu $a0, $v0, $zero
/* 1A8798 80279EB8 2402FF81 */ addiu $v0, $zero, -0x7f
/* 1A879C 80279EBC 14820002 */ bne $a0, $v0, .L80279EC8
/* 1A87A0 80279EC0 00000000 */ nop
/* 1A87A4 80279EC4 8E440148 */ lw $a0, 0x148($s2)
2020-08-04 08:49:11 +02:00
.L80279EC8:
2020-09-24 05:16:13 +02:00
/* 1A87A8 80279EC8 0C09A75B */ jal get_actor
/* 1A87AC 80279ECC 00000000 */ nop
/* 1A87B0 80279ED0 0040802D */ daddu $s0, $v0, $zero
/* 1A87B4 80279ED4 AE500074 */ sw $s0, 0x74($s2)
/* 1A87B8 80279ED8 8E250000 */ lw $a1, ($s1)
/* 1A87BC 80279EDC 26310004 */ addiu $s1, $s1, 4
/* 1A87C0 80279EE0 0C0B1EAF */ jal get_variable
/* 1A87C4 80279EE4 0240202D */ daddu $a0, $s2, $zero
/* 1A87C8 80279EE8 A6020070 */ sh $v0, 0x70($s0)
/* 1A87CC 80279EEC 8E250000 */ lw $a1, ($s1)
/* 1A87D0 80279EF0 0C0B1EAF */ jal get_variable
/* 1A87D4 80279EF4 0240202D */ daddu $a0, $s2, $zero
/* 1A87D8 80279EF8 AE420078 */ sw $v0, 0x78($s2)
/* 1A87DC 80279EFC C6160018 */ lwc1 $f22, 0x18($s0)
/* 1A87E0 80279F00 C6180020 */ lwc1 $f24, 0x20($s0)
/* 1A87E4 80279F04 C6000144 */ lwc1 $f0, 0x144($s0)
/* 1A87E8 80279F08 C614014C */ lwc1 $f20, 0x14c($s0)
/* 1A87EC 80279F0C C602001C */ lwc1 $f2, 0x1c($s0)
/* 1A87F0 80279F10 4406B000 */ mfc1 $a2, $f22
/* 1A87F4 80279F14 4407C000 */ mfc1 $a3, $f24
/* 1A87F8 80279F18 2611000C */ addiu $s1, $s0, 0xc
/* 1A87FC 80279F1C E600000C */ swc1 $f0, 0xc($s0)
/* 1A8800 80279F20 C6000148 */ lwc1 $f0, 0x148($s0)
/* 1A8804 80279F24 C61A000C */ lwc1 $f26, 0xc($s0)
/* 1A8808 80279F28 4600A386 */ mov.s $f14, $f20
/* 1A880C 80279F2C E6140014 */ swc1 $f20, 0x14($s0)
/* 1A8810 80279F30 E6160024 */ swc1 $f22, 0x24($s0)
/* 1A8814 80279F34 E6020028 */ swc1 $f2, 0x28($s0)
/* 1A8818 80279F38 E618002C */ swc1 $f24, 0x2c($s0)
/* 1A881C 80279F3C 4600D306 */ mov.s $f12, $f26
/* 1A8820 80279F40 0C00A720 */ jal atan2
/* 1A8824 80279F44 E6000010 */ swc1 $f0, 0x10($s0)
/* 1A8828 80279F48 4600D306 */ mov.s $f12, $f26
/* 1A882C 80279F4C 4406B000 */ mfc1 $a2, $f22
/* 1A8830 80279F50 4407C000 */ mfc1 $a3, $f24
/* 1A8834 80279F54 4600A386 */ mov.s $f14, $f20
/* 1A8838 80279F58 0C00A7B5 */ jal dist2D
/* 1A883C 80279F5C E6000054 */ swc1 $f0, 0x54($s0)
/* 1A8840 80279F60 86020070 */ lh $v0, 0x70($s0)
/* 1A8844 80279F64 46000086 */ mov.s $f2, $f0
/* 1A8848 80279F68 14400018 */ bnez $v0, .L80279FCC
/* 1A884C 80279F6C E6020058 */ swc1 $f2, 0x58($s0)
/* 1A8850 80279F70 C600004C */ lwc1 $f0, 0x4c($s0)
/* 1A8854 80279F74 46001003 */ div.s $f0, $f2, $f0
2020-08-04 08:49:11 +02:00
/* 1A8858 80279F78 4600020D */ trunc.w.s $f8, $f0
2020-09-24 05:16:13 +02:00
/* 1A885C 80279F7C 44024000 */ mfc1 $v0, $f8
/* 1A8860 80279F80 00000000 */ nop
/* 1A8864 80279F84 A6020070 */ sh $v0, 0x70($s0)
/* 1A8868 80279F88 00021400 */ sll $v0, $v0, 0x10
/* 1A886C 80279F8C 14400002 */ bnez $v0, .L80279F98
/* 1A8870 80279F90 24020001 */ addiu $v0, $zero, 1
/* 1A8874 80279F94 A6020070 */ sh $v0, 0x70($s0)
2020-08-04 08:49:11 +02:00
.L80279F98:
2020-09-24 05:16:13 +02:00
/* 1A8878 80279F98 86020070 */ lh $v0, 0x70($s0)
/* 1A887C 80279F9C C602004C */ lwc1 $f2, 0x4c($s0)
/* 1A8880 80279FA0 44823000 */ mtc1 $v0, $f6
/* 1A8884 80279FA4 00000000 */ nop
/* 1A8888 80279FA8 468031A0 */ cvt.s.w $f6, $f6
/* 1A888C 80279FAC 46023102 */ mul.s $f4, $f6, $f2
/* 1A8890 80279FB0 00000000 */ nop
/* 1A8894 80279FB4 C6000058 */ lwc1 $f0, 0x58($s0)
/* 1A8898 80279FB8 46040001 */ sub.s $f0, $f0, $f4
/* 1A889C 80279FBC 46060003 */ div.s $f0, $f0, $f6
/* 1A88A0 80279FC0 46001080 */ add.s $f2, $f2, $f0
/* 1A88A4 80279FC4 0809E7F8 */ j .L80279FE0
/* 1A88A8 80279FC8 E602004C */ swc1 $f2, 0x4c($s0)
2020-08-04 08:49:11 +02:00
.L80279FCC:
2020-09-24 05:16:13 +02:00
/* 1A88AC 80279FCC 44820000 */ mtc1 $v0, $f0
/* 1A88B0 80279FD0 00000000 */ nop
/* 1A88B4 80279FD4 46800020 */ cvt.s.w $f0, $f0
/* 1A88B8 80279FD8 46001003 */ div.s $f0, $f2, $f0
/* 1A88BC 80279FDC E600004C */ swc1 $f0, 0x4c($s0)
2020-08-04 08:49:11 +02:00
.L80279FE0:
2020-09-24 05:16:13 +02:00
/* 1A88C0 80279FE0 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A88C4 80279FE4 04420002 */ bltzl $v0, .L80279FF0
/* 1A88C8 80279FE8 00021027 */ nor $v0, $zero, $v0
/* 1A88CC 80279FEC 24420001 */ addiu $v0, $v0, 1
2020-08-04 08:49:11 +02:00
.L80279FF0:
2020-09-24 05:16:13 +02:00
/* 1A88D0 80279FF0 44820000 */ mtc1 $v0, $f0
/* 1A88D4 80279FF4 00000000 */ nop
/* 1A88D8 80279FF8 46800020 */ cvt.s.w $f0, $f0
/* 1A88DC 80279FFC E620004C */ swc1 $f0, 0x4c($s1)
/* 1A88E0 8027A000 8E02019C */ lw $v0, 0x19c($s0)
/* 1A88E4 8027A004 1040000C */ beqz $v0, .L8027A038
/* 1A88E8 8027A008 24020001 */ addiu $v0, $zero, 1
/* 1A88EC 8027A00C 8E0201A0 */ lw $v0, 0x1a0($s0)
/* 1A88F0 8027A010 14400009 */ bnez $v0, .L8027A038
/* 1A88F4 8027A014 24020001 */ addiu $v0, $zero, 1
/* 1A88F8 8027A018 C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A88FC 8027A01C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A8900 8027A020 8E04019C */ lw $a0, 0x19c($s0)
/* 1A8904 8027A024 8E060144 */ lw $a2, 0x144($s0)
/* 1A8908 8027A028 8E070148 */ lw $a3, 0x148($s0)
/* 1A890C 8027A02C 0C052757 */ jal play_sound_at_position
/* 1A8910 8027A030 0000282D */ daddu $a1, $zero, $zero
/* 1A8914 8027A034 24020001 */ addiu $v0, $zero, 1
2020-08-04 08:49:11 +02:00
.L8027A038:
2020-09-24 05:16:13 +02:00
/* 1A8918 8027A038 AE420070 */ sw $v0, 0x70($s2)
2020-08-04 08:49:11 +02:00
.L8027A03C:
2020-09-24 05:16:13 +02:00
/* 1A891C 8027A03C 8E500074 */ lw $s0, 0x74($s2)
/* 1A8920 8027A040 2611000C */ addiu $s1, $s0, 0xc
/* 1A8924 8027A044 8E05004C */ lw $a1, 0x4c($s0)
/* 1A8928 8027A048 8E060054 */ lw $a2, 0x54($s0)
/* 1A892C 8027A04C 0C09904A */ jal add_xz_vec3f
/* 1A8930 8027A050 0220202D */ daddu $a0, $s1, $zero
/* 1A8934 8027A054 8E420078 */ lw $v0, 0x78($s2)
/* 1A8938 8027A058 14400017 */ bnez $v0, .L8027A0B8
/* 1A893C 8027A05C 00000000 */ nop
/* 1A8940 8027A060 C602004C */ lwc1 $f2, 0x4c($s0)
/* 1A8944 8027A064 3C014080 */ lui $at, 0x4080
/* 1A8948 8027A068 44810000 */ mtc1 $at, $f0
/* 1A894C 8027A06C 00000000 */ nop
/* 1A8950 8027A070 4600103C */ c.lt.s $f2, $f0
/* 1A8954 8027A074 00000000 */ nop
/* 1A8958 8027A078 45000007 */ bc1f .L8027A098
/* 1A895C 8027A07C 0000202D */ daddu $a0, $zero, $zero
/* 1A8960 8027A080 C6000054 */ lwc1 $f0, 0x54($s0)
/* 1A8964 8027A084 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A8968 8027A088 8E05000C */ lw $a1, 0xc($s0)
/* 1A896C 8027A08C 8E060010 */ lw $a2, 0x10($s0)
/* 1A8970 8027A090 0809E82C */ j .L8027A0B0
/* 1A8974 8027A094 8E070014 */ lw $a3, 0x14($s0)
2020-08-04 08:49:11 +02:00
.L8027A098:
2020-09-24 05:16:13 +02:00
/* 1A8978 8027A098 C6000054 */ lwc1 $f0, 0x54($s0)
/* 1A897C 8027A09C E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A8980 8027A0A0 8E05000C */ lw $a1, 0xc($s0)
/* 1A8984 8027A0A4 8E060010 */ lw $a2, 0x10($s0)
/* 1A8988 8027A0A8 8E070014 */ lw $a3, 0x14($s0)
/* 1A898C 8027A0AC 24040001 */ addiu $a0, $zero, 1
2020-08-04 08:49:11 +02:00
.L8027A0B0:
2020-09-24 05:16:13 +02:00
/* 1A8990 8027A0B0 0C0990BC */ jal play_movement_dust_effects
/* 1A8994 8027A0B4 00000000 */ nop
2020-08-04 08:49:11 +02:00
.L8027A0B8:
2020-09-24 05:16:13 +02:00
/* 1A8998 8027A0B8 C6200000 */ lwc1 $f0, ($s1)
/* 1A899C 8027A0BC 8E02019C */ lw $v0, 0x19c($s0)
/* 1A89A0 8027A0C0 E6000144 */ swc1 $f0, 0x144($s0)
/* 1A89A4 8027A0C4 C6200008 */ lwc1 $f0, 8($s1)
/* 1A89A8 8027A0C8 1040004A */ beqz $v0, .L8027A1F4
/* 1A89AC 8027A0CC E600014C */ swc1 $f0, 0x14c($s0)
/* 1A89B0 8027A0D0 8E0201A0 */ lw $v0, 0x1a0($s0)
/* 1A89B4 8027A0D4 10400047 */ beqz $v0, .L8027A1F4
/* 1A89B8 8027A0D8 00000000 */ nop
/* 1A89BC 8027A0DC 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A89C0 8027A0E0 0440001C */ bltz $v0, .L8027A154
/* 1A89C4 8027A0E4 00000000 */ nop
/* 1A89C8 8027A0E8 C622004C */ lwc1 $f2, 0x4c($s1)
/* 1A89CC 8027A0EC C6200040 */ lwc1 $f0, 0x40($s1)
/* 1A89D0 8027A0F0 46001080 */ add.s $f2, $f2, $f0
/* 1A89D4 8027A0F4 E622004C */ swc1 $f2, 0x4c($s1)
/* 1A89D8 8027A0F8 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A89DC 8027A0FC 44820000 */ mtc1 $v0, $f0
/* 1A89E0 8027A100 00000000 */ nop
/* 1A89E4 8027A104 46800020 */ cvt.s.w $f0, $f0
/* 1A89E8 8027A108 4602003C */ c.lt.s $f0, $f2
/* 1A89EC 8027A10C 00000000 */ nop
/* 1A89F0 8027A110 45000038 */ bc1f .L8027A1F4
/* 1A89F4 8027A114 00000000 */ nop
/* 1A89F8 8027A118 92020135 */ lbu $v0, 0x135($s0)
/* 1A89FC 8027A11C 24420001 */ addiu $v0, $v0, 1
/* 1A8A00 8027A120 A2020135 */ sb $v0, 0x135($s0)
/* 1A8A04 8027A124 AE20004C */ sw $zero, 0x4c($s1)
/* 1A8A08 8027A128 92020135 */ lbu $v0, 0x135($s0)
/* 1A8A0C 8027A12C 30420001 */ andi $v0, $v0, 1
/* 1A8A10 8027A130 10400026 */ beqz $v0, .L8027A1CC
/* 1A8A14 8027A134 00000000 */ nop
/* 1A8A18 8027A138 8E02019C */ lw $v0, 0x19c($s0)
/* 1A8A1C 8027A13C 1040002D */ beqz $v0, .L8027A1F4
/* 1A8A20 8027A140 00000000 */ nop
/* 1A8A24 8027A144 C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A8A28 8027A148 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A8A2C 8027A14C 0809E879 */ j .L8027A1E4
/* 1A8A30 8027A150 8E04019C */ lw $a0, 0x19c($s0)
2020-08-04 08:49:11 +02:00
.L8027A154:
2020-09-24 05:16:13 +02:00
/* 1A8A34 8027A154 C622004C */ lwc1 $f2, 0x4c($s1)
/* 1A8A38 8027A158 3C013F80 */ lui $at, 0x3f80
/* 1A8A3C 8027A15C 44810000 */ mtc1 $at, $f0
/* 1A8A40 8027A160 00000000 */ nop
/* 1A8A44 8027A164 46001080 */ add.s $f2, $f2, $f0
/* 1A8A48 8027A168 E622004C */ swc1 $f2, 0x4c($s1)
/* 1A8A4C 8027A16C 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A8A50 8027A170 00021023 */ negu $v0, $v0
/* 1A8A54 8027A174 44820000 */ mtc1 $v0, $f0
/* 1A8A58 8027A178 00000000 */ nop
/* 1A8A5C 8027A17C 46800020 */ cvt.s.w $f0, $f0
/* 1A8A60 8027A180 4602003E */ c.le.s $f0, $f2
/* 1A8A64 8027A184 00000000 */ nop
/* 1A8A68 8027A188 4500001A */ bc1f .L8027A1F4
/* 1A8A6C 8027A18C 00000000 */ nop
/* 1A8A70 8027A190 92020135 */ lbu $v0, 0x135($s0)
/* 1A8A74 8027A194 24420001 */ addiu $v0, $v0, 1
/* 1A8A78 8027A198 A2020135 */ sb $v0, 0x135($s0)
/* 1A8A7C 8027A19C AE20004C */ sw $zero, 0x4c($s1)
/* 1A8A80 8027A1A0 92020135 */ lbu $v0, 0x135($s0)
/* 1A8A84 8027A1A4 30420001 */ andi $v0, $v0, 1
/* 1A8A88 8027A1A8 10400008 */ beqz $v0, .L8027A1CC
/* 1A8A8C 8027A1AC 00000000 */ nop
/* 1A8A90 8027A1B0 8E02019C */ lw $v0, 0x19c($s0)
/* 1A8A94 8027A1B4 1040000F */ beqz $v0, .L8027A1F4
/* 1A8A98 8027A1B8 00000000 */ nop
/* 1A8A9C 8027A1BC C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A8AA0 8027A1C0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A8AA4 8027A1C4 0809E879 */ j .L8027A1E4
/* 1A8AA8 8027A1C8 8E04019C */ lw $a0, 0x19c($s0)
2020-08-04 08:49:11 +02:00
.L8027A1CC:
2020-09-24 05:16:13 +02:00
/* 1A8AAC 8027A1CC 8E0201A0 */ lw $v0, 0x1a0($s0)
/* 1A8AB0 8027A1D0 10400008 */ beqz $v0, .L8027A1F4
/* 1A8AB4 8027A1D4 00000000 */ nop
/* 1A8AB8 8027A1D8 C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A8ABC 8027A1DC E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A8AC0 8027A1E0 8E0401A0 */ lw $a0, 0x1a0($s0)
2020-08-04 08:49:11 +02:00
.L8027A1E4:
2020-09-24 05:16:13 +02:00
/* 1A8AC4 8027A1E4 8E060144 */ lw $a2, 0x144($s0)
/* 1A8AC8 8027A1E8 8E070148 */ lw $a3, 0x148($s0)
/* 1A8ACC 8027A1EC 0C052757 */ jal play_sound_at_position
/* 1A8AD0 8027A1F0 0000282D */ daddu $a1, $zero, $zero
2020-08-04 08:49:11 +02:00
.L8027A1F4:
2020-09-24 05:16:13 +02:00
/* 1A8AD4 8027A1F4 96220064 */ lhu $v0, 0x64($s1)
/* 1A8AD8 8027A1F8 2442FFFF */ addiu $v0, $v0, -1
/* 1A8ADC 8027A1FC A6220064 */ sh $v0, 0x64($s1)
/* 1A8AE0 8027A200 00021400 */ sll $v0, $v0, 0x10
/* 1A8AE4 8027A204 1C40000D */ bgtz $v0, .L8027A23C
/* 1A8AE8 8027A208 0000102D */ daddu $v0, $zero, $zero
/* 1A8AEC 8027A20C C6200018 */ lwc1 $f0, 0x18($s1)
/* 1A8AF0 8027A210 8E04019C */ lw $a0, 0x19c($s0)
/* 1A8AF4 8027A214 E6000144 */ swc1 $f0, 0x144($s0)
/* 1A8AF8 8027A218 C6200020 */ lwc1 $f0, 0x20($s1)
/* 1A8AFC 8027A21C 10800006 */ beqz $a0, .L8027A238
/* 1A8B00 8027A220 E600014C */ swc1 $f0, 0x14c($s0)
/* 1A8B04 8027A224 8E0201A0 */ lw $v0, 0x1a0($s0)
/* 1A8B08 8027A228 14400004 */ bnez $v0, .L8027A23C
/* 1A8B0C 8027A22C 24020001 */ addiu $v0, $zero, 1
/* 1A8B10 8027A230 0C0154F0 */ jal func_800553C0
/* 1A8B14 8027A234 00000000 */ nop
2020-08-04 08:49:11 +02:00
.L8027A238:
2020-09-24 05:16:13 +02:00
/* 1A8B18 8027A238 24020001 */ addiu $v0, $zero, 1
2020-08-04 08:49:11 +02:00
.L8027A23C:
2020-09-24 05:16:13 +02:00
/* 1A8B1C 8027A23C 8FBF0024 */ lw $ra, 0x24($sp)
/* 1A8B20 8027A240 8FB20020 */ lw $s2, 0x20($sp)
/* 1A8B24 8027A244 8FB1001C */ lw $s1, 0x1c($sp)
/* 1A8B28 8027A248 8FB00018 */ lw $s0, 0x18($sp)
/* 1A8B2C 8027A24C D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 1A8B30 8027A250 D7B80038 */ ldc1 $f24, 0x38($sp)
/* 1A8B34 8027A254 D7B60030 */ ldc1 $f22, 0x30($sp)
/* 1A8B38 8027A258 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 1A8B3C 8027A25C 03E00008 */ jr $ra
/* 1A8B40 8027A260 27BD0048 */ addiu $sp, $sp, 0x48