papermario/asm/nonmatchings/battle/area_sam/625750/func_8021A510_6260B0.s
2021-01-14 17:06:56 +09:00

135 lines
7.0 KiB
ArmAsm
Generated

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8021A510_6260B0
/* 6260B0 8021A510 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 6260B4 8021A514 AFB60038 */ sw $s6, 0x38($sp)
/* 6260B8 8021A518 0080B02D */ daddu $s6, $a0, $zero
/* 6260BC 8021A51C 27A50010 */ addiu $a1, $sp, 0x10
/* 6260C0 8021A520 27A60014 */ addiu $a2, $sp, 0x14
/* 6260C4 8021A524 27A70018 */ addiu $a3, $sp, 0x18
/* 6260C8 8021A528 AFBF003C */ sw $ra, 0x3c($sp)
/* 6260CC 8021A52C AFB50034 */ sw $s5, 0x34($sp)
/* 6260D0 8021A530 AFB40030 */ sw $s4, 0x30($sp)
/* 6260D4 8021A534 AFB3002C */ sw $s3, 0x2c($sp)
/* 6260D8 8021A538 AFB20028 */ sw $s2, 0x28($sp)
/* 6260DC 8021A53C AFB10024 */ sw $s1, 0x24($sp)
/* 6260E0 8021A540 0C0470AC */ jal func_8011C2B0
/* 6260E4 8021A544 AFB00020 */ sw $s0, 0x20($sp)
/* 6260E8 8021A548 8FA20018 */ lw $v0, 0x18($sp)
/* 6260EC 8021A54C 18400052 */ blez $v0, .L8021A698
/* 6260F0 8021A550 0000802D */ daddu $s0, $zero, $zero
/* 6260F4 8021A554 3C038023 */ lui $v1, %hi(D_8022FB70)
/* 6260F8 8021A558 2463FB70 */ addiu $v1, $v1, %lo(D_8022FB70)
/* 6260FC 8021A55C 00161040 */ sll $v0, $s6, 1
/* 626100 8021A560 0043A021 */ addu $s4, $v0, $v1
/* 626104 8021A564 3C135555 */ lui $s3, 0x5555
/* 626108 8021A568 36735556 */ ori $s3, $s3, 0x5556
/* 62610C 8021A56C 34158000 */ ori $s5, $zero, 0x8000
/* 626110 8021A570 02130018 */ mult $s0, $s3
.L8021A574:
/* 626114 8021A574 001097C3 */ sra $s2, $s0, 0x1f
/* 626118 8021A578 00001810 */ mfhi $v1
/* 62611C 8021A57C 00721823 */ subu $v1, $v1, $s2
/* 626120 8021A580 00031040 */ sll $v0, $v1, 1
/* 626124 8021A584 00431021 */ addu $v0, $v0, $v1
/* 626128 8021A588 02021023 */ subu $v0, $s0, $v0
/* 62612C 8021A58C 96830000 */ lhu $v1, ($s4)
/* 626130 8021A590 24420001 */ addiu $v0, $v0, 1
/* 626134 8021A594 00620018 */ mult $v1, $v0
/* 626138 8021A598 00101100 */ sll $v0, $s0, 4
/* 62613C 8021A59C 00001812 */ mflo $v1
/* 626140 8021A5A0 00702021 */ addu $a0, $v1, $s0
/* 626144 8021A5A4 8FA30014 */ lw $v1, 0x14($sp)
/* 626148 8021A5A8 3084FFFF */ andi $a0, $a0, 0xffff
/* 62614C 8021A5AC 0C01917C */ jal sins
/* 626150 8021A5B0 00628821 */ addu $s1, $v1, $v0
/* 626154 8021A5B4 00021400 */ sll $v0, $v0, 0x10
/* 626158 8021A5B8 00021403 */ sra $v0, $v0, 0x10
/* 62615C 8021A5BC 00551021 */ addu $v0, $v0, $s5
/* 626160 8021A5C0 00021FC2 */ srl $v1, $v0, 0x1f
/* 626164 8021A5C4 00431021 */ addu $v0, $v0, $v1
/* 626168 8021A5C8 000213C0 */ sll $v0, $v0, 0xf
/* 62616C 8021A5CC 00021403 */ sra $v0, $v0, 0x10
/* 626170 8021A5D0 00021880 */ sll $v1, $v0, 2
/* 626174 8021A5D4 00621821 */ addu $v1, $v1, $v0
/* 626178 8021A5D8 00031140 */ sll $v0, $v1, 5
/* 62617C 8021A5DC 00431823 */ subu $v1, $v0, $v1
/* 626180 8021A5E0 04610002 */ bgez $v1, .L8021A5EC
/* 626184 8021A5E4 0060102D */ daddu $v0, $v1, $zero
/* 626188 8021A5E8 24627FFF */ addiu $v0, $v1, 0x7fff
.L8021A5EC:
/* 62618C 8021A5EC 000223C3 */ sra $a0, $v0, 0xf
/* 626190 8021A5F0 24820064 */ addiu $v0, $a0, 0x64
/* 626194 8021A5F4 A222000E */ sb $v0, 0xe($s1)
/* 626198 8021A5F8 24820032 */ addiu $v0, $a0, 0x32
/* 62619C 8021A5FC 02121823 */ subu $v1, $s0, $s2
/* 6261A0 8021A600 00032843 */ sra $a1, $v1, 1
/* 6261A4 8021A604 00B30018 */ mult $a1, $s3
/* 6261A8 8021A608 A222000D */ sb $v0, 0xd($s1)
/* 6261AC 8021A60C 96840000 */ lhu $a0, ($s4)
/* 6261B0 8021A610 00031FC3 */ sra $v1, $v1, 0x1f
/* 6261B4 8021A614 000433C2 */ srl $a2, $a0, 0xf
/* 6261B8 8021A618 00004810 */ mfhi $t1
/* 6261BC 8021A61C 01231823 */ subu $v1, $t1, $v1
/* 6261C0 8021A620 00031040 */ sll $v0, $v1, 1
/* 6261C4 8021A624 00431021 */ addu $v0, $v0, $v1
/* 6261C8 8021A628 00A22823 */ subu $a1, $a1, $v0
/* 6261CC 8021A62C 24A50001 */ addiu $a1, $a1, 1
/* 6261D0 8021A630 00052BC0 */ sll $a1, $a1, 0xf
/* 6261D4 8021A634 00C50018 */ mult $a2, $a1
/* 6261D8 8021A638 00042382 */ srl $a0, $a0, 0xe
/* 6261DC 8021A63C 000423C0 */ sll $a0, $a0, 0xf
/* 6261E0 8021A640 00001812 */ mflo $v1
/* 6261E4 8021A644 00642021 */ addu $a0, $v1, $a0
/* 6261E8 8021A648 00902021 */ addu $a0, $a0, $s0
/* 6261EC 8021A64C 0C01917C */ jal sins
/* 6261F0 8021A650 3084FFFF */ andi $a0, $a0, 0xffff
/* 6261F4 8021A654 00021400 */ sll $v0, $v0, 0x10
/* 6261F8 8021A658 00021403 */ sra $v0, $v0, 0x10
/* 6261FC 8021A65C 9223000C */ lbu $v1, 0xc($s1)
/* 626200 8021A660 00551021 */ addu $v0, $v0, $s5
/* 626204 8021A664 00620018 */ mult $v1, $v0
/* 626208 8021A668 00001812 */ mflo $v1
/* 62620C 8021A66C 04610004 */ bgez $v1, .L8021A680
/* 626210 8021A670 00031403 */ sra $v0, $v1, 0x10
/* 626214 8021A674 3402FFFF */ ori $v0, $zero, 0xffff
/* 626218 8021A678 00621821 */ addu $v1, $v1, $v0
/* 62621C 8021A67C 00031403 */ sra $v0, $v1, 0x10
.L8021A680:
/* 626220 8021A680 A222000C */ sb $v0, 0xc($s1)
/* 626224 8021A684 8FA20018 */ lw $v0, 0x18($sp)
/* 626228 8021A688 26100001 */ addiu $s0, $s0, 1
/* 62622C 8021A68C 0202102A */ slt $v0, $s0, $v0
/* 626230 8021A690 1440FFB8 */ bnez $v0, .L8021A574
/* 626234 8021A694 02130018 */ mult $s0, $s3
.L8021A698:
/* 626238 8021A698 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* 62623C 8021A69C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* 626240 8021A6A0 8C620000 */ lw $v0, ($v1)
/* 626244 8021A6A4 02C0202D */ daddu $a0, $s6, $zero
/* 626248 8021A6A8 0040802D */ daddu $s0, $v0, $zero
/* 62624C 8021A6AC 24420008 */ addiu $v0, $v0, 8
/* 626250 8021A6B0 AC620000 */ sw $v0, ($v1)
/* 626254 8021A6B4 3C02DE00 */ lui $v0, 0xde00
/* 626258 8021A6B8 0C0470BB */ jal func_8011C2EC
/* 62625C 8021A6BC AE020000 */ sw $v0, ($s0)
/* 626260 8021A6C0 AE020004 */ sw $v0, 4($s0)
/* 626264 8021A6C4 3C028023 */ lui $v0, %hi(D_8022FB70)
/* 626268 8021A6C8 2442FB70 */ addiu $v0, $v0, %lo(D_8022FB70)
/* 62626C 8021A6CC 00161840 */ sll $v1, $s6, 1
/* 626270 8021A6D0 00621821 */ addu $v1, $v1, $v0
/* 626274 8021A6D4 94620000 */ lhu $v0, ($v1)
/* 626278 8021A6D8 24420253 */ addiu $v0, $v0, 0x253
/* 62627C 8021A6DC A4620000 */ sh $v0, ($v1)
/* 626280 8021A6E0 8FBF003C */ lw $ra, 0x3c($sp)
/* 626284 8021A6E4 8FB60038 */ lw $s6, 0x38($sp)
/* 626288 8021A6E8 8FB50034 */ lw $s5, 0x34($sp)
/* 62628C 8021A6EC 8FB40030 */ lw $s4, 0x30($sp)
/* 626290 8021A6F0 8FB3002C */ lw $s3, 0x2c($sp)
/* 626294 8021A6F4 8FB20028 */ lw $s2, 0x28($sp)
/* 626298 8021A6F8 8FB10024 */ lw $s1, 0x24($sp)
/* 62629C 8021A6FC 8FB00020 */ lw $s0, 0x20($sp)
/* 6262A0 8021A700 03E00008 */ jr $ra
/* 6262A4 8021A704 27BD0040 */ addiu $sp, $sp, 0x40