.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_8002C054 /* 007454 8002C054 3C026666 */ lui $v0, 0x6666 /* 007458 8002C058 34426667 */ ori $v0, $v0, 0x6667 /* 00745C 8002C05C 00C20018 */ mult $a2, $v0 /* 007460 8002C060 0080382D */ daddu $a3, $a0, $zero /* 007464 8002C064 000617C3 */ sra $v0, $a2, 0x1f /* 007468 8002C068 3C048007 */ lui $a0, 0x8007 /* 00746C 8002C06C 24847290 */ addiu $a0, $a0, 0x7290 /* 007470 8002C070 00007010 */ mfhi $t6 /* 007474 8002C074 000E1843 */ sra $v1, $t6, 1 /* 007478 8002C078 00621823 */ subu $v1, $v1, $v0 /* 00747C 8002C07C 000310C0 */ sll $v0, $v1, 3 /* 007480 8002C080 00431023 */ subu $v0, $v0, $v1 /* 007484 8002C084 00021080 */ sll $v0, $v0, 2 /* 007488 8002C088 00445021 */ addu $t2, $v0, $a0 /* 00748C 8002C08C 00031080 */ sll $v0, $v1, 2 /* 007490 8002C090 00431021 */ addu $v0, $v0, $v1 /* 007494 8002C094 00C23023 */ subu $a2, $a2, $v0 /* 007498 8002C098 00061040 */ sll $v0, $a2, 1 /* 00749C 8002C09C 00461021 */ addu $v0, $v0, $a2 /* 0074A0 8002C0A0 00026040 */ sll $t4, $v0, 1 /* 0074A4 8002C0A4 3C04800A */ lui $a0, 0x800a /* 0074A8 8002C0A8 2484BB30 */ addiu $a0, $a0, -0x44d0 /* 0074AC 8002C0AC 948309D0 */ lhu $v1, 0x9d0($a0) /* 0074B0 8002C0B0 24020140 */ addiu $v0, $zero, 0x140 /* 0074B4 8002C0B4 14620024 */ bne $v1, $v0, .L8002C148 /* 0074B8 8002C0B8 24020280 */ addiu $v0, $zero, 0x280 /* 0074BC 8002C0BC 0060102D */ daddu $v0, $v1, $zero /* 0074C0 8002C0C0 00450018 */ mult $v0, $a1 /* 0074C4 8002C0C4 0000482D */ daddu $t1, $zero, $zero /* 0074C8 8002C0C8 3C0D8000 */ lui $t5, 0x8000 /* 0074CC 8002C0CC 0080582D */ daddu $t3, $a0, $zero /* 0074D0 8002C0D0 8D6209CC */ lw $v0, 0x9cc($t3) /* 0074D4 8002C0D4 00007012 */ mflo $t6 /* 0074D8 8002C0D8 000E1840 */ sll $v1, $t6, 1 /* 0074DC 8002C0DC 00431021 */ addu $v0, $v0, $v1 /* 0074E0 8002C0E0 00071840 */ sll $v1, $a3, 1 /* 0074E4 8002C0E4 00432821 */ addu $a1, $v0, $v1 /* 0074E8 8002C0E8 018D2006 */ srlv $a0, $t5, $t4 .L8002C0EC: /* 0074EC 8002C0EC 8D480000 */ lw $t0, ($t2) /* 0074F0 8002C0F0 254A0004 */ addiu $t2, $t2, 4 /* 0074F4 8002C0F4 24060005 */ addiu $a2, $zero, 5 .L8002C0F8: /* 0074F8 8002C0F8 00A0382D */ daddu $a3, $a1, $zero /* 0074FC 8002C0FC 24A50002 */ addiu $a1, $a1, 2 /* 007500 8002C100 00881024 */ and $v0, $a0, $t0 /* 007504 8002C104 10400002 */ beqz $v0, .L8002C110 /* 007508 8002C108 24030001 */ addiu $v1, $zero, 1 /* 00750C 8002C10C 3403FFFF */ ori $v1, $zero, 0xffff .L8002C110: /* 007510 8002C110 A4E30000 */ sh $v1, ($a3) /* 007514 8002C114 24C6FFFF */ addiu $a2, $a2, -1 /* 007518 8002C118 04C1FFF7 */ bgez $a2, .L8002C0F8 /* 00751C 8002C11C 00042042 */ srl $a0, $a0, 1 /* 007520 8002C120 956209D0 */ lhu $v0, 0x9d0($t3) /* 007524 8002C124 25290001 */ addiu $t1, $t1, 1 /* 007528 8002C128 00021040 */ sll $v0, $v0, 1 /* 00752C 8002C12C 2442FFF4 */ addiu $v0, $v0, -0xc /* 007530 8002C130 00A22821 */ addu $a1, $a1, $v0 /* 007534 8002C134 29220007 */ slti $v0, $t1, 7 /* 007538 8002C138 1440FFEC */ bnez $v0, .L8002C0EC /* 00753C 8002C13C 018D2006 */ srlv $a0, $t5, $t4 .L8002C140: /* 007540 8002C140 03E00008 */ jr $ra /* 007544 8002C144 00000000 */ nop .L8002C148: /* 007548 8002C148 1462FFFD */ bne $v1, $v0, .L8002C140 /* 00754C 8002C14C 0000482D */ daddu $t1, $zero, $zero /* 007550 8002C150 3C0B8000 */ lui $t3, 0x8000 /* 007554 8002C154 00051080 */ sll $v0, $a1, 2 /* 007558 8002C158 00451021 */ addu $v0, $v0, $a1 /* 00755C 8002C15C 8C8309CC */ lw $v1, 0x9cc($a0) /* 007560 8002C160 00021240 */ sll $v0, $v0, 9 /* 007564 8002C164 00621821 */ addu $v1, $v1, $v0 /* 007568 8002C168 00071080 */ sll $v0, $a3, 2 /* 00756C 8002C16C 00621821 */ addu $v1, $v1, $v0 .L8002C170: /* 007570 8002C170 018B3806 */ srlv $a3, $t3, $t4 /* 007574 8002C174 8D480000 */ lw $t0, ($t2) /* 007578 8002C178 254A0004 */ addiu $t2, $t2, 4 /* 00757C 8002C17C 0000302D */ daddu $a2, $zero, $zero /* 007580 8002C180 24650502 */ addiu $a1, $v1, 0x502 .L8002C184: /* 007584 8002C184 00E81024 */ and $v0, $a3, $t0 /* 007588 8002C188 10400002 */ beqz $v0, .L8002C194 /* 00758C 8002C18C 24040001 */ addiu $a0, $zero, 1 /* 007590 8002C190 3404FFFF */ ori $a0, $zero, 0xffff .L8002C194: /* 007594 8002C194 A4640000 */ sh $a0, ($v1) /* 007598 8002C198 A4A4FB00 */ sh $a0, -0x500($a1) /* 00759C 8002C19C A4A4FFFE */ sh $a0, -2($a1) /* 0075A0 8002C1A0 A4A40000 */ sh $a0, ($a1) /* 0075A4 8002C1A4 24A50004 */ addiu $a1, $a1, 4 /* 0075A8 8002C1A8 24630004 */ addiu $v1, $v1, 4 /* 0075AC 8002C1AC 24C60001 */ addiu $a2, $a2, 1 /* 0075B0 8002C1B0 28C20006 */ slti $v0, $a2, 6 /* 0075B4 8002C1B4 1440FFF3 */ bnez $v0, .L8002C184 /* 0075B8 8002C1B8 00073842 */ srl $a3, $a3, 1 /* 0075BC 8002C1BC 25290001 */ addiu $t1, $t1, 1 /* 0075C0 8002C1C0 29220007 */ slti $v0, $t1, 7 /* 0075C4 8002C1C4 1440FFEA */ bnez $v0, .L8002C170 /* 0075C8 8002C1C8 246309E8 */ addiu $v1, $v1, 0x9e8 /* 0075CC 8002C1CC 03E00008 */ jr $ra /* 0075D0 8002C1D0 00000000 */ nop /* 0075D4 8002C1D4 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0075D8 8002C1D8 AFB10014 */ sw $s1, 0x14($sp) /* 0075DC 8002C1DC 0080882D */ daddu $s1, $a0, $zero /* 0075E0 8002C1E0 AFB00010 */ sw $s0, 0x10($sp) /* 0075E4 8002C1E4 AFBF0018 */ sw $ra, 0x18($sp) /* 0075E8 8002C1E8 0C01929D */ jal memcpy /* 0075EC 8002C1EC 00C0802D */ daddu $s0, $a2, $zero /* 0075F0 8002C1F0 02301021 */ addu $v0, $s1, $s0 /* 0075F4 8002C1F4 8FBF0018 */ lw $ra, 0x18($sp) /* 0075F8 8002C1F8 8FB10014 */ lw $s1, 0x14($sp) /* 0075FC 8002C1FC 8FB00010 */ lw $s0, 0x10($sp) /* 007600 8002C200 03E00008 */ jr $ra /* 007604 8002C204 27BD0020 */ addiu $sp, $sp, 0x20