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

744 lines
32 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80268284
/* 196B64 80268284 27BDFF98 */ addiu $sp, $sp, -0x68
/* 196B68 80268288 3C0B802A */ lui $t3, 0x802a
/* 196B6C 8026828C 256BFBE0 */ addiu $t3, $t3, -0x420
/* 196B70 80268290 AFBF0064 */ sw $ra, 0x64($sp)
/* 196B74 80268294 AFBE0060 */ sw $fp, 0x60($sp)
/* 196B78 80268298 AFB7005C */ sw $s7, 0x5c($sp)
/* 196B7C 8026829C AFB60058 */ sw $s6, 0x58($sp)
/* 196B80 802682A0 AFB50054 */ sw $s5, 0x54($sp)
/* 196B84 802682A4 AFB40050 */ sw $s4, 0x50($sp)
/* 196B88 802682A8 AFB3004C */ sw $s3, 0x4c($sp)
/* 196B8C 802682AC AFB20048 */ sw $s2, 0x48($sp)
/* 196B90 802682B0 AFB10044 */ sw $s1, 0x44($sp)
/* 196B94 802682B4 AFB00040 */ sw $s0, 0x40($sp)
/* 196B98 802682B8 AFA40068 */ sw $a0, 0x68($sp)
/* 196B9C 802682BC AFA5006C */ sw $a1, 0x6c($sp)
/* 196BA0 802682C0 AFA70074 */ sw $a3, 0x74($sp)
/* 196BA4 802682C4 81620061 */ lb $v0, 0x61($t3)
/* 196BA8 802682C8 1040011D */ beqz $v0, .L80268740
/* 196BAC 802682CC 00C0602D */ daddu $t4, $a2, $zero
/* 196BB0 802682D0 0080702D */ daddu $t6, $a0, $zero
/* 196BB4 802682D4 25CEFFE4 */ addiu $t6, $t6, -0x1c
/* 196BB8 802682D8 AFAE0068 */ sw $t6, 0x68($sp)
/* 196BBC 802682DC 00A0702D */ daddu $t6, $a1, $zero
/* 196BC0 802682E0 81630080 */ lb $v1, 0x80($t3)
/* 196BC4 802682E4 25CEFFFC */ addiu $t6, $t6, -4
/* 196BC8 802682E8 AFAE006C */ sw $t6, 0x6c($sp)
/* 196BCC 802682EC 00031040 */ sll $v0, $v1, 1
/* 196BD0 802682F0 004B1021 */ addu $v0, $v0, $t3
/* 196BD4 802682F4 844D0074 */ lh $t5, 0x74($v0)
/* 196BD8 802682F8 05820001 */ bltzl $t4, .L80268300
/* 196BDC 802682FC 0000602D */ daddu $t4, $zero, $zero
.L80268300:
/* 196BE0 80268300 0000802D */ daddu $s0, $zero, $zero
/* 196BE4 80268304 18600020 */ blez $v1, .L80268388
/* 196BE8 80268308 0200902D */ daddu $s2, $s0, $zero
/* 196BEC 8026830C 0060282D */ daddu $a1, $v1, $zero
/* 196BF0 80268310 26440001 */ addiu $a0, $s2, 1
.L80268314:
/* 196BF4 80268314 00041040 */ sll $v0, $a0, 1
/* 196BF8 80268318 01621021 */ addu $v0, $t3, $v0
/* 196BFC 8026831C 84460074 */ lh $a2, 0x74($v0)
/* 196C00 80268320 0186102A */ slt $v0, $t4, $a2
/* 196C04 80268324 54400001 */ bnezl $v0, .L8026832C
/* 196C08 80268328 0180302D */ daddu $a2, $t4, $zero
.L8026832C:
/* 196C0C 8026832C 00061900 */ sll $v1, $a2, 4
/* 196C10 80268330 00661823 */ subu $v1, $v1, $a2
/* 196C14 80268334 00031880 */ sll $v1, $v1, 2
/* 196C18 80268338 15A00002 */ bnez $t5, .L80268344
/* 196C1C 8026833C 006D001A */ div $zero, $v1, $t5
/* 196C20 80268340 0007000D */ break 7
.L80268344:
/* 196C24 80268344 2401FFFF */ addiu $at, $zero, -1
/* 196C28 80268348 15A10004 */ bne $t5, $at, .L8026835C
/* 196C2C 8026834C 3C018000 */ lui $at, 0x8000
/* 196C30 80268350 14610002 */ bne $v1, $at, .L8026835C
/* 196C34 80268354 00000000 */ nop
/* 196C38 80268358 0006000D */ break 6
.L8026835C:
/* 196C3C 8026835C 00001812 */ mflo $v1
/* 196C40 80268360 00031040 */ sll $v0, $v1, 1
/* 196C44 80268364 00431021 */ addu $v0, $v0, $v1
/* 196C48 80268368 000210C0 */ sll $v0, $v0, 3
/* 196C4C 8026836C 00431021 */ addu $v0, $v0, $v1
/* 196C50 80268370 11860005 */ beq $t4, $a2, .L80268388
/* 196C54 80268374 00028080 */ sll $s0, $v0, 2
/* 196C58 80268378 0080902D */ daddu $s2, $a0, $zero
/* 196C5C 8026837C 0245102A */ slt $v0, $s2, $a1
/* 196C60 80268380 1440FFE4 */ bnez $v0, .L80268314
/* 196C64 80268384 26440001 */ addiu $a0, $s2, 1
.L80268388:
/* 196C68 80268388 85620048 */ lh $v0, 0x48($t3)
/* 196C6C 8026838C 3C04802A */ lui $a0, 0x802a
/* 196C70 80268390 8C84FBC0 */ lw $a0, -0x440($a0)
/* 196C74 80268394 95650048 */ lhu $a1, 0x48($t3)
/* 196C78 80268398 0202A823 */ subu $s5, $s0, $v0
/* 196C7C 8026839C 06A10002 */ bgez $s5, .L802683A8
/* 196C80 802683A0 02A0182D */ daddu $v1, $s5, $zero
/* 196C84 802683A4 00031823 */ negu $v1, $v1
.L802683A8:
/* 196C88 802683A8 00041040 */ sll $v0, $a0, 1
/* 196C8C 802683AC 00441021 */ addu $v0, $v0, $a0
/* 196C90 802683B0 000210C0 */ sll $v0, $v0, 3
/* 196C94 802683B4 00441021 */ addu $v0, $v0, $a0
/* 196C98 802683B8 00021080 */ sll $v0, $v0, 2
/* 196C9C 802683BC 0062182A */ slt $v1, $v1, $v0
/* 196CA0 802683C0 5460000D */ bnezl $v1, .L802683F8
/* 196CA4 802683C4 A5700048 */ sh $s0, 0x48($t3)
/* 196CA8 802683C8 14800002 */ bnez $a0, .L802683D4
/* 196CAC 802683CC 02A4001A */ div $zero, $s5, $a0
/* 196CB0 802683D0 0007000D */ break 7
.L802683D4:
/* 196CB4 802683D4 2401FFFF */ addiu $at, $zero, -1
/* 196CB8 802683D8 14810004 */ bne $a0, $at, .L802683EC
/* 196CBC 802683DC 3C018000 */ lui $at, 0x8000
/* 196CC0 802683E0 16A10002 */ bne $s5, $at, .L802683EC
/* 196CC4 802683E4 00000000 */ nop
/* 196CC8 802683E8 0006000D */ break 6
.L802683EC:
/* 196CCC 802683EC 00001012 */ mflo $v0
/* 196CD0 802683F0 00A21021 */ addu $v0, $a1, $v0
/* 196CD4 802683F4 A5620048 */ sh $v0, 0x48($t3)
.L802683F8:
/* 196CD8 802683F8 0000A82D */ daddu $s5, $zero, $zero
/* 196CDC 802683FC 81620080 */ lb $v0, 0x80($t3)
/* 196CE0 80268400 18400060 */ blez $v0, .L80268584
/* 196CE4 80268404 02A0902D */ daddu $s2, $s5, $zero
/* 196CE8 80268408 8FAE006C */ lw $t6, 0x6c($sp)
/* 196CEC 8026840C 000E1400 */ sll $v0, $t6, 0x10
/* 196CF0 80268410 00021403 */ sra $v0, $v0, 0x10
/* 196CF4 80268414 AFA20020 */ sw $v0, 0x20($sp)
/* 196CF8 80268418 25C20005 */ addiu $v0, $t6, 5
/* 196CFC 8026841C 00021400 */ sll $v0, $v0, 0x10
/* 196D00 80268420 00021403 */ sra $v0, $v0, 0x10
/* 196D04 80268424 AFA20024 */ sw $v0, 0x24($sp)
/* 196D08 80268428 265E0001 */ addiu $fp, $s2, 1
.L8026842C:
/* 196D0C 8026842C 001E1040 */ sll $v0, $fp, 1
/* 196D10 80268430 01621021 */ addu $v0, $t3, $v0
/* 196D14 80268434 84460074 */ lh $a2, 0x74($v0)
/* 196D18 80268438 00061900 */ sll $v1, $a2, 4
/* 196D1C 8026843C 00661823 */ subu $v1, $v1, $a2
/* 196D20 80268440 00031880 */ sll $v1, $v1, 2
/* 196D24 80268444 15A00002 */ bnez $t5, .L80268450
/* 196D28 80268448 006D001A */ div $zero, $v1, $t5
/* 196D2C 8026844C 0007000D */ break 7
.L80268450:
/* 196D30 80268450 2401FFFF */ addiu $at, $zero, -1
/* 196D34 80268454 15A10004 */ bne $t5, $at, .L80268468
/* 196D38 80268458 3C018000 */ lui $at, 0x8000
/* 196D3C 8026845C 14610002 */ bne $v1, $at, .L80268468
/* 196D40 80268460 00000000 */ nop
/* 196D44 80268464 0006000D */ break 6
.L80268468:
/* 196D48 80268468 00001812 */ mflo $v1
/* 196D4C 8026846C 8FAE0068 */ lw $t6, 0x68($sp)
/* 196D50 80268470 8FA50020 */ lw $a1, 0x20($sp)
/* 196D54 80268474 8FA70024 */ lw $a3, 0x24($sp)
/* 196D58 80268478 01D53021 */ addu $a2, $t6, $s5
/* 196D5C 8026847C 00062400 */ sll $a0, $a2, 0x10
/* 196D60 80268480 00042403 */ sra $a0, $a0, 0x10
/* 196D64 80268484 00121040 */ sll $v0, $s2, 1
/* 196D68 80268488 0052A021 */ addu $s4, $v0, $s2
/* 196D6C 8026848C 26970001 */ addiu $s7, $s4, 1
/* 196D70 80268490 3C0E8029 */ lui $t6, 0x8029
/* 196D74 80268494 25CE4190 */ addiu $t6, $t6, 0x4190
/* 196D78 80268498 02EE1021 */ addu $v0, $s7, $t6
/* 196D7C 8026849C 26960002 */ addiu $s6, $s4, 2
/* 196D80 802684A0 904A0000 */ lbu $t2, ($v0)
/* 196D84 802684A4 02CE1021 */ addu $v0, $s6, $t6
/* 196D88 802684A8 90490000 */ lbu $t1, ($v0)
/* 196D8C 802684AC 028E1021 */ addu $v0, $s4, $t6
/* 196D90 802684B0 90420000 */ lbu $v0, ($v0)
/* 196D94 802684B4 240E00FF */ addiu $t6, $zero, 0xff
/* 196D98 802684B8 AFAE001C */ sw $t6, 0x1c($sp)
/* 196D9C 802684BC AFAB0030 */ sw $t3, 0x30($sp)
/* 196DA0 802684C0 AFAC0034 */ sw $t4, 0x34($sp)
/* 196DA4 802684C4 AFAD0038 */ sw $t5, 0x38($sp)
/* 196DA8 802684C8 AFA20010 */ sw $v0, 0x10($sp)
/* 196DAC 802684CC AFAA0014 */ sw $t2, 0x14($sp)
/* 196DB0 802684D0 AFA90018 */ sw $t1, 0x18($sp)
/* 196DB4 802684D4 00758023 */ subu $s0, $v1, $s5
/* 196DB8 802684D8 00D08821 */ addu $s1, $a2, $s0
/* 196DBC 802684DC 00111400 */ sll $v0, $s1, 0x10
/* 196DC0 802684E0 00029C03 */ sra $s3, $v0, 0x10
/* 196DC4 802684E4 0C00AAB1 */ jal func_8002AAC4
/* 196DC8 802684E8 0260302D */ daddu $a2, $s3, $zero
/* 196DCC 802684EC 8FAB0030 */ lw $t3, 0x30($sp)
/* 196DD0 802684F0 8FAC0034 */ lw $t4, 0x34($sp)
/* 196DD4 802684F4 81620080 */ lb $v0, 0x80($t3)
/* 196DD8 802684F8 8FAD0038 */ lw $t5, 0x38($sp)
/* 196DDC 802684FC 2442FFFF */ addiu $v0, $v0, -1
/* 196DE0 80268500 0242102A */ slt $v0, $s2, $v0
/* 196DE4 80268504 1040001D */ beqz $v0, .L8026857C
/* 196DE8 80268508 2624FFFF */ addiu $a0, $s1, -1
/* 196DEC 8026850C 00042400 */ sll $a0, $a0, 0x10
/* 196DF0 80268510 00042403 */ sra $a0, $a0, 0x10
/* 196DF4 80268514 0260302D */ daddu $a2, $s3, $zero
/* 196DF8 80268518 3C0E8029 */ lui $t6, 0x8029
/* 196DFC 8026851C 25CE41B0 */ addiu $t6, $t6, 0x41b0
/* 196E00 80268520 02EE1021 */ addu $v0, $s7, $t6
/* 196E04 80268524 904A0000 */ lbu $t2, ($v0)
/* 196E08 80268528 02CE1021 */ addu $v0, $s6, $t6
/* 196E0C 8026852C 90490000 */ lbu $t1, ($v0)
/* 196E10 80268530 028E1021 */ addu $v0, $s4, $t6
/* 196E14 80268534 02B0A821 */ addu $s5, $s5, $s0
/* 196E18 80268538 8FA50020 */ lw $a1, 0x20($sp)
/* 196E1C 8026853C 8FA70024 */ lw $a3, 0x24($sp)
/* 196E20 80268540 90420000 */ lbu $v0, ($v0)
/* 196E24 80268544 240E00FF */ addiu $t6, $zero, 0xff
/* 196E28 80268548 AFAE001C */ sw $t6, 0x1c($sp)
/* 196E2C 8026854C AFA20010 */ sw $v0, 0x10($sp)
/* 196E30 80268550 AFAA0014 */ sw $t2, 0x14($sp)
/* 196E34 80268554 0C00AAB1 */ jal func_8002AAC4
/* 196E38 80268558 AFA90018 */ sw $t1, 0x18($sp)
/* 196E3C 8026855C 03C0902D */ daddu $s2, $fp, $zero
/* 196E40 80268560 8FAB0030 */ lw $t3, 0x30($sp)
/* 196E44 80268564 8FAC0034 */ lw $t4, 0x34($sp)
/* 196E48 80268568 81620080 */ lb $v0, 0x80($t3)
/* 196E4C 8026856C 8FAD0038 */ lw $t5, 0x38($sp)
/* 196E50 80268570 0242102A */ slt $v0, $s2, $v0
/* 196E54 80268574 1440FFAD */ bnez $v0, .L8026842C
/* 196E58 80268578 265E0001 */ addiu $fp, $s2, 1
.L8026857C:
/* 196E5C 8026857C 0000A82D */ daddu $s5, $zero, $zero
/* 196E60 80268580 81620080 */ lb $v0, 0x80($t3)
.L80268584:
/* 196E64 80268584 1840006E */ blez $v0, .L80268740
/* 196E68 80268588 02A0902D */ daddu $s2, $s5, $zero
/* 196E6C 8026858C 8FAE006C */ lw $t6, 0x6c($sp)
/* 196E70 80268590 25C20005 */ addiu $v0, $t6, 5
/* 196E74 80268594 00021400 */ sll $v0, $v0, 0x10
/* 196E78 80268598 AFA20028 */ sw $v0, 0x28($sp)
/* 196E7C 8026859C 241E0002 */ addiu $fp, $zero, 2
/* 196E80 802685A0 03C0B02D */ daddu $s6, $fp, $zero
/* 196E84 802685A4 24140001 */ addiu $s4, $zero, 1
/* 196E88 802685A8 3C178029 */ lui $s7, 0x8029
/* 196E8C 802685AC 26F741A0 */ addiu $s7, $s7, 0x41a0
/* 196E90 802685B0 02E0982D */ daddu $s3, $s7, $zero
.L802685B4:
/* 196E94 802685B4 8FAE0074 */ lw $t6, 0x74($sp)
/* 196E98 802685B8 11C0000B */ beqz $t6, .L802685E8
/* 196E9C 802685BC 02971021 */ addu $v0, $s4, $s7
/* 196EA0 802685C0 19C00003 */ blez $t6, .L802685D0
/* 196EA4 802685C4 240800E0 */ addiu $t0, $zero, 0xe0
/* 196EA8 802685C8 0809A182 */ j .L80268608
/* 196EAC 802685CC 240A003F */ addiu $t2, $zero, 0x3f
.L802685D0:
/* 196EB0 802685D0 3C028007 */ lui $v0, 0x8007
/* 196EB4 802685D4 8C42419C */ lw $v0, 0x419c($v0)
/* 196EB8 802685D8 94420134 */ lhu $v0, 0x134($v0)
/* 196EBC 802685DC 30420001 */ andi $v0, $v0, 1
/* 196EC0 802685E0 10400007 */ beqz $v0, .L80268600
/* 196EC4 802685E4 02971021 */ addu $v0, $s4, $s7
.L802685E8:
/* 196EC8 802685E8 904A0000 */ lbu $t2, ($v0)
/* 196ECC 802685EC 02D71021 */ addu $v0, $s6, $s7
/* 196ED0 802685F0 92680000 */ lbu $t0, ($s3)
/* 196ED4 802685F4 90490000 */ lbu $t1, ($v0)
/* 196ED8 802685F8 0809A184 */ j .L80268610
/* 196EDC 802685FC 017E1021 */ addu $v0, $t3, $fp
.L80268600:
/* 196EE0 80268600 240800FA */ addiu $t0, $zero, 0xfa
/* 196EE4 80268604 240A00AF */ addiu $t2, $zero, 0xaf
.L80268608:
/* 196EE8 80268608 0000482D */ daddu $t1, $zero, $zero
/* 196EEC 8026860C 017E1021 */ addu $v0, $t3, $fp
.L80268610:
/* 196EF0 80268610 84460074 */ lh $a2, 0x74($v0)
/* 196EF4 80268614 0186102A */ slt $v0, $t4, $a2
/* 196EF8 80268618 54400001 */ bnezl $v0, .L80268620
/* 196EFC 8026861C 0180302D */ daddu $a2, $t4, $zero
.L80268620:
/* 196F00 80268620 00062100 */ sll $a0, $a2, 4
/* 196F04 80268624 00862023 */ subu $a0, $a0, $a2
/* 196F08 80268628 00042080 */ sll $a0, $a0, 2
/* 196F0C 8026862C 15A00002 */ bnez $t5, .L80268638
/* 196F10 80268630 008D001A */ div $zero, $a0, $t5
/* 196F14 80268634 0007000D */ break 7
.L80268638:
/* 196F18 80268638 2401FFFF */ addiu $at, $zero, -1
/* 196F1C 8026863C 15A10004 */ bne $t5, $at, .L80268650
/* 196F20 80268640 3C018000 */ lui $at, 0x8000
/* 196F24 80268644 14810002 */ bne $a0, $at, .L80268650
/* 196F28 80268648 00000000 */ nop
/* 196F2C 8026864C 0006000D */ break 6
.L80268650:
/* 196F30 80268650 00002012 */ mflo $a0
/* 196F34 80268654 3C0551EB */ lui $a1, 0x51eb
/* 196F38 80268658 95630048 */ lhu $v1, 0x48($t3)
/* 196F3C 8026865C 34A5851F */ ori $a1, $a1, 0x851f
/* 196F40 80268660 00031C00 */ sll $v1, $v1, 0x10
/* 196F44 80268664 00031403 */ sra $v0, $v1, 0x10
/* 196F48 80268668 00450018 */ mult $v0, $a1
/* 196F4C 8026866C 00031FC3 */ sra $v1, $v1, 0x1f
/* 196F50 80268670 00001010 */ mfhi $v0
/* 196F54 80268674 00021143 */ sra $v0, $v0, 5
/* 196F58 80268678 00431023 */ subu $v0, $v0, $v1
/* 196F5C 8026867C 00021400 */ sll $v0, $v0, 0x10
/* 196F60 80268680 00021403 */ sra $v0, $v0, 0x10
/* 196F64 80268684 00558023 */ subu $s0, $v0, $s5
/* 196F68 80268688 0600002D */ bltz $s0, .L80268740
/* 196F6C 8026868C 00958823 */ subu $s1, $a0, $s5
/* 196F70 80268690 52200007 */ beql $s1, $zero, .L802686B0
/* 196F74 80268694 0200882D */ daddu $s1, $s0, $zero
/* 196F78 80268698 14CC0003 */ bne $a2, $t4, .L802686A8
/* 196F7C 8026869C 0230102A */ slt $v0, $s1, $s0
/* 196F80 802686A0 0809A1AC */ j .L802686B0
/* 196F84 802686A4 0200882D */ daddu $s1, $s0, $zero
.L802686A8:
/* 196F88 802686A8 54400001 */ bnezl $v0, .L802686B0
/* 196F8C 802686AC 0220802D */ daddu $s0, $s1, $zero
.L802686B0:
/* 196F90 802686B0 8FAE0068 */ lw $t6, 0x68($sp)
/* 196F94 802686B4 240200FF */ addiu $v0, $zero, 0xff
/* 196F98 802686B8 AFA80010 */ sw $t0, 0x10($sp)
/* 196F9C 802686BC AFAA0014 */ sw $t2, 0x14($sp)
/* 196FA0 802686C0 AFA90018 */ sw $t1, 0x18($sp)
/* 196FA4 802686C4 AFA2001C */ sw $v0, 0x1c($sp)
/* 196FA8 802686C8 AFAB0030 */ sw $t3, 0x30($sp)
/* 196FAC 802686CC AFAC0034 */ sw $t4, 0x34($sp)
/* 196FB0 802686D0 AFAD0038 */ sw $t5, 0x38($sp)
/* 196FB4 802686D4 01D53021 */ addu $a2, $t6, $s5
/* 196FB8 802686D8 00062400 */ sll $a0, $a2, 0x10
/* 196FBC 802686DC 00042403 */ sra $a0, $a0, 0x10
/* 196FC0 802686E0 00D03021 */ addu $a2, $a2, $s0
/* 196FC4 802686E4 00063400 */ sll $a2, $a2, 0x10
/* 196FC8 802686E8 8FAE006C */ lw $t6, 0x6c($sp)
/* 196FCC 802686EC 00063403 */ sra $a2, $a2, 0x10
/* 196FD0 802686F0 000E2C00 */ sll $a1, $t6, 0x10
/* 196FD4 802686F4 8FAE0028 */ lw $t6, 0x28($sp)
/* 196FD8 802686F8 00052C03 */ sra $a1, $a1, 0x10
/* 196FDC 802686FC 0C00AAB1 */ jal func_8002AAC4
/* 196FE0 80268700 000E3C03 */ sra $a3, $t6, 0x10
/* 196FE4 80268704 8FAB0030 */ lw $t3, 0x30($sp)
/* 196FE8 80268708 8FAC0034 */ lw $t4, 0x34($sp)
/* 196FEC 8026870C 81630080 */ lb $v1, 0x80($t3)
/* 196FF0 80268710 8FAD0038 */ lw $t5, 0x38($sp)
/* 196FF4 80268714 2462FFFF */ addiu $v0, $v1, -1
/* 196FF8 80268718 0242102A */ slt $v0, $s2, $v0
/* 196FFC 8026871C 10400008 */ beqz $v0, .L80268740
/* 197000 80268720 02B1A821 */ addu $s5, $s5, $s1
/* 197004 80268724 27DE0002 */ addiu $fp, $fp, 2
/* 197008 80268728 26D60003 */ addiu $s6, $s6, 3
/* 19700C 8026872C 26940003 */ addiu $s4, $s4, 3
/* 197010 80268730 26520001 */ addiu $s2, $s2, 1
/* 197014 80268734 0243102A */ slt $v0, $s2, $v1
/* 197018 80268738 1440FF9E */ bnez $v0, .L802685B4
/* 19701C 8026873C 26730003 */ addiu $s3, $s3, 3
.L80268740:
/* 197020 80268740 8FBF0064 */ lw $ra, 0x64($sp)
/* 197024 80268744 8FBE0060 */ lw $fp, 0x60($sp)
/* 197028 80268748 8FB7005C */ lw $s7, 0x5c($sp)
/* 19702C 8026874C 8FB60058 */ lw $s6, 0x58($sp)
/* 197030 80268750 8FB50054 */ lw $s5, 0x54($sp)
/* 197034 80268754 8FB40050 */ lw $s4, 0x50($sp)
/* 197038 80268758 8FB3004C */ lw $s3, 0x4c($sp)
/* 19703C 8026875C 8FB20048 */ lw $s2, 0x48($sp)
/* 197040 80268760 8FB10044 */ lw $s1, 0x44($sp)
/* 197044 80268764 8FB00040 */ lw $s0, 0x40($sp)
/* 197048 80268768 03E00008 */ jr $ra
/* 19704C 8026876C 27BD0068 */ addiu $sp, $sp, 0x68
/* 197050 80268770 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197054 80268774 24020002 */ addiu $v0, $zero, 2
/* 197058 80268778 AFBF0010 */ sw $ra, 0x10($sp)
/* 19705C 8026877C 3C01802A */ lui $at, 0x802a
/* 197060 80268780 AC22FBC0 */ sw $v0, -0x440($at)
/* 197064 80268784 0C09A0A1 */ jal func_80268284
/* 197068 80268788 0000382D */ daddu $a3, $zero, $zero
/* 19706C 8026878C 8FBF0010 */ lw $ra, 0x10($sp)
/* 197070 80268790 03E00008 */ jr $ra
/* 197074 80268794 27BD0018 */ addiu $sp, $sp, 0x18
/* 197078 80268798 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 19707C 8026879C 3C01802A */ lui $at, 0x802a
/* 197080 802687A0 AC27FBC0 */ sw $a3, -0x440($at)
/* 197084 802687A4 AFBF0010 */ sw $ra, 0x10($sp)
/* 197088 802687A8 0C09A0A1 */ jal func_80268284
/* 19708C 802687AC 0000382D */ daddu $a3, $zero, $zero
/* 197090 802687B0 8FBF0010 */ lw $ra, 0x10($sp)
/* 197094 802687B4 03E00008 */ jr $ra
/* 197098 802687B8 27BD0018 */ addiu $sp, $sp, 0x18
/* 19709C 802687BC 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1970A0 802687C0 24020002 */ addiu $v0, $zero, 2
/* 1970A4 802687C4 AFBF0010 */ sw $ra, 0x10($sp)
/* 1970A8 802687C8 3C01802A */ lui $at, 0x802a
/* 1970AC 802687CC AC22FBC0 */ sw $v0, -0x440($at)
/* 1970B0 802687D0 0C09A0A1 */ jal func_80268284
/* 1970B4 802687D4 00000000 */ nop
/* 1970B8 802687D8 8FBF0010 */ lw $ra, 0x10($sp)
/* 1970BC 802687DC 03E00008 */ jr $ra
/* 1970C0 802687E0 27BD0018 */ addiu $sp, $sp, 0x18
/* 1970C4 802687E4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1970C8 802687E8 3C01802A */ lui $at, 0x802a
/* 1970CC 802687EC AC27FBC0 */ sw $a3, -0x440($at)
/* 1970D0 802687F0 8FA70028 */ lw $a3, 0x28($sp)
/* 1970D4 802687F4 AFBF0010 */ sw $ra, 0x10($sp)
/* 1970D8 802687F8 0C09A0A1 */ jal func_80268284
/* 1970DC 802687FC 00000000 */ nop
/* 1970E0 80268800 8FBF0010 */ lw $ra, 0x10($sp)
/* 1970E4 80268804 03E00008 */ jr $ra
/* 1970E8 80268808 27BD0018 */ addiu $sp, $sp, 0x18
/* 1970EC 8026880C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1970F0 80268810 24020002 */ addiu $v0, $zero, 2
/* 1970F4 80268814 AFBF0010 */ sw $ra, 0x10($sp)
/* 1970F8 80268818 3C01802A */ lui $at, 0x802a
/* 1970FC 8026881C AC22FBC0 */ sw $v0, -0x440($at)
/* 197100 80268820 0C09A0A1 */ jal func_80268284
/* 197104 80268824 2407FFFF */ addiu $a3, $zero, -1
/* 197108 80268828 8FBF0010 */ lw $ra, 0x10($sp)
/* 19710C 8026882C 03E00008 */ jr $ra
/* 197110 80268830 27BD0018 */ addiu $sp, $sp, 0x18
/* 197114 80268834 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197118 80268838 3C01802A */ lui $at, 0x802a
/* 19711C 8026883C AC27FBC0 */ sw $a3, -0x440($at)
/* 197120 80268840 AFBF0010 */ sw $ra, 0x10($sp)
/* 197124 80268844 0C09A0A1 */ jal func_80268284
/* 197128 80268848 2407FFFF */ addiu $a3, $zero, -1
/* 19712C 8026884C 8FBF0010 */ lw $ra, 0x10($sp)
/* 197130 80268850 03E00008 */ jr $ra
/* 197134 80268854 27BD0018 */ addiu $sp, $sp, 0x18
/* 197138 80268858 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 19713C 8026885C AFB00010 */ sw $s0, 0x10($sp)
/* 197140 80268860 3C10802A */ lui $s0, 0x802a
/* 197144 80268864 2610FBE0 */ addiu $s0, $s0, -0x420
/* 197148 80268868 AFB20018 */ sw $s2, 0x18($sp)
/* 19714C 8026886C 3C12800E */ lui $s2, 0x800e
/* 197150 80268870 2652C070 */ addiu $s2, $s2, -0x3f90
/* 197154 80268874 AFBF001C */ sw $ra, 0x1c($sp)
/* 197158 80268878 AFB10014 */ sw $s1, 0x14($sp)
/* 19715C 8026887C A200005E */ sb $zero, 0x5e($s0)
/* 197160 80268880 A600006A */ sh $zero, 0x6a($s0)
/* 197164 80268884 8E420000 */ lw $v0, ($s2)
/* 197168 80268888 3C110008 */ lui $s1, 8
/* 19716C 8026888C 00511024 */ and $v0, $v0, $s1
/* 197170 80268890 14400015 */ bnez $v0, .L802688E8
/* 197174 80268894 00000000 */ nop
/* 197178 80268898 0C03A752 */ jal is_ability_active
/* 19717C 8026889C 24040016 */ addiu $a0, $zero, 0x16
/* 197180 802688A0 10400002 */ beqz $v0, .L802688AC
/* 197184 802688A4 24020001 */ addiu $v0, $zero, 1
/* 197188 802688A8 A202005E */ sb $v0, 0x5e($s0)
.L802688AC:
/* 19718C 802688AC 8E420000 */ lw $v0, ($s2)
/* 197190 802688B0 00511024 */ and $v0, $v0, $s1
/* 197194 802688B4 1440000C */ bnez $v0, .L802688E8
/* 197198 802688B8 00000000 */ nop
/* 19719C 802688BC 0C03A752 */ jal is_ability_active
/* 1971A0 802688C0 24040015 */ addiu $a0, $zero, 0x15
/* 1971A4 802688C4 10400008 */ beqz $v0, .L802688E8
/* 1971A8 802688C8 24040064 */ addiu $a0, $zero, 0x64
/* 1971AC 802688CC 24110001 */ addiu $s1, $zero, 1
/* 1971B0 802688D0 A2000061 */ sb $zero, 0x61($s0)
/* 1971B4 802688D4 0C00A67F */ jal rand_int
/* 1971B8 802688D8 A611006A */ sh $s1, 0x6a($s0)
/* 1971BC 802688DC 28420019 */ slti $v0, $v0, 0x19
/* 1971C0 802688E0 54400001 */ bnezl $v0, .L802688E8
/* 1971C4 802688E4 A211005E */ sb $s1, 0x5e($s0)
.L802688E8:
/* 1971C8 802688E8 3C028007 */ lui $v0, 0x8007
/* 1971CC 802688EC 8C42419C */ lw $v0, 0x419c($v0)
/* 1971D0 802688F0 904200AA */ lbu $v0, 0xaa($v0)
/* 1971D4 802688F4 30420001 */ andi $v0, $v0, 1
/* 1971D8 802688F8 10400002 */ beqz $v0, .L80268904
/* 1971DC 802688FC 24020001 */ addiu $v0, $zero, 1
/* 1971E0 80268900 A202005E */ sb $v0, 0x5e($s0)
.L80268904:
/* 1971E4 80268904 3C02800E */ lui $v0, 0x800e
/* 1971E8 80268908 8C42C070 */ lw $v0, -0x3f90($v0)
/* 1971EC 8026890C 30421000 */ andi $v0, $v0, 0x1000
/* 1971F0 80268910 10400003 */ beqz $v0, .L80268920
/* 1971F4 80268914 24020001 */ addiu $v0, $zero, 1
/* 1971F8 80268918 A202005E */ sb $v0, 0x5e($s0)
/* 1971FC 8026891C A2000061 */ sb $zero, 0x61($s0)
.L80268920:
/* 197200 80268920 8FBF001C */ lw $ra, 0x1c($sp)
/* 197204 80268924 8FB20018 */ lw $s2, 0x18($sp)
/* 197208 80268928 8FB10014 */ lw $s1, 0x14($sp)
/* 19720C 8026892C 8FB00010 */ lw $s0, 0x10($sp)
/* 197210 80268930 03E00008 */ jr $ra
/* 197214 80268934 27BD0020 */ addiu $sp, $sp, 0x20
/* 197218 80268938 3C02800E */ lui $v0, 0x800e
/* 19721C 8026893C 8C42C070 */ lw $v0, -0x3f90($v0)
/* 197220 80268940 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197224 80268944 30428000 */ andi $v0, $v0, 0x8000
/* 197228 80268948 10400003 */ beqz $v0, .L80268958
/* 19722C 8026894C AFBF0010 */ sw $ra, 0x10($sp)
/* 197230 80268950 0C09A327 */ jal func_80268C9C
/* 197234 80268954 00000000 */ nop
.L80268958:
/* 197238 80268958 3C02802A */ lui $v0, 0x802a
/* 19723C 8026895C 2442FBE0 */ addiu $v0, $v0, -0x420
/* 197240 80268960 8443004A */ lh $v1, 0x4a($v0)
/* 197244 80268964 2C620018 */ sltiu $v0, $v1, 0x18
/* 197248 80268968 10400060 */ beqz $v0, .L80268AEC
/* 19724C 8026896C 00031080 */ sll $v0, $v1, 2
/* 197250 80268970 3C01802A */ lui $at, 0x802a
/* 197254 80268974 00220821 */ addu $at, $at, $v0
/* 197258 80268978 8C22D6A0 */ lw $v0, -0x2960($at)
/* 19725C 8026897C 00400008 */ jr $v0
/* 197260 80268980 00000000 */ nop
/* 197264 80268984 0C0AA48D */ jal func_802A9234
/* 197268 80268988 00000000 */ nop
/* 19726C 8026898C 0809A2BB */ j .L80268AEC
/* 197270 80268990 00000000 */ nop
/* 197274 80268994 0C0AA4DB */ jal func_802A936C
/* 197278 80268998 00000000 */ nop
/* 19727C 8026899C 0809A2BB */ j .L80268AEC
/* 197280 802689A0 00000000 */ nop
/* 197284 802689A4 0C0AA4DE */ jal func_802A9378
/* 197288 802689A8 00000000 */ nop
/* 19728C 802689AC 0809A2BB */ j .L80268AEC
/* 197290 802689B0 00000000 */ nop
/* 197294 802689B4 0C0AA4B7 */ jal func_802A92DC
/* 197298 802689B8 00000000 */ nop
/* 19729C 802689BC 0809A2BB */ j .L80268AEC
/* 1972A0 802689C0 00000000 */ nop
/* 1972A4 802689C4 0C0AA4BC */ jal func_802A92F0
/* 1972A8 802689C8 00000000 */ nop
/* 1972AC 802689CC 0809A2BB */ j .L80268AEC
/* 1972B0 802689D0 00000000 */ nop
/* 1972B4 802689D4 0C0AA47E */ jal func_802A91F8
/* 1972B8 802689D8 00000000 */ nop
/* 1972BC 802689DC 0809A2BB */ j .L80268AEC
/* 1972C0 802689E0 00000000 */ nop
/* 1972C4 802689E4 0C0AA48A */ jal func_802A9228
/* 1972C8 802689E8 00000000 */ nop
/* 1972CC 802689EC 0809A2BB */ j .L80268AEC
/* 1972D0 802689F0 00000000 */ nop
/* 1972D4 802689F4 0C0AA4A3 */ jal func_802A928C
/* 1972D8 802689F8 00000000 */ nop
/* 1972DC 802689FC 0809A2BB */ j .L80268AEC
/* 1972E0 80268A00 00000000 */ nop
/* 1972E4 80268A04 0C0AA4A5 */ jal func_802A9294
/* 1972E8 80268A08 00000000 */ nop
/* 1972EC 80268A0C 0809A2BB */ j .L80268AEC
/* 1972F0 80268A10 00000000 */ nop
/* 1972F4 80268A14 0C0AA4A3 */ jal func_802A928C
/* 1972F8 80268A18 00000000 */ nop
/* 1972FC 80268A1C 0809A2BB */ j .L80268AEC
/* 197300 80268A20 00000000 */ nop
/* 197304 80268A24 0C0AA4A3 */ jal func_802A928C
/* 197308 80268A28 00000000 */ nop
/* 19730C 80268A2C 0809A2BB */ j .L80268AEC
/* 197310 80268A30 00000000 */ nop
/* 197314 80268A34 0C0AA4B5 */ jal func_802A92D4
/* 197318 80268A38 00000000 */ nop
/* 19731C 80268A3C 0809A2BB */ j .L80268AEC
/* 197320 80268A40 00000000 */ nop
/* 197324 80268A44 0C0AA49E */ jal func_802A9278
/* 197328 80268A48 00000000 */ nop
/* 19732C 80268A4C 0809A2BB */ j .L80268AEC
/* 197330 80268A50 00000000 */ nop
/* 197334 80268A54 0C0AA4A5 */ jal func_802A9294
/* 197338 80268A58 00000000 */ nop
/* 19733C 80268A5C 0809A2BB */ j .L80268AEC
/* 197340 80268A60 00000000 */ nop
/* 197344 80268A64 0C0AA482 */ jal func_802A9208
/* 197348 80268A68 00000000 */ nop
/* 19734C 80268A6C 0809A2BB */ j .L80268AEC
/* 197350 80268A70 00000000 */ nop
/* 197354 80268A74 0C0AA4C4 */ jal func_802A9310
/* 197358 80268A78 00000000 */ nop
/* 19735C 80268A7C 0809A2BB */ j .L80268AEC
/* 197360 80268A80 00000000 */ nop
/* 197364 80268A84 0C0AA4A8 */ jal func_802A92A0
/* 197368 80268A88 00000000 */ nop
/* 19736C 80268A8C 0809A2BB */ j .L80268AEC
/* 197370 80268A90 00000000 */ nop
/* 197374 80268A94 0C0AA4A6 */ jal func_802A9298
/* 197378 80268A98 00000000 */ nop
/* 19737C 80268A9C 0809A2BB */ j .L80268AEC
/* 197380 80268AA0 00000000 */ nop
/* 197384 80268AA4 0C0AA495 */ jal func_802A9254
/* 197388 80268AA8 00000000 */ nop
/* 19738C 80268AAC 0809A2BB */ j .L80268AEC
/* 197390 80268AB0 00000000 */ nop
/* 197394 80268AB4 0C0AA4A8 */ jal func_802A92A0
/* 197398 80268AB8 00000000 */ nop
/* 19739C 80268ABC 0809A2BB */ j .L80268AEC
/* 1973A0 80268AC0 00000000 */ nop
/* 1973A4 80268AC4 0C0AA4A6 */ jal func_802A9298
/* 1973A8 80268AC8 00000000 */ nop
/* 1973AC 80268ACC 0809A2BB */ j .L80268AEC
/* 1973B0 80268AD0 00000000 */ nop
/* 1973B4 80268AD4 0C0AA523 */ jal func_802A948C
/* 1973B8 80268AD8 00000000 */ nop
/* 1973BC 80268ADC 0809A2BB */ j .L80268AEC
/* 1973C0 80268AE0 00000000 */ nop
/* 1973C4 80268AE4 0C0AA48A */ jal func_802A9228
/* 1973C8 80268AE8 00000000 */ nop
.L80268AEC:
/* 1973CC 80268AEC 8FBF0010 */ lw $ra, 0x10($sp)
/* 1973D0 80268AF0 03E00008 */ jr $ra
/* 1973D4 80268AF4 27BD0018 */ addiu $sp, $sp, 0x18
/* 1973D8 80268AF8 3C03802A */ lui $v1, 0x802a
/* 1973DC 80268AFC 8463FC2A */ lh $v1, -0x3d6($v1)
/* 1973E0 80268B00 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1973E4 80268B04 2C620018 */ sltiu $v0, $v1, 0x18
/* 1973E8 80268B08 10400061 */ beqz $v0, .L80268C90
/* 1973EC 80268B0C AFBF0010 */ sw $ra, 0x10($sp)
/* 1973F0 80268B10 00031080 */ sll $v0, $v1, 2
/* 1973F4 80268B14 3C01802A */ lui $at, 0x802a
/* 1973F8 80268B18 00220821 */ addu $at, $at, $v0
/* 1973FC 80268B1C 8C22D700 */ lw $v0, -0x2900($at)
/* 197400 80268B20 00400008 */ jr $v0
/* 197404 80268B24 00000000 */ nop
/* 197408 80268B28 0C0AA551 */ jal func_802A9544
/* 19740C 80268B2C 00000000 */ nop
/* 197410 80268B30 0809A324 */ j .L80268C90
/* 197414 80268B34 00000000 */ nop
/* 197418 80268B38 0C0AA675 */ jal func_802A99D4
/* 19741C 80268B3C 00000000 */ nop
/* 197420 80268B40 0809A324 */ j .L80268C90
/* 197424 80268B44 00000000 */ nop
/* 197428 80268B48 0C0AA5BD */ jal func_802A96F4
/* 19742C 80268B4C 00000000 */ nop
/* 197430 80268B50 0809A324 */ j .L80268C90
/* 197434 80268B54 00000000 */ nop
/* 197438 80268B58 0C0AA5AE */ jal func_802A96B8
/* 19743C 80268B5C 00000000 */ nop
/* 197440 80268B60 0809A324 */ j .L80268C90
/* 197444 80268B64 00000000 */ nop
/* 197448 80268B68 0C0AA5D1 */ jal func_802A9744
/* 19744C 80268B6C 00000000 */ nop
/* 197450 80268B70 0809A324 */ j .L80268C90
/* 197454 80268B74 00000000 */ nop
/* 197458 80268B78 0C0AA529 */ jal func_802A94A4
/* 19745C 80268B7C 00000000 */ nop
/* 197460 80268B80 0809A324 */ j .L80268C90
/* 197464 80268B84 00000000 */ nop
/* 197468 80268B88 0C0AA536 */ jal func_802A94D8
/* 19746C 80268B8C 00000000 */ nop
/* 197470 80268B90 0809A324 */ j .L80268C90
/* 197474 80268B94 00000000 */ nop
/* 197478 80268B98 0C0AA5B7 */ jal func_802A96DC
/* 19747C 80268B9C 00000000 */ nop
/* 197480 80268BA0 0809A324 */ j .L80268C90
/* 197484 80268BA4 00000000 */ nop
/* 197488 80268BA8 0C0AA60D */ jal func_802A9834
/* 19748C 80268BAC 00000000 */ nop
/* 197490 80268BB0 0809A324 */ j .L80268C90
/* 197494 80268BB4 00000000 */ nop
/* 197498 80268BB8 0C0AA557 */ jal func_802A955C
/* 19749C 80268BBC 00000000 */ nop
/* 1974A0 80268BC0 0809A324 */ j .L80268C90
/* 1974A4 80268BC4 00000000 */ nop
/* 1974A8 80268BC8 0C0AA5BB */ jal func_802A96EC
/* 1974AC 80268BCC 00000000 */ nop
/* 1974B0 80268BD0 0809A324 */ j .L80268C90
/* 1974B4 80268BD4 00000000 */ nop
/* 1974B8 80268BD8 0C0AA599 */ jal func_802A9664
/* 1974BC 80268BDC 00000000 */ nop
/* 1974C0 80268BE0 0809A324 */ j .L80268C90
/* 1974C4 80268BE4 00000000 */ nop
/* 1974C8 80268BE8 0C0AA5BB */ jal func_802A96EC
/* 1974CC 80268BEC 00000000 */ nop
/* 1974D0 80268BF0 0809A324 */ j .L80268C90
/* 1974D4 80268BF4 00000000 */ nop
/* 1974D8 80268BF8 0C0AA613 */ jal func_802A984C
/* 1974DC 80268BFC 00000000 */ nop
/* 1974E0 80268C00 0809A324 */ j .L80268C90
/* 1974E4 80268C04 00000000 */ nop
/* 1974E8 80268C08 0C0AA58D */ jal func_802A9634
/* 1974EC 80268C0C 00000000 */ nop
/* 1974F0 80268C10 0809A324 */ j .L80268C90
/* 1974F4 80268C14 00000000 */ nop
/* 1974F8 80268C18 0C0AA634 */ jal func_802A98D0
/* 1974FC 80268C1C 00000000 */ nop
/* 197500 80268C20 0809A324 */ j .L80268C90
/* 197504 80268C24 00000000 */ nop
/* 197508 80268C28 0C0AA5FE */ jal func_802A97F8
/* 19750C 80268C2C 00000000 */ nop
/* 197510 80268C30 0809A324 */ j .L80268C90
/* 197514 80268C34 00000000 */ nop
/* 197518 80268C38 0C0AA62C */ jal func_802A98B0
/* 19751C 80268C3C 00000000 */ nop
/* 197520 80268C40 0809A324 */ j .L80268C90
/* 197524 80268C44 00000000 */ nop
/* 197528 80268C48 0C0AA5CF */ jal func_802A973C
/* 19752C 80268C4C 00000000 */ nop
/* 197530 80268C50 0809A324 */ j .L80268C90
/* 197534 80268C54 00000000 */ nop
/* 197538 80268C58 0C0AA5EB */ jal func_802A97AC
/* 19753C 80268C5C 00000000 */ nop
/* 197540 80268C60 0809A324 */ j .L80268C90
/* 197544 80268C64 00000000 */ nop
/* 197548 80268C68 0C0AA5FF */ jal func_802A97FC
/* 19754C 80268C6C 00000000 */ nop
/* 197550 80268C70 0809A324 */ j .L80268C90
/* 197554 80268C74 00000000 */ nop
/* 197558 80268C78 0C0AA805 */ jal func_802AA014
/* 19755C 80268C7C 00000000 */ nop
/* 197560 80268C80 0809A324 */ j .L80268C90
/* 197564 80268C84 00000000 */ nop
/* 197568 80268C88 0C0AA5C6 */ jal func_802A9718
/* 19756C 80268C8C 00000000 */ nop
.L80268C90:
.L80268C90:
/* 197570 80268C90 8FBF0010 */ lw $ra, 0x10($sp)
/* 197574 80268C94 03E00008 */ jr $ra
/* 197578 80268C98 27BD0018 */ addiu $sp, $sp, 0x18