*
* Dugeon Master
* (c) 1987, FTL
* (s) 2016, Brutal Deluxe Software
*

         mx	%00
	rel
	dsk	PLAYER.L
	lst	off

	use	PLAYER.X

L0A0000  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E2
         TCS
         PEA   $0000
         PEA   $0000
         PEA   $0080
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   $E6
         STA   $E4
         LDA   $FD
         STA   $E8
         CLC
         ADC   #$000F
         STA   $EA
         LDA   $FF
         STA   $EC
         CLC
         ADC   #$000F
         STA   $EE
         PEI   $E6
         PEI   $E4
         PEI   $FB
         JSL   L020DB5
         PLY
         PLY
         PLY
         PEA   $FFFF
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00E8
         PHA
         PEI   $E6
         PEI   $E4
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0000
         PEA   $0080
         JSL   L0B0175
         PLY
         PLY
         TSC
         CLC
         ADC   #$0012
         TCS
         PLD
         RTL

L0A0073  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         LDA   L03015A
         CMP   $F9
         BNE   L0A0088
         BRL   L0A014B
L0A0088  LDA   $F9
         STA   L03015A
         LDA   $FF
         BNE   L0A009D
         PEA   $0091
         PEA   $0009
         JSL   L020F77
         PLY
         PLY
L0A009D  PEA   $0008
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $0019
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STZ   $EC
         LDY   #$0002
         LDA   [$FB],Y
         STA   $EA
L0A00C8  LDA   $EA
         CMP   #$FFFE
         BEQ   L0A010D
         PEI   $EA
         JSL   L020B37
         PLY
         PHA
         LDA   $EC
         CLC
         ADC   #$0026
         PHA
         JSL   L020F77
         PLY
         PLY
         LDA   $EC
         INC   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   $EA
         STA   [$EE]
         PEI   $EA
         JSL   L060D39
         PLY
         STA   $EA
         BRA   L0A00C8
L0A010D  LDA   $EC
         SEC
         SBC   #$0008
         BVS   L0A0118
         EOR   #$8000
L0A0118  BMI   L0A014B
         PEA   $FFFF
         LDA   $EC
         CLC
         ADC   #$0026
         PHA
         JSL   L020F77
         PLY
         PLY
         LDA   $EC
         INC   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   #$FFFF
         STA   [$EE]
         BRA   L0A010D
L0A014B  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A0155  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00E4
         TCS
         LDA   #$0001
         STA   $E6
         LDA   L03015A
         CMP   #$FFFF
         BNE   L0A0170
         BRL   L0A01F6
L0A0170  LDA   L03015A
         PHA
         JSL   L060C4E
         PLY
         STX   $F4
         STA   $F2
         LDA   #$FFFF
         STA   L03015A
         LDA   #$FFFE
         LDY   #$0002
         STA   [$F2],Y
         STZ   $E8
         BRA   L0A01E9
L0A018F  LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         STA   $EC
         CMP   #$FFFF
         BEQ   L0A01E7
         LDA   $E6
         BEQ   L0A01D1
         STZ   $E6
         PEI   $EC
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDA   #$FFFE
         STA   [$EE]
         LDA   $EC
         STA   $EA
         LDY   #$0002
         STA   [$F2],Y
         BRA   L0A01E7
L0A01D1  PEA   $0000
         PEA   $FFFF
         PEI   $EA
         PEI   $EC
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         LDA   $EC
         STA   $EA
L0A01E7  INC   $E8
L0A01E9  LDA   $E8
         SEC
         SBC   #$0008
         BVS   L0A01F4
         EOR   #$8000
L0A01F4  BPL   L0A018F
L0A01F6  TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         PLD
         RTL

L0A0200  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$0066
         TCS
         LDA   [$FD]
         AND   #$00FF
         CMP   #$000C
         BNE   L0A0227
         INC   $FD
         BNE   L0A021B
         INC   $FF
L0A021B  LDA   #$006C
         STA   L03015C
         LDA   #$003B
         STA   L03015E
L0A0227  LDA   [$FD]
         AND   #$00FF
         BNE   L0A0231
         BRL   L0A02EA
L0A0231  PEI   $FF
         PEI   $FD
         PEA   $0000
         TDC
         CLC
         ADC   #$0068
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         LDX   #$0000
         TDC
         CLC
         ADC   #$0068
         STX   $F0
         STA   $EE
         STZ   $E8
L0A0254  LDA   [$EE]
         AND   #$00FF
         BNE   L0A025E
         BRL   L0A02EA
L0A025E  PEI   $F0
         PEI   $EE
         JSL   L022405
         PLY
         PLY
         SEC
         SBC   #$0012
         BEQ   L0A02A6
         BVS   L0A0273
         EOR   #$8000
L0A0273  BPL   L0A02A6
         LDA   $EE
         CLC
         ADC   #$0011
         LDX   $F0
         BCC   L0A0280
         INX
L0A0280  STX   $EC
         STA   $EA
L0A0284  LDA   [$EA]
         AND   #$00FF
         CMP   #$0020
         BEQ   L0A0298
         LDA   $EA
         BNE   L0A0294
         DEC   $EC
L0A0294  DEC   $EA
         BRA   L0A0284
L0A0298  LDA   #$0000
         SEP   #$20
         STA   [$EA]
         REP   #$20
         LDA   #$0001
         STA   $E8
L0A02A6  PEI   $F0
         PEI   $EE
         PEA   $000D
         LDA   L03015E
         PHA
         LDA   L03015C
         PHA
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   L03015E
         CLC
         ADC   #$0007
         STA   L03015E
         LDA   $E8
         BEQ   L0A02DE
         STZ   $E8
         INC   $EA
         BNE   L0A02D4
         INC   $EC
L0A02D4  LDX   $EC
         LDA   $EA
         STX   $F0
         STA   $EE
         BRA   L0A02E7
L0A02DE  LDA   #$0000
         SEP   #$20
         STA   [$EE]
         REP   #$20
L0A02E7  BRL   L0A0254
L0A02EA  TSC
         CLC
         ADC   #$0090
         TCS
         PLD
         RTL

L0A02F2  PHD
         TSC
         SEC
         SBC   #$00E7
         TCD
         ADC   #$00DA
         TCS
         STZ   $E0
         LDA   #$0000
         STA   $DE
         LDA   #$0001
         STA   $DC
         BRA   L0A031F
L0A030B  LDA   $DC
         AND   $ED
         AND   $EF
         TAY
         BEQ   L0A0316
         INC   $E0
L0A0316  LDA   $DE
         INC   $DE
         LDA   $DC
         ASL
         STA   $DC
L0A031F  LDA   $DE
         CMP   #$0010
         BCC   L0A030B
         LDA   $E0
         CMP   #$0000
         BNE   L0A0339
         LDA   #$0000
         SEP   #$20
         STA   [$F5]
         REP   #$20
         BRL   L0A03F2
L0A0339  PEI   $FB
         PEI   $F9
         PEI   $F7
         PEI   $F5
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         LDA   #$0000
         STA   $DE
         LDA   #$0001
         STA   $DC
         BRL   L0A03D8
L0A0356  LDA   $DC
         AND   $ED
         AND   $EF
         TAY
         BNE   L0A0362
         BRL   L0A03CF
L0A0362  LDA   $DE
         LDX   #$0000
         STX   $E6
         ASL
         ROL   $E6
         ASL
         ROL   $E6
         LDX   $E6
         PHX
         PHA
         LDX   $F3
         LDA   $F1
         JSL   L021F00
         PLA
         PLX
         STA   $E2
         STX   $E4
         LDY   #$0002
         LDA   [$E2],Y
         TAX
         LDA   [$E2]
         PHX
         PHA
         PEI   $F7
         PEI   $F5
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   $E0
         DEC   $E0
         CMP   #$0002
         BEQ   L0A03B6
         BCC   L0A03B6
         PEA   ^L054329
         PEA   L054329
         PEI   $F7
         PEI   $F5
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         BRA   L0A03CF
L0A03B6  LDA   $E0
         CMP   #$0001
         BNE   L0A03CF
         PEA   ^L05432C
         PEA   L05432C
         PEI   $F7
         PEI   $F5
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
L0A03CF  LDA   $DE
         INC   $DE
         LDA   $DC
         ASL
         STA   $DC
L0A03D8  LDA   $DE
         CMP   #$0010
         BCS   L0A03E2
         BRL   L0A0356
L0A03E2  PEI   $FF
         PEI   $FD
         PEI   $F7
         PEI   $F5
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
L0A03F2  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A03FC  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00CA
         TCS
         LDX   L03009A
         LDA   L030098
         STA   $F6
         STX   $F8
         LDY   #$000C
         LDA   [$F6],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         CMP   #$0000
         BNE   L0A042C
         STZ   L03003C
         BRL   L0A0656
L0A042C  LDA   #$0004
         STA   $E8
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $E0
         STA   $DE
         LDX   #$0000
         TDC
         CLC
         ADC   #$00CC
         STX   $F4
         STA   $F2
L0A0447  LDA   $E8
         DEC   $E8
         TAY
         BNE   L0A0451
         BRL   L0A0506
L0A0451  LDA   #$0002
         STA   $E6
L0A0456  LDA   $E6
         DEC   $E6
         TAY
         BNE   L0A0460
         BRL   L0A04F7
L0A0460  LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $DE
         CLC
         ADC   #$00D3
         LDX   $E0
         BCC   L0A0473
         INX
L0A0473  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         STA   $DC
         PHA
         JSL   L020ADF
         PLY
         SEC
         SBC   #$0004
         BVS   L0A0490
         EOR   #$8000
L0A0490  BPL   L0A04E3
         LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $DE
         CLC
         ADC   #$00D3
         LDX   $E0
         BCC   L0A04A5
         INX
L0A04A5  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         STA   $DC
         PHA
         JSL   L020ADF
         PLY
         SEC
         SBC   #$0007
         BEQ   L0A04C6
         BVS   L0A04C4
         EOR   #$8000
L0A04C4  BMI   L0A04E3
L0A04C6  PEI   $DC
         JSL   L060C4E
         PLY
         STX   $E4
         STA   $E2
         LDY   #$0002
         LDA   [$E2],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$000F
         STA   [$F2]
         BRA   L0A04E8
L0A04E3  LDA   #$0000
         STA   [$F2]
L0A04E8  LDA   $F2
         CLC
         ADC   #$0002
         STA   $F2
         BCC   L0A04F4
         INC   $F4
L0A04F4  BRL   L0A0456
L0A04F7  LDA   $DE
         CLC
         ADC   #$031F
         STA   $DE
         BCC   L0A0503
         INC   $E0
L0A0503  BRL   L0A0447
L0A0506  LDX   #$0000
         TDC
         CLC
         ADC   #$00CC
         STX   $F4
         STA   $F2
         STZ   $E6
L0A0514  LDA   $E6
         CMP   #$0004
         BEQ   L0A0584
         LDA   #$0007
         SEC
         SBC   $E6
         STA   $E8
         LDA   $E6
         CLC
         ADC   #$0001
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00CC
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
L0A0541  LDA   $E8
         DEC   $E8
         TAY
         BEQ   L0A0574
         LDA   [$EE]
         PHA
         LDA   [$F2]
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BVS   L0A0558
         EOR   #$8000
L0A0558  BMI   L0A0566
         LDA   [$EE]
         STA   $DC
         LDA   [$F2]
         STA   [$EE]
         LDA   $DC
         STA   [$F2]
L0A0566  LDA   $EE
         CLC
         ADC   #$0002
         STA   $EE
         BCC   L0A0572
         INC   $F0
L0A0572  BRA   L0A0541
L0A0574  LDA   $F2
         CLC
         ADC   #$0002
         STA   $F2
         BCC   L0A0580
         INC   $F4
L0A0580  INC   $E6
         BRA   L0A0514
L0A0584  LDA   #$0006
         STA   $EA
         LDA   #$0005
         STA   $E6
         STZ   $EC
         LDX   #$0000
         TDC
         CLC
         ADC   #$00CC
         STX   $F4
         STA   $F2
L0A059C  LDA   $E6
         DEC   $E6
         TAY
         BEQ   L0A05FB
         LDA   [$F2]
         BEQ   L0A05ED
         LDA   $EA
         PHA
         LDA   [$F2]
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0585CC
         LDX   #^L0585CC
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         CLC
         JSL   L0222A8
         PLA
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         LDA   $EC
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $EC
         LDA   $EA
         SEC
         SBC   #$0001
         PHA
         PEA   $0000
         JSL   L0204BA
         PLY
         PLY
         STA   $EA
L0A05ED  LDA   $F2
         CLC
         ADC   #$0002
         STA   $F2
         BCC   L0A05F9
         INC   $F4
L0A05F9  BRA   L0A059C
L0A05FB  LDA   $EC
         CLC
         ADCL  L056150
         STA   $EC
         LDA   #L0585EC
         LDX   #^L0585EC
         STX   $F4
         STA   $F2
         LDA   $EC
         SEC
         SBC   #$0000
         BEQ   L0A064C
         BVS   L0A061B
         EOR   #$8000
L0A061B  BPL   L0A064C
         STZ   $E6
L0A061F  LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $F2
         LDA   $F4
         BCC   L0A0630
         INC
L0A0630  STA   $F4
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         SEC
         SBC   $EC
         BEQ   L0A064A
         BVS   L0A0644
         EOR   #$8000
L0A0644  BPL   L0A064A
         INC   $E6
         BRA   L0A061F
L0A064A  BRA   L0A0651
L0A064C  LDA   #$0005
         STA   $E6
L0A0651  LDA   $E6
         STA   L03003C
L0A0656  LDA   #$0001
         STA   L03007E
         TSC
         CLC
         ADC   #$0030
         TCS
         PLD
         RTL

L0A0664  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00E4
         TCS
         STZ   $E8
         LDA   L03003E
         STA   $EC
         LDA   L030032
         BEQ   L0A067D
         DEC   $EC
L0A067D  LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F4
         STA   $F2
L0A0687  LDA   $EC
         DEC   $EC
         TAY
         BNE   L0A0691
         BRL   L0A078E
L0A0691  LDA   #$0002
         STA   $EA
L0A0696  LDA   $EA
         DEC   $EA
         TAY
         BNE   L0A06A0
         BRL   L0A077F
L0A06A0  LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$00D3
         LDX   $F4
         BCC   L0A06B3
         INX
L0A06B3  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         JSL   L020B37
         PLY
         STA   $E6
         LDA   $E6
         SEC
         SBC   #$0004
         BVS   L0A06D2
         EOR   #$8000
L0A06D2  BMI   L0A06D7
         BRL   L0A077C
L0A06D7  LDA   $E6
         SEC
         SBC   #$0007
         BEQ   L0A06E9
         BVS   L0A06E4
         EOR   #$8000
L0A06E4  BPL   L0A06E9
         BRL   L0A077C
L0A06E9  LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$00D3
         LDX   $F4
         BCC   L0A06FC
         INX
L0A06FC  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0002
         LDA   [$EE],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$000F
         TAY
         BEQ   L0A077C
         LDY   #$0002
         LDA   [$EE],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$000F
         DEC
         AND   #$000F
         PHA
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$C3FF
         STA   $FA
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $FA
         LDY   #$0002
         STA   [$EE],Y
         PLA
         CMP   #$0000
         BNE   L0A0777
         LDA   #$0000
         AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$FF7F
         STA   $FA
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $FA
         LDY   #$0002
         STA   [$EE],Y
         PLA
L0A0777  LDA   #$0001
         STA   $E8
L0A077C  BRL   L0A0696
L0A077F  LDA   $F2
         CLC
         ADC   #$031F
         STA   $F2
         BCC   L0A078B
         INC   $F4
L0A078B  BRL   L0A0687
L0A078E  LDA   L0303D5
         CMP   #$0088
         BNE   L0A0799
         BRL   L0A07D3
L0A0799  PEA   $0006
         PEA   ^L050000
         PEA   L050000
         PEA   ^L054332
         PEA   L054332
         PEA   ^L050036
         PEA   L050036
         LDA   L030004
         PHA
         PEA   $0015
         PEA   ^L0B225C
         PEA   L0B225C
         PEA   ^L0A79E4
         PEA   L0A79E4
         JSL   L0C0000
         TAY
         TSC
         CLC
         ADC   #$001A
         TCS
         TYA
         LDA   #$0088
         STA   L0303D5
L0A07D3  LDA   $E8
         BEQ   L0A07DF
         JSL   L0A03FC
         JSL   L0A4763
L0A07DF  TSC
         CLC
         ADC   #$0016
         TCS
         PLD
         RTL

L0A07E7  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         PEA   $0008
         PEA   $0008
         PEA   ^L058558
         PEA   L058558
         LDA   $FF
         BEQ   L0A0807
         LDA   #$0013
         BRA   L0A080A
L0A0807  LDA   #$0012
L0A080A  PHA
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0A0826  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         LDX   $FF
         LDA   $FD
         STX   $EE
         STA   $EC
L0A0839  LDA   [$EC]
         AND   #$00FF
         BNE   L0A0843
         BRL   L0A08BC
L0A0843  LDA   [$EC]
         AND   #$00FF
         SEC
         SBC   #$0041
         BVS   L0A0851
         EOR   #$8000
L0A0851  BPL   L0A0884
         LDA   [$EC]
         AND   #$00FF
         SEC
         SBC   #$005A
         BEQ   L0A0865
         BVS   L0A0863
         EOR   #$8000
L0A0863  BMI   L0A0884
L0A0865  LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L0A086F
         INC   $EE
L0A086F  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         SEC
         SBC   #$0040
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   L0A08B9
L0A0884  LDA   [$EC]
         AND   #$00FF
         SEC
         SBC   #$007B
         BVS   L0A0892
         EOR   #$8000
L0A0892  BPL   L0A08B3
         LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L0A089E
         INC   $EE
L0A089E  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         SEC
         SBC   #$0060
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   L0A08B9
L0A08B3  INC   $EC
         BNE   L0A08B9
         INC   $EE
L0A08B9  BRL   L0A0839
L0A08BC  PEI   $FF
         PEI   $FD
         PEA   $000F
         PEA   $0000
         PEI   $FB
         LDA   #$0001
         PHA
         PEI   $FF
         PEI   $FD
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$00A2
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L0A090E  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$FEFE
         TCS
         PEA   $8002
         LDY   #$0002
         LDA   [$FD],Y
         AND   #$03FF
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$FF00
         PHA
         JSL   L0619C4
         PLY
         PLY
         PLY
         PLY
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF00
         STX   $E8
         STA   $E6
L0A0942  LDA   [$E6]
         AND   #$00FF
         BEQ   L0A095B
         LDA   [$E6]
         AND   #$00FF
         CMP   #$000A
         BEQ   L0A095B
         INC   $E6
         BNE   L0A0959
         INC   $E8
L0A0959  BRA   L0A0942
L0A095B  LDA   #$0000
         SEP   #$20
         STA   [$E6]
         REP   #$20
         PEA   $0008
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $0017
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   #$0001
         STA   $E4
         INC   $E6
         BNE   L0A0991
         INC   $E8
L0A0991  LDX   $E8
         LDA   $E6
         STX   $EC
         STA   $EA
L0A0999  LDA   [$EA]
         AND   #$00FF
         BEQ   L0A09B4
         LDA   [$EA]
         AND   #$00FF
         CMP   #$000A
         BNE   L0A09AC
         INC   $E4
L0A09AC  INC   $EA
         BNE   L0A09B2
         INC   $EC
L0A09B2  BRA   L0A0999
L0A09B4  LDX   $EC
         LDA   $EA
         SEC
         SBC   #$0001
         PHA
         TXA
         SBC   #$0000
         TAX
         PLA
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         CMP   #$000A
         BEQ   L0A09D5
         INC   $E4
         BRA   L0A09F4
L0A09D5  LDX   $EC
         LDA   $EA
         SEC
         SBC   #$0002
         PHA
         TXA
         SBC   #$0000
         TAX
         PLA
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         CMP   #$000A
         BNE   L0A09F4
         DEC   $E4
L0A09F4  LDA   #$0002
         PHA
         LDA   $E4
         PHA
         LDA   #$0007
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$005C
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $E4
         PEA   $0000
         TDC
         CLC
         ADC   #$FF00
         PHA
         PEI   $E4
         JSL   L0A0826
         PLY
         PLY
         PLY
         LDX   $E8
         LDA   $E6
         STX   $EC
         STA   $EA
L0A0A30  LDA   [$EA]
         AND   #$00FF
         BEQ   L0A0A99
         LDA   $E4
         CLC
         ADC   #$0007
         STA   $E4
L0A0A3F  LDA   [$E6]
         AND   #$00FF
         BEQ   L0A0A58
         LDA   [$E6]
         AND   #$00FF
         CMP   #$000A
         BEQ   L0A0A58
         INC   $E6
         BNE   L0A0A56
         INC   $E8
L0A0A56  BRA   L0A0A3F
L0A0A58  LDA   [$E6]
         AND   #$00FF
         BNE   L0A0A6B
         LDA   #$0000
         SEP   #$20
         LDY   #$0001
         STA   [$E6],Y
         REP   #$20
L0A0A6B  LDX   $E8
         LDA   $E6
         INC   $E6
         BNE   L0A0A75
         INC   $E8
L0A0A75  STA   $F2
         STX   $F4
         LDA   #$0000
         SEP   #$20
         STA   [$F2]
         REP   #$20
         PEI   $EC
         PEI   $EA
         PEI   $E4
         JSL   L0A0826
         PLY
         PLY
         PLY
         LDX   $E8
         LDA   $E6
         STX   $EC
         STA   $EA
         BRA   L0A0A30
L0A0A99  TSC
         CLC
         ADC   #$01F8
         TCS
         PLD
         RTL

L0A0AA1  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$006E
         TCS
         LDA   #L054342
         LDX   #^L054342
         STX   $A0
         STA   $9E
         LDA   #L054344
         LDX   #^L054344
         STX   $9C
         STA   $9A
         LDA   L030068
         BNE   L0A0ACA
         LDA   L03006C
         BEQ   L0A0ACE
L0A0ACA  JSL   L0A0155
L0A0ACE  PEI   $FD
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         PEA   ^L05436C
         PEA   L05436C
         JSL   L0A0200
         PLY
         PLY
         LDA   #$000A
         PHA
         LDA   $FD
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $98
         LDA   $98
         CMP   #$0007
         BNE   L0A0B0A
         PEI   $EC
         PEI   $EA
         JSL   L0A090E
         PLY
         PLY
         BRL   L0A108F
L0A0B0A  LDA   $98
         CMP   #$0009
         BNE   L0A0B24
         PEI   $FF
         PEI   $EC
         PEI   $EA
         PEI   $FD
         JSL   L0A0073
         PLY
         PLY
         PLY
         PLY
         BRL   L0A108F
L0A0B24  PEI   $FD
         JSL   L020B37
         PLY
         STA   $E6
         PEA   $0008
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $0014
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $000C
         PEA   $0010
         PEA   ^L058560
         PEA   L058560
         PEA   $001D
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   $E6
         CMP   #$0093
         BEQ   L0A0B7B
         BRL   L0A0C11
L0A0B7B  LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEA   ^L05436E
         PEA   L05436E
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   $E6
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L053F4B
         LDX   #^L053F4B
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDX   #$0000
         TDC
         CLC
         ADC   #$0070
         STX   $F0
         STA   $EE
         BRL   L0A0CD8
L0A0C11  LDA   $98
         CMP   #$0008
         BEQ   L0A0C1B
         BRL   L0A0CB3
L0A0C1B  LDA   $E6
         CMP   #$00A3
         BNE   L0A0C25
         BRL   L0A0CB3
L0A0C25  PEA   $0002
         LDA   L030160
         SEC
         SBC   #$0001
         PHA
         JSL   L0A55B1
         PLY
         PLY
         CMP   #$0001
         BEQ   L0A0CB3
         BCC   L0A0CB3
         LDA   #$0028
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$00FF
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$005F
         PLX
         STX   $F6
         CLC
         ADC   $F6
         SEP   #$20
         STA   $70
         REP   #$20
         LDA   #$0020
         SEP   #$20
         STA   $71
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $72
         REP   #$20
         LDA   $E6
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L053F4B
         LDX   #^L053F4B
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDX   #$0000
         TDC
         CLC
         ADC   #$0070
         STX   $F0
         STA   $EE
         BRA   L0A0CD8
L0A0CB3  LDA   $E6
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L053F4B
         LDX   #^L053F4B
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         STX   $F0
         STA   $EE
L0A0CD8  PEI   $F0
         PEI   $EE
         PEA   $000D
         PEA   $0044
         PEA   $0086
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $003B
         PEA   $006F
         PEI   $E6
         JSL   L0A0000
         PLY
         PLY
         PLY
         LDA   #L054370
         LDX   #^L054370
         STX   $A4
         STA   $A2
         LDA   #L05437B
         LDX   #^L05437B
         STX   $A8
         STA   $A6
         LDA   #L054384
         LDX   #^L054384
         STX   $AC
         STA   $AA
         LDA   #L05438B
         LDX   #^L05438B
         STX   $B0
         STA   $AE
         LDA   #$0057
         STA   L03015E
         LDA   $98
         BRL   L0A0F76
L0A0D30  LDA   #$000E
         STA   $E4
         LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         ASL
         ASL
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         AND   #$0001
         ASL
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         ASL
         ASL
         ASL
         PLX
         STX   $F6
         ORA   $F6
         PLX
         STX   $F6
         ORA   $F6
         STA   $E2
         LDA   $E6
         CMP   #$0004
         BCC   L0A0DA7
         LDA   $E6
         CMP   #$0007
         BEQ   L0A0D88
         BCS   L0A0DA7
L0A0D88  LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$000F
         CMP   #$0000
         BNE   L0A0DA7
         PEA   ^L054392
         PEA   L054392
         JSL   L0A0200
         PLY
         PLY
L0A0DA7  BRL   L0A0F87
L0A0DAA  LDA   #$000C
         STA   $E4
         LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         ASL
         ASL
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         ASL
         ASL
         ASL
         PLX
         STX   $F6
         ORA   $F6
         STA   $E2
         BRL   L0A0F87
L0A0DE0  LDA   #$0001
         STA   $E4
         LDY   #$0002
         LDA   [$EA],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$007F
         PHA
         LDA   #$0002
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05048C
         LDX   #^L05048C
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0004
         LDA   [$F2],Y
         STA   $E2
         BRL   L0A0F87
L0A0E28  LDA   $E6
         CMP   #$0008
         BCS   L0A0E32
         BRL   L0A0EAD
L0A0E32  LDA   $E6
         CMP   #$0009
         BEQ   L0A0E3E
         BCC   L0A0E3E
         BRL   L0A0EAD
L0A0E3E  STZ   $E4
         LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         BRL   L0A0E93
L0A0E55  LDA   #L05439E
         LDX   #^L05439E
         STX   $F0
         STA   $EE
         BRL   L0A0EA0
L0A0E62  LDA   #L0543A6
         LDX   #^L0543A6
         STX   $F0
         STA   $EE
         BRL   L0A0EA0
L0A0E6F  LDA   #L0543B5
         LDX   #^L0543B5
         STX   $F0
         STA   $EE
         BRL   L0A0EA0
L0A0E7C  LDA   #L0543C3
         LDX   #^L0543C3
         STX   $F0
         STA   $EE
L0A0E86  BRL   L0A0EA0
L0A0E89  DA    L0A0E55
         DA    L0A0E62
         DA    L0A0E6F
         DA    L0A0E7C
         DA    L0A0E86
L0A0E93  CMP   #$0004
         BCC   L0A0E9B
         LDA   #$0004
L0A0E9B  ASL
         TAX
         JMP   (L0A0E89,X)

L0A0EA0  PEI   $F0
         PEI   $EE
         JSL   L0A0200
         PLY
         PLY
         BRL   L0A0F62
L0A0EAD  LDA   $E6
         CMP   #$0000
         BCS   L0A0EB7
         BRL   L0A0F25
L0A0EB7  LDA   $E6
         CMP   #$0003
         BEQ   L0A0EC3
         BCC   L0A0EC3
         BRL   L0A0F25
L0A0EC3  STZ   $E4
         PEA   ^L0543CA
         PEA   L0543CA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         LDA   $E6
         SEC
         SBC   #$0000
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05435C
         LDX   #^L05435C
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L0A0200
         PLY
         PLY
         BRA   L0A0F62
L0A0F25  LDA   #$0001
         STA   $E4
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$007F
         PHA
         LDA   #$007F
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05048C
         LDX   #^L05048C
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0004
         LDA   [$F2],Y
         STA   $E2
L0A0F62  BRL   L0A0F87
L0A0F65  BRL   L0A0F87
L0A0F68  DA    L0A0D30
         DA    L0A0DAA
         DA    L0A0F65
         DA    L0A0DE0
         DA    L0A0F65
         DA    L0A0E28
         DA    L0A0F65
L0A0F76  SEC
         SBC   #$0005
         CMP   #$0006
         BCC   L0A0F82
         LDA   #$0006
L0A0F82  ASL
         TAX
         JMP   (L0A0F68,X)

L0A0F87  LDA   $E4
         BEQ   L0A0FC4
         PEI   $A0
         PEI   $9E
         PEI   $9C
         PEI   $9A
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00A2
         PHA
         PEI   $E2
         PEI   $E4
         JSL   L0A02F2
         TAY
         TSC
         CLC
         ADC   #$0014
         TCS
         TYA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L0A0200
         PLY
         PLY
L0A0FC4  PEA   ^L0543D8
         PEA   L0543D8
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEI   $FD
         JSL   L060112
         PLY
         STA   $E8
         PEA   $0003
         PEA   $0000
         LDA   #$000A
         PHA
         LDA   $E8
         CLC
         JSL   L021F1A
         PLY
         PHA
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0543E0
         PEA   L0543E0
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   #$000A
         PHA
         LDA   $E8
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         LDA   $E8
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $E8
         PEA   $0001
         PEA   $0000
         PEI   $E8
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0543E2
         PEA   L0543E2
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$0070
         PHA
         JSL   L0A0200
         PLY
         PLY
L0A108F  PEI   $FF
         JSL   L0A07E7
         PLY
         TSC
         CLC
         ADC   #$0088
         TCS
         PLD
         RTL

L0A109E  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E4
         TCS
         LDA   $F9
         STA   $E6
         CLC
         ADC   $FD
         STA   $E8
         LDA   $FB
         STA   $EA
         CLC
         ADC   #$0006
         STA   $EC
         STZ   L03012C
         PEA   $0070
         PEI   $FF
         PEA   $0000
         TDC
         CLC
         ADC   #$00E6
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L080D64
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L0A10E9  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         LDA   $FB
         SEC
         SBC   #$FE00
         BVS   L0A10FF
         EOR   #$8000
L0A10FF  BMI   L0A1108
         LDA   #$0008
         STA   $EE
         BRA   L0A1120
L0A1108  LDA   $FB
         SEC
         SBC   #$0000
         BVS   L0A1113
         EOR   #$8000
L0A1113  BMI   L0A111C
         LDA   #$000B
         STA   $EE
         BRA   L0A1120
L0A111C  LDA   $FF
         STA   $EE
L0A1120  LDA   $FB
         CLC
         ADC   #$0400
         STA   $EC
         LDA   $EC
         CMP   #$0C00
         BNE   L0A1134
         LDA   #$0BFF
         STA   $EC
L0A1134  LDA   #$0005
         PHA
         LDA   $EC
         SEC
         JSL   L0222DF
         PLA
         STA   $EC
         PEA   $0000
         PEI   $EC
         LDA   $FD
         CLC
         ADC   #$0002
         PHA
         PEA   $0073
         JSL   L0A109E
         PLY
         PLY
         PLY
         PLY
         PEI   $EE
         PEI   $EC
         PEI   $FD
         PEA   $0071
         JSL   L0A109E
         PLY
         PLY
         PLY
         PLY
         TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L0A1172  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00EC
         TCS
         LDA   L030160
         SEC
         SBC   #$0001
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F4
         STA   $F2
         JSL   L0A0155
         PEA   $0008
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $0014
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $000C
         PEA   $0018
         PEA   ^L058568
         PEA   L058568
         PEA   $001E
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $000C
         PEA   $0018
         PEA   ^L058570
         PEA   L058570
         PEA   $001F
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDY   #$002A
         LDA   [$F2],Y
         AND   #$00FF
         BEQ   L0A1239
         PEA   $000C
         PEA   $0030
         PEA   ^L058578
         PEA   L058578
         PEA   $0020
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0A1239  PEA   $0005
         PEA   $0045
         LDY   #$0042
         LDA   [$F2],Y
         PHA
         JSL   L0A10E9
         PLY
         PLY
         PLY
         PEA   $000E
         PEA   $005C
         LDY   #$0044
         LDA   [$F2],Y
         PHA
         JSL   L0A10E9
         PLY
         PLY
         PLY
         TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L0A1267  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         LDA   #$0005
         STA   L030158
         PEA   $0006
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $0028
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0A12A2  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00EE
         TCS
         LDA   L030032
         BEQ   L0A12B9
         JSL   L0A1267
         BRL   L0A1360
L0A12B9  LDA   L030160
         SEC
         SBC   #$0001
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$00D3
         CLC
         ADC   $F6
         BCC   L0A12EA
         INX
L0A12EA  STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         STA   $F4
         PEI   $F4
         JSL   L060C4E
         PLY
         STX   $F2
         STA   $F0
         STZ   L030158
         LDA   #$000A
         PHA
         LDA   $F4
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         BRL   L0A1337
L0A1315  LDA   #$0004
         STA   L030158
         BRL   L0A1348
L0A131E  LDA   #$0002
         STA   L030158
         BRL   L0A1348
L0A1327  LDA   #$FFFF
         STA   $F4
         BRL   L0A1348
L0A132F  DA    L0A131E
         DA    L0A1327
         DA    L0A1315
         DA    L0A1327
L0A1337  SEC
         SBC   #$0007
         CMP   #$0003
         BCC   L0A1343
         LDA   #$0003
L0A1343  ASL
         TAX
         JMP   (L0A132F,X)

L0A1348  LDA   $F4
         CMP   #$FFFF
         BNE   L0A1355
         JSL   L0A1172
         BRA   L0A1360
L0A1355  PEA   $0000
         PEI   $F4
         JSL   L0A0AA1
         PLY
         PLY
L0A1360  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A136A  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         LDA   $FF
         SEC
         SBC   #$0000
         BVS   L0A1380
         EOR   #$8000
L0A1380  BMI   L0A1385
         BRL   L0A1402
L0A1385  LDA   $FD
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F9
         CLC
         ADC   #$0046
         LDX   $FB
         BCC   L0A13A1
         INX
L0A13A1  JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         STA   $EC
         SEC
         SBC   #$0078
         BEQ   L0A13EF
         BVS   L0A13C0
         EOR   #$8000
L0A13C0  BPL   L0A13EF
         LDA   #$0001
         PHA
         LDA   $FF
         SEC
         JSL   L0222DF
         PLA
         STA   $FF
         LDA   $EC
         SEC
         SBC   #$0096
         BEQ   L0A13ED
         BVS   L0A13DD
         EOR   #$8000
L0A13DD  BPL   L0A13ED
         LDA   #$0001
         PHA
         LDA   $FF
         SEC
         JSL   L0222DF
         PLA
         STA   $FF
L0A13ED  INC   $FF
L0A13EF  LDA   #$00AA
         SEC
         SBC   $EC
         PHA
         PEI   $FF
         JSL   L020493
         PLY
         PLY
         STA   $EC
         BRA   L0A1470
L0A1402  LDA   $FD
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F9
         CLC
         ADC   #$0046
         LDX   $FB
         BCC   L0A141E
         INX
L0A141E  JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDA   $FD
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F9
         CLC
         ADC   #$0046
         LDX   $FB
         BCC   L0A144D
         INX
L0A144D  JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$00FF
         PLX
         STX   $F2
         SEC
         SBC   $F2
         PHA
         PEI   $FF
         JSL   L0204BA
         PLY
         PLY
         STA   $EC
L0A1470  LDA   $FD
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F9
         CLC
         ADC   #$0046
         LDX   $FB
         BCC   L0A148C
         INX
L0A148C  JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         CLC
         ADC   $EC
         SEP   #$20
         LDY   #$0001
         STA   [$EE],Y
         REP   #$20
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0A14B2  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00CA
         TCS
         LDA   L030254
         BNE   L0A14C5
         BRL   L0A150E
L0A14C5  LDA   L030158
         CMP   #$0000
         BNE   L0A14D0
         BRL   L0A1AC9
L0A14D0  LDA   #$0001
         STA   L03021A
         LDA   #$0001
         STA   L03006C
         JSL   L082603
         AND   #$0002
         TAY
         BNE   L0A14F1
         STZ   L03021A
         STZ   L03006C
         STZ   L03006E
         BRA   L0A150B
L0A14F1  JSL   L082EE5
         JSL   L082583
         LDA   #$0001
         STA   L0301FA
         JSL   L0A1172
         PEA   $0000
         JSL   L090262
         PLY
L0A150B  BRL   L0A1AC9
L0A150E  LDA   L030032
         BEQ   L0A1516
         BRL   L0A1AC9
L0A1516  LDAL  L056301
         STA   $F4
         PHA
         JSL   L060280
         PLY
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05048C
         LDX   #^L05048C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0004
         LDA   [$F6],Y
         AND   #$0001
         TAY
         BNE   L0A154F
         BRL   L0A1AC9
L0A154F  PEI   $F4
         JSL   L020B37
         PLY
         STA   $F2
         LDA   #$000A
         PHA
         LDA   $F4
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $CE
         PEI   $F4
         JSL   L060112
         PLY
         STA   $CC
         LDA   L030160
         SEC
         SBC   #$0001
         STA   $F0
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $E8
         STA   $E6
         PEI   $F4
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDA   $F2
         CMP   #$0008
         BCC   L0A1620
         LDA   $F2
         CMP   #$0009
         BEQ   L0A15B5
         BCS   L0A1620
L0A15B5  LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         TAY
         BNE   L0A15CD
         BRL   L0A1AC9
L0A15CD  PEA   $0800
         LDY   #$0044
         LDA   [$E6],Y
         CLC
         ADC   #$0320
         PHA
         JSL   L020493
         PLY
         PLY
         LDY   #$0044
         STA   [$E6],Y
         LDY   #$0002
         LDA   [$EA],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         PHA
         DEC
         AND   #$0003
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$3FFF
         STA   $FA
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $FA
         LDY   #$0002
         STA   [$EA],Y
         PLA
         PLA
         STZ   $EE
         BRA   L0A1635
L0A1620  LDA   $CE
         CMP   #$0008
         BNE   L0A162B
         STZ   $EE
         BRA   L0A1635
L0A162B  LDA   #$FFFF
         STA   [$EA]
         LDA   #$0001
         STA   $EE
L0A1635  JSL   L082EE5
         LDA   $EE
         BEQ   L0A1641
         JSL   L0A4ABD
L0A1641  LDA   $CE
         CMP   #$0008
         BEQ   L0A164B
         BRL   L0A1947
L0A164B  LDY   #$0002
         LDA   [$EA],Y
         AND   #$00FF
         STA   $D4
         LDA   #$0008
         PHA
         LDA   $D4
         CLC
         ADC   #$0001
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$0020
         PLX
         STX   $FA
         CLC
         ADC   $FA
         PHA
         LDA   #$01FF
         SEC
         SBC   $D4
         CLC
         JSL   L021F1A
         PLY
         LSR
         STA   $D2
         LDA   #$0019
         PHA
         LDA   $D4
         CLC
         JSL   L021F1A
         PLY
         CLC
         ADC   #$0008
         STA   $D4
         LDY   #$0002
         LDA   [$EA],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$007F
         BRL   L0A1911
L0A16A4  PEI   $D4
         PEA   $0002
         PEI   $E8
         PEI   $E6
         JSL   L0A136A
         PLY
         PLY
         PLY
         PLY
         BRL   L0A1922
L0A16B8  LDA   #$0023
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$00FF
         CLC
         JSL   L021F1A
         PLY
         CLC
         ADC   #$0005
         PHA
         PEA   $0001
         PEI   $E8
         PEI   $E6
         JSL   L0A136A
         PLY
         PLY
         PLY
         PLY
         BRL   L0A1922
L0A16E1  PEI   $D4
         PEA   $0003
         PEI   $E8
         PEI   $E6
         JSL   L0A136A
         PLY
         PLY
         PLY
         PLY
         BRL   L0A1922
L0A16F5  PEI   $D4
         PEA   $0004
         PEI   $E8
         PEI   $E6
         JSL   L0A136A
         PLY
         PLY
         PLY
         PLY
         BRL   L0A1922
L0A1709  PEI   $F0
         JSL   L0A734E
         PLY
         BRL   L0A1922
L0A1713  LDA   $D2
         PHA
         LDY   #$003A
         LDA   [$E6],Y
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDY   #$0038
         LDA   [$E6],Y
         PHA
         LDY   #$003A
         LDA   [$E6],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         PHA
         JSL   L020493
         PLY
         PLY
         PHA
         LDY   #$0038
         LDA   [$E6],Y
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LDY   #$0038
         STA   [$E6],Y
         BRL   L0A1922
L0A174E  LDA   $D4
         LSR
         PHA
         LDA   $D4
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $D4
         LDY   #$0111
         LDA   [$E6],Y
         SEC
         SBC   #$0032
         BEQ   L0A1774
         BVS   L0A176C
         EOR   #$8000
L0A176C  BPL   L0A1774
         LDA   $D4
         LSR
         LSR
         STA   $D4
L0A1774  LDY   #$0111
         LDA   [$E6],Y
         CLC
         ADC   $D4
         LDY   #$0111
         STA   [$E6],Y
         LDA   #$0048
         SEP   #$20
         STA   $DA
         REP   #$20
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030046
         LDX   #$0000
         TAY
         BPL   L0A179C
         DEX
L0A179C  SEC
         JSL   L0222B8
         LDA   $D4
         PHA
         LDA   $D4
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         JSL   L021F00
         PLA
         PLX
         JSL   L021F9F
         PLA
         PLX
         STX   $D8
         STA   $D6
         LDA   $F0
         SEP   #$20
         STA   $DB
         REP   #$20
         LDA   $D4
         STA   $DC
         PEA   $0000
         TDC
         CLC
         ADC   #$00D6
         PHA
         JSL   L044ED1
         PLY
         PLY
         LDY   #$0030
         LDA   [$E6],Y
         ORA   #$1000
         LDY   #$0030
         STA   [$E6],Y
         BRL   L0A1922
L0A17F2  LDA   $D4
         SEC
         SBC   #$0008
         PHA
         LDY   #$003C
         LDA   [$E6],Y
         CLC
         ADC   $D4
         PLX
         STX   $FA
         CLC
         ADC   $FA
         PHA
         PEA   $0384
         JSL   L020493
         PLY
         PLY
         STA   $CE
         LDY   #$003E
         LDA   [$E6],Y
         CMP   $CE
         BCS   L0A1843
         LDY   #$003E
         LDA   [$E6],Y
         PHA
         LDY   #$003C
         LDA   [$E6],Y
         PHA
         JSL   L0204BA
         PLY
         PLY
         PHA
         LDA   $CE
         PLX
         STX   $FA
         SEC
         SBC   $FA
         LSR
         PHA
         LDA   $CE
         PLX
         STX   $FA
         SEC
         SBC   $FA
         STA   $CE
L0A1843  LDA   $CE
         LDY   #$003C
         STA   [$E6],Y
         BRL   L0A1922
L0A184D  LDA   #$002A
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$00FF
         CLC
         JSL   L021F1A
         PLY
         PHA
         PEA   $0001
         JSL   L0204BA
         PLY
         PLY
         STA   $CE
         LDA   $D2
         PHA
         LDY   #$0036
         LDA   [$E6],Y
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDY   #$0034
         LDA   [$E6],Y
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LDY   #$0034
         STA   [$E6],Y
         LDY   #$0032
         LDA   [$E6],Y
         STA   $D0
         TAY
         BEQ   L0A18CD
         LDA   #$000A
         STA   $D2
L0A1899  STZ   $D4
         BRA   L0A18B3
L0A189D  JSL   L02051C
         PHA
         LDY   #$0032
         LDA   [$E6],Y
         PLX
         STX   $FA
         AND   $FA
         LDY   #$0032
         STA   [$E6],Y
         INC   $D4
L0A18B3  LDA   $D4
         CMP   $CE
         BCC   L0A189D
         LDA   #$0001
         STA   $CE
         LDY   #$0032
         LDA   [$E6],Y
         CMP   $D0
         BNE   L0A18CD
         DEC   $D2
         LDA   $D2
         BNE   L0A1899
L0A18CD  LDY   #$0030
         LDA   [$E6],Y
         ORA   #$2200
         LDY   #$0030
         STA   [$E6],Y
         BRL   L0A1922
L0A18DD  PEA   $0800
         LDY   #$0044
         LDA   [$E6],Y
         CLC
         ADC   #$0640
         PHA
         JSL   L020493
         PLY
         PLY
         LDY   #$0044
         STA   [$E6],Y
         BRL   L0A1922
L0A18F8  BRL   L0A1922
L0A18FB  DA    L0A16A4
         DA    L0A16B8
         DA    L0A16E1
         DA    L0A16F5
         DA    L0A1709
         DA    L0A1713
         DA    L0A174E
         DA    L0A17F2
         DA    L0A184D
         DA    L0A18DD
         DA    L0A18F8
L0A1911  SEC
         SBC   #$0006
         CMP   #$000A
         BCC   L0A191D
         LDA   #$000A
L0A191D  ASL
         TAX
         JMP   (L0A18FB,X)

L0A1922  LDA   #$0014
         AND   #$007F
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$80FF
         STA   $FA
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $FA
         LDY   #$0002
         STA   [$EA],Y
         PLA
         BRA   L0A198E
L0A1947  LDA   $F2
         CMP   #$00A8
         BCC   L0A198E
         LDA   $F2
         CMP   #$00B0
         BCS   L0A198E
         PEA   $0800
         LDA   $F2
         SEC
         SBC   #$00A8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050AF5
         LDX   #^L050AF5
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDY   #$0042
         LDA   [$E6],Y
         PLX
         STX   $FA
         CLC
         ADC   $FA
         PHA
         JSL   L020493
         PLY
         PLY
         LDY   #$0042
         STA   [$E6],Y
L0A198E  LDY   #$0038
         LDA   [$E6],Y
         PHA
         LDY   #$003A
         LDA   [$E6],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BVS   L0A19A4
         EOR   #$8000
L0A19A4  BMI   L0A19B0
         LDY   #$003A
         LDA   [$E6],Y
         LDY   #$0038
         STA   [$E6],Y
L0A19B0  LDY   #$0034
         LDA   [$E6],Y
         PHA
         LDY   #$0036
         LDA   [$E6],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BVS   L0A19C6
         EOR   #$8000
L0A19C6  BMI   L0A19D2
         LDY   #$0036
         LDA   [$E6],Y
         LDY   #$0034
         STA   [$E6],Y
L0A19D2  LDA   $EE
         BEQ   L0A1A16
         LDA   #$0005
         STA   $D2
         BRA   L0A1A0D
L0A19DD  PEA   $002E
         PEA   $0038
         LDA   $D2
         AND   #$0001
         TAY
         BEQ   L0A19F0
         LDA   #$0000
         BRA   L0A19F3
L0A19F0  LDA   #$0001
L0A19F3  PHA
         LDA   #$00CD
         PLX
         STX   $FA
         CLC
         ADC   $FA
         PHA
         JSL   L020F04
         PLY
         PLY
         PLY
         PEA   $0008
         JSL   L020447
         PLY
L0A1A0D  DEC   $D2
         LDA   $D2
         BNE   L0A19DD
         BRL   L0A1A86
L0A1A16  JSL   L0A4763
         PEI   $F4
         JSL   L060112
         PLY
         SEC
         SBC   $CC
         PHA
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$010F
         LDA   [$F6],Y
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LDY   #$010F
         STA   [$F6],Y
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0030
         LDA   [$F6],Y
         ORA   #$0200
         LDY   #$0030
         STA   [$F6],Y
L0A1A86  PEA   $0000
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0008
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         LDY   #$0030
         LDA   [$E6],Y
         ORA   #$0100
         LDY   #$0030
         STA   [$E6],Y
         LDA   L030158
         CMP   #$0000
         BNE   L0A1ABE
         LDY   #$0030
         LDA   [$E6],Y
         ORA   #$0800
         LDY   #$0030
         STA   [$E6],Y
L0A1ABE  PEI   $F0
         JSL   L0A3E20
         PLY
         JSL   L082F35
L0A1AC9  TAY
         TSC
         CLC
         ADC   #$0030
         TCS
         TYA
         PLD
         RTL

L0A1AD3  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         JSL   L0A12A2
         PEA   $0000
         JSL   L090262
         PLY
         LDA   #$0001
         STA   L0301FA
         JSL   L082F35
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0A1AFC  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00D0
         TCS
         JSL   L0A0155
         LDA   L030160
         SEC
         SBC   #$0001
         STA   $EA
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F4
         STA   $F2
         PEA   $0008
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $0014
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   #$003A
         STA   $EE
         STZ   $F0
         BRL   L0A1C2A
L0A1B5F  LDA   $F0
         ORA   #$8000
         PHA
         PEI   $EA
         JSL   L0A55B1
         PLY
         PLY
         PHA
         PEA   $0010
         JSL   L020493
         PLY
         PLY
         STA   $EC
         LDA   $EC
         CMP   #$0001
         BNE   L0A1B83
         BRL   L0A1C28
L0A1B83  LDA   $EC
         SEC
         SBC   #$0002
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0542ED
         LDX   #^L0542ED
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEA   ^L05443D
         PEA   L05443D
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   $F0
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L055463
         LDX   #^L055463
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         PEA   $000D
         PEI   $EE
         PEA   $006C
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $EE
         CLC
         ADC   #$0007
         STA   $EE
L0A1C28  INC   $F0
L0A1C2A  LDA   $F0
         CMP   #$0003
         BNE   L0A1C34
         BRL   L0A1B5F
L0A1C34  BCS   L0A1C39
         BRL   L0A1B5F
L0A1C39  LDA   #$0056
         STA   $EE
         LDA   #$0001
         STA   $F0
         BRL   L0A1D76
L0A1C46  LDA   $F0
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054421
         LDX   #^L054421
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         PEA   $000D
         PEI   $EE
         PEA   $006C
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $F0
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$0046
         LDX   $F4
         BCC   L0A1C96
         INX
L0A1C96  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0001
         LDA   [$F6],Y
         AND   #$00FF
         STA   $EC
         LDA   $F0
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$0046
         LDX   $F4
         BCC   L0A1CC6
         INX
L0A1CC6  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         STA   $E6
         LDA   $EC
         CMP   $E6
         BCS   L0A1CE4
         LDA   #$0008
         STA   $E8
         BRA   L0A1CF8
L0A1CE4  LDA   $EC
         CMP   $E6
         BEQ   L0A1CF3
         BCC   L0A1CF3
         LDA   #$0007
         STA   $E8
         BRA   L0A1CF8
L0A1CF3  LDA   #$000D
         STA   $E8
L0A1CF8  PEA   $0003
         PEA   $0001
         PEI   $EC
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEI   $E8
         PEI   $EE
         PEA   $00AE
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   ^L05443F
         PEA   L05443F
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEA   $0003
         PEA   $0001
         PEI   $E6
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         PEA   $000D
         PEI   $EE
         PEA   $00C0
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $EE
         CLC
         ADC   #$0007
         STA   $EE
         INC   $F0
L0A1D76  LDA   $F0
         CMP   #$0006
         BNE   L0A1D80
         BRL   L0A1C46
L0A1D80  BCS   L0A1D85
         BRL   L0A1C46
L0A1D85  TSC
         CLC
         ADC   #$002A
         TCS
         PLD
         RTL

L0A1D8D  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F0
         TCS
         LDA   #$0001
         STA   L03021A
         LDA   #$0001
         STA   L030068
         JSL   L082603
         AND   #$0002
         TAY
         BNE   L0A1DBA
         STZ   L03021A
         STZ   L030068
         STZ   L03006A
         BRL   L0A1E03
L0A1DBA  JSL   L0703AA
         JSL   L082EE5
         JSL   L082583
         PEA   $0008
         JSL   L020447
         PLY
         PEA   $000D
         PEA   $000C
         PEA   $00CB
         JSL   L0A0000
         PLY
         PLY
         PLY
         LDA   L030254
         BEQ   L0A1DE9
         JSL   L0A1AFC
         BRA   L0A1DFB
L0A1DE9  JSL   L020D92
         PEA   $0001
         LDAL  L056301
         PHA
         JSL   L0A0AA1
         PLY
         PLY
L0A1DFB  PEA   $0000
         JSL   L090262
         PLY
L0A1E03  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A1E0D  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         PEA   $000D
         PEA   $000C
         PEA   $00CA
         JSL   L0A0000
         PLY
         PLY
         PLY
         JSL   L0A12A2
         PEA   $0000
         JSL   L090262
         PLY
         LDAL  L056301
         STA   $F4
         CMP   #$FFFF
         BEQ   L0A1E46
         PEI   $F4
         JSL   L020C94
         PLY
L0A1E46  JSL   L082F35
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0A1E52  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EA
         TCS
         STZ   L03012C
         LDA   #$0000
         STA   $F0
         LDA   #$001C
         STA   $F2
         LDA   $FF
         PHA
         LDA   #$0045
         SEC
         JSL   L0220A5
         PLA
         CLC
         ADC   #$0007
         STA   $EC
         CLC
         ADC   #$001F
         STA   $EE
         PEA   $FFFF
         PEA   $0010
         PEA   $0000
         TDC
         CLC
         ADC   #$00EC
         PHA
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   $F4
         LDX   $F6
         CLC
         ADC   #$014F
         BCC   L0A1EBD
         INX
L0A1EBD  PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L0A1ED3  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EC
         TCS
         LDA   $FF
         CMP   #$0004
         BEQ   L0A1F10
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0034
         LDA   [$F4],Y
         BNE   L0A1F10
         BRL   L0A210F
L0A1F10  LDA   L03006C
         BNE   L0A1F1A
         LDA   L030068
         BEQ   L0A1F1D
L0A1F1A  BRL   L0A210F
L0A1F1D  LDA   #$0001
         STA   L03001C
         LDA   L030102
         CMP   #$022B
         BNE   L0A1F4D
         LDX   #$0000
         LDA   #$03E8
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         SEC
         SBC   L030250
         PHA
         TXA
         SBC   L030252
         TAX
         PLA
         JSL   L022171
         BCS   L0A1F4D
         INC   L030066
L0A1F4D  LDA   L030160
         STA   $F2
         LDA   $FF
         CLC
         ADC   #$0001
         CMP   $F2
         BNE   L0A1F61
         LDA   #$0004
         STA   $FF
L0A1F61  JSL   L082EE5
         LDA   $F2
         BNE   L0A1F6C
         BRL   L0A2004
L0A1F6C  STZ   L030160
         JSL   L0A0155
         LDA   $F2
         SEC
         SBC   #$0001
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0034
         LDA   [$EE],Y
         BEQ   L0A1FBD
         LDA   L030032
         BNE   L0A1FBD
         LDY   #$0030
         LDA   [$EE],Y
         ORA   #$1000
         LDY   #$0030
         STA   [$EE],Y
         LDA   $F2
         SEC
         SBC   #$0001
         PHA
         JSL   L0A3E20
         PLY
L0A1FBD  LDA   L030034
         BEQ   L0A1FC9
         JSL   L082F35
         BRL   L0A210F
L0A1FC9  LDA   $FF
         CMP   #$0004
         BEQ   L0A1FD3
         BRL   L0A2004
L0A1FD3  LDA   #$0001
         STA   L030062
         JSL   L07313E
         JSL   L082F35
         LDA   #L051386
         LDX   #^L051386
         STX   L0300E8
         STA   L0300E6
         LDA   #L05183A
         LDX   #^L05183A
         STX   L0300F0
         STA   L0300EE
         JSL   L0703AA
         JSL   L0C13B4
         BRL   L0A210F
L0A2004  STZ   L03012C
         LDA   $FF
         CLC
         ADC   #$0001
         STA   L030160
         LDA   $F2
         BNE   L0A2024
         PEA   $0000
         PEA   ^L0581B2
         PEA   L0581B2
         JSL   L080EDB
         PLY
         PLY
         PLY
L0A2024  LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         PEA   $0011
         JSL   L0B21FE
         PLY
         PLY
         PLY
         LDA   L030032
         BEQ   L0A207C
         PEA   $0070
         PEA   $000C
         PEA   ^L0585F8
         PEA   L0585F8
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L080D64
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0A207C  PEA   ^L054441
         PEA   L054441
         PEA   $000D
         PEA   $0074
         PEA   $0005
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   ^L054448
         PEA   L054448
         PEA   $000D
         PEA   $007C
         PEA   $0005
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   ^L054450
         PEA   L054450
         PEA   $000D
         PEA   $0084
         PEA   $0005
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         STZ   $F2
         BRA   L0A20D4
L0A20C8  PEI   $F2
         PEI   $FF
         JSL   L0A3BC8
         PLY
         PLY
         INC   $F2
L0A20D4  LDA   $F2
         CMP   #$001E
         BCC   L0A20C8
         LDY   #$0030
         LDA   [$EE],Y
         ORA   #$5B80
         LDY   #$0030
         STA   [$EE],Y
         PEI   $FF
         JSL   L0A3E20
         PLY
         LDA   #$0001
         STA   L0301FC
         JSL   L082F35
         LDA   #L0513F2
         LDX   #^L0513F2
         STX   L0300E8
         STA   L0300E6
         STZ   L0300EE
         STZ   L0300F0
         JSL   L0703AA
L0A210F  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A2119  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00DE
         TCS
         LDA   L030030
         BEQ   L0A212C
         BRL   L0A21D1
L0A212C  LDAL  L056301
         STA   $E0
         CMP   #$FFFF
         BNE   L0A214A
         LDA   #$0001
         STA   L030254
         LDA   #$FFFF
         STAL  L056303
         JSL   L08294C
         BRA   L0A2155
L0A214A  PEA   $0001
         PEI   $E0
         JSL   L0A49CF
         PLY
         PLY
L0A2155  LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F4
         STA   $F2
         STZ   $EC
         BRA   L0A2196
L0A2163  LDY   #$0030
         LDA   [$F2],Y
         AND   #$007F
         LDY   #$0030
         STA   [$F2],Y
         LDY   #$0030
         LDA   [$F2],Y
         ORA   #$9400
         LDY   #$0030
         STA   [$F2],Y
         LDA   $EC
         INC   $EC
         LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $F2
         LDA   $F4
         BCC   L0A2192
         INC
L0A2192  STA   $F4
         PLA
         PLX
L0A2196  LDA   $EC
         CMP   L03003E
         BCC   L0A2163
         JSL   L0A4571
         LDA   L03024E
         STA   $EC
         CMP   #$FFFF
         BEQ   L0A21B8
         LDA   #$FFFF
         STA   L03024E
         PEI   $EC
         JSL   L070C99
         PLY
L0A21B8  LDA   L0301EC
         STA   $EC
         CMP   #$FFFF
         BEQ   L0A21CF
         LDA   #$FFFF
         STA   L0301EC
         PEI   $EC
         JSL   L073014
         PLY
L0A21CF  BRA   L0A21E5
L0A21D1  LDA   #$FFFF
         STAL  L056301
         LDA   #$FFFF
         STAL  L056303
         LDA   #$0001
         STA   L030254
L0A21E5  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L0A21EF  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         STZ   $EC
         STZ   $EE
         BRA   L0A2228
L0A2200  LDX   $FD
         LDA   $FB
         INC   $FB
         BNE   L0A220A
         INC   $FD
L0A220A  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         SEC
         SBC   #$0041
         PHA
         LDA   $EC
         ASL
         ASL
         ASL
         ASL
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EC
         INC   $EE
L0A2228  LDA   $FF
         CMP   $EE
         BEQ   L0A2230
         BCS   L0A2200
L0A2230  LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A223C  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$0083
         TCS
         LDA   L030254
         BNE   L0A224F
         BRL   L0A2A27
L0A224F  LDA   L03003E
         CMP   #$0004
         BNE   L0A225A
         BRL   L0A2A27
L0A225A  LDA   L03003E
         STA   $E2
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F2
         STA   $F0
         PEA   $031F
         PEI   $F2
         PEI   $F0
         JSL   L020232
         PLY
         PLY
         PLY
         LDA   #$0001
         STA   L03012C
         PEA   $FFFF
         PEA   $0010
         PEA   $0080
         LDA   $FF
         LSR
         LSR
         LSR
         PHA
         LDA   #$001D
         CLC
         JSL   L0220A5
         LDA   $FF
         AND   #$0007
         ASL
         ASL
         ASL
         ASL
         ASL
         PHA
         PEA   ^L0587D8
         PEA   L0587D8
         LDA   $F0
         CLC
         ADC   #$014F
         TAX
         LDA   $F2
         BCC   L0A22C6
         INC
L0A22C6  PHA
         PHX
         PEA   $001A
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDA   #$0001
         SEP   #$20
         LDY   #$001E
         STA   [$F0],Y
         REP   #$20
         LDA   #$0002
         SEP   #$20
         LDY   #$001F
         STA   [$F0],Y
         REP   #$20
         LDA   #$00FF
         SEP   #$20
         LDY   #$0020
         STA   [$F0],Y
         REP   #$20
         LDA   #$FFFF
         LDY   #$002C
         STA   [$F0],Y
         LDA   #$FFFF
         LDY   #$002E
         STA   [$F0],Y
         LDA   L030044
         SEP   #$20
         LDY   #$001C
         STA   [$F0],Y
         REP   #$20
         STZ   $E8
L0A2320  LDA   $E8
         CLC
         ADC   L030044
         AND   #$0003
         PHA
         JSL   L0A34BE
         PLY
         CMP   #$FFFF
         BEQ   L0A2338
         INC   $E8
         BRA   L0A2320
L0A2338  LDA   $E8
         CLC
         ADC   L030044
         AND   #$0003
         SEP   #$20
         LDY   #$001D
         STA   [$F0],Y
         REP   #$20
         LDA   #$0400
         LDY   #$0030
         STA   [$F0],Y
         LDA   L030044
         SEP   #$20
         LDY   #$0028
         STA   [$F0],Y
         REP   #$20
         JSL   L02051C
         AND   #$00FF
         PHA
         LDA   #$05DC
         PLX
         STX   $F8
         CLC
         ADC   $F8
         LDY   #$0042
         STA   [$F0],Y
         JSL   L02051C
         AND   #$00FF
         PHA
         LDA   #$05DC
         PLX
         STX   $F8
         CLC
         ADC   $F8
         LDY   #$0044
         STA   [$F0],Y
         STZ   $E8
         BRA   L0A23B2
L0A238E  LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A23A1
         INX
L0A23A1  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$FFFF
         STA   [$F4]
         INC   $E8
L0A23B2  LDA   $E8
         CMP   #$001E
         BCC   L0A238E
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         JSL   L060E4D
         PLY
         PLY
         STA   $EA
L0A23C9  LDA   #$000A
         PHA
         LDA   $EA
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0002
         BEQ   L0A23E8
         PEI   $EA
         JSL   L060D39
         PLY
         STA   $EA
         BRA   L0A23C9
L0A23E8  PEA   $8002
         PEI   $EA
         LDX   #$0000
         TDC
         CLC
         ADC   #$0085
         STX   $EE
         STA   $EC
         PHX
         PHA
         JSL   L0619C4
         PLY
         PLY
         PLY
         PLY
         STZ   $E8
L0A2405  LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L0A240F
         INC   $EE
L0A240F  STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         STA   $E4
         CMP   #$000A
         BEQ   L0A2442
         LDA   $E4
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         BRA   L0A2405
L0A2442  LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         SEP   #$20
         STA   [$F4]
         REP   #$20
         STZ   $E8
         STZ   $E0
L0A2464  LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L0A246E
         INC   $EE
L0A246E  STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         STA   $E4
         LDA   $E4
         CMP   #$000A
         BNE   L0A248F
         LDA   $E0
         BEQ   L0A2488
         BRA   L0A24B9
         BRA   L0A248F
L0A2488  LDA   #$0001
         STA   $E0
         BRA   L0A24B7
L0A248F  LDA   $E4
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0008
         LDX   $F2
         BCC   L0A24A6
         INX
L0A24A6  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
L0A24B7  BRA   L0A2464
L0A24B9  LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0008
         LDX   $F2
         BCC   L0A24CB
         INX
L0A24CB  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         SEP   #$20
         STA   [$F4]
         REP   #$20
         LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L0A24E8
         INC   $EE
L0A24E8  STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         CMP   #$004D
         BNE   L0A2503
         LDY   #$0030
         LDA   [$F0],Y
         ORA   #$0010
         LDY   #$0030
         STA   [$F0],Y
L0A2503  INC   $EC
         BNE   L0A2509
         INC   $EE
L0A2509  PEA   $0004
         PEI   $EE
         PEI   $EC
         JSL   L0A21EF
         PLY
         PLY
         PLY
         LDY   #$0036
         STA   [$F0],Y
         LDY   #$0034
         STA   [$F0],Y
         LDX   $EE
         LDA   $EC
         CLC
         ADC   #$0004
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $EE
         STA   $EC
         PEA   $0004
         PEI   $EE
         PEI   $EC
         JSL   L0A21EF
         PLY
         PLY
         PLY
         LDY   #$003A
         STA   [$F0],Y
         LDY   #$0038
         STA   [$F0],Y
         LDX   $EE
         LDA   $EC
         CLC
         ADC   #$0004
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $EE
         STA   $EC
         PEA   $0004
         PEI   $EE
         PEI   $EC
         JSL   L0A21EF
         PLY
         PLY
         PLY
         LDY   #$003E
         STA   [$F0],Y
         LDY   #$003C
         STA   [$F0],Y
         LDX   $EE
         LDA   $EC
         CLC
         ADC   #$0004
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $EE
         STA   $EC
         INC   $EC
         BNE   L0A2590
         INC   $EE
L0A2590  STZ   $E8
         BRL   L0A2649
L0A2595  LDA   $E8
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0046
         LDX   $F2
         BCC   L0A25B1
         INX
L0A25B1  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$001E
         SEP   #$20
         LDY   #$0002
         STA   [$F4],Y
         REP   #$20
         PEA   $0002
         PEI   $EE
         PEI   $EC
         JSL   L0A21EF
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0046
         LDX   $F2
         BCC   L0A25F2
         INX
L0A25F2  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         STA   [$F4]
         REP   #$20
         PHA
         LDA   $E8
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0046
         LDX   $F2
         BCC   L0A2620
         INX
L0A2620  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         SEP   #$20
         LDY   #$0001
         STA   [$F4],Y
         REP   #$20
         LDX   $EE
         LDA   $EC
         CLC
         ADC   #$0002
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $EE
         STA   $EC
         INC   $E8
L0A2649  LDA   $E8
         CMP   #$0006
         BNE   L0A2653
         BRL   L0A2595
L0A2653  BCS   L0A2658
         BRL   L0A2595
L0A2658  LDA   $F0
         CLC
         ADC   #$0046
         LDX   $F2
         BCC   L0A2663
         INX
L0A2663  STA   $F4
         STX   $F6
         LDA   #$000A
         SEP   #$20
         LDY   #$0002
         STA   [$F4],Y
         REP   #$20
         INC   $EC
         BNE   L0A2679
         INC   $EE
L0A2679  LDA   #$0004
         STA   $E8
         BRA   L0A26E9
L0A2680  LDX   $EE
         LDA   $EC
         INC   $EC
         BNE   L0A268A
         INC   $EE
L0A268A  STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         SEC
         SBC   #$0041
         STA   $E4
         CMP   #$0000
         BEQ   L0A26E7
         BCC   L0A26E7
         LDA   $E4
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         LDA   #$007D
         SEC
         JSL   L0222B8
         LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$005B
         LDX   $F2
         BCC   L0A26CE
         INX
L0A26CE  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         PLX
         LDY   #$0004
         PHA
         TXA
         STA   [$F4],Y
         PLA
         LDY   #$0002
         STA   [$F4],Y
L0A26E7  INC   $E8
L0A26E9  LDA   $E8
         CMP   #$0013
         BEQ   L0A2680
         BCC   L0A2680
         STZ   $E8
         BRL   L0A278F
L0A26F7  STZ   $D2
         STZ   $D4
         LDA   $E8
         CLC
         ADC   #$0001
         ASL
         ASL
         STA   $E6
         STZ   $E0
         BRA   L0A274F
L0A2709  LDA   $E6
         CLC
         ADC   $E0
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$005B
         LDX   $F2
         BCC   L0A2728
         INX
L0A2728  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0004
         LDA   [$F4],Y
         TAX
         LDY   #$0002
         LDA   [$F4],Y
         PHX
         PHA
         LDX   $D4
         LDA   $D2
         JSL   L021F00
         PLA
         PLX
         STX   $D4
         STA   $D2
         INC   $E0
L0A274F  LDA   $E0
         CMP   #$0004
         BCC   L0A2709
         LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$005B
         LDX   $F2
         BCC   L0A2772
         INX
L0A2772  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDX   $D4
         LDA   $D2
         LDY   #$0004
         PHA
         TXA
         STA   [$F4],Y
         PLA
         LDY   #$0002
         STA   [$F4],Y
         INC   $E8
L0A278F  LDA   $E8
         CMP   #$0003
         BNE   L0A2799
         BRL   L0A26F7
L0A2799  BCS   L0A279E
         BRL   L0A26F7
L0A279E  LDA   $E2
         CLC
         ADC   #$0001
         STA   L030032
         LDA   L03003E
         INC
         STA   L03003E
         CMP   #$0001
         BNE   L0A27C3
         PEA   $0000
         JSL   L070C99
         PLY
         LDA   #$0001
         STA   L0301F2
         BRA   L0A27D4
L0A27C3  JSL   L0728D0
         LDA   L03003E
         SEC
         SBC   #$0001
         PHA
         JSL   L0725BC
         PLY
L0A27D4  LDA   L030040
         STA   $DC
         LDA   L030042
         STA   $DA
         LDA   L030044
         CLC
         ADC   #$0002
         AND   #$0003
         STA   $D8
         LDA   L030044
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05045C
         LDX   #^L05045C
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $DC
         PLX
         STX   $F8
         CLC
         ADC   $F8
         STA   $DC
         LDA   L030044
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050464
         LDX   #^L050464
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $DA
         PLX
         STX   $F8
         CLC
         ADC   $F8
         STA   $DA
         PEI   $DA
         PEI   $DC
         JSL   L060E4D
         PLY
         PLY
         STA   $EA
         LDA   #$000D
         STA   $E8
L0A2847  LDA   $EA
         CMP   #$FFFE
         BNE   L0A2851
         BRL   L0A2A1C
L0A2851  LDA   #$000A
         PHA
         LDA   $EA
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E4
         CMP   #$0003
         BNE   L0A286A
         BRL   L0A2A10
L0A286A  BCS   L0A286F
         BRL   L0A2A10
L0A286F  LDA   #$000E
         PHA
         LDA   $EA
         CLC
         JSL   L0222DF
         PLA
         CMP   $D8
         BEQ   L0A2882
         BRL   L0A2A10
L0A2882  PEI   $EA
         JSL   L060280
         PLY
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05048C
         LDX   #^L05048C
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0004
         LDA   [$F4],Y
         STA   $D6
         LDA   $E4
         BRL   L0A29CC
L0A28B4  LDA   #$0002
         STA   $DE
         BRA   L0A28E5
L0A28BB  LDA   $DE
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L058580
         LDX   #^L058580
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $D6
         PLX
         STX   $F8
         AND   $F8
         TAY
         BEQ   L0A28E3
         BRL   L0A29DD
L0A28E3  INC   $DE
L0A28E5  LDA   $DE
         CMP   #$0005
         BEQ   L0A28BB
         BCC   L0A28BB
         LDA   $D6
         ANDL  L058594
         TAY
         BEQ   L0A2917
         LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A2902
         INX
L0A2902  STA   $F4
         STX   $F6
         LDY   #$0014
         LDA   [$F4],Y
         CMP   #$FFFF
         BNE   L0A2917
         LDA   #$000A
         STA   $DE
         BRA   L0A291A
L0A2917  BRL   L0A2989
L0A291A  BRL   L0A29DD
L0A291D  LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A2928
         INX
L0A2928  STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         CMP   #$FFFF
         BNE   L0A293D
         LDA   #$0001
         STA   $DE
         BRA   L0A2940
L0A293D  BRL   L0A2989
L0A2940  BRL   L0A29DD
L0A2943  LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A294E
         INX
L0A294E  STA   $F4
         STX   $F6
         LDY   #$0016
         LDA   [$F4],Y
         CMP   #$FFFF
         BNE   L0A2963
         LDA   #$000B
         STA   $DE
         BRA   L0A2986
L0A2963  LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A296E
         INX
L0A296E  STA   $F4
         STX   $F6
         LDY   #$000C
         LDA   [$F4],Y
         CMP   #$FFFF
         BNE   L0A2983
         LDA   #$0006
         STA   $DE
         BRA   L0A2986
L0A2983  BRL   L0A2989
L0A2986  BRL   L0A29DD
L0A2989  LDA   $D6
         ANDL  L058594
         TAY
         BEQ   L0A29B2
         LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A299D
         INX
L0A299D  STA   $F4
         STX   $F6
         LDY   #$0014
         LDA   [$F4],Y
         CMP   #$FFFF
         BNE   L0A29B2
         LDA   #$000A
         STA   $DE
         BRA   L0A29B8
L0A29B2  LDA   $E8
         INC   $E8
         STA   $DE
L0A29B8  BRL   L0A29DD
L0A29BB  BRL   L0A29DD
L0A29BE  DA    L0A291D
         DA    L0A28B4
         DA    L0A2943
         DA    L0A2943
         DA    L0A2989
         DA    L0A2989
         DA    L0A29BB
L0A29CC  SEC
         SBC   #$0005
         CMP   #$0006
         BCC   L0A29D8
         LDA   #$0006
L0A29D8  ASL
         TAX
         JMP   (L0A29BE,X)

L0A29DD  LDA   $DE
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L0A29F0
         INX
L0A29F0  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         CMP   #$FFFF
         BEQ   L0A2A03
         BRA   L0A2989
L0A2A03  PEI   $DE
         PEI   $EA
         PEI   $E2
         JSL   L0A516C
         PLY
         PLY
         PLY
L0A2A10  PEI   $EA
         JSL   L060D39
         PLY
         STA   $EA
         BRL   L0A2847
L0A2A1C  PEI   $E2
         JSL   L0A1ED3
         PLY
         JSL   L0D4849
L0A2A27  TAY
         TSC
         CLC
         ADC   #$0075
         TCS
         TYA
         PLD
         RTL

L0A2A31  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00C6
         TCS
         LDA   #$0003
         STA   $DE
         LDA   #$0008
         STA   $E0
         LDA   #$0003
         STA   $DA
         CLC
         ADC   #$00A7
         STA   $DC
         PEA   $0070
         PEA   $000C
         PEA   $0000
         TDC
         CLC
         ADC   #$00DA
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L080D64
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0004
         PEA   $0048
         PEA   ^L058550
         PEA   L058550
         PEA   $001B
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   ^L055473
         PEA   L055473
         PEA   $000D
         PEA   $003A
         PEA   $00B1
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   ^L05547B
         PEA   L05547B
         PEA   $000D
         PEA   $004C
         PEA   $0069
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L082EE5
         PEA   $0000
         JSL   L090262
         PLY
         PEA   $0000
         JSL   L082634
         PLY
         JSL   L082F35
         LDA   #$0000
         STA   $EC
         LDX   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         SEP   #$20
         STA   [$F2]
         REP   #$20
         LDA   $FD
         CLC
         ADC   #$0008
         LDX   $FF
         BCC   L0A2B0A
         INX
L0A2B0A  STA   $F2
         STX   $F4
         LDA   #$0000
         SEP   #$20
         STA   [$F2]
         REP   #$20
         LDA   #$0001
         STA   $EA
         LDX   $FF
         LDA   $FD
         STX   $F0
         STA   $EE
         LDA   #$00B1
         STA   $E4
         LDA   #$005B
         STA   $E2
         JSL   L082603
         AND   #$0002
         STA   $D2
L0A2B37  LDA   $EA
         CMP   #$0002
         BNE   L0A2B45
         LDA   $EC
         CMP   #$0013
         BEQ   L0A2B4A
L0A2B45  LDA   #$0000
         BRA   L0A2B4D
L0A2B4A  LDA   #$0001
L0A2B4D  STA   $E6
         TAY
         BNE   L0A2B81
         JSL   L082EE5
         PEA   ^L0587F2
         PEA   L0587F2
         PEA   $000C
         PEA   $0009
         PEI   $E2
         PEI   $E4
         PEA   $00A0
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         JSL   L082F35
L0A2B81  JSL   L081DFE
         TAY
         BEQ   L0A2B8B
         BRL   L0A2E02
L0A2B8B  JSL   L082603
         AND   #$0002
         STA   $D4
         LDA   $D4
         BNE   L0A2B9B
         BRL   L0A2DF7
L0A2B9B  LDA   $D2
         BEQ   L0A2BA2
         BRL   L0A2DF7
L0A2BA2  JSL   L0825B1
         STA   $D8
         JSL   L0825DA
         STA   $D6
         LDA   $EA
         CMP   #$0002
         BEQ   L0A2BC4
         LDA   $EC
         CMP   #$0000
         BNE   L0A2BBF
         BRL   L0A2CD8
L0A2BBF  BCS   L0A2BC4
         BRL   L0A2CD8
L0A2BC4  LDA   $D8
         CMP   #$00C5
         BCS   L0A2BCE
         BRL   L0A2CD8
L0A2BCE  LDA   $D8
         CMP   #$00D7
         BEQ   L0A2BDA
         BCC   L0A2BDA
         BRL   L0A2CD8
L0A2BDA  LDA   $D6
         CMP   #$0093
         BCS   L0A2BE4
         BRL   L0A2CD8
L0A2BE4  LDA   $D6
         CMP   #$009B
         BEQ   L0A2BF0
         BCC   L0A2BF0
         BRL   L0A2CD8
L0A2BF0  LDA   $EC
         STA   $D0
         LDX   $FF
         LDA   $FD
         STX   $F0
         STA   $EE
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00C8
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEI   $F0
         PEI   $EE
         JSL   L022405
         PLY
         PLY
         STA   $EC
L0A2C1B  DEC   $EC
         LDA   $EC
         LDX   #$0000
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         CMP   #$0020
         BNE   L0A2C5C
         LDA   $EC
         LDX   #$0000
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         SEP   #$20
         STA   [$F2]
         REP   #$20
         BRA   L0A2C1B
L0A2C5C  STZ   $EC
         BRA   L0A2C90
L0A2C60  PEI   $F0
         PEI   $EE
         LDA   $EC
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         JSL   L022457
         PLY
         PLY
         PLY
         PLY
         CMP   #$0000
         BNE   L0A2C8E
         BRA   L0A2CA0
L0A2C8E  INC   $EC
L0A2C90  LDA   L03003E
         SEC
         SBC   #$0001
         CMP   $EC
         BEQ   L0A2C9D
         BCS   L0A2C60
L0A2C9D  BRL   L0A304B
L0A2CA0  LDA   $EA
         CMP   #$0002
         BNE   L0A2CB6
         LDA   $FD
         CLC
         ADC   #$0008
         LDX   $FF
         BCC   L0A2CB2
         INX
L0A2CB2  STX   $F0
         STA   $EE
L0A2CB6  PEA   $0000
         TDC
         CLC
         ADC   #$00C8
         PHA
         LDX   $FF
         LDA   $FD
         STX   $F0
         STA   $EE
         PHX
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         LDA   $D0
         STA   $EC
         BRL   L0A2DF7
L0A2CD8  LDA   $D8
         CMP   #$006B
         BCC   L0A2D03
         LDA   $D8
         CMP   #$00AF
         BEQ   L0A2CE8
         BCS   L0A2D03
L0A2CE8  LDA   $D6
         CMP   #$0093
         BCC   L0A2D03
         LDA   $D6
         CMP   #$009B
         BEQ   L0A2CF8
         BCS   L0A2D03
L0A2CF8  LDA   #$0008
         STA   $E8
         BRL   L0A2E02
         BRL   L0A2DF7
L0A2D03  LDA   $D8
         CMP   #$006B
         BCC   L0A2D23
         LDA   $D8
         CMP   #$00D7
         BEQ   L0A2D13
         BCS   L0A2D23
L0A2D13  LDA   $D6
         CMP   #$0074
         BCC   L0A2D23
         LDA   $D6
         CMP   #$0090
         BEQ   L0A2D26
         BCC   L0A2D26
L0A2D23  BRL   L0A2DF7
L0A2D26  LDA   #$000A
         PHA
         LDA   $D8
         CLC
         ADC   #$0004
         CLC
         JSL   L021F1A
         PLA
         CMP   #$0000
         BEQ   L0A2D5E
         LDA   #$000A
         PHA
         LDA   $D6
         CLC
         ADC   #$0005
         CLC
         JSL   L021F1A
         PLA
         CMP   #$0000
         BNE   L0A2D61
         LDA   $D8
         CMP   #$00CF
         BCC   L0A2D5E
         LDA   $D6
         CMP   #$0087
         BEQ   L0A2D61
L0A2D5E  BRL   L0A2DF7
L0A2D61  LDA   #$000A
         PHA
         LDA   $D8
         SEC
         SBC   #$006B
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$000A
         PHA
         LDA   $D6
         SEC
         SBC   #$0074
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$000B
         CLC
         JSL   L0220A5
         LDA   #$0041
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         LDA   $E8
         CMP   #$0056
         BEQ   L0A2DAA
         LDA   $E8
         CMP   #$0061
         BNE   L0A2DB1
L0A2DAA  LDA   #$000D
         STA   $E8
         BRA   L0A2E02
L0A2DB1  LDA   $E8
         SEC
         SBC   #$0057
         BVS   L0A2DBC
         EOR   #$8000
L0A2DBC  BPL   L0A2DC0
         DEC   $E8
L0A2DC0  LDA   $E8
         SEC
         SBC   #$005A
         BEQ   L0A2DF5
         BVS   L0A2DCD
         EOR   #$8000
L0A2DCD  BPL   L0A2DF5
         LDA   $E8
         SEC
         SBC   #$005A
         SEC
         SBC   #$0001
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587F6
         LDX   #^L0587F6
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         STA   $E8
L0A2DF5  BRA   L0A2E02
L0A2DF7  LDA   $D4
         STA   $D2
         JSL   L0901A7
         BRL   L0A2B81
L0A2E02  LDA   $D4
         STA   $D2
         JSL   L081DFE
         TAY
         BEQ   L0A2E13
         JSL   L081E53
         STA   $E8
L0A2E13  LDA   $E8
         SEC
         SBC   #$0061
         BVS   L0A2E1E
         EOR   #$8000
L0A2E1E  BPL   L0A2E37
         LDA   $E8
         SEC
         SBC   #$007A
         BEQ   L0A2E2F
         BVS   L0A2E2D
         EOR   #$8000
L0A2E2D  BMI   L0A2E37
L0A2E2F  LDA   $E8
         SEC
         SBC   #$0020
         STA   $E8
L0A2E37  LDA   $E8
         SEC
         SBC   #$0041
         BVS   L0A2E42
         EOR   #$8000
L0A2E42  BPL   L0A2E53
         LDA   $E8
         SEC
         SBC   #$005A
         BEQ   L0A2E79
         BVS   L0A2E51
         EOR   #$8000
L0A2E51  BPL   L0A2E79
L0A2E53  LDA   $E8
         CMP   #$002E
         BEQ   L0A2E79
         LDA   $E8
         CMP   #$002C
         BEQ   L0A2E79
         LDA   $E8
         CMP   #$003B
         BEQ   L0A2E79
         LDA   $E8
         CMP   #$003A
         BEQ   L0A2E79
         LDA   $E8
         CMP   #$0020
         BEQ   L0A2E79
         BRL   L0A2F25
L0A2E79  LDA   $E8
         CMP   #$0020
         BNE   L0A2E8A
         LDA   $EC
         CMP   #$0000
         BNE   L0A2E8A
         BRL   L0A2F22
L0A2E8A  LDA   $E6
         BEQ   L0A2E91
         BRL   L0A2F22
L0A2E91  LDA   $E8
         SEP   #$20
         STAL  L0587F4
         REP   #$20
         JSL   L082EE5
         PEA   ^L0587F4
         PEA   L0587F4
         PEA   $000C
         PEA   $000D
         PEI   $E2
         PEI   $E4
         PEA   $00A0
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         JSL   L082F35
         LDA   $E8
         PHA
         LDA   $EC
         INC   $EC
         LDX   #$0000
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         SEP   #$20
         STA   [$F2]
         REP   #$20
         LDA   $EC
         LDX   #$0000
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         SEP   #$20
         STA   [$F2]
         REP   #$20
         LDA   $E4
         CLC
         ADC   #$0006
         STA   $E4
         LDA   $EA
         CMP   #$0001
         BNE   L0A2F22
         LDA   $EC
         CMP   #$0007
         BNE   L0A2F22
         BRL   L0A2F6E
L0A2F22  BRL   L0A3048
L0A2F25  LDA   $E8
         CMP   #$000D
         BEQ   L0A2F2F
         BRL   L0A2F91
L0A2F2F  LDA   $EA
         CMP   #$0001
         BNE   L0A2F8E
         LDA   $EC
         CMP   #$0000
         BEQ   L0A2F8E
         BCC   L0A2F8E
         JSL   L082EE5
         PEA   ^L0587F2
         PEA   L0587F2
         PEA   $000C
         PEA   $000D
         PEI   $E2
         PEI   $E4
         PEA   $00A0
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         JSL   L082F35
L0A2F6E  LDA   #$0002
         STA   $EA
         LDA   $FD
         CLC
         ADC   #$0008
         LDX   $FF
         BCC   L0A2F7E
         INX
L0A2F7E  STX   $F0
         STA   $EE
         LDA   #$0069
         STA   $E4
         LDA   #$006D
         STA   $E2
         STZ   $EC
L0A2F8E  BRL   L0A3048
L0A2F91  LDA   $E8
         CMP   #$0008
         BEQ   L0A2F9B
         BRL   L0A3048
L0A2F9B  LDA   $EA
         CMP   #$0001
         BNE   L0A2FAC
         LDA   $EC
         CMP   #$0000
         BNE   L0A2FAC
         BRL   L0A3048
L0A2FAC  LDA   $E6
         BNE   L0A2FDF
         JSL   L082EE5
         PEA   ^L0587F2
         PEA   L0587F2
         PEA   $000C
         PEA   $000D
         PEI   $E2
         PEI   $E4
         PEA   $00A0
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         JSL   L082F35
L0A2FDF  LDA   $EC
         CMP   #$0000
         BNE   L0A3020
         LDX   $FF
         LDA   $FD
         STX   $F0
         STA   $EE
         PEI   $F0
         PEI   $EE
         JSL   L022405
         PLY
         PLY
         SEC
         SBC   #$0001
         STA   $EC
         LDA   #$0001
         STA   $EA
         LDA   $EC
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         LDA   #$00B1
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E4
         LDA   #$005B
         STA   $E2
         BRA   L0A302A
L0A3020  DEC   $EC
         LDA   $E4
         SEC
         SBC   #$0006
         STA   $E4
L0A302A  LDA   $EC
         LDX   #$0000
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         SEP   #$20
         STA   [$F2]
         REP   #$20
L0A3048  BRL   L0A2B37
L0A304B  TAY
         TSC
         CLC
         ADC   #$0030
         TCS
         TYA
         PLD
         RTL

L0A3055  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00D6
         TCS
         LDA   L03003E
         SEC
         SBC   #$0001
         STA   $F2
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EA
         STA   $E8
         LDA   $FF
         CMP   #$00A2
         BEQ   L0A3092
         BRL   L0A3122
L0A3092  PEA   $0004
         JSL   L0A1ED3
         PLY
         STZ   L030032
         LDA   L03003E
         CMP   #$0001
         BNE   L0A30AD
         PEA   $FFFF
         JSL   L070C99
         PLY
L0A30AD  DEC   L03003E
         LDA   #$0000
         STA   $DC
         LDA   #$001C
         STA   $DE
         LDA   $F2
         PHA
         LDA   #$0045
         CLC
         JSL   L0220A5
         PLA
         STA   $D8
         CLC
         ADC   #$0042
         STA   $DA
         STZ   L03012C
         JSL   L082EE5
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00D8
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0000
         LDY   #$001D
         LDA   [$E8],Y
         AND   #$00FF
         CLC
         ADC   #$0004
         SEC
         SBC   L030044
         AND   #$0003
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587FC
         LDX   #^L0587FC
         JSL   L021F00
         JSL   L080D34
         PLY
         PLY
         PLY
         JSL   L0D48BE
         JSL   L082F35
         BRL   L0A3359
L0A3122  STZ   L030032
         LDA   L030040
         STA   $E2
         LDA   L030042
         STA   $E0
         LDA   L030044
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05045C
         LDX   #^L05045C
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $E2
         PLX
         STX   $F8
         CLC
         ADC   $F8
         STA   $E2
         LDA   L030044
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050464
         LDX   #^L050464
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $E0
         PLX
         STX   $F8
         CLC
         ADC   $F8
         STA   $E0
         STZ   $F0
         BRA   L0A31B8
L0A317F  LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         CLC
         ADC   #$00D3
         LDX   $EA
         BCC   L0A3192
         INX
L0A3192  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         STA   $EC
         CMP   #$FFFF
         BEQ   L0A31B6
         PEI   $E0
         PEI   $E2
         PEA   $0000
         PEI   $EC
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
L0A31B6  INC   $F0
L0A31B8  LDA   $F0
         CMP   #$001E
         BCC   L0A317F
         PEI   $E0
         PEI   $E2
         JSL   L060E4D
         PLY
         PLY
         STA   $EC
L0A31CB  LDA   #$000A
         PHA
         LDA   $EC
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BNE   L0A31FB
         PEI   $EC
         JSL   L060C4E
         PLY
         STX   $E6
         STA   $E4
         LDY   #$0002
         LDA   [$E4],Y
         AND   #$FF80
         LDY   #$0002
         STA   [$E4],Y
         BRA   L0A3206
         BRA   L0A3204
L0A31FB  PEI   $EC
         JSL   L060D39
         PLY
         STA   $EC
L0A3204  BRA   L0A31CB
L0A3206  LDA   $FF
         CMP   #$00A1
         BEQ   L0A3210
         BRL   L0A32BA
L0A3210  PEI   $EA
         PEI   $E8
         JSL   L0A2A31
         PLY
         PLY
         PEA   $0078
         LDA   $E8
         CLC
         ADC   #$005B
         TAX
         LDA   $EA
         BCC   L0A3229
         INC
L0A3229  PHA
         PHX
         JSL   L020232
         PLY
         PLY
         PLY
         STZ   $F0
         BRA   L0A32B0
L0A3236  LDA   #$0007
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         STA   $EE
         LDA   $EE
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A3262
         INX
L0A3262  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0001
         LDA   [$F4],Y
         PHA
         INC
         SEP   #$20
         LDY   #$0001
         STA   [$F4],Y
         REP   #$20
         PLA
         LDA   $EE
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A3299
         INX
L0A3299  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         INC
         SEP   #$20
         STA   [$F4]
         REP   #$20
         PLA
         INC   $F0
L0A32B0  LDA   $F0
         CMP   #$000C
         BCS   L0A32BA
         BRL   L0A3236
L0A32BA  LDA   L03003E
         CMP   #$0001
         BNE   L0A32E0
         LDX   L030050
         LDA   L03004E
         STX   L03000E
         STA   L03000C
         PEA   $0000
         JSL   L070C99
         PLY
         PEA   $0000
         JSL   L073014
         PLY
         BRA   L0A32E9
L0A32E0  LDA   L0301EC
         PHA
         JSL   L072D9A
         PLY
L0A32E9  JSL   L0844EB
         PEI   $EA
         PEI   $E8
         LDA   $F2
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587D4
         LDX   #^L0587D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         STA   $F0
         PHA
         JSL   L0842BE
         PLY
         PLY
         PLY
         LDA   $FF
         CMP   #$00A0
         BNE   L0A3326
         LDA   #L05548F
         LDX   #^L05548F
         BRA   L0A332C
L0A3326  LDA   #L05549D
         LDX   #^L05549D
L0A332C  PHX
         PHA
         PEI   $F0
         JSL   L0842BE
         PLY
         PLY
         PLY
         PEA   $0004
         JSL   L0A1ED3
         PLY
         JSL   L0D48BE
         LDA   L03024E
         CMP   #$FFFF
         BNE   L0A3350
         LDA   #$0000
         BRA   L0A3353
L0A3350  LDA   #$0001
L0A3353  PHA
         JSL   L082634
         PLY
L0A3359  TAY
         TSC
         CLC
         ADC   #$0022
         TCS
         TYA
         PLD
         RTL

L0A3363  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EC
         TCS
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F2
         STA   $F0
         LDY   #$001D
         LDA   [$F0],Y
         AND   #$00FF
         PHA
         JSL   L0A34BE
         PLY
         CMP   #$FFFF
         BEQ   L0A33BF
         STZ   $EE
L0A33A4  PEI   $EE
         JSL   L0A34BE
         PLY
         CMP   #$FFFF
         BEQ   L0A33B4
         INC   $EE
         BRA   L0A33A4
L0A33B4  LDA   $EE
         SEP   #$20
         LDY   #$001D
         STA   [$F0],Y
         REP   #$20
L0A33BF  LDY   #$0036
         LDA   [$F0],Y
         STA   $EE
         LDA   #$0001
         PHA
         LDA   $EE
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         LDA   $EE
         PLX
         STX   $F8
         SEC
         SBC   $F8
         SEC
         SBC   #$0001
         PHA
         PEA   $0019
         JSL   L0204BA
         PLY
         PLY
         LDY   #$0036
         STA   [$F0],Y
         SEC
         JSL   L0222DF
         PLA
         LDY   #$0034
         STA   [$F0],Y
         LDA   L0301EC
         PHA
         JSL   L072D9A
         PLY
         LDA   L030044
         SEP   #$20
         LDY   #$001C
         STA   [$F0],Y
         REP   #$20
         LDY   #$0030
         LDA   [$F0],Y
         ORA   #$9400
         LDY   #$0030
         STA   [$F0],Y
         PEI   $FF
         JSL   L0A3E20
         PLY
         TSC
         CLC
         ADC   #$000C
         TCS
         PLD
         RTL

L0A342A  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EA
         TCS
         LDA   $FF
         CMP   L030044
         BNE   L0A343F
         BRL   L0A34B4
L0A343F  LDA   $FF
         SEC
         SBC   L030044
         STA   $F0
         SEC
         SBC   #$0000
         BVS   L0A3450
         EOR   #$8000
L0A3450  BMI   L0A345A
         LDA   $F0
         CLC
         ADC   #$0004
         STA   $F0
L0A345A  LDA   #L0554D4
         LDX   #^L0554D4
         STX   $EE
         STA   $EC
         STZ   $F2
         BRA   L0A34A4
L0A3468  LDY   #$001D
         LDA   [$EC],Y
         AND   #$00FF
         CLC
         ADC   $F0
         AND   #$0003
         SEP   #$20
         LDY   #$001D
         STA   [$EC],Y
         REP   #$20
         LDY   #$001C
         LDA   [$EC],Y
         AND   #$00FF
         CLC
         ADC   $F0
         AND   #$0003
         SEP   #$20
         LDY   #$001C
         STA   [$EC],Y
         REP   #$20
         LDA   $EC
         CLC
         ADC   #$031F
         STA   $EC
         BCC   L0A34A2
         INC   $EE
L0A34A2  INC   $F2
L0A34A4  LDA   $F2
         CMP   L03003E
         BCC   L0A3468
         LDA   $FF
         STA   L030044
         JSL   L0A4763
L0A34B4  TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         PLD
         RTL

L0A34BE  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0000
         STA   $F2
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F0
         STA   $EE
         BRA   L0A350A
L0A34DA  LDY   #$001D
         LDA   [$EE],Y
         AND   #$00FF
         CMP   $FF
         BNE   L0A34F1
         LDY   #$0034
         LDA   [$EE],Y
         BEQ   L0A34F1
         LDA   $F2
         BRA   L0A3514
L0A34F1  LDA   $F2
         INC   $F2
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $EE
         LDA   $F0
         BCC   L0A3506
         INC
L0A3506  STA   $F0
         PLA
         PLX
L0A350A  LDA   $F2
         CMP   L03003E
         BCC   L0A34DA
         LDA   #$FFFF
L0A3514  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A351E  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E6
         TCS
         LDA   L03003E
         BNE   L0A3531
         BRL   L0A35CE
L0A3531  LDA   L030042
         PHA
         LDA   $FD
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         JSL   L020467
         PLY
         PHA
         LDA   L030040
         PHA
         LDA   $FB
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         JSL   L020467
         PLY
         PLX
         STX   $F4
         CLC
         ADC   $F4
         SEC
         SBC   #$0001
         BEQ   L0A3569
         BVS   L0A3567
         EOR   #$8000
L0A3567  BMI   L0A35CE
L0A3569  PEI   $FF
         PEI   $FD
         PEI   $FB
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00E8
         PHA
         JSL   L041D5F
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         STZ   $EE
         BRA   L0A35C7
L0A3590  LDA   $EE
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00E8
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         PHA
         JSL   L0A34BE
         PLY
         STA   $EC
         SEC
         SBC   #$0000
         BVS   L0A35BF
         EOR   #$8000
L0A35BF  BPL   L0A35C5
         LDA   $EC
         BRA   L0A35D1
L0A35C5  INC   $EE
L0A35C7  LDA   $EE
         CMP   #$0004
         BCC   L0A3590
L0A35CE  LDA   #$FFFF
L0A35D1  TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         PLD
         RTL

L0A35DB  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00CE
         TCS
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $E6
         STA   $E4
         STZ   $F0
         LDY   #$0034
         LDA   [$E4],Y
         SEC
         SBC   #$0000
         BNE   L0A3617
         BRL   L0A36E9
L0A3617  BVS   L0A361C
         EOR   #$8000
L0A361C  BMI   L0A3621
         BRL   L0A36E9
L0A3621  LDY   #$0036
         LDA   [$E4],Y
         LDX   #$0000
         TAY
         BPL   L0A362D
         DEX
L0A362D  PHX
         PHA
         LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDY   #$0034
         LDA   [$E4],Y
         LDX   #$0000
         TAY
         BPL   L0A3643
         DEX
L0A3643  SEC
         JSL   L0222B8
         PLA
         PLX
         PEA   $0000
         PEA   $0019
         CLC
         JSL   L0220EA
         PLA
         PLX
         SEC
         JSL   L021FA9
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   $EE
         LDA   $EC
         AND   #$03FF
         PHA
         TXA
         AND   #$0000
         TAX
         PLA
         STX   $F4
         ORA   $F4
         BEQ   L0A36B4
         LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         SEC
         JSL   L022303
         PLA
         PLX
         CLC
         ADC   #$0001
         PHA
         TXA
         ADC   #$0000
         TAX
         LDA   $F0
         INC   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
         BRA   L0A36E7
L0A36B4  LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         SEC
         JSL   L022303
         PLA
         PLX
         PHA
         LDA   $F0
         INC   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
L0A36E7  BRA   L0A370A
L0A36E9  LDA   $F0
         INC   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         STA   [$F4]
L0A370A  LDY   #$0038
         LDA   [$E4],Y
         SEC
         SBC   #$0000
         BNE   L0A3718
         BRL   L0A37EA
L0A3718  BVS   L0A371D
         EOR   #$8000
L0A371D  BMI   L0A3722
         BRL   L0A37EA
L0A3722  LDY   #$003A
         LDA   [$E4],Y
         LDX   #$0000
         TAY
         BPL   L0A372E
         DEX
L0A372E  PHX
         PHA
         LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDY   #$0038
         LDA   [$E4],Y
         LDX   #$0000
         TAY
         BPL   L0A3744
         DEX
L0A3744  SEC
         JSL   L0222B8
         PLA
         PLX
         PEA   $0000
         PEA   $0019
         CLC
         JSL   L0220EA
         PLA
         PLX
         SEC
         JSL   L021FA9
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   $EE
         LDA   $EC
         AND   #$03FF
         PHA
         TXA
         AND   #$0000
         TAX
         PLA
         STX   $F4
         ORA   $F4
         BEQ   L0A37B5
         LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         SEC
         JSL   L022303
         PLA
         PLX
         CLC
         ADC   #$0001
         PHA
         TXA
         ADC   #$0000
         TAX
         LDA   $F0
         INC   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
         BRA   L0A37E8
L0A37B5  LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         SEC
         JSL   L022303
         PLA
         PLX
         PHA
         LDA   $F0
         INC   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
L0A37E8  BRA   L0A380B
L0A37EA  LDA   $F0
         INC   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         STA   [$F4]
L0A380B  LDY   #$003C
         LDA   [$E4],Y
         SEC
         SBC   #$0000
         BNE   L0A3819
         BRL   L0A3921
L0A3819  BVS   L0A381E
         EOR   #$8000
L0A381E  BMI   L0A3823
         BRL   L0A3921
L0A3823  LDY   #$003C
         LDA   [$E4],Y
         PHA
         LDY   #$003E
         LDA   [$E4],Y
         PLX
         STX   $F4
         SEC
         SBC   $F4
         BVS   L0A3839
         EOR   #$8000
L0A3839  BMI   L0A385D
         LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0019
         STA   [$F4]
         BRL   L0A391F
L0A385D  LDY   #$003E
         LDA   [$E4],Y
         LDX   #$0000
         TAY
         BPL   L0A3869
         DEX
L0A3869  PHX
         PHA
         LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDY   #$003C
         LDA   [$E4],Y
         LDX   #$0000
         TAY
         BPL   L0A387F
         DEX
L0A387F  SEC
         JSL   L0222B8
         PLA
         PLX
         PEA   $0000
         PEA   $0019
         CLC
         JSL   L0220EA
         PLA
         PLX
         SEC
         JSL   L021FA9
         PLY
         PLY
         STX   $EE
         STA   $EC
         LDX   $EE
         LDA   $EC
         AND   #$03FF
         PHA
         TXA
         AND   #$0000
         TAX
         PLA
         STX   $F4
         ORA   $F4
         BEQ   L0A38EE
         LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         SEC
         JSL   L022303
         PLA
         PLX
         CLC
         ADC   #$0001
         PHA
         TXA
         ADC   #$0000
         TAX
         LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
         BRA   L0A391F
L0A38EE  LDX   #$0000
         LDA   #$000A
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         SEC
         JSL   L022303
         PLA
         PLX
         PHA
         LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
L0A391F  BRA   L0A3940
L0A3921  LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         STA   [$F4]
L0A3940  JSL   L082EE5
         LDA   $FF
         PHA
         LDA   #$0045
         SEC
         JSL   L0220A5
         PLA
         CLC
         ADC   #$002E
         STA   $D0
         LDA   $D0
         CLC
         ADC   #$0003
         STA   $D2
         LDA   #$0002
         STA   $D4
         LDA   #$001A
         STA   $D6
         STZ   $F2
         BRL   L0A3A0B
L0A396D  LDA   $F2
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00DA
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         STA   $F0
         LDA   $F0
         SEC
         SBC   #$0019
         BVS   L0A3996
         EOR   #$8000
L0A3996  BMI   L0A39B8
         LDA   #$0002
         STA   $D4
         LDA   #$001B
         SEC
         SBC   $F0
         STA   $D6
         PEA   $000C
         PEA   $0000
         TDC
         CLC
         ADC   #$00D0
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
L0A39B8  LDA   $F0
         CMP   #$0000
         BEQ   L0A39F9
         LDA   #$001B
         SEC
         SBC   $F0
         STA   $D4
         LDA   #$001A
         STA   $D6
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587D4
         LDX   #^L0587D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00D0
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
L0A39F9  LDA   $D0
         CLC
         ADC   #$0007
         STA   $D0
         LDA   $D2
         CLC
         ADC   #$0007
         STA   $D2
         INC   $F2
L0A3A0B  LDA   $F2
         SEC
         SBC   #$0003
         BVS   L0A3A16
         EOR   #$8000
L0A3A16  BMI   L0A3A1B
         BRL   L0A396D
L0A3A1B  JSL   L082F35
         TSC
         CLC
         ADC   #$002A
         TCS
         PLD
         RTL

L0A3A27  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E8
         TCS
         LDA   $FD
         BEQ   L0A3A4E
         PEA   $0001
         PEA   $0020
         PEA   $0004
         PEA   ^L056309
         PEA   L056309
         JSL   L020259
         PLY
         PLY
         PLY
         PLY
         PLY
L0A3A4E  LDA   #L05630D
         LDX   #^L05630D
         STX   $EC
         STA   $EA
         LDA   #$0000
         SEP   #$20
         STA   [$EA]
         REP   #$20
         LDA   $FB
         BNE   L0A3A80
         LDA   $EA
         BNE   L0A3A6B
         DEC   $EC
L0A3A6B  DEC   $EA
         LDX   $EC
         LDA   $EA
         STA   $F0
         STX   $F2
         LDA   #$0030
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   L0A3AC4
L0A3A80  LDA   $FB
         STA   $EE
         TAY
         BEQ   L0A3AC4
         LDA   #$000A
         PHA
         LDA   $FB
         CLC
         JSL   L021F1A
         PLY
         STA   $FB
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         LDA   #$0030
         CLC
         ADC   $EE
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         LDA   $EA
         BNE   L0A3AB1
         DEC   $EC
L0A3AB1  DEC   $EA
         LDX   $EC
         LDA   $EA
         STA   $F0
         STX   $F2
         PLA
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRA   L0A3A80
L0A3AC4  LDA   $FD
         BEQ   L0A3AE3
         LDA   #$0004
         SEC
         SBC   $FF
         LDX   #$0000
         PHX
         PHA
         LDA   #L056309
         LDX   #^L056309
         JSL   L021F00
         PLA
         PLX
         BRA   L0A3AE7
         BRA   L0A3AE7
L0A3AE3  LDX   $EC
         LDA   $EA
L0A3AE7  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A3AF1  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EE
         TCS
         PEA   $0003
         PEA   $0001
         PEI   $FD
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   $000D
         PEI   $FB
         PEA   $0037
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0554AC
         PEA   L0554AC
         PEA   $000D
         PEI   $FB
         PEA   $0049
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0003
         PEA   $0001
         PEI   $FF
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   $000D
         PEI   $FB
         PEA   $004F
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0A3B5F  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDY   #$0036
         LDA   [$FD],Y
         PHA
         LDY   #$0034
         LDA   [$FD],Y
         PHA
         PEA   $0074
         JSL   L0A3AF1
         PLY
         PLY
         PLY
         LDA   #$000A
         PHA
         LDY   #$003A
         LDA   [$FD],Y
         SEC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$000A
         PHA
         LDY   #$0038
         LDA   [$FD],Y
         SEC
         JSL   L021F1A
         PLY
         PHA
         PEA   $007C
         JSL   L0A3AF1
         PLY
         PLY
         PLY
         LDY   #$003E
         LDA   [$FD],Y
         PHA
         LDY   #$003C
         LDA   [$FD],Y
         PHA
         PEA   $0084
         JSL   L0A3AF1
         PLY
         PLY
         PLY
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0A3BC8  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00C8
         TCS
         LDA   #$FFFF
         STA   $D0
         LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   $FD
         CLC
         ADC   #$0001
         CMP   L030160
         BEQ   L0A3C09
         LDA   #$0000
         BRA   L0A3C0C
L0A3C09  LDA   #$0001
L0A3C0C  STA   $EA
         LDA   $EA
         BNE   L0A3C33
         LDA   $FF
         CMP   #$0001
         BEQ   L0A3C1B
         BCS   L0A3C26
L0A3C1B  LDA   $FD
         CLC
         ADC   #$0001
         CMP   L030032
         BNE   L0A3C29
L0A3C26  BRL   L0A3E16
L0A3C29  LDA   $FD
         ASL
         CLC
         ADC   $FF
         STA   $E8
         BRA   L0A3C3B
L0A3C33  LDA   #$0008
         CLC
         ADC   $FF
         STA   $E8
L0A3C3B  LDA   $FF
         CMP   #$001E
         BCC   L0A3C64
         LDA   $FF
         SEC
         SBC   #$001E
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $EC
         BRA   L0A3C85
L0A3C64  LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A3C77
         INX
L0A3C77  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $EC
L0A3C85  LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05843C
         LDX   #^L05843C
         JSL   L021F00
         PLA
         PLX
         STX   $E4
         STA   $E2
         LDA   [$E2]
         SEC
         SBC   #$0001
         STA   $D2
         CLC
         ADC   #$0011
         STA   $D4
         LDY   #$0002
         LDA   [$E2],Y
         SEC
         SBC   #$0001
         STA   $D6
         CLC
         ADC   #$0011
         STA   $D8
         LDA   $EA
         BEQ   L0A3CDA
         LDX   L03002E
         LDA   L03002C
         STX   $CE
         STA   $CC
         LDA   #$0070
         STA   $CA
         BRA   L0A3CED
L0A3CDA  LDX   L03002A
         LDA   L030028
         STX   $CE
         STA   $CC
         LDA   #$00A0
         STA   $CA
         JSL   L082EE5
L0A3CED  LDA   $EC
         CMP   #$FFFF
         BNE   L0A3D5F
         LDA   $FF
         CMP   #$0005
         BEQ   L0A3CFD
         BCS   L0A3D34
L0A3CFD  LDA   $FF
         ASL
         PHA
         LDA   #$00D4
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E6
         LDA   $FF
         PHA
         LDA   #$0001
         CLC
         JSL   L0222A8
         LDY   #$0032
         LDA   [$EE],Y
         PLX
         STX   $F6
         AND   $F6
         TAY
         BEQ   L0A3D2D
         INC   $E6
         LDA   #$0022
         STA   $D0
         BRA   L0A3D32
L0A3D2D  LDA   #$0021
         STA   $D0
L0A3D32  BRA   L0A3D5D
L0A3D34  LDA   $FF
         CMP   #$000A
         BCC   L0A3D58
         LDA   $FF
         CMP   #$000D
         BEQ   L0A3D44
         BCS   L0A3D58
L0A3D44  LDA   $FF
         SEC
         SBC   #$000A
         PHA
         LDA   #$00D0
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E6
         BRA   L0A3D5D
L0A3D58  LDA   #$00CC
         STA   $E6
L0A3D5D  BRA   L0A3DB0
L0A3D5F  PEI   $EC
         JSL   L020B37
         PLY
         STA   $E6
         LDA   $EA
         BEQ   L0A3D83
         LDA   $FF
         CMP   #$0001
         BNE   L0A3D83
         LDA   $E6
         CMP   #$0090
         BEQ   L0A3D81
         LDA   $E6
         CMP   #$001E
         BNE   L0A3D83
L0A3D81  INC   $E6
L0A3D83  LDA   $FF
         CMP   #$0005
         BEQ   L0A3D8C
         BCS   L0A3DB0
L0A3D8C  LDA   $FF
         PHA
         LDA   #$0001
         CLC
         JSL   L0222A8
         LDY   #$0032
         LDA   [$EE],Y
         PLX
         STX   $F6
         AND   $F6
         TAY
         BEQ   L0A3DAB
         LDA   #$0022
         STA   $D0
         BRA   L0A3DB0
L0A3DAB  LDA   #$0021
         STA   $D0
L0A3DB0  LDA   $FF
         CMP   #$0001
         BNE   L0A3DC7
         LDA   $FD
         CLC
         ADC   #$0001
         CMP   L0301EE
         BNE   L0A3DC7
         LDA   #$0023
         STA   $D0
L0A3DC7  LDA   $D0
         CMP   #$FFFF
         BEQ   L0A3E04
         LDA   #$0000
         STA   L03012C
         PEA   $000C
         PEI   $CA
         PEA   $0010
         PEA   $0000
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         PEI   $CE
         PEI   $CC
         PEI   $D0
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
L0A3E04  PEI   $E6
         PEI   $E8
         JSL   L020F77
         PLY
         PLY
         LDA   $EA
         BNE   L0A3E16
         JSL   L082F35
L0A3E16  TAY
         TSC
         CLC
         ADC   #$002E
         TCS
         TYA
         PLD
         RTL

L0A3E20  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00CF
         TCS
         LDA   $FF
         PHA
         LDA   #$0045
         CLC
         JSL   L0220A5
         PLA
         STA   $E3
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F2
         STA   $F0
         LDY   #$0030
         LDA   [$F0],Y
         STA   $EE
         LDA   $EE
         AND   #$FF80
         TAY
         BNE   L0A3E6C
         BRL   L0A4567
L0A3E6C  LDA   $FF
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F4
         CMP   $F4
         BEQ   L0A3E82
         LDA   #$0000
         BRA   L0A3E85
L0A3E82  LDA   #$0001
L0A3E85  STA   $EC
         STZ   L03012C
         JSL   L082EE5
         LDA   $EE
         AND   #$1000
         TAY
         BNE   L0A3E99
         BRL   L0A4030
L0A3E99  LDA   #$0000
         STA   $DB
         LDA   #$001C
         STA   $DD
         LDA   $E3
         STA   $D7
         CLC
         ADC   #$0042
         STA   $D9
         LDY   #$0034
         LDA   [$F0],Y
         BNE   L0A3EB7
         BRL   L0A3FE1
L0A3EB7  PEA   $000C
         PEA   $0000
         TDC
         CLC
         ADC   #$00D7
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0006
         PEA   $0000
         TDC
         CLC
         ADC   #$00D1
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         STZ   $EA
         LDAL  L056156
         SEC
         SBC   #$0000
         BEQ   L0A3F11
         BVS   L0A3EEE
         EOR   #$8000
L0A3EEE  BPL   L0A3F11
         LDA   $EA
         INC   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D1
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0026
         STA   [$F4]
L0A3F11  LDAL  L056158
         SEC
         SBC   #$0000
         BEQ   L0A3F43
         BVS   L0A3F20
         EOR   #$8000
L0A3F20  BPL   L0A3F43
         LDA   $EA
         INC   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D1
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0027
         STA   [$F4]
L0A3F43  LDAL  L056154
         SEC
         SBC   #$0000
         BEQ   L0A3F54
         BVS   L0A3F52
         EOR   #$8000
L0A3F52  BMI   L0A3F5B
L0A3F54  LDY   #$0111
         LDA   [$F0],Y
         BEQ   L0A3F7C
L0A3F5B  LDA   $EA
         INC   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D1
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0025
         STA   [$F4]
L0A3F7C  LDA   $EA
         DEC   $EA
         TAY
         BEQ   L0A3FC4
         PEA   $000A
         PEA   $0028
         PEA   $0000
         TDC
         CLC
         ADC   #$00D7
         PHA
         LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D1
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L0A3F7C
L0A3FC4  LDA   $EC
         BEQ   L0A3FD8
         PEI   $FF
         JSL   L0A1E52
         PLY
         LDA   $EE
         ORA   #$0100
         STA   $EE
         BRA   L0A3FDF
L0A3FD8  LDA   $EE
         ORA   #$A180
         STA   $EE
L0A3FDF  BRA   L0A4030
L0A3FE1  PEA   $FFFF
         PEA   $0028
         PEA   $0000
         TDC
         CLC
         ADC   #$00D7
         PHA
         PEA   $0008
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $F2
         PEI   $F0
         PEA   $0001
         PEA   $000D
         PEA   $0005
         LDA   $E3
         CLC
         ADC   #$0001
         PHA
         JSL   L084545
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $FF
         JSL   L0725BC
         PLY
         BRL   L0A4556
L0A4030  LDY   #$0034
         LDA   [$F0],Y
         BNE   L0A403A
         BRL   L0A4556
L0A403A  LDA   $EE
         AND   #$0080
         TAY
         BNE   L0A4045
         BRL   L0A413C
L0A4045  LDA   L03024E
         CMP   $FF
         BNE   L0A4051
         LDA   #$0009
         BRA   L0A4054
L0A4051  LDA   #$000D
L0A4054  STA   $EA
         LDA   $EC
         BNE   L0A405D
         BRL   L0A40F6
L0A405D  LDX   $F2
         LDA   $F0
         STX   $E7
         STA   $E5
         PHX
         PHA
         PEI   $EA
         PEA   $0007
         PEA   $0003
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $E7
         PEI   $E5
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         CLC
         ADC   #$0003
         STA   $E1
         LDA   $F0
         CLC
         ADC   #$0008
         LDX   $F2
         BCC   L0A409D
         INX
L0A409D  STA   $F4
         STX   $F6
         LDA   [$F4]
         SEP   #$20
         STA   $E9
         REP   #$20
         LDA   $E9
         AND   #$00FF
         CMP   #$002C
         BEQ   L0A40CF
         LDA   $E9
         AND   #$00FF
         CMP   #$003B
         BEQ   L0A40CF
         LDA   $E9
         AND   #$00FF
         CMP   #$002D
         BEQ   L0A40CF
         LDA   $E1
         CLC
         ADC   #$0006
         STA   $E1
L0A40CF  LDA   $F0
         CLC
         ADC   #$0008
         TAX
         LDA   $F2
         BCC   L0A40DB
         INC
L0A40DB  PHA
         PHX
         PEI   $EA
         PEA   $0007
         PEI   $E1
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $EE
         ORA   #$4000
         STA   $EE
         BRA   L0A413C
L0A40F6  LDA   #$0000
         STA   $DB
         LDA   #$0006
         STA   $DD
         LDA   $E3
         STA   $D7
         CLC
         ADC   #$002A
         STA   $D9
         PEA   $0001
         PEA   $0000
         TDC
         CLC
         ADC   #$00D7
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEI   $F2
         PEI   $F0
         PEA   $0001
         PEI   $EA
         PEA   $0005
         LDA   $E3
         CLC
         ADC   #$0001
         PHA
         JSL   L084545
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0A413C  LDA   $EE
         AND   #$0100
         TAY
         BNE   L0A4147
         BRL   L0A426E
L0A4147  PEI   $FF
         JSL   L0A35DB
         PLY
         LDA   $EC
         BNE   L0A4155
         BRL   L0A426E
L0A4155  PEI   $F2
         PEI   $F0
         JSL   L0A3B5F
         PLY
         PLY
         LDY   #$0042
         LDA   [$F0],Y
         SEC
         SBC   #$0000
         BVS   L0A416D
         EOR   #$8000
L0A416D  BPL   L0A4189
         LDY   #$0044
         LDA   [$F0],Y
         SEC
         SBC   #$0000
         BVS   L0A417D
         EOR   #$8000
L0A417D  BPL   L0A4189
         LDY   #$002A
         LDA   [$F0],Y
         AND   #$00FF
         BEQ   L0A4190
L0A4189  LDA   #$0022
         STA   $DF
         BRA   L0A4195
L0A4190  LDA   #$0021
         STA   $DF
L0A4195  PEA   $000C
         PEA   $0010
         PEA   ^L0587DC
         PEA   L0587DC
         PEI   $DF
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   #$0021
         STA   $DF
         LDA   #$0001
         STA   $EA
         BRA   L0A4234
L0A41C2  LDA   $EA
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0046
         LDX   $F2
         BCC   L0A41DE
         INX
L0A41DE  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0001
         LDA   [$F4],Y
         AND   #$00FF
         PHA
         LDA   $EA
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F0
         CLC
         ADC   #$0046
         LDX   $F2
         BCC   L0A420D
         INX
L0A420D  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PLX
         STX   $F4
         SEC
         SBC   $F4
         BEQ   L0A4232
         BVS   L0A4229
         EOR   #$8000
L0A4229  BPL   L0A4232
         LDA   #$0022
         STA   $DF
         BRA   L0A4246
L0A4232  INC   $EA
L0A4234  LDA   $EA
         SEC
         SBC   #$0006
         BEQ   L0A41C2
         BVS   L0A4241
         EOR   #$8000
L0A4241  BMI   L0A4246
         BRL   L0A41C2
L0A4246  PEA   $000C
         PEA   $0010
         PEA   ^L0587E4
         PEA   L0587E4
         PEI   $DF
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   $EE
         ORA   #$4000
         STA   $EE
L0A426E  LDA   $EE
         AND   #$2000
         TAY
         BEQ   L0A42AA
         LDA   $EC
         BEQ   L0A427F
         LDA   #$0005
         BRA   L0A4282
L0A427F  LDA   #$0001
L0A4282  STA   $EA
         BRA   L0A4292
L0A4286  PEI   $EA
         PEI   $FF
         JSL   L0A3BC8
         PLY
         PLY
         DEC   $EA
L0A4292  LDA   $EA
         SEC
         SBC   #$0000
         BVS   L0A429D
         EOR   #$8000
L0A429D  BMI   L0A4286
         LDA   $EC
         BEQ   L0A42AA
         LDA   $EE
         ORA   #$4000
         STA   $EE
L0A42AA  LDA   $EE
         AND   #$0200
         TAY
         BNE   L0A42B5
         BRL   L0A442F
L0A42B5  LDA   $EC
         BNE   L0A42BC
         BRL   L0A442F
L0A42BC  LDY   #$010F
         LDA   [$F0],Y
         PHA
         PEI   $F2
         PEI   $F0
         JSL   L0A5F66
         PLY
         PLY
         STA   $EA
         PLX
         STX   $F4
         CMP   $F4
         BCS   L0A42DC
         LDA   #$0008
         STA   $DF
         BRA   L0A431E
L0A42DC  LDA   $EA
         LDX   #$0000
         TAY
         BPL   L0A42E5
         DEX
L0A42E5  PEA   $0000
         PEA   $0005
         CLC
         JSL   L0220EA
         LDX   #$0000
         LDA   #$0003
         PHX
         PHA
         LDY   #$010F
         LDA   [$F0],Y
         LDX   #$0000
         SEC
         JSL   L0222B8
         PLA
         PLX
         JSL   L022171
         BVS   L0A4310
         EOR   #$8000
L0A4310  BMI   L0A4319
         LDA   #$000B
         STA   $DF
         BRA   L0A431E
L0A4319  LDA   #$000D
         STA   $DF
L0A431E  PEA   ^L0554AE
         PEA   L0554AE
         PEI   $DF
         PEA   $0084
         PEA   $0068
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   #$000A
         PHA
         LDY   #$010F
         LDA   [$F0],Y
         CLC
         JSL   L021F1A
         PLY
         STA   $EA
         PEA   $0003
         PEA   $0001
         PEI   $EA
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0554B4
         PEA   L0554B4
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   $EA
         PHA
         LDA   #$000A
         SEC
         JSL   L0220A5
         LDY   #$010F
         LDA   [$F0],Y
         PLX
         STX   $F8
         SEC
         SBC   $F8
         STA   $EA
         PEA   $0001
         PEA   $0000
         PEI   $EA
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0554B6
         PEA   L0554B6
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   #$000A
         PHA
         PEI   $F2
         PEI   $F0
         JSL   L0A5F66
         PLY
         PLY
         CLC
         ADC   #$0005
         CLC
         JSL   L021F1A
         PLY
         STA   $EA
         PEA   $0003
         PEA   $0001
         PEI   $EA
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0554B8
         PEA   L0554B8
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0589AB
         PEA   L0589AB
         PEI   $DF
         PEA   $0084
         PEA   $0094
         JSL   L08450E
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $EE
         ORA   #$4000
         STA   $EE
L0A442F  LDY   #$001D
         LDA   [$F0],Y
         AND   #$00FF
         CLC
         ADC   #$0004
         SEC
         SBC   L030044
         AND   #$0003
         STA   $EA
         LDA   $EE
         AND   #$0400
         TAY
         BNE   L0A444F
         BRL   L0A44EF
L0A444F  LDA   $EA
         CLC
         ADC   #$0001
         CMP   L03021C
         BNE   L0A445D
         BRL   L0A44EF
L0A445D  LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587D4
         LDX   #^L0587D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDA   $EA
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587FC
         LDX   #^L0587FC
         JSL   L021F00
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $000C
         PEA   $00A0
         PEA   $0028
         PEA   $0000
         LDY   #$001C
         LDA   [$F0],Y
         AND   #$00FF
         CLC
         ADC   #$0004
         SEC
         SBC   L030044
         AND   #$0003
         PHA
         LDA   #$0013
         SEC
         JSL   L0220A5
         LDA   $EA
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587FC
         LDX   #^L0587FC
         JSL   L021F00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         PEA   $001C
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
L0A44EF  LDA   $EE
         AND   #$0800
         TAY
         BEQ   L0A4521
         LDA   $EC
         BEQ   L0A4521
         LDA   L03006C
         BEQ   L0A4506
         JSL   L0A1172
         BRA   L0A451A
L0A4506  LDA   L030068
         BEQ   L0A4516
         LDA   L030254
         BEQ   L0A4514
         JSL   L0A1AFC
L0A4514  BRA   L0A451A
L0A4516  JSL   L0A12A2
L0A451A  LDA   $EE
         ORA   #$4000
         STA   $EE
L0A4521  LDA   $EE
         AND   #$8000
         TAY
         BEQ   L0A4546
         PEA   $0001
         PEI   $FF
         JSL   L0A3BC8
         PLY
         PLY
         PEI   $FF
         JSL   L0725BC
         PLY
         LDA   $EC
         BEQ   L0A4546
         LDA   $EE
         ORA   #$4000
         STA   $EE
L0A4546  LDA   $EE
         AND   #$4000
         TAY
         BEQ   L0A4556
         PEA   $0000
         JSL   L090262
         PLY
L0A4556  LDY   #$0030
         LDA   [$F0],Y
         AND   #$007F
         LDY   #$0030
         STA   [$F0],Y
         JSL   L082F35
L0A4567  TAY
         TSC
         CLC
         ADC   #$0029
         TCS
         TYA
         PLD
         RTL

L0A4571  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         STZ   $F4
         BRA   L0A4589
L0A4580  PEI   $F4
         JSL   L0A3E20
         PLY
         INC   $F4
L0A4589  LDA   $F4
         CMP   L03003E
         BCC   L0A4580
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0A4598  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E2
         TCS
         LDA   $FB
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EE
         STA   $EC
         LDA   $FD
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EC
         CLC
         ADC   #$00D3
         LDX   $EE
         BCC   L0A45D7
         INX
L0A45D7  JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         STA   $E6
         LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0005
         BEQ   L0A45FF
         LDA   #$0000
         BRL   L0A46C1
L0A45FF  PEI   $E6
         JSL   L060CF6
         PLY
         STX   $EA
         STA   $E8
         LDY   #$0001
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$0010
         BVS   L0A461B
         EOR   #$8000
L0A461B  BPL   L0A4639
         LDY   #$0001
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$001F
         BEQ   L0A4632
         BVS   L0A4630
         EOR   #$8000
L0A4630  BMI   L0A4639
L0A4632  LDA   #$000A
         STA   $E4
         BRA   L0A466D
L0A4639  LDY   #$0001
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$0020
         BVS   L0A464A
         EOR   #$8000
L0A464A  BPL   L0A4668
         LDY   #$0001
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$002F
         BEQ   L0A4661
         BVS   L0A465F
         EOR   #$8000
L0A465F  BMI   L0A4668
L0A4661  LDA   #$000B
         STA   $E4
         BRA   L0A466D
L0A4668  LDA   #$0000
         BRA   L0A46C1
L0A466D  LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EC
         CLC
         ADC   #$00D3
         LDX   $EE
         BCC   L0A4680
         INX
L0A4680  JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         STA   $E6
         PEI   $E6
         JSL   L060CF6
         PLY
         STX   $EA
         STA   $E8
         LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0005
         BNE   L0A46B9
         LDY   #$0001
         LDA   [$E8],Y
         AND   #$00FF
         CMP   $E4
         BEQ   L0A46BE
L0A46B9  LDA   #$0000
         BRA   L0A46C1
L0A46BE  LDA   #$0001
L0A46C1  TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         PLD
         RTL

L0A46CB  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         PEI   $FD
         JSL   L0210A1
         PLY
         STA   $F0
         LDA   $F0
         SEC
         SBC   #$0020
         BVS   L0A46EA
         EOR   #$8000
L0A46EA  BMI   L0A46F9
         LDA   $F0
         SEC
         SBC   #$0000
         BVS   L0A46F7
         EOR   #$8000
L0A46F7  BMI   L0A471C
L0A46F9  LDA   $F0
         SEC
         SBC   #$0094
         BVS   L0A4704
         EOR   #$8000
L0A4704  BPL   L0A4715
         LDA   $F0
         SEC
         SBC   #$00A3
         BEQ   L0A471C
         BVS   L0A4713
         EOR   #$8000
L0A4713  BPL   L0A471C
L0A4715  LDA   $F0
         CMP   #$00C3
         BNE   L0A4756
L0A471C  PEI   $FF
         JSL   L020B37
         PLY
         STA   $EE
         LDA   $EE
         CMP   $F0
         BEQ   L0A4756
         LDA   $FD
         SEC
         SBC   #$0008
         BVS   L0A4736
         EOR   #$8000
L0A4736  BMI   L0A4747
         LDA   L030258
         BNE   L0A4747
         LDA   #$0001
         STA   L030258
         JSL   L082EE5
L0A4747  PEI   $EE
         PEI   $FD
         JSL   L020F77
         PLY
         PLY
         LDA   #$0001
         BRA   L0A4759
L0A4756  LDA   #$0000
L0A4759  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A4763  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00E0
         TCS
         LDA   L030160
         STA   $EA
         LDA   L030032
         BEQ   L0A477F
         LDA   $EA
         BNE   L0A477F
         BRL   L0A49C5
L0A477F  STZ   L030258
         LDAL  L056303
         STA   $E8
         SEC
         SBC   #$0020
         BVS   L0A4791
         EOR   #$8000
L0A4791  BMI   L0A47A4
         LDAL  L056303
         STA   $E8
         SEC
         SBC   #$0000
         BVS   L0A47A2
         EOR   #$8000
L0A47A2  BMI   L0A47D6
L0A47A4  LDAL  L056303
         STA   $E8
         SEC
         SBC   #$0094
         BVS   L0A47B3
         EOR   #$8000
L0A47B3  BPL   L0A47C8
         LDAL  L056303
         STA   $E8
         SEC
         SBC   #$00A3
         BEQ   L0A47D6
         BVS   L0A47C6
         EOR   #$8000
L0A47C6  BPL   L0A47D6
L0A47C8  LDAL  L056303
         STA   $E8
         CMP   #$00C3
         BEQ   L0A47D6
         BRL   L0A482A
L0A47D6  LDAL  L056301
         PHA
         JSL   L020B37
         PLY
         STA   $E4
         LDA   $E4
         CMP   $E8
         BNE   L0A47EB
         BRL   L0A482A
L0A47EB  LDA   #$0001
         STA   L030258
         JSL   L082EE5
         LDAL  L056307
         TAX
         LDAL  L056305
         PHX
         PHA
         PEI   $E4
         JSL   L020DB5
         PLY
         PLY
         PLY
         LDAL  L056307
         TAX
         LDAL  L056305
         PHX
         PHA
         JSL   L082671
         PLY
         PLY
         LDA   $E4
         STAL  L056303
         LDAL  L056301
         PHA
         JSL   L020C94
         PLY
L0A482A  STZ   $EC
         BRL   L0A48A2
L0A482F  LDA   $EC
         LSR
         STA   $E6
         LDA   $E6
         CLC
         ADC   #$0001
         CMP   $EA
         BNE   L0A4840
         BRA   L0A48A0
L0A4840  LDA   $EC
         AND   #$0001
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $E6
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$00D3
         CLC
         ADC   $F6
         BCC   L0A4877
         INX
L0A4877  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         PEI   $EC
         JSL   L0A46CB
         PLY
         PLY
         TAY
         BEQ   L0A48A0
         LDA   $EC
         AND   #$0001
         CMP   #$0001
         BNE   L0A48A0
         PEI   $E6
         JSL   L0725BC
         PLY
L0A48A0  INC   $EC
L0A48A2  LDA   L03003E
         ASL
         CMP   $EC
         BEQ   L0A48AC
         BCS   L0A482F
L0A48AC  LDA   $EA
         BNE   L0A48B3
         BRL   L0A49BC
L0A48B3  LDA   $EA
         SEC
         SBC   #$0001
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   #$0000
         STA   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A48EE
         INX
L0A48EE  JSL   L021F00
         PLA
         PLX
         STX   $F4
         STA   $F2
         STZ   $E8
         BRA   L0A4948
L0A48FC  LDA   [$F2]
         PHA
         LDA   $EC
         CLC
         ADC   #$0008
         PHA
         JSL   L0A46CB
         PLY
         PLY
         STA   $E2
         PHA
         LDA   $E8
         PLX
         STX   $FA
         ORA   $FA
         STA   $E8
         LDA   $E2
         BEQ   L0A492F
         LDA   $EC
         CMP   #$0001
         BNE   L0A492F
         LDA   $EA
         SEC
         SBC   #$0001
         PHA
         JSL   L0725BC
         PLY
L0A492F  LDA   $EC
         INC   $EC
         LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $F2
         LDA   $F4
         BCC   L0A4944
         INC
L0A4944  STA   $F4
         PLA
         PLX
L0A4948  LDA   $EC
         CMP   #$001E
         BCC   L0A48FC
         LDA   L030158
         CMP   #$0004
         BNE   L0A499F
         LDA   #L054455
         LDX   #^L054455
         STX   $F4
         STA   $F2
         STZ   $EC
         BRA   L0A4998
L0A4965  LDA   [$F2]
         PHA
         LDA   $EC
         CLC
         ADC   #$0026
         PHA
         JSL   L0A46CB
         PLY
         PLY
         PHA
         LDA   $E8
         PLX
         STX   $FA
         ORA   $FA
         STA   $E8
         LDA   $EC
         INC   $EC
         LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $F2
         LDA   $F4
         BCC   L0A4994
         INC
L0A4994  STA   $F4
         PLA
         PLX
L0A4998  LDA   $EC
         CMP   #$0008
         BCC   L0A4965
L0A499F  LDA   $E8
         BEQ   L0A49BC
         LDY   #$0030
         LDA   [$EE],Y
         ORA   #$4000
         LDY   #$0030
         STA   [$EE],Y
         LDA   $EA
         SEC
         SBC   #$0001
         PHA
         JSL   L0A3E20
         PLY
L0A49BC  LDA   L030258
         BEQ   L0A49C5
         JSL   L082F35
L0A49C5  TAY
         TSC
         CLC
         ADC   #$001A
         TCS
         TYA
         PLD
         RTL

L0A49CF  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDA   $FD
         CMP   #$FFFF
         BNE   L0A49E4
         BRL   L0A4AB3
L0A49E4  STZ   L030254
         LDAL  L056307
         TAX
         LDAL  L056305
         PHX
         PHA
         LDA   $FD
         STAL  L056301
         PHA
         JSL   L020B37
         PLY
         STAL  L056303
         PHA
         JSL   L020DB5
         PLY
         PLY
         PLY
         JSL   L082EE5
         PEI   $FD
         JSL   L020C94
         PLY
         LDA   $FF
         BEQ   L0A4A21
         LDA   #$0001
         STA   L030060
         BRA   L0A4A32
L0A4A21  LDAL  L056307
         TAX
         LDAL  L056305
         PHX
         PHA
         JSL   L082671
         PLY
         PLY
L0A4A32  JSL   L082F35
         LDA   L03024E
         CMP   #$FFFF
         BNE   L0A4A41
         BRL   L0A4AB3
L0A4A41  PEI   $FD
         JSL   L060112
         PLY
         PHA
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$010F
         LDA   [$F2],Y
         PLX
         STX   $F6
         CLC
         ADC   $F6
         LDY   #$010F
         STA   [$F2],Y
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0030
         LDA   [$F2],Y
         ORA   #$0200
         LDY   #$0030
         STA   [$F2],Y
         LDA   L03024E
         PHA
         JSL   L0A3E20
         PLY
L0A4AB3  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L0A4ABD  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #$0001
         STA   L030254
         LDAL  L056301
         STA   $F4
         CMP   #$FFFF
         BNE   L0A4ADC
         BRL   L0A4B77
L0A4ADC  LDA   #$FFFF
         STAL  L056301
         LDA   #$FFFF
         STAL  L056303
         JSL   L082EE5
         JSL   L020D92
         JSL   L08294C
         JSL   L082F35
         LDA   L03024E
         CMP   #$FFFF
         BNE   L0A4B05
         BRL   L0A4B77
L0A4B05  PEI   $F4
         JSL   L060112
         PLY
         PHA
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$010F
         LDA   [$F6],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         LDY   #$010F
         STA   [$F6],Y
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0030
         LDA   [$F6],Y
         ORA   #$0200
         LDY   #$0030
         STA   [$F6],Y
         LDA   L03024E
         PHA
         JSL   L0A3E20
         PLY
L0A4B77  LDA   $F4
         TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0A4B83  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E0
         TCS
         STZ   $E6
         LDA   #$000A
         PHA
         LDA   $FF
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E8
         CMP   #$0005
         BEQ   L0A4BAD
         LDA   $E8
         CMP   #$0006
         BNE   L0A4C06
L0A4BAD  LDA   $F9
         CMP   #$0000
         BCC   L0A4C06
         LDA   $F9
         CMP   #$000C
         BEQ   L0A4BBD
         BCS   L0A4C06
L0A4BBD  PEI   $FF
         JSL   L060C4E
         PLY
         STX   $E4
         STA   $E2
         LDA   $E8
         CMP   #$0005
         BNE   L0A4BE2
         LDY   #$0002
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BNE   L0A4BFC
L0A4BE2  LDA   $E8
         CMP   #$0006
         BNE   L0A4C06
         LDY   #$0002
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L0A4C06
L0A4BFC  STZ   $E8
         LDA   #$FFFD
         STA   $E6
         BRL   L0A4DDC
L0A4C06  LDA   $FB
         CMP   #$0089
         BNE   L0A4C1E
         LDA   $F9
         CMP   #$001E
         BCS   L0A4C1E
         STZ   $E8
         LDA   #$000A
         STA   $E6
         BRL   L0A4DDC
L0A4C1E  LDA   $F9
         CMP   #$0001
         BEQ   L0A4C28
         BRL   L0A4D1F
L0A4C28  LDA   $FB
         CMP   #$002D
         BNE   L0A4C3C
         LDA   #$0001
         STA   $E8
         LDA   #$0005
         STA   $E6
         BRL   L0A4D1C
L0A4C3C  LDA   #$0008
         STA   $E8
         LDA   $FB
         CMP   #$0014
         BCC   L0A4C59
         LDA   $FB
         CMP   #$0016
         BEQ   L0A4C51
         BCS   L0A4C59
L0A4C51  LDA   #$0004
         STA   $E6
         BRL   L0A4D1C
L0A4C59  LDA   $FB
         CMP   #$003A
         BCS   L0A4C63
         BRL   L0A4CE4
L0A4C63  LDA   $FB
         CMP   #$0042
         BEQ   L0A4C6F
         BCC   L0A4C6F
         BRL   L0A4CE4
L0A4C6F  LDA   $FB
         BRL   L0A4CD0
L0A4C74  LDA   #$0002
         STA   $E6
         BRL   L0A4CE1
L0A4C7C  LDA   #$0001
         STA   $E6
         BRL   L0A4CE1
L0A4C84  LDA   #$0006
         STA   $E6
         BRL   L0A4CE1
L0A4C8C  LDA   #$0004
         STA   $E6
         BRL   L0A4CE1
L0A4C94  LDA   #$000A
         STA   $E6
         BRL   L0A4CE1
L0A4C9C  LDA   #$0008
         STA   $E6
         BRL   L0A4CE1
L0A4CA4  LDA   #$0010
         STA   $E6
         BRL   L0A4CE1
L0A4CAC  LDA   #$0007
         STA   $E6
         BRL   L0A4CE1
L0A4CB4  LDA   #$0005
         STA   $E6
L0A4CB9  BRL   L0A4CE1
L0A4CBC  DA    L0A4C74
         DA    L0A4C7C
         DA    L0A4C84
         DA    L0A4C8C
         DA    L0A4C94
         DA    L0A4C9C
         DA    L0A4CA4
         DA    L0A4CAC
         DA    L0A4CB4
         DA    L0A4CB9
L0A4CD0  SEC
         SBC   #$003A
         CMP   #$0009
         BCC   L0A4CDC
         LDA   #$0009
L0A4CDC  ASL
         TAX
         JMP   (L0A4CBC,X)

L0A4CE1  BRL   L0A4D1C
L0A4CE4  LDA   $FB
         BRL   L0A4D0B
L0A4CE9  LDA   #$0001
         STA   $E6
         BRL   L0A4D1C
L0A4CF1  LDA   #$0002
         STA   $E6
         BRL   L0A4D1C
L0A4CF9  LDA   #$0004
         STA   $E6
L0A4CFE  BRL   L0A4D1C
L0A4D01  DA    L0A4CE9
         DA    L0A4CFE
         DA    L0A4CF9
         DA    L0A4CF1
         DA    L0A4CFE
L0A4D0B  SEC
         SBC   #$0026
         CMP   #$0004
         BCC   L0A4D17
         LDA   #$0004
L0A4D17  ASL
         TAX
         JMP   (L0A4D01,X)

L0A4D1C  BRL   L0A4DDC
L0A4D1F  LDA   $F9
         CMP   #$0004
         BNE   L0A4D3A
         LDA   $FB
         CMP   #$008E
         BNE   L0A4D37
         LDA   #$0001
         STA   $E8
         LDA   #$000A
         STA   $E6
L0A4D37  BRL   L0A4DDC
L0A4D3A  LDA   $F9
         CMP   #$0002
         BNE   L0A4D68
         LDA   $FB
         CMP   #$0068
         BNE   L0A4D54
         LDA   #$0003
         STA   $E8
         LDA   #$000A
         STA   $E6
         BRA   L0A4D65
L0A4D54  LDA   $FB
         CMP   #$008C
         BNE   L0A4D65
         LDA   #$0002
         STA   $E8
         LDA   #$000A
         STA   $E6
L0A4D65  BRL   L0A4DDC
L0A4D68  LDA   $F9
         CMP   #$0003
         BNE   L0A4D95
         LDA   $FB
         CMP   #$008D
         BNE   L0A4D82
         LDA   #$0006
         STA   $E8
         LDA   #$000C
         STA   $E6
         BRA   L0A4D93
L0A4D82  LDA   $FB
         CMP   #$0051
         BNE   L0A4D93
         LDA   #$0002
         STA   $E8
         LDA   #$0008
         STA   $E6
L0A4D93  BRA   L0A4DDC
L0A4D95  LDA   $F9
         CMP   #$000A
         BNE   L0A4DDC
         LDA   $FB
         CMP   #$000A
         BCC   L0A4DB8
         LDA   $FB
         CMP   #$000B
         BEQ   L0A4DAC
         BCS   L0A4DB8
L0A4DAC  LDA   #$0005
         STA   $E8
         LDA   #$000F
         STA   $E6
         BRA   L0A4DDC
L0A4DB8  LDA   $FB
         CMP   #$0051
         BNE   L0A4DCB
         LDA   #$0002
         STA   $E8
         LDA   #$0008
         STA   $E6
         BRA   L0A4DDC
L0A4DCB  LDA   $FB
         CMP   #$007A
         BNE   L0A4DDC
         LDA   #$0008
         STA   $E8
         LDA   #$0003
         STA   $E6
L0A4DDC  LDA   $E6
         BNE   L0A4DE3
         BRL   L0A4E70
L0A4DE3  LDA   $FD
         PHA
         LDA   $E6
         SEC
         JSL   L0220A5
         PLA
         STA   $E6
         LDA   $E8
         CMP   #$0008
         BNE   L0A4E06
         LDY   #$003E
         LDA   [$F5],Y
         CLC
         ADC   $E6
         LDY   #$003E
         STA   [$F5],Y
         BRA   L0A4E63
L0A4E06  LDA   $E8
         SEC
         SBC   #$0007
         BVS   L0A4E11
         EOR   #$8000
L0A4E11  BMI   L0A4E63
         STZ   $F9
         BRA   L0A4E5A
L0A4E17  LDA   $F9
         INC   $F9
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F5
         CLC
         ADC   #$0046
         LDX   $F7
         BCC   L0A4E3C
         INX
L0A4E3C  JSL   L021F00
         PLA
         PLX
         JSL   L021F00
         PLA
         PLX
         STA   $EA
         STX   $EC
         LDA   [$EA]
         AND   #$00FF
         CLC
         ADC   $E6
         SEP   #$20
         STA   [$EA]
         REP   #$20
L0A4E5A  LDA   $F9
         CMP   #$0002
         BEQ   L0A4E17
         BCC   L0A4E17
L0A4E63  LDY   #$0030
         LDA   [$F5],Y
         ORA   #$0900
         LDY   #$0030
         STA   [$F5],Y
L0A4E70  TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L0A4E78  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E2
         TCS
         LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   $FF
         CMP   #$001E
         BCC   L0A4EEE
         LDA   $FF
         SEC
         SBC   #$001E
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $E8
         LDA   $FF
         SEC
         SBC   #$001E
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$FFFF
         STA   [$F2]
         BRA   L0A4F31
L0A4EEE  LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A4F01
         INX
L0A4F01  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $E8
         LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A4F22
         INX
L0A4F22  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$FFFF
         STA   [$F2]
L0A4F31  LDA   $E8
         CMP   #$FFFF
         BNE   L0A4F3E
         LDA   #$FFFF
         BRL   L0A5162
L0A4F3E  LDA   $FD
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L0A4F54
         LDA   #$0000
         BRA   L0A4F57
L0A4F54  LDA   #$0001
L0A4F57  STA   $E4
         PEI   $E8
         JSL   L020B37
         PLY
         STA   $E6
         PEI   $E8
         PEA   $FFFF
         PEI   $E6
         PEI   $FF
         PEI   $F0
         PEI   $EE
         JSL   L0A4B83
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $E8
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDA   $FF
         CMP   #$000A
         BEQ   L0A4F90
         BRL   L0A5025
L0A4F90  LDA   $E6
         SEC
         SBC   #$000C
         BVS   L0A4F9B
         EOR   #$8000
L0A4F9B  BPL   L0A4FE4
         LDA   $E6
         SEC
         SBC   #$000D
         BEQ   L0A4FAC
         BVS   L0A4FAA
         EOR   #$8000
L0A4FAA  BMI   L0A4FE4
L0A4FAC  LDA   #$0000
         AND   #$0003
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$3FFF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0002
         STA   [$EA],Y
         PLA
         LDAL  L056150
         SEC
         SBCL  L0585D0
         STAL  L056150
         JSL   L0A03FC
         BRA   L0A5025
L0A4FE4  LDA   $E6
         SEC
         SBC   #$000A
         BVS   L0A4FEF
         EOR   #$8000
L0A4FEF  BPL   L0A5025
         LDA   $E6
         SEC
         SBC   #$000B
         BEQ   L0A5000
         BVS   L0A4FFE
         EOR   #$8000
L0A4FFE  BMI   L0A5025
L0A5000  LDA   #$0000
         AND   #$0003
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$3FFF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0002
         STA   [$EA],Y
         PLA
L0A5025  PEI   $FF
         PEI   $FD
         JSL   L0A3BC8
         PLY
         PLY
         LDA   $E4
         BEQ   L0A5040
         LDY   #$0030
         LDA   [$EE],Y
         ORA   #$4000
         LDY   #$0030
         STA   [$EE],Y
L0A5040  LDA   $FF
         CMP   #$0002
         BCC   L0A504A
         BRL   L0A513B
L0A504A  LDA   $FF
         CMP   #$0001
         BNE   L0A50AE
         LDY   #$0030
         LDA   [$EE],Y
         ORA   #$8000
         LDY   #$0030
         STA   [$EE],Y
         LDA   $FD
         CLC
         ADC   #$0001
         CMP   L0301EE
         BNE   L0A506D
         JSL   L0728D0
L0A506D  LDA   $E6
         SEC
         SBC   #$001E
         BVS   L0A5078
         EOR   #$8000
L0A5078  BPL   L0A50AE
         LDA   $E6
         SEC
         SBC   #$001F
         BEQ   L0A5089
         BVS   L0A5087
         EOR   #$8000
L0A5087  BMI   L0A50AE
L0A5089  LDA   #$0001
         AND   #$003F
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$03FF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F6
         LDY   #$0002
         STA   [$EA],Y
         PLA
         JSL   L0A4763
L0A50AE  LDA   $E6
         SEC
         SBC   #$0004
         BVS   L0A50B9
         EOR   #$8000
L0A50B9  BPL   L0A50F8
         LDA   $E6
         SEC
         SBC   #$0007
         BEQ   L0A50CA
         BVS   L0A50C8
         EOR   #$8000
L0A50C8  BMI   L0A50F8
L0A50CA  LDA   #$0000
         AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$7FFF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0002
         STA   [$EA],Y
         PLA
         JSL   L0A03FC
         JSL   L0A4763
L0A50F8  LDA   $E4
         BEQ   L0A513B
         LDA   $FF
         CMP   #$0001
         BNE   L0A513B
         LDA   $E6
         CMP   #$0090
         BNE   L0A5112
         JSL   L0A0155
         BRA   L0A512E
         BRA   L0A513B
L0A5112  LDA   $E6
         SEC
         SBC   #$001E
         BVS   L0A511D
         EOR   #$8000
L0A511D  BPL   L0A513B
         LDA   $E6
         SEC
         SBC   #$001F
         BEQ   L0A512E
         BVS   L0A512C
         EOR   #$8000
L0A512C  BMI   L0A513B
L0A512E  LDY   #$0030
         LDA   [$EE],Y
         ORA   #$0800
         LDY   #$0030
         STA   [$EE],Y
L0A513B  PEI   $E8
         JSL   L060112
         PLY
         PHA
         LDY   #$010F
         LDA   [$EE],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         LDY   #$010F
         STA   [$EE],Y
         LDY   #$0030
         LDA   [$EE],Y
         ORA   #$0200
         LDY   #$0030
         STA   [$EE],Y
         LDA   $E8
L0A5162  TAY
         TSC
         CLC
         ADC   #$0014
         TCS
         TYA
         PLD
         RTL

L0A516C  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E2
         TCS
         LDA   $FD
         CMP   #$FFFF
         BNE   L0A5181
         BRL   L0A53FA
L0A5181  LDA   $FB
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EE
         STA   $EC
         LDA   $FF
         CMP   #$001E
         BCC   L0A51CB
         LDA   $FF
         SEC
         SBC   #$001E
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   $FD
         STA   [$F0]
         BRA   L0A51EC
L0A51CB  LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EC
         CLC
         ADC   #$00D3
         LDX   $EE
         BCC   L0A51DE
         INX
L0A51DE  JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   $FD
         STA   [$F0]
L0A51EC  PEI   $FD
         JSL   L060112
         PLY
         PHA
         LDY   #$010F
         LDA   [$EC],Y
         PLX
         STX   $F4
         CLC
         ADC   $F4
         LDY   #$010F
         STA   [$EC],Y
         LDY   #$0030
         LDA   [$EC],Y
         ORA   #$0200
         LDY   #$0030
         STA   [$EC],Y
         PEI   $FD
         JSL   L020B37
         PLY
         STA   $E6
         LDA   $FB
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F0
         CMP   $F0
         BEQ   L0A5230
         LDA   #$0000
         BRA   L0A5233
L0A5230  LDA   #$0001
L0A5233  STA   $E4
         PEI   $FD
         PEA   $0001
         PEI   $E6
         PEI   $FF
         PEI   $EE
         PEI   $EC
         JSL   L0A4B83
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $FD
         JSL   L060C4E
         PLY
         STX   $EA
         STA   $E8
         LDA   $FF
         CMP   #$0002
         BCC   L0A5263
         BRL   L0A533C
L0A5263  LDA   $FF
         CMP   #$0001
         BNE   L0A52C7
         LDY   #$0030
         LDA   [$EC],Y
         ORA   #$8000
         LDY   #$0030
         STA   [$EC],Y
         LDA   $FB
         CLC
         ADC   #$0001
         CMP   L0301EE
         BNE   L0A5286
         JSL   L0728D0
L0A5286  LDA   $E6
         SEC
         SBC   #$001E
         BVS   L0A5291
         EOR   #$8000
L0A5291  BPL   L0A52C7
         LDA   $E6
         SEC
         SBC   #$001F
         BEQ   L0A52A2
         BVS   L0A52A0
         EOR   #$8000
L0A52A0  BMI   L0A52C7
L0A52A2  LDA   #$0000
         AND   #$003F
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$03FF
         STA   $F4
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F4
         LDY   #$0002
         STA   [$E8],Y
         PLA
         JSL   L0A4763
L0A52C7  LDA   $E6
         CMP   #$0004
         BNE   L0A52FE
         LDA   #$0001
         AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$7FFF
         STA   $F4
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F4
         LDY   #$0002
         STA   [$E8],Y
         PLA
         JSL   L0A03FC
         JSL   L0A4763
         BRA   L0A5339
L0A52FE  LDA   $E4
         BEQ   L0A5339
         LDA   $FF
         CMP   #$0001
         BNE   L0A5339
         LDA   $E6
         CMP   #$0090
         BEQ   L0A532C
         LDA   $E6
         SEC
         SBC   #$001E
         BVS   L0A531B
         EOR   #$8000
L0A531B  BPL   L0A5339
         LDA   $E6
         SEC
         SBC   #$001F
         BEQ   L0A532C
         BVS   L0A532A
         EOR   #$8000
L0A532A  BMI   L0A5339
L0A532C  LDY   #$0030
         LDA   [$EC],Y
         ORA   #$0800
         LDY   #$0030
         STA   [$EC],Y
L0A5339  BRL   L0A53DF
L0A533C  LDA   $FF
         CMP   #$000A
         BEQ   L0A5346
         BRL   L0A53DF
L0A5346  LDA   $E6
         SEC
         SBC   #$000C
         BVS   L0A5351
         EOR   #$8000
L0A5351  BPL   L0A539C
         LDA   $E6
         SEC
         SBC   #$000D
         BEQ   L0A5362
         BVS   L0A5360
         EOR   #$8000
L0A5360  BMI   L0A539C
L0A5362  LDA   #$0001
         AND   #$0003
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$3FFF
         STA   $F4
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F4
         LDY   #$0002
         STA   [$E8],Y
         PLA
         LDAL  L056150
         CLC
         ADCL  L0585D0
         STAL  L056150
         JSL   L0A03FC
         INC   $E6
         BRA   L0A53DF
L0A539C  LDA   $E6
         SEC
         SBC   #$000A
         BVS   L0A53A7
         EOR   #$8000
L0A53A7  BPL   L0A53DF
         LDA   $E6
         SEC
         SBC   #$000B
         BEQ   L0A53B8
         BVS   L0A53B6
         EOR   #$8000
L0A53B6  BMI   L0A53DF
L0A53B8  LDA   #$0001
         AND   #$0003
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$3FFF
         STA   $F4
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F4
         LDY   #$0002
         STA   [$E8],Y
         PLA
         INC   $E6
L0A53DF  PEI   $FF
         PEI   $FB
         JSL   L0A3BC8
         PLY
         PLY
         LDA   $E4
         BEQ   L0A53FA
         LDY   #$0030
         LDA   [$EC],Y
         ORA   #$4000
         LDY   #$0030
         STA   [$EC],Y
L0A53FA  TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         PLD
         RTL

L0A5404  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EA
         TCS
         LDA   $FF
         CMP   #$0008
         BCC   L0A5419
         BRL   L0A5472
L0A5419  LDA   L030032
         BEQ   L0A5421
         BRL   L0A55A7
L0A5421  LDA   $FF
         LSR
         STA   $F2
         LDA   $F2
         CMP   L03003E
         BCS   L0A5466
         LDA   $F2
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F4
         CMP   $F4
         BEQ   L0A5466
         LDA   $F2
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0034
         LDA   [$F4],Y
         BNE   L0A5469
L0A5466  BRL   L0A55A7
L0A5469  LDA   $FF
         AND   #$0001
         STA   $F0
         BRA   L0A5483
L0A5472  LDA   L030160
         SEC
         SBC   #$0001
         STA   $F2
         LDA   $FF
         SEC
         SBC   #$0008
         STA   $F0
L0A5483  LDAL  L056301
         STA   $EE
         LDA   $F0
         CMP   #$001E
         BCC   L0A54B2
         LDA   $F0
         SEC
         SBC   #$001E
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L054455
         LDX   #^L054455
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         STA   $EC
         BRA   L0A54F4
L0A54B2  LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDX   $F6
         LDA   #$00D3
         CLC
         ADC   $F4
         BCC   L0A54E6
         INX
L0A54E6  JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         STA   $EC
L0A54F4  LDA   $EC
         CMP   #$FFFF
         BNE   L0A5505
         LDA   $EE
         CMP   #$FFFF
         BNE   L0A5505
         BRL   L0A55A7
L0A5505  LDA   $EE
         CMP   #$FFFF
         BEQ   L0A555D
         LDA   $F0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L058580
         LDX   #^L058580
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         PEI   $EE
         JSL   L060280
         PLY
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05048C
         LDX   #^L05048C
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0004
         LDA   [$F4],Y
         PLX
         STX   $F8
         AND   $F8
         TAY
         BNE   L0A555D
         BRL   L0A55A7
L0A555D  JSL   L082EE5
         LDA   $EE
         CMP   #$FFFF
         BEQ   L0A556C
         JSL   L0A4ABD
L0A556C  LDA   $EC
         CMP   #$FFFF
         BEQ   L0A5588
         PEI   $F0
         PEI   $F2
         JSL   L0A4E78
         PLY
         PLY
         PEA   $0000
         PEI   $EC
         JSL   L0A49CF
         PLY
         PLY
L0A5588  LDA   $EE
         CMP   #$FFFF
         BEQ   L0A559C
         PEI   $F0
         PEI   $EE
         PEI   $F2
         JSL   L0A516C
         PLY
         PLY
         PLY
L0A559C  PEI   $F2
         JSL   L0A3E20
         PLY
         JSL   L082F35
L0A55A7  TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         PLD
         RTL

L0A55B1  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DA
         TCS
         LDA   L030034
         BEQ   L0A55C7
         LDA   #$0001
         BRL   L0A57BA
L0A55C7  LDA   $FF
         AND   #$8000
         STA   $DE
         LDA   $FF
         AND   #$4000
         STA   $DC
         LDA   $FF
         AND   #$3FFF
         STA   $FF
         LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EC
         STA   $EA
         LDA   $FF
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $EA
         CLC
         ADC   #$005B
         LDX   $EC
         BCC   L0A5619
         INX
L0A5619  JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0004
         LDA   [$EE],Y
         TAX
         LDY   #$0002
         LDA   [$EE],Y
         STX   $E8
         STA   $E6
         LDA   $DE
         BNE   L0A564F
         LDA   [$EE]
         LDX   #$0000
         TAY
         BPL   L0A563F
         DEX
L0A563F  PHX
         PHA
         LDX   $E8
         LDA   $E6
         JSL   L021F00
         PLA
         PLX
         STX   $E8
         STA   $E6
L0A564F  LDA   $FF
         CMP   #$0003
         BEQ   L0A56D3
         BCC   L0A56D3
         LDA   $FF
         SEC
         SBC   #$0004
         LSR
         LSR
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $EA
         CLC
         ADC   #$005B
         LDX   $EC
         BCC   L0A567A
         INX
L0A567A  JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0004
         LDA   [$EE],Y
         TAX
         LDY   #$0002
         LDA   [$EE],Y
         PHX
         PHA
         LDX   $E8
         LDA   $E6
         JSL   L021F00
         PLA
         PLX
         STX   $E8
         STA   $E6
         LDA   $DE
         BNE   L0A56BC
         LDA   [$EE]
         LDX   #$0000
         TAY
         BPL   L0A56AC
         DEX
L0A56AC  PHX
         PHA
         LDX   $E8
         LDA   $E6
         JSL   L021F00
         PLA
         PLX
         STX   $E8
         STA   $E6
L0A56BC  LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $E8
         LDA   $E6
         SEC
         JSL   L022303
         PLA
         PLX
         STX   $E8
         STA   $E6
L0A56D3  LDA   #$0001
         STA   $E4
L0A56D8  SEC
         LDA   $E6
         SBC   #$01F4
         BNE   L0A56E7
         LDA   $E8
         SBC   #$0000
         BRA   L0A56EE
L0A56E7  LDA   $E8
         SBC   #$0000
         REP   #$02
L0A56EE  BVS   L0A56F3
         EOR   #$8000
L0A56F3  BPL   L0A5710
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $E8
         LDA   $E6
         SEC
         JSL   L022303
         PLA
         PLX
         STX   $E8
         STA   $E6
         INC   $E4
         BRA   L0A56D8
L0A5710  LDA   $DC
         BEQ   L0A5717
         BRL   L0A57B8
L0A5717  LDA   $EA
         CLC
         ADC   #$00D3
         LDX   $EC
         BCC   L0A5722
         INX
L0A5722  STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         PHA
         JSL   L020B37
         PLY
         STA   $E0
         CMP   #$001B
         BNE   L0A573C
         INC   $E4
         BRA   L0A574B
L0A573C  LDA   $E0
         CMP   #$001C
         BNE   L0A574B
         LDA   $E4
         CLC
         ADC   #$0002
         STA   $E4
L0A574B  LDA   $EA
         CLC
         ADC   #$00D3
         LDX   $EC
         BCC   L0A5756
         INX
L0A5756  STA   $F2
         STX   $F4
         LDY   #$0014
         LDA   [$F2],Y
         PHA
         JSL   L020B37
         PLY
         STA   $E2
         LDA   $FF
         BRL   L0A57A4
L0A576C  LDA   $E2
         CMP   #$007C
         BNE   L0A5775
         INC   $E4
L0A5775  BRL   L0A57B8
L0A5778  LDA   $E2
         CMP   #$0079
         BNE   L0A5781
         INC   $E4
L0A5781  BRL   L0A57B8
L0A5784  LDA   $E2
         CMP   #$0078
         BEQ   L0A5792
         LDA   $E0
         CMP   #$0042
         BNE   L0A5794
L0A5792  INC   $E4
L0A5794  BRL   L0A57B8
L0A5797  LDA   $E2
         CMP   #$007A
         BNE   L0A57A0
         INC   $E4
L0A57A0  BRA   L0A57B8
         BRA   L0A57B8
L0A57A4  CMP   #$0003
         BEQ   L0A576C
         CMP   #$000D
         BEQ   L0A5784
         CMP   #$000E
         BEQ   L0A5797
         CMP   #$000F
         BEQ   L0A5778
L0A57B8  LDA   $E4
L0A57BA  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L0A57C4  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00D8
         TCS
         LDA   $FD
         CMP   #$0004
         BCC   L0A5805
         LDA   $FD
         CMP   #$000B
         BEQ   L0A57DF
         BCS   L0A5805
L0A57DF  LDX   L030050
         LDA   L03004E
         SEC
         SBC   #$0096
         PHA
         TXA
         SBC   #$0000
         TAX
         PLA
         PHX
         PHA
         LDX   L03000A
         LDA   L030008
         JSL   L022171
         BEQ   L0A5805
         BCC   L0A5805
         LDA   $FF
         LSR
         STA   $FF
L0A5805  LDA   $FF
         BNE   L0A580C
         BRL   L0A5D69
L0A580C  LDX   L03009A
         LDA   L030098
         STA   $F0
         STX   $F2
         LDY   #$000C
         LDA   [$F0],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   $E6
         TAY
         BEQ   L0A5838
         LDA   $E6
         PHA
         LDA   $FF
         CLC
         JSL   L0220A5
         PLA
         STA   $FF
L0A5838  LDA   $FB
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EA
         STA   $E8
         LDA   $FD
         CMP   #$0004
         BCC   L0A586C
         LDA   $FD
         SEC
         SBC   #$0004
         LSR
         LSR
         STA   $E4
         BRA   L0A5870
L0A586C  LDA   $FD
         STA   $E4
L0A5870  LDY   #$0004
         LDA   [$EC],Y
         TAX
         LDY   #$0002
         LDA   [$EC],Y
         STX   $E2
         STA   $E0
         LDA   $E4
         ORA   #$C000
         PHA
         PEI   $FB
         JSL   L0A55B1
         PLY
         PLY
         STA   $E6
         LDA   $FD
         CMP   #$0004
         BCC   L0A58BA
         LDX   L030050
         LDA   L03004E
         SEC
         SBC   #$0019
         PHA
         TXA
         SBC   #$0000
         TAX
         PLA
         PHX
         PHA
         LDX   L03000A
         LDA   L030008
         JSL   L022171
         BCS   L0A58BA
         LDA   $FF
         ASL
         STA   $FF
L0A58BA  LDA   $FD
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         CLC
         ADC   #$005B
         LDX   $EA
         BCC   L0A58D6
         INX
L0A58D6  JSL   L021F00
         PLA
         PLX
         STX   $EE
         STA   $EC
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDY   #$0004
         LDA   [$EC],Y
         TAX
         LDY   #$0002
         LDA   [$EC],Y
         JSL   L021F00
         PLA
         PLX
         LDY   #$0004
         PHA
         TXA
         STA   [$EC],Y
         PLA
         LDY   #$0002
         STA   [$EC],Y
         LDA   [$EC]
         SEC
         SBC   #$7D00
         BVS   L0A5910
         EOR   #$8000
L0A5910  BMI   L0A5930
         PEA   $0064
         LDA   $FF
         LSR
         LSR
         LSR
         PHA
         PEA   $0001
         JSL   L0204E3
         PLY
         PLY
         PLY
         PHA
         LDA   [$EC]
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   [$EC]
L0A5930  LDA   $E4
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         CLC
         ADC   #$005B
         LDX   $EA
         BCC   L0A594C
         INX
L0A594C  JSL   L021F00
         PLA
         PLX
         STX   $EE
         STA   $EC
         LDA   $FD
         CMP   #$0004
         BCC   L0A5982
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDY   #$0004
         LDA   [$EC],Y
         TAX
         LDY   #$0002
         LDA   [$EC],Y
         JSL   L021F00
         PLA
         PLX
         LDY   #$0004
         PHA
         TXA
         STA   [$EC],Y
         PLA
         LDY   #$0002
         STA   [$EC],Y
L0A5982  LDA   $E4
         ORA   #$C000
         PHA
         PEI   $FB
         JSL   L0A55B1
         PLY
         PLY
         STA   $FF
         LDA   $FF
         CMP   $E6
         BNE   L0A599B
         BRL   L0A5D69
L0A599B  BCS   L0A59A0
         BRL   L0A5D69
L0A59A0  LDA   $FF
         STA   $DA
         JSL   L020564
         STA   $DE
         JSL   L020564
         PHA
         LDA   #$0001
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $DC
         JSL   L020564
         STA   $E6
         LDA   $E4
         CMP   #$0002
         BEQ   L0A59CD
         LDA   $E6
         AND   $FF
         STA   $E6
L0A59CD  LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A59D8
         INX
L0A59D8  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$000C
         CLC
         ADC   $F0
         BCC   L0A59E7
         INX
L0A59E7  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $E6
         SEP   #$20
         STA   [$F0]
         REP   #$20
         LDY   #$003A
         LDA   [$E8],Y
         STA   $E6
         LDA   $FF
         EOR   #$FFFF
         PHA
         JSL   L020564
         PLX
         STX   $F4
         AND   $F4
         PHA
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5A1B
         INX
L0A5A1B  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0012
         CLC
         ADC   $F0
         BCC   L0A5A2A
         INX
L0A5A2A  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         SEP   #$20
         STA   [$F0]
         REP   #$20
         LDA   $E4
         BRL   L0A5C52
L0A5A44  LDA   $E6
         LSR
         LSR
         LSR
         LSR
         STA   $E6
         LDA   $FF
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         STA   $FF
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5A65
         INX
L0A5A65  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0003
         CLC
         ADC   $F0
         BCC   L0A5A74
         INX
L0A5A74  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $DC
         SEP   #$20
         STA   [$F0]
         REP   #$20
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5A91
         INX
L0A5A91  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0006
         CLC
         ADC   $F0
         BCC   L0A5AA0
         INX
L0A5AA0  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $DE
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRL   L0A5C5F
L0A5AB5  LDA   #$0015
         PHA
         LDA   $E6
         CLC
         JSL   L021F1A
         PLY
         STA   $E6
         LDA   $FF
         ASL
         STA   $FF
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5AD3
         INX
L0A5AD3  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0003
         CLC
         ADC   $F0
         BCC   L0A5AE2
         INX
L0A5AE2  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $DE
         SEP   #$20
         STA   [$F0]
         REP   #$20
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5AFF
         INX
L0A5AFF  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0006
         CLC
         ADC   $F0
         BCC   L0A5B0E
         INX
L0A5B0E  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $DC
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRL   L0A5C5F
L0A5B23  LDA   $E6
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $E6
         LDA   $FF
         LSR
         PHA
         LDA   $FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         LDY   #$003E
         LDA   [$E8],Y
         PLX
         STX   $F4
         CLC
         ADC   $F4
         LDY   #$003E
         STA   [$E8],Y
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5B54
         INX
L0A5B54  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0009
         CLC
         ADC   $F0
         BCC   L0A5B63
         INX
L0A5B63  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $DC
         SEP   #$20
         STA   [$F0]
         REP   #$20
         BRL   L0A5BD1
L0A5B78  LDA   #$0019
         PHA
         LDA   $E6
         CLC
         JSL   L021F1A
         PLY
         STA   $E6
         LDY   #$003E
         LDA   [$E8],Y
         CLC
         ADC   $FF
         LDY   #$003E
         STA   [$E8],Y
         LDA   $FF
         CLC
         ADC   #$0001
         LSR
         PHA
         LDA   $FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $FF
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5BB0
         INX
L0A5BB0  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$0009
         CLC
         ADC   $F0
         BCC   L0A5BBF
         INX
L0A5BBF  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $DE
         SEP   #$20
         STA   [$F0]
         REP   #$20
L0A5BD1  LDA   $DA
         SEC
         SBC   #$0001
         PHA
         JSL   L020599
         PHA
         JSL   L020493
         PLY
         PLY
         PHA
         LDY   #$003E
         LDA   [$E8],Y
         PLX
         STX   $F4
         CLC
         ADC   $F4
         LDY   #$003E
         STA   [$E8],Y
         SEC
         SBC   #$0384
         BEQ   L0A5C09
         BVS   L0A5BFF
         EOR   #$8000
L0A5BFF  BPL   L0A5C09
         LDA   #$0384
         LDY   #$003E
         STA   [$E8],Y
L0A5C09  LDA   #$0003
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $E8
         CLC
         ADC   #$0046
         LDX   $EA
         BCC   L0A5C21
         INX
L0A5C21  STA   $F0
         STX   $F2
         LDX   $F2
         LDA   #$000F
         CLC
         ADC   $F0
         BCC   L0A5C30
         INX
L0A5C30  STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         SEP   #$20
         STA   [$F0]
         REP   #$20
L0A5C45  BRL   L0A5C5F
L0A5C48  DA    L0A5A44
         DA    L0A5AB5
         DA    L0A5B78
         DA    L0A5B23
         DA    L0A5C45
L0A5C52  CMP   #$0004
         BCC   L0A5C5A
         LDA   #$0004
L0A5C5A  ASL
         TAX
         JMP   (L0A5C48,X)

L0A5C5F  LDA   $FF
         LSR
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         LDY   #$0036
         LDA   [$E8],Y
         PLX
         STX   $F4
         CLC
         ADC   $F4
         LDY   #$0036
         STA   [$E8],Y
         SEC
         SBC   #$03E7
         BEQ   L0A5C9E
         BVS   L0A5C94
         EOR   #$8000
L0A5C94  BPL   L0A5C9E
         LDA   #$03E7
         LDY   #$0036
         STA   [$E8],Y
L0A5C9E  LDA   $E6
         LSR
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $E6
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         LDY   #$003A
         LDA   [$E8],Y
         PLX
         STX   $F4
         CLC
         ADC   $F4
         LDY   #$003A
         STA   [$E8],Y
         SEC
         SBC   #$270F
         BEQ   L0A5CDD
         BVS   L0A5CD3
         EOR   #$8000
L0A5CD3  BPL   L0A5CDD
         LDA   #$270F
         LDY   #$003A
         STA   [$E8],Y
L0A5CDD  LDY   #$0030
         LDA   [$E8],Y
         ORA   #$0100
         LDY   #$0030
         STA   [$E8],Y
         PEI   $FB
         JSL   L0A3E20
         PLY
         JSL   L0844EB
         PEI   $EA
         PEI   $E8
         LDA   $FB
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587D4
         LDX   #^L0587D4
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         STA   $FF
         PHA
         JSL   L0842BE
         PLY
         PLY
         PLY
         PEA   ^L0554BC
         PEA   L0554BC
         PEI   $FF
         JSL   L0842BE
         PLY
         PLY
         PLY
         LDA   $E4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L055463
         LDX   #^L055463
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDY   #$0002
         LDA   [$F0],Y
         TAX
         LDA   [$F0]
         PHX
         PHA
         PEI   $FF
         JSL   L0842BE
         PLY
         PLY
         PLY
         PEA   ^L0554CC
         PEA   L0554CC
         PEI   $FF
         JSL   L0842BE
         PLY
         PLY
         PLY
L0A5D69  TSC
         CLC
         ADC   #$001C
         TCS
         PLD
         RTL

L0A5D71  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         TCS
         PEA   $000A
         PEI   $FF
         JSL   L060112
         PLY
         LSR
         STA   $F2
         PHA
         PEA   $0001
         JSL   L0204E3
         PLY
         PLY
         PLY
         STA   $F0
L0A5D96  LDA   $F2
         SEC
         SBC   #$000A
         STA   $F2
         SEC
         SBC   #$0000
         BEQ   L0A5DC2
         BVS   L0A5DA9
         EOR   #$8000
L0A5DA9  BPL   L0A5DC2
         LDA   #$0001
         PHA
         LDA   $F2
         SEC
         JSL   L0222DF
         LDA   $F0
         PLX
         STX   $F8
         CLC
         ADC   $F8
         STA   $F0
         BRA   L0A5D96
L0A5DC2  LDA   $F0
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A5DCE  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         LDY   #$0038
         LDA   [$FB],Y
         STA   $EE
         PHA
         LDA   #$0001
         PHA
         LDY   #$003A
         LDA   [$FB],Y
         SEC
         JSL   L0222DF
         PLA
         STA   $EC
         PLX
         STX   $F0
         SEC
         SBC   $F0
         BEQ   L0A5E47
         BVS   L0A5DFF
         EOR   #$8000
L0A5DFF  BPL   L0A5E47
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   L0A5E0A
         DEX
L0A5E0A  PHX
         PHA
         LDA   $EE
         LDX   #$0000
         TAY
         BPL   L0A5E15
         DEX
L0A5E15  PHX
         PHA
         LDA   $FF
         LDX   #$0000
         TAY
         BPL   L0A5E20
         DEX
L0A5E20  SEC
         JSL   L0220EA
         PLA
         PLX
         SEC
         JSL   L021FA9
         PLY
         PLY
         PHA
         LDA   #$0001
         PHA
         LDA   $FF
         SEC
         JSL   L0222DF
         PLA
         STA   $FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         BRA   L0A5E49
         BRA   L0A5E49
L0A5E47  LDA   $FF
L0A5E49  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A5E53  ENT
         PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         LDA   $FD
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F9
         CLC
         ADC   #$0046
         LDX   $FB
         BCC   L0A5E7A
         INX
L0A5E7A  JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDA   #$00AA
         PLX
         STX   $F2
         SEC
         SBC   $F2
         STA   $EC
         SEC
         SBC   #$0010
         BVS   L0A5EA1
         EOR   #$8000
L0A5EA1  BMI   L0A5EAA
         LDA   $FF
         LSR
         LSR
         LSR
         BRA   L0A5EB8
L0A5EAA  PEI   $EC
         PEA   $0007
         PEI   $FF
         JSL   L0205CE
         PLY
         PLY
         PLY
L0A5EB8  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0A5EC2  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         JSL   L020564
         TAY
         BEQ   L0A5EED
         LDA   #$0064
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         CMP   $FF
         BEQ   L0A5EED
         BCC   L0A5EED
         LDA   #$0001
         BRA   L0A5F5C
L0A5EED  LDA   $FB
         CLC
         ADC   #$0046
         LDX   $FD
         BCC   L0A5EF8
         INX
L0A5EF8  STX   $EE
         STA   $EC
         LDY   #$0001
         LDA   [$EC],Y
         AND   #$00FF
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         CMP   $FF
         BEQ   L0A5F15
         BCS   L0A5F1A
L0A5F15  LDA   #$0000
         BRA   L0A5F1D
L0A5F1A  LDA   #$0001
L0A5F1D  STA   $FF
         LDA   [$EC]
         AND   #$00FF
         PHA
         LDA   $FF
         BEQ   L0A5F2E
         LDA   #$FFFE
         BRA   L0A5F31
L0A5F2E  LDA   #$0002
L0A5F31  PHA
         LDY   #$0001
         LDA   [$EC],Y
         AND   #$00FF
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         LDY   #$0002
         LDA   [$EC],Y
         AND   #$00FF
         PHA
         JSL   L0204E3
         PLY
         PLY
         PLY
         SEP   #$20
         LDY   #$0001
         STA   [$EC],Y
         REP   #$20
         LDA   $FF
L0A5F5C  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A5F66  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   $FD
         CLC
         ADC   #$0046
         LDX   $FF
         BCC   L0A5F7C
         INX
L0A5F7C  STA   $F2
         STX   $F4
         LDX   $F4
         LDA   #$0003
         CLC
         ADC   $F2
         BCC   L0A5F8B
         INX
L0A5F8B  STA   $F2
         STX   $F4
         LDY   #$0001
         LDA   [$F2],Y
         AND   #$00FF
         ASL
         ASL
         ASL
         CLC
         ADC   #$0064
         STA   $F0
         PEI   $F0
         PEI   $FF
         PEI   $FD
         JSL   L0A5DCE
         PLY
         PLY
         PLY
         STA   $F0
         LDY   #$0032
         LDA   [$FD],Y
         STA   $EE
         TAY
         BEQ   L0A5FDB
         LDA   $EE
         AND   #$0010
         TAY
         BEQ   L0A5FC6
         LDA   #$0002
         BRA   L0A5FC9
L0A5FC6  LDA   #$0003
L0A5FC9  PHA
         LDA   $F0
         CLC
         JSL   L0222DF
         LDA   $F0
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $F0
L0A5FDB  LDA   $FD
         CLC
         ADC   #$00D3
         LDX   $FF
         BCC   L0A5FE6
         INX
L0A5FE6  STA   $F2
         STX   $F4
         LDY   #$000A
         LDA   [$F2],Y
         PHA
         JSL   L020B37
         PLY
         CMP   #$0077
         BNE   L0A600B
         LDA   $F0
         LSR
         LSR
         LSR
         LSR
         PHA
         LDA   $F0
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $F0
L0A600B  LDA   $F0
         CLC
         ADC   #$0009
         STA   $F0
         LDA   #$000A
         PHA
         LDA   $F0
         CLC
         JSL   L021F1A
         LDA   $F0
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $F0
         LDA   $F0
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0A6034  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         PEI   $FF
         PEI   $FD
         JSL   L0A5F66
         PLY
         PLY
         STA   $EE
         PHA
         LDY   #$010F
         LDA   [$FD],Y
         STA   $F0
         PLX
         STX   $F2
         CMP   $F2
         BCS   L0A6097
         LDA   #$0002
         STA   $EC
         LDA   $EE
         LDX   #$0000
         PEA   $0000
         PEA   $0005
         CLC
         JSL   L0220EA
         LDX   #$0000
         LDA   #$0003
         PHX
         PHA
         LDA   $F0
         LDX   #$0000
         SEC
         JSL   L0222B8
         PLA
         PLX
         JSL   L022171
         BVS   L0A608C
         EOR   #$8000
L0A608C  BMI   L0A6090
         INC   $EC
L0A6090  LDA   #$0001
         STA   $F0
         BRA   L0A60B8
L0A6097  LDA   $EE
         PHA
         LDA   $F0
         SEC
         SBC   $EE
         ASL
         ASL
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDA   #$0004
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $EC
         LDA   #$0002
         STA   $F0
L0A60B8  LDY   #$0032
         LDA   [$FD],Y
         AND   #$0020
         TAY
         BEQ   L0A60CA
         LDA   $EC
         CLC
         ADC   $F0
         STA   $EC
L0A60CA  LDA   $FD
         CLC
         ADC   #$00D3
         LDX   $FF
         BCC   L0A60D5
         INX
L0A60D5  STA   $F2
         STX   $F4
         LDY   #$000A
         LDA   [$F2],Y
         PHA
         JSL   L020B37
         PLY
         CMP   #$00C2
         BNE   L0A60EB
         DEC   $EC
L0A60EB  LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A60F7  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDA   $FD
         CLC
         ADC   #$0046
         LDX   $FF
         BCC   L0A610D
         INX
L0A610D  STA   $F2
         STX   $F4
         LDX   $F4
         LDA   #$0006
         CLC
         ADC   $F2
         BCC   L0A611C
         INX
L0A611C  STA   $F2
         STX   $F4
         LDY   #$0001
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$0007
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $F0
         PEI   $FF
         PEI   $FD
         JSL   L0A5F66
         PLY
         PLY
         LDX   #$0000
         PHX
         PHA
         LDY   #$010F
         LDA   [$FD],Y
         LDX   #$0000
         PHX
         PHA
         LDA   #$0001
         PHA
         LDA   $F0
         SEC
         JSL   L0222DF
         PLA
         LDX   #$0000
         TAY
         BPL   L0A6164
         DEX
L0A6164  SEC
         JSL   L0220EA
         PLA
         PLX
         SEC
         JSL   L021FA9
         PLY
         PLY
         PHA
         LDA   $F0
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $F0
         LDA   L030034
         BEQ   L0A6190
         LDA   #$0001
         PHA
         LDA   $F0
         SEC
         JSL   L0222DF
         PLA
         STA   $F0
L0A6190  JSL   L02051C
         AND   #$0007
         PHA
         LDA   #$0064
         PLX
         STX   $F6
         SEC
         SBC   $F6
         PHA
         LDA   #$0001
         PHA
         LDA   $F0
         SEC
         JSL   L0222DF
         JSL   L02051C
         AND   #$0007
         PHA
         LDA   #$0001
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         JSL   L0204E3
         PLY
         PLY
         PLY
         TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0A61D0  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DE
         TCS
         LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   $EE
         CLC
         ADC   #$0046
         LDX   $F0
         BCC   L0A6207
         INX
L0A6207  STA   $F2
         STX   $F4
         LDX   $F4
         LDA   #$0003
         CLC
         ADC   $F2
         BCC   L0A6216
         INX
L0A6216  STA   $F2
         STX   $F4
         LDY   #$0001
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$000F
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A6245
         INX
L0A6245  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $E2
         PEI   $E2
         JSL   L060112
         PLY
         STA   $E6
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L0A5F66
         PLY
         PLY
         LSR
         LSR
         LSR
         LSR
         STA   $E4
         PLX
         STX   $F2
         CMP   $F2
         BCC   L0A6287
         LDA   $E6
         SEC
         SBC   #$000C
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         BRA   L0A62C1
L0A6287  LDA   $E4
         SEC
         SBC   #$000C
         LSR
         PHA
         LDA   $E4
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E0
         CMP   $E6
         BCC   L0A62B0
         LDA   $E6
         SEC
         SBC   $E4
         LSR
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         BRA   L0A62C1
L0A62B0  LDA   $E6
         SEC
         SBC   $E0
         ASL
         PHA
         LDA   $E8
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $E8
L0A62C1  LDA   #$000A
         PHA
         LDA   $E2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0005
         BEQ   L0A62D8
         BRL   L0A6373
L0A62D8  PEI   $E2
         JSL   L060CF6
         PLY
         STX   $EC
         STA   $EA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$00FF
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         STZ   $E6
         LDY   #$0001
         LDA   [$EA],Y
         AND   #$00FF
         STA   $E4
         LDA   $E4
         CMP   #$0000
         BEQ   L0A6310
         LDA   $E4
         CMP   #$0002
         BNE   L0A631D
L0A6310  PEA   $0004
         PEI   $FD
         JSL   L0A55B1
         PLY
         PLY
         STA   $E6
L0A631D  LDA   $E4
         CMP   #$0000
         BEQ   L0A6341
         LDA   $E4
         CMP   #$0010
         BCS   L0A6341
         PEA   $000A
         PEI   $FD
         JSL   L0A55B1
         PLY
         PLY
         PHA
         LDA   $E6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E6
L0A6341  LDA   $E4
         CMP   #$0010
         BCC   L0A6365
         LDA   $E4
         CMP   #$0070
         BCS   L0A6365
         PEA   $000B
         PEI   $FD
         JSL   L0A55B1
         PLY
         PLY
         PHA
         LDA   $E6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E6
L0A6365  LDA   $E6
         ASL
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
L0A6373  PEI   $E8
         PEI   $F0
         PEI   $EE
         JSL   L0A5DCE
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $FF
         CMP   #$0000
         BNE   L0A638E
         LDA   #$0001
         BRA   L0A6391
L0A638E  LDA   #$0002
L0A6391  PHA
         LDY   #$0032
         LDA   [$EE],Y
         PLX
         STX   $F6
         AND   $F6
         TAY
         BEQ   L0A63AD
         LDA   #$0001
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PLA
         STA   $E8
L0A63AD  PEA   $0064
         LDA   #$0001
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PEA   $0000
         JSL   L0204E3
         PLY
         PLY
         PLY
         TAY
         TSC
         CLC
         ADC   #$0018
         TCS
         TYA
         PLD
         RTL

L0A63CF  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E0
         TCS
         LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   $FF
         AND   #$8000
         STA   $E4
         TAY
         BEQ   L0A640C
         LDA   $FF
         AND   #$7FFF
         STA   $FF
L0A640C  LDA   #$0000
         STA   $E6
         LDA   #$0000
         STA   $E8
         BRL   L0A64E8
L0A6419  LDA   #$000A
         PHA
         LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A6430
         INX
L0A6430  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $E2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0006
         BEQ   L0A644F
         BRL   L0A64E6
L0A644F  PEI   $E2
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$007F
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0509D8
         LDX   #^L0509D8
         JSL   L021F00
         PLA
         PLX
         STX   $EC
         STA   $EA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$00FF
         AND   #$0080
         TAY
         BEQ   L0A64E6
         LDA   $E8
         CMP   $FF
         BNE   L0A6492
         LDA   #$0004
         BRA   L0A6495
L0A6492  LDA   #$0005
L0A6495  PHA
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587EC
         LDX   #^L0587EC
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         PHA
         PEI   $E4
         PEI   $EC
         PEI   $EA
         JSL   L060425
         PLY
         PLY
         PLY
         PHA
         PEI   $E8
         PEI   $FD
         JSL   L0A61D0
         PLY
         PLY
         PLX
         STX   $F6
         CLC
         ADC   $F6
         CLC
         JSL   L0220A5
         PLA
         CLC
         JSL   L0222DF
         LDA   $E6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E6
L0A64E6  INC   $E8
L0A64E8  LDA   $E8
         SEC
         SBC   #$0001
         BNE   L0A64F3
         BRL   L0A6419
L0A64F3  BVS   L0A64F8
         EOR   #$8000
L0A64F8  BMI   L0A64FD
         BRL   L0A6419
L0A64FD  LDA   #$0003
         PHA
         LDA   $EE
         CLC
         ADC   #$0046
         LDX   $F0
         BCC   L0A650C
         INX
L0A650C  STA   $F2
         STX   $F4
         LDX   $F4
         LDA   #$000C
         CLC
         ADC   $F2
         BCC   L0A651B
         INX
L0A651B  STA   $F2
         STX   $F4
         LDY   #$0001
         LDA   [$F2],Y
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         STA   $E8
         LDA   $E4
         BEQ   L0A6550
         LDA   #$0001
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PLA
         STA   $E8
L0A6550  LDY   #$0111
         LDA   [$EE],Y
         PHA
         LDY   #$0040
         LDA   [$EE],Y
         PLX
         STX   $F6
         CLC
         ADC   $F6
         CLC
         ADCL  L056154
         CLC
         ADC   $E6
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         LDA   $FF
         CMP   #$0001
         BEQ   L0A65E8
         BCC   L0A65E8
         LDA   #$000A
         PHA
         LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L0A6594
         INX
L0A6594  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $E2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0006
         BNE   L0A65E8
         PEI   $E2
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         PEI   $E4
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$007F
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0509D8
         LDX   #^L0509D8
         JSL   L021F00
         JSL   L060425
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
L0A65E8  LDA   $FF
         PHA
         LDA   #$0001
         CLC
         JSL   L0222A8
         LDY   #$0032
         LDA   [$EE],Y
         PLX
         STX   $F6
         AND   $F6
         TAY
         BEQ   L0A6619
         JSL   L020599
         PHA
         LDA   #$0008
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         LDA   $E8
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $E8
L0A6619  LDA   L030034
         BEQ   L0A662C
         LDA   #$0001
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PLA
         STA   $E8
L0A662C  PEA   $0064
         LDA   #$0001
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PEA   $0000
         JSL   L0204E3
         PLY
         PLY
         PLY
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         PLD
         RTL

L0A664E  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #$0001
         STA   L03001C
         STZ   L030034
         LDA   #$000A
         STA   L030054
         JSL   L0C13B4
         LDA   #L0512C6
         LDX   #^L0512C6
         STX   L0300E4
         STA   L0300E2
         LDA   #L051386
         LDX   #^L051386
         STX   L0300E8
         STA   L0300E6
         LDA   #L05181E
         LDX   #^L05181E
         STX   L0300EC
         STA   L0300EA
         LDA   #L05183A
         LDX   #^L05183A
         STX   L0300F0
         STA   L0300EE
         JSL   L0703AA
         JSL   L0D48BE
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0A66AC  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E6
         TCS
         LDAL  L05615A
         AND   #$00FF
         STA   $EA
         TAY
         BNE   L0A66C6
         BRL   L0A6759
L0A66C6  LDA   $FD
         AND   #$001F
         PHA
         PHA
         LDA   $E8
         AND   #$FFE0
         STA   $F6
         PLA
         ORA   $F6
         STA   $E8
         PLA
         LDA   $FF
         AND   #$001F
         PHA
         PHA
         LDA   $E8
         AND   #$FC1F
         STA   $F6
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         STA   $E8
         PLA
         LDA   L03008A
         AND   #$003F
         PHA
         PHA
         LDA   $E8
         AND   #$03FF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F6
         STA   $E8
         PLA
         LDA   $E8
         STA   $EC
         LDA   $EA
         DEC   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
L0A672C  LDX   $F0
         LDA   $EE
         SEC
         SBC   #$0002
         STA   $EE
         PHA
         LDA   $F0
         SBC   #$0000
         TAX
         STA   $F0
         PLA
         STA   $F2
         STX   $F4
         LDA   [$F2]
         CMP   $EC
         BNE   L0A6752
         LDA   $EA
         CLC
         ADC   #$0001
         BRA   L0A675C
L0A6752  LDA   $EA
         DEC   $EA
         TAY
         BNE   L0A672C
L0A6759  LDA   #$0000
L0A675C  TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PLD
         RTL

L0A6766  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDAL  L05615A
         DEC
         SEP   #$20
         STAL  L05615A
         REP   #$20
         AND   #$00FF
         SEC
         SBC   $FF
         STA   $F2
         TAY
         BNE   L0A678C
         BRL   L0A67F2
L0A678C  LDA   $F2
         ASL
         PHA
         LDA   $FF
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         LDA   $FF
         CLC
         ADC   #$0001
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         LDA   $FF
         CLC
         ADC   #$0001
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
L0A67F2  LDAL  L05615C
         AND   #$00FF
         CMP   $FF
         BEQ   L0A680E
         BCC   L0A680E
         LDAL  L05615C
         PHA
         DEC
         SEP   #$20
         STAL  L05615C
         REP   #$20
         PLA
L0A680E  LDAL  L05615D
         AND   #$00FF
         CMP   $FF
         BEQ   L0A682A
         BCC   L0A682A
         LDAL  L05615D
         PHA
         DEC
         SEP   #$20
         STAL  L05615D
         REP   #$20
         PLA
L0A682A  TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0A6832  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E2
         TCS
         LDAL  L05615A
         AND   #$00FF
         STA   $EA
         TAY
         BNE   L0A684C
         BRL   L0A6978
L0A684C  LDA   $FF
         AND   #$8000
         STA   $E8
         TAY
         BEQ   L0A685D
         LDA   $FF
         AND   #$7FFF
         STA   $FF
L0A685D  LDA   $FB
         AND   #$001F
         PHA
         PHA
         LDA   $E4
         AND   #$FFE0
         STA   $F4
         PLA
         ORA   $F4
         STA   $E4
         PLA
         LDA   $FD
         AND   #$001F
         PHA
         PHA
         LDA   $E4
         AND   #$FC1F
         STA   $F4
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F4
         STA   $E4
         PLA
         LDA   L03008A
         AND   #$003F
         PHA
         PHA
         LDA   $E4
         AND   #$03FF
         STA   $F4
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F4
         STA   $E4
         PLA
         LDA   #L05615E
         LDX   #^L05615E
         STX   $EE
         STA   $EC
         STZ   $E6
L0A68B1  LDA   $EA
         DEC   $EA
         TAY
         BNE   L0A68BB
         BRL   L0A6978
L0A68BB  LDX   #$0000
         TDC
         CLC
         ADC   #$00E4
         PHX
         PHA
         LDX   $EE
         LDA   $EC
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EC
         LDA   $EE
         BCC   L0A68D6
         INC
L0A68D6  STA   $EE
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   $F0
         LDX   $F2
         PHX
         PHA
         LDY   #$0001
         JSL   L0226A1
         BEQ   L0A68F0
         BRL   L0A6975
L0A68F0  LDA   $E6
         BEQ   L0A68F7
         BRL   L0A6954
L0A68F7  LDA   #$0001
         STA   $E6
         LDA   $E8
         BEQ   L0A6929
         PEI   $FF
         LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         PHA
         JSL   L0204BA
         PLY
         PLY
         STA   $FF
         BRA   L0A6954
L0A6929  LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         CLC
         ADC   $FF
         PHA
         PEA   $0050
         JSL   L020493
         PLY
         PLY
         STA   $FF
L0A6954  LDA   $FF
         PHA
         LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         PLA
         SEP   #$20
         STA   [$F0]
         REP   #$20
L0A6975  BRL   L0A68B1
L0A6978  TSC
         CLC
         ADC   #$0012
         TCS
         PLD
         RTL

L0A6980  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EC
         TCS
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$001D
         LDA   [$F4],Y
         AND   #$00FF
         STA   $F2
         STZ   $EE
         BRA   L0A6A13
L0A69BA  LDA   $EE
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05881C
         LDX   #^L05881C
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         PEI   $FF
         JSL   L0A4E78
         PLY
         PLY
         STA   $F0
         CMP   #$FFFF
         BEQ   L0A6A11
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0000
         PEA   $FFFF
         LDA   #$000E
         PHA
         LDA   $F2
         CLC
         JSL   L0222A8
         LDA   $F0
         AND   #$3FFF
         PLX
         STX   $F8
         ORA   $F8
         PHA
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
L0A6A11  INC   $EE
L0A6A13  LDA   $EE
         CMP   #$001E
         BCC   L0A69BA
         TSC
         CLC
         ADC   #$000C
         TCS
         PLD
         RTL

L0A6A22  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00E4
         TCS
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F2
         STA   $F0
         LDA   #$0000
         LDY   #$0034
         STA   [$F0],Y
         LDY   #$0030
         LDA   [$F0],Y
         ORA   #$1000
         LDY   #$0030
         STA   [$F0],Y
         LDA   $FF
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F4
         CMP   $F4
         BEQ   L0A6A77
         BRL   L0A6ABA
L0A6A77  LDA   L030068
         BEQ   L0A6A9D
         STZ   L030068
         STZ   L03021A
         LDA   L030254
         BNE   L0A6A91
         LDAL  L056301
         PHA
         JSL   L020C94
         PLY
L0A6A91  LDA   #$0001
         STA   L0301FA
         JSL   L082F35
         BRA   L0A6AB2
L0A6A9D  LDA   L03006C
         BEQ   L0A6AB2
         STZ   L03006C
         STZ   L03021A
         LDA   #$0001
         STA   L0301FA
         JSL   L082F35
L0A6AB2  PEA   $0004
         JSL   L0A1ED3
         PLY
L0A6ABA  PEI   $FF
         JSL   L0A6980
         PLY
         PEA   $800A
         JSL   L061767
         PLY
         STA   $E6
         LDA   $E6
         CMP   #$FFFF
         BNE   L0A6AD5
         BRL   L0A6B78
L0A6AD5  PEI   $E6
         JSL   L060C4E
         PLY
         STX   $EE
         STA   $EC
         LDA   #$0005
         AND   #$007F
         PHA
         PHA
         LDY   #$0002
         LDA   [$EC],Y
         AND   #$FF80
         STA   $F8
         PLA
         ORA   $F8
         LDY   #$0002
         STA   [$EC],Y
         PLA
         LDA   #$0001
         AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$EC],Y
         AND   #$FF7F
         STA   $F8
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F8
         LDY   #$0002
         STA   [$EC],Y
         PLA
         LDA   $FF
         AND   #$0003
         PHA
         PHA
         LDY   #$0002
         LDA   [$EC],Y
         AND   #$3FFF
         STA   $F8
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F8
         LDY   #$0002
         STA   [$EC],Y
         PLA
         LDY   #$001D
         LDA   [$F0],Y
         AND   #$00FF
         STA   $EA
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0000
         PEA   $FFFF
         LDA   #$000E
         PHA
         LDA   $EA
         CLC
         JSL   L0222A8
         LDA   $E6
         AND   #$3FFF
         PLX
         STX   $F8
         ORA   $F8
         PHA
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
L0A6B78  LDA   #$0000
         SEP   #$20
         LDY   #$0021
         STA   [$F0],Y
         REP   #$20
         LDA   $F0
         CLC
         ADC   #$0022
         LDX   $F2
         BCC   L0A6B8F
         INX
L0A6B8F  STA   $F4
         STX   $F6
         LDA   #$0000
         SEP   #$20
         STA   [$F4]
         REP   #$20
         LDA   L030044
         SEP   #$20
         LDY   #$001C
         STA   [$F0],Y
         REP   #$20
         LDA   #$0000
         SEP   #$20
         LDY   #$0029
         STA   [$F0],Y
         REP   #$20
         LDA   $EA
         CLC
         ADC   #$0004
         SEC
         SBC   L030044
         AND   #$0003
         STA   $EA
         LDA   $EA
         CLC
         ADC   #$0001
         CMP   L03021C
         BNE   L0A6BDD
         LDA   #$0001
         STA   L0301FC
         STZ   L03021C
         LDA   #$0001
         STA   L030210
L0A6BDD  LDY   #$002A
         LDA   [$F0],Y
         AND   #$00FF
         BEQ   L0A6BEE
         PEI   $FF
         JSL   L0A734E
         PLY
L0A6BEE  STZ   L03012C
         PEA   $0000
         LDA   $EA
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0587FC
         LDX   #^L0587FC
         JSL   L021F00
         JSL   L080D34
         PLY
         PLY
         PLY
         PEI   $FF
         JSL   L0A3E20
         PLY
         LDA   #$0000
         STA   $E8
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F2
         STA   $F0
         BRA   L0A6C49
L0A6C27  LDY   #$0034
         LDA   [$F0],Y
         BEQ   L0A6C30
         BRA   L0A6C50
L0A6C30  LDA   $E8
         INC   $E8
         LDX   $F2
         LDA   $F0
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $F0
         LDA   $F2
         BCC   L0A6C45
         INC
L0A6C45  STA   $F2
         PLA
         PLX
L0A6C49  LDA   $E8
         CMP   L03003E
         BCC   L0A6C27
L0A6C50  LDA   $E8
         CMP   L03003E
         BNE   L0A6C5F
         LDA   #$0001
         STA   L03003A
         BRA   L0A6C86
L0A6C5F  LDA   L03024E
         CMP   $FF
         BNE   L0A6C6D
         PEI   $E8
         JSL   L070C99
         PLY
L0A6C6D  LDA   L0301EC
         CMP   $FF
         BNE   L0A6C7D
         PEI   $E8
         JSL   L073014
         PLY
         BRA   L0A6C86
L0A6C7D  LDA   L0301EC
         PHA
         JSL   L072D9A
         PLY
L0A6C86  TAY
         TSC
         CLC
         ADC   #$0014
         TCS
         TYA
         PLD
         RTL

L0A6C90  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00CA
         TCS
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F4
         STA   $F2
         STZ   $EC
         BRL   L0A6F97
L0A6CAA  LDA   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0562F9
         LDX   #^L0562F9
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         STA   $E6
         PHA
         LDY   #$0032
         LDA   [$F2],Y
         PLX
         STX   $FA
         ORA   $FA
         LDY   #$0032
         STA   [$F2],Y
         LDA   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0562F9
         LDX   #^L0562F9
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$0000
         STA   [$F6]
         LDA   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0562F1
         LDX   #^L0562F1
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         STA   $EA
         TAY
         BNE   L0A6D15
         BRL   L0A6F7E
L0A6D15  LDA   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0562F1
         LDX   #^L0562F1
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$0000
         STA   [$F6]
         LDY   #$0034
         LDA   [$F2],Y
         STA   $E8
         TAY
         BNE   L0A6D3F
         BRL   L0A6F7E
L0A6D3F  LDA   $E8
         SEC
         SBC   $EA
         STA   $E8
         SEC
         SBC   #$0000
         BEQ   L0A6D53
         BVS   L0A6D51
         EOR   #$8000
L0A6D51  BMI   L0A6D5D
L0A6D53  PEI   $EC
         JSL   L0A6A22
         PLY
         BRL   L0A6F7E
L0A6D5D  LDA   $E8
         LDY   #$0034
         STA   [$F2],Y
         LDY   #$0030
         LDA   [$F2],Y
         ORA   #$0100
         LDY   #$0030
         STA   [$F2],Y
         LDA   $E6
         BEQ   L0A6D82
         LDY   #$0030
         LDA   [$F2],Y
         ORA   #$2000
         LDY   #$0030
         STA   [$F2],Y
L0A6D82  LDA   $EC
         PHA
         LDA   #$0045
         CLC
         JSL   L0220A5
         PLA
         STA   $E8
         LDA   #$0000
         STA   $D0
         JSL   L082EE5
         LDA   $EC
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F6
         CMP   $F6
         BNE   L0A6E13
         LDA   #$001C
         STA   $D2
         LDA   $E8
         CLC
         ADC   #$0007
         STA   $CC
         CLC
         ADC   #$001F
         STA   $CE
         PEA   $000A
         PEA   $0010
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         PEA   $0010
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   $EA
         CMP   #$000A
         BCS   L0A6DF3
         LDA   $E8
         CLC
         ADC   #$0015
         STA   $E8
         BRA   L0A6E0C
L0A6DF3  LDA   $EA
         CMP   #$0064
         BCS   L0A6E04
         LDA   $E8
         CLC
         ADC   #$0012
         STA   $E8
         BRA   L0A6E0C
L0A6E04  LDA   $E8
         CLC
         ADC   #$000F
         STA   $E8
L0A6E0C  LDA   #$0010
         STA   $E4
         BRA   L0A6E76
L0A6E13  LDA   #$0006
         STA   $D2
         LDA   $E8
         STA   $CC
         CLC
         ADC   #$002F
         STA   $CE
         PEA   $000A
         PEA   $0018
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         PEA   $000F
         JSL   L0B225C
         PLY
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   $EA
         CMP   #$000A
         BCS   L0A6E58
         LDA   $E8
         CLC
         ADC   #$0013
         STA   $E8
         BRA   L0A6E71
L0A6E58  LDA   $EA
         CMP   #$0064
         BCS   L0A6E69
         LDA   $E8
         CLC
         ADC   #$0010
         STA   $E8
         BRA   L0A6E71
L0A6E69  LDA   $E8
         CLC
         ADC   #$000D
         STA   $E8
L0A6E71  LDA   #$0005
         STA   $E4
L0A6E76  PEA   $0003
         PEA   $0000
         PEI   $EA
         JSL   L0A3A27
         PLY
         PLY
         PLY
         PHX
         PHA
         PEA   $0008
         PEA   $000F
         PEI   $E4
         PEI   $E8
         JSL   L084545
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDY   #$002E
         LDA   [$F2],Y
         STA   $E8
         CMP   #$FFFF
         BNE   L0A6F03
         LDA   #$000C
         SEP   #$20
         STA   $D8
         REP   #$20
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030046
         LDX   #$0000
         TAY
         BPL   L0A6EC4
         DEX
L0A6EC4  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0005
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   $EC
         SEP   #$20
         STA   $D9
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L044ED1
         PLY
         PLY
         LDY   #$002E
         STA   [$F2],Y
         BRL   L0A6F73
L0A6F03  LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0A6F0C
         DEX
L0A6F0C  STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030046
         LDX   #$0000
         TAY
         BPL   L0A6F40
         DEX
L0A6F40  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0005
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$EE],Y
         PLA
         STA   [$EE]
         PEI   $E8
         JSL   L044B12
         PLY
         PHA
         JSL   L044B6D
         PLY
L0A6F73  PEI   $EC
         JSL   L0A3E20
         PLY
         JSL   L082F35
L0A6F7E  LDA   $EC
         INC   $EC
         LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $F2
         LDA   $F4
         BCC   L0A6F93
         INC
L0A6F93  STA   $F4
         PLA
         PLX
L0A6F97  LDA   $EC
         CMP   L03003E
         BCS   L0A6FA1
         BRL   L0A6CAA
L0A6FA1  TSC
         CLC
         ADC   #$0030
         TCS
         PLD
         RTL

L0A6FA9  ENT
         PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E2
         TCS
         LDA   $F9
         CMP   #$FFFF
         BEQ   L0A6FCB
         LDA   $F9
         CLC
         ADC   #$0001
         CMP   L030032
         BEQ   L0A6FCB
         LDA   L030038
         BEQ   L0A6FCE
L0A6FCB  BRL   L0A7235
L0A6FCE  LDA   $FB
         SEC
         SBC   #$0000
         BEQ   L0A6FDD
         BVS   L0A6FDB
         EOR   #$8000
L0A6FDB  BMI   L0A6FE3
L0A6FDD  LDA   #$0000
         BRL   L0A7235
L0A6FE3  LDA   $F9
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EC
         STA   $EA
         LDY   #$0034
         LDA   [$EA],Y
         BNE   L0A7011
L0A700B  LDA   #$0000
         BRL   L0A7235
L0A7011  LDA   $FF
         CMP   #$0000
         BNE   L0A701B
         BRL   L0A7203
L0A701B  LDA   #$0000
         STA   $E4
         LDA   #$0000
         STA   $E8
         LDA   #$0000
         STA   $E6
         BRA   L0A7070
L0A702C  LDA   $E8
         PHA
         LDA   #$0001
         SEC
         JSL   L0222A8
         LDA   $FD
         PLX
         STX   $F2
         AND   $F2
         TAY
         BEQ   L0A706E
         INC   $E4
         LDA   $FF
         CMP   #$0004
         BNE   L0A704F
         LDA   #$8000
         BRA   L0A7052
L0A704F  LDA   #$0000
L0A7052  PHA
         LDA   $E8
         PLX
         STX   $F2
         ORA   $F2
         PHA
         PEI   $F9
         JSL   L0A63CF
         PLY
         PLY
         PHA
         LDA   $E6
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $E6
L0A706E  INC   $E8
L0A7070  LDA   $E8
         SEC
         SBC   #$0005
         BEQ   L0A702C
         BVS   L0A707D
         EOR   #$8000
L0A707D  BPL   L0A702C
         LDA   $E4
         BEQ   L0A7090
         LDA   $E4
         PHA
         LDA   $E6
         CLC
         JSL   L021F1A
         PLY
         STA   $E6
L0A7090  LDA   $FF
         BRL   L0A7144
L0A7095  LDA   $EA
         CLC
         ADC   #$0046
         LDX   $EC
         BCC   L0A70A0
         INX
L0A70A0  STA   $EE
         STX   $F0
         LDX   $F0
         LDA   #$0009
         CLC
         ADC   $EE
         BCC   L0A70AF
         INX
L0A70AF  STA   $EE
         STX   $F0
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDA   #$0073
         PLX
         STX   $F2
         SEC
         SBC   $F2
         STA   $E8
         SEC
         SBC   #$0000
         BEQ   L0A70D4
         BVS   L0A70D2
         EOR   #$8000
L0A70D2  BMI   L0A70D8
L0A70D4  STZ   $FB
         BRA   L0A70E8
L0A70D8  PEI   $E8
         PEA   $0006
         PEI   $FB
         JSL   L0205CE
         PLY
         PLY
         PLY
         STA   $FB
L0A70E8  BRL   L0A7179
L0A70EB  PEI   $FB
         PEA   $0005
         PEI   $EC
         PEI   $EA
         JSL   L0A5E53
         PLY
         PLY
         PLY
         PLY
         STA   $FB
         LDA   $FB
         SEC
         SBCL  L056158
         STA   $FB
         BRL   L0A7179
L0A710A  PEI   $FB
         PEA   $0006
         PEI   $EC
         PEI   $EA
         JSL   L0A5E53
         PLY
         PLY
         PLY
         PLY
         STA   $FB
         LDA   $FB
         SEC
         SBCL  L056156
         STA   $FB
         BRL   L0A7152
L0A7129  LDA   $E6
         LSR
         STA   $E6
L0A712E  BRL   L0A7152
L0A7131  BRL   L0A7152
L0A7134  DA    L0A710A
         DA    L0A7129
         DA    L0A712E
         DA    L0A712E
         DA    L0A70EB
         DA    L0A7095
         DA    L0A712E
         DA    L0A7131
L0A7144  DEC
         CMP   #$0007
         BCC   L0A714D
         LDA   #$0007
L0A714D  ASL
         TAX
         JMP   (L0A7134,X)

L0A7152  LDA   $FB
         SEC
         SBC   #$0000
         BEQ   L0A7161
         BVS   L0A715F
         EOR   #$8000
L0A715F  BMI   L0A7164
L0A7161  BRL   L0A700B
L0A7164  LDA   #$0082
         SEC
         SBC   $E6
         PHA
         PEA   $0006
         PEI   $FB
         JSL   L0205CE
         PLY
         PLY
         PLY
         STA   $FB
L0A7179  LDA   $FB
         SEC
         SBC   #$0000
         BEQ   L0A7188
         BVS   L0A7186
         EOR   #$8000
L0A7186  BMI   L0A718B
L0A7188  BRL   L0A700B
L0A718B  JSL   L02051C
         AND   #$007F
         CLC
         ADC   #$000A
         PHA
         PEA   $0004
         PEI   $EC
         PEI   $EA
         JSL   L0A5E53
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         SEC
         SBC   $FB
         BVS   L0A71B0
         EOR   #$8000
L0A71B0  BMI   L0A71FA
L0A71B2  JSL   L02051C
         AND   #$0007
         PHA
         LDA   #$0001
         CLC
         JSL   L0222A8
         PLA
         AND   $FD
         PHA
         LDA   $F9
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0562F9
         LDX   #^L0562F9
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   [$EE]
         PLX
         STX   $F2
         ORA   $F2
         STA   [$EE]
         LDA   $E8
         ASL
         STA   $E8
         SEC
         SBC   $FB
         BVS   L0A71F4
         EOR   #$8000
L0A71F4  BMI   L0A71FA
         LDA   $E8
         BNE   L0A71B2
L0A71FA  LDA   L030034
         BEQ   L0A7203
         JSL   L0A664E
L0A7203  LDA   $FB
         SEC
         SBC   #$0000
         BEQ   L0A7212
         BVS   L0A7210
         EOR   #$8000
L0A7210  BMI   L0A7214
L0A7212  STZ   $FB
L0A7214  LDA   $F9
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0562F1
         LDX   #^L0562F1
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   [$EE]
         CLC
         ADC   $FB
         STA   [$EE]
         LDA   $FB
L0A7235  TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PLD
         RTL

L0A723F  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DC
         TCS
         LDA   $FD
         CMP   #$FFFF
         BEQ   L0A725C
         LDA   $FD
         CLC
         ADC   #$0001
         CMP   L030032
         BNE   L0A725F
L0A725C  BRL   L0A7344
L0A725F  LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $E0
         STA   $DE
         PEA   $0000
         PEA   $0000
         LDA   $FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         PEA   $0001
         JSL   L0204BA
         PLY
         PLY
         PHA
         PEI   $FD
         JSL   L0A6FA9
         PLY
         PLY
         PLY
         PLY
         LDY   #$0030
         LDA   [$DE],Y
         ORA   #$0100
         LDY   #$0030
         STA   [$DE],Y
         LDA   $FD
         CLC
         ADC   #$0001
         CMP   L030160
         BNE   L0A72D0
         LDA   L030158
         CMP   #$0000
         BNE   L0A72D0
         LDY   #$0030
         LDA   [$DE],Y
         ORA   #$0800
         LDY   #$0030
         STA   [$DE],Y
L0A72D0  DEC   $FF
         LDA   $FF
         BEQ   L0A733D
         LDY   #$002A
         LDA   [$DE],Y
         PHA
         INC
         SEP   #$20
         LDY   #$002A
         STA   [$DE],Y
         REP   #$20
         PLA
         LDA   #$004B
         SEP   #$20
         STA   $E6
         REP   #$20
         LDA   $FD
         SEP   #$20
         STA   $E7
         REP   #$20
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030046
         LDX   #$0000
         TAY
         BPL   L0A730A
         DEX
L0A730A  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0024
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         STX   $E4
         STA   $E2
         LDA   $FF
         STA   $E8
         PEA   $0000
         TDC
         CLC
         ADC   #$00E2
         PHA
         JSL   L044ED1
         PLY
         PLY
L0A733D  PEI   $FD
         JSL   L0A3E20
         PLY
L0A7344  TAY
         TSC
         CLC
         ADC   #$001A
         TCS
         TYA
         PLD
         RTL

L0A734E  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EC
         TCS
         LDA   $FF
         CMP   #$FFFF
         BNE   L0A7363
         BRL   L0A73E1
L0A7363  LDA   #$0000
         STA   $EE
         LDX   L0303E3
         LDA   L0303E1
         STX   $F2
         STA   $F0
         BRA   L0A73AD
L0A7374  LDY   #$0004
         LDA   [$F0],Y
         AND   #$00FF
         CMP   #$004B
         BNE   L0A7394
         LDY   #$0005
         LDA   [$F0],Y
         AND   #$00FF
         CMP   $FF
         BNE   L0A7394
         PEI   $EE
         JSL   L044E12
         PLY
L0A7394  LDX   $F2
         LDA   $F0
         PHX
         PHA
         CLC
         ADC   #$0010
         STA   $F0
         LDA   $F2
         BCC   L0A73A5
         INC
L0A73A5  STA   $F2
         PLA
         PLX
         LDA   $EE
         INC   $EE
L0A73AD  LDA   $EE
         CMP   L0303DF
         BCC   L0A7374
         LDA   $FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         SEP   #$20
         LDY   #$002A
         STA   [$F4],Y
         REP   #$20
L0A73E1  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A73EB  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E4
         TCS
         LDA   $FB
         BNE   L0A73FC
         BRA   L0A7460
L0A73FC  LDA   $FB
         LSR
         LSR
         LSR
         CLC
         ADC   #$0001
         STA   $E8
         PHA
         LDA   $FB
         PLX
         STX   $F4
         SEC
         SBC   $F4
         STA   $FB
         LDA   $E8
         ASL
         STA   $E8
         LDA   #$0000
         STA   $E6
         LDA   #$0000
         STA   $EA
         BRA   L0A7457
L0A7423  PEI   $FF
         PEI   $FD
         LDA   $E8
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $FB
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         PEA   $0001
         JSL   L0204BA
         PLY
         PLY
         PHA
         PEI   $EA
         JSL   L0A6FA9
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L0A7455
         INC   $E6
L0A7455  INC   $EA
L0A7457  LDA   $EA
         CMP   L03003E
         BCC   L0A7423
         LDA   $E6
L0A7460  TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PLD
         RTL

L0A746A  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         LDA   $FD
         CMP   #$FFFF
         BNE   L0A747F
         BRL   L0A750B
L0A747F  LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0038
         LDA   [$EE],Y
         SEC
         SBC   $FF
         LDY   #$0038
         STA   [$EE],Y
         STA   $EC
         SEC
         SBC   #$0000
         BEQ   L0A74BC
         BVS   L0A74BA
         EOR   #$8000
L0A74BA  BMI   L0A74E5
L0A74BC  LDA   #$0000
         LDY   #$0038
         STA   [$EE],Y
         PEA   $0000
         PEA   $0000
         LDA   #$0001
         PHA
         LDA   $EC
         EOR   #$FFFF
         INC
         SEC
         JSL   L0222DF
         PEI   $FD
         JSL   L0A6FA9
         PLY
         PLY
         PLY
         PLY
         BRA   L0A74FE
L0A74E5  LDY   #$003A
         LDA   [$EE],Y
         SEC
         SBC   $EC
         BVS   L0A74F2
         EOR   #$8000
L0A74F2  BMI   L0A74FE
         LDY   #$003A
         LDA   [$EE],Y
         LDY   #$0038
         STA   [$EE],Y
L0A74FE  LDY   #$0030
         LDA   [$EE],Y
         ORA   #$0300
         LDY   #$0030
         STA   [$EE],Y
L0A750B  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A7515  ENT
         PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E6
         TCS
         LDY   #$001C
         LDA   [$F5],Y
         AND   #$00FF
         STA   $E8
         PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $E8
         LDY   #$001D
         LDA   [$F5],Y
         AND   #$00FF
         SEC
         SBC   $E8
         CLC
         ADC   #$0001
         AND   #$0002
         LSR
         CLC
         ADC   $E8
         AND   #$0003
         PHA
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEI   $F9
         JSL   L040000
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0A756A  ENT
         PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E6
         TCS
         LDA   $F9
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EA
         STA   $E8
         LDY   #$003C
         LDA   [$E8],Y
         CMP   $FF
         BCS   L0A75A4
         LDA   #$0000
         BRA   L0A7614
L0A75A4  LDY   #$003C
         LDA   [$E8],Y
         SEC
         SBC   $FF
         LDY   #$003C
         STA   [$E8],Y
         LDY   #$0030
         LDA   [$E8],Y
         ORA   #$0100
         LDY   #$0030
         STA   [$E8],Y
         LDA   #$0003
         PHA
         LDY   #$003E
         LDA   [$E8],Y
         SEC
         JSL   L0222DF
         PEA   $0008
         JSL   L020493
         PLY
         PLY
         PHA
         LDA   #$000A
         PLX
         STX   $F2
         SEC
         SBC   $F2
         STA   $EC
         LDA   $EC
         ASL
         ASL
         SEC
         SBC   $FD
         BEQ   L0A75FB
         BVS   L0A75EF
         EOR   #$8000
L0A75EF  BPL   L0A75FB
         LDA   $FD
         CLC
         ADC   #$0003
         STA   $FD
         DEC   $EC
L0A75FB  PEI   $EC
         PEA   $005A
         PEI   $FD
         PEI   $FB
         PEI   $EA
         PEI   $E8
         JSL   L0A7515
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0A7614  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L0A761E  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00DA
         TCS
         STZ   $DC
         LDA   $FD
         SEC
         SBC   #$0000
         BVS   L0A7636
         EOR   #$8000
L0A7636  BMI   L0A76A0
         LDA   L030254
         BEQ   L0A7643
         LDA   #$0000
         BRL   L0A783B
L0A7643  JSL   L0A4ABD
         STA   $E0
         LDA   $FB
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $EE
         STA   $EC
         LDA   $EC
         CLC
         ADC   #$00D3
         LDX   $EE
         BCC   L0A7675
         INX
L0A7675  STA   $F0
         STX   $F2
         LDY   #$0002
         LDA   [$F0],Y
         STA   $DE
         LDA   $EC
         CLC
         ADC   #$00D3
         LDX   $EE
         BCC   L0A768B
         INX
L0A768B  STA   $F0
         STX   $F2
         LDA   $E0
         LDY   #$0002
         STA   [$F0],Y
         LDA   #$0001
         STA   $FD
         LDA   #$0001
         STA   $DC
L0A76A0  PEI   $FD
         PEI   $FB
         JSL   L0A61D0
         PLY
         PLY
         STA   $E6
         LDA   $DC
         BEQ   L0A76D3
         LDA   $FD
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EC
         CLC
         ADC   #$00D3
         LDX   $EE
         BCC   L0A76C3
         INX
L0A76C3  JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   $DE
         STA   [$F0]
         BRA   L0A76EA
L0A76D3  PEI   $FD
         PEI   $FB
         JSL   L0A4E78
         PLY
         PLY
         STA   $E0
         CMP   #$FFFF
         BNE   L0A76EA
         LDA   #$0000
         BRL   L0A783B
L0A76EA  PEA   $0001
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0010
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         PEI   $E0
         JSL   L0A5D71
         PLY
         PHA
         PEI   $FB
         JSL   L0A746A
         PLY
         PLY
         PEA   $0004
         PEI   $FB
         JSL   L0A7877
         PLY
         PLY
         LDA   #$0008
         STA   $E4
         LDA   #$0001
         STA   $E2
         LDA   #$000A
         PHA
         LDA   $E0
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0005
         BNE   L0A777E
         LDA   $E4
         CLC
         ADC   #$0004
         STA   $E4
         PEI   $E0
         JSL   L060CF6
         PLY
         STX   $EA
         STA   $E8
         LDY   #$0001
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$000C
         BEQ   L0A7761
         BVS   L0A775F
         EOR   #$8000
L0A775F  BMI   L0A777E
L0A7761  LDA   #$0002
         PHA
         LDY   #$0003
         LDA   [$E8],Y
         AND   #$00FF
         STA   $E2
         SEC
         JSL   L0222DF
         LDA   $E4
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $E4
L0A777E  PEI   $E4
         PEA   $000A
         PEI   $FB
         JSL   L0A57C4
         PLY
         PLY
         PLY
         LDA   $E6
         CLC
         ADC   $E2
         STA   $E6
         PEA   $000A
         PEI   $FB
         JSL   L0A55B1
         PLY
         PLY
         STA   $E2
         LDA   #$0001
         PHA
         LDA   $E6
         SEC
         JSL   L0222DF
         JSL   L02051C
         AND   #$000F
         PLX
         STX   $F4
         CLC
         ADC   $F4
         CLC
         ADC   $E2
         PHA
         LDA   $E6
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $E6
         PEA   $00C8
         JSL   L02051C
         AND   #$001F
         PHA
         LDA   $E2
         ASL
         ASL
         ASL
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         PEA   $0028
         JSL   L0204E3
         PLY
         PLY
         PLY
         STA   $E4
         LDA   #$000B
         SEC
         SBC   $E2
         PHA
         PEA   $0005
         JSL   L0204BA
         PLY
         PLY
         STA   $E2
         PEI   $E2
         PEI   $E4
         PEI   $E6
         LDA   L030044
         PHA
         LDA   L030044
         CLC
         ADC   $FF
         AND   #$0003
         PHA
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEI   $E0
         JSL   L040000
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         LDA   #$0004
         STA   L03004A
         LDA   L030044
         STA   L03004C
         PEI   $FB
         JSL   L0A3E20
         PLY
         LDA   #$0001
L0A783B  TAY
         TSC
         CLC
         ADC   #$001A
         TCS
         TYA
         PLD
         RTL

L0A7845  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         LDA   L03024E
         CMP   #$FFFF
         BNE   L0A785D
         LDA   #$0000
         BRA   L0A786D
L0A785D  PEI   $FF
         PEA   $FFFF
         LDA   L03024E
         PHA
         JSL   L0A761E
         PLY
         PLY
         PLY
L0A786D  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L0A7877  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00D2
         TCS
         LDA   $FD
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         JSL   L021F00
         PLA
         PLX
         STX   $E0
         STA   $DE
         LDA   #$000B
         SEP   #$20
         STA   $E6
         REP   #$20
         LDA   $FD
         SEP   #$20
         STA   $E7
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $E8
         REP   #$20
         LDY   #$002C
         LDA   [$D4],Y
         STA   $D8
         SEC
         SBC   #$0000
         BVS   L0A78E4
         EOR   #$8000
L0A78E4  BMI   L0A78E9
         BRL   L0A798F
L0A78E9  LDA   $D8
         LDX   #$0000
         TAY
         BPL   L0A78F2
         DEX
L0A78F2  STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         STX   $DC
         STA   $DA
         SEC
         LDA   $DE
         SBC   $DA
         BNE   L0A7937
         LDA   $E0
         SBC   $DC
         BRA   L0A793D
L0A7937  LDA   $E0
         SBC   $DC
         REP   #$02
L0A793D  BVS   L0A7942
         EOR   #$8000
L0A7942  BPL   L0A7970
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   $DC
         LDA   $DA
         SEC
         SBC   L03004E
         PHA
         TXA
         SBC   L030050
         TAX
         PLA
         CLC
         JSL   L022303
         LDX   $E0
         LDA   $DE
         JSL   L021F00
         PLA
         PLX
         STX   $E0
         STA   $DE
         BRA   L0A7986
L0A7970  LDA   $FF
         LSR
         LDX   #$0000
         PHX
         PHA
         LDX   $DC
         LDA   $DA
         JSL   L021F00
         PLA
         PLX
         STX   $E0
         STA   $DE
L0A7986  PEI   $D8
         JSL   L044E12
         PLY
         BRA   L0A79A3
L0A798F  LDY   #$0030
         LDA   [$D4],Y
         ORA   #$8008
         LDY   #$0030
         STA   [$D4],Y
         PEI   $FD
         JSL   L0A3E20
         PLY
L0A79A3  LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030046
         LDX   #$0000
         TAY
         BPL   L0A79B5
         DEX
L0A79B5  SEC
         JSL   L0222B8
         LDX   $E0
         LDA   $DE
         JSL   L021F9F
         PLA
         PLX
         STX   $E4
         STA   $E2
         PEA   $0000
         TDC
         CLC
         ADC   #$00E2
         PHA
         JSL   L044ED1
         PLY
         PLY
         LDY   #$002C
         STA   [$D4],Y
         TSC
         CLC
         ADC   #$0024
         TCS
         PLD
         RTL

L0A79E4  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00DE
         TCS
         LDA   L03003E
         BNE   L0A79F7
         BRL   L0A8101
L0A79F7  LDA   L030040
         AND   #$001F
         PHA
         PHA
         LDA   $E0
         AND   #$FFE0
         STA   $FA
         PLA
         ORA   $FA
         STA   $E0
         PLA
         LDA   L030042
         AND   #$001F
         PHA
         PHA
         LDA   $E0
         AND   #$FC1F
         STA   $FA
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $FA
         STA   $E0
         PLA
         LDA   L030046
         AND   #$003F
         PHA
         PHA
         LDA   $E0
         AND   #$03FF
         STA   $FA
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $FA
         STA   $E0
         PLA
         STZ   $EA
L0A7A43  LDA   $EA
         PHA
         LDAL  L05615A
         AND   #$00FF
         SEC
         SBC   #$0001
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BNE   L0A7A5C
         BRL   L0A7AFC
L0A7A5C  BVS   L0A7A61
         EOR   #$8000
L0A7A61  BMI   L0A7A66
         BRL   L0A7AFC
L0A7A66  LDX   #$0000
         TDC
         CLC
         ADC   #$00E0
         PHX
         PHA
         LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $F6
         LDX   $F8
         PHX
         PHA
         LDY   #$0001
         JSL   L0226A1
         BNE   L0A7A9A
         BRL   L0A7AF7
L0A7A9A  LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         SEC
         SBC   #$0001
         PHA
         PEA   $0000
         JSL   L0204BA
         PLY
         PLY
         PHA
         LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         SEP   #$20
         STA   [$F6]
         REP   #$20
         AND   #$00FF
         BNE   L0A7AF7
         LDA   $EA
         BNE   L0A7AF7
         PEA   $0000
         JSL   L0A6766
         PLY
         BRL   L0A7A43
L0A7AF7  INC   $EA
         BRL   L0A7A43
L0A7AFC  LDX   L030050
         LDA   L03004E
         STA   $EC
         LDA   $EC
         AND   #$0040
         ASL
         ASL
         PHA
         LDA   $EC
         AND   #$0100
         LSR
         LSR
         PHA
         LDA   $EC
         AND   #$0080
         PLX
         STX   $FA
         CLC
         ADC   $FA
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LSR
         LSR
         STA   $E4
         LDA   #$0000
         STA   $EC
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F4
         STA   $F2
         BRL   L0A80F3
L0A7B3B  LDY   #$0034
         LDA   [$F2],Y
         BNE   L0A7B45
         BRL   L0A80DA
L0A7B45  LDA   $EC
         CLC
         ADC   #$0001
         CMP   L030032
         BNE   L0A7B53
         BRL   L0A80DA
L0A7B53  LDY   #$003C
         LDA   [$F2],Y
         PHA
         LDY   #$003E
         LDA   [$F2],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BNE   L0A7B69
         BRL   L0A7C2F
L0A7B69  BVS   L0A7B6E
         EOR   #$8000
L0A7B6E  BMI   L0A7B73
         BRL   L0A7C2F
L0A7B73  PEA   $0002
         PEI   $EC
         JSL   L0A55B1
         PLY
         PLY
         PHA
         PEA   $0003
         PEI   $EC
         JSL   L0A55B1
         PLY
         PLY
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E8
         PHA
         LDA   $F2
         CLC
         ADC   #$0046
         LDX   $F4
         BCC   L0A7B9E
         INX
L0A7B9E  STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$0009
         CLC
         ADC   $F6
         BCC   L0A7BAD
         INX
L0A7BAD  STA   $F6
         STX   $F8
         LDY   #$0001
         LDA   [$F6],Y
         AND   #$00FF
         PLX
         STX   $FA
         CLC
         ADC   $FA
         CMP   $E4
         BEQ   L0A7C2F
         BCC   L0A7C2F
         LDA   #$0028
         PHA
         LDY   #$003E
         LDA   [$F2],Y
         SEC
         JSL   L021F1A
         PLY
         STA   $EA
         LDA   L030034
         BEQ   L0A7BE0
         LDA   $EA
         ASL
         STA   $EA
L0A7BE0  INC   $EA
         LDA   #$0010
         SEC
         SBC   $E8
         PHA
         PEA   $0007
         JSL   L0204BA
         PLY
         PLY
         PHA
         LDA   $EA
         CLC
         JSL   L0220A5
         PEI   $EC
         JSL   L0A746A
         PLY
         PLY
         LDY   #$003C
         LDA   [$F2],Y
         PHA
         LDY   #$003E
         LDA   [$F2],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         PHA
         PEI   $EA
         JSL   L020493
         PLY
         PLY
         PHA
         LDY   #$003C
         LDA   [$F2],Y
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LDY   #$003C
         STA   [$F2],Y
         BRA   L0A7C54
L0A7C2F  LDY   #$003C
         LDA   [$F2],Y
         PHA
         LDY   #$003E
         LDA   [$F2],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BVS   L0A7C45
         EOR   #$8000
L0A7C45  BMI   L0A7C54
         LDY   #$003C
         LDA   [$F2],Y
         PHA
         DEC
         LDY   #$003C
         STA   [$F2],Y
         PLA
L0A7C54  LDA   #$0013
         STA   $E6
         BRA   L0A7CBF
L0A7C5B  LDA   $E6
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$005B
         LDX   $F4
         BCC   L0A7C77
         INX
L0A7C77  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         SEC
         SBC   #$0000
         BEQ   L0A7CBD
         BVS   L0A7C8E
         EOR   #$8000
L0A7C8E  BPL   L0A7CBD
         LDA   $E6
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$005B
         LDX   $F4
         BCC   L0A7CAC
         INX
L0A7CAC  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         DEC
         STA   [$F6]
         PLA
L0A7CBD  DEC   $E6
L0A7CBF  LDA   $E6
         SEC
         SBC   #$0000
         BVS   L0A7CCA
         EOR   #$8000
L0A7CCA  BMI   L0A7C5B
         LDA   #$0004
         STA   $EA
         LDY   #$003A
         LDA   [$F2],Y
         STA   $E6
L0A7CD8  LDY   #$0038
         LDA   [$F2],Y
         PHA
         LDA   #$0001
         PHA
         LDA   $E6
         SEC
         JSL   L0222DF
         PLA
         STA   $E6
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BEQ   L0A7D05
         BVS   L0A7CF9
         EOR   #$8000
L0A7CF9  BPL   L0A7D05
         LDA   $EA
         CLC
         ADC   #$0002
         STA   $EA
         BRA   L0A7CD8
L0A7D05  STZ   $E6
         PEA   $0006
         LDA   #$0008
         PHA
         LDY   #$003A
         LDA   [$F2],Y
         SEC
         JSL   L0222DF
         PLA
         SEC
         SBC   #$0001
         PHA
         PEA   $0001
         JSL   L0204E3
         PLY
         PLY
         PLY
         STA   $E2
         LDA   L030034
         BEQ   L0A7D34
         LDA   $E2
         ASL
         STA   $E2
L0A7D34  LDX   L030050
         LDA   L03004E
         SEC
         SBC   L03000C
         PHA
         TXA
         SBC   L03000E
         TAX
         PLA
         STA   $E8
         CMP   #$0050
         BEQ   L0A7D5B
         BCC   L0A7D5B
         INC   $E2
         LDA   $E8
         CMP   #$00FA
         BEQ   L0A7D5B
         BCC   L0A7D5B
         INC   $E2
L0A7D5B  LDA   $EA
         CMP   #$0004
         BEQ   L0A7D69
         BCC   L0A7D69
         LDA   #$0000
         BRA   L0A7D6C
L0A7D69  LDA   #$0001
L0A7D6C  STA   $E8
         LDY   #$0042
         LDA   [$F2],Y
         SEC
         SBC   #$FE00
         BVS   L0A7D7C
         EOR   #$8000
L0A7D7C  BMI   L0A7D99
         LDA   $E8
         BEQ   L0A7D97
         LDA   $E6
         CLC
         ADC   $E2
         STA   $E6
         LDY   #$0042
         LDA   [$F2],Y
         SEC
         SBC   #$0002
         LDY   #$0042
         STA   [$F2],Y
L0A7D97  BRA   L0A7DCD
L0A7D99  LDY   #$0042
         LDA   [$F2],Y
         SEC
         SBC   #$0000
         BVS   L0A7DA7
         EOR   #$8000
L0A7DA7  BPL   L0A7DB0
         LDA   $E6
         SEC
         SBC   $E2
         STA   $E6
L0A7DB0  LDA   $E8
         BEQ   L0A7DB9
         LDA   #$0002
         BRA   L0A7DBC
L0A7DB9  LDA   $EA
         LSR
L0A7DBC  PHA
         LDY   #$0042
         LDA   [$F2],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         LDY   #$0042
         STA   [$F2],Y
L0A7DCD  LDY   #$0044
         LDA   [$F2],Y
         SEC
         SBC   #$FE00
         BVS   L0A7DDB
         EOR   #$8000
L0A7DDB  BMI   L0A7DF7
         LDA   $E8
         BEQ   L0A7DF5
         LDA   $E6
         CLC
         ADC   $E2
         STA   $E6
         LDY   #$0044
         LDA   [$F2],Y
         PHA
         DEC
         LDY   #$0044
         STA   [$F2],Y
         PLA
L0A7DF5  BRA   L0A7E2C
L0A7DF7  LDY   #$0044
         LDA   [$F2],Y
         SEC
         SBC   #$0000
         BVS   L0A7E05
         EOR   #$8000
L0A7E05  BPL   L0A7E0E
         LDA   $E6
         SEC
         SBC   $E2
         STA   $E6
L0A7E0E  LDA   $E8
         BEQ   L0A7E17
         LDA   #$0001
         BRA   L0A7E1B
L0A7E17  LDA   $EA
         LSR
         LSR
L0A7E1B  PHA
         LDY   #$0044
         LDA   [$F2],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         LDY   #$0044
         STA   [$F2],Y
L0A7E2C  DEC   $EA
         LDA   $EA
         BEQ   L0A7E52
         LDY   #$0038
         LDA   [$F2],Y
         SEC
         SBC   $E6
         PHA
         LDY   #$003A
         LDA   [$F2],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BEQ   L0A7E52
         BVS   L0A7E4D
         EOR   #$8000
L0A7E4D  BPL   L0A7E52
         BRL   L0A7D5B
L0A7E52  PEI   $E6
         PEI   $EC
         JSL   L0A746A
         PLY
         PLY
         LDY   #$0042
         LDA   [$F2],Y
         SEC
         SBC   #$FC00
         BVS   L0A7E6A
         EOR   #$8000
L0A7E6A  BMI   L0A7E74
         LDA   #$FC00
         LDY   #$0042
         STA   [$F2],Y
L0A7E74  LDY   #$0044
         LDA   [$F2],Y
         SEC
         SBC   #$FC00
         BVS   L0A7E82
         EOR   #$8000
L0A7E82  BMI   L0A7E8C
         LDA   #$FC00
         LDY   #$0044
         STA   [$F2],Y
L0A7E8C  LDY   #$0034
         LDA   [$F2],Y
         PHA
         LDY   #$0036
         LDA   [$F2],Y
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BNE   L0A7EA2
         BRL   L0A7F8D
L0A7EA2  BVS   L0A7EA7
         EOR   #$8000
L0A7EA7  BMI   L0A7EAC
         BRL   L0A7F8D
L0A7EAC  LDY   #$0038
         LDA   [$F2],Y
         PHA
         LDA   #$0002
         PHA
         LDY   #$003A
         LDA   [$F2],Y
         SEC
         JSL   L0222DF
         PLA
         PLX
         STX   $F6
         SEC
         SBC   $F6
         BEQ   L0A7ED3
         BVS   L0A7ECE
         EOR   #$8000
L0A7ECE  BPL   L0A7ED3
         BRL   L0A7F8D
L0A7ED3  LDA   $F2
         CLC
         ADC   #$0046
         LDX   $F4
         BCC   L0A7EDE
         INX
L0A7EDE  STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$000C
         CLC
         ADC   $F6
         BCC   L0A7EED
         INX
L0A7EED  STA   $F6
         STX   $F8
         LDY   #$0001
         LDA   [$F6],Y
         AND   #$00FF
         CLC
         ADC   #$000C
         CMP   $E4
         BNE   L0A7F04
         BRL   L0A7F8D
L0A7F04  BCS   L0A7F09
         BRL   L0A7F8D
L0A7F09  LDA   #$0007
         PHA
         LDY   #$0036
         LDA   [$F2],Y
         SEC
         JSL   L0222DF
         PLA
         CLC
         ADC   #$0001
         STA   $E2
         LDA   L030034
         BEQ   L0A7F28
         LDA   $E2
         ASL
         STA   $E2
L0A7F28  LDA   $F2
         CLC
         ADC   #$00D3
         LDX   $F4
         BCC   L0A7F33
         INX
L0A7F33  STA   $F6
         STX   $F8
         LDY   #$0014
         LDA   [$F6],Y
         PHA
         JSL   L020B37
         PLY
         CMP   #$0079
         BNE   L0A7F62
         LDA   #$0001
         PHA
         LDA   $E2
         SEC
         JSL   L0222DF
         PLA
         CLC
         ADC   #$0001
         PHA
         LDA   $E2
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E2
L0A7F62  LDY   #$0034
         LDA   [$F2],Y
         PHA
         LDY   #$0036
         LDA   [$F2],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         PHA
         PEI   $E2
         JSL   L020493
         PLY
         PLY
         PHA
         LDY   #$0034
         LDA   [$F2],Y
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LDY   #$0034
         STA   [$F2],Y
L0A7F8D  LDA   L030034
         BEQ   L0A7F97
         LDA   #$003F
         BRA   L0A7F9A
L0A7F97  LDA   #$00FF
L0A7F9A  PHA
         LDX   L030050
         LDA   L03004E
         PLX
         STX   $FA
         AND   $FA
         TAY
         BEQ   L0A7FAC
         BRL   L0A8045
L0A7FAC  STZ   $EA
         BRL   L0A8036
L0A7FB1  LDA   $EA
         PHA
         LDA   #$0003
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $F2
         CLC
         ADC   #$0046
         LDX   $F4
         BCC   L0A7FCD
         INX
L0A7FCD  JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   [$EE]
         AND   #$00FF
         STA   $E8
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         CMP   $E8
         BCS   L0A7FFD
         LDY   #$0001
         LDA   [$EE],Y
         PHA
         INC
         SEP   #$20
         LDY   #$0001
         STA   [$EE],Y
         REP   #$20
         PLA
         BRA   L0A8034
L0A7FFD  LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         CMP   $E8
         BEQ   L0A8034
         BCC   L0A8034
         LDA   $E8
         PHA
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         CLC
         JSL   L021F1A
         PLY
         PHA
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         PLX
         STX   $FA
         SEC
         SBC   $FA
         SEP   #$20
         LDY   #$0001
         STA   [$EE],Y
         REP   #$20
L0A8034  INC   $EA
L0A8036  LDA   $EA
         CMP   #$0006
         BNE   L0A8040
         BRL   L0A7FB1
L0A8040  BCS   L0A8045
         BRL   L0A7FB1
L0A8045  LDA   L030034
         BNE   L0A809D
         LDY   #$001C
         LDA   [$F2],Y
         AND   #$00FF
         CMP   L030044
         BEQ   L0A809D
         LDX   L030050
         LDA   L03004E
         SEC
         SBC   #$003C
         PHA
         TXA
         SBC   #$0000
         TAX
         PLA
         PHX
         PHA
         LDX   L03000A
         LDA   L030008
         JSL   L022171
         BEQ   L0A809D
         BCC   L0A809D
         LDA   L030044
         SEP   #$20
         LDY   #$001C
         STA   [$F2],Y
         REP   #$20
         LDA   #$0000
         SEP   #$20
         LDY   #$0029
         STA   [$F2],Y
         REP   #$20
         LDY   #$0030
         LDA   [$F2],Y
         ORA   #$0400
         LDY   #$0030
         STA   [$F2],Y
L0A809D  LDY   #$0030
         LDA   [$F2],Y
         ORA   #$0100
         LDY   #$0030
         STA   [$F2],Y
         LDA   $EC
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F6
         CMP   $F6
         BNE   L0A80DA
         LDA   L03006C
         BNE   L0A80CD
         LDA   L030068
         BNE   L0A80CD
         LDA   L030158
         CMP   #$0000
         BNE   L0A80DA
L0A80CD  LDY   #$0030
         LDA   [$F2],Y
         ORA   #$0800
         LDY   #$0030
         STA   [$F2],Y
L0A80DA  LDA   $EC
         INC   $EC
         LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $F2
         LDA   $F4
         BCC   L0A80EF
         INC
L0A80EF  STA   $F4
         PLA
         PLX
L0A80F3  LDA   $EC
         CMP   L03003E
         BCS   L0A80FD
         BRL   L0A7B3B
L0A80FD  JSL   L0A4571
L0A8101  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L0A810B  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         STZ   $EE
         STZ   $EC
         LDA   #$000D
         STA   $F0
         BRA   L0A816F
L0A8121  LDA   $EE
         INC   $EE
         LDX   #$0000
         PHX
         PHA
         LDA   #L051109
         LDX   #^L051109
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         PHA
         LDA   $F0
         LDX   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         PLX
         STX   $F6
         EOR   $F6
         AND   #$001B
         TAY
         BEQ   L0A8167
         INC   $EC
L0A8167  LDA   $F0
         CLC
         ADC   #$0002
         STA   $F0
L0A816F  LDA   $F0
         CMP   #$02BF
         BCC   L0A8121
         LDA   $EC
         CMP   L03025A
         BNE   L0A819C
         LDA   L03025C
         INC
         STA   L03025C
         SEC
         SBC   #$0003
         BEQ   L0A819C
         BVS   L0A818F
         EOR   #$8000
L0A818F  BPL   L0A819C
         LDA   #$FE80
         STA   L030272
         LDA   #$0000
         BRA   L0A81AD
L0A819C  STZ   L03025C
         LDA   $EC
         STA   L03025A
         LDA   #$31E9
         STA   L0301EA
         LDA   #$0001
L0A81AD  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

