.org 0x861c0
!main:
addiu sp, sp, $ffe8
sw ra, $14 (SP)
lui a0, $8034
lhu a0, $afa2 (a0)
andi a0, a0, $0400
srl a0, a0, 0x0A

lui t1, $802d
lbu t0, $b260 (t1)
xor t0, t0, a0
sb t0, $b260 (t1)
beq t0, r0, !noshow
nop
jal $40c000
nop
!noshow:
lw ra, $14 (SP)
jr ra
addiu sp, sp, $18



.org 0x120c000
!asf:
addiu sp, sp, $ffd8
sw ra, $14 (SP)
lui a0, $8034
lh t2, $af98 (a0)
andi t3, t2, $7fff
slti at, t3, $4200
or t7, r0, r0
bne at, r0, !no1
nop
andi t2, t2, $8000
sra t7, t2, $d
addiu t7, t7, $fffe
!no1:
lh t2, $af94 (a0)
andi t3, t2, $7fff
or t6, r0, r0
slti at, t3, $4200
bne at, r0, !no2
nop
lui t1, $802d
lb t0, $b262 (t1)
andi t6, t0, $1
xori t6, t6, $1
sll t6, t6, $1
addiu t6, t6, $ffff
!no2:
add t7, t7, t6
lui t1, $802d
lb t0, $b262 (t1)
bne t7, r0, !noreset
nop
sb r0, $b263 (t1)
!noreset:
lbu t3, $b263 (t1)
beq t3, r0, !add
addiu t4, t3, $ffff
beq r0, r0, !noadd
sb t4, $b263 (t1)
!add:
add t0, t0, t7
beq t7, r0, !noadd
nop
addiu t8, r0, $f
sb t8, $b263 (t1)
!noadd:
slti at, t0, $07
bne at, r0, !nokill
nop
addiu t0, t0, $fff9
!nokill:
slti at, t0, $0
beq at, r0, !nokill2
nop
addiu t0, t0, $1c
!nokill2:
sb t0, $b262 (t1)
sll t0, t0, $4
lui a2, $8040
ori a2, a2, $f000
add a2, a2, t0
lbu a0, $0009 (a2)
addiu a0, a0, $fff0
lbu a1, $0008 (a2)
lui a2, $8040
lui t1, $802d
lbu a3, $b262 (t1)
jal $2d62d8
ori a2, a2, $f1d0



lui a2, $8040
ori a2, a2, $f000
!loop:
lbu a0, $0009 (a2)
lbu a1, $0008 (a2)
jal $2d62d8
sw a2, $18 (SP)
lw a2, $0018 (SP)
addiu a2, a2, $10
lw at, $0000 (A2)
bne at, r0, !loop
nop
lui t0, $8034
lhu at, $afa2 (t0)
andi at, at, $8000
beq at, r0, !nowarp
nop
lui t1, $802d
lbu t0, $b262 (t1)
sb r0, $b260 (t1)
sll t0, t0, $4
lui a2, $8040
ori a2, a2, $f000
add a2, a2, t0
lw a2,  $000c (A2)

lui t4, $8034
lhu t4, $baca (t4)
addiu t4, t4, $ffff
sll t5, t4, $5
sll t6, t4, $4
sll t7, t4, $2
add t5, t5, t6
add t5, t5, t7
add t5, t5, t7
add t5, t5, t7
lui t3, $8033
ori t3, t3, $b918
add t3, t3, t5
addiu at, r0, $00f1
!loop777:
lw t3, $0008 (T3)
lbu t2, $0000 (T3)
bne t2, at, !loop777
nop
sw a2, $0000 (t3)
LUI A0, $8033
ORI A0, A0, $B170
JAL $8024A9CC
ADDIU A1, R0, $0013
lui at, $8034
addiu t1, r0, $13
sh t1, $b252 (AT)

!nowarp:
lw ra, $14 (SP)
jr ra
addiu sp, sp, $28