papermario/asm/nonmatchings/code_28910_len_5090/func_80051334.s
2020-09-23 23:16:13 -04:00

78 lines
3.5 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80051334
/* 2C734 80051334 8CA30000 */ lw $v1, ($a1)
/* 2C738 80051338 9067000D */ lbu $a3, 0xd($v1)
/* 2C73C 8005133C 10E0003B */ beqz $a3, .L8005142C
/* 2C740 80051340 00000000 */ nop
/* 2C744 80051344 9462000E */ lhu $v0, 0xe($v1)
/* 2C748 80051348 10400038 */ beqz $v0, .L8005142C
/* 2C74C 8005134C 24E7FFFF */ addiu $a3, $a3, -1
/* 2C750 80051350 24090001 */ addiu $t1, $zero, 1
/* 2C754 80051354 00624021 */ addu $t0, $v1, $v0
/* 2C758 80051358 25040006 */ addiu $a0, $t0, 6
.L8005135C:
/* 2C75C 8005135C 91030000 */ lbu $v1, ($t0)
/* 2C760 80051360 00031080 */ sll $v0, $v1, 2
/* 2C764 80051364 00431021 */ addu $v0, $v0, $v1
/* 2C768 80051368 000210C0 */ sll $v0, $v0, 3
/* 2C76C 8005136C 24420044 */ addiu $v0, $v0, 0x44
/* 2C770 80051370 9083FFFB */ lbu $v1, -5($a0)
/* 2C774 80051374 14600014 */ bnez $v1, .L800513C8
/* 2C778 80051378 00A23021 */ addu $a2, $a1, $v0
/* 2C77C 8005137C 9482FFFC */ lhu $v0, -4($a0)
/* 2C780 80051380 A4C20014 */ sh $v0, 0x14($a2)
/* 2C784 80051384 8482FFFE */ lh $v0, -2($a0)
/* 2C788 80051388 8483FFFC */ lh $v1, -4($a0)
/* 2C78C 8005138C 00021400 */ sll $v0, $v0, 0x10
/* 2C790 80051390 14600002 */ bnez $v1, .L8005139C
/* 2C794 80051394 0043001A */ div $zero, $v0, $v1
/* 2C798 80051398 0007000D */ break 7
.L8005139C:
/* 2C79C 8005139C 2401FFFF */ addiu $at, $zero, -1
/* 2C7A0 800513A0 14610004 */ bne $v1, $at, .L800513B4
/* 2C7A4 800513A4 3C018000 */ lui $at, 0x8000
/* 2C7A8 800513A8 14410002 */ bne $v0, $at, .L800513B4
/* 2C7AC 800513AC 00000000 */ nop
/* 2C7B0 800513B0 0006000D */ break 6
.L800513B4:
/* 2C7B4 800513B4 00001012 */ mflo $v0
/* 2C7B8 800513B8 ACC20010 */ sw $v0, 0x10($a2)
/* 2C7BC 800513BC 94820000 */ lhu $v0, ($a0)
/* 2C7C0 800513C0 08014506 */ j .L80051418
/* 2C7C4 800513C4 A4C20016 */ sh $v0, 0x16($a2)
.L800513C8:
/* 2C7C8 800513C8 54690014 */ bnel $v1, $t1, .L8005141C
/* 2C7CC 800513CC 24840008 */ addiu $a0, $a0, 8
/* 2C7D0 800513D0 9482FFFC */ lhu $v0, -4($a0)
/* 2C7D4 800513D4 A4C20020 */ sh $v0, 0x20($a2)
/* 2C7D8 800513D8 8482FFFE */ lh $v0, -2($a0)
/* 2C7DC 800513DC 8483FFFC */ lh $v1, -4($a0)
/* 2C7E0 800513E0 00021400 */ sll $v0, $v0, 0x10
/* 2C7E4 800513E4 14600002 */ bnez $v1, .L800513F0
/* 2C7E8 800513E8 0043001A */ div $zero, $v0, $v1
/* 2C7EC 800513EC 0007000D */ break 7
.L800513F0:
/* 2C7F0 800513F0 2401FFFF */ addiu $at, $zero, -1
/* 2C7F4 800513F4 14610004 */ bne $v1, $at, .L80051408
/* 2C7F8 800513F8 3C018000 */ lui $at, 0x8000
/* 2C7FC 800513FC 14410002 */ bne $v0, $at, .L80051408
/* 2C800 80051400 00000000 */ nop
/* 2C804 80051404 0006000D */ break 6
.L80051408:
/* 2C808 80051408 00001012 */ mflo $v0
/* 2C80C 8005140C ACC2001C */ sw $v0, 0x1c($a2)
/* 2C810 80051410 94820000 */ lhu $v0, ($a0)
/* 2C814 80051414 A4C20022 */ sh $v0, 0x22($a2)
.L80051418:
/* 2C818 80051418 24840008 */ addiu $a0, $a0, 8
.L8005141C:
/* 2C81C 8005141C 25080008 */ addiu $t0, $t0, 8
/* 2C820 80051420 00E0102D */ daddu $v0, $a3, $zero
/* 2C824 80051424 1440FFCD */ bnez $v0, .L8005135C
/* 2C828 80051428 24E7FFFF */ addiu $a3, $a3, -1
.L8005142C:
/* 2C82C 8005142C 03E00008 */ jr $ra
/* 2C830 80051430 00000000 */ nop