mirror of
https://github.com/pmret/papermario.git
synced 2024-11-19 01:12:28 +01:00
135 lines
7.0 KiB
ArmAsm
135 lines
7.0 KiB
ArmAsm
|
.set noat # allow manual use of $at
|
||
|
.set noreorder # don't insert nops after branches
|
||
|
|
||
|
glabel func_802184C0_47F570
|
||
|
/* 47F570 802184C0 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||
|
/* 47F574 802184C4 AFB3002C */ sw $s3, 0x2c($sp)
|
||
|
/* 47F578 802184C8 2493FFFF */ addiu $s3, $a0, -1
|
||
|
/* 47F57C 802184CC 0260202D */ daddu $a0, $s3, $zero
|
||
|
/* 47F580 802184D0 27A50010 */ addiu $a1, $sp, 0x10
|
||
|
/* 47F584 802184D4 27A60014 */ addiu $a2, $sp, 0x14
|
||
|
/* 47F588 802184D8 27A70018 */ addiu $a3, $sp, 0x18
|
||
|
/* 47F58C 802184DC AFBF003C */ sw $ra, 0x3c($sp)
|
||
|
/* 47F590 802184E0 AFB60038 */ sw $s6, 0x38($sp)
|
||
|
/* 47F594 802184E4 AFB50034 */ sw $s5, 0x34($sp)
|
||
|
/* 47F598 802184E8 AFB40030 */ sw $s4, 0x30($sp)
|
||
|
/* 47F59C 802184EC AFB20028 */ sw $s2, 0x28($sp)
|
||
|
/* 47F5A0 802184F0 AFB10024 */ sw $s1, 0x24($sp)
|
||
|
/* 47F5A4 802184F4 0C0470AC */ jal func_8011C2B0
|
||
|
/* 47F5A8 802184F8 AFB00020 */ sw $s0, 0x20($sp)
|
||
|
/* 47F5AC 802184FC 8FA20018 */ lw $v0, 0x18($sp)
|
||
|
/* 47F5B0 80218500 18400051 */ blez $v0, .L80218648
|
||
|
/* 47F5B4 80218504 0000802D */ daddu $s0, $zero, $zero
|
||
|
/* 47F5B8 80218508 3C038022 */ lui $v1, %hi(D_80224BB0)
|
||
|
/* 47F5BC 8021850C 24634BB0 */ addiu $v1, $v1, %lo(D_80224BB0)
|
||
|
/* 47F5C0 80218510 00131040 */ sll $v0, $s3, 1
|
||
|
/* 47F5C4 80218514 0043A821 */ addu $s5, $v0, $v1
|
||
|
/* 47F5C8 80218518 3C145555 */ lui $s4, 0x5555
|
||
|
/* 47F5CC 8021851C 36945556 */ ori $s4, $s4, 0x5556
|
||
|
/* 47F5D0 80218520 34168000 */ ori $s6, $zero, 0x8000
|
||
|
/* 47F5D4 80218524 02140018 */ mult $s0, $s4
|
||
|
.L80218528:
|
||
|
/* 47F5D8 80218528 001097C3 */ sra $s2, $s0, 0x1f
|
||
|
/* 47F5DC 8021852C 00001810 */ mfhi $v1
|
||
|
/* 47F5E0 80218530 00721823 */ subu $v1, $v1, $s2
|
||
|
/* 47F5E4 80218534 00031040 */ sll $v0, $v1, 1
|
||
|
/* 47F5E8 80218538 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 47F5EC 8021853C 02021023 */ subu $v0, $s0, $v0
|
||
|
/* 47F5F0 80218540 96A30000 */ lhu $v1, ($s5)
|
||
|
/* 47F5F4 80218544 24420001 */ addiu $v0, $v0, 1
|
||
|
/* 47F5F8 80218548 00620018 */ mult $v1, $v0
|
||
|
/* 47F5FC 8021854C 00101100 */ sll $v0, $s0, 4
|
||
|
/* 47F600 80218550 00001812 */ mflo $v1
|
||
|
/* 47F604 80218554 00702021 */ addu $a0, $v1, $s0
|
||
|
/* 47F608 80218558 8FA30014 */ lw $v1, 0x14($sp)
|
||
|
/* 47F60C 8021855C 3084FFFF */ andi $a0, $a0, 0xffff
|
||
|
/* 47F610 80218560 0C01917C */ jal sins
|
||
|
/* 47F614 80218564 00628821 */ addu $s1, $v1, $v0
|
||
|
/* 47F618 80218568 00021400 */ sll $v0, $v0, 0x10
|
||
|
/* 47F61C 8021856C 00021403 */ sra $v0, $v0, 0x10
|
||
|
/* 47F620 80218570 00561021 */ addu $v0, $v0, $s6
|
||
|
/* 47F624 80218574 00021FC2 */ srl $v1, $v0, 0x1f
|
||
|
/* 47F628 80218578 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 47F62C 8021857C 000213C0 */ sll $v0, $v0, 0xf
|
||
|
/* 47F630 80218580 00021403 */ sra $v0, $v0, 0x10
|
||
|
/* 47F634 80218584 00021880 */ sll $v1, $v0, 2
|
||
|
/* 47F638 80218588 00621821 */ addu $v1, $v1, $v0
|
||
|
/* 47F63C 8021858C 00031140 */ sll $v0, $v1, 5
|
||
|
/* 47F640 80218590 00431823 */ subu $v1, $v0, $v1
|
||
|
/* 47F644 80218594 04610002 */ bgez $v1, .L802185A0
|
||
|
/* 47F648 80218598 0060102D */ daddu $v0, $v1, $zero
|
||
|
/* 47F64C 8021859C 24627FFF */ addiu $v0, $v1, 0x7fff
|
||
|
.L802185A0:
|
||
|
/* 47F650 802185A0 000213C3 */ sra $v0, $v0, 0xf
|
||
|
/* 47F654 802185A4 24420064 */ addiu $v0, $v0, 0x64
|
||
|
/* 47F658 802185A8 A222000C */ sb $v0, 0xc($s1)
|
||
|
/* 47F65C 802185AC 02121823 */ subu $v1, $s0, $s2
|
||
|
/* 47F660 802185B0 00032843 */ sra $a1, $v1, 1
|
||
|
/* 47F664 802185B4 00B40018 */ mult $a1, $s4
|
||
|
/* 47F668 802185B8 A222000D */ sb $v0, 0xd($s1)
|
||
|
/* 47F66C 802185BC 96A40000 */ lhu $a0, ($s5)
|
||
|
/* 47F670 802185C0 00031FC3 */ sra $v1, $v1, 0x1f
|
||
|
/* 47F674 802185C4 000433C2 */ srl $a2, $a0, 0xf
|
||
|
/* 47F678 802185C8 00004810 */ mfhi $t1
|
||
|
/* 47F67C 802185CC 01231823 */ subu $v1, $t1, $v1
|
||
|
/* 47F680 802185D0 00031040 */ sll $v0, $v1, 1
|
||
|
/* 47F684 802185D4 00431021 */ addu $v0, $v0, $v1
|
||
|
/* 47F688 802185D8 00A22823 */ subu $a1, $a1, $v0
|
||
|
/* 47F68C 802185DC 24A50001 */ addiu $a1, $a1, 1
|
||
|
/* 47F690 802185E0 00052BC0 */ sll $a1, $a1, 0xf
|
||
|
/* 47F694 802185E4 00C50018 */ mult $a2, $a1
|
||
|
/* 47F698 802185E8 00042382 */ srl $a0, $a0, 0xe
|
||
|
/* 47F69C 802185EC 000423C0 */ sll $a0, $a0, 0xf
|
||
|
/* 47F6A0 802185F0 00001812 */ mflo $v1
|
||
|
/* 47F6A4 802185F4 00642021 */ addu $a0, $v1, $a0
|
||
|
/* 47F6A8 802185F8 00902021 */ addu $a0, $a0, $s0
|
||
|
/* 47F6AC 802185FC 0C01917C */ jal sins
|
||
|
/* 47F6B0 80218600 3084FFFF */ andi $a0, $a0, 0xffff
|
||
|
/* 47F6B4 80218604 00021400 */ sll $v0, $v0, 0x10
|
||
|
/* 47F6B8 80218608 00021403 */ sra $v0, $v0, 0x10
|
||
|
/* 47F6BC 8021860C 9223000C */ lbu $v1, 0xc($s1)
|
||
|
/* 47F6C0 80218610 00561021 */ addu $v0, $v0, $s6
|
||
|
/* 47F6C4 80218614 00620018 */ mult $v1, $v0
|
||
|
/* 47F6C8 80218618 00001812 */ mflo $v1
|
||
|
/* 47F6CC 8021861C 04610004 */ bgez $v1, .L80218630
|
||
|
/* 47F6D0 80218620 00031403 */ sra $v0, $v1, 0x10
|
||
|
/* 47F6D4 80218624 3402FFFF */ ori $v0, $zero, 0xffff
|
||
|
/* 47F6D8 80218628 00621821 */ addu $v1, $v1, $v0
|
||
|
/* 47F6DC 8021862C 00031403 */ sra $v0, $v1, 0x10
|
||
|
.L80218630:
|
||
|
/* 47F6E0 80218630 A222000E */ sb $v0, 0xe($s1)
|
||
|
/* 47F6E4 80218634 8FA20018 */ lw $v0, 0x18($sp)
|
||
|
/* 47F6E8 80218638 26100001 */ addiu $s0, $s0, 1
|
||
|
/* 47F6EC 8021863C 0202102A */ slt $v0, $s0, $v0
|
||
|
/* 47F6F0 80218640 1440FFB9 */ bnez $v0, .L80218528
|
||
|
/* 47F6F4 80218644 02140018 */ mult $s0, $s4
|
||
|
.L80218648:
|
||
|
/* 47F6F8 80218648 3C03800A */ lui $v1, %hi(D_8009A66C)
|
||
|
/* 47F6FC 8021864C 2463A66C */ addiu $v1, $v1, %lo(D_8009A66C)
|
||
|
/* 47F700 80218650 8C620000 */ lw $v0, ($v1)
|
||
|
/* 47F704 80218654 0260202D */ daddu $a0, $s3, $zero
|
||
|
/* 47F708 80218658 0040802D */ daddu $s0, $v0, $zero
|
||
|
/* 47F70C 8021865C 24420008 */ addiu $v0, $v0, 8
|
||
|
/* 47F710 80218660 AC620000 */ sw $v0, ($v1)
|
||
|
/* 47F714 80218664 3C02DE00 */ lui $v0, 0xde00
|
||
|
/* 47F718 80218668 0C0470BB */ jal func_8011C2EC
|
||
|
/* 47F71C 8021866C AE020000 */ sw $v0, ($s0)
|
||
|
/* 47F720 80218670 AE020004 */ sw $v0, 4($s0)
|
||
|
/* 47F724 80218674 3C028022 */ lui $v0, %hi(D_80224BB0)
|
||
|
/* 47F728 80218678 24424BB0 */ addiu $v0, $v0, %lo(D_80224BB0)
|
||
|
/* 47F72C 8021867C 00131840 */ sll $v1, $s3, 1
|
||
|
/* 47F730 80218680 00621821 */ addu $v1, $v1, $v0
|
||
|
/* 47F734 80218684 94620000 */ lhu $v0, ($v1)
|
||
|
/* 47F738 80218688 24420253 */ addiu $v0, $v0, 0x253
|
||
|
/* 47F73C 8021868C A4620000 */ sh $v0, ($v1)
|
||
|
/* 47F740 80218690 8FBF003C */ lw $ra, 0x3c($sp)
|
||
|
/* 47F744 80218694 8FB60038 */ lw $s6, 0x38($sp)
|
||
|
/* 47F748 80218698 8FB50034 */ lw $s5, 0x34($sp)
|
||
|
/* 47F74C 8021869C 8FB40030 */ lw $s4, 0x30($sp)
|
||
|
/* 47F750 802186A0 8FB3002C */ lw $s3, 0x2c($sp)
|
||
|
/* 47F754 802186A4 8FB20028 */ lw $s2, 0x28($sp)
|
||
|
/* 47F758 802186A8 8FB10024 */ lw $s1, 0x24($sp)
|
||
|
/* 47F75C 802186AC 8FB00020 */ lw $s0, 0x20($sp)
|
||
|
/* 47F760 802186B0 03E00008 */ jr $ra
|
||
|
/* 47F764 802186B4 27BD0040 */ addiu $sp, $sp, 0x40
|