mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
257 lines
13 KiB
ArmAsm
257 lines
13 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
glabel func_8024C570
|
|
/* 17AE50 8024C570 27BDFFB0 */ addiu $sp, $sp, -0x50
|
|
/* 17AE54 8024C574 AFB00018 */ sw $s0, 0x18($sp)
|
|
/* 17AE58 8024C578 3C10800B */ lui $s0, %hi(D_800B22D8)
|
|
/* 17AE5C 8024C57C 261022D8 */ addiu $s0, $s0, %lo(D_800B22D8)
|
|
/* 17AE60 8024C580 AFBF001C */ sw $ra, 0x1c($sp)
|
|
/* 17AE64 8024C584 F7BE0048 */ sdc1 $f30, 0x48($sp)
|
|
/* 17AE68 8024C588 F7BC0040 */ sdc1 $f28, 0x40($sp)
|
|
/* 17AE6C 8024C58C F7BA0038 */ sdc1 $f26, 0x38($sp)
|
|
/* 17AE70 8024C590 F7B80030 */ sdc1 $f24, 0x30($sp)
|
|
/* 17AE74 8024C594 F7B60028 */ sdc1 $f22, 0x28($sp)
|
|
/* 17AE78 8024C598 10A00036 */ beqz $a1, .L8024C674
|
|
/* 17AE7C 8024C59C F7B40020 */ sdc1 $f20, 0x20($sp)
|
|
/* 17AE80 8024C5A0 3C02802A */ lui $v0, %hi(D_8029F2A4)
|
|
/* 17AE84 8024C5A4 8042F2A4 */ lb $v0, %lo(D_8029F2A4)($v0)
|
|
/* 17AE88 8024C5A8 1040000A */ beqz $v0, .L8024C5D4
|
|
/* 17AE8C 8024C5AC 00000000 */ nop
|
|
/* 17AE90 8024C5B0 C6000054 */ lwc1 $f0, 0x54($s0)
|
|
/* 17AE94 8024C5B4 C6020058 */ lwc1 $f2, 0x58($s0)
|
|
/* 17AE98 8024C5B8 C604005C */ lwc1 $f4, 0x5c($s0)
|
|
/* 17AE9C 8024C5BC 3C01802A */ lui $at, %hi(D_8029F270)
|
|
/* 17AEA0 8024C5C0 E420F270 */ swc1 $f0, %lo(D_8029F270)($at)
|
|
/* 17AEA4 8024C5C4 3C01802A */ lui $at, %hi(D_8029F274)
|
|
/* 17AEA8 8024C5C8 E422F274 */ swc1 $f2, %lo(D_8029F274)($at)
|
|
/* 17AEAC 8024C5CC 3C01802A */ lui $at, %hi(D_8029F278)
|
|
/* 17AEB0 8024C5D0 E424F278 */ swc1 $f4, %lo(D_8029F278)($at)
|
|
.L8024C5D4:
|
|
/* 17AEB4 8024C5D4 8602001E */ lh $v0, 0x1e($s0)
|
|
/* 17AEB8 8024C5D8 86040026 */ lh $a0, 0x26($s0)
|
|
/* 17AEBC 8024C5DC 86030024 */ lh $v1, 0x24($s0)
|
|
/* 17AEC0 8024C5E0 44820000 */ mtc1 $v0, $f0
|
|
/* 17AEC4 8024C5E4 00000000 */ nop
|
|
/* 17AEC8 8024C5E8 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17AECC 8024C5EC 86020022 */ lh $v0, 0x22($s0)
|
|
/* 17AED0 8024C5F0 3C01802A */ lui $at, %hi(D_8029F28C)
|
|
/* 17AED4 8024C5F4 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
|
|
/* 17AED8 8024C5F8 44820000 */ mtc1 $v0, $f0
|
|
/* 17AEDC 8024C5FC 00000000 */ nop
|
|
/* 17AEE0 8024C600 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17AEE4 8024C604 3C01802A */ lui $at, %hi(D_8029F294)
|
|
/* 17AEE8 8024C608 E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
|
|
/* 17AEEC 8024C60C 44830000 */ mtc1 $v1, $f0
|
|
/* 17AEF0 8024C610 00000000 */ nop
|
|
/* 17AEF4 8024C614 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17AEF8 8024C618 3C01802A */ lui $at, %hi(D_8029F290)
|
|
/* 17AEFC 8024C61C E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
|
|
/* 17AF00 8024C620 04820001 */ bltzl $a0, .L8024C628
|
|
/* 17AF04 8024C624 248400FF */ addiu $a0, $a0, 0xff
|
|
.L8024C628:
|
|
/* 17AF08 8024C628 00041203 */ sra $v0, $a0, 8
|
|
/* 17AF0C 8024C62C C6020054 */ lwc1 $f2, 0x54($s0)
|
|
/* 17AF10 8024C630 C6040058 */ lwc1 $f4, 0x58($s0)
|
|
/* 17AF14 8024C634 C606005C */ lwc1 $f6, 0x5c($s0)
|
|
/* 17AF18 8024C638 3C03802A */ lui $v1, %hi(D_8029F29E)
|
|
/* 17AF1C 8024C63C 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
|
|
/* 17AF20 8024C640 44820000 */ mtc1 $v0, $f0
|
|
/* 17AF24 8024C644 00000000 */ nop
|
|
/* 17AF28 8024C648 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17AF2C 8024C64C 3C01802A */ lui $at, %hi(D_8029F298)
|
|
/* 17AF30 8024C650 E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
|
|
/* 17AF34 8024C654 3C01802A */ lui $at, %hi(D_8029F2A8)
|
|
/* 17AF38 8024C658 E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
|
|
/* 17AF3C 8024C65C 3C01802A */ lui $at, %hi(D_8029F2AC)
|
|
/* 17AF40 8024C660 E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
|
|
/* 17AF44 8024C664 3C01802A */ lui $at, %hi(D_8029F2B0)
|
|
/* 17AF48 8024C668 E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
|
|
/* 17AF4C 8024C66C 3C01802A */ lui $at, %hi(D_8029F2A0)
|
|
/* 17AF50 8024C670 A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
|
|
.L8024C674:
|
|
/* 17AF54 8024C674 3C01802A */ lui $at, %hi(D_8029F274)
|
|
/* 17AF58 8024C678 C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
|
|
/* 17AF5C 8024C67C 3C01802A */ lui $at, %hi(D_8029F270)
|
|
/* 17AF60 8024C680 C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
|
|
/* 17AF64 8024C684 3C02802A */ lui $v0, %hi(D_8029F2A5)
|
|
/* 17AF68 8024C688 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
|
|
/* 17AF6C 8024C68C 3C01802A */ lui $at, %hi(D_8029F278)
|
|
/* 17AF70 8024C690 C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
|
|
/* 17AF74 8024C694 14400027 */ bnez $v0, .L8024C734
|
|
/* 17AF78 8024C698 E7BC0010 */ swc1 $f28, 0x10($sp)
|
|
/* 17AF7C 8024C69C 3C02802A */ lui $v0, %hi(D_8029F29E)
|
|
/* 17AF80 8024C6A0 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
|
|
/* 17AF84 8024C6A4 3C03802A */ lui $v1, %hi(D_8029F2A0)
|
|
/* 17AF88 8024C6A8 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
|
|
/* 17AF8C 8024C6AC 3C013F80 */ lui $at, 0x3f80
|
|
/* 17AF90 8024C6B0 4481C000 */ mtc1 $at, $f24
|
|
/* 17AF94 8024C6B4 44822000 */ mtc1 $v0, $f4
|
|
/* 17AF98 8024C6B8 00000000 */ nop
|
|
/* 17AF9C 8024C6BC 46802120 */ cvt.s.w $f4, $f4
|
|
/* 17AFA0 8024C6C0 44830000 */ mtc1 $v1, $f0
|
|
/* 17AFA4 8024C6C4 00000000 */ nop
|
|
/* 17AFA8 8024C6C8 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17AFAC 8024C6CC 46002103 */ div.s $f4, $f4, $f0
|
|
/* 17AFB0 8024C6D0 4604C301 */ sub.s $f12, $f24, $f4
|
|
/* 17AFB4 8024C6D4 3C014049 */ lui $at, 0x4049
|
|
/* 17AFB8 8024C6D8 34210FD0 */ ori $at, $at, 0xfd0
|
|
/* 17AFBC 8024C6DC 4481B000 */ mtc1 $at, $f22
|
|
/* 17AFC0 8024C6E0 00000000 */ nop
|
|
/* 17AFC4 8024C6E4 46166302 */ mul.s $f12, $f12, $f22
|
|
/* 17AFC8 8024C6E8 00000000 */ nop
|
|
/* 17AFCC 8024C6EC 3C013F00 */ lui $at, 0x3f00
|
|
/* 17AFD0 8024C6F0 4481A000 */ mtc1 $at, $f20
|
|
/* 17AFD4 8024C6F4 00000000 */ nop
|
|
/* 17AFD8 8024C6F8 46146302 */ mul.s $f12, $f12, $f20
|
|
/* 17AFDC 8024C6FC 0C00A85B */ jal sin_rad
|
|
/* 17AFE0 8024C700 00000000 */ nop
|
|
/* 17AFE4 8024C704 46160002 */ mul.s $f0, $f0, $f22
|
|
/* 17AFE8 8024C708 00000000 */ nop
|
|
/* 17AFEC 8024C70C 46140302 */ mul.s $f12, $f0, $f20
|
|
/* 17AFF0 8024C710 0C00A85B */ jal sin_rad
|
|
/* 17AFF4 8024C714 00000000 */ nop
|
|
/* 17AFF8 8024C718 46160002 */ mul.s $f0, $f0, $f22
|
|
/* 17AFFC 8024C71C 00000000 */ nop
|
|
/* 17B000 8024C720 46140302 */ mul.s $f12, $f0, $f20
|
|
/* 17B004 8024C724 0C00A85B */ jal sin_rad
|
|
/* 17B008 8024C728 00000000 */ nop
|
|
/* 17B00C 8024C72C 080931D8 */ j .L8024C760
|
|
/* 17B010 8024C730 4600C101 */ sub.s $f4, $f24, $f0
|
|
.L8024C734:
|
|
/* 17B014 8024C734 3C02802A */ lui $v0, %hi(D_8029F29E)
|
|
/* 17B018 8024C738 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
|
|
/* 17B01C 8024C73C 3C03802A */ lui $v1, %hi(D_8029F2A0)
|
|
/* 17B020 8024C740 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
|
|
/* 17B024 8024C744 44822000 */ mtc1 $v0, $f4
|
|
/* 17B028 8024C748 00000000 */ nop
|
|
/* 17B02C 8024C74C 46802120 */ cvt.s.w $f4, $f4
|
|
/* 17B030 8024C750 44830000 */ mtc1 $v1, $f0
|
|
/* 17B034 8024C754 00000000 */ nop
|
|
/* 17B038 8024C758 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17B03C 8024C75C 46002103 */ div.s $f4, $f4, $f0
|
|
.L8024C760:
|
|
/* 17B040 8024C760 3C01802A */ lui $at, %hi(D_8029F2A8)
|
|
/* 17B044 8024C764 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
|
|
/* 17B048 8024C768 4604A502 */ mul.s $f20, $f20, $f4
|
|
/* 17B04C 8024C76C 00000000 */ nop
|
|
/* 17B050 8024C770 3C01802A */ lui $at, %hi(D_8029F2AC)
|
|
/* 17B054 8024C774 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
|
|
/* 17B058 8024C778 46049482 */ mul.s $f18, $f18, $f4
|
|
/* 17B05C 8024C77C 00000000 */ nop
|
|
/* 17B060 8024C780 3C01802A */ lui $at, %hi(D_8029F2B0)
|
|
/* 17B064 8024C784 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
|
|
/* 17B068 8024C788 46048402 */ mul.s $f16, $f16, $f4
|
|
/* 17B06C 8024C78C 00000000 */ nop
|
|
/* 17B070 8024C790 3C01802A */ lui $at, %hi(D_8029F298)
|
|
/* 17B074 8024C794 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
|
|
/* 17B078 8024C798 46043182 */ mul.s $f6, $f6, $f4
|
|
/* 17B07C 8024C79C 00000000 */ nop
|
|
/* 17B080 8024C7A0 3C01802A */ lui $at, %hi(D_8029F28C)
|
|
/* 17B084 8024C7A4 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
|
|
/* 17B088 8024C7A8 46046302 */ mul.s $f12, $f12, $f4
|
|
/* 17B08C 8024C7AC 00000000 */ nop
|
|
/* 17B090 8024C7B0 3C01802A */ lui $at, %hi(D_8029F290)
|
|
/* 17B094 8024C7B4 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
|
|
/* 17B098 8024C7B8 46044202 */ mul.s $f8, $f8, $f4
|
|
/* 17B09C 8024C7BC 00000000 */ nop
|
|
/* 17B0A0 8024C7C0 3C013F80 */ lui $at, 0x3f80
|
|
/* 17B0A4 8024C7C4 44811000 */ mtc1 $at, $f2
|
|
/* 17B0A8 8024C7C8 00000000 */ nop
|
|
/* 17B0AC 8024C7CC 46041081 */ sub.s $f2, $f2, $f4
|
|
/* 17B0B0 8024C7D0 4602D682 */ mul.s $f26, $f26, $f2
|
|
/* 17B0B4 8024C7D4 00000000 */ nop
|
|
/* 17B0B8 8024C7D8 C7BC0010 */ lwc1 $f28, 0x10($sp)
|
|
/* 17B0BC 8024C7DC 4602E602 */ mul.s $f24, $f28, $f2
|
|
/* 17B0C0 8024C7E0 00000000 */ nop
|
|
/* 17B0C4 8024C7E4 3C02802A */ lui $v0, %hi(D_8029F286)
|
|
/* 17B0C8 8024C7E8 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
|
|
/* 17B0CC 8024C7EC 44820000 */ mtc1 $v0, $f0
|
|
/* 17B0D0 8024C7F0 00000000 */ nop
|
|
/* 17B0D4 8024C7F4 46800020 */ cvt.s.w $f0, $f0
|
|
/* 17B0D8 8024C7F8 46020002 */ mul.s $f0, $f0, $f2
|
|
/* 17B0DC 8024C7FC 00000000 */ nop
|
|
/* 17B0E0 8024C800 4602F582 */ mul.s $f22, $f30, $f2
|
|
/* 17B0E4 8024C804 00000000 */ nop
|
|
/* 17B0E8 8024C808 3C02802A */ lui $v0, %hi(D_8029F280)
|
|
/* 17B0EC 8024C80C 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
|
|
/* 17B0F0 8024C810 44827000 */ mtc1 $v0, $f14
|
|
/* 17B0F4 8024C814 00000000 */ nop
|
|
/* 17B0F8 8024C818 468073A0 */ cvt.s.w $f14, $f14
|
|
/* 17B0FC 8024C81C 46027382 */ mul.s $f14, $f14, $f2
|
|
/* 17B100 8024C820 00000000 */ nop
|
|
/* 17B104 8024C824 3C02802A */ lui $v0, %hi(D_8029F282)
|
|
/* 17B108 8024C828 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
|
|
/* 17B10C 8024C82C 44825000 */ mtc1 $v0, $f10
|
|
/* 17B110 8024C830 00000000 */ nop
|
|
/* 17B114 8024C834 468052A0 */ cvt.s.w $f10, $f10
|
|
/* 17B118 8024C838 46025282 */ mul.s $f10, $f10, $f2
|
|
/* 17B11C 8024C83C 00000000 */ nop
|
|
/* 17B120 8024C840 46003180 */ add.s $f6, $f6, $f0
|
|
/* 17B124 8024C844 3C014380 */ lui $at, 0x4380
|
|
/* 17B128 8024C848 44810000 */ mtc1 $at, $f0
|
|
/* 17B12C 8024C84C 00000000 */ nop
|
|
/* 17B130 8024C850 46003182 */ mul.s $f6, $f6, $f0
|
|
/* 17B134 8024C854 00000000 */ nop
|
|
/* 17B138 8024C858 3C01802A */ lui $at, %hi(D_8029F294)
|
|
/* 17B13C 8024C85C C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
|
|
/* 17B140 8024C860 46040002 */ mul.s $f0, $f0, $f4
|
|
/* 17B144 8024C864 00000000 */ nop
|
|
/* 17B148 8024C868 461AA500 */ add.s $f20, $f20, $f26
|
|
/* 17B14C 8024C86C 46189480 */ add.s $f18, $f18, $f24
|
|
/* 17B150 8024C870 46168400 */ add.s $f16, $f16, $f22
|
|
/* 17B154 8024C874 460E6300 */ add.s $f12, $f12, $f14
|
|
/* 17B158 8024C878 3C04802A */ lui $a0, %hi(D_8029F29E)
|
|
/* 17B15C 8024C87C 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
|
|
/* 17B160 8024C880 3C02802A */ lui $v0, %hi(D_8029F284)
|
|
/* 17B164 8024C884 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
|
|
/* 17B168 8024C888 460A4200 */ add.s $f8, $f8, $f10
|
|
/* 17B16C 8024C88C E6140054 */ swc1 $f20, 0x54($s0)
|
|
/* 17B170 8024C890 44822000 */ mtc1 $v0, $f4
|
|
/* 17B174 8024C894 00000000 */ nop
|
|
/* 17B178 8024C898 46802120 */ cvt.s.w $f4, $f4
|
|
/* 17B17C 8024C89C 46022102 */ mul.s $f4, $f4, $f2
|
|
/* 17B180 8024C8A0 00000000 */ nop
|
|
/* 17B184 8024C8A4 E6120058 */ swc1 $f18, 0x58($s0)
|
|
/* 17B188 8024C8A8 E610005C */ swc1 $f16, 0x5c($s0)
|
|
/* 17B18C 8024C8AC 4600670D */ trunc.w.s $f28, $f12
|
|
/* 17B190 8024C8B0 4402E000 */ mfc1 $v0, $f28
|
|
/* 17B194 8024C8B4 00000000 */ nop
|
|
/* 17B198 8024C8B8 A602001E */ sh $v0, 0x1e($s0)
|
|
/* 17B19C 8024C8BC 46040000 */ add.s $f0, $f0, $f4
|
|
/* 17B1A0 8024C8C0 4600470D */ trunc.w.s $f28, $f8
|
|
/* 17B1A4 8024C8C4 4402E000 */ mfc1 $v0, $f28
|
|
/* 17B1A8 8024C8C8 00000000 */ nop
|
|
/* 17B1AC 8024C8CC A6020024 */ sh $v0, 0x24($s0)
|
|
/* 17B1B0 8024C8D0 4600070D */ trunc.w.s $f28, $f0
|
|
/* 17B1B4 8024C8D4 4402E000 */ mfc1 $v0, $f28
|
|
/* 17B1B8 8024C8D8 00000000 */ nop
|
|
/* 17B1BC 8024C8DC A6020022 */ sh $v0, 0x22($s0)
|
|
/* 17B1C0 8024C8E0 4600370D */ trunc.w.s $f28, $f6
|
|
/* 17B1C4 8024C8E4 4402E000 */ mfc1 $v0, $f28
|
|
/* 17B1C8 8024C8E8 00000000 */ nop
|
|
/* 17B1CC 8024C8EC A6020026 */ sh $v0, 0x26($s0)
|
|
/* 17B1D0 8024C8F0 84820000 */ lh $v0, ($a0)
|
|
/* 17B1D4 8024C8F4 94830000 */ lhu $v1, ($a0)
|
|
/* 17B1D8 8024C8F8 14400006 */ bnez $v0, .L8024C914
|
|
/* 17B1DC 8024C8FC 2462FFFF */ addiu $v0, $v1, -1
|
|
/* 17B1E0 8024C900 24020001 */ addiu $v0, $zero, 1
|
|
/* 17B1E4 8024C904 3C01802A */ lui $at, %hi(D_8029F29C)
|
|
/* 17B1E8 8024C908 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
|
|
/* 17B1EC 8024C90C 08093246 */ j .L8024C918
|
|
/* 17B1F0 8024C910 00000000 */ nop
|
|
.L8024C914:
|
|
/* 17B1F4 8024C914 A4820000 */ sh $v0, ($a0)
|
|
.L8024C918:
|
|
/* 17B1F8 8024C918 8FBF001C */ lw $ra, 0x1c($sp)
|
|
/* 17B1FC 8024C91C 8FB00018 */ lw $s0, 0x18($sp)
|
|
/* 17B200 8024C920 D7BE0048 */ ldc1 $f30, 0x48($sp)
|
|
/* 17B204 8024C924 D7BC0040 */ ldc1 $f28, 0x40($sp)
|
|
/* 17B208 8024C928 D7BA0038 */ ldc1 $f26, 0x38($sp)
|
|
/* 17B20C 8024C92C D7B80030 */ ldc1 $f24, 0x30($sp)
|
|
/* 17B210 8024C930 D7B60028 */ ldc1 $f22, 0x28($sp)
|
|
/* 17B214 8024C934 D7B40020 */ ldc1 $f20, 0x20($sp)
|
|
/* 17B218 8024C938 0000102D */ daddu $v0, $zero, $zero
|
|
/* 17B21C 8024C93C 03E00008 */ jr $ra
|
|
/* 17B220 8024C940 27BD0050 */ addiu $sp, $sp, 0x50
|