papermario/asm/nonmatchings/code_16c8e0/func_8025AD90.s
2020-09-23 23:16:13 -04:00

301 lines
15 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025AD90
/* 189670 8025AD90 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 189674 8025AD94 AFB20018 */ sw $s2, 0x18($sp)
/* 189678 8025AD98 0080902D */ daddu $s2, $a0, $zero
/* 18967C 8025AD9C AFB10014 */ sw $s1, 0x14($sp)
/* 189680 8025ADA0 00A0882D */ daddu $s1, $a1, $zero
/* 189684 8025ADA4 AFB3001C */ sw $s3, 0x1c($sp)
/* 189688 8025ADA8 00C0982D */ daddu $s3, $a2, $zero
/* 18968C 8025ADAC AFBF0028 */ sw $ra, 0x28($sp)
/* 189690 8025ADB0 AFB50024 */ sw $s5, 0x24($sp)
/* 189694 8025ADB4 AFB40020 */ sw $s4, 0x20($sp)
/* 189698 8025ADB8 AFB00010 */ sw $s0, 0x10($sp)
/* 18969C 8025ADBC 8E3000C0 */ lw $s0, 0xc0($s1)
/* 1896A0 8025ADC0 820206C1 */ lb $v0, 0x6c1($s0)
/* 1896A4 8025ADC4 8FB50040 */ lw $s5, 0x40($sp)
/* 1896A8 8025ADC8 1040004B */ beqz $v0, .L8025AEF8
/* 1896AC 8025ADCC 00E0A02D */ daddu $s4, $a3, $zero
/* 1896B0 8025ADD0 16400016 */ bnez $s2, .L8025AE2C
/* 1896B4 8025ADD4 00000000 */ nop
/* 1896B8 8025ADD8 0C0B7830 */ jal func_802DE0C0
/* 1896BC 8025ADDC 96240088 */ lhu $a0, 0x88($s1)
/* 1896C0 8025ADE0 AE0206D0 */ sw $v0, 0x6d0($s0)
/* 1896C4 8025ADE4 0040202D */ daddu $a0, $v0, $zero
/* 1896C8 8025ADE8 A20006CD */ sb $zero, 0x6cd($s0)
/* 1896CC 8025ADEC 8C830000 */ lw $v1, ($a0)
/* 1896D0 8025ADF0 2402FFFF */ addiu $v0, $zero, -1
/* 1896D4 8025ADF4 1062000B */ beq $v1, $v0, .L8025AE24
/* 1896D8 8025ADF8 0080182D */ daddu $v1, $a0, $zero
/* 1896DC 8025ADFC 0040202D */ daddu $a0, $v0, $zero
.L8025AE00:
/* 1896E0 8025AE00 920206CD */ lbu $v0, 0x6cd($s0)
/* 1896E4 8025AE04 24420001 */ addiu $v0, $v0, 1
/* 1896E8 8025AE08 A20206CD */ sb $v0, 0x6cd($s0)
/* 1896EC 8025AE0C 00021600 */ sll $v0, $v0, 0x18
/* 1896F0 8025AE10 00021583 */ sra $v0, $v0, 0x16
/* 1896F4 8025AE14 00431021 */ addu $v0, $v0, $v1
/* 1896F8 8025AE18 8C420000 */ lw $v0, ($v0)
/* 1896FC 8025AE1C 1444FFF8 */ bne $v0, $a0, .L8025AE00
/* 189700 8025AE20 00000000 */ nop
.L8025AE24:
/* 189704 8025AE24 08096BA1 */ j .L8025AE84
/* 189708 8025AE28 24020006 */ addiu $v0, $zero, 6
.L8025AE2C:
/* 18970C 8025AE2C 96240088 */ lhu $a0, 0x88($s1)
/* 189710 8025AE30 0C0B7A90 */ jal func_802DEA40
/* 189714 8025AE34 00000000 */ nop
/* 189718 8025AE38 AE0206D0 */ sw $v0, 0x6d0($s0)
/* 18971C 8025AE3C 0040202D */ daddu $a0, $v0, $zero
/* 189720 8025AE40 A20006CD */ sb $zero, 0x6cd($s0)
/* 189724 8025AE44 8C830000 */ lw $v1, ($a0)
/* 189728 8025AE48 2402FFFF */ addiu $v0, $zero, -1
/* 18972C 8025AE4C 1062000B */ beq $v1, $v0, .L8025AE7C
/* 189730 8025AE50 0080182D */ daddu $v1, $a0, $zero
/* 189734 8025AE54 0040202D */ daddu $a0, $v0, $zero
.L8025AE58:
/* 189738 8025AE58 920206CD */ lbu $v0, 0x6cd($s0)
/* 18973C 8025AE5C 24420001 */ addiu $v0, $v0, 1
/* 189740 8025AE60 A20206CD */ sb $v0, 0x6cd($s0)
/* 189744 8025AE64 00021600 */ sll $v0, $v0, 0x18
/* 189748 8025AE68 00021583 */ sra $v0, $v0, 0x16
/* 18974C 8025AE6C 00431021 */ addu $v0, $v0, $v1
/* 189750 8025AE70 8C420000 */ lw $v0, ($v0)
/* 189754 8025AE74 1444FFF8 */ bne $v0, $a0, .L8025AE58
/* 189758 8025AE78 00000000 */ nop
.L8025AE7C:
/* 18975C 8025AE7C 0C0B7A9B */ jal func_802DEA6C
/* 189760 8025AE80 96240088 */ lhu $a0, 0x88($s1)
.L8025AE84:
/* 189764 8025AE84 A20206CC */ sb $v0, 0x6cc($s0)
/* 189768 8025AE88 820206CD */ lb $v0, 0x6cd($s0)
/* 18976C 8025AE8C 18400015 */ blez $v0, .L8025AEE4
/* 189770 8025AE90 0000302D */ daddu $a2, $zero, $zero
.L8025AE94:
/* 189774 8025AE94 8E0206D0 */ lw $v0, 0x6d0($s0)
/* 189778 8025AE98 00061880 */ sll $v1, $a2, 2
/* 18977C 8025AE9C 00621821 */ addu $v1, $v1, $v0
/* 189780 8025AEA0 00061140 */ sll $v0, $a2, 5
/* 189784 8025AEA4 8C630000 */ lw $v1, ($v1)
/* 189788 8025AEA8 10600009 */ beqz $v1, .L8025AED0
/* 18978C 8025AEAC 02022821 */ addu $a1, $s0, $v0
/* 189790 8025AEB0 0000202D */ daddu $a0, $zero, $zero
.L8025AEB4:
/* 189794 8025AEB4 94620000 */ lhu $v0, ($v1)
/* 189798 8025AEB8 24630002 */ addiu $v1, $v1, 2
/* 18979C 8025AEBC 24840001 */ addiu $a0, $a0, 1
/* 1897A0 8025AEC0 A4A20000 */ sh $v0, ($a1)
/* 1897A4 8025AEC4 28820010 */ slti $v0, $a0, 0x10
/* 1897A8 8025AEC8 1440FFFA */ bnez $v0, .L8025AEB4
/* 1897AC 8025AECC 24A50002 */ addiu $a1, $a1, 2
.L8025AED0:
/* 1897B0 8025AED0 820206CD */ lb $v0, 0x6cd($s0)
/* 1897B4 8025AED4 24C60001 */ addiu $a2, $a2, 1
/* 1897B8 8025AED8 00C2102A */ slt $v0, $a2, $v0
/* 1897BC 8025AEDC 1440FFED */ bnez $v0, .L8025AE94
/* 1897C0 8025AEE0 00000000 */ nop
.L8025AEE4:
/* 1897C4 8025AEE4 2402FFFE */ addiu $v0, $zero, -2
/* 1897C8 8025AEE8 A20206C2 */ sb $v0, 0x6c2($s0)
/* 1897CC 8025AEEC A60006CA */ sh $zero, 0x6ca($s0)
/* 1897D0 8025AEF0 A20006C1 */ sb $zero, 0x6c1($s0)
/* 1897D4 8025AEF4 A60006C8 */ sh $zero, 0x6c8($s0)
.L8025AEF8:
/* 1897D8 8025AEF8 16A0001E */ bnez $s5, .L8025AF74
/* 1897DC 8025AEFC 00000000 */ nop
/* 1897E0 8025AF00 860206C8 */ lh $v0, 0x6c8($s0)
/* 1897E4 8025AF04 14400013 */ bnez $v0, .L8025AF54
/* 1897E8 8025AF08 00000000 */ nop
/* 1897EC 8025AF0C 920206C2 */ lbu $v0, 0x6c2($s0)
/* 1897F0 8025AF10 3C048028 */ lui $a0, 0x8028
/* 1897F4 8025AF14 24844104 */ addiu $a0, $a0, 0x4104
/* 1897F8 8025AF18 24420002 */ addiu $v0, $v0, 2
/* 1897FC 8025AF1C A20206C2 */ sb $v0, 0x6c2($s0)
/* 189800 8025AF20 00021600 */ sll $v0, $v0, 0x18
/* 189804 8025AF24 00021603 */ sra $v0, $v0, 0x18
/* 189808 8025AF28 3C038028 */ lui $v1, 0x8028
/* 18980C 8025AF2C 00621821 */ addu $v1, $v1, $v0
/* 189810 8025AF30 90634104 */ lbu $v1, 0x4104($v1)
/* 189814 8025AF34 240200FF */ addiu $v0, $zero, 0xff
/* 189818 8025AF38 50620001 */ beql $v1, $v0, .L8025AF40
/* 18981C 8025AF3C A20006C2 */ sb $zero, 0x6c2($s0)
.L8025AF40:
/* 189820 8025AF40 820206C2 */ lb $v0, 0x6c2($s0)
/* 189824 8025AF44 00441021 */ addu $v0, $v0, $a0
/* 189828 8025AF48 90420001 */ lbu $v0, 1($v0)
/* 18982C 8025AF4C 00021042 */ srl $v0, $v0, 1
/* 189830 8025AF50 A60206C8 */ sh $v0, 0x6c8($s0)
.L8025AF54:
/* 189834 8025AF54 820306C2 */ lb $v1, 0x6c2($s0)
/* 189838 8025AF58 960206C8 */ lhu $v0, 0x6c8($s0)
/* 18983C 8025AF5C 3C018028 */ lui $at, 0x8028
/* 189840 8025AF60 00230821 */ addu $at, $at, $v1
/* 189844 8025AF64 90234104 */ lbu $v1, 0x4104($at)
/* 189848 8025AF68 2442FFFF */ addiu $v0, $v0, -1
/* 18984C 8025AF6C 08096BE1 */ j .L8025AF84
/* 189850 8025AF70 A60206C8 */ sh $v0, 0x6c8($s0)
.L8025AF74:
/* 189854 8025AF74 820206C2 */ lb $v0, 0x6c2($s0)
/* 189858 8025AF78 3C038028 */ lui $v1, 0x8028
/* 18985C 8025AF7C 00621821 */ addu $v1, $v1, $v0
/* 189860 8025AF80 90634104 */ lbu $v1, 0x4104($v1)
.L8025AF84:
/* 189864 8025AF84 24020001 */ addiu $v0, $zero, 1
/* 189868 8025AF88 10620024 */ beq $v1, $v0, .L8025B01C
/* 18986C 8025AF8C 28620002 */ slti $v0, $v1, 2
/* 189870 8025AF90 10400005 */ beqz $v0, .L8025AFA8
/* 189874 8025AF94 24020002 */ addiu $v0, $zero, 2
/* 189878 8025AF98 10600007 */ beqz $v1, .L8025AFB8
/* 18987C 8025AF9C 00000000 */ nop
/* 189880 8025AFA0 08096C46 */ j .L8025B118
/* 189884 8025AFA4 00000000 */ nop
.L8025AFA8:
/* 189888 8025AFA8 1062003C */ beq $v1, $v0, .L8025B09C
/* 18988C 8025AFAC 00000000 */ nop
/* 189890 8025AFB0 08096C46 */ j .L8025B118
/* 189894 8025AFB4 00000000 */ nop
.L8025AFB8:
/* 189898 8025AFB8 820206CC */ lb $v0, 0x6cc($s0)
/* 18989C 8025AFBC 18400056 */ blez $v0, .L8025B118
/* 1898A0 8025AFC0 0000302D */ daddu $a2, $zero, $zero
.L8025AFC4:
/* 1898A4 8025AFC4 8E0206D0 */ lw $v0, 0x6d0($s0)
/* 1898A8 8025AFC8 00061880 */ sll $v1, $a2, 2
/* 1898AC 8025AFCC 00621821 */ addu $v1, $v1, $v0
/* 1898B0 8025AFD0 00061140 */ sll $v0, $a2, 5
/* 1898B4 8025AFD4 8C630000 */ lw $v1, ($v1)
/* 1898B8 8025AFD8 10600009 */ beqz $v1, .L8025B000
/* 1898BC 8025AFDC 02022821 */ addu $a1, $s0, $v0
/* 1898C0 8025AFE0 0000202D */ daddu $a0, $zero, $zero
.L8025AFE4:
/* 1898C4 8025AFE4 94620000 */ lhu $v0, ($v1)
/* 1898C8 8025AFE8 24630002 */ addiu $v1, $v1, 2
/* 1898CC 8025AFEC 24840001 */ addiu $a0, $a0, 1
/* 1898D0 8025AFF0 A4A20000 */ sh $v0, ($a1)
/* 1898D4 8025AFF4 28820010 */ slti $v0, $a0, 0x10
/* 1898D8 8025AFF8 1440FFFA */ bnez $v0, .L8025AFE4
/* 1898DC 8025AFFC 24A50002 */ addiu $a1, $a1, 2
.L8025B000:
/* 1898E0 8025B000 820206CC */ lb $v0, 0x6cc($s0)
/* 1898E4 8025B004 24C60001 */ addiu $a2, $a2, 1
/* 1898E8 8025B008 00C2102A */ slt $v0, $a2, $v0
/* 1898EC 8025B00C 10400042 */ beqz $v0, .L8025B118
/* 1898F0 8025B010 00000000 */ nop
/* 1898F4 8025B014 08096BF1 */ j .L8025AFC4
/* 1898F8 8025B018 00000000 */ nop
.L8025B01C:
/* 1898FC 8025B01C 820206CC */ lb $v0, 0x6cc($s0)
/* 189900 8025B020 920306CC */ lbu $v1, 0x6cc($s0)
/* 189904 8025B024 1840003C */ blez $v0, .L8025B118
/* 189908 8025B028 0000302D */ daddu $a2, $zero, $zero
/* 18990C 8025B02C 00031E00 */ sll $v1, $v1, 0x18
.L8025B030:
/* 189910 8025B030 00031E03 */ sra $v1, $v1, 0x18
/* 189914 8025B034 00031080 */ sll $v0, $v1, 2
/* 189918 8025B038 00431021 */ addu $v0, $v0, $v1
/* 18991C 8025B03C 00461021 */ addu $v0, $v0, $a2
/* 189920 8025B040 8E0306D0 */ lw $v1, 0x6d0($s0)
/* 189924 8025B044 00021080 */ sll $v0, $v0, 2
/* 189928 8025B048 00431021 */ addu $v0, $v0, $v1
/* 18992C 8025B04C 8C430000 */ lw $v1, ($v0)
/* 189930 8025B050 00061140 */ sll $v0, $a2, 5
/* 189934 8025B054 10600009 */ beqz $v1, .L8025B07C
/* 189938 8025B058 02022821 */ addu $a1, $s0, $v0
/* 18993C 8025B05C 0000202D */ daddu $a0, $zero, $zero
.L8025B060:
/* 189940 8025B060 94620000 */ lhu $v0, ($v1)
/* 189944 8025B064 24630002 */ addiu $v1, $v1, 2
/* 189948 8025B068 24840001 */ addiu $a0, $a0, 1
/* 18994C 8025B06C A4A20000 */ sh $v0, ($a1)
/* 189950 8025B070 28820010 */ slti $v0, $a0, 0x10
/* 189954 8025B074 1440FFFA */ bnez $v0, .L8025B060
/* 189958 8025B078 24A50002 */ addiu $a1, $a1, 2
.L8025B07C:
/* 18995C 8025B07C 24C60001 */ addiu $a2, $a2, 1
/* 189960 8025B080 820206CC */ lb $v0, 0x6cc($s0)
/* 189964 8025B084 920306CC */ lbu $v1, 0x6cc($s0)
/* 189968 8025B088 00C2102A */ slt $v0, $a2, $v0
/* 18996C 8025B08C 5440FFE8 */ bnel $v0, $zero, .L8025B030
/* 189970 8025B090 00031E00 */ sll $v1, $v1, 0x18
/* 189974 8025B094 08096C46 */ j .L8025B118
/* 189978 8025B098 00000000 */ nop
.L8025B09C:
/* 18997C 8025B09C 820206CC */ lb $v0, 0x6cc($s0)
/* 189980 8025B0A0 920306CC */ lbu $v1, 0x6cc($s0)
/* 189984 8025B0A4 1840001C */ blez $v0, .L8025B118
/* 189988 8025B0A8 0000302D */ daddu $a2, $zero, $zero
/* 18998C 8025B0AC 00031E00 */ sll $v1, $v1, 0x18
.L8025B0B0:
/* 189990 8025B0B0 00031E03 */ sra $v1, $v1, 0x18
/* 189994 8025B0B4 00031040 */ sll $v0, $v1, 1
/* 189998 8025B0B8 00431021 */ addu $v0, $v0, $v1
/* 18999C 8025B0BC 00021040 */ sll $v0, $v0, 1
/* 1899A0 8025B0C0 00461021 */ addu $v0, $v0, $a2
/* 1899A4 8025B0C4 8E0306D0 */ lw $v1, 0x6d0($s0)
/* 1899A8 8025B0C8 00021080 */ sll $v0, $v0, 2
/* 1899AC 8025B0CC 00431021 */ addu $v0, $v0, $v1
/* 1899B0 8025B0D0 8C430000 */ lw $v1, ($v0)
/* 1899B4 8025B0D4 00061140 */ sll $v0, $a2, 5
/* 1899B8 8025B0D8 10600009 */ beqz $v1, .L8025B100
/* 1899BC 8025B0DC 02022821 */ addu $a1, $s0, $v0
/* 1899C0 8025B0E0 0000202D */ daddu $a0, $zero, $zero
.L8025B0E4:
/* 1899C4 8025B0E4 94620000 */ lhu $v0, ($v1)
/* 1899C8 8025B0E8 24630002 */ addiu $v1, $v1, 2
/* 1899CC 8025B0EC 24840001 */ addiu $a0, $a0, 1
/* 1899D0 8025B0F0 A4A20000 */ sh $v0, ($a1)
/* 1899D4 8025B0F4 28820010 */ slti $v0, $a0, 0x10
/* 1899D8 8025B0F8 1440FFFA */ bnez $v0, .L8025B0E4
/* 1899DC 8025B0FC 24A50002 */ addiu $a1, $a1, 2
.L8025B100:
/* 1899E0 8025B100 24C60001 */ addiu $a2, $a2, 1
/* 1899E4 8025B104 820206CC */ lb $v0, 0x6cc($s0)
/* 1899E8 8025B108 920306CC */ lbu $v1, 0x6cc($s0)
/* 1899EC 8025B10C 00C2102A */ slt $v0, $a2, $v0
/* 1899F0 8025B110 5440FFE7 */ bnel $v0, $zero, .L8025B0B0
/* 1899F4 8025B114 00031E00 */ sll $v1, $v1, 0x18
.L8025B118:
/* 1899F8 8025B118 820206CD */ lb $v0, 0x6cd($s0)
/* 1899FC 8025B11C 1840000A */ blez $v0, .L8025B148
/* 189A00 8025B120 0000302D */ daddu $a2, $zero, $zero
/* 189A04 8025B124 0200202D */ daddu $a0, $s0, $zero
/* 189A08 8025B128 0200182D */ daddu $v1, $s0, $zero
.L8025B12C:
/* 189A0C 8025B12C AC6406D4 */ sw $a0, 0x6d4($v1)
/* 189A10 8025B130 24840020 */ addiu $a0, $a0, 0x20
/* 189A14 8025B134 820206CD */ lb $v0, 0x6cd($s0)
/* 189A18 8025B138 24C60001 */ addiu $a2, $a2, 1
/* 189A1C 8025B13C 00C2102A */ slt $v0, $a2, $v0
/* 189A20 8025B140 1440FFFA */ bnez $v0, .L8025B12C
/* 189A24 8025B144 24630004 */ addiu $v1, $v1, 4
.L8025B148:
/* 189A28 8025B148 16400006 */ bnez $s2, .L8025B164
/* 189A2C 8025B14C 0220202D */ daddu $a0, $s1, $zero
/* 189A30 8025B150 0260282D */ daddu $a1, $s3, $zero
/* 189A34 8025B154 0C096657 */ jal func_8025995C
/* 189A38 8025B158 0280302D */ daddu $a2, $s4, $zero
/* 189A3C 8025B15C 08096C5C */ j .L8025B170
/* 189A40 8025B160 00000000 */ nop
.L8025B164:
/* 189A44 8025B164 0260282D */ daddu $a1, $s3, $zero
/* 189A48 8025B168 0C0965B0 */ jal func_802596C0
/* 189A4C 8025B16C 0280302D */ daddu $a2, $s4, $zero
.L8025B170:
/* 189A50 8025B170 16A00004 */ bnez $s5, .L8025B184
/* 189A54 8025B174 00000000 */ nop
/* 189A58 8025B178 960206CA */ lhu $v0, 0x6ca($s0)
/* 189A5C 8025B17C 2442FFFF */ addiu $v0, $v0, -1
/* 189A60 8025B180 A60206CA */ sh $v0, 0x6ca($s0)
.L8025B184:
/* 189A64 8025B184 8FBF0028 */ lw $ra, 0x28($sp)
/* 189A68 8025B188 8FB50024 */ lw $s5, 0x24($sp)
/* 189A6C 8025B18C 8FB40020 */ lw $s4, 0x20($sp)
/* 189A70 8025B190 8FB3001C */ lw $s3, 0x1c($sp)
/* 189A74 8025B194 8FB20018 */ lw $s2, 0x18($sp)
/* 189A78 8025B198 8FB10014 */ lw $s1, 0x14($sp)
/* 189A7C 8025B19C 8FB00010 */ lw $s0, 0x10($sp)
/* 189A80 8025B1A0 03E00008 */ jr $ra
/* 189A84 8025B1A4 27BD0030 */ addiu $sp, $sp, 0x30