papermario/asm/nonmatchings/code_2d9a0_len_890/func_80052CFC.s
2020-08-12 22:37:16 -04:00

104 lines
4.1 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80052CFC
/* 02E0FC 80052CFC 240A00FC */ addiu $t2, $zero, 0xfc
/* 02E100 80052D00 240900FB */ addiu $t1, $zero, 0xfb
/* 02E104 80052D04 240800FD */ addiu $t0, $zero, 0xfd
/* 02E108 80052D08 240700FE */ addiu $a3, $zero, 0xfe
/* 02E10C 80052D0C 24060080 */ addiu $a2, $zero, 0x80
.L80052D10:
/* 02E110 80052D10 8C85001C */ lw $a1, 0x1c($a0)
/* 02E114 80052D14 90A30000 */ lbu $v1, ($a1)
/* 02E118 80052D18 80A20000 */ lb $v0, ($a1)
/* 02E11C 80052D1C 24A50001 */ addiu $a1, $a1, 1
/* 02E120 80052D20 0441003B */ bgez $v0, .L80052E10
/* 02E124 80052D24 AC85001C */ sw $a1, 0x1c($a0)
/* 02E128 80052D28 306300FF */ andi $v1, $v1, 0xff
/* 02E12C 80052D2C 106A0023 */ beq $v1, $t2, .L80052DBC
/* 02E130 80052D30 286200FD */ slti $v0, $v1, 0xfd
/* 02E134 80052D34 10400005 */ beqz $v0, .L80052D4C
/* 02E138 80052D38 00000000 */ nop
/* 02E13C 80052D3C 10690025 */ beq $v1, $t1, .L80052DD4
/* 02E140 80052D40 24A20001 */ addiu $v0, $a1, 1
/* 02E144 80052D44 08014B80 */ j .L80052E00
/* 02E148 80052D48 00000000 */ nop
.L80052D4C:
/* 02E14C 80052D4C 1068000B */ beq $v1, $t0, .L80052D7C
/* 02E150 80052D50 00000000 */ nop
/* 02E154 80052D54 1467002A */ bne $v1, $a3, .L80052E00
/* 02E158 80052D58 24A20001 */ addiu $v0, $a1, 1
/* 02E15C 80052D5C 90A30000 */ lbu $v1, ($a1)
/* 02E160 80052D60 AC82001C */ sw $v0, 0x1c($a0)
/* 02E164 80052D64 306200FF */ andi $v0, $v1, 0xff
/* 02E168 80052D68 2C420081 */ sltiu $v0, $v0, 0x81
/* 02E16C 80052D6C 50400001 */ beql $v0, $zero, .L80052D74
/* 02E170 80052D70 24030080 */ addiu $v1, $zero, 0x80
.L80052D74:
/* 02E174 80052D74 08014B44 */ j .L80052D10
/* 02E178 80052D78 AC830030 */ sw $v1, 0x30($a0)
.L80052D7C:
/* 02E17C 80052D7C 80A30000 */ lb $v1, ($a1)
/* 02E180 80052D80 8C820030 */ lw $v0, 0x30($a0)
/* 02E184 80052D84 00431021 */ addu $v0, $v0, $v1
/* 02E188 80052D88 AC820030 */ sw $v0, 0x30($a0)
/* 02E18C 80052D8C 0040182D */ daddu $v1, $v0, $zero
/* 02E190 80052D90 24A20001 */ addiu $v0, $a1, 1
/* 02E194 80052D94 AC82001C */ sw $v0, 0x1c($a0)
/* 02E198 80052D98 28620081 */ slti $v0, $v1, 0x81
/* 02E19C 80052D9C 14400003 */ bnez $v0, .L80052DAC
/* 02E1A0 80052DA0 00000000 */ nop
/* 02E1A4 80052DA4 08014B44 */ j .L80052D10
/* 02E1A8 80052DA8 AC860030 */ sw $a2, 0x30($a0)
.L80052DAC:
/* 02E1AC 80052DAC 0462FFD8 */ bltzl $v1, .L80052D10
/* 02E1B0 80052DB0 AC800030 */ sw $zero, 0x30($a0)
/* 02E1B4 80052DB4 08014B44 */ j .L80052D10
/* 02E1B8 80052DB8 00000000 */ nop
.L80052DBC:
/* 02E1BC 80052DBC 90A30000 */ lbu $v1, ($a1)
/* 02E1C0 80052DC0 24A20001 */ addiu $v0, $a1, 1
/* 02E1C4 80052DC4 AC82001C */ sw $v0, 0x1c($a0)
/* 02E1C8 80052DC8 AC820034 */ sw $v0, 0x34($a0)
/* 02E1CC 80052DCC 08014B44 */ j .L80052D10
/* 02E1D0 80052DD0 A0830038 */ sb $v1, 0x38($a0)
.L80052DD4:
/* 02E1D4 80052DD4 90830038 */ lbu $v1, 0x38($a0)
/* 02E1D8 80052DD8 10600006 */ beqz $v1, .L80052DF4
/* 02E1DC 80052DDC AC82001C */ sw $v0, 0x1c($a0)
/* 02E1E0 80052DE0 2462FFFF */ addiu $v0, $v1, -1
/* 02E1E4 80052DE4 A0820038 */ sb $v0, 0x38($a0)
/* 02E1E8 80052DE8 304200FF */ andi $v0, $v0, 0xff
/* 02E1EC 80052DEC 1040FFC8 */ beqz $v0, .L80052D10
/* 02E1F0 80052DF0 00000000 */ nop
.L80052DF4:
/* 02E1F4 80052DF4 8C820034 */ lw $v0, 0x34($a0)
/* 02E1F8 80052DF8 08014B44 */ j .L80052D10
/* 02E1FC 80052DFC AC82001C */ sw $v0, 0x1c($a0)
.L80052E00:
/* 02E200 80052E00 8C82001C */ lw $v0, 0x1c($a0)
/* 02E204 80052E04 24420001 */ addiu $v0, $v0, 1
/* 02E208 80052E08 08014B44 */ j .L80052D10
/* 02E20C 80052E0C AC82001C */ sw $v0, 0x1c($a0)
.L80052E10:
/* 02E210 80052E10 03E00008 */ jr $ra
/* 02E214 80052E14 0060102D */ daddu $v0, $v1, $zero
/* 02E218 80052E18 9082003D */ lbu $v0, 0x3d($a0)
/* 02E21C 80052E1C 34420020 */ ori $v0, $v0, 0x20
/* 02E220 80052E20 03E00008 */ jr $ra
/* 02E224 80052E24 A082003D */ sb $v0, 0x3d($a0)
/* 02E228 80052E28 00000000 */ nop
/* 02E22C 80052E2C 00000000 */ nop