mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
205 lines
9.1 KiB
ArmAsm
205 lines
9.1 KiB
ArmAsm
|
.set noat # allow manual use of $at
|
||
|
.set noreorder # don't insert nops after branches
|
||
|
|
||
|
|
||
|
glabel func_8005904C
|
||
|
/* 03444C 8005904C 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||
|
/* 034450 80059050 AFB3001C */ sw $s3, 0x1c($sp)
|
||
|
/* 034454 80059054 0080982D */ daddu $s3, $a0, $zero
|
||
|
/* 034458 80059058 30A500FF */ andi $a1, $a1, 0xff
|
||
|
/* 03445C 8005905C 24A5FFFF */ addiu $a1, $a1, -1
|
||
|
/* 034460 80059060 2CA2000A */ sltiu $v0, $a1, 0xa
|
||
|
/* 034464 80059064 AFBF0020 */ sw $ra, 0x20($sp)
|
||
|
/* 034468 80059068 AFB20018 */ sw $s2, 0x18($sp)
|
||
|
/* 03446C 8005906C AFB10014 */ sw $s1, 0x14($sp)
|
||
|
/* 034470 80059070 AFB00010 */ sw $s0, 0x10($sp)
|
||
|
/* 034474 80059074 8E660000 */ lw $a2, ($s3)
|
||
|
/* 034478 80059078 10400021 */ beqz $v0, .L80059100
|
||
|
/* 03447C 8005907C 00051080 */ sll $v0, $a1, 2
|
||
|
/* 034480 80059080 3C01800A */ lui $at, 0x800a
|
||
|
/* 034484 80059084 00220821 */ addu $at, $at, $v0
|
||
|
/* 034488 80059088 8C228940 */ lw $v0, -0x76c0($at)
|
||
|
/* 03448C 8005908C 00400008 */ jr $v0
|
||
|
/* 034490 80059090 00000000 */ nop
|
||
|
/* 034494 80059094 3C048008 */ lui $a0, 0x8008
|
||
|
/* 034498 80059098 08016442 */ j .L80059108
|
||
|
/* 03449C 8005909C 2484EFE0 */ addiu $a0, $a0, -0x1020
|
||
|
|
||
|
/* 0344A0 800590A0 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344A4 800590A4 08016442 */ j .L80059108
|
||
|
/* 0344A8 800590A8 2484F158 */ addiu $a0, $a0, -0xea8
|
||
|
|
||
|
/* 0344AC 800590AC 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344B0 800590B0 08016442 */ j .L80059108
|
||
|
/* 0344B4 800590B4 2484F180 */ addiu $a0, $a0, -0xe80
|
||
|
|
||
|
/* 0344B8 800590B8 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344BC 800590BC 08016442 */ j .L80059108
|
||
|
/* 0344C0 800590C0 2484F1A8 */ addiu $a0, $a0, -0xe58
|
||
|
|
||
|
/* 0344C4 800590C4 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344C8 800590C8 08016442 */ j .L80059108
|
||
|
/* 0344CC 800590CC 8C84F1F8 */ lw $a0, -0xe08($a0)
|
||
|
|
||
|
/* 0344D0 800590D0 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344D4 800590D4 08016442 */ j .L80059108
|
||
|
/* 0344D8 800590D8 8C84F1FC */ lw $a0, -0xe04($a0)
|
||
|
|
||
|
/* 0344DC 800590DC 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344E0 800590E0 08016442 */ j .L80059108
|
||
|
/* 0344E4 800590E4 8C84F200 */ lw $a0, -0xe00($a0)
|
||
|
|
||
|
/* 0344E8 800590E8 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344EC 800590EC 08016442 */ j .L80059108
|
||
|
/* 0344F0 800590F0 8C84F204 */ lw $a0, -0xdfc($a0)
|
||
|
|
||
|
/* 0344F4 800590F4 3C048008 */ lui $a0, 0x8008
|
||
|
/* 0344F8 800590F8 08016442 */ j .L80059108
|
||
|
/* 0344FC 800590FC 2484F048 */ addiu $a0, $a0, -0xfb8
|
||
|
|
||
|
.L80059100:
|
||
|
/* 034500 80059100 3C048008 */ lui $a0, 0x8008
|
||
|
/* 034504 80059104 2484F1D0 */ addiu $a0, $a0, -0xe30
|
||
|
.L80059108:
|
||
|
/* 034508 80059108 90820003 */ lbu $v0, 3($a0)
|
||
|
/* 03450C 8005910C A2620010 */ sb $v0, 0x10($s3)
|
||
|
/* 034510 80059110 8C830004 */ lw $v1, 4($a0)
|
||
|
/* 034514 80059114 8E620000 */ lw $v0, ($s3)
|
||
|
/* 034518 80059118 24110507 */ addiu $s1, $zero, 0x507
|
||
|
/* 03451C 8005911C AE620004 */ sw $v0, 4($s3)
|
||
|
/* 034520 80059120 00031040 */ sll $v0, $v1, 1
|
||
|
/* 034524 80059124 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 034528 80059128 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 03452C 8005912C 00431023 */ subu $v0, $v0, $v1
|
||
|
/* 034530 80059130 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 034534 80059134 AE620008 */ sw $v0, 8($s3)
|
||
|
.L80059138:
|
||
|
/* 034538 80059138 ACC00000 */ sw $zero, ($a2)
|
||
|
/* 03453C 8005913C 2631FFFF */ addiu $s1, $s1, -1
|
||
|
/* 034540 80059140 0621FFFD */ bgez $s1, .L80059138
|
||
|
/* 034544 80059144 24C60004 */ addiu $a2, $a2, 4
|
||
|
/* 034548 80059148 92620010 */ lbu $v0, 0x10($s3)
|
||
|
/* 03454C 8005914C 10400069 */ beqz $v0, .L800592F4
|
||
|
/* 034550 80059150 0000882D */ daddu $s1, $zero, $zero
|
||
|
/* 034554 80059154 0220902D */ daddu $s2, $s1, $zero
|
||
|
/* 034558 80059158 24020002 */ addiu $v0, $zero, 2
|
||
|
/* 03455C 8005915C 00421004 */ sllv $v0, $v0, $v0
|
||
|
/* 034560 80059160 00448021 */ addu $s0, $v0, $a0
|
||
|
.L80059164:
|
||
|
/* 034564 80059164 8E62000C */ lw $v0, 0xc($s3)
|
||
|
/* 034568 80059168 8E030000 */ lw $v1, ($s0)
|
||
|
/* 03456C 8005916C 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 034570 80059170 00522021 */ addu $a0, $v0, $s2
|
||
|
/* 034574 80059174 00031040 */ sll $v0, $v1, 1
|
||
|
/* 034578 80059178 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 03457C 8005917C 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 034580 80059180 00431023 */ subu $v0, $v0, $v1
|
||
|
/* 034584 80059184 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 034588 80059188 AC820000 */ sw $v0, ($a0)
|
||
|
/* 03458C 8005918C 8E030000 */ lw $v1, ($s0)
|
||
|
/* 034590 80059190 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 034594 80059194 00031040 */ sll $v0, $v1, 1
|
||
|
/* 034598 80059198 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 03459C 8005919C 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 0345A0 800591A0 00431023 */ subu $v0, $v0, $v1
|
||
|
/* 0345A4 800591A4 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 0345A8 800591A8 AC820004 */ sw $v0, 4($a0)
|
||
|
/* 0345AC 800591AC 96020002 */ lhu $v0, 2($s0)
|
||
|
/* 0345B0 800591B0 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 0345B4 800591B4 A482000A */ sh $v0, 0xa($a0)
|
||
|
/* 0345B8 800591B8 96020002 */ lhu $v0, 2($s0)
|
||
|
/* 0345BC 800591BC 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 0345C0 800591C0 A4820008 */ sh $v0, 8($a0)
|
||
|
/* 0345C4 800591C4 96020002 */ lhu $v0, 2($s0)
|
||
|
/* 0345C8 800591C8 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 0345CC 800591CC A482000C */ sh $v0, 0xc($a0)
|
||
|
/* 0345D0 800591D0 8E020000 */ lw $v0, ($s0)
|
||
|
/* 0345D4 800591D4 50400033 */ beql $v0, $zero, .L800592A4
|
||
|
/* 0345D8 800591D8 AC800028 */ sw $zero, 0x28($a0)
|
||
|
/* 0345DC 800591DC 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 0345E0 800591E0 44820000 */ mtc1 $v0, $f0
|
||
|
/* 0345E4 800591E4 00000000 */ nop
|
||
|
/* 0345E8 800591E8 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 0345EC 800591EC 3C01447A */ lui $at, 0x447a
|
||
|
/* 0345F0 800591F0 44811000 */ mtc1 $at, $f2
|
||
|
/* 0345F4 800591F4 8C830004 */ lw $v1, 4($a0)
|
||
|
/* 0345F8 800591F8 8C820000 */ lw $v0, ($a0)
|
||
|
/* 0345FC 800591FC 46020003 */ div.s $f0, $f0, $f2
|
||
|
/* 034600 80059200 46000021 */ cvt.d.s $f0, $f0
|
||
|
/* 034604 80059204 00621823 */ subu $v1, $v1, $v0
|
||
|
/* 034608 80059208 46200000 */ add.d $f0, $f0, $f0
|
||
|
/* 03460C 8005920C 3C028008 */ lui $v0, 0x8008
|
||
|
/* 034610 80059210 8C428E50 */ lw $v0, -0x71b0($v0)
|
||
|
/* 034614 80059214 44832000 */ mtc1 $v1, $f4
|
||
|
/* 034618 80059218 00000000 */ nop
|
||
|
/* 03461C 8005921C 46802121 */ cvt.d.w $f4, $f4
|
||
|
/* 034620 80059220 C4420008 */ lwc1 $f2, 8($v0)
|
||
|
/* 034624 80059224 468010A1 */ cvt.d.w $f2, $f2
|
||
|
/* 034628 80059228 46220003 */ div.d $f0, $f0, $f2
|
||
|
/* 03462C 8005922C 46200020 */ cvt.s.d $f0, $f0
|
||
|
/* 034630 80059230 E4800010 */ swc1 $f0, 0x10($a0)
|
||
|
/* 034634 80059234 C6000000 */ lwc1 $f0, ($s0)
|
||
|
/* 034638 80059238 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 03463C 8005923C 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 034640 80059240 3C01800A */ lui $at, 0x800a
|
||
|
/* 034644 80059244 D4228968 */ ldc1 $f2, -0x7698($at)
|
||
|
/* 034648 80059248 46000021 */ cvt.d.s $f0, $f0
|
||
|
/* 03464C 8005924C 04610006 */ bgez $v1, .L80059268
|
||
|
/* 034650 80059250 46220083 */ div.d $f2, $f0, $f2
|
||
|
/* 034654 80059254 3C0141F0 */ lui $at, 0x41f0
|
||
|
/* 034658 80059258 44810800 */ mtc1 $at, $f1
|
||
|
/* 03465C 8005925C 44800000 */ mtc1 $zero, $f0
|
||
|
/* 034660 80059260 00000000 */ nop
|
||
|
/* 034664 80059264 46202100 */ add.d $f4, $f4, $f0
|
||
|
.L80059268:
|
||
|
/* 034668 80059268 46241002 */ mul.d $f0, $f2, $f4
|
||
|
/* 03466C 8005926C 00000000 */ nop
|
||
|
/* 034670 80059270 3C013F80 */ lui $at, 0x3f80
|
||
|
/* 034674 80059274 44811000 */ mtc1 $at, $f2
|
||
|
/* 034678 80059278 8C82002C */ lw $v0, 0x2c($a0)
|
||
|
/* 03467C 8005927C AC800018 */ sw $zero, 0x18($a0)
|
||
|
/* 034680 80059280 E4820014 */ swc1 $f2, 0x14($a0)
|
||
|
/* 034684 80059284 AC820028 */ sw $v0, 0x28($a0)
|
||
|
/* 034688 80059288 46200020 */ cvt.s.d $f0, $f0
|
||
|
/* 03468C 8005928C E480001C */ swc1 $f0, 0x1c($a0)
|
||
|
/* 034690 80059290 AC400008 */ sw $zero, 8($v0)
|
||
|
/* 034694 80059294 8C830028 */ lw $v1, 0x28($a0)
|
||
|
/* 034698 80059298 24020001 */ addiu $v0, $zero, 1
|
||
|
/* 03469C 8005929C 080164AA */ j .L800592A8
|
||
|
/* 0346A0 800592A0 AC62000C */ sw $v0, 0xc($v1)
|
||
|
|
||
|
.L800592A4:
|
||
|
/* 0346A4 800592A4 26100008 */ addiu $s0, $s0, 8
|
||
|
.L800592A8:
|
||
|
/* 0346A8 800592A8 8E020000 */ lw $v0, ($s0)
|
||
|
/* 0346AC 800592AC 5040000A */ beql $v0, $zero, .L800592D8
|
||
|
/* 0346B0 800592B0 AC800020 */ sw $zero, 0x20($a0)
|
||
|
/* 0346B4 800592B4 8C830024 */ lw $v1, 0x24($a0)
|
||
|
/* 0346B8 800592B8 AC830020 */ sw $v1, 0x20($a0)
|
||
|
/* 0346BC 800592BC 96020002 */ lhu $v0, 2($s0)
|
||
|
/* 0346C0 800592C0 A4620000 */ sh $v0, ($v1)
|
||
|
/* 0346C4 800592C4 8C840020 */ lw $a0, 0x20($a0)
|
||
|
/* 0346C8 800592C8 0C016374 */ jal func_80058DD0
|
||
|
/* 0346CC 800592CC 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 0346D0 800592D0 080164B8 */ j .L800592E0
|
||
|
/* 0346D4 800592D4 26520030 */ addiu $s2, $s2, 0x30
|
||
|
|
||
|
.L800592D8:
|
||
|
/* 0346D8 800592D8 26100004 */ addiu $s0, $s0, 4
|
||
|
/* 0346DC 800592DC 26520030 */ addiu $s2, $s2, 0x30
|
||
|
.L800592E0:
|
||
|
/* 0346E0 800592E0 92620010 */ lbu $v0, 0x10($s3)
|
||
|
/* 0346E4 800592E4 26310001 */ addiu $s1, $s1, 1
|
||
|
/* 0346E8 800592E8 0222102A */ slt $v0, $s1, $v0
|
||
|
/* 0346EC 800592EC 1440FF9D */ bnez $v0, .L80059164
|
||
|
/* 0346F0 800592F0 00000000 */ nop
|
||
|
.L800592F4:
|
||
|
/* 0346F4 800592F4 8FBF0020 */ lw $ra, 0x20($sp)
|
||
|
/* 0346F8 800592F8 8FB3001C */ lw $s3, 0x1c($sp)
|
||
|
/* 0346FC 800592FC 8FB20018 */ lw $s2, 0x18($sp)
|
||
|
/* 034700 80059300 8FB10014 */ lw $s1, 0x14($sp)
|
||
|
/* 034704 80059304 8FB00010 */ lw $s0, 0x10($sp)
|
||
|
/* 034708 80059308 03E00008 */ jr $ra
|
||
|
/* 03470C 8005930C 27BD0028 */ addiu $sp, $sp, 0x28
|
||
|
|