.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_800687C0 /* 43BC0 800687C0 27BDFEA0 */ addiu $sp, $sp, -0x160 /* 43BC4 800687C4 AFB60158 */ sw $s6, 0x158($sp) /* 43BC8 800687C8 8FB60170 */ lw $s6, 0x170($sp) /* 43BCC 800687CC AFB00140 */ sw $s0, 0x140($sp) /* 43BD0 800687D0 00808021 */ addu $s0, $a0, $zero /* 43BD4 800687D4 AFB50154 */ sw $s5, 0x154($sp) /* 43BD8 800687D8 00A0A821 */ addu $s5, $a1, $zero /* 43BDC 800687DC AFB10144 */ sw $s1, 0x144($sp) /* 43BE0 800687E0 00E08821 */ addu $s1, $a3, $zero /* 43BE4 800687E4 AFBF015C */ sw $ra, 0x15c($sp) /* 43BE8 800687E8 AFB40150 */ sw $s4, 0x150($sp) /* 43BEC 800687EC AFB3014C */ sw $s3, 0x14c($sp) /* 43BF0 800687F0 AFB20148 */ sw $s2, 0x148($sp) /* 43BF4 800687F4 8E020050 */ lw $v0, 0x50($s0) /* 43BF8 800687F8 00151FC2 */ srl $v1, $s5, 0x1f /* 43BFC 800687FC 02A2102A */ slt $v0, $s5, $v0 /* 43C00 80068800 38420001 */ xori $v0, $v0, 1 /* 43C04 80068804 00431025 */ or $v0, $v0, $v1 /* 43C08 80068808 1440003F */ bnez $v0, .L80068908 /* 43C0C 8006880C 00C0A021 */ addu $s4, $a2, $zero /* 43C10 80068810 1AC0003D */ blez $s6, .L80068908 /* 43C14 80068814 32C2001F */ andi $v0, $s6, 0x1f /* 43C18 80068818 544000EF */ bnel $v0, $zero, .L80068BD8 /* 43C1C 8006881C 24020005 */ addiu $v0, $zero, 5 /* 43C20 80068820 06200039 */ bltz $s1, .L80068908 /* 43C24 80068824 3222001F */ andi $v0, $s1, 0x1f /* 43C28 80068828 144000EB */ bnez $v0, .L80068BD8 /* 43C2C 8006882C 24020005 */ addiu $v0, $zero, 5 /* 43C30 80068830 8E020000 */ lw $v0, ($s0) /* 43C34 80068834 30420001 */ andi $v0, $v0, 1 /* 43C38 80068838 104000E7 */ beqz $v0, .L80068BD8 /* 43C3C 8006883C 24020005 */ addiu $v0, $zero, 5 /* 43C40 80068840 0C01A76D */ jal func_80069DB4 /* 43C44 80068844 02002021 */ addu $a0, $s0, $zero /* 43C48 80068848 24030002 */ addiu $v1, $zero, 2 /* 43C4C 8006884C 104300E2 */ beq $v0, $v1, .L80068BD8 /* 43C50 80068850 24020002 */ addiu $v0, $zero, 2 /* 43C54 80068854 92020065 */ lbu $v0, 0x65($s0) /* 43C58 80068858 10400006 */ beqz $v0, .L80068874 /* 43C5C 8006885C 02002021 */ addu $a0, $s0, $zero /* 43C60 80068860 0C01A5AC */ jal func_800696B0 /* 43C64 80068864 00002821 */ addu $a1, $zero, $zero /* 43C68 80068868 00401821 */ addu $v1, $v0, $zero /* 43C6C 8006886C 146000DA */ bnez $v1, .L80068BD8 /* 43C70 80068870 00000000 */ nop .L80068874: /* 43C74 80068874 8E040004 */ lw $a0, 4($s0) /* 43C78 80068878 8E06005C */ lw $a2, 0x5c($s0) /* 43C7C 8006887C 8E050008 */ lw $a1, 8($s0) /* 43C80 80068880 27A70018 */ addiu $a3, $sp, 0x18 /* 43C84 80068884 00D53021 */ addu $a2, $a2, $s5 /* 43C88 80068888 0C01A86C */ jal func_8006A1B0 /* 43C8C 8006888C 30C6FFFF */ andi $a2, $a2, 0xffff /* 43C90 80068890 00401821 */ addu $v1, $v0, $zero /* 43C94 80068894 146000D0 */ bnez $v1, .L80068BD8 /* 43C98 80068898 00000000 */ nop /* 43C9C 8006889C 97A2001C */ lhu $v0, 0x1c($sp) /* 43CA0 800688A0 104000CD */ beqz $v0, .L80068BD8 /* 43CA4 800688A4 24020005 */ addiu $v0, $zero, 5 /* 43CA8 800688A8 8FA20018 */ lw $v0, 0x18($sp) /* 43CAC 800688AC 104000CA */ beqz $v0, .L80068BD8 /* 43CB0 800688B0 24020005 */ addiu $v0, $zero, 5 /* 43CB4 800688B4 97A2001E */ lhu $v0, 0x1e($sp) /* 43CB8 800688B8 8E030060 */ lw $v1, 0x60($s0) /* 43CBC 800688BC 0043102A */ slt $v0, $v0, $v1 /* 43CC0 800688C0 1440000D */ bnez $v0, .L800688F8 /* 43CC4 800688C4 00000000 */ nop /* 43CC8 800688C8 93A2001E */ lbu $v0, 0x1e($sp) /* 43CCC 800688CC 92030064 */ lbu $v1, 0x64($s0) /* 43CD0 800688D0 0043102B */ sltu $v0, $v0, $v1 /* 43CD4 800688D4 10400008 */ beqz $v0, .L800688F8 /* 43CD8 800688D8 00000000 */ nop /* 43CDC 800688DC 93A2001F */ lbu $v0, 0x1f($sp) /* 43CE0 800688E0 2C430001 */ sltiu $v1, $v0, 1 /* 43CE4 800688E4 2C420080 */ sltiu $v0, $v0, 0x80 /* 43CE8 800688E8 38420001 */ xori $v0, $v0, 1 /* 43CEC 800688EC 00621825 */ or $v1, $v1, $v0 /* 43CF0 800688F0 50600007 */ beql $v1, $zero, .L80068910 /* 43CF4 800688F4 328200FF */ andi $v0, $s4, 0xff .L800688F8: /* 43CF8 800688F8 97A4001E */ lhu $a0, 0x1e($sp) /* 43CFC 800688FC 24030001 */ addiu $v1, $zero, 1 /* 43D00 80068900 148300B5 */ bne $a0, $v1, .L80068BD8 /* 43D04 80068904 24020003 */ addiu $v0, $zero, 3 .L80068908: /* 43D08 80068908 0801A2F6 */ j .L80068BD8 /* 43D0C 8006890C 24020005 */ addiu $v0, $zero, 5 .L80068910: /* 43D10 80068910 14400007 */ bnez $v0, .L80068930 /* 43D14 80068914 240200FF */ addiu $v0, $zero, 0xff /* 43D18 80068918 93A20020 */ lbu $v0, 0x20($sp) /* 43D1C 8006891C 30420002 */ andi $v0, $v0, 2 /* 43D20 80068920 14400003 */ bnez $v0, .L80068930 /* 43D24 80068924 240200FF */ addiu $v0, $zero, 0xff /* 43D28 80068928 0801A2F6 */ j .L80068BD8 /* 43D2C 8006892C 24020006 */ addiu $v0, $zero, 6 .L80068930: /* 43D30 80068930 02203821 */ addu $a3, $s1, $zero /* 43D34 80068934 04E10002 */ bgez $a3, .L80068940 /* 43D38 80068938 A3A20138 */ sb $v0, 0x138($sp) /* 43D3C 8006893C 24E7001F */ addiu $a3, $a3, 0x1f .L80068940: /* 43D40 80068940 97A2001E */ lhu $v0, 0x1e($sp) /* 43D44 80068944 00078943 */ sra $s1, $a3, 5 /* 43D48 80068948 A7A2013A */ sh $v0, 0x13a($sp) /* 43D4C 8006894C 2A220008 */ slti $v0, $s1, 8 /* 43D50 80068950 1440002C */ bnez $v0, .L80068A04 /* 43D54 80068954 02C01021 */ addu $v0, $s6, $zero /* 43D58 80068958 27B20038 */ addiu $s2, $sp, 0x38 /* 43D5C 8006895C 24130001 */ addiu $s3, $zero, 1 .L80068960: /* 43D60 80068960 93A3013A */ lbu $v1, 0x13a($sp) /* 43D64 80068964 93A20138 */ lbu $v0, 0x138($sp) /* 43D68 80068968 306700FF */ andi $a3, $v1, 0xff /* 43D6C 8006896C 10E20007 */ beq $a3, $v0, .L8006898C /* 43D70 80068970 02002021 */ addu $a0, $s0, $zero /* 43D74 80068974 A3A30138 */ sb $v1, 0x138($sp) /* 43D78 80068978 02402821 */ addu $a1, $s2, $zero /* 43D7C 8006897C 0C01A79B */ jal func_80069E6C /* 43D80 80068980 00003021 */ addu $a2, $zero, $zero /* 43D84 80068984 1440001A */ bnez $v0, .L800689F0 /* 43D88 80068988 00401821 */ addu $v1, $v0, $zero .L8006898C: /* 43D8C 8006898C 93A2013B */ lbu $v0, 0x13b($sp) /* 43D90 80068990 00021040 */ sll $v0, $v0, 1 /* 43D94 80068994 00521021 */ addu $v0, $v0, $s2 /* 43D98 80068998 94430000 */ lhu $v1, ($v0) /* 43D9C 8006899C A7A3013A */ sh $v1, 0x13a($sp) /* 43DA0 800689A0 8E020060 */ lw $v0, 0x60($s0) /* 43DA4 800689A4 0062182A */ slt $v1, $v1, $v0 /* 43DA8 800689A8 1460000D */ bnez $v1, .L800689E0 /* 43DAC 800689AC 00000000 */ nop /* 43DB0 800689B0 93A2013A */ lbu $v0, 0x13a($sp) /* 43DB4 800689B4 92030064 */ lbu $v1, 0x64($s0) /* 43DB8 800689B8 0043102B */ sltu $v0, $v0, $v1 /* 43DBC 800689BC 10400008 */ beqz $v0, .L800689E0 /* 43DC0 800689C0 00000000 */ nop /* 43DC4 800689C4 93A2013B */ lbu $v0, 0x13b($sp) /* 43DC8 800689C8 2C430001 */ sltiu $v1, $v0, 1 /* 43DCC 800689CC 2C420080 */ sltiu $v0, $v0, 0x80 /* 43DD0 800689D0 38420001 */ xori $v0, $v0, 1 /* 43DD4 800689D4 00621825 */ or $v1, $v1, $v0 /* 43DD8 800689D8 50600005 */ beql $v1, $zero, .L800689F0 /* 43DDC 800689DC 00001821 */ addu $v1, $zero, $zero .L800689E0: /* 43DE0 800689E0 97A2013A */ lhu $v0, 0x13a($sp) /* 43DE4 800689E4 14530002 */ bne $v0, $s3, .L800689F0 /* 43DE8 800689E8 24030003 */ addiu $v1, $zero, 3 /* 43DEC 800689EC 24030005 */ addiu $v1, $zero, 5 .L800689F0: /* 43DF0 800689F0 14600074 */ bnez $v1, .L80068BC4 /* 43DF4 800689F4 2631FFF8 */ addiu $s1, $s1, -8 /* 43DF8 800689F8 2A220008 */ slti $v0, $s1, 8 /* 43DFC 800689FC 1040FFD8 */ beqz $v0, .L80068960 /* 43E00 80068A00 02C01021 */ addu $v0, $s6, $zero .L80068A04: /* 43E04 80068A04 04420001 */ bltzl $v0, .L80068A0C /* 43E08 80068A08 2442001F */ addiu $v0, $v0, 0x1f .L80068A0C: /* 43E0C 80068A0C 00029943 */ sra $s3, $v0, 5 /* 43E10 80068A10 8FB20174 */ lw $s2, 0x174($sp) /* 43E14 80068A14 5A60004E */ blezl $s3, .L80068B50 /* 43E18 80068A18 328300FF */ andi $v1, $s4, 0xff /* 43E1C 80068A1C 24160001 */ addiu $s6, $zero, 1 .L80068A20: /* 43E20 80068A20 24020008 */ addiu $v0, $zero, 8 /* 43E24 80068A24 16220028 */ bne $s1, $v0, .L80068AC8 /* 43E28 80068A28 00000000 */ nop /* 43E2C 80068A2C 93A3013A */ lbu $v1, 0x13a($sp) /* 43E30 80068A30 93A20138 */ lbu $v0, 0x138($sp) /* 43E34 80068A34 306700FF */ andi $a3, $v1, 0xff /* 43E38 80068A38 10E20008 */ beq $a3, $v0, .L80068A5C /* 43E3C 80068A3C 27B10038 */ addiu $s1, $sp, 0x38 /* 43E40 80068A40 A3A30138 */ sb $v1, 0x138($sp) /* 43E44 80068A44 02002021 */ addu $a0, $s0, $zero /* 43E48 80068A48 02202821 */ addu $a1, $s1, $zero /* 43E4C 80068A4C 0C01A79B */ jal func_80069E6C /* 43E50 80068A50 00003021 */ addu $a2, $zero, $zero /* 43E54 80068A54 1440001A */ bnez $v0, .L80068AC0 /* 43E58 80068A58 00401821 */ addu $v1, $v0, $zero .L80068A5C: /* 43E5C 80068A5C 93A2013B */ lbu $v0, 0x13b($sp) /* 43E60 80068A60 00021040 */ sll $v0, $v0, 1 /* 43E64 80068A64 00511021 */ addu $v0, $v0, $s1 /* 43E68 80068A68 94430000 */ lhu $v1, ($v0) /* 43E6C 80068A6C A7A3013A */ sh $v1, 0x13a($sp) /* 43E70 80068A70 8E020060 */ lw $v0, 0x60($s0) /* 43E74 80068A74 0062182A */ slt $v1, $v1, $v0 /* 43E78 80068A78 1460000D */ bnez $v1, .L80068AB0 /* 43E7C 80068A7C 00000000 */ nop /* 43E80 80068A80 93A2013A */ lbu $v0, 0x13a($sp) /* 43E84 80068A84 92030064 */ lbu $v1, 0x64($s0) /* 43E88 80068A88 0043102B */ sltu $v0, $v0, $v1 /* 43E8C 80068A8C 10400008 */ beqz $v0, .L80068AB0 /* 43E90 80068A90 00000000 */ nop /* 43E94 80068A94 93A2013B */ lbu $v0, 0x13b($sp) /* 43E98 80068A98 2C430001 */ sltiu $v1, $v0, 1 /* 43E9C 80068A9C 2C420080 */ sltiu $v0, $v0, 0x80 /* 43EA0 80068AA0 38420001 */ xori $v0, $v0, 1 /* 43EA4 80068AA4 00621825 */ or $v1, $v1, $v0 /* 43EA8 80068AA8 50600005 */ beql $v1, $zero, .L80068AC0 /* 43EAC 80068AAC 00001821 */ addu $v1, $zero, $zero .L80068AB0: /* 43EB0 80068AB0 97A2013A */ lhu $v0, 0x13a($sp) /* 43EB4 80068AB4 14560002 */ bne $v0, $s6, .L80068AC0 /* 43EB8 80068AB8 24030003 */ addiu $v1, $zero, 3 /* 43EBC 80068ABC 24030005 */ addiu $v1, $zero, 5 .L80068AC0: /* 43EC0 80068AC0 14600040 */ bnez $v1, .L80068BC4 /* 43EC4 80068AC4 00008821 */ addu $s1, $zero, $zero .L80068AC8: /* 43EC8 80068AC8 92020065 */ lbu $v0, 0x65($s0) /* 43ECC 80068ACC 93A5013A */ lbu $a1, 0x13a($sp) /* 43ED0 80068AD0 10450006 */ beq $v0, $a1, .L80068AEC /* 43ED4 80068AD4 00000000 */ nop /* 43ED8 80068AD8 0C01A5AC */ jal func_800696B0 /* 43EDC 80068ADC 02002021 */ addu $a0, $s0, $zero /* 43EE0 80068AE0 00401821 */ addu $v1, $v0, $zero /* 43EE4 80068AE4 1460003C */ bnez $v1, .L80068BD8 /* 43EE8 80068AE8 00601021 */ addu $v0, $v1, $zero .L80068AEC: /* 43EEC 80068AEC 93A2013B */ lbu $v0, 0x13b($sp) /* 43EF0 80068AF0 000210C0 */ sll $v0, $v0, 3 /* 43EF4 80068AF4 00513021 */ addu $a2, $v0, $s1 /* 43EF8 80068AF8 328200FF */ andi $v0, $s4, 0xff /* 43EFC 80068AFC 54400008 */ bnel $v0, $zero, .L80068B20 /* 43F00 80068B00 AFA00010 */ sw $zero, 0x10($sp) /* 43F04 80068B04 8E040004 */ lw $a0, 4($s0) /* 43F08 80068B08 8E050008 */ lw $a1, 8($s0) /* 43F0C 80068B0C 30C6FFFF */ andi $a2, $a2, 0xffff /* 43F10 80068B10 0C01A86C */ jal func_8006A1B0 /* 43F14 80068B14 02403821 */ addu $a3, $s2, $zero /* 43F18 80068B18 0801A2CE */ j .L80068B38 /* 43F1C 80068B1C 00401821 */ addu $v1, $v0, $zero .L80068B20: /* 43F20 80068B20 8E040004 */ lw $a0, 4($s0) /* 43F24 80068B24 8E050008 */ lw $a1, 8($s0) /* 43F28 80068B28 30C6FFFF */ andi $a2, $a2, 0xffff /* 43F2C 80068B2C 0C01A8E8 */ jal func_8006A3A0 /* 43F30 80068B30 02403821 */ addu $a3, $s2, $zero /* 43F34 80068B34 00401821 */ addu $v1, $v0, $zero .L80068B38: /* 43F38 80068B38 14600022 */ bnez $v1, .L80068BC4 /* 43F3C 80068B3C 26520020 */ addiu $s2, $s2, 0x20 /* 43F40 80068B40 2673FFFF */ addiu $s3, $s3, -1 /* 43F44 80068B44 1E60FFB6 */ bgtz $s3, .L80068A20 /* 43F48 80068B48 26310001 */ addiu $s1, $s1, 1 /* 43F4C 80068B4C 328300FF */ andi $v1, $s4, 0xff .L80068B50: /* 43F50 80068B50 24020001 */ addiu $v0, $zero, 1 /* 43F54 80068B54 1462001D */ bne $v1, $v0, .L80068BCC /* 43F58 80068B58 00000000 */ nop /* 43F5C 80068B5C 93A30020 */ lbu $v1, 0x20($sp) /* 43F60 80068B60 30620002 */ andi $v0, $v1, 2 /* 43F64 80068B64 14400019 */ bnez $v0, .L80068BCC /* 43F68 80068B68 34620002 */ ori $v0, $v1, 2 /* 43F6C 80068B6C A3A20020 */ sb $v0, 0x20($sp) /* 43F70 80068B70 92020065 */ lbu $v0, 0x65($s0) /* 43F74 80068B74 10400006 */ beqz $v0, .L80068B90 /* 43F78 80068B78 02002021 */ addu $a0, $s0, $zero /* 43F7C 80068B7C 0C01A5AC */ jal func_800696B0 /* 43F80 80068B80 00002821 */ addu $a1, $zero, $zero /* 43F84 80068B84 00401821 */ addu $v1, $v0, $zero /* 43F88 80068B88 14600013 */ bnez $v1, .L80068BD8 /* 43F8C 80068B8C 00000000 */ nop .L80068B90: /* 43F90 80068B90 8E06005C */ lw $a2, 0x5c($s0) /* 43F94 80068B94 AFA00010 */ sw $zero, 0x10($sp) /* 43F98 80068B98 8E040004 */ lw $a0, 4($s0) /* 43F9C 80068B9C 8E050008 */ lw $a1, 8($s0) /* 43FA0 80068BA0 27A70018 */ addiu $a3, $sp, 0x18 /* 43FA4 80068BA4 00D53021 */ addu $a2, $a2, $s5 /* 43FA8 80068BA8 0C01A8E8 */ jal func_8006A3A0 /* 43FAC 80068BAC 30C6FFFF */ andi $a2, $a2, 0xffff /* 43FB0 80068BB0 00401821 */ addu $v1, $v0, $zero /* 43FB4 80068BB4 10600005 */ beqz $v1, .L80068BCC /* 43FB8 80068BB8 00000000 */ nop /* 43FBC 80068BBC 0801A2F6 */ j .L80068BD8 /* 43FC0 80068BC0 00000000 */ nop .L80068BC4: /* 43FC4 80068BC4 0801A2F6 */ j .L80068BD8 /* 43FC8 80068BC8 00601021 */ addu $v0, $v1, $zero .L80068BCC: /* 43FCC 80068BCC 8E040004 */ lw $a0, 4($s0) /* 43FD0 80068BD0 0C01A528 */ jal func_800694A0 /* 43FD4 80068BD4 8E050008 */ lw $a1, 8($s0) .L80068BD8: /* 43FD8 80068BD8 8FBF015C */ lw $ra, 0x15c($sp) /* 43FDC 80068BDC 8FB60158 */ lw $s6, 0x158($sp) /* 43FE0 80068BE0 8FB50154 */ lw $s5, 0x154($sp) /* 43FE4 80068BE4 8FB40150 */ lw $s4, 0x150($sp) /* 43FE8 80068BE8 8FB3014C */ lw $s3, 0x14c($sp) /* 43FEC 80068BEC 8FB20148 */ lw $s2, 0x148($sp) /* 43FF0 80068BF0 8FB10144 */ lw $s1, 0x144($sp) /* 43FF4 80068BF4 8FB00140 */ lw $s0, 0x140($sp) /* 43FF8 80068BF8 03E00008 */ jr $ra /* 43FFC 80068BFC 27BD0160 */ addiu $sp, $sp, 0x160