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

968 lines
45 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80051434
/* 02C834 80051434 27BDFF90 */ addiu $sp, $sp, -0x70
/* 02C838 80051438 AFB5005C */ sw $s5, 0x5c($sp)
/* 02C83C 8005143C 00A0A82D */ daddu $s5, $a1, $zero
/* 02C840 80051440 AFB00048 */ sw $s0, 0x48($sp)
/* 02C844 80051444 0000802D */ daddu $s0, $zero, $zero
/* 02C848 80051448 27A50010 */ addiu $a1, $sp, 0x10
/* 02C84C 8005144C AFBF006C */ sw $ra, 0x6c($sp)
/* 02C850 80051450 AFBE0068 */ sw $fp, 0x68($sp)
/* 02C854 80051454 AFB70064 */ sw $s7, 0x64($sp)
/* 02C858 80051458 AFB60060 */ sw $s6, 0x60($sp)
/* 02C85C 8005145C AFB40058 */ sw $s4, 0x58($sp)
/* 02C860 80051460 AFB30054 */ sw $s3, 0x54($sp)
/* 02C864 80051464 AFB20050 */ sw $s2, 0x50($sp)
/* 02C868 80051468 AFB1004C */ sw $s1, 0x4c($sp)
/* 02C86C 8005146C AFA40070 */ sw $a0, 0x70($sp)
/* 02C870 80051470 8C880000 */ lw $t0, ($a0)
/* 02C874 80051474 27A40020 */ addiu $a0, $sp, 0x20
/* 02C878 80051478 A3A00034 */ sb $zero, 0x34($sp)
/* 02C87C 8005147C AFA80030 */ sw $t0, 0x30($sp)
.L80051480:
/* 02C880 80051480 00B01021 */ addu $v0, $a1, $s0
/* 02C884 80051484 00901821 */ addu $v1, $a0, $s0
/* 02C888 80051488 26100001 */ addiu $s0, $s0, 1
/* 02C88C 8005148C A0400000 */ sb $zero, ($v0)
/* 02C890 80051490 2E020010 */ sltiu $v0, $s0, 0x10
/* 02C894 80051494 1440FFFA */ bnez $v0, .L80051480
/* 02C898 80051498 A0600000 */ sb $zero, ($v1)
/* 02C89C 8005149C 92A20043 */ lbu $v0, 0x43($s5)
/* 02C8A0 800514A0 24100001 */ addiu $s0, $zero, 1
/* 02C8A4 800514A4 14500005 */ bne $v0, $s0, .L800514BC
/* 02C8A8 800514A8 00000000 */ nop
/* 02C8AC 800514AC 8FA40070 */ lw $a0, 0x70($sp)
/* 02C8B0 800514B0 0C01487A */ jal func_800521E8
/* 02C8B4 800514B4 02A0282D */ daddu $a1, $s5, $zero
/* 02C8B8 800514B8 A2A00043 */ sb $zero, 0x43($s5)
.L800514BC:
/* 02C8BC 800514BC 96A20040 */ lhu $v0, 0x40($s5)
/* 02C8C0 800514C0 10400024 */ beqz $v0, .L80051554
/* 02C8C4 800514C4 0000B02D */ daddu $s6, $zero, $zero
/* 02C8C8 800514C8 8EA20038 */ lw $v0, 0x38($s5)
/* 02C8CC 800514CC 8EA4003C */ lw $a0, 0x3c($s5)
/* 02C8D0 800514D0 96A30040 */ lhu $v1, 0x40($s5)
/* 02C8D4 800514D4 00441021 */ addu $v0, $v0, $a0
/* 02C8D8 800514D8 2463FFFF */ addiu $v1, $v1, -1
/* 02C8DC 800514DC A6A30040 */ sh $v1, 0x40($s5)
/* 02C8E0 800514E0 3063FFFF */ andi $v1, $v1, 0xffff
/* 02C8E4 800514E4 14600018 */ bnez $v1, .L80051548
/* 02C8E8 800514E8 AEA20038 */ sw $v0, 0x38($s5)
/* 02C8EC 800514EC 92A20042 */ lbu $v0, 0x42($s5)
/* 02C8F0 800514F0 92A30026 */ lbu $v1, 0x26($s5)
/* 02C8F4 800514F4 00021600 */ sll $v0, $v0, 0x18
/* 02C8F8 800514F8 10600013 */ beqz $v1, .L80051548
/* 02C8FC 800514FC AEA20038 */ sw $v0, 0x38($s5)
/* 02C900 80051500 1470000D */ bne $v1, $s0, .L80051538
/* 02C904 80051504 24020002 */ addiu $v0, $zero, 2
/* 02C908 80051508 3C028008 */ lui $v0, 0x8008
/* 02C90C 8005150C 24428520 */ addiu $v0, $v0, -0x7ae0
/* 02C910 80051510 AEA20008 */ sw $v0, 8($s5)
/* 02C914 80051514 08014552 */ j .L80051548
/* 02C918 80051518 AEA30018 */ sw $v1, 0x18($s5)
.L8005151C:
/* 02C91C 8005151C 8FA40070 */ lw $a0, 0x70($sp)
/* 02C920 80051520 02A0282D */ daddu $a1, $s5, $zero
/* 02C924 80051524 AEA00008 */ sw $zero, 8($s5)
/* 02C928 80051528 0C01487A */ jal func_800521E8
/* 02C92C 8005152C AEA00020 */ sw $zero, 0x20($s5)
/* 02C930 80051530 0801482F */ j .L800520BC
/* 02C934 80051534 00000000 */ nop
.L80051538:
/* 02C938 80051538 14620004 */ bne $v1, $v0, .L8005154C
/* 02C93C 8005153C 24080001 */ addiu $t0, $zero, 1
/* 02C940 80051540 24020003 */ addiu $v0, $zero, 3
/* 02C944 80051544 A2A20024 */ sb $v0, 0x24($s5)
.L80051548:
/* 02C948 80051548 24080001 */ addiu $t0, $zero, 1
.L8005154C:
/* 02C94C 8005154C A3A80034 */ sb $t0, 0x34($sp)
/* 02C950 80051550 0000B02D */ daddu $s6, $zero, $zero
.L80051554:
/* 02C954 80051554 27A80020 */ addiu $t0, $sp, 0x20
/* 02C958 80051558 AFA80038 */ sw $t0, 0x38($sp)
/* 02C95C 8005155C 241E0044 */ addiu $fp, $zero, 0x44
.L80051560:
/* 02C960 80051560 02BE9821 */ addu $s3, $s5, $fp
/* 02C964 80051564 86620014 */ lh $v0, 0x14($s3)
/* 02C968 80051568 96630014 */ lhu $v1, 0x14($s3)
/* 02C96C 8005156C 10400042 */ beqz $v0, .L80051678
/* 02C970 80051570 2462FFFF */ addiu $v0, $v1, -1
/* 02C974 80051574 A6620014 */ sh $v0, 0x14($s3)
/* 02C978 80051578 00021400 */ sll $v0, $v0, 0x10
/* 02C97C 8005157C 10400005 */ beqz $v0, .L80051594
/* 02C980 80051580 00000000 */ nop
/* 02C984 80051584 8E62000C */ lw $v0, 0xc($s3)
/* 02C988 80051588 8E630010 */ lw $v1, 0x10($s3)
/* 02C98C 8005158C 08014567 */ j .L8005159C
/* 02C990 80051590 00431021 */ addu $v0, $v0, $v1
.L80051594:
/* 02C994 80051594 86620016 */ lh $v0, 0x16($s3)
/* 02C998 80051598 00021400 */ sll $v0, $v0, 0x10
.L8005159C:
/* 02C99C 8005159C AE62000C */ sw $v0, 0xc($s3)
/* 02C9A0 800515A0 00162400 */ sll $a0, $s6, 0x10
/* 02C9A4 800515A4 8EB00030 */ lw $s0, 0x30($s5)
/* 02C9A8 800515A8 8EA30014 */ lw $v1, 0x14($s5)
/* 02C9AC 800515AC 8EA20034 */ lw $v0, 0x34($s5)
/* 02C9B0 800515B0 0202102B */ sltu $v0, $s0, $v0
/* 02C9B4 800515B4 10400030 */ beqz $v0, .L80051678
/* 02C9B8 800515B8 0064B821 */ addu $s7, $v1, $a0
/* 02C9BC 800515BC 001010C0 */ sll $v0, $s0, 3
/* 02C9C0 800515C0 00501021 */ addu $v0, $v0, $s0
/* 02C9C4 800515C4 000210C0 */ sll $v0, $v0, 3
/* 02C9C8 800515C8 24541320 */ addiu $s4, $v0, 0x1320
.L800515CC:
/* 02C9CC 800515CC 8EA20030 */ lw $v0, 0x30($s5)
/* 02C9D0 800515D0 8FA80070 */ lw $t0, 0x70($sp)
/* 02C9D4 800515D4 02021023 */ subu $v0, $s0, $v0
/* 02C9D8 800515D8 000210C0 */ sll $v0, $v0, 3
/* 02C9DC 800515DC 244207B4 */ addiu $v0, $v0, 0x7b4
/* 02C9E0 800515E0 01029021 */ addu $s2, $t0, $v0
/* 02C9E4 800515E4 8E420000 */ lw $v0, ($s2)
/* 02C9E8 800515E8 3C08FFFF */ lui $t0, 0xffff
/* 02C9EC 800515EC 00481024 */ and $v0, $v0, $t0
/* 02C9F0 800515F0 1457001C */ bne $v0, $s7, .L80051664
/* 02C9F4 800515F4 00000000 */ nop
/* 02C9F8 800515F8 8FA80030 */ lw $t0, 0x30($sp)
/* 02C9FC 800515FC 01148821 */ addu $s1, $t0, $s4
/* 02CA00 80051600 8FA80070 */ lw $t0, 0x70($sp)
/* 02CA04 80051604 92230045 */ lbu $v1, 0x45($s1)
/* 02CA08 80051608 91020022 */ lbu $v0, 0x22($t0)
/* 02CA0C 8005160C 14620015 */ bne $v1, $v0, .L80051664
/* 02CA10 80051610 24080009 */ addiu $t0, $zero, 9
/* 02CA14 80051614 12C80013 */ beq $s6, $t0, .L80051664
/* 02CA18 80051618 00000000 */ nop
/* 02CA1C 8005161C 86420004 */ lh $v0, 4($s2)
/* 02CA20 80051620 8664000C */ lh $a0, 0xc($s3)
/* 02CA24 80051624 0C014E3E */ jal func_800538F8
/* 02CA28 80051628 00442021 */ addu $a0, $v0, $a0
/* 02CA2C 8005162C 8E620000 */ lw $v0, ($s3)
/* 02CA30 80051630 C4420020 */ lwc1 $f2, 0x20($v0)
/* 02CA34 80051634 46020002 */ mul.s $f0, $f0, $f2
/* 02CA38 80051638 00000000 */ nop
/* 02CA3C 8005163C 92220043 */ lbu $v0, 0x43($s1)
/* 02CA40 80051640 34420008 */ ori $v0, $v0, 8
/* 02CA44 80051644 A2220043 */ sb $v0, 0x43($s1)
/* 02CA48 80051648 E6200004 */ swc1 $f0, 4($s1)
/* 02CA4C 8005164C 8EA20030 */ lw $v0, 0x30($s5)
/* 02CA50 80051650 8FA80038 */ lw $t0, 0x38($sp)
/* 02CA54 80051654 02021023 */ subu $v0, $s0, $v0
/* 02CA58 80051658 01021021 */ addu $v0, $t0, $v0
/* 02CA5C 8005165C 24080001 */ addiu $t0, $zero, 1
/* 02CA60 80051660 A0480000 */ sb $t0, ($v0)
.L80051664:
/* 02CA64 80051664 8EA20034 */ lw $v0, 0x34($s5)
/* 02CA68 80051668 26100001 */ addiu $s0, $s0, 1
/* 02CA6C 8005166C 0202102B */ sltu $v0, $s0, $v0
/* 02CA70 80051670 1440FFD6 */ bnez $v0, .L800515CC
/* 02CA74 80051674 26940048 */ addiu $s4, $s4, 0x48
.L80051678:
/* 02CA78 80051678 26D60001 */ addiu $s6, $s6, 1
/* 02CA7C 8005167C 2EC2000A */ sltiu $v0, $s6, 0xa
/* 02CA80 80051680 1440FFB7 */ bnez $v0, .L80051560
/* 02CA84 80051684 27DE0028 */ addiu $fp, $fp, 0x28
/* 02CA88 80051688 0000B02D */ daddu $s6, $zero, $zero
/* 02CA8C 8005168C 3C06FFFF */ lui $a2, 0xffff
/* 02CA90 80051690 24050044 */ addiu $a1, $zero, 0x44
.L80051694:
/* 02CA94 80051694 02A59821 */ addu $s3, $s5, $a1
/* 02CA98 80051698 86620020 */ lh $v0, 0x20($s3)
/* 02CA9C 8005169C 96630020 */ lhu $v1, 0x20($s3)
/* 02CAA0 800516A0 1040003F */ beqz $v0, .L800517A0
/* 02CAA4 800516A4 2462FFFF */ addiu $v0, $v1, -1
/* 02CAA8 800516A8 A6620020 */ sh $v0, 0x20($s3)
/* 02CAAC 800516AC 00021400 */ sll $v0, $v0, 0x10
/* 02CAB0 800516B0 10400005 */ beqz $v0, .L800516C8
/* 02CAB4 800516B4 00000000 */ nop
/* 02CAB8 800516B8 8E620018 */ lw $v0, 0x18($s3)
/* 02CABC 800516BC 8E63001C */ lw $v1, 0x1c($s3)
/* 02CAC0 800516C0 080145B4 */ j .L800516D0
/* 02CAC4 800516C4 00431021 */ addu $v0, $v0, $v1
.L800516C8:
/* 02CAC8 800516C8 86620022 */ lh $v0, 0x22($s3)
/* 02CACC 800516CC 00021400 */ sll $v0, $v0, 0x10
.L800516D0:
/* 02CAD0 800516D0 AE620018 */ sw $v0, 0x18($s3)
/* 02CAD4 800516D4 00162400 */ sll $a0, $s6, 0x10
/* 02CAD8 800516D8 8EB00030 */ lw $s0, 0x30($s5)
/* 02CADC 800516DC 8EA30014 */ lw $v1, 0x14($s5)
/* 02CAE0 800516E0 8EA20034 */ lw $v0, 0x34($s5)
/* 02CAE4 800516E4 0202102B */ sltu $v0, $s0, $v0
/* 02CAE8 800516E8 1040002D */ beqz $v0, .L800517A0
/* 02CAEC 800516EC 0064B821 */ addu $s7, $v1, $a0
/* 02CAF0 800516F0 001010C0 */ sll $v0, $s0, 3
/* 02CAF4 800516F4 00501021 */ addu $v0, $v0, $s0
/* 02CAF8 800516F8 000210C0 */ sll $v0, $v0, 3
/* 02CAFC 800516FC 24441320 */ addiu $a0, $v0, 0x1320
.L80051700:
/* 02CB00 80051700 8EA20030 */ lw $v0, 0x30($s5)
/* 02CB04 80051704 8FA80070 */ lw $t0, 0x70($sp)
/* 02CB08 80051708 02021023 */ subu $v0, $s0, $v0
/* 02CB0C 8005170C 000210C0 */ sll $v0, $v0, 3
/* 02CB10 80051710 244207B4 */ addiu $v0, $v0, 0x7b4
/* 02CB14 80051714 01029021 */ addu $s2, $t0, $v0
/* 02CB18 80051718 8E420000 */ lw $v0, ($s2)
/* 02CB1C 8005171C 00461024 */ and $v0, $v0, $a2
/* 02CB20 80051720 1457001A */ bne $v0, $s7, .L8005178C
/* 02CB24 80051724 00000000 */ nop
/* 02CB28 80051728 8FA80030 */ lw $t0, 0x30($sp)
/* 02CB2C 8005172C 01048821 */ addu $s1, $t0, $a0
/* 02CB30 80051730 8FA80070 */ lw $t0, 0x70($sp)
/* 02CB34 80051734 92230045 */ lbu $v1, 0x45($s1)
/* 02CB38 80051738 91020022 */ lbu $v0, 0x22($t0)
/* 02CB3C 8005173C 14620013 */ bne $v1, $v0, .L8005178C
/* 02CB40 80051740 00000000 */ nop
/* 02CB44 80051744 92430001 */ lbu $v1, 1($s2)
/* 02CB48 80051748 00031080 */ sll $v0, $v1, 2
/* 02CB4C 8005174C 00431021 */ addu $v0, $v0, $v1
/* 02CB50 80051750 000210C0 */ sll $v0, $v0, 3
/* 02CB54 80051754 00559821 */ addu $s3, $v0, $s5
/* 02CB58 80051758 82A30038 */ lb $v1, 0x38($s5)
/* 02CB5C 8005175C 8662005C */ lh $v0, 0x5c($s3)
/* 02CB60 80051760 00620018 */ mult $v1, $v0
/* 02CB64 80051764 00004012 */ mflo $t0
/* 02CB68 80051768 82420006 */ lb $v0, 6($s2)
/* 02CB6C 8005176C 00000000 */ nop
/* 02CB70 80051770 01020018 */ mult $t0, $v0
/* 02CB74 80051774 9222003D */ lbu $v0, 0x3d($s1)
/* 02CB78 80051778 34420020 */ ori $v0, $v0, 0x20
/* 02CB7C 8005177C A222003D */ sb $v0, 0x3d($s1)
/* 02CB80 80051780 00004012 */ mflo $t0
/* 02CB84 80051784 00081383 */ sra $v0, $t0, 0xe
/* 02CB88 80051788 A6220040 */ sh $v0, 0x40($s1)
.L8005178C:
/* 02CB8C 8005178C 8EA20034 */ lw $v0, 0x34($s5)
/* 02CB90 80051790 26100001 */ addiu $s0, $s0, 1
/* 02CB94 80051794 0202102B */ sltu $v0, $s0, $v0
/* 02CB98 80051798 1440FFD9 */ bnez $v0, .L80051700
/* 02CB9C 8005179C 24840048 */ addiu $a0, $a0, 0x48
.L800517A0:
/* 02CBA0 800517A0 26D60001 */ addiu $s6, $s6, 1
/* 02CBA4 800517A4 2EC2000A */ sltiu $v0, $s6, 0xa
/* 02CBA8 800517A8 1440FFBA */ bnez $v0, .L80051694
/* 02CBAC 800517AC 24A50028 */ addiu $a1, $a1, 0x28
/* 02CBB0 800517B0 8EA20018 */ lw $v0, 0x18($s5)
/* 02CBB4 800517B4 2442FFFF */ addiu $v0, $v0, -1
/* 02CBB8 800517B8 1C400240 */ bgtz $v0, .L800520BC
/* 02CBBC 800517BC AEA20018 */ sw $v0, 0x18($s5)
/* 02CBC0 800517C0 1440023E */ bnez $v0, .L800520BC
/* 02CBC4 800517C4 00000000 */ nop
/* 02CBC8 800517C8 241E0001 */ addiu $fp, $zero, 1
/* 02CBCC 800517CC 27A80010 */ addiu $t0, $sp, 0x10
/* 02CBD0 800517D0 AFA80040 */ sw $t0, 0x40($sp)
/* 02CBD4 800517D4 27A80020 */ addiu $t0, $sp, 0x20
/* 02CBD8 800517D8 AFA8003C */ sw $t0, 0x3c($sp)
.L800517DC:
/* 02CBDC 800517DC 0C014874 */ jal func_800521D0
/* 02CBE0 800517E0 02A0202D */ daddu $a0, $s5, $zero
/* 02CBE4 800517E4 0040802D */ daddu $s0, $v0, $zero
/* 02CBE8 800517E8 00101600 */ sll $v0, $s0, 0x18
/* 02CBEC 800517EC 0440000E */ bltz $v0, .L80051828
/* 02CBF0 800517F0 320300FF */ andi $v1, $s0, 0xff
/* 02CBF4 800517F4 1060FF49 */ beqz $v1, .L8005151C
/* 02CBF8 800517F8 2C620078 */ sltiu $v0, $v1, 0x78
/* 02CBFC 800517FC 5440022C */ bnel $v0, $zero, .L800520B0
/* 02CC00 80051800 AEA30018 */ sw $v1, 0x18($s5)
/* 02CC04 80051804 0C014874 */ jal func_800521D0
/* 02CC08 80051808 02A0202D */ daddu $a0, $s5, $zero
/* 02CC0C 8005180C 32030007 */ andi $v1, $s0, 7
/* 02CC10 80051810 00031A00 */ sll $v1, $v1, 8
/* 02CC14 80051814 304200FF */ andi $v0, $v0, 0xff
/* 02CC18 80051818 00621821 */ addu $v1, $v1, $v0
/* 02CC1C 8005181C 24630078 */ addiu $v1, $v1, 0x78
/* 02CC20 80051820 0801482C */ j .L800520B0
/* 02CC24 80051824 AEA30018 */ sw $v1, 0x18($s5)
.L80051828:
/* 02CC28 80051828 0C014874 */ jal func_800521D0
/* 02CC2C 8005182C 02A0202D */ daddu $a0, $s5, $zero
/* 02CC30 80051830 3216000F */ andi $s6, $s0, 0xf
/* 02CC34 80051834 00161880 */ sll $v1, $s6, 2
/* 02CC38 80051838 00761821 */ addu $v1, $v1, $s6
/* 02CC3C 8005183C 000318C0 */ sll $v1, $v1, 3
/* 02CC40 80051840 24630044 */ addiu $v1, $v1, 0x44
/* 02CC44 80051844 02A39821 */ addu $s3, $s5, $v1
/* 02CC48 80051848 0040B82D */ daddu $s7, $v0, $zero
/* 02CC4C 8005184C 320300F0 */ andi $v1, $s0, 0xf0
/* 02CC50 80051850 240200B0 */ addiu $v0, $zero, 0xb0
/* 02CC54 80051854 1062018E */ beq $v1, $v0, .L80051E90
/* 02CC58 80051858 286200B1 */ slti $v0, $v1, 0xb1
/* 02CC5C 8005185C 1040000E */ beqz $v0, .L80051898
/* 02CC60 80051860 24020090 */ addiu $v0, $zero, 0x90
/* 02CC64 80051864 10620047 */ beq $v1, $v0, .L80051984
/* 02CC68 80051868 28620091 */ slti $v0, $v1, 0x91
/* 02CC6C 8005186C 10400005 */ beqz $v0, .L80051884
/* 02CC70 80051870 24020080 */ addiu $v0, $zero, 0x80
/* 02CC74 80051874 10620011 */ beq $v1, $v0, .L800518BC
/* 02CC78 80051878 00000000 */ nop
/* 02CC7C 8005187C 0801482C */ j .L800520B0
/* 02CC80 80051880 00000000 */ nop
.L80051884:
/* 02CC84 80051884 240200A0 */ addiu $v0, $zero, 0xa0
/* 02CC88 80051888 10620111 */ beq $v1, $v0, .L80051CD0
/* 02CC8C 8005188C 32E20080 */ andi $v0, $s7, 0x80
/* 02CC90 80051890 0801482C */ j .L800520B0
/* 02CC94 80051894 00000000 */ nop
.L80051898:
/* 02CC98 80051898 240200E0 */ addiu $v0, $zero, 0xe0
/* 02CC9C 8005189C 106201C8 */ beq $v1, $v0, .L80051FC0
/* 02CCA0 800518A0 286200E1 */ slti $v0, $v1, 0xe1
/* 02CCA4 800518A4 10400202 */ beqz $v0, .L800520B0
/* 02CCA8 800518A8 240200C0 */ addiu $v0, $zero, 0xc0
/* 02CCAC 800518AC 106201B7 */ beq $v1, $v0, .L80051F8C
/* 02CCB0 800518B0 00000000 */ nop
/* 02CCB4 800518B4 0801482C */ j .L800520B0
/* 02CCB8 800518B8 00000000 */ nop
.L800518BC:
/* 02CCBC 800518BC 92A20025 */ lbu $v0, 0x25($s5)
/* 02CCC0 800518C0 144001FB */ bnez $v0, .L800520B0
/* 02CCC4 800518C4 00161400 */ sll $v0, $s6, 0x10
/* 02CCC8 800518C8 8EB00030 */ lw $s0, 0x30($s5)
/* 02CCCC 800518CC 8EA40014 */ lw $a0, 0x14($s5)
/* 02CCD0 800518D0 8EA30034 */ lw $v1, 0x34($s5)
/* 02CCD4 800518D4 00822021 */ addu $a0, $a0, $v0
/* 02CCD8 800518D8 32E200FF */ andi $v0, $s7, 0xff
/* 02CCDC 800518DC 00021200 */ sll $v0, $v0, 8
/* 02CCE0 800518E0 0203182B */ sltu $v1, $s0, $v1
/* 02CCE4 800518E4 106001F2 */ beqz $v1, .L800520B0
/* 02CCE8 800518E8 0082B821 */ addu $s7, $a0, $v0
/* 02CCEC 800518EC 001010C0 */ sll $v0, $s0, 3
/* 02CCF0 800518F0 00501021 */ addu $v0, $v0, $s0
/* 02CCF4 800518F4 000210C0 */ sll $v0, $v0, 3
/* 02CCF8 800518F8 24441320 */ addiu $a0, $v0, 0x1320
.L800518FC:
/* 02CCFC 800518FC 8EA20030 */ lw $v0, 0x30($s5)
/* 02CD00 80051900 8FA80070 */ lw $t0, 0x70($sp)
/* 02CD04 80051904 02021023 */ subu $v0, $s0, $v0
/* 02CD08 80051908 000210C0 */ sll $v0, $v0, 3
/* 02CD0C 8005190C 01021821 */ addu $v1, $t0, $v0
/* 02CD10 80051910 8C6207B4 */ lw $v0, 0x7b4($v1)
/* 02CD14 80051914 1457000C */ bne $v0, $s7, .L80051948
/* 02CD18 80051918 00000000 */ nop
/* 02CD1C 8005191C 8FA80030 */ lw $t0, 0x30($sp)
/* 02CD20 80051920 A07E07B7 */ sb $fp, 0x7b7($v1)
/* 02CD24 80051924 01048821 */ addu $s1, $t0, $a0
/* 02CD28 80051928 8FA80070 */ lw $t0, 0x70($sp)
/* 02CD2C 8005192C 92230045 */ lbu $v1, 0x45($s1)
/* 02CD30 80051930 91020022 */ lbu $v0, 0x22($t0)
/* 02CD34 80051934 14620004 */ bne $v1, $v0, .L80051948
/* 02CD38 80051938 00000000 */ nop
/* 02CD3C 8005193C 9222003D */ lbu $v0, 0x3d($s1)
/* 02CD40 80051940 34420010 */ ori $v0, $v0, 0x10
/* 02CD44 80051944 A222003D */ sb $v0, 0x3d($s1)
.L80051948:
/* 02CD48 80051948 8EA20034 */ lw $v0, 0x34($s5)
/* 02CD4C 8005194C 26100001 */ addiu $s0, $s0, 1
/* 02CD50 80051950 0202102B */ sltu $v0, $s0, $v0
/* 02CD54 80051954 1440FFE9 */ bnez $v0, .L800518FC
/* 02CD58 80051958 24840048 */ addiu $a0, $a0, 0x48
/* 02CD5C 8005195C 0801482C */ j .L800520B0
/* 02CD60 80051960 00000000 */ nop
.L80051964:
/* 02CD64 80051964 0C014E31 */ jal func_800538C4
/* 02CD68 80051968 320500FF */ andi $a1, $s0, 0xff
/* 02CD6C 8005196C 0801468F */ j .L80051A3C
/* 02CD70 80051970 00000000 */ nop
.L80051974:
/* 02CD74 80051974 0C014E31 */ jal func_800538C4
/* 02CD78 80051978 320500FF */ andi $a1, $s0, 0xff
/* 02CD7C 8005197C 080146A8 */ j .L80051AA0
/* 02CD80 80051980 00000000 */ nop
.L80051984:
/* 02CD84 80051984 0C014874 */ jal func_800521D0
/* 02CD88 80051988 02A0202D */ daddu $a0, $s5, $zero
/* 02CD8C 8005198C 92A30025 */ lbu $v1, 0x25($s5)
/* 02CD90 80051990 146001C7 */ bnez $v1, .L800520B0
/* 02CD94 80051994 0040A02D */ daddu $s4, $v0, $zero
/* 02CD98 80051998 8EB00030 */ lw $s0, 0x30($s5)
/* 02CD9C 8005199C 8EA40034 */ lw $a0, 0x34($s5)
/* 02CDA0 800519A0 0204102B */ sltu $v0, $s0, $a0
/* 02CDA4 800519A4 10400012 */ beqz $v0, .L800519F0
/* 02CDA8 800519A8 001010C0 */ sll $v0, $s0, 3
/* 02CDAC 800519AC 00501021 */ addu $v0, $v0, $s0
/* 02CDB0 800519B0 000210C0 */ sll $v0, $v0, 3
/* 02CDB4 800519B4 24431320 */ addiu $v1, $v0, 0x1320
/* 02CDB8 800519B8 8FA80030 */ lw $t0, 0x30($sp)
.L800519BC:
/* 02CDBC 800519BC 01038821 */ addu $s1, $t0, $v1
/* 02CDC0 800519C0 92220045 */ lbu $v0, 0x45($s1)
/* 02CDC4 800519C4 10400005 */ beqz $v0, .L800519DC
/* 02CDC8 800519C8 00000000 */ nop
/* 02CDCC 800519CC 26100001 */ addiu $s0, $s0, 1
/* 02CDD0 800519D0 0204102B */ sltu $v0, $s0, $a0
/* 02CDD4 800519D4 1440FFF9 */ bnez $v0, .L800519BC
/* 02CDD8 800519D8 24630048 */ addiu $v1, $v1, 0x48
.L800519DC:
/* 02CDDC 800519DC 8EA20034 */ lw $v0, 0x34($s5)
/* 02CDE0 800519E0 0202102B */ sltu $v0, $s0, $v0
/* 02CDE4 800519E4 14400032 */ bnez $v0, .L80051AB0
/* 02CDE8 800519E8 00000000 */ nop
/* 02CDEC 800519EC 8EB00030 */ lw $s0, 0x30($s5)
.L800519F0:
/* 02CDF0 800519F0 8EA30034 */ lw $v1, 0x34($s5)
/* 02CDF4 800519F4 0203102B */ sltu $v0, $s0, $v1
/* 02CDF8 800519F8 10400014 */ beqz $v0, .L80051A4C
/* 02CDFC 800519FC 001010C0 */ sll $v0, $s0, 3
/* 02CE00 80051A00 0060202D */ daddu $a0, $v1, $zero
/* 02CE04 80051A04 00501021 */ addu $v0, $v0, $s0
/* 02CE08 80051A08 000210C0 */ sll $v0, $v0, 3
/* 02CE0C 80051A0C 8FA80070 */ lw $t0, 0x70($sp)
/* 02CE10 80051A10 24431320 */ addiu $v1, $v0, 0x1320
/* 02CE14 80051A14 91050022 */ lbu $a1, 0x22($t0)
/* 02CE18 80051A18 8FA80030 */ lw $t0, 0x30($sp)
.L80051A1C:
/* 02CE1C 80051A1C 01038821 */ addu $s1, $t0, $v1
/* 02CE20 80051A20 92220045 */ lbu $v0, 0x45($s1)
/* 02CE24 80051A24 5045FFCF */ beql $v0, $a1, .L80051964
/* 02CE28 80051A28 0220202D */ daddu $a0, $s1, $zero
/* 02CE2C 80051A2C 26100001 */ addiu $s0, $s0, 1
/* 02CE30 80051A30 0204102B */ sltu $v0, $s0, $a0
/* 02CE34 80051A34 1440FFF9 */ bnez $v0, .L80051A1C
/* 02CE38 80051A38 24630048 */ addiu $v1, $v1, 0x48
.L80051A3C:
/* 02CE3C 80051A3C 8EA20034 */ lw $v0, 0x34($s5)
/* 02CE40 80051A40 0202102B */ sltu $v0, $s0, $v0
/* 02CE44 80051A44 1440001A */ bnez $v0, .L80051AB0
/* 02CE48 80051A48 00000000 */ nop
.L80051A4C:
/* 02CE4C 80051A4C 8EB00030 */ lw $s0, 0x30($s5)
/* 02CE50 80051A50 8EA30034 */ lw $v1, 0x34($s5)
/* 02CE54 80051A54 0203102B */ sltu $v0, $s0, $v1
/* 02CE58 80051A58 10400195 */ beqz $v0, .L800520B0
/* 02CE5C 80051A5C 001010C0 */ sll $v0, $s0, 3
/* 02CE60 80051A60 0060202D */ daddu $a0, $v1, $zero
/* 02CE64 80051A64 00501021 */ addu $v0, $v0, $s0
/* 02CE68 80051A68 000210C0 */ sll $v0, $v0, 3
/* 02CE6C 80051A6C 8FA80070 */ lw $t0, 0x70($sp)
/* 02CE70 80051A70 24431320 */ addiu $v1, $v0, 0x1320
/* 02CE74 80051A74 91050022 */ lbu $a1, 0x22($t0)
/* 02CE78 80051A78 8FA80030 */ lw $t0, 0x30($sp)
.L80051A7C:
/* 02CE7C 80051A7C 01038821 */ addu $s1, $t0, $v1
/* 02CE80 80051A80 92220045 */ lbu $v0, 0x45($s1)
/* 02CE84 80051A84 0045102B */ sltu $v0, $v0, $a1
/* 02CE88 80051A88 5440FFBA */ bnel $v0, $zero, .L80051974
/* 02CE8C 80051A8C 0220202D */ daddu $a0, $s1, $zero
/* 02CE90 80051A90 26100001 */ addiu $s0, $s0, 1
/* 02CE94 80051A94 0204102B */ sltu $v0, $s0, $a0
/* 02CE98 80051A98 1440FFF8 */ bnez $v0, .L80051A7C
/* 02CE9C 80051A9C 24630048 */ addiu $v1, $v1, 0x48
.L80051AA0:
/* 02CEA0 80051AA0 8EA20034 */ lw $v0, 0x34($s5)
/* 02CEA4 80051AA4 0202102B */ sltu $v0, $s0, $v0
/* 02CEA8 80051AA8 10400181 */ beqz $v0, .L800520B0
/* 02CEAC 80051AAC 00000000 */ nop
.L80051AB0:
/* 02CEB0 80051AB0 8EA20030 */ lw $v0, 0x30($s5)
/* 02CEB4 80051AB4 8FA80040 */ lw $t0, 0x40($sp)
/* 02CEB8 80051AB8 02021023 */ subu $v0, $s0, $v0
/* 02CEBC 80051ABC 01021021 */ addu $v0, $t0, $v0
/* 02CEC0 80051AC0 A05E0000 */ sb $fp, ($v0)
/* 02CEC4 80051AC4 8EA20030 */ lw $v0, 0x30($s5)
/* 02CEC8 80051AC8 8FA8003C */ lw $t0, 0x3c($sp)
/* 02CECC 80051ACC 02021023 */ subu $v0, $s0, $v0
/* 02CED0 80051AD0 01021021 */ addu $v0, $t0, $v0
/* 02CED4 80051AD4 A05E0000 */ sb $fp, ($v0)
/* 02CED8 80051AD8 8EA20030 */ lw $v0, 0x30($s5)
/* 02CEDC 80051ADC 8FA80070 */ lw $t0, 0x70($sp)
/* 02CEE0 80051AE0 8EA30014 */ lw $v1, 0x14($s5)
/* 02CEE4 80051AE4 02021023 */ subu $v0, $s0, $v0
/* 02CEE8 80051AE8 000210C0 */ sll $v0, $v0, 3
/* 02CEEC 80051AEC 244207B4 */ addiu $v0, $v0, 0x7b4
/* 02CEF0 80051AF0 01029021 */ addu $s2, $t0, $v0
/* 02CEF4 80051AF4 00161400 */ sll $v0, $s6, 0x10
/* 02CEF8 80051AF8 00621821 */ addu $v1, $v1, $v0
/* 02CEFC 80051AFC 32E200FF */ andi $v0, $s7, 0xff
/* 02CF00 80051B00 00021200 */ sll $v0, $v0, 8
/* 02CF04 80051B04 00621821 */ addu $v1, $v1, $v0
/* 02CF08 80051B08 AE430000 */ sw $v1, ($s2)
/* 02CF0C 80051B0C 92620026 */ lbu $v0, 0x26($s3)
/* 02CF10 80051B10 30420001 */ andi $v0, $v0, 1
/* 02CF14 80051B14 50400002 */ beql $v0, $zero, .L80051B20
/* 02CF18 80051B18 A2400007 */ sb $zero, 7($s2)
/* 02CF1C 80051B1C A25E0007 */ sb $fp, 7($s2)
.L80051B20:
/* 02CF20 80051B20 24080009 */ addiu $t0, $zero, 9
/* 02CF24 80051B24 12C80033 */ beq $s6, $t0, .L80051BF4
/* 02CF28 80051B28 32E3007F */ andi $v1, $s7, 0x7f
/* 02CF2C 80051B2C 92620026 */ lbu $v0, 0x26($s3)
/* 02CF30 80051B30 30420001 */ andi $v0, $v0, 1
/* 02CF34 80051B34 50400002 */ beql $v0, $zero, .L80051B40
/* 02CF38 80051B38 A2400007 */ sb $zero, 7($s2)
/* 02CF3C 80051B3C A25E0007 */ sb $fp, 7($s2)
.L80051B40:
/* 02CF40 80051B40 3284007F */ andi $a0, $s4, 0x7f
/* 02CF44 80051B44 8E620000 */ lw $v0, ($s3)
/* 02CF48 80051B48 32E3007F */ andi $v1, $s7, 0x7f
/* 02CF4C 80051B4C 9445001E */ lhu $a1, 0x1e($v0)
/* 02CF50 80051B50 00031040 */ sll $v0, $v1, 1
/* 02CF54 80051B54 00431021 */ addu $v0, $v0, $v1
/* 02CF58 80051B58 000210C0 */ sll $v0, $v0, 3
/* 02CF5C 80051B5C 00431021 */ addu $v0, $v0, $v1
/* 02CF60 80051B60 00021080 */ sll $v0, $v0, 2
/* 02CF64 80051B64 A2440006 */ sb $a0, 6($s2)
/* 02CF68 80051B68 00451023 */ subu $v0, $v0, $a1
/* 02CF6C 80051B6C A6420004 */ sh $v0, 4($s2)
/* 02CF70 80051B70 82A30038 */ lb $v1, 0x38($s5)
/* 02CF74 80051B74 86620018 */ lh $v0, 0x18($s3)
/* 02CF78 80051B78 00620018 */ mult $v1, $v0
/* 02CF7C 80051B7C 00004012 */ mflo $t0
/* 02CF80 80051B80 00000000 */ nop
/* 02CF84 80051B84 00000000 */ nop
/* 02CF88 80051B88 01040018 */ mult $t0, $a0
/* 02CF8C 80051B8C 00004012 */ mflo $t0
/* 02CF90 80051B90 00081383 */ sra $v0, $t0, 0xe
/* 02CF94 80051B94 A6220040 */ sh $v0, 0x40($s1)
/* 02CF98 80051B98 86420004 */ lh $v0, 4($s2)
/* 02CF9C 80051B9C 8664000C */ lh $a0, 0xc($s3)
/* 02CFA0 80051BA0 0C014E3E */ jal func_800538F8
/* 02CFA4 80051BA4 00442021 */ addu $a0, $v0, $a0
/* 02CFA8 80051BA8 8E620000 */ lw $v0, ($s3)
/* 02CFAC 80051BAC C4420020 */ lwc1 $f2, 0x20($v0)
/* 02CFB0 80051BB0 46020002 */ mul.s $f0, $f0, $f2
/* 02CFB4 80051BB4 00000000 */ nop
/* 02CFB8 80051BB8 E6200004 */ swc1 $f0, 4($s1)
/* 02CFBC 80051BBC 92620024 */ lbu $v0, 0x24($s3)
/* 02CFC0 80051BC0 A222000E */ sb $v0, 0xe($s1)
/* 02CFC4 80051BC4 92620025 */ lbu $v0, 0x25($s3)
/* 02CFC8 80051BC8 A222000F */ sb $v0, 0xf($s1)
/* 02CFCC 80051BCC 8E620000 */ lw $v0, ($s3)
/* 02CFD0 80051BD0 AE220000 */ sw $v0, ($s1)
/* 02CFD4 80051BD4 8FA80070 */ lw $t0, 0x70($sp)
/* 02CFD8 80051BD8 91020023 */ lbu $v0, 0x23($t0)
/* 02CFDC 80051BDC A2220010 */ sb $v0, 0x10($s1)
/* 02CFE0 80051BE0 8E620004 */ lw $v0, 4($s3)
/* 02CFE4 80051BE4 AE220014 */ sw $v0, 0x14($s1)
/* 02CFE8 80051BE8 8E620008 */ lw $v0, 8($s3)
/* 02CFEC 80051BEC 0801472D */ j .L80051CB4
/* 02CFF0 80051BF0 AE220018 */ sw $v0, 0x18($s1)
.L80051BF4:
/* 02CFF4 80051BF4 A2400007 */ sb $zero, 7($s2)
/* 02CFF8 80051BF8 8FA80070 */ lw $t0, 0x70($sp)
/* 02CFFC 80051BFC 00031040 */ sll $v0, $v1, 1
/* 02D000 80051C00 8D040000 */ lw $a0, ($t0)
/* 02D004 80051C04 00431021 */ addu $v0, $v0, $v1
/* 02D008 80051C08 8C900054 */ lw $s0, 0x54($a0)
/* 02D00C 80051C0C 00021080 */ sll $v0, $v0, 2
/* 02D010 80051C10 02028021 */ addu $s0, $s0, $v0
/* 02D014 80051C14 96060000 */ lhu $a2, ($s0)
/* 02D018 80051C18 26270014 */ addiu $a3, $s1, 0x14
/* 02D01C 80051C1C 00062A02 */ srl $a1, $a2, 8
/* 02D020 80051C20 0C014EFA */ jal func_80053BE8
/* 02D024 80051C24 30C600FF */ andi $a2, $a2, 0xff
/* 02D028 80051C28 AE220000 */ sw $v0, ($s1)
/* 02D02C 80051C2C 96030002 */ lhu $v1, 2($s0)
/* 02D030 80051C30 9442001E */ lhu $v0, 0x1e($v0)
/* 02D034 80051C34 00621823 */ subu $v1, $v1, $v0
/* 02D038 80051C38 A6430004 */ sh $v1, 4($s2)
/* 02D03C 80051C3C 92030004 */ lbu $v1, 4($s0)
/* 02D040 80051C40 3282007F */ andi $v0, $s4, 0x7f
/* 02D044 80051C44 00430018 */ mult $v0, $v1
/* 02D048 80051C48 00004012 */ mflo $t0
/* 02D04C 80051C4C 000819C3 */ sra $v1, $t0, 7
/* 02D050 80051C50 A2430006 */ sb $v1, 6($s2)
/* 02D054 80051C54 82A40038 */ lb $a0, 0x38($s5)
/* 02D058 80051C58 86620018 */ lh $v0, 0x18($s3)
/* 02D05C 80051C5C 00820018 */ mult $a0, $v0
/* 02D060 80051C60 00004012 */ mflo $t0
/* 02D064 80051C64 00031E00 */ sll $v1, $v1, 0x18
/* 02D068 80051C68 00031E03 */ sra $v1, $v1, 0x18
/* 02D06C 80051C6C 01030018 */ mult $t0, $v1
/* 02D070 80051C70 00004012 */ mflo $t0
/* 02D074 80051C74 00081383 */ sra $v0, $t0, 0xe
/* 02D078 80051C78 A6220040 */ sh $v0, 0x40($s1)
/* 02D07C 80051C7C 0C014E3E */ jal func_800538F8
/* 02D080 80051C80 86440004 */ lh $a0, 4($s2)
/* 02D084 80051C84 8E220000 */ lw $v0, ($s1)
/* 02D088 80051C88 C4420020 */ lwc1 $f2, 0x20($v0)
/* 02D08C 80051C8C 46020002 */ mul.s $f0, $f0, $f2
/* 02D090 80051C90 00000000 */ nop
/* 02D094 80051C94 E6200004 */ swc1 $f0, 4($s1)
/* 02D098 80051C98 92020005 */ lbu $v0, 5($s0)
/* 02D09C 80051C9C A222000E */ sb $v0, 0xe($s1)
/* 02D0A0 80051CA0 92020006 */ lbu $v0, 6($s0)
/* 02D0A4 80051CA4 A222000F */ sb $v0, 0xf($s1)
/* 02D0A8 80051CA8 8FA80070 */ lw $t0, 0x70($sp)
/* 02D0AC 80051CAC 91020023 */ lbu $v0, 0x23($t0)
/* 02D0B0 80051CB0 A2220010 */ sb $v0, 0x10($s1)
.L80051CB4:
/* 02D0B4 80051CB4 24020002 */ addiu $v0, $zero, 2
/* 02D0B8 80051CB8 A2220043 */ sb $v0, 0x43($s1)
/* 02D0BC 80051CBC 8FA80070 */ lw $t0, 0x70($sp)
/* 02D0C0 80051CC0 91020022 */ lbu $v0, 0x22($t0)
/* 02D0C4 80051CC4 A2220045 */ sb $v0, 0x45($s1)
/* 02D0C8 80051CC8 0801482C */ j .L800520B0
/* 02D0CC 80051CCC A2220044 */ sb $v0, 0x44($s1)
.L80051CD0:
/* 02D0D0 80051CD0 1040002C */ beqz $v0, .L80051D84
/* 02D0D4 80051CD4 32E2007F */ andi $v0, $s7, 0x7f
/* 02D0D8 80051CD8 00162400 */ sll $a0, $s6, 0x10
/* 02D0DC 80051CDC A2620024 */ sb $v0, 0x24($s3)
/* 02D0E0 80051CE0 8EB00030 */ lw $s0, 0x30($s5)
/* 02D0E4 80051CE4 8EA30014 */ lw $v1, 0x14($s5)
/* 02D0E8 80051CE8 8EA20034 */ lw $v0, 0x34($s5)
/* 02D0EC 80051CEC 0202102B */ sltu $v0, $s0, $v0
/* 02D0F0 80051CF0 104000EF */ beqz $v0, .L800520B0
/* 02D0F4 80051CF4 0064B821 */ addu $s7, $v1, $a0
/* 02D0F8 80051CF8 001010C0 */ sll $v0, $s0, 3
/* 02D0FC 80051CFC 00501021 */ addu $v0, $v0, $s0
/* 02D100 80051D00 000210C0 */ sll $v0, $v0, 3
/* 02D104 80051D04 24441320 */ addiu $a0, $v0, 0x1320
.L80051D08:
/* 02D108 80051D08 8EA20030 */ lw $v0, 0x30($s5)
/* 02D10C 80051D0C 8FA80070 */ lw $t0, 0x70($sp)
/* 02D110 80051D10 02021023 */ subu $v0, $s0, $v0
/* 02D114 80051D14 000210C0 */ sll $v0, $v0, 3
/* 02D118 80051D18 00489021 */ addu $s2, $v0, $t0
/* 02D11C 80051D1C 8E4207B4 */ lw $v0, 0x7b4($s2)
/* 02D120 80051D20 3C08FFFF */ lui $t0, 0xffff
/* 02D124 80051D24 00481024 */ and $v0, $v0, $t0
/* 02D128 80051D28 1457000F */ bne $v0, $s7, .L80051D68
/* 02D12C 80051D2C 00000000 */ nop
/* 02D130 80051D30 8FA80030 */ lw $t0, 0x30($sp)
/* 02D134 80051D34 01048821 */ addu $s1, $t0, $a0
/* 02D138 80051D38 8FA80070 */ lw $t0, 0x70($sp)
/* 02D13C 80051D3C 92230045 */ lbu $v1, 0x45($s1)
/* 02D140 80051D40 91020022 */ lbu $v0, 0x22($t0)
/* 02D144 80051D44 14620008 */ bne $v1, $v0, .L80051D68
/* 02D148 80051D48 24080009 */ addiu $t0, $zero, 9
/* 02D14C 80051D4C 12C80006 */ beq $s6, $t0, .L80051D68
/* 02D150 80051D50 00000000 */ nop
/* 02D154 80051D54 92220043 */ lbu $v0, 0x43($s1)
/* 02D158 80051D58 92630024 */ lbu $v1, 0x24($s3)
/* 02D15C 80051D5C 34420010 */ ori $v0, $v0, 0x10
/* 02D160 80051D60 A223000E */ sb $v1, 0xe($s1)
/* 02D164 80051D64 A2220043 */ sb $v0, 0x43($s1)
.L80051D68:
/* 02D168 80051D68 8EA20034 */ lw $v0, 0x34($s5)
/* 02D16C 80051D6C 26100001 */ addiu $s0, $s0, 1
/* 02D170 80051D70 0202102B */ sltu $v0, $s0, $v0
/* 02D174 80051D74 1440FFE4 */ bnez $v0, .L80051D08
/* 02D178 80051D78 24840048 */ addiu $a0, $a0, 0x48
/* 02D17C 80051D7C 0801482C */ j .L800520B0
/* 02D180 80051D80 00000000 */ nop
.L80051D84:
/* 02D184 80051D84 00171E00 */ sll $v1, $s7, 0x18
/* 02D188 80051D88 10600005 */ beqz $v1, .L80051DA0
/* 02D18C 80051D8C AE630018 */ sw $v1, 0x18($s3)
/* 02D190 80051D90 3C0200FF */ lui $v0, 0xff
/* 02D194 80051D94 3442FFFF */ ori $v0, $v0, 0xffff
/* 02D198 80051D98 00621025 */ or $v0, $v1, $v0
/* 02D19C 80051D9C AE620018 */ sw $v0, 0x18($s3)
.L80051DA0:
/* 02D1A0 80051DA0 00162400 */ sll $a0, $s6, 0x10
/* 02D1A4 80051DA4 8EB00030 */ lw $s0, 0x30($s5)
/* 02D1A8 80051DA8 8EA30014 */ lw $v1, 0x14($s5)
/* 02D1AC 80051DAC 8EA20034 */ lw $v0, 0x34($s5)
/* 02D1B0 80051DB0 0202102B */ sltu $v0, $s0, $v0
/* 02D1B4 80051DB4 104000BE */ beqz $v0, .L800520B0
/* 02D1B8 80051DB8 0064B821 */ addu $s7, $v1, $a0
/* 02D1BC 80051DBC 001010C0 */ sll $v0, $s0, 3
/* 02D1C0 80051DC0 00501021 */ addu $v0, $v0, $s0
/* 02D1C4 80051DC4 000210C0 */ sll $v0, $v0, 3
/* 02D1C8 80051DC8 24441320 */ addiu $a0, $v0, 0x1320
.L80051DCC:
/* 02D1CC 80051DCC 8EA20030 */ lw $v0, 0x30($s5)
/* 02D1D0 80051DD0 8FA80070 */ lw $t0, 0x70($sp)
/* 02D1D4 80051DD4 02021023 */ subu $v0, $s0, $v0
/* 02D1D8 80051DD8 000210C0 */ sll $v0, $v0, 3
/* 02D1DC 80051DDC 244207B4 */ addiu $v0, $v0, 0x7b4
/* 02D1E0 80051DE0 01029021 */ addu $s2, $t0, $v0
/* 02D1E4 80051DE4 8E420000 */ lw $v0, ($s2)
/* 02D1E8 80051DE8 3C08FFFF */ lui $t0, 0xffff
/* 02D1EC 80051DEC 00481024 */ and $v0, $v0, $t0
/* 02D1F0 80051DF0 14570020 */ bne $v0, $s7, .L80051E74
/* 02D1F4 80051DF4 00000000 */ nop
/* 02D1F8 80051DF8 8FA80030 */ lw $t0, 0x30($sp)
/* 02D1FC 80051DFC 01048821 */ addu $s1, $t0, $a0
/* 02D200 80051E00 8FA80070 */ lw $t0, 0x70($sp)
/* 02D204 80051E04 92230045 */ lbu $v1, 0x45($s1)
/* 02D208 80051E08 91020022 */ lbu $v0, 0x22($t0)
/* 02D20C 80051E0C 14620019 */ bne $v1, $v0, .L80051E74
/* 02D210 80051E10 00000000 */ nop
/* 02D214 80051E14 82A30038 */ lb $v1, 0x38($s5)
/* 02D218 80051E18 86620018 */ lh $v0, 0x18($s3)
/* 02D21C 80051E1C 00620018 */ mult $v1, $v0
/* 02D220 80051E20 00004012 */ mflo $t0
/* 02D224 80051E24 82420006 */ lb $v0, 6($s2)
/* 02D228 80051E28 00000000 */ nop
/* 02D22C 80051E2C 01020018 */ mult $t0, $v0
/* 02D230 80051E30 00004012 */ mflo $t0
/* 02D234 80051E34 00081383 */ sra $v0, $t0, 0xe
/* 02D238 80051E38 A6220040 */ sh $v0, 0x40($s1)
/* 02D23C 80051E3C 8EA20030 */ lw $v0, 0x30($s5)
/* 02D240 80051E40 8FA80040 */ lw $t0, 0x40($sp)
/* 02D244 80051E44 02021023 */ subu $v0, $s0, $v0
/* 02D248 80051E48 01021021 */ addu $v0, $t0, $v0
/* 02D24C 80051E4C 90420000 */ lbu $v0, ($v0)
/* 02D250 80051E50 14400008 */ bnez $v0, .L80051E74
/* 02D254 80051E54 00000000 */ nop
/* 02D258 80051E58 9222003D */ lbu $v0, 0x3d($s1)
/* 02D25C 80051E5C 34420020 */ ori $v0, $v0, 0x20
/* 02D260 80051E60 A222003D */ sb $v0, 0x3d($s1)
/* 02D264 80051E64 8EA20030 */ lw $v0, 0x30($s5)
/* 02D268 80051E68 02021023 */ subu $v0, $s0, $v0
/* 02D26C 80051E6C 01021021 */ addu $v0, $t0, $v0
/* 02D270 80051E70 A05E0000 */ sb $fp, ($v0)
.L80051E74:
/* 02D274 80051E74 8EA20034 */ lw $v0, 0x34($s5)
/* 02D278 80051E78 26100001 */ addiu $s0, $s0, 1
/* 02D27C 80051E7C 0202102B */ sltu $v0, $s0, $v0
/* 02D280 80051E80 1440FFD2 */ bnez $v0, .L80051DCC
/* 02D284 80051E84 24840048 */ addiu $a0, $a0, 0x48
/* 02D288 80051E88 0801482C */ j .L800520B0
/* 02D28C 80051E8C 00000000 */ nop
.L80051E90:
/* 02D290 80051E90 0C014874 */ jal func_800521D0
/* 02D294 80051E94 02A0202D */ daddu $a0, $s5, $zero
/* 02D298 80051E98 0040A02D */ daddu $s4, $v0, $zero
/* 02D29C 80051E9C 32E300FF */ andi $v1, $s7, 0xff
/* 02D2A0 80051EA0 24020067 */ addiu $v0, $zero, 0x67
/* 02D2A4 80051EA4 10620013 */ beq $v1, $v0, .L80051EF4
/* 02D2A8 80051EA8 28620068 */ slti $v0, $v1, 0x68
/* 02D2AC 80051EAC 10400005 */ beqz $v0, .L80051EC4
/* 02D2B0 80051EB0 24020066 */ addiu $v0, $zero, 0x66
/* 02D2B4 80051EB4 1062000A */ beq $v1, $v0, .L80051EE0
/* 02D2B8 80051EB8 32820001 */ andi $v0, $s4, 1
/* 02D2BC 80051EBC 0801482C */ j .L800520B0
/* 02D2C0 80051EC0 00000000 */ nop
.L80051EC4:
/* 02D2C4 80051EC4 24020068 */ addiu $v0, $zero, 0x68
/* 02D2C8 80051EC8 10620027 */ beq $v1, $v0, .L80051F68
/* 02D2CC 80051ECC 24020069 */ addiu $v0, $zero, 0x69
/* 02D2D0 80051ED0 10620027 */ beq $v1, $v0, .L80051F70
/* 02D2D4 80051ED4 328300FF */ andi $v1, $s4, 0xff
/* 02D2D8 80051ED8 0801482C */ j .L800520B0
/* 02D2DC 80051EDC 00000000 */ nop
.L80051EE0:
/* 02D2E0 80051EE0 00021080 */ sll $v0, $v0, 2
/* 02D2E4 80051EE4 8EA30008 */ lw $v1, 8($s5)
/* 02D2E8 80051EE8 02A21021 */ addu $v0, $s5, $v0
/* 02D2EC 80051EEC 0801482C */ j .L800520B0
/* 02D2F0 80051EF0 AC43000C */ sw $v1, 0xc($v0)
.L80051EF4:
/* 02D2F4 80051EF4 3282007C */ andi $v0, $s4, 0x7c
/* 02D2F8 80051EF8 00022882 */ srl $a1, $v0, 2
/* 02D2FC 80051EFC 10A00013 */ beqz $a1, .L80051F4C
/* 02D300 80051F00 32840001 */ andi $a0, $s4, 1
/* 02D304 80051F04 02A41821 */ addu $v1, $s5, $a0
/* 02D308 80051F08 9062002C */ lbu $v0, 0x2c($v1)
/* 02D30C 80051F0C 10400009 */ beqz $v0, .L80051F34
/* 02D310 80051F10 2442FFFF */ addiu $v0, $v0, -1
/* 02D314 80051F14 A062002C */ sb $v0, 0x2c($v1)
/* 02D318 80051F18 304200FF */ andi $v0, $v0, 0xff
/* 02D31C 80051F1C 10400064 */ beqz $v0, .L800520B0
/* 02D320 80051F20 00041080 */ sll $v0, $a0, 2
/* 02D324 80051F24 02A21021 */ addu $v0, $s5, $v0
/* 02D328 80051F28 8C42000C */ lw $v0, 0xc($v0)
/* 02D32C 80051F2C 0801482C */ j .L800520B0
/* 02D330 80051F30 AEA20008 */ sw $v0, 8($s5)
.L80051F34:
/* 02D334 80051F34 00041080 */ sll $v0, $a0, 2
/* 02D338 80051F38 02A21021 */ addu $v0, $s5, $v0
/* 02D33C 80051F3C 8C42000C */ lw $v0, 0xc($v0)
/* 02D340 80051F40 AEA20008 */ sw $v0, 8($s5)
/* 02D344 80051F44 0801482C */ j .L800520B0
/* 02D348 80051F48 A065002C */ sb $a1, 0x2c($v1)
.L80051F4C:
/* 02D34C 80051F4C 00041080 */ sll $v0, $a0, 2
/* 02D350 80051F50 02A21021 */ addu $v0, $s5, $v0
/* 02D354 80051F54 8C42000C */ lw $v0, 0xc($v0)
/* 02D358 80051F58 AEA20008 */ sw $v0, 8($s5)
/* 02D35C 80051F5C 02A41021 */ addu $v0, $s5, $a0
/* 02D360 80051F60 0801482C */ j .L800520B0
/* 02D364 80051F64 A040002C */ sb $zero, 0x2c($v0)
.L80051F68:
/* 02D368 80051F68 0801482C */ j .L800520B0
/* 02D36C 80051F6C A2740025 */ sb $s4, 0x25($s3)
.L80051F70:
/* 02D370 80051F70 24020001 */ addiu $v0, $zero, 1
/* 02D374 80051F74 1462004E */ bne $v1, $v0, .L800520B0
/* 02D378 80051F78 00000000 */ nop
/* 02D37C 80051F7C 92620026 */ lbu $v0, 0x26($s3)
/* 02D380 80051F80 34420001 */ ori $v0, $v0, 1
/* 02D384 80051F84 0801482C */ j .L800520B0
/* 02D388 80051F88 A2620026 */ sb $v0, 0x26($s3)
.L80051F8C:
/* 02D38C 80051F8C 0C014874 */ jal func_800521D0
/* 02D390 80051F90 02A0202D */ daddu $a0, $s5, $zero
/* 02D394 80051F94 24080009 */ addiu $t0, $zero, 9
/* 02D398 80051F98 12C80045 */ beq $s6, $t0, .L800520B0
/* 02D39C 80051F9C 0040A02D */ daddu $s4, $v0, $zero
/* 02D3A0 80051FA0 32E500FF */ andi $a1, $s7, 0xff
/* 02D3A4 80051FA4 8FA80070 */ lw $t0, 0x70($sp)
/* 02D3A8 80051FA8 328600FF */ andi $a2, $s4, 0xff
/* 02D3AC 80051FAC 8D040000 */ lw $a0, ($t0)
/* 02D3B0 80051FB0 0C014EFA */ jal func_80053BE8
/* 02D3B4 80051FB4 26670004 */ addiu $a3, $s3, 4
/* 02D3B8 80051FB8 0801482C */ j .L800520B0
/* 02D3BC 80051FBC AE620000 */ sw $v0, ($s3)
.L80051FC0:
/* 02D3C0 80051FC0 0C014874 */ jal func_800521D0
/* 02D3C4 80051FC4 02A0202D */ daddu $a0, $s5, $zero
/* 02D3C8 80051FC8 00171E00 */ sll $v1, $s7, 0x18
/* 02D3CC 80051FCC 304200FF */ andi $v0, $v0, 0xff
/* 02D3D0 80051FD0 00021400 */ sll $v0, $v0, 0x10
/* 02D3D4 80051FD4 00621821 */ addu $v1, $v1, $v0
/* 02D3D8 80051FD8 00162400 */ sll $a0, $s6, 0x10
/* 02D3DC 80051FDC AE63000C */ sw $v1, 0xc($s3)
/* 02D3E0 80051FE0 8EB00030 */ lw $s0, 0x30($s5)
/* 02D3E4 80051FE4 8EA30014 */ lw $v1, 0x14($s5)
/* 02D3E8 80051FE8 8EA20034 */ lw $v0, 0x34($s5)
/* 02D3EC 80051FEC 0202102B */ sltu $v0, $s0, $v0
/* 02D3F0 80051FF0 1040002F */ beqz $v0, .L800520B0
/* 02D3F4 80051FF4 0064B821 */ addu $s7, $v1, $a0
/* 02D3F8 80051FF8 001010C0 */ sll $v0, $s0, 3
/* 02D3FC 80051FFC 00501021 */ addu $v0, $v0, $s0
/* 02D400 80052000 000210C0 */ sll $v0, $v0, 3
/* 02D404 80052004 24541320 */ addiu $s4, $v0, 0x1320
.L80052008:
/* 02D408 80052008 8EA20030 */ lw $v0, 0x30($s5)
/* 02D40C 8005200C 8FA80070 */ lw $t0, 0x70($sp)
/* 02D410 80052010 02021023 */ subu $v0, $s0, $v0
/* 02D414 80052014 000210C0 */ sll $v0, $v0, 3
/* 02D418 80052018 244207B4 */ addiu $v0, $v0, 0x7b4
/* 02D41C 8005201C 01029021 */ addu $s2, $t0, $v0
/* 02D420 80052020 8E420000 */ lw $v0, ($s2)
/* 02D424 80052024 3C08FFFF */ lui $t0, 0xffff
/* 02D428 80052028 00481024 */ and $v0, $v0, $t0
/* 02D42C 8005202C 1457001B */ bne $v0, $s7, .L8005209C
/* 02D430 80052030 00000000 */ nop
/* 02D434 80052034 8FA80030 */ lw $t0, 0x30($sp)
/* 02D438 80052038 01148821 */ addu $s1, $t0, $s4
/* 02D43C 8005203C 8FA80070 */ lw $t0, 0x70($sp)
/* 02D440 80052040 92230045 */ lbu $v1, 0x45($s1)
/* 02D444 80052044 91020022 */ lbu $v0, 0x22($t0)
/* 02D448 80052048 14620014 */ bne $v1, $v0, .L8005209C
/* 02D44C 8005204C 24080009 */ addiu $t0, $zero, 9
/* 02D450 80052050 12C80012 */ beq $s6, $t0, .L8005209C
/* 02D454 80052054 00000000 */ nop
/* 02D458 80052058 86420004 */ lh $v0, 4($s2)
/* 02D45C 8005205C 8664000C */ lh $a0, 0xc($s3)
/* 02D460 80052060 0C014E3E */ jal func_800538F8
/* 02D464 80052064 00442021 */ addu $a0, $v0, $a0
/* 02D468 80052068 8E620000 */ lw $v0, ($s3)
/* 02D46C 8005206C C4420020 */ lwc1 $f2, 0x20($v0)
/* 02D470 80052070 46020002 */ mul.s $f0, $f0, $f2
/* 02D474 80052074 00000000 */ nop
/* 02D478 80052078 92220043 */ lbu $v0, 0x43($s1)
/* 02D47C 8005207C 34420008 */ ori $v0, $v0, 8
/* 02D480 80052080 A2220043 */ sb $v0, 0x43($s1)
/* 02D484 80052084 E6200004 */ swc1 $f0, 4($s1)
/* 02D488 80052088 8EA20030 */ lw $v0, 0x30($s5)
/* 02D48C 8005208C 8FA8003C */ lw $t0, 0x3c($sp)
/* 02D490 80052090 02021023 */ subu $v0, $s0, $v0
/* 02D494 80052094 01021021 */ addu $v0, $t0, $v0
/* 02D498 80052098 A05E0000 */ sb $fp, ($v0)
.L8005209C:
/* 02D49C 8005209C 8EA20034 */ lw $v0, 0x34($s5)
/* 02D4A0 800520A0 26100001 */ addiu $s0, $s0, 1
/* 02D4A4 800520A4 0202102B */ sltu $v0, $s0, $v0
/* 02D4A8 800520A8 1440FFD7 */ bnez $v0, .L80052008
/* 02D4AC 800520AC 26940048 */ addiu $s4, $s4, 0x48
.L800520B0:
/* 02D4B0 800520B0 8EA20018 */ lw $v0, 0x18($s5)
/* 02D4B4 800520B4 1040FDC9 */ beqz $v0, .L800517DC
/* 02D4B8 800520B8 00000000 */ nop
.L800520BC:
/* 02D4BC 800520BC 93A20034 */ lbu $v0, 0x34($sp)
/* 02D4C0 800520C0 10400037 */ beqz $v0, .L800521A0
/* 02D4C4 800520C4 00000000 */ nop
/* 02D4C8 800520C8 8EB00030 */ lw $s0, 0x30($s5)
/* 02D4CC 800520CC 8EA20034 */ lw $v0, 0x34($s5)
/* 02D4D0 800520D0 0202102B */ sltu $v0, $s0, $v0
/* 02D4D4 800520D4 10400032 */ beqz $v0, .L800521A0
/* 02D4D8 800520D8 001010C0 */ sll $v0, $s0, 3
/* 02D4DC 800520DC 3C07FF00 */ lui $a3, 0xff00
/* 02D4E0 800520E0 27A60010 */ addiu $a2, $sp, 0x10
/* 02D4E4 800520E4 00501021 */ addu $v0, $v0, $s0
/* 02D4E8 800520E8 000210C0 */ sll $v0, $v0, 3
/* 02D4EC 800520EC 24451320 */ addiu $a1, $v0, 0x1320
.L800520F0:
/* 02D4F0 800520F0 8EA20030 */ lw $v0, 0x30($s5)
/* 02D4F4 800520F4 8FA80070 */ lw $t0, 0x70($sp)
/* 02D4F8 800520F8 02022023 */ subu $a0, $s0, $v0
/* 02D4FC 800520FC 000410C0 */ sll $v0, $a0, 3
/* 02D500 80052100 244207B4 */ addiu $v0, $v0, 0x7b4
/* 02D504 80052104 01029021 */ addu $s2, $t0, $v0
/* 02D508 80052108 8E420000 */ lw $v0, ($s2)
/* 02D50C 8005210C 8EA30014 */ lw $v1, 0x14($s5)
/* 02D510 80052110 00471024 */ and $v0, $v0, $a3
/* 02D514 80052114 1443001D */ bne $v0, $v1, .L8005218C
/* 02D518 80052118 00000000 */ nop
/* 02D51C 8005211C 8FA80030 */ lw $t0, 0x30($sp)
/* 02D520 80052120 01058821 */ addu $s1, $t0, $a1
/* 02D524 80052124 8FA80070 */ lw $t0, 0x70($sp)
/* 02D528 80052128 92230045 */ lbu $v1, 0x45($s1)
/* 02D52C 8005212C 91020022 */ lbu $v0, 0x22($t0)
/* 02D530 80052130 14620016 */ bne $v1, $v0, .L8005218C
/* 02D534 80052134 00C41021 */ addu $v0, $a2, $a0
/* 02D538 80052138 90420000 */ lbu $v0, ($v0)
/* 02D53C 8005213C 14400013 */ bnez $v0, .L8005218C
/* 02D540 80052140 00000000 */ nop
/* 02D544 80052144 92430001 */ lbu $v1, 1($s2)
/* 02D548 80052148 00031080 */ sll $v0, $v1, 2
/* 02D54C 8005214C 00431021 */ addu $v0, $v0, $v1
/* 02D550 80052150 000210C0 */ sll $v0, $v0, 3
/* 02D554 80052154 00559821 */ addu $s3, $v0, $s5
/* 02D558 80052158 82A30038 */ lb $v1, 0x38($s5)
/* 02D55C 8005215C 8662005C */ lh $v0, 0x5c($s3)
/* 02D560 80052160 00620018 */ mult $v1, $v0
/* 02D564 80052164 00004012 */ mflo $t0
/* 02D568 80052168 82420006 */ lb $v0, 6($s2)
/* 02D56C 8005216C 00000000 */ nop
/* 02D570 80052170 01020018 */ mult $t0, $v0
/* 02D574 80052174 9222003D */ lbu $v0, 0x3d($s1)
/* 02D578 80052178 34420020 */ ori $v0, $v0, 0x20
/* 02D57C 8005217C A222003D */ sb $v0, 0x3d($s1)
/* 02D580 80052180 00004012 */ mflo $t0
/* 02D584 80052184 00081383 */ sra $v0, $t0, 0xe
/* 02D588 80052188 A6220040 */ sh $v0, 0x40($s1)
.L8005218C:
/* 02D58C 8005218C 8EA20034 */ lw $v0, 0x34($s5)
/* 02D590 80052190 26100001 */ addiu $s0, $s0, 1
/* 02D594 80052194 0202102B */ sltu $v0, $s0, $v0
/* 02D598 80052198 1440FFD5 */ bnez $v0, .L800520F0
/* 02D59C 8005219C 24A50048 */ addiu $a1, $a1, 0x48
.L800521A0:
/* 02D5A0 800521A0 8FBF006C */ lw $ra, 0x6c($sp)
/* 02D5A4 800521A4 8FBE0068 */ lw $fp, 0x68($sp)
/* 02D5A8 800521A8 8FB70064 */ lw $s7, 0x64($sp)
/* 02D5AC 800521AC 8FB60060 */ lw $s6, 0x60($sp)
/* 02D5B0 800521B0 8FB5005C */ lw $s5, 0x5c($sp)
/* 02D5B4 800521B4 8FB40058 */ lw $s4, 0x58($sp)
/* 02D5B8 800521B8 8FB30054 */ lw $s3, 0x54($sp)
/* 02D5BC 800521BC 8FB20050 */ lw $s2, 0x50($sp)
/* 02D5C0 800521C0 8FB1004C */ lw $s1, 0x4c($sp)
/* 02D5C4 800521C4 8FB00048 */ lw $s0, 0x48($sp)
/* 02D5C8 800521C8 03E00008 */ jr $ra
/* 02D5CC 800521CC 27BD0070 */ addiu $sp, $sp, 0x70