1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 13:30:47 +00:00
oot/asm/code_800FFA50.s

434 lines
20 KiB
ArmAsm
Raw Normal View History

2020-03-17 04:31:30 +00:00
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purposee registers
.section .text
.align 4
glabel func_800FFA50
/* B76BF0 800FFA50 27BDFF98 */ addiu $sp, $sp, -0x68
/* B76BF4 800FFA54 AFBF003C */ sw $ra, 0x3c($sp)
/* B76BF8 800FFA58 AFBE0038 */ sw $fp, 0x38($sp)
/* B76BFC 800FFA5C AFB70034 */ sw $s7, 0x34($sp)
/* B76C00 800FFA60 AFB60030 */ sw $s6, 0x30($sp)
/* B76C04 800FFA64 AFB5002C */ sw $s5, 0x2c($sp)
/* B76C08 800FFA68 AFB40028 */ sw $s4, 0x28($sp)
/* B76C0C 800FFA6C AFB30024 */ sw $s3, 0x24($sp)
/* B76C10 800FFA70 AFB20020 */ sw $s2, 0x20($sp)
/* B76C14 800FFA74 AFB1001C */ sw $s1, 0x1c($sp)
/* B76C18 800FFA78 AFB00018 */ sw $s0, 0x18($sp)
/* B76C1C 800FFA7C AFA70074 */ sw $a3, 0x74($sp)
/* B76C20 800FFA80 AFA00058 */ sw $zero, 0x58($sp)
/* B76C24 800FFA84 8C8F0000 */ lw $t7, ($a0)
/* B76C28 800FFA88 3C018017 */ lui $at, %hi(D_80175660) # $at, 0x8017
/* B76C2C 800FFA8C 30EE00FF */ andi $t6, $a3, 0xff
/* B76C30 800FFA90 AC2F5660 */ sw $t7, %lo(D_80175660)($at)
/* B76C34 800FFA94 90980004 */ lbu $t8, 4($a0)
/* B76C38 800FFA98 01C03825 */ move $a3, $t6
/* B76C3C 800FFA9C 00A08825 */ move $s1, $a1
/* B76C40 800FFAA0 17000003 */ bnez $t8, .L800FFAB0
/* B76C44 800FFAA4 00C0B025 */ move $s6, $a2
/* B76C48 800FFAA8 10000007 */ b .L800FFAC8
/* B76C4C 800FFAAC 24020002 */ li $v0, 2
.L800FFAB0:
/* B76C50 800FFAB0 90990005 */ lbu $t9, 5($a0)
/* B76C54 800FFAB4 24010001 */ li $at, 1
/* B76C58 800FFAB8 24020004 */ li $v0, 4
/* B76C5C 800FFABC 17210002 */ bne $t9, $at, .L800FFAC8
/* B76C60 800FFAC0 24080080 */ li $t0, 128
/* B76C64 800FFAC4 AFA80058 */ sw $t0, 0x58($sp)
.L800FFAC8:
/* B76C68 800FFAC8 8C940008 */ lw $s4, 8($a0)
/* B76C6C 800FFACC 8C95000C */ lw $s5, 0xc($a0)
/* B76C70 800FFAD0 8C970010 */ lw $s7, 0x10($a0)
/* B76C74 800FFAD4 14E0000E */ bnez $a3, .L800FFB10
/* B76C78 800FFAD8 8C9E0014 */ lw $fp, 0x14($a0)
/* B76C7C 800FFADC 3C018017 */ lui $at, %hi(D_80175664) # $at, 0x8017
/* B76C80 800FFAE0 AC205664 */ sw $zero, %lo(D_80175664)($at)
/* B76C84 800FFAE4 3C018017 */ lui $at, %hi(D_80175668) # $at, 0x8017
/* B76C88 800FFAE8 24090020 */ li $t1, 32
/* B76C8C 800FFAEC A0295668 */ sb $t1, %lo(D_80175668)($at)
/* B76C90 800FFAF0 3C018017 */ lui $at, %hi(D_8017566C) # $at, 0x8017
/* B76C94 800FFAF4 AC20566C */ sw $zero, %lo(D_8017566C)($at)
/* B76C98 800FFAF8 3C018017 */ lui $at, %hi(D_80175669) # $at, 0x8017
/* B76C9C 800FFAFC A0205669 */ sb $zero, %lo(D_80175669)($at)
/* B76CA0 800FFB00 A7A00064 */ sh $zero, 0x64($sp)
/* B76CA4 800FFB04 A7A00062 */ sh $zero, 0x62($sp)
/* B76CA8 800FFB08 10000014 */ b .L800FFB5C
/* B76CAC 800FFB0C A7A00060 */ sh $zero, 0x60($sp)
.L800FFB10:
/* B76CB0 800FFB10 8FAA0078 */ lw $t2, 0x78($sp)
/* B76CB4 800FFB14 3C018017 */ lui $at, %hi(D_80175664) # $at, 0x8017
/* B76CB8 800FFB18 8D4B0000 */ lw $t3, ($t2)
/* B76CBC 800FFB1C AC2B5664 */ sw $t3, %lo(D_80175664)($at)
/* B76CC0 800FFB20 914C0004 */ lbu $t4, 4($t2)
/* B76CC4 800FFB24 3C018017 */ lui $at, %hi(D_80175668) # $at, 0x8017
/* B76CC8 800FFB28 A02C5668 */ sb $t4, %lo(D_80175668)($at)
/* B76CCC 800FFB2C 8D4D0008 */ lw $t5, 8($t2)
/* B76CD0 800FFB30 3C018017 */ lui $at, %hi(D_8017566C) # $at, 0x8017
/* B76CD4 800FFB34 AC2D566C */ sw $t5, %lo(D_8017566C)($at)
/* B76CD8 800FFB38 914E0005 */ lbu $t6, 5($t2)
/* B76CDC 800FFB3C 3C018017 */ lui $at, %hi(D_80175669) # $at, 0x8017
/* B76CE0 800FFB40 A02E5669 */ sb $t6, %lo(D_80175669)($at)
/* B76CE4 800FFB44 854F000C */ lh $t7, 0xc($t2)
/* B76CE8 800FFB48 A7AF0064 */ sh $t7, 0x64($sp)
/* B76CEC 800FFB4C 8558000E */ lh $t8, 0xe($t2)
/* B76CF0 800FFB50 A7B80062 */ sh $t8, 0x62($sp)
/* B76CF4 800FFB54 85590010 */ lh $t9, 0x10($t2)
/* B76CF8 800FFB58 A7B90060 */ sh $t9, 0x60($sp)
.L800FFB5C:
/* B76CFC 800FFB5C 12C00026 */ beqz $s6, .L800FFBF8
/* B76D00 800FFB60 00409025 */ move $s2, $v0
/* B76D04 800FFB64 27B30064 */ addiu $s3, $sp, 0x64
.L800FFB68:
/* B76D08 800FFB68 1240000C */ beqz $s2, .L800FFB9C
/* B76D0C 800FFB6C 00008025 */ move $s0, $zero
.L800FFB70:
/* B76D10 800FFB70 02802025 */ move $a0, $s4
/* B76D14 800FFB74 02A02825 */ move $a1, $s5
/* B76D18 800FFB78 02203025 */ move $a2, $s1
/* B76D1C 800FFB7C 0C03FF1E */ jal func_800FFC78
/* B76D20 800FFB80 02603825 */ move $a3, $s3
/* B76D24 800FFB84 10400003 */ beqz $v0, .L800FFB94
/* B76D28 800FFB88 26100001 */ addiu $s0, $s0, 1
/* B76D2C 800FFB8C 1000002E */ b .L800FFC48
/* B76D30 800FFB90 24020002 */ li $v0, 2
.L800FFB94:
/* B76D34 800FFB94 1612FFF6 */ bne $s0, $s2, .L800FFB70
/* B76D38 800FFB98 26310080 */ addiu $s1, $s1, 0x80
.L800FFB9C:
/* B76D3C 800FFB9C 02E02025 */ move $a0, $s7
/* B76D40 800FFBA0 03C02825 */ move $a1, $fp
/* B76D44 800FFBA4 02203025 */ move $a2, $s1
/* B76D48 800FFBA8 0C03FF1E */ jal func_800FFC78
/* B76D4C 800FFBAC 27A70062 */ addiu $a3, $sp, 0x62
/* B76D50 800FFBB0 10400003 */ beqz $v0, .L800FFBC0
/* B76D54 800FFBB4 26310080 */ addiu $s1, $s1, 0x80
/* B76D58 800FFBB8 10000023 */ b .L800FFC48
/* B76D5C 800FFBBC 24020002 */ li $v0, 2
.L800FFBC0:
/* B76D60 800FFBC0 02E02025 */ move $a0, $s7
/* B76D64 800FFBC4 03C02825 */ move $a1, $fp
/* B76D68 800FFBC8 02203025 */ move $a2, $s1
/* B76D6C 800FFBCC 0C03FF1E */ jal func_800FFC78
/* B76D70 800FFBD0 27A70060 */ addiu $a3, $sp, 0x60
/* B76D74 800FFBD4 10400003 */ beqz $v0, .L800FFBE4
/* B76D78 800FFBD8 8FA80058 */ lw $t0, 0x58($sp)
/* B76D7C 800FFBDC 1000001A */ b .L800FFC48
/* B76D80 800FFBE0 24020002 */ li $v0, 2
.L800FFBE4:
/* B76D84 800FFBE4 26D6FFFF */ addiu $s6, $s6, -1
/* B76D88 800FFBE8 26310080 */ addiu $s1, $s1, 0x80
/* B76D8C 800FFBEC 00084840 */ sll $t1, $t0, 1
/* B76D90 800FFBF0 16C0FFDD */ bnez $s6, .L800FFB68
/* B76D94 800FFBF4 02298821 */ addu $s1, $s1, $t1
.L800FFBF8:
/* B76D98 800FFBF8 3C0B8017 */ lui $t3, %hi(D_80175664) # $t3, 0x8017
/* B76D9C 800FFBFC 8FA30078 */ lw $v1, 0x78($sp)
/* B76DA0 800FFC00 8D6B5664 */ lw $t3, %lo(D_80175664)($t3)
/* B76DA4 800FFC04 3C0C8017 */ lui $t4, %hi(D_80175668) # $t4, 0x8017
/* B76DA8 800FFC08 3C0D8017 */ lui $t5, %hi(D_8017566C) # $t5, 0x8017
/* B76DAC 800FFC0C AC6B0000 */ sw $t3, ($v1)
/* B76DB0 800FFC10 918C5668 */ lbu $t4, %lo(D_80175668)($t4)
/* B76DB4 800FFC14 3C0E8017 */ lui $t6, %hi(D_80175669) # $t6, 0x8017
/* B76DB8 800FFC18 00001025 */ move $v0, $zero
/* B76DBC 800FFC1C A06C0004 */ sb $t4, 4($v1)
/* B76DC0 800FFC20 8DAD566C */ lw $t5, %lo(D_8017566C)($t5)
/* B76DC4 800FFC24 AC6D0008 */ sw $t5, 8($v1)
/* B76DC8 800FFC28 91CE5669 */ lbu $t6, %lo(D_80175669)($t6)
/* B76DCC 800FFC2C A06E0005 */ sb $t6, 5($v1)
/* B76DD0 800FFC30 87AF0064 */ lh $t7, 0x64($sp)
/* B76DD4 800FFC34 A46F000C */ sh $t7, 0xc($v1)
/* B76DD8 800FFC38 87B80062 */ lh $t8, 0x62($sp)
/* B76DDC 800FFC3C A478000E */ sh $t8, 0xe($v1)
/* B76DE0 800FFC40 87AA0060 */ lh $t2, 0x60($sp)
/* B76DE4 800FFC44 A46A0010 */ sh $t2, 0x10($v1)
.L800FFC48:
/* B76DE8 800FFC48 8FBF003C */ lw $ra, 0x3c($sp)
/* B76DEC 800FFC4C 8FB00018 */ lw $s0, 0x18($sp)
/* B76DF0 800FFC50 8FB1001C */ lw $s1, 0x1c($sp)
/* B76DF4 800FFC54 8FB20020 */ lw $s2, 0x20($sp)
/* B76DF8 800FFC58 8FB30024 */ lw $s3, 0x24($sp)
/* B76DFC 800FFC5C 8FB40028 */ lw $s4, 0x28($sp)
/* B76E00 800FFC60 8FB5002C */ lw $s5, 0x2c($sp)
/* B76E04 800FFC64 8FB60030 */ lw $s6, 0x30($sp)
/* B76E08 800FFC68 8FB70034 */ lw $s7, 0x34($sp)
/* B76E0C 800FFC6C 8FBE0038 */ lw $fp, 0x38($sp)
/* B76E10 800FFC70 03E00008 */ jr $ra
/* B76E14 800FFC74 27BD0068 */ addiu $sp, $sp, 0x68
glabel func_800FFC78
/* B76E18 800FFC78 27BDFFC8 */ addiu $sp, $sp, -0x38
/* B76E1C 800FFC7C AFB50028 */ sw $s5, 0x28($sp)
/* B76E20 800FFC80 AFB40024 */ sw $s4, 0x24($sp)
/* B76E24 800FFC84 AFB30020 */ sw $s3, 0x20($sp)
/* B76E28 800FFC88 AFB10018 */ sw $s1, 0x18($sp)
/* B76E2C 800FFC8C 00C08825 */ move $s1, $a2
/* B76E30 800FFC90 00A09825 */ move $s3, $a1
/* B76E34 800FFC94 27B40034 */ addiu $s4, $sp, 0x34
/* B76E38 800FFC98 27B50036 */ addiu $s5, $sp, 0x36
/* B76E3C 800FFC9C AFBF002C */ sw $ra, 0x2c($sp)
/* B76E40 800FFCA0 AFB2001C */ sw $s2, 0x1c($sp)
/* B76E44 800FFCA4 00E09025 */ move $s2, $a3
/* B76E48 800FFCA8 AFB00014 */ sw $s0, 0x14($sp)
/* B76E4C 800FFCAC 02A03025 */ move $a2, $s5
/* B76E50 800FFCB0 0C03FF85 */ jal func_800FFE14
/* B76E54 800FFCB4 02802825 */ move $a1, $s4
/* B76E58 800FFCB8 10400003 */ beqz $v0, .L800FFCC8
/* B76E5C 800FFCBC 87AF0034 */ lh $t7, 0x34($sp)
/* B76E60 800FFCC0 1000004B */ b .L800FFDF0
/* B76E64 800FFCC4 24020001 */ li $v0, 1
.L800FFCC8:
/* B76E68 800FFCC8 864E0000 */ lh $t6, ($s2)
/* B76E6C 800FFCCC 24100001 */ li $s0, 1
/* B76E70 800FFCD0 2A010040 */ slti $at, $s0, 0x40
/* B76E74 800FFCD4 01CFC021 */ addu $t8, $t6, $t7
/* B76E78 800FFCD8 A6580000 */ sh $t8, ($s2)
/* B76E7C 800FFCDC 86590000 */ lh $t9, ($s2)
/* B76E80 800FFCE0 2412000F */ li $s2, 15
/* B76E84 800FFCE4 10200041 */ beqz $at, .L800FFDEC
/* B76E88 800FFCE8 A6390000 */ sh $t9, ($s1)
/* B76E8C 800FFCEC 02602025 */ move $a0, $s3
.L800FFCF0:
/* B76E90 800FFCF0 02802825 */ move $a1, $s4
/* B76E94 800FFCF4 0C03FF85 */ jal func_800FFE14
/* B76E98 800FFCF8 02A03025 */ move $a2, $s5
/* B76E9C 800FFCFC 10400003 */ beqz $v0, .L800FFD0C
/* B76EA0 800FFD00 87A80034 */ lh $t0, 0x34($sp)
/* B76EA4 800FFD04 1000003A */ b .L800FFDF0
/* B76EA8 800FFD08 24020001 */ li $v0, 1
.L800FFD0C:
/* B76EAC 800FFD0C 1500001E */ bnez $t0, .L800FFD88
/* B76EB0 800FFD10 83A30036 */ lb $v1, 0x36($sp)
/* B76EB4 800FFD14 83A30036 */ lb $v1, 0x36($sp)
/* B76EB8 800FFD18 1472000F */ bne $v1, $s2, .L800FFD58
/* B76EBC 800FFD1C 246AFFFF */ addiu $t2, $v1, -1
/* B76EC0 800FFD20 0460002F */ bltz $v1, .L800FFDE0
/* B76EC4 800FFD24 A3AA0036 */ sb $t2, 0x36($sp)
.L800FFD28:
/* B76EC8 800FFD28 00105840 */ sll $t3, $s0, 1
/* B76ECC 800FFD2C 022B6021 */ addu $t4, $s1, $t3
/* B76ED0 800FFD30 A5800000 */ sh $zero, ($t4)
/* B76ED4 800FFD34 83AF0036 */ lb $t7, 0x36($sp)
/* B76ED8 800FFD38 26100001 */ addiu $s0, $s0, 1
/* B76EDC 800FFD3C 00106E00 */ sll $t5, $s0, 0x18
/* B76EE0 800FFD40 25F8FFFF */ addiu $t8, $t7, -1
/* B76EE4 800FFD44 A3B80036 */ sb $t8, 0x36($sp)
/* B76EE8 800FFD48 05E1FFF7 */ bgez $t7, .L800FFD28
/* B76EEC 800FFD4C 000D8603 */ sra $s0, $t5, 0x18
/* B76EF0 800FFD50 10000024 */ b .L800FFDE4
/* B76EF4 800FFD54 2A010040 */ slti $at, $s0, 0x40
.L800FFD58:
/* B76EF8 800FFD58 2A010040 */ slti $at, $s0, 0x40
/* B76EFC 800FFD5C 10200023 */ beqz $at, .L800FFDEC
.L800FFD60:
/* B76F00 800FFD60 0010C840 */ sll $t9, $s0, 1
/* B76F04 800FFD64 26100001 */ addiu $s0, $s0, 1
/* B76F08 800FFD68 00104E00 */ sll $t1, $s0, 0x18
/* B76F0C 800FFD6C 00098603 */ sra $s0, $t1, 0x18
/* B76F10 800FFD70 2A010040 */ slti $at, $s0, 0x40
/* B76F14 800FFD74 02394021 */ addu $t0, $s1, $t9
/* B76F18 800FFD78 1420FFF9 */ bnez $at, .L800FFD60
/* B76F1C 800FFD7C A5000000 */ sh $zero, ($t0)
/* B76F20 800FFD80 1000001B */ b .L800FFDF0
/* B76F24 800FFD84 00001025 */ move $v0, $zero
.L800FFD88:
/* B76F28 800FFD88 0003102A */ slt $v0, $zero, $v1
/* B76F2C 800FFD8C 246CFFFF */ addiu $t4, $v1, -1
/* B76F30 800FFD90 1040000C */ beqz $v0, .L800FFDC4
/* B76F34 800FFD94 A3AC0036 */ sb $t4, 0x36($sp)
.L800FFD98:
/* B76F38 800FFD98 00106840 */ sll $t5, $s0, 1
/* B76F3C 800FFD9C 022D7021 */ addu $t6, $s1, $t5
/* B76F40 800FFDA0 A5C00000 */ sh $zero, ($t6)
/* B76F44 800FFDA4 83B90036 */ lb $t9, 0x36($sp)
/* B76F48 800FFDA8 26100001 */ addiu $s0, $s0, 1
/* B76F4C 800FFDAC 00107E00 */ sll $t7, $s0, 0x18
/* B76F50 800FFDB0 0019102A */ slt $v0, $zero, $t9
/* B76F54 800FFDB4 2728FFFF */ addiu $t0, $t9, -1
/* B76F58 800FFDB8 A3A80036 */ sb $t0, 0x36($sp)
/* B76F5C 800FFDBC 1440FFF6 */ bnez $v0, .L800FFD98
/* B76F60 800FFDC0 000F8603 */ sra $s0, $t7, 0x18
.L800FFDC4:
/* B76F64 800FFDC4 87A90034 */ lh $t1, 0x34($sp)
/* B76F68 800FFDC8 00105040 */ sll $t2, $s0, 1
/* B76F6C 800FFDCC 26100001 */ addiu $s0, $s0, 1
/* B76F70 800FFDD0 00106600 */ sll $t4, $s0, 0x18
/* B76F74 800FFDD4 022A5821 */ addu $t3, $s1, $t2
/* B76F78 800FFDD8 000C8603 */ sra $s0, $t4, 0x18
/* B76F7C 800FFDDC A5690000 */ sh $t1, ($t3)
.L800FFDE0:
/* B76F80 800FFDE0 2A010040 */ slti $at, $s0, 0x40
.L800FFDE4:
/* B76F84 800FFDE4 5420FFC2 */ bnezl $at, .L800FFCF0
/* B76F88 800FFDE8 02602025 */ move $a0, $s3
.L800FFDEC:
/* B76F8C 800FFDEC 00001025 */ move $v0, $zero
.L800FFDF0:
/* B76F90 800FFDF0 8FBF002C */ lw $ra, 0x2c($sp)
/* B76F94 800FFDF4 8FB00014 */ lw $s0, 0x14($sp)
/* B76F98 800FFDF8 8FB10018 */ lw $s1, 0x18($sp)
/* B76F9C 800FFDFC 8FB2001C */ lw $s2, 0x1c($sp)
/* B76FA0 800FFE00 8FB30020 */ lw $s3, 0x20($sp)
/* B76FA4 800FFE04 8FB40024 */ lw $s4, 0x24($sp)
/* B76FA8 800FFE08 8FB50028 */ lw $s5, 0x28($sp)
/* B76FAC 800FFE0C 03E00008 */ jr $ra
/* B76FB0 800FFE10 27BD0038 */ addiu $sp, $sp, 0x38
glabel func_800FFE14
/* B76FB4 800FFE14 27BDFFD8 */ addiu $sp, $sp, -0x28
/* B76FB8 800FFE18 AFB00018 */ sw $s0, 0x18($sp)
/* B76FBC 800FFE1C 00808025 */ move $s0, $a0
/* B76FC0 800FFE20 AFBF001C */ sw $ra, 0x1c($sp)
/* B76FC4 800FFE24 AFA5002C */ sw $a1, 0x2c($sp)
/* B76FC8 800FFE28 AFA60030 */ sw $a2, 0x30($sp)
/* B76FCC 800FFE2C 24040010 */ li $a0, 16
/* B76FD0 800FFE30 0C03FFD4 */ jal func_800FFF50
/* B76FD4 800FFE34 A7A00024 */ sh $zero, 0x24($sp)
/* B76FD8 800FFE38 97A90024 */ lhu $t1, 0x24($sp)
/* B76FDC 800FFE3C 8FAA002C */ lw $t2, 0x2c($sp)
/* B76FE0 800FFE40 00003025 */ move $a2, $zero
/* B76FE4 800FFE44 2408000F */ li $t0, 15
/* B76FE8 800FFE48 3407FFFF */ li $a3, 65535
.L800FFE4C:
/* B76FEC 800FFE4C 00067040 */ sll $t6, $a2, 1
/* B76FF0 800FFE50 020E7821 */ addu $t7, $s0, $t6
/* B76FF4 800FFE54 95E40030 */ lhu $a0, 0x30($t7)
/* B76FF8 800FFE58 0106C023 */ subu $t8, $t0, $a2
/* B76FFC 800FFE5C 03021807 */ srav $v1, $v0, $t8
/* B77000 800FFE60 10E40005 */ beq $a3, $a0, .L800FFE78
/* B77004 800FFE64 00C02825 */ move $a1, $a2
/* B77008 800FFE68 3079FFFF */ andi $t9, $v1, 0xffff
/* B7700C 800FFE6C 0099082A */ slt $at, $a0, $t9
/* B77010 800FFE70 10200006 */ beqz $at, .L800FFE8C
/* B77014 800FFE74 3069FFFF */ andi $t1, $v1, 0xffff
.L800FFE78:
/* B77018 800FFE78 24C60001 */ addiu $a2, $a2, 1
/* B7701C 800FFE7C 30C500FF */ andi $a1, $a2, 0xff
/* B77020 800FFE80 28A10010 */ slti $at, $a1, 0x10
/* B77024 800FFE84 1420FFF1 */ bnez $at, .L800FFE4C
/* B77028 800FFE88 00A03025 */ move $a2, $a1
.L800FFE8C:
/* B7702C 800FFE8C 28A10010 */ slti $at, $a1, 0x10
/* B77030 800FFE90 14200003 */ bnez $at, .L800FFEA0
/* B77034 800FFE94 3C028017 */ lui $v0, %hi(D_80175668) # $v0, 0x8017
/* B77038 800FFE98 10000028 */ b .L800FFF3C
/* B7703C 800FFE9C 24020001 */ li $v0, 1
.L800FFEA0:
/* B77040 800FFEA0 02066021 */ addu $t4, $s0, $a2
/* B77044 800FFEA4 00067840 */ sll $t7, $a2, 1
/* B77048 800FFEA8 918D0000 */ lbu $t5, ($t4)
/* B7704C 800FFEAC 020FC021 */ addu $t8, $s0, $t7
/* B77050 800FFEB0 97190010 */ lhu $t9, 0x10($t8)
/* B77054 800FFEB4 8E0C0050 */ lw $t4, 0x50($s0)
/* B77058 800FFEB8 01A97021 */ addu $t6, $t5, $t1
/* B7705C 800FFEBC 01D95823 */ subu $t3, $t6, $t9
/* B77060 800FFEC0 016C6821 */ addu $t5, $t3, $t4
/* B77064 800FFEC4 91A40000 */ lbu $a0, ($t5)
/* B77068 800FFEC8 8FB80030 */ lw $t8, 0x30($sp)
/* B7706C 800FFECC 24425668 */ addiu $v0, %lo(D_80175668) # addiu $v0, $v0, 0x5668
/* B77070 800FFED0 00047903 */ sra $t7, $a0, 4
/* B77074 800FFED4 A30F0000 */ sb $t7, ($t8)
/* B77078 800FFED8 90590000 */ lbu $t9, ($v0)
/* B7707C 800FFEDC 308E000F */ andi $t6, $a0, 0xf
/* B77080 800FFEE0 01C02025 */ move $a0, $t6
/* B77084 800FFEE4 03255821 */ addu $t3, $t9, $a1
/* B77088 800FFEE8 256CFFF1 */ addiu $t4, $t3, -0xf
/* B7708C 800FFEEC A04C0000 */ sb $t4, ($v0)
/* B77090 800FFEF0 11C00011 */ beqz $t6, .L800FFF38
/* B77094 800FFEF4 A5400000 */ sh $zero, ($t2)
/* B77098 800FFEF8 0C03FFD4 */ jal func_800FFF50
/* B7709C 800FFEFC A3AE0026 */ sb $t6, 0x26($sp)
/* B770A0 800FFF00 8FAA002C */ lw $t2, 0x2c($sp)
/* B770A4 800FFF04 93A40026 */ lbu $a0, 0x26($sp)
/* B770A8 800FFF08 240F0001 */ li $t7, 1
/* B770AC 800FFF0C A5420000 */ sh $v0, ($t2)
/* B770B0 800FFF10 85450000 */ lh $a1, ($t2)
/* B770B4 800FFF14 248D001F */ addiu $t5, $a0, 0x1f
/* B770B8 800FFF18 01AFC004 */ sllv $t8, $t7, $t5
/* B770BC 800FFF1C 00B8082A */ slt $at, $a1, $t8
/* B770C0 800FFF20 10200005 */ beqz $at, .L800FFF38
/* B770C4 800FFF24 240EFFFF */ li $t6, -1
/* B770C8 800FFF28 008EC804 */ sllv $t9, $t6, $a0
/* B770CC 800FFF2C 00B95821 */ addu $t3, $a1, $t9
/* B770D0 800FFF30 256C0001 */ addiu $t4, $t3, 1
/* B770D4 800FFF34 A54C0000 */ sh $t4, ($t2)
.L800FFF38:
/* B770D8 800FFF38 00001025 */ move $v0, $zero
.L800FFF3C:
/* B770DC 800FFF3C 8FBF001C */ lw $ra, 0x1c($sp)
/* B770E0 800FFF40 8FB00018 */ lw $s0, 0x18($sp)
/* B770E4 800FFF44 27BD0028 */ addiu $sp, $sp, 0x28
/* B770E8 800FFF48 03E00008 */ jr $ra
/* B770EC 800FFF4C 00000000 */ nop
glabel func_800FFF50
/* B770F0 800FFF50 3C088017 */ lui $t0, %hi(D_80175668) # $t0, 0x8017
/* B770F4 800FFF54 25085668 */ addiu $t0, %lo(D_80175668) # addiu $t0, $t0, 0x5668
/* B770F8 800FFF58 91050000 */ lbu $a1, ($t0)
/* B770FC 800FFF5C AFA40000 */ sw $a0, ($sp)
/* B77100 800FFF60 308700FF */ andi $a3, $a0, 0xff
/* B77104 800FFF64 000510C3 */ sra $v0, $a1, 3
/* B77108 800FFF68 304E00FF */ andi $t6, $v0, 0xff
/* B7710C 800FFF6C 19C00029 */ blez $t6, .L80100014
/* B77110 800FFF70 01C01025 */ move $v0, $t6
/* B77114 800FFF74 3C068017 */ lui $a2, %hi(D_80175660) # $a2, 0x8017
/* B77118 800FFF78 3C0D8017 */ lui $t5, %hi(D_8017566C) # $t5, 0x8017
/* B7711C 800FFF7C 3C0A8017 */ lui $t2, %hi(D_80175669) # $t2, 0x8017
/* B77120 800FFF80 3C098017 */ lui $t1, %hi(D_80175664) # $t1, 0x8017
/* B77124 800FFF84 25295664 */ addiu $t1, %lo(D_80175664) # addiu $t1, $t1, 0x5664
/* B77128 800FFF88 254A5669 */ addiu $t2, %lo(D_80175669) # addiu $t2, $t2, 0x5669
/* B7712C 800FFF8C 25AD566C */ addiu $t5, %lo(D_8017566C) # addiu $t5, $t5, 0x566c
/* B77130 800FFF90 8CC65660 */ lw $a2, %lo(D_80175660)($a2)
/* B77134 800FFF94 240C0001 */ li $t4, 1
/* B77138 800FFF98 240B00FF */ li $t3, 255
.L800FFF9C:
/* B7713C 800FFF9C 8D240000 */ lw $a0, ($t1)
/* B77140 800FFFA0 91590000 */ lbu $t9, ($t2)
/* B77144 800FFFA4 91050000 */ lbu $a1, ($t0)
/* B77148 800FFFA8 00867821 */ addu $t7, $a0, $a2
/* B7714C 800FFFAC 91E30000 */ lbu $v1, ($t7)
/* B77150 800FFFB0 24980001 */ addiu $t8, $a0, 1
/* B77154 800FFFB4 13200006 */ beqz $t9, .L800FFFD0
/* B77158 800FFFB8 AD380000 */ sw $t8, ($t1)
/* B7715C 800FFFBC 14600004 */ bnez $v1, .L800FFFD0
/* B77160 800FFFC0 03067021 */ addu $t6, $t8, $a2
/* B77164 800FFFC4 91C30000 */ lbu $v1, ($t6)
/* B77168 800FFFC8 270F0001 */ addiu $t7, $t8, 1
/* B7716C 800FFFCC AD2F0000 */ sw $t7, ($t1)
.L800FFFD0:
/* B77170 800FFFD0 15630003 */ bne $t3, $v1, .L800FFFE0
/* B77174 800FFFD4 00602025 */ move $a0, $v1
/* B77178 800FFFD8 10000002 */ b .L800FFFE4
/* B7717C 800FFFDC A14C0000 */ sb $t4, ($t2)
.L800FFFE0:
/* B77180 800FFFE0 A1400000 */ sb $zero, ($t2)
.L800FFFE4:
/* B77184 800FFFE4 8DB80000 */ lw $t8, ($t5)
/* B77188 800FFFE8 2442FFFF */ addiu $v0, $v0, -1
/* B7718C 800FFFEC 0018CA00 */ sll $t9, $t8, 8
/* B77190 800FFFF0 ADB90000 */ sw $t9, ($t5)
/* B77194 800FFFF4 03247825 */ or $t7, $t9, $a0
/* B77198 800FFFF8 305900FF */ andi $t9, $v0, 0xff
/* B7719C 800FFFFC 24B8FFF8 */ addiu $t8, $a1, -8
/* B771A0 80100000 03201025 */ move $v0, $t9
/* B771A4 80100004 ADAF0000 */ sw $t7, ($t5)
/* B771A8 80100008 1F20FFE4 */ bgtz $t9, .L800FFF9C
/* B771AC 8010000C A1180000 */ sb $t8, ($t0)
/* B771B0 80100010 330500FF */ andi $a1, $t8, 0xff
.L80100014:
/* B771B4 80100014 3C0D8017 */ lui $t5, %hi(D_8017566C) # $t5, 0x8017
/* B771B8 80100018 25AD566C */ addiu $t5, %lo(D_8017566C) # addiu $t5, $t5, 0x566c
/* B771BC 8010001C 8DAE0000 */ lw $t6, ($t5)
/* B771C0 80100020 00077823 */ negu $t7, $a3
/* B771C4 80100024 00A7C021 */ addu $t8, $a1, $a3
/* B771C8 80100028 00AE1804 */ sllv $v1, $t6, $a1
/* B771CC 8010002C 01E31806 */ srlv $v1, $v1, $t7
/* B771D0 80100030 A1180000 */ sb $t8, ($t0)
/* B771D4 80100034 03E00008 */ jr $ra
/* B771D8 80100038 3062FFFF */ andi $v0, $v1, 0xffff