.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_8002C054 /* 7454 8002C054 3C026666 */ lui $v0, 0x6666 /* 7458 8002C058 34426667 */ ori $v0, $v0, 0x6667 /* 745C 8002C05C 00C20018 */ mult $a2, $v0 /* 7460 8002C060 0080382D */ daddu $a3, $a0, $zero /* 7464 8002C064 000617C3 */ sra $v0, $a2, 0x1f /* 7468 8002C068 3C048007 */ lui $a0, 0x8007 /* 746C 8002C06C 24847290 */ addiu $a0, $a0, 0x7290 /* 7470 8002C070 00007010 */ mfhi $t6 /* 7474 8002C074 000E1843 */ sra $v1, $t6, 1 /* 7478 8002C078 00621823 */ subu $v1, $v1, $v0 /* 747C 8002C07C 000310C0 */ sll $v0, $v1, 3 /* 7480 8002C080 00431023 */ subu $v0, $v0, $v1 /* 7484 8002C084 00021080 */ sll $v0, $v0, 2 /* 7488 8002C088 00445021 */ addu $t2, $v0, $a0 /* 748C 8002C08C 00031080 */ sll $v0, $v1, 2 /* 7490 8002C090 00431021 */ addu $v0, $v0, $v1 /* 7494 8002C094 00C23023 */ subu $a2, $a2, $v0 /* 7498 8002C098 00061040 */ sll $v0, $a2, 1 /* 749C 8002C09C 00461021 */ addu $v0, $v0, $a2 /* 74A0 8002C0A0 00026040 */ sll $t4, $v0, 1 /* 74A4 8002C0A4 3C04800A */ lui $a0, 0x800a /* 74A8 8002C0A8 2484BB30 */ addiu $a0, $a0, -0x44d0 /* 74AC 8002C0AC 948309D0 */ lhu $v1, 0x9d0($a0) /* 74B0 8002C0B0 24020140 */ addiu $v0, $zero, 0x140 /* 74B4 8002C0B4 14620024 */ bne $v1, $v0, .L8002C148 /* 74B8 8002C0B8 24020280 */ addiu $v0, $zero, 0x280 /* 74BC 8002C0BC 0060102D */ daddu $v0, $v1, $zero /* 74C0 8002C0C0 00450018 */ mult $v0, $a1 /* 74C4 8002C0C4 0000482D */ daddu $t1, $zero, $zero /* 74C8 8002C0C8 3C0D8000 */ lui $t5, 0x8000 /* 74CC 8002C0CC 0080582D */ daddu $t3, $a0, $zero /* 74D0 8002C0D0 8D6209CC */ lw $v0, 0x9cc($t3) /* 74D4 8002C0D4 00007012 */ mflo $t6 /* 74D8 8002C0D8 000E1840 */ sll $v1, $t6, 1 /* 74DC 8002C0DC 00431021 */ addu $v0, $v0, $v1 /* 74E0 8002C0E0 00071840 */ sll $v1, $a3, 1 /* 74E4 8002C0E4 00432821 */ addu $a1, $v0, $v1 /* 74E8 8002C0E8 018D2006 */ srlv $a0, $t5, $t4 .L8002C0EC: /* 74EC 8002C0EC 8D480000 */ lw $t0, ($t2) /* 74F0 8002C0F0 254A0004 */ addiu $t2, $t2, 4 /* 74F4 8002C0F4 24060005 */ addiu $a2, $zero, 5 .L8002C0F8: /* 74F8 8002C0F8 00A0382D */ daddu $a3, $a1, $zero /* 74FC 8002C0FC 24A50002 */ addiu $a1, $a1, 2 /* 7500 8002C100 00881024 */ and $v0, $a0, $t0 /* 7504 8002C104 10400002 */ beqz $v0, .L8002C110 /* 7508 8002C108 24030001 */ addiu $v1, $zero, 1 /* 750C 8002C10C 3403FFFF */ ori $v1, $zero, 0xffff .L8002C110: /* 7510 8002C110 A4E30000 */ sh $v1, ($a3) /* 7514 8002C114 24C6FFFF */ addiu $a2, $a2, -1 /* 7518 8002C118 04C1FFF7 */ bgez $a2, .L8002C0F8 /* 751C 8002C11C 00042042 */ srl $a0, $a0, 1 /* 7520 8002C120 956209D0 */ lhu $v0, 0x9d0($t3) /* 7524 8002C124 25290001 */ addiu $t1, $t1, 1 /* 7528 8002C128 00021040 */ sll $v0, $v0, 1 /* 752C 8002C12C 2442FFF4 */ addiu $v0, $v0, -0xc /* 7530 8002C130 00A22821 */ addu $a1, $a1, $v0 /* 7534 8002C134 29220007 */ slti $v0, $t1, 7 /* 7538 8002C138 1440FFEC */ bnez $v0, .L8002C0EC /* 753C 8002C13C 018D2006 */ srlv $a0, $t5, $t4 .L8002C140: /* 7540 8002C140 03E00008 */ jr $ra /* 7544 8002C144 00000000 */ nop .L8002C148: /* 7548 8002C148 1462FFFD */ bne $v1, $v0, .L8002C140 /* 754C 8002C14C 0000482D */ daddu $t1, $zero, $zero /* 7550 8002C150 3C0B8000 */ lui $t3, 0x8000 /* 7554 8002C154 00051080 */ sll $v0, $a1, 2 /* 7558 8002C158 00451021 */ addu $v0, $v0, $a1 /* 755C 8002C15C 8C8309CC */ lw $v1, 0x9cc($a0) /* 7560 8002C160 00021240 */ sll $v0, $v0, 9 /* 7564 8002C164 00621821 */ addu $v1, $v1, $v0 /* 7568 8002C168 00071080 */ sll $v0, $a3, 2 /* 756C 8002C16C 00621821 */ addu $v1, $v1, $v0 .L8002C170: /* 7570 8002C170 018B3806 */ srlv $a3, $t3, $t4 /* 7574 8002C174 8D480000 */ lw $t0, ($t2) /* 7578 8002C178 254A0004 */ addiu $t2, $t2, 4 /* 757C 8002C17C 0000302D */ daddu $a2, $zero, $zero /* 7580 8002C180 24650502 */ addiu $a1, $v1, 0x502 .L8002C184: /* 7584 8002C184 00E81024 */ and $v0, $a3, $t0 /* 7588 8002C188 10400002 */ beqz $v0, .L8002C194 /* 758C 8002C18C 24040001 */ addiu $a0, $zero, 1 /* 7590 8002C190 3404FFFF */ ori $a0, $zero, 0xffff .L8002C194: /* 7594 8002C194 A4640000 */ sh $a0, ($v1) /* 7598 8002C198 A4A4FB00 */ sh $a0, -0x500($a1) /* 759C 8002C19C A4A4FFFE */ sh $a0, -2($a1) /* 75A0 8002C1A0 A4A40000 */ sh $a0, ($a1) /* 75A4 8002C1A4 24A50004 */ addiu $a1, $a1, 4 /* 75A8 8002C1A8 24630004 */ addiu $v1, $v1, 4 /* 75AC 8002C1AC 24C60001 */ addiu $a2, $a2, 1 /* 75B0 8002C1B0 28C20006 */ slti $v0, $a2, 6 /* 75B4 8002C1B4 1440FFF3 */ bnez $v0, .L8002C184 /* 75B8 8002C1B8 00073842 */ srl $a3, $a3, 1 /* 75BC 8002C1BC 25290001 */ addiu $t1, $t1, 1 /* 75C0 8002C1C0 29220007 */ slti $v0, $t1, 7 /* 75C4 8002C1C4 1440FFEA */ bnez $v0, .L8002C170 /* 75C8 8002C1C8 246309E8 */ addiu $v1, $v1, 0x9e8 /* 75CC 8002C1CC 03E00008 */ jr $ra /* 75D0 8002C1D0 00000000 */ nop