mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
166 lines
8.4 KiB
ArmAsm
166 lines
8.4 KiB
ArmAsm
|
.set noat # allow manual use of $at
|
||
|
.set noreorder # don't insert nops after branches
|
||
|
|
||
|
glabel func_8003A4B0
|
||
|
/* 158B0 8003A4B0 27BDFF78 */ addiu $sp, $sp, -0x88
|
||
|
/* 158B4 8003A4B4 F7BA0080 */ sdc1 $f26, 0x80($sp)
|
||
|
/* 158B8 8003A4B8 3C01459C */ lui $at, 0x459c
|
||
|
/* 158BC 8003A4BC 34214000 */ ori $at, $at, 0x4000
|
||
|
/* 158C0 8003A4C0 4481D000 */ mtc1 $at, $f26
|
||
|
/* 158C4 8003A4C4 F7B80078 */ sdc1 $f24, 0x78($sp)
|
||
|
/* 158C8 8003A4C8 4480C000 */ mtc1 $zero, $f24
|
||
|
/* 158CC 8003A4CC AFB10054 */ sw $s1, 0x54($sp)
|
||
|
/* 158D0 8003A4D0 27B10028 */ addiu $s1, $sp, 0x28
|
||
|
/* 158D4 8003A4D4 AFB20058 */ sw $s2, 0x58($sp)
|
||
|
/* 158D8 8003A4D8 0000902D */ daddu $s2, $zero, $zero
|
||
|
/* 158DC 8003A4DC AFB3005C */ sw $s3, 0x5c($sp)
|
||
|
/* 158E0 8003A4E0 241300FF */ addiu $s3, $zero, 0xff
|
||
|
/* 158E4 8003A4E4 F7B60070 */ sdc1 $f22, 0x70($sp)
|
||
|
/* 158E8 8003A4E8 3C01461C */ lui $at, 0x461c
|
||
|
/* 158EC 8003A4EC 34214000 */ ori $at, $at, 0x4000
|
||
|
/* 158F0 8003A4F0 4481B000 */ mtc1 $at, $f22
|
||
|
/* 158F4 8003A4F4 3C03800A */ lui $v1, %hi(D_8009A614)
|
||
|
/* 158F8 8003A4F8 8463A614 */ lh $v1, %lo(D_8009A614)($v1)
|
||
|
/* 158FC 8003A4FC 3C04800B */ lui $a0, %hi(D_800B1D60)
|
||
|
/* 15900 8003A500 24841D60 */ addiu $a0, $a0, %lo(D_800B1D60)
|
||
|
/* 15904 8003A504 AFBF0064 */ sw $ra, 0x64($sp)
|
||
|
/* 15908 8003A508 AFB40060 */ sw $s4, 0x60($sp)
|
||
|
/* 1590C 8003A50C AFB00050 */ sw $s0, 0x50($sp)
|
||
|
/* 15910 8003A510 F7B40068 */ sdc1 $f20, 0x68($sp)
|
||
|
/* 15914 8003A514 00031080 */ sll $v0, $v1, 2
|
||
|
/* 15918 8003A518 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 1591C 8003A51C 00021080 */ sll $v0, $v0, 2
|
||
|
/* 15920 8003A520 00431023 */ subu $v0, $v0, $v1
|
||
|
/* 15924 8003A524 000218C0 */ sll $v1, $v0, 3
|
||
|
/* 15928 8003A528 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 1592C 8003A52C 000210C0 */ sll $v0, $v0, 3
|
||
|
/* 15930 8003A530 0044A021 */ addu $s4, $v0, $a0
|
||
|
.L8003A534:
|
||
|
/* 15934 8003A534 3C03800A */ lui $v1, %hi(D_8009E9A0)
|
||
|
/* 15938 8003A538 8C63E9A0 */ lw $v1, %lo(D_8009E9A0)($v1)
|
||
|
/* 1593C 8003A53C 00121080 */ sll $v0, $s2, 2
|
||
|
/* 15940 8003A540 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 15944 8003A544 8C500000 */ lw $s0, ($v0)
|
||
|
/* 15948 8003A548 52000063 */ beql $s0, $zero, .L8003A6D8
|
||
|
/* 1594C 8003A54C 26520001 */ addiu $s2, $s2, 1
|
||
|
/* 15950 8003A550 8E030000 */ lw $v1, ($s0)
|
||
|
/* 15954 8003A554 50600060 */ beql $v1, $zero, .L8003A6D8
|
||
|
/* 15958 8003A558 26520001 */ addiu $s2, $s2, 1
|
||
|
/* 1595C 8003A55C 3C028100 */ lui $v0, 0x8100
|
||
|
/* 15960 8003A560 34420006 */ ori $v0, $v0, 6
|
||
|
/* 15964 8003A564 00621024 */ and $v0, $v1, $v0
|
||
|
/* 15968 8003A568 5440005B */ bnel $v0, $zero, .L8003A6D8
|
||
|
/* 1596C 8003A56C 26520001 */ addiu $s2, $s2, 1
|
||
|
/* 15970 8003A570 3C013F80 */ lui $at, 0x3f80
|
||
|
/* 15974 8003A574 44810000 */ mtc1 $at, $f0
|
||
|
/* 15978 8003A578 27A20038 */ addiu $v0, $sp, 0x38
|
||
|
/* 1597C 8003A57C AFA20014 */ sw $v0, 0x14($sp)
|
||
|
/* 15980 8003A580 27A2003C */ addiu $v0, $sp, 0x3c
|
||
|
/* 15984 8003A584 AFA20018 */ sw $v0, 0x18($sp)
|
||
|
/* 15988 8003A588 27A20040 */ addiu $v0, $sp, 0x40
|
||
|
/* 1598C 8003A58C AFA2001C */ sw $v0, 0x1c($sp)
|
||
|
/* 15990 8003A590 27A20044 */ addiu $v0, $sp, 0x44
|
||
|
/* 15994 8003A594 AFA20020 */ sw $v0, 0x20($sp)
|
||
|
/* 15998 8003A598 E7A00010 */ swc1 $f0, 0x10($sp)
|
||
|
/* 1599C 8003A59C 8E050038 */ lw $a1, 0x38($s0)
|
||
|
/* 159A0 8003A5A0 8E06003C */ lw $a2, 0x3c($s0)
|
||
|
/* 159A4 8003A5A4 8E070040 */ lw $a3, 0x40($s0)
|
||
|
/* 159A8 8003A5A8 0C00A578 */ jal func_800295E0
|
||
|
/* 159AC 8003A5AC 268400D4 */ addiu $a0, $s4, 0xd4
|
||
|
/* 159B0 8003A5B0 C7A40044 */ lwc1 $f4, 0x44($sp)
|
||
|
/* 159B4 8003A5B4 3C01800A */ lui $at, %hi(D_80098490)
|
||
|
/* 159B8 8003A5B8 D4208490 */ ldc1 $f0, %lo(D_80098490)($at)
|
||
|
/* 159BC 8003A5BC 460020A1 */ cvt.d.s $f2, $f4
|
||
|
/* 159C0 8003A5C0 4620103C */ c.lt.d $f2, $f0
|
||
|
/* 159C4 8003A5C4 00000000 */ nop
|
||
|
/* 159C8 8003A5C8 45000007 */ bc1f .L8003A5E8
|
||
|
/* 159CC 8003A5CC 00000000 */ nop
|
||
|
/* 159D0 8003A5D0 3C01800A */ lui $at, %hi(D_80098498)
|
||
|
/* 159D4 8003A5D4 D4208498 */ ldc1 $f0, %lo(D_80098498)($at)
|
||
|
/* 159D8 8003A5D8 4622003C */ c.lt.d $f0, $f2
|
||
|
/* 159DC 8003A5DC 00000000 */ nop
|
||
|
/* 159E0 8003A5E0 4503003D */ bc1tl .L8003A6D8
|
||
|
/* 159E4 8003A5E4 26520001 */ addiu $s2, $s2, 1
|
||
|
.L8003A5E8:
|
||
|
/* 159E8 8003A5E8 C7A00040 */ lwc1 $f0, 0x40($sp)
|
||
|
/* 159EC 8003A5EC 461A0002 */ mul.s $f0, $f0, $f26
|
||
|
/* 159F0 8003A5F0 00000000 */ nop
|
||
|
/* 159F4 8003A5F4 46040003 */ div.s $f0, $f0, $f4
|
||
|
/* 159F8 8003A5F8 461A0500 */ add.s $f20, $f0, $f26
|
||
|
/* 159FC 8003A5FC 4618A03C */ c.lt.s $f20, $f24
|
||
|
/* 15A00 8003A600 00000000 */ nop
|
||
|
/* 15A04 8003A604 45000003 */ bc1f .L8003A614
|
||
|
/* 15A08 8003A608 00000000 */ nop
|
||
|
/* 15A0C 8003A60C 0800E989 */ j .L8003A624
|
||
|
/* 15A10 8003A610 4600C506 */ mov.s $f20, $f24
|
||
|
.L8003A614:
|
||
|
/* 15A14 8003A614 4614B03C */ c.lt.s $f22, $f20
|
||
|
/* 15A18 8003A618 00000000 */ nop
|
||
|
/* 15A1C 8003A61C 45030001 */ bc1tl .L8003A624
|
||
|
/* 15A20 8003A620 4600B506 */ mov.s $f20, $f22
|
||
|
.L8003A624:
|
||
|
/* 15A24 8003A624 4600A007 */ neg.s $f0, $f20
|
||
|
/* 15A28 8003A628 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 15A2C 8003A62C E6260004 */ swc1 $f6, 4($s1)
|
||
|
/* 15A30 8003A630 3C028004 */ lui $v0, %hi(func_80039C90)
|
||
|
/* 15A34 8003A634 24429C90 */ addiu $v0, $v0, %lo(func_80039C90)
|
||
|
/* 15A38 8003A638 AE300008 */ sw $s0, 8($s1)
|
||
|
/* 15A3C 8003A63C AE22000C */ sw $v0, 0xc($s1)
|
||
|
/* 15A40 8003A640 820200AA */ lb $v0, 0xaa($s0)
|
||
|
/* 15A44 8003A644 AE220000 */ sw $v0, ($s1)
|
||
|
/* 15A48 8003A648 8E020000 */ lw $v0, ($s0)
|
||
|
/* 15A4C 8003A64C 3C030080 */ lui $v1, 0x80
|
||
|
/* 15A50 8003A650 00431024 */ and $v0, $v0, $v1
|
||
|
/* 15A54 8003A654 10400009 */ beqz $v0, .L8003A67C
|
||
|
/* 15A58 8003A658 27A40048 */ addiu $a0, $sp, 0x48
|
||
|
/* 15A5C 8003A65C 27A50049 */ addiu $a1, $sp, 0x49
|
||
|
/* 15A60 8003A660 27A6004A */ addiu $a2, $sp, 0x4a
|
||
|
/* 15A64 8003A664 0C048424 */ jal func_80121090
|
||
|
/* 15A68 8003A668 27A7004B */ addiu $a3, $sp, 0x4b
|
||
|
/* 15A6C 8003A66C 93A2004B */ lbu $v0, 0x4b($sp)
|
||
|
/* 15A70 8003A670 02621023 */ subu $v0, $s3, $v0
|
||
|
/* 15A74 8003A674 0800E9A0 */ j .L8003A680
|
||
|
/* 15A78 8003A678 A20200AD */ sb $v0, 0xad($s0)
|
||
|
.L8003A67C:
|
||
|
/* 15A7C 8003A67C A21300AD */ sb $s3, 0xad($s0)
|
||
|
.L8003A680:
|
||
|
/* 15A80 8003A680 920200AD */ lbu $v0, 0xad($s0)
|
||
|
/* 15A84 8003A684 10400003 */ beqz $v0, .L8003A694
|
||
|
/* 15A88 8003A688 00000000 */ nop
|
||
|
/* 15A8C 8003A68C 0C048AC8 */ jal func_80122B20
|
||
|
/* 15A90 8003A690 0220202D */ daddu $a0, $s1, $zero
|
||
|
.L8003A694:
|
||
|
/* 15A94 8003A694 8E020000 */ lw $v0, ($s0)
|
||
|
/* 15A98 8003A698 3C030010 */ lui $v1, 0x10
|
||
|
/* 15A9C 8003A69C 00431024 */ and $v0, $v0, $v1
|
||
|
/* 15AA0 8003A6A0 5040000D */ beql $v0, $zero, .L8003A6D8
|
||
|
/* 15AA4 8003A6A4 26520001 */ addiu $s2, $s2, 1
|
||
|
/* 15AA8 8003A6A8 4600A007 */ neg.s $f0, $f20
|
||
|
/* 15AAC 8003A6AC 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 15AB0 8003A6B0 E6260004 */ swc1 $f6, 4($s1)
|
||
|
/* 15AB4 8003A6B4 0220202D */ daddu $a0, $s1, $zero
|
||
|
/* 15AB8 8003A6B8 3C028004 */ lui $v0, %hi(func_8003AAF8)
|
||
|
/* 15ABC 8003A6BC 2442AAF8 */ addiu $v0, $v0, %lo(func_8003AAF8)
|
||
|
/* 15AC0 8003A6C0 AE22000C */ sw $v0, 0xc($s1)
|
||
|
/* 15AC4 8003A6C4 24020011 */ addiu $v0, $zero, 0x11
|
||
|
/* 15AC8 8003A6C8 AE300008 */ sw $s0, 8($s1)
|
||
|
/* 15ACC 8003A6CC 0C048AC8 */ jal func_80122B20
|
||
|
/* 15AD0 8003A6D0 AE220000 */ sw $v0, ($s1)
|
||
|
/* 15AD4 8003A6D4 26520001 */ addiu $s2, $s2, 1
|
||
|
.L8003A6D8:
|
||
|
/* 15AD8 8003A6D8 2A420040 */ slti $v0, $s2, 0x40
|
||
|
/* 15ADC 8003A6DC 1440FF95 */ bnez $v0, .L8003A534
|
||
|
/* 15AE0 8003A6E0 00000000 */ nop
|
||
|
/* 15AE4 8003A6E4 8FBF0064 */ lw $ra, 0x64($sp)
|
||
|
/* 15AE8 8003A6E8 8FB40060 */ lw $s4, 0x60($sp)
|
||
|
/* 15AEC 8003A6EC 8FB3005C */ lw $s3, 0x5c($sp)
|
||
|
/* 15AF0 8003A6F0 8FB20058 */ lw $s2, 0x58($sp)
|
||
|
/* 15AF4 8003A6F4 8FB10054 */ lw $s1, 0x54($sp)
|
||
|
/* 15AF8 8003A6F8 8FB00050 */ lw $s0, 0x50($sp)
|
||
|
/* 15AFC 8003A6FC D7BA0080 */ ldc1 $f26, 0x80($sp)
|
||
|
/* 15B00 8003A700 D7B80078 */ ldc1 $f24, 0x78($sp)
|
||
|
/* 15B04 8003A704 D7B60070 */ ldc1 $f22, 0x70($sp)
|
||
|
/* 15B08 8003A708 D7B40068 */ ldc1 $f20, 0x68($sp)
|
||
|
/* 15B0C 8003A70C 03E00008 */ jr $ra
|
||
|
/* 15B10 8003A710 27BD0088 */ addiu $sp, $sp, 0x88
|