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

         mx	%00
	rel
	dsk	TIMELINE.L
	lst	off

	use	TIMELINE.X

L040000  ENT
         PHD
         TSC
         SEC
         SBC   #$00EB
         TCD
         ADC   #$00CE
         TCS
         PEA   $000E
         JSL   L061767
         PLY
         STA   $E0
         CMP   #$FFFF
         BNE   L04001D
         BRL   L04014C
L04001D  LDA   #$000E
         PHA
         LDA   $F7
         SEC
         JSL   L0222A8
         LDA   $E0
         AND   #$3FFF
         PLX
         STX   $EA
         ORA   $EA
         STA   $E0
         PEI   $E0
         JSL   L060C4E
         PLY
         STX   $E4
         STA   $E2
         LDA   $F1
         LDY   #$0002
         STA   [$E2],Y
         PEA   $00FF
         LDA   $FB
         AND   #$00FF
         PHA
         JSL   L020493
         PLY
         PLY
         SEP   #$20
         LDY   #$0004
         STA   [$E2],Y
         REP   #$20
         LDA   $FD
         SEP   #$20
         LDY   #$0005
         STA   [$E2],Y
         REP   #$20
         PEI   $F5
         PEI   $F3
         PEA   $0000
         PEI   $E0
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L03008A
         LDX   #$0000
         TAY
         BPL   L04008C
         DEX
L04008C  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0001
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         STX   $D2
         STA   $D0
         LDA   L030014
         BEQ   L0400BC
         LDA   #$0031
         SEP   #$20
         STA   $D4
         REP   #$20
         BRA   L0400C5
L0400BC  LDA   #$0030
         SEP   #$20
         STA   $D4
         REP   #$20
L0400C5  LDA   #$0000
         SEP   #$20
         STA   $D5
         REP   #$20
         LDA   $E0
         STA   $D6
         LDA   $F3
         AND   #$001F
         PHA
         PHA
         LDA   $D8
         AND   #$FFE0
         STA   $EA
         PLA
         ORA   $EA
         STA   $D8
         PLA
         LDA   $F5
         AND   #$001F
         PHA
         PHA
         LDA   $D8
         AND   #$FC1F
         STA   $EA
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $EA
         STA   $D8
         PLA
         LDA   $FF
         AND   #$00FF
         AND   #$000F
         PHA
         PHA
         LDA   $D8
         AND   #$0FFF
         STA   $EA
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ASL
         ASL
         ORA   $EA
         STA   $D8
         PLA
         LDA   $F9
         AND   #$0003
         PHA
         PHA
         LDA   $D8
         AND   #$F3FF
         STA   $EA
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $EA
         STA   $D8
         PLA
         PEA   $0000
         TDC
         CLC
         ADC   #$00D0
         PHA
         JSL   L044ED1
         PLY
         PLY
         LDY   #$0006
         STA   [$E2],Y
L04014C  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L040156  ENT
         PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00C6
         TCS
         PEA   $000F
         JSL   L061767
         PLY
         STA   $DC
         CMP   #$FFFF
         BNE   L040173
         BRL   L040463
L040173  LDA   $DC
         AND   #$03FF
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDAL  L0510E5
         TAX
         LDAL  L0510E3
         JSL   L021F00
         PLA
         PLX
         STX   $EA
         STA   $E8
         LDA   $FB
         CMP   #$00FF
         BEQ   L0401A3
         BCS   L0401AD
L0401A3  LDA   $FB
         STA   $DA
         LDA   $FD
         STA   $D8
         BRA   L0401D5
L0401AD  LDA   $FB
         AND   #$00FF
         STA   $DA
         LDA   $FD
         AND   #$00FF
         STA   $D8
         LDA   $FB
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $FB
         DEC   $FB
         LDA   $FD
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $FD
L0401D5  LDA   $FF
         CMP   #$00FF
         BNE   L040200
         LDA   #$0001
         AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$FF7F
         STA   $F0
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F0
         LDY   #$0002
         STA   [$E8],Y
         PLA
         BRA   L040239
L040200  LDA   #$0000
         AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$FF7F
         STA   $F0
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F0
         LDY   #$0002
         STA   [$E8],Y
         PLA
         LDA   #$000E
         PHA
         LDA   $FF
         CLC
         JSL   L0222A8
         LDA   $DC
         AND   #$3FFF
         PLX
         STX   $F0
         ORA   $F0
         STA   $DC
L040239  LDA   $F7
         SEC
         SBC   #$FF80
         AND   #$007F
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$FF80
         STA   $F0
         PLA
         ORA   $F0
         LDY   #$0002
         STA   [$E8],Y
         PLA
         LDA   $F9
         AND   #$00FF
         PHA
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         AND   #$00FF
         STA   $F0
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F0
         LDY   #$0002
         STA   [$E8],Y
         PLA
         LDA   $F7
         CMP   #$FF83
         BCS   L0402A3
         PEA   $0001
         PEI   $FD
         PEI   $FB
         LDA   $F9
         CMP   #$0050
         BEQ   L040295
         BCC   L040295
         LDA   #$0005
         BRA   L040298
L040295  LDA   #$0014
L040298  PHA
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         BRA   L0402BC
L0402A3  LDA   $F7
         CMP   #$FFA8
         BEQ   L0402BC
         PEA   $0001
         PEI   $FD
         PEI   $FB
         PEA   $000D
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L0402BC  PEI   $FD
         PEI   $FB
         PEA   $0000
         PEI   $DC
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L03008A
         LDX   #$0000
         TAY
         BPL   L0402DF
         DEX
L0402DF  SEC
         JSL   L0222B8
         LDA   $F7
         CMP   #$FFE4
         BNE   L0402F0
         LDA   #$0005
         BRA   L0402F3
L0402F0  LDA   #$0001
L0402F3  LDX   #$0000
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         JSL   L021F00
         PLA
         PLX
         JSL   L021F9F
         PLA
         PLX
         STX   $CA
         STA   $C8
         LDA   #$0019
         SEP   #$20
         STA   $CC
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $CD
         REP   #$20
         LDA   $DC
         STA   $D0
         LDA   $FB
         SEP   #$20
         STA   $CE
         REP   #$20
         LDA   $FD
         SEP   #$20
         STA   $CF
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00C8
         PHA
         JSL   L044ED1
         PLY
         PLY
         LDA   $F7
         CMP   #$FF82
         BEQ   L040354
         LDA   $F7
         CMP   #$FF80
         BEQ   L040354
         BRL   L040463
L040354  LDA   $DA
         STA   $FB
         LDA   $D8
         STA   $FD
         LDA   $F9
         LSR
         CLC
         ADC   #$0001
         STA   $F9
         LDA   $F9
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         CLC
         ADC   #$0001
         PHA
         LDA   $F9
         PLX
         STX   $F0
         CLC
         ADC   $F0
         STA   $F9
         LDA   $F7
         CMP   #$FF80
         BEQ   L040393
         LDA   $F9
         LSR
         STA   $F9
         TAY
         BNE   L040393
         BRL   L040463
L040393  LDA   L03008A
         CMP   L030046
         BNE   L0403BB
         LDA   L030040
         CMP   $FB
         BNE   L0403BB
         LDA   L030042
         CMP   $FD
         BNE   L0403BB
         PEA   $0001
         PEA   $003F
         PEI   $F9
         JSL   L0A73EB
         PLY
         PLY
         PLY
         BRL   L040463
L0403BB  PEI   $FD
         PEI   $FB
         JSL   L06260C
         PLY
         PLY
         STA   $DC
         CMP   #$FFFE
         BNE   L0403CF
         BRL   L040463
L0403CF  PEI   $DC
         JSL   L060C4E
         PLY
         STX   $E0
         STA   $DE
         LDY   #$0004
         LDA   [$DE],Y
         AND   #$00FF
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STX   $E6
         STA   $E4
         LDY   #$0012
         LDA   [$E4],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   $E2
         CMP   #$000F
         BEQ   L040463
         LDY   #$0002
         LDA   [$E4],Y
         AND   #$0040
         TAY
         BEQ   L040425
         LDA   $F9
         LSR
         LSR
         STA   $F9
L040425  LDA   $E2
         ASL
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $F9
         PLX
         STX   $F0
         SEC
         SBC   $F0
         STA   $F9
         CMP   #$0000
         BEQ   L040463
         BCC   L040463
         PEA   $0001
         PEI   $F9
         PEI   $FD
         PEI   $FB
         PEI   $E0
         PEI   $DE
         JSL   L063A54
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   L030012
L040463  TAY
         TSC
         CLC
         ADC   #$002A
         TCS
         TYA
         PLD
         RTL

L04046D  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         TCS
         PEI   $FF
         JSL   L060C4E
         PLY
         STX   $F2
         STA   $F0
         LDY   #$0006
         LDA   [$F0],Y
         PHA
         JSL   L044E12
         PLY
         TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L040496  ENT
         PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00D4
         TCS
         PEI   $F7
         JSL   L060C4E
         PLY
         STX   $EA
         STA   $E8
         LDA   #$000A
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         STA   $E4
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$000F
         BNE   L0404C8
         BRL   L040537
L0404C8  SEC
         LDA   $F9
         SBC   #$0000
         BNE   L0404D7
         LDA   $FB
         SBC   #$0000
         BRA   L0404DE
L0404D7  LDA   $FB
         SBC   #$0000
         REP   #$02
L0404DE  BEQ   L040513
         LDA   [$F9]
         STA   $E6
         CMP   #$FFFE
         BNE   L0404FF
         PEI   $E4
         JSL   L060C4E
         PLY
         STX   $E2
         STA   $E0
         LDA   #$FFFE
         STA   [$E0]
         LDA   $E4
         STA   [$F9]
         BRA   L040511
L0404FF  PEA   $0000
         PEA   $FFFF
         PEI   $E6
         PEI   $E4
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
L040511  BRA   L040537
L040513  PEI   $FF
         PEI   $FD
         PEA   $0000
         PEA   $FFFE
         LDA   $F7
         AND   #$C000
         PHA
         LDA   $E4
         AND   #$3FFF
         PLX
         STX   $F0
         ORA   $F0
         PHA
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
L040537  LDA   #$FFFF
         STA   [$E8]
         TSC
         CLC
         ADC   #$001C
         TCS
         PLD
         RTL

L040544  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E6
         TCS
         STZ   L030016
         LDA   #$0003
         STA   L030018
         LDY   #$0004
         LDA   [$FB],Y
         AND   #$00FF
         STA   $E8
         LDA   #$000A
         PHA
         LDA   $FF
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $EA
         CMP   #$000F
         BEQ   L0405B8
         LDA   $EA
         CMP   #$0005
         BNE   L04059C
         PEI   $FF
         JSL   L060CF6
         PLY
         STX   $EE
         STA   $EC
         LDY   #$0003
         LDA   [$EC],Y
         AND   #$00FF
         STA   $EA
         LDA   #$0003
         STA   L030018
         BRA   L0405A2
L04059C  JSL   L020599
         STA   $EA
L0405A2  PEI   $FF
         JSL   L060112
         PLY
         LSR
         PHA
         LDA   $EA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EA
         BRL   L040649
L0405B8  LDA   $FF
         CMP   #$FF81
         BNE   L0405E6
         JSL   L02051C
         AND   #$000F
         STA   $EA
         LDA   $EA
         CLC
         ADC   #$000A
         STA   L030016
         JSL   L02051C
         AND   #$001F
         PHA
         LDA   $EA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EA
         BRL   L040649
L0405E6  LDA   $FF
         CMP   #$FF83
         BCC   L04060D
         LDA   #$0005
         STA   L030018
         LDA   $FF
         CMP   #$FF86
         BNE   L040605
         LDA   $E8
         STA   L030016
         LDA   #$0001
         BRL   L0406B2
L040605  LDA   #$0000
         BRL   L0406B2
         BRA   L040649
L04060D  LDA   #$0001
         STA   L030018
         JSL   L02051C
         AND   #$000F
         PHA
         JSL   L02051C
         AND   #$000F
         PLX
         STX   $F4
         CLC
         ADC   $F4
         CLC
         ADC   #$000A
         STA   $EA
         LDA   $FF
         CMP   #$FF82
         BNE   L040649
         LDA   #$0007
         STA   L030018
         LDA   $EA
         PHA
         LDA   #$0005
         CLC
         JSL   L0220A5
         PLA
         STA   $EA
L040649  LDA   $EA
         CLC
         ADC   $E8
         LSR
         LSR
         LSR
         LSR
         CLC
         ADC   #$0001
         STA   $EA
         JSL   L020599
         PHA
         LDA   $EA
         LSR
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         LDA   $EA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EA
         LDA   #$0003
         PHA
         LDY   #$0005
         LDA   [$FB],Y
         AND   #$00FF
         SEC
         JSL   L0222DF
         LDA   #$0020
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         LDA   $EA
         PLX
         STX   $F4
         SEC
         SBC   $F4
         PHA
         LDA   $EA
         LSR
         PHA
         JSL   L0204BA
         PLY
         PLY
         STA   $EA
         LDA   $EA
L0406B2  TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         PLD
         RTL

L0406BC  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$0097
         TCS
         PEI   $FF
         JSL   L060C4E
         PLY
         STX   $EA
         STA   $E8
         LDA   $F9
         STA   $BC
         LDA   $FB
         STA   $BA
         STZ   $9F
         STZ   L030012
         LDA   #$000A
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         STA   $E2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $9D
         CMP   #$0008
         BEQ   L0406FD
         BRL   L04074D
L0406FD  PEI   $E2
         JSL   L060C4E
         PLY
         STX   $E6
         STA   $E4
         LDY   #$0002
         LDA   [$E4],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$007F
         BRL   L040743
L04071B  LDA   #$FF87
         STA   $C2
         BRL   L040728
L040723  LDA   #$FF80
         STA   $C2
L040728  LDA   #$0001
         STA   $9F
         LDY   #$0002
         LDA   [$E4],Y
         AND   #$00FF
         STA   $A1
         LDX   $E6
         LDA   $E4
         STX   $DA
         STA   $D8
         BRA   L04074D
         BRA   L04074D
L040743  CMP   #$0003
         BEQ   L04071B
         CMP   #$0013
         BEQ   L040723
L04074D  LDA   $9D
         CMP   #$000F
         BNE   L040762
         LDA   $E2
         CMP   #$FF81
         BEQ   L040762
         LDA   $E2
         CMP   #$FF86
         BNE   L040767
L040762  LDA   #$0000
         BRA   L04076A
L040767  LDA   #$0001
L04076A  STA   $A7
         STZ   $C4
         STZ   $C6
         STZ   $DC
         LDA   $F9
         SEC
         SBC   #$00FF
         BEQ   L040781
         BVS   L04077F
         EOR   #$8000
L04077F  BMI   L04078B
L040781  LDA   $F9
         STA   $C0
         LDA   $FB
         STA   $BE
         BRA   L0407B9
L04078B  LDA   #$0008
         PHA
         LDA   $F9
         SEC
         JSL   L0222DF
         PLA
         SEC
         SBC   #$0001
         STA   $C0
         LDA   #$0008
         PHA
         LDA   $FB
         SEC
         JSL   L0222DF
         PLA
         STA   $BE
         LDA   $F9
         AND   #$00FF
         STA   $F9
         LDA   $FB
         AND   #$00FF
         STA   $FB
L0407B9  LDA   $F7
         BRL   L040B77
L0407BE  LDA   $FB
         LDX   #$0000
         TAY
         BPL   L0407C7
         DEX
L0407C7  PHX
         PHA
         LDA   $F9
         LDX   #$0000
         TAY
         BPL   L0407D2
         DEX
L0407D2  STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         SEP   #$20
         STA   $B9
         REP   #$20
         AND   #$00FF
         AND   #$0007
         STA   $E0
         PEI   $FB
         PEI   $F9
         JSL   L060CD1
         PLY
         PLY
         STX   $D2
         STA   $D0
         LDA   $E0
         CMP   #$0005
         BEQ   L04086C
         LDA   $E2
         CMP   #$FF84
         BNE   L04086C
         LDY   #$0002
         LDA   [$D0],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L040869
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0001
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         PHX
         PHA
         PEA   $0002
         PEA   $0000
         PEI   $FB
         PEI   $F9
         PEA   $000A
         JSL   L043AD8
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
L040869  BRL   L040B8F
L04086C  LDA   $E0
         CMP   #$0005
         BNE   L040876
         BRL   L04095D
L040876  LDA   $E0
         SEC
         SBC   #$0001
         BNE   L040881
         BRL   L04095D
L040881  BVS   L040886
         EOR   #$8000
L040886  BMI   L04088B
         BRL   L04095D
L04088B  LDY   #$0002
         LDA   [$D0],Y
         AND   #$0001
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0510A3
         LDX   #^L0510A3
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         AND   #$0002
         TAY
         BNE   L0408B7
         BRL   L040963
L0408B7  LDA   $9D
         CMP   #$000F
         BNE   L0408D0
         LDA   $E2
         CMP   #$FF83
         BCS   L0408CA
         LDA   #$0000
         BRA   L0408CD
L0408CA  LDA   #$0001
L0408CD  BRL   L04095A
L0408D0  LDY   #$0005
         LDA   [$E8],Y
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$007F
         PLX
         STX   $EC
         CMP   $EC
         BCC   L0408EA
         BRL   L040952
L0408EA  PEI   $E2
         JSL   L060280
         PLY
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05048C
         LDX   #^L05048C
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0004
         LDA   [$EC],Y
         AND   #$0100
         TAY
         BEQ   L040952
         LDA   $9D
         CMP   #$000A
         BNE   L040957
         PEI   $E2
         JSL   L020B37
         PLY
         STA   $E0
         SEC
         SBC   #$0000
         BVS   L040934
         EOR   #$8000
L040934  BPL   L040957
         LDA   $E0
         SEC
         SBC   #$00B0
         BVS   L040941
         EOR   #$8000
L040941  BPL   L040957
         LDA   $E0
         SEC
         SBC   #$00BF
         BEQ   L040952
         BVS   L040950
         EOR   #$8000
L040950  BMI   L040957
L040952  LDA   #$0000
         BRA   L04095A
L040957  LDA   #$0001
L04095A  TAY
         BEQ   L040963
L04095D  LDA   #$0000
         BRL   L040C88
L040963  PEI   $E2
         PEI   $EA
         PEI   $E8
         JSL   L040544
         PLY
         PLY
         PLY
         CLC
         ADC   #$0001
         STA   $DE
         PEA   $0000
         PEA   $0000
         LDA   $DE
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $DE
         PLX
         STX   $F0
         CLC
         ADC   $F0
         PHA
         PEI   $FB
         PEI   $F9
         JSL   L04241F
         PLY
         PLY
         PLY
         PLY
         PLY
         BRL   L040B8F
L0409A1  PEI   $FD
         JSL   L0A34BE
         PLY
         STA   $FD
         SEC
         SBC   #$0000
         BVS   L0409B3
         EOR   #$8000
L0409B3  BMI   L0409BB
         LDA   #$0000
         BRL   L040C88
L0409BB  PEI   $E2
         PEI   $EA
         PEI   $E8
         JSL   L040544
         PLY
         PLY
         PLY
         STA   $DE
         STA   $DC
         BRL   L040B8F
L0409CF  PEI   $FB
         PEI   $F9
         JSL   L06260C
         PLY
         PLY
         PHA
         JSL   L060C4E
         PLY
         STX   $E6
         STA   $E4
         PEI   $FD
         PEI   $E6
         PEI   $E4
         JSL   L062655
         PLY
         PLY
         PLY
         STA   $99
         TAY
         BNE   L0409FB
         LDA   #$0000
         BRL   L040C88
L0409FB  DEC   $99
         LDY   #$0004
         LDA   [$E4],Y
         AND   #$00FF
         STA   $9B
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   $E2
         CMP   #$FF80
         BNE   L040A76
         LDA   $9B
         CMP   #$000B
         BNE   L040A76
         LDA   $99
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $E4
         CLC
         ADC   #$0006
         LDX   $E6
         BCC   L040A47
         INX
L040A47  JSL   L021F00
         PLA
         PLX
         STX   $CA
         STA   $C8
         PEI   $E2
         PEI   $EA
         PEI   $E8
         JSL   L040544
         PLY
         PLY
         PLY
         PHA
         LDA   [$C8]
         PLX
         STX   $F0
         CLC
         ADC   $F0
         PHA
         PEA   $03E8
         JSL   L020493
         PLY
         PLY
         STA   [$C8]
         BRL   L040C51
L040A76  LDY   #$0002
         LDA   [$D4],Y
         AND   #$0040
         TAY
         BEQ   L040A8E
         LDA   $E2
         CMP   #$FF83
         BEQ   L040A8E
         LDA   #$0000
         BRL   L040C88
L040A8E  LDY   #$0008
         LDA   [$D4],Y
         AND   #$00FF
         PHA
         LDX   #$0000
         LDA   #$0006
         PHX
         PHA
         PEI   $E2
         PEI   $EA
         PEI   $E8
         JSL   L040544
         PLY
         PLY
         PLY
         LDX   #$0000
         SEC
         JSL   L0222B8
         PLA
         PLX
         CLC
         JSL   L021F1A
         PLY
         STA   $DE
         TAY
         BNE   L040AC4
         BRL   L040B75
L040AC4  PEA   $0001
         LDA   L030016
         PHA
         PEI   $9B
         JSL   L063B32
         PLY
         PLY
         PHA
         LDA   $DE
         PLX
         STX   $F0
         CLC
         ADC   $F0
         PHA
         PEI   $FB
         PEI   $F9
         PEI   $99
         PEI   $E6
         PEI   $E4
         JSL   L0635C6
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         STA   $E0
         CMP   #$0002
         BEQ   L040B0C
         PEA   $0000
         PEA   $FFFE
         PEI   $FB
         PEI   $F9
         JSL   L064FFA
         PLY
         PLY
         PLY
         PLY
L040B0C  LDA   $E0
         STA   L030012
         LDA   $A7
         BNE   L040B75
         LDA   $E0
         CMP   #$0000
         BNE   L040B75
         LDA   $9D
         CMP   #$0005
         BNE   L040B75
         LDY   #$0002
         LDA   [$D4],Y
         AND   #$0400
         TAY
         BEQ   L040B75
         PEI   $E2
         JSL   L060C4E
         PLY
         STX   $CE
         STA   $CC
         LDY   #$0002
         LDA   [$CC],Y
         AND   #$007F
         STA   $E0
         LDA   $E0
         CMP   #$0008
         BEQ   L040B66
         LDA   $E0
         CMP   #$001B
         BEQ   L040B66
         LDA   $E0
         CMP   #$001C
         BEQ   L040B66
         LDA   $E0
         CMP   #$001F
         BEQ   L040B66
         LDA   $E0
         CMP   #$0020
         BNE   L040B75
L040B66  LDA   $E4
         CLC
         ADC   #$0002
         LDX   $E6
         BCC   L040B71
         INX
L040B71  STX   $C6
         STA   $C4
L040B75  BRA   L040B8F
L040B77  CMP   #$0004
         BNE   L040B7F
         BRL   L0407BE
L040B7F  CMP   #$FFFE
         BNE   L040B87
         BRL   L0409A1
L040B87  CMP   #$FFFF
         BNE   L040B8F
         BRL   L0409CF
L040B8F  LDA   $DC
         BEQ   L040BC1
         LDA   L030018
         PHA
         PEA   $000C
         PEI   $DE
         PEI   $FD
         JSL   L0A6FA9
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L040BC1
         LDA   L030016
         BEQ   L040BC1
         JSL   L020564
         TAY
         BEQ   L040BC1
         LDA   L030016
         PHA
         PEI   $FD
         JSL   L0A723F
         PLY
         PLY
L040BC1  LDA   $A7
         BNE   L040BC9
         LDA   $9F
         BEQ   L040C15
L040BC9  LDA   $9F
         BEQ   L040BD7
         LDA   $C2
         STA   $E2
         LDA   $A1
         STA   $A3
         BRA   L040BE1
L040BD7  LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         STA   $A3
L040BE1  LDA   $E2
         CMP   #$FF82
         BNE   L040BF3
         LDA   $A3
         LSR
         STA   $A3
         TAY
         BNE   L040BF3
         BRL   L040C51
L040BF3  LDA   $E2
         CMP   #$FF87
         BNE   L040BFF
         LDA   #$00FF
         BRA   L040C01
L040BFF  LDA   $FD
L040C01  PHA
         PEI   $BA
         PEI   $BC
         PEI   $A3
         PEI   $E2
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         BRA   L040C51
L040C15  LDA   #$000A
         PHA
         LDA   $E2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0005
         BNE   L040C2D
         STZ   $A3
         BRA   L040C40
L040C2D  LDA   $E2
         CMP   #$FF86
         BNE   L040C3B
         LDA   #$000D
         STA   $A3
         BRA   L040C40
L040C3B  LDA   #$0004
         STA   $A3
L040C40  PEA   $0001
         PEI   $BE
         PEI   $C0
         PEI   $A3
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L040C51  LDA   $9F
         BEQ   L040C61
         LDA   #$FFFF
         STA   [$D8]
         LDA   $C2
         LDY   #$0002
         STA   [$E8],Y
L040C61  PEI   $BE
         PEI   $C0
         PEA   $0000
         PEI   $FF
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         PEI   $BE
         PEI   $C0
         PEI   $C6
         PEI   $C4
         PEI   $FF
         JSL   L040496
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   #$0001
L040C88  TAY
         TSC
         CLC
         ADC   #$0059
         TCS
         TYA
         PLD
         RTL

L040C92  ENT
         PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00E8
         TCS
         STZ   $EA
         STZ   L030012
L040CA2  PEI   $FD
         PEI   $FB
         JSL   L060E4D
         PLY
         PLY
         STA   $EC
L040CAE  LDA   $EC
         CMP   #$FFFE
         BNE   L040CB8
         BRL   L040D1D
L040CB8  LDA   #$000A
         PHA
         LDA   $EC
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$000E
         BNE   L040D12
         LDA   #$000E
         PHA
         LDA   $EC
         CLC
         JSL   L0222DF
         LDA   $FF
         PLX
         STX   $EE
         CMP   $EE
         BNE   L040D12
         PEI   $EC
         PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         JSL   L0406BC
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L040D12
         PEI   $EC
         JSL   L04046D
         PLY
         INC   $EA
         LDA   $F9
         CMP   #$FFFF
         BNE   L040D10
         LDA   L030012
         CMP   #$0002
         BNE   L040D10
         BRA   L040D1D
L040D10  BRA   L040CA2
L040D12  PEI   $EC
         JSL   L060D39
         PLY
         STA   $EC
         BRA   L040CAE
L040D1D  LDA   $EA
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L040D29  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00C4
         TCS
         LDA   $FD
         LDX   $FF
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00C6
         PHA
         PEA   $0010
         JSL   L02219C
         PLA
         PLA
         PLA
         PLA
         PLX
         LDX   #$0000
         TDC
         CLC
         ADC   #$00C6
         STX   $F0
         STA   $EE
         LDY   #$0006
         LDA   [$EE],Y
         STA   $E8
         STA   $E0
         PHA
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDY   #$0008
         LDA   [$EE],Y
         AND   #$001F
         STA   $DC
         LDY   #$0008
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$001F
         STA   $DA
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         CMP   #$0030
         BNE   L040DA3
         LDA   #$0031
         SEP   #$20
         LDY   #$0004
         STA   [$EE],Y
         REP   #$20
         BRL   L040E9C
L040DA3  LDA   #$000E
         PHA
         LDA   $E8
         CLC
         JSL   L0222DF
         PLA
         STA   $E2
         LDA   L03008A
         CMP   L030046
         BNE   L040DE1
         LDA   $DC
         CMP   L030040
         BNE   L040DE1
         LDA   $DA
         CMP   L030042
         BNE   L040DE1
         PEI   $E8
         PEI   $E2
         PEI   $DA
         PEI   $DC
         PEA   $FFFE
         JSL   L0406BC
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L040DE1
         BRL   L041183
L040DE1  PEI   $DA
         PEI   $DC
         JSL   L06260C
         PLY
         PLY
         CMP   #$FFFE
         BEQ   L040E0A
         PEI   $E0
         PEI   $E2
         PEI   $DA
         PEI   $DC
         PEA   $FFFF
         JSL   L0406BC
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L040E0A
         BRL   L041183
L040E0A  LDY   #$0004
         LDA   [$EA],Y
         AND   #$00FF
         PHA
         LDY   #$0008
         LDA   [$EE],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   $E6
         PLX
         STX   $F2
         CMP   $F2
         BCC   L040E5A
         PEI   $DA
         PEI   $DC
         PEA   $0000
         LDA   $E0
         STA   $E8
         PHA
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         PEI   $DA
         PEI   $DC
         PEA   $0000
         PEA   $0000
         PEI   $E8
         JSL   L040496
         PLY
         PLY
         PLY
         PLY
         PLY
         BRL   L041183
         BRA   L040E6E
L040E5A  LDY   #$0004
         LDA   [$EA],Y
         AND   #$00FF
         SEC
         SBC   $E6
         SEP   #$20
         LDY   #$0004
         STA   [$EA],Y
         REP   #$20
L040E6E  LDY   #$0005
         LDA   [$EA],Y
         AND   #$00FF
         CMP   $E6
         BCS   L040E88
         LDA   #$0000
         SEP   #$20
         LDY   #$0005
         STA   [$EA],Y
         REP   #$20
         BRA   L040E9C
L040E88  LDY   #$0005
         LDA   [$EA],Y
         AND   #$00FF
         SEC
         SBC   $E6
         SEP   #$20
         LDY   #$0005
         STA   [$EA],Y
         REP   #$20
L040E9C  LDY   #$0008
         LDA   [$EE],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         STA   $E4
         PHA
         LDA   #$000E
         PHA
         LDY   #$0006
         LDA   [$EE],Y
         STA   $E8
         CLC
         JSL   L0222DF
         PLA
         STA   $E2
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L040EDF
         LDA   $E4
         CLC
         ADC   #$0001
         AND   #$0003
         PHA
         LDA   $E2
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L040EDF
         LDA   #$0000
         BRA   L040EE2
L040EDF  LDA   #$0001
L040EE2  STA   $DE
         TAY
         BNE   L040EEA
         BRL   L040FEA
L040EEA  LDA   $DC
         STA   $D8
         LDA   $DA
         STA   $D6
         LDA   $E4
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05045C
         LDX   #^L05045C
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $DC
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $DC
         LDA   $E4
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050464
         LDX   #^L050464
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $DA
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $DA
         PEI   $DA
         PEI   $DC
         JSL   L06079D
         PLY
         PLY
         AND   #$00FF
         STA   $E6
         LSR
         LSR
         LSR
         LSR
         LSR
         CMP   #$0000
         BEQ   L040FCB
         LDA   $E6
         LSR
         LSR
         LSR
         LSR
         LSR
         CMP   #$0006
         BNE   L040F69
         LDA   $E6
         AND   #$0005
         TAY
         BEQ   L040FCB
L040F69  LDA   $E6
         LSR
         LSR
         LSR
         LSR
         LSR
         CMP   #$0003
         BNE   L040FEA
         LDA   #$0005
         PHA
         LDA   $D6
         LDX   #$0000
         TAY
         BPL   L040F82
         DEX
L040F82  PHX
         PHA
         LDA   $D8
         LDX   #$0000
         TAY
         BPL   L040F8D
         DEX
L040F8D  STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BNE   L040FEA
L040FCB  PEI   $E8
         PEI   $E2
         PEI   $D6
         PEI   $D8
         LDA   $E6
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         JSL   L0406BC
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L040FEA
         BRL   L041183
L040FEA  LDA   $E4
         AND   #$0001
         PHA
         LDA   $E2
         AND   #$0001
         PLX
         STX   $F2
         CMP   $F2
         BNE   L041000
         DEC   $E2
         BRA   L041002
L041000  INC   $E2
L041002  LDA   #$000E
         PHA
         LDA   $E2
         AND   #$0003
         STA   $E2
         SEC
         JSL   L0222A8
         LDA   $E8
         AND   #$3FFF
         PLX
         STX   $F6
         ORA   $F6
         STA   $E8
         LDA   $DE
         BNE   L041025
         BRL   L0410E3
L041025  PEI   $DA
         PEI   $DC
         PEI   $D6
         PEI   $D8
         PEI   $E8
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   L030260
         AND   #$001F
         PHA
         PHA
         LDY   #$0008
         LDA   [$EE],Y
         AND   #$FFE0
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0008
         STA   [$EE],Y
         PLA
         LDA   L030262
         AND   #$001F
         PHA
         PHA
         LDY   #$0008
         LDA   [$EE],Y
         AND   #$FC1F
         STA   $F6
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0008
         STA   [$EE],Y
         PLA
         LDA   L030266
         AND   #$0003
         PHA
         PHA
         LDY   #$0008
         LDA   [$EE],Y
         AND   #$F3FF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F6
         LDY   #$0008
         STA   [$EE],Y
         PLA
         LDA   #$000E
         PHA
         LDA   L030268
         CLC
         JSL   L0222A8
         LDA   $E8
         AND   #$3FFF
         PLX
         STX   $F6
         ORA   $F6
         STA   $E8
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030264
         LDX   #$0000
         SEC
         JSL   L0222B8
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$EE],Y
         PLA
         STA   [$EE]
         BRA   L04113C
L0410E3  LDA   #$0005
         PHA
         PEI   $DA
         PEI   $DC
         JSL   L06079D
         PLY
         PLY
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         CMP   #$0004
         BNE   L04111A
         PEI   $E0
         PEI   $E2
         PEI   $DA
         PEI   $DC
         PEA   $0004
         JSL   L0406BC
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L04111A
         BRA   L041183
         BRA   L04113C
L04111A  PEI   $DA
         PEI   $DC
         PEA   $0000
         PEI   $E8
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         PEI   $DA
         PEI   $DC
         PEA   $0000
         PEI   $E8
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
L04113C  LDA   L03008A
         CMP   L030046
         BNE   L041149
         LDA   #$0001
         BRA   L04114C
L041149  LDA   #$0003
L04114C  LDX   #$0000
         TAY
         BPL   L041153
         DEX
L041153  PHX
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         JSL   L021F00
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$EE],Y
         PLA
         STA   [$EE]
         LDA   $E8
         LDY   #$0006
         STA   [$EE],Y
         PEI   $F0
         PEI   $EE
         JSL   L044ED1
         PLY
         PLY
         LDY   #$0006
         STA   [$EA],Y
L041183  TAY
         TSC
         CLC
         ADC   #$0032
         TCS
         TYA
         PLD
         RTL

L04118D  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00C4
         TCS
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$03FF
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDAL  L0510E5
         TAX
         LDAL  L0510E3
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   #$0005
         PHA
         LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   $EC
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         STA   $E6
         LDA   L03008A
         CMP   L030046
         BNE   L041237
         LDA   L030040
         CMP   $EC
         BNE   L041237
         LDA   L030042
         CMP   $EA
         BEQ   L04123C
L041237  LDA   #$0000
         BRA   L04123F
L04123C  LDA   #$0001
L04123F  STA   $D6
         PEI   $EA
         PEI   $EC
         JSL   L06260C
         PLY
         PLY
         STA   $DC
         CMP   #$FFFE
         BEQ   L041286
         PEI   $DC
         JSL   L060C4E
         PLY
         STX   $E4
         STA   $E2
         LDY   #$0004
         LDA   [$E2],Y
         AND   #$00FF
         STA   $D8
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STX   $E0
         STA   $DE
L041286  LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         PHA
         LDA   #$FF80
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $DA
         CMP   #$FF87
         BNE   L0412D7
         JSL   L020564
         PHA
         PEA   $0004
         LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         JSL   L020493
         PLY
         PLY
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         PEA   $0001
         JSL   L0204BA
         PLY
         PLY
         STA   $E8
         BRA   L04130A
L0412D7  LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         LSR
         CLC
         ADC   #$0001
         STA   $E8
         LDA   $E8
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         CLC
         ADC   #$0001
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
L04130A  LDA   $DA
         BRL   L0415CF
L04130F  LDA   #$0001
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PLA
         STA   $E8
         TAY
         BNE   L041323
         BRL   L0415FF
L041323  LDA   $E6
         CMP   #$0004
         BNE   L04133F
         PEA   $0000
         PEA   $0001
         PEI   $E8
         PEI   $EA
         PEI   $EC
         JSL   L04241F
         PLY
         PLY
         PLY
         PLY
         PLY
L04133F  BRL   L0415FF
L041342  LDA   $DC
         CMP   #$FFFE
         BNE   L04134C
         BRL   L041458
L04134C  LDY   #$0002
         LDA   [$DE],Y
         AND   #$0040
         TAY
         BNE   L04135A
         BRL   L041458
L04135A  LDA   $D8
         CMP   #$0013
         BEQ   L041364
         BRL   L04143F
L041364  LDA   L03008A
         CMP   L030046
         BEQ   L04136F
         BRL   L04143F
L04136F  LDA   #$0003
         PHA
         LDA   $E8
         SEC
         JSL   L0222DF
         PLA
         STA   $D8
         PHA
         LDA   $E8
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $E8
         LDA   $D8
         ASL
         STA   $D8
         INC   $D8
         LDY   #$000E
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         STA   $E6
L04139E  LDA   $E6
         LDX   #$0000
         PHX
         PHA
         LDY   #$0005
         LDA   [$E2],Y
         AND   #$00FF
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L030108
         LDA   L030106
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDX   $F4
         LDA   #$000C
         CLC
         ADC   $F2
         BCC   L0413DD
         INX
L0413DD  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         AND   #$0080
         TAY
         BEQ   L04142B
         PEA   $0001
         JSL   L020599
         PHA
         LDA   $D8
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         PEI   $EA
         PEI   $EC
         PEI   $E6
         PEI   $E4
         PEI   $E2
         JSL   L0635C6
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
L04142B  DEC   $E6
         LDA   $E6
         SEC
         SBC   #$0000
         BVS   L041438
         EOR   #$8000
L041438  BPL   L04143D
         BRL   L04139E
L04143D  BRA   L041458
L04143F  PEA   $0001
         PEI   $E8
         PEI   $EA
         PEI   $EC
         PEI   $E4
         PEI   $E2
         JSL   L063A54
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L041458  BRL   L0415FF
L04145B  LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         PHA
         INC
         AND   #$007F
         PHA
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$FF80
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0002
         STA   [$EE],Y
         PLA
         PLA
         PEA   $0001
         PEI   $EA
         PEI   $EC
         PEA   $0005
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         BRL   L041597
L041493  LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         CMP   #$0037
         BEQ   L0414E1
         BCC   L0414E1
         LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         SEC
         SBC   #$0028
         AND   #$00FF
         PHA
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$00FF
         STA   $F6
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0002
         STA   [$EE],Y
         PLA
         BRL   L041597
L0414E1  BRL   L0415FF
L0414E4  LDA   $D6
         BEQ   L0414F9
         PEA   $0000
         PEA   $0000
         PEI   $E8
         JSL   L0A73EB
         PLY
         PLY
         PLY
         BRA   L04154E
L0414F9  LDA   $DC
         CMP   #$FFFE
         BEQ   L04154E
         PEI   $E8
         PEI   $D8
         JSL   L063B32
         PLY
         PLY
         STA   $E8
         TAY
         BEQ   L04154E
         PEA   $0001
         PEI   $E8
         PEI   $EA
         PEI   $EC
         PEI   $E4
         PEI   $E2
         JSL   L063A54
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         CMP   #$0002
         BEQ   L04154E
         LDA   $E8
         SEC
         SBC   #$0002
         BEQ   L04154E
         BVS   L04153A
         EOR   #$8000
L04153A  BPL   L04154E
         PEA   $0000
         PEA   $FFFD
         PEI   $EA
         PEI   $EC
         JSL   L064FFA
         PLY
         PLY
         PLY
         PLY
L04154E  LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         CMP   #$0006
         BCC   L0415CD
         LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         SEC
         SBC   #$0003
         AND   #$00FF
         PHA
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$00FF
         STA   $F6
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0002
         STA   [$EE],Y
         PLA
L041597  LDA   $FD
         LDX   $FF
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00C6
         PHA
         PEA   $0010
         JSL   L02219C
         PLA
         PLA
         PLA
         PLA
         PLX
         LDX   $C8
         LDA   $C6
         INC   $C6
         BNE   L0415BC
         INC   $C8
L0415BC  PEA   $0000
         TDC
         CLC
         ADC   #$00C6
         PHA
         JSL   L044ED1
         PLY
         PLY
         BRA   L041619
L0415CD  BRA   L0415FF
L0415CF  CMP   #$FF80
         BNE   L0415D7
         BRL   L041323
L0415D7  CMP   #$FF82
         BNE   L0415DF
         BRL   L04130F
L0415DF  CMP   #$FF83
         BNE   L0415E7
         BRL   L041342
L0415E7  CMP   #$FF87
         BNE   L0415EF
         BRL   L0414E4
L0415EF  CMP   #$FFA8
         BNE   L0415F7
         BRL   L041493
L0415F7  CMP   #$FFE4
         BNE   L0415FF
         BRL   L04145B
L0415FF  PEI   $EA
         PEI   $EC
         PEA   $0000
         LDY   #$0008
         LDA   [$FD],Y
         PHA
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         LDA   #$FFFF
         STA   [$EE]
L041619  TAY
         TSC
         CLC
         ADC   #$0032
         TCS
         TYA
         PLD
         RTL

L041623  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0005
         PHA
         PEI   $FF
         PEI   $FD
         JSL   L06079D
         PLY
         PLY
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         STA   $EE
         CMP   #$0000
         BEQ   L041653
         LDA   $EE
         CMP   #$0003
         BNE   L041659
L041653  LDA   #$0000
         BRL   L0416C7
L041659  PEI   $FF
         PEI   $FD
         JSL   L060E4D
         PLY
         PLY
         STA   $F0
L041665  LDA   $F0
         CMP   #$FFFE
         BEQ   L0416C4
         LDA   #$000A
         PHA
         LDA   $F0
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$000F
         BNE   L0416B9
         LDA   $F0
         AND   #$03FF
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDAL  L0510E5
         TAX
         LDAL  L0510E3
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         AND   #$007F
         CMP   #$0032
         BNE   L0416B9
         LDA   #$0001
         BRA   L0416C7
L0416B9  PEI   $F0
         JSL   L060D39
         PLY
         STA   $F0
         BRA   L041665
L0416C4  LDA   #$0000
L0416C7  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0416D1  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         PEI   $FF
         PEI   $FD
         JSL   L06260C
         PLY
         PLY
         STA   $EC
         CMP   #$FFFE
         BNE   L0416F2
         LDA   #$0000
         BRA   L041713
L0416F2  PEI   $EC
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         CMP   #$0017
         BNE   L041710
         LDA   $EC
         BRA   L041713
         BRA   L041713
L041710  LDA   #$0000
L041713  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L04171D  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDA   #$0005
         PHA
         PEI   $FF
         PEI   $FD
         JSL   L06079D
         PLY
         PLY
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         STA   $F0
         CMP   #$0001
         BEQ   L041760
         LDA   $F0
         CMP   #$0005
         BEQ   L041760
         LDA   $F0
         CMP   #$0002
         BEQ   L041760
         LDA   $F0
         CMP   #$0004
         BEQ   L041760
         LDA   #$0000
         BRA   L041763
L041760  LDA   #$0001
L041763  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L04176D  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DC
         TCS
         LDA   #$0005
         PHA
         PEI   $FF
         PEI   $FD
         JSL   L06079D
         PLY
         PLY
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         STA   $EE
         CMP   #$0000
         BEQ   L04179D
         LDA   $EE
         CMP   #$0003
         BNE   L0417A0
L04179D  BRL   L041989
L0417A0  PEA   $000F
         JSL   L061767
         PLY
         STA   $F0
         CMP   #$FFFF
         BNE   L0417B2
         BRL   L041989
L0417B2  PEI   $FF
         PEI   $FD
         PEA   $0000
         PEI   $F0
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         LDA   #$0032
         AND   #$007F
         PHA
         PHA
         LDA   $F0
         AND   #$03FF
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDAL  L0510E5
         TAX
         LDAL  L0510E3
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         AND   #$FF80
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0002
         STA   [$F2],Y
         PLA
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L03008A
         LDX   #$0000
         TAY
         BPL   L041817
         DEX
L041817  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0064
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         STX   $E0
         STA   $DE
         LDA   #$0018
         SEP   #$20
         STA   $E2
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $E3
         REP   #$20
         LDA   $F0
         STA   $E6
         LDA   $FD
         SEP   #$20
         STA   $E4
         REP   #$20
         LDA   $FF
         SEP   #$20
         STA   $E5
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         JSL   L044ED1
         PLY
         PLY
         LDA   $FF
         SEC
         SBC   #$0001
         PHA
         PEI   $FD
         JSL   L0416D1
         PLY
         PLY
         TAY
         BEQ   L041896
         DEC   $FF
         PEI   $FF
         LDA   $FD
         CLC
         ADC   #$0001
         PHA
         JSL   L041623
         PLY
         PLY
         STA   $EE
         BRA   L0418BB
         BRL   L041970
L041896  PEI   $FF
         LDA   $FD
         SEC
         SBC   #$0001
         PHA
         JSL   L0416D1
         PLY
         PLY
         TAY
         BEQ   L0418EE
         DEC   $FD
         LDA   $FF
         CLC
         ADC   #$0001
         PHA
         PEI   $FD
         JSL   L041623
         PLY
         PLY
         STA   $EE
L0418BB  PEI   $FF
         LDA   $FD
         SEC
         SBC   #$0001
         PHA
         JSL   L041623
         PLY
         PLY
         PHA
         LDA   $FF
         SEC
         SBC   #$0001
         PHA
         PEI   $FD
         JSL   L041623
         PLY
         PLY
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         LDA   $EE
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $EE
         BRL   L041970
L0418EE  PEI   $FF
         LDA   $FD
         CLC
         ADC   #$0001
         PHA
         JSL   L0416D1
         PLY
         PLY
         TAY
         BEQ   L041917
         INC   $FD
         LDA   $FF
         SEC
         SBC   #$0001
         PHA
         PEI   $FD
         JSL   L041623
         PLY
         PLY
         STA   $EE
         BRA   L04193C
         BRA   L041970
L041917  LDA   $FF
         CLC
         ADC   #$0001
         PHA
         PEI   $FD
         JSL   L0416D1
         PLY
         PLY
         TAY
         BEQ   L04196E
         INC   $FF
         PEI   $FF
         LDA   $FD
         SEC
         SBC   #$0001
         PHA
         JSL   L041623
         PLY
         PLY
         STA   $EE
L04193C  PEI   $FF
         LDA   $FD
         CLC
         ADC   #$0001
         PHA
         JSL   L041623
         PLY
         PLY
         PHA
         LDA   $FF
         CLC
         ADC   #$0001
         PHA
         PEI   $FD
         JSL   L041623
         PLY
         PLY
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PHA
         LDA   $EE
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $EE
         BRA   L041970
L04196E  STZ   $EE
L041970  LDA   $EE
         CMP   #$0002
         BNE   L041989
         PEA   $0000
         PEA   $FFFD
         PEI   $FF
         PEI   $FD
         JSL   L064FFA
         PLY
         PLY
         PLY
         PLY
L041989  TAY
         TSC
         CLC
         ADC   #$001A
         TCS
         TYA
         PLD
         RTL

L041993  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DC
         TCS
         LDA   $FD
         CMP   #$0000
         BCC   L0419BE
         LDA   L0300A4
         CMP   $FD
         BEQ   L0419BE
         BCC   L0419BE
         LDA   $FF
         CMP   #$0000
         BCC   L0419BE
         LDA   L0300A6
         CMP   $FF
         BEQ   L0419BE
         BCS   L0419C1
L0419BE  BRL   L041B22
L0419C1  PEA   $00FF
         PEI   $FF
         PEI   $FD
         PEA   $00FF
         PEA   $FF83
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $FF
         PEI   $FD
         JSL   L0416D1
         PLY
         PLY
         STA   $DE
         TAY
         BNE   L0419E9
         BRL   L041B22
L0419E9  LDA   $FF
         CLC
         ADC   #$0001
         PHA
         PEI   $FD
         JSL   L041623
         PLY
         PLY
         STA   $E6
         PHA
         LDA   $FF
         SEC
         SBC   #$0001
         PHA
         PEI   $FD
         JSL   L041623
         PLY
         PLY
         STA   $E4
         PHA
         PEI   $FF
         LDA   $FD
         CLC
         ADC   #$0001
         PHA
         JSL   L041623
         PLY
         PLY
         STA   $E2
         PHA
         PEI   $FF
         LDA   $FD
         SEC
         SBC   #$0001
         PHA
         JSL   L041623
         PLY
         PLY
         STA   $E0
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $EC
L041A44  LDA   $EC
         INC   $EC
         CMP   #$0004
         BCC   L041A50
         BRL   L041B1E
L041A50  LDA   $FD
         STA   $F0
         LDA   $FF
         STA   $EE
         JSL   L020599
         STA   $EA
         LDA   #$0005
         STA   $E8
         BRL   L041AE3
L041A66  LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00E0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         BEQ   L041A87
         BRL   L041AD8
L041A87  LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00E0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0001
         STA   [$F2]
         LDA   $EA
         BRL   L041AC9
L041AAB  DEC   $F0
         BRL   L041AD6
L041AB0  INC   $F0
         BRL   L041AD6
L041AB5  DEC   $EE
         BRL   L041AD6
L041ABA  INC   $EE
L041ABC  BRL   L041AD6
L041ABF  DA    L041AAB
         DA    L041AB0
         DA    L041AB5
         DA    L041ABA
         DA    L041ABC
L041AC9  CMP   #$0004
         BCC   L041AD1
         LDA   #$0004
L041AD1  ASL
         TAX
         JMP   (L041ABF,X)

L041AD6  BRA   L041AEC
L041AD8  LDA   $EA
         CLC
         ADC   #$0001
         AND   #$0003
         STA   $EA
L041AE3  DEC   $E8
         LDA   $E8
         BEQ   L041AEC
         BRL   L041A66
L041AEC  PEI   $EE
         PEI   $F0
         JSL   L04171D
         PLY
         PLY
         TAY
         BEQ   L041B1B
         PEI   $EE
         PEI   $F0
         PEI   $FF
         PEI   $FD
         PEI   $DE
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L041B19
         PEI   $EE
         PEI   $F0
         JSL   L062B33
         PLY
         PLY
L041B19  BRA   L041B22
L041B1B  BRL   L041A44
L041B1E  JSL   L0D44BE
L041B22  TAY
         TSC
         CLC
         ADC   #$001A
         TCS
         TYA
         PLD
         RTL

L041B2C  ENT
         PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EC
         TCS
         LDA   $FB
         SEC
         SBC   $FF
         STA   $FB
         SEC
         SBC   #$0000
         BVS   L041B47
         EOR   #$8000
L041B47  BMI   L041B51
         LDA   $FB
         EOR   #$FFFF
         INC
         BRA   L041B53
L041B51  LDA   $FB
L041B53  PHA
         LDA   $F9
         SEC
         SBC   $FD
         STA   $F9
         SEC
         SBC   #$0000
         BVS   L041B64
         EOR   #$8000
L041B64  BMI   L041B6E
         LDA   $F9
         EOR   #$FFFF
         INC
         BRA   L041B70
L041B6E  LDA   $F9
L041B70  PLX
         STX   $F2
         CLC
         ADC   $F2
         TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L041B80  ENT
         PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         LDA   $F7
         BRL   L041BE9
L041B90  LDA   $F9
         STA   $EA
         LDA   $FF
         STA   $F9
         LDA   $EA
         STA   $FF
         LDA   $FD
         STA   $EA
         LDA   $FB
         STA   $FD
         LDA   $EA
         STA   $FB
         BRL   L041BF6
L041BAB  LDA   $F9
         STA   $EA
         LDA   $FD
         STA   $F9
         LDA   $EA
         STA   $FD
         LDA   $FF
         STA   $EA
         LDA   $FB
         STA   $FF
         LDA   $EA
         STA   $FB
         BRL   L041BF6
L041BC6  LDA   $F9
         STA   $EA
         LDA   $FB
         STA   $F9
         LDA   $EA
         STA   $FB
         LDA   $FD
         STA   $EA
         LDA   $FF
         STA   $FD
         LDA   $EA
         STA   $FF
L041BDE  BRL   L041BF6
L041BE1  DA    L041BC6
         DA    L041BAB
         DA    L041B90
         DA    L041BDE
L041BE9  CMP   #$0003
         BCC   L041BF1
         LDA   #$0003
L041BF1  ASL
         TAX
         JMP   (L041BE1,X)

L041BF6  LDA   $FD
         SEC
         SBC   #$0001
         PHA
         LDA   $F9
         PLX
         STX   $F0
         SEC
         SBC   $F0
         STA   $F9
         SEC
         SBC   #$0000
         BEQ   L041C3C
         BVS   L041C12
         EOR   #$8000
L041C12  BPL   L041C3C
         LDA   $FB
         SEC
         SBC   $FF
         STA   $FB
         SEC
         SBC   #$0000
         BVS   L041C24
         EOR   #$8000
L041C24  BMI   L041C2E
         LDA   $FB
         EOR   #$FFFF
         INC
         BRA   L041C30
L041C2E  LDA   $FB
L041C30  SEC
         SBC   $F9
         BEQ   L041C41
         BVS   L041C3A
         EOR   #$8000
L041C3A  BPL   L041C41
L041C3C  LDA   #$0000
         BRA   L041C44
L041C41  LDA   #$0001
L041C44  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L041C4E  ENT
         PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         LDA   $F9
         CMP   $FD
         BNE   L041C89
         JSL   L02051C
         AND   #$0002
         CLC
         ADC   #$0001
         STA   L030010
         LDA   $FB
         SEC
         SBC   $FF
         BEQ   L041C83
         BVS   L041C79
         EOR   #$8000
L041C79  BPL   L041C83
         LDA   #$0000
         BRL   L041D55
         BRA   L041C89
L041C83  LDA   #$0002
         BRL   L041D55
L041C89  LDA   $FB
         CMP   $FF
         BNE   L041CB9
         JSL   L02051C
         AND   #$0002
         CLC
         ADC   #$0000
         STA   L030010
         LDA   $F9
         SEC
         SBC   $FD
         BEQ   L041CB3
         BVS   L041CA9
         EOR   #$8000
L041CA9  BPL   L041CB3
         LDA   #$0003
         BRL   L041D55
         BRA   L041CB9
L041CB3  LDA   #$0001
         BRL   L041D55
L041CB9  STZ   $EC
L041CBB  PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         PEI   $EC
         JSL   L041B80
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L041CD4
         BRL   L041D50
L041CD4  PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         LDA   $EC
         CLC
         ADC   #$0001
         AND   #$0003
         STA   L030010
         PHA
         JSL   L041B80
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L041D35
         LDA   $EC
         CMP   #$0000
         BNE   L041D1D
         PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         LDA   $EC
         CLC
         ADC   #$0003
         AND   #$0003
         STA   L030010
         PHA
         JSL   L041B80
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L041D35
L041D1D  JSL   L02051C
         AND   #$0002
         CLC
         ADC   $EC
         CLC
         ADC   #$0001
         AND   #$0003
         STA   L030010
         LDA   $EC
         BRA   L041D55
L041D35  JSL   L020564
         TAY
         BEQ   L041D4C
         LDA   L030010
         STA   $F9
         LDA   $EC
         STA   L030010
         LDA   $F9
         BRA   L041D55
         BRA   L041D50
L041D4C  LDA   $EC
         BRA   L041D55
L041D50  INC   $EC
         BRL   L041CBB
L041D55  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L041D5F  ENT
         PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00E4
         TCS
         PEI   $FD
         PEI   $FB
         PEI   $F9
         PEI   $F7
         JSL   L041C4E
         PLY
         PLY
         PLY
         PLY
         ASL
         STA   $E6
         AND   #$0002
         TAY
         BNE   L041D85
         INC   $FF
L041D85  LDA   $FF
         LSR
         AND   #$0001
         PHA
         LDA   $E6
         PLX
         STX   $EC
         CLC
         ADC   $EC
         STA   $E6
         PEA   $0004
         PEI   $F5
         PEI   $F3
         LDA   $E6
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0583E6
         LDX   #^L0583E6
         JSL   L021F00
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L041DC1  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00C6
         TCS
         LDA   $FF
         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   L03003E
         BCC   L041DFA
         LDA   #$0000
         BRL   L042081
L041DFA  LDY   #$0034
         LDA   [$EC],Y
         BNE   L041E07
         LDA   #$0000
         BRL   L042081
L041E07  LDA   L030034
         BEQ   L041E10
         JSL   L0A664E
L041E10  LDX   L03009A
         LDA   L030098
         STA   $F0
         STX   $F2
         LDY   #$000C
         LDA   [$F0],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         ASL
         STA   $E2
         LDY   #$0004
         LDA   [$FB],Y
         AND   #$00FF
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   $F0
         LDX   $F2
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00C8
         PHA
         PEA   $001A
         JSL   L02219C
         PLA
         PLA
         PLA
         PLA
         PLX
         LDA   $D8
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         PHA
         PEA   $0007
         PEI   $FF
         JSL   L0A57C4
         PLY
         PLY
         PLY
         LDA   L030034
         BNE   L041EDA
         PEI   $EE
         PEI   $EC
         JSL   L0A60F7
         PLY
         PLY
         PHA
         LDA   $D4
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$001F
         PLX
         STX   $F4
         CLC
         ADC   $F4
         CLC
         ADC   $E2
         SEC
         SBC   #$0010
         PLX
         STX   $F0
         CMP   $F0
         BEQ   L041EBC
         BCS   L041EC6
L041EBC  JSL   L020599
         TAY
         BEQ   L041EC6
         BRL   L04207E
L041EC6  PEA   $003C
         PEI   $EE
         PEI   $EC
         JSL   L0A5EC2
         PLY
         PLY
         PLY
         TAY
         BEQ   L041EDA
         BRL   L04207E
L041EDA  JSL   L02051C
         STA   $E8
         AND   #$0070
         TAY
         BEQ   L041F28
         LDA   $E8
         AND   #$000F
         STA   $E8
         LDA   $DE
         STA   $E6
         STZ   $E4
         BRA   L041EFF
L041EF5  INC   $E4
         LDA   $E6
         LSR
         LSR
         LSR
         LSR
         STA   $E6
L041EFF  LDA   $E6
         AND   #$000F
         CMP   $E8
         BCC   L041EF5
         LDA   $E4
         LDX   #$0000
         PHX
         PHA
         LDA   #L058406
         LDX   #^L058406
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         AND   #$00FF
         STA   $E4
         BRA   L041F2F
L041F28  LDA   $E8
         AND   #$0001
         STA   $E4
L041F2F  PEA   $0007
         PEI   $FF
         JSL   L0A55B1
         PLY
         PLY
         ASL
         PHA
         LDA   $D2
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$000F
         PLX
         STX   $F4
         CLC
         ADC   $F4
         CLC
         ADC   $E2
         PLX
         STX   $F4
         SEC
         SBC   $F4
         STA   $EA
         SEC
         SBC   #$0001
         BEQ   L041F67
         BVS   L041F65
         EOR   #$8000
L041F65  BMI   L041F7B
L041F67  JSL   L020564
         TAY
         BEQ   L041F71
         BRL   L04207E
L041F71  JSL   L020599
         CLC
         ADC   #$0002
         STA   $EA
L041F7B  LDA   #$0001
         PHA
         LDA   $EA
         SEC
         JSL   L0222DF
         PLA
         STA   $EA
         JSL   L020599
         PHA
         LDA   $EA
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         PHA
         LDA   $EA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EA
         LDA   $EA
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $EA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EA
         LDA   #$0002
         PHA
         LDA   $EA
         SEC
         JSL   L0222DF
         PLA
         STA   $EA
         JSL   L020599
         CLC
         ADC   #$0001
         PHA
         LDA   $EA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         STA   $EA
         JSL   L020564
         TAY
         BEQ   L042014
         LDA   #$0001
         PHA
         LDA   $EA
         SEC
         JSL   L0222DF
         PLA
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         SEC
         SBC   #$0001
         PHA
         LDA   $EA
         PLX
         STX   $F4
         SEC
         SBC   $F4
         STA   $EA
L042014  LDA   $E0
         AND   #$00FF
         PHA
         PEI   $E4
         PEI   $EA
         PEI   $FF
         JSL   L0A6FA9
         PLY
         PLY
         PLY
         PLY
         STA   $EA
         TAY
         BEQ   L04207E
         PEA   $0002
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         LDA   #$0009
         CLC
         ADC   $FF
         PHA
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         LDA   $D3
         AND   #$00FF
         STA   $E8
         TAY
         BEQ   L04207A
         JSL   L020564
         TAY
         BEQ   L04207A
         PEI   $E8
         PEA   $0004
         PEI   $EE
         PEI   $EC
         JSL   L0A5E53
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         CMP   #$0000
         BCC   L04207A
         PEI   $E8
         PEI   $FF
         JSL   L0A723F
         PLY
         PLY
L04207A  LDA   $EA
         BRA   L042081
L04207E  LDA   #$0000
L042081  TAY
         TSC
         CLC
         ADC   #$002E
         TCS
         TYA
         PLD
         RTL

L04208B  ENT
         PHD
         TSC
         SEC
         SBC   #$00E5
         TCD
         ADC   #$00CC
         TCS
         LDA   $EF
         CMP   L03003E
         BCC   L0420A3
         LDA   #$0000
         BRL   L042415
L0420A3  LDY   #$0034
         LDA   [$EB],Y
         BNE   L0420B0
         LDA   #$0000
         BRL   L042415
L0420B0  LDX   L03009A
         LDA   L030098
         STA   $E0
         STX   $E2
         LDY   #$000C
         LDA   [$E0],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         ASL
         STA   $DA
         LDY   #$0004
         LDA   [$F1],Y
         AND   #$00FF
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STX   $D0
         STA   $CE
         LDA   $EB
         CLC
         ADC   #$00D3
         LDX   $ED
         BCC   L0420FF
         INX
L0420FF  STA   $E0
         STX   $E2
         LDY   #$0002
         LDA   [$E0],Y
         PHA
         JSL   L020B37
         PLY
         STA   $D2
         LDA   $FB
         AND   #$8000
         STA   $D4
         TAY
         BEQ   L042121
         LDA   $FB
         AND   #$7FFF
         STA   $FB
L042121  LDY   #$0002
         LDA   [$CE],Y
         AND   #$0040
         TAY
         BEQ   L042133
         LDA   $D4
         BNE   L042133
         BRL   L0423DE
L042133  PEI   $ED
         PEI   $EB
         JSL   L0A60F7
         PLY
         PLY
         PHA
         LDY   #$000C
         LDA   [$CE],Y
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$001F
         PLX
         STX   $E4
         CLC
         ADC   $E4
         CLC
         ADC   $DA
         SEC
         SBC   #$0010
         PLX
         STX   $E0
         CMP   $E0
         BCC   L042181
         JSL   L020599
         TAY
         BEQ   L042181
         LDA   #$004B
         SEC
         SBC   $FB
         PHA
         PEI   $ED
         PEI   $EB
         JSL   L0A5EC2
         PLY
         PLY
         PLY
         TAY
         BNE   L042181
         BRL   L0423DE
L042181  PEA   $0001
         PEI   $EF
         JSL   L0A61D0
         PLY
         PLY
         STA   $DE
         TAY
         BNE   L042194
         BRL   L042256
L042194  LDA   #$0001
         PHA
         LDA   $DE
         SEC
         JSL   L0222DF
         PLA
         CLC
         ADC   #$0001
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
         LDX   #$0000
         LDA   #$0005
         PHX
         PHA
         LDA   $FD
         LDX   #$0000
         PHX
         PHA
         LDA   $DE
         LDX   #$0000
         TAY
         BPL   L0421D0
         DEX
L0421D0  SEC
         JSL   L0220EA
         PLA
         PLX
         SEC
         JSL   L022303
         PLA
         PLX
         STA   $DE
         LDY   #$0008
         LDA   [$CE],Y
         AND   #$00FF
         PHA
         JSL   L02051C
         AND   #$001F
         PLX
         STX   $E4
         CLC
         ADC   $E4
         CLC
         ADC   $DA
         STA   $D8
         LDA   $D2
         CMP   #$0027
         BNE   L042219
         LDA   #$0002
         PHA
         LDA   $D8
         SEC
         JSL   L0222DF
         LDA   $D8
         PLX
         STX   $E4
         SEC
         SBC   $E4
         STA   $D8
         BRA   L042235
L042219  LDA   $D2
         CMP   #$002B
         BNE   L042235
         LDA   #$0003
         PHA
         LDA   $D8
         SEC
         JSL   L0222DF
         LDA   $D8
         PLX
         STX   $E4
         SEC
         SBC   $E4
         STA   $D8
L042235  JSL   L02051C
         AND   #$001F
         CLC
         ADC   $DE
         SEC
         SBC   $D8
         STA   $DE
         STA   $DC
         SEC
         SBC   #$0001
         BEQ   L042256
         BVS   L042251
         EOR   #$8000
L042251  BPL   L042256
         BRL   L0422C7
L042256  JSL   L020599
         STA   $DE
         TAY
         BNE   L042264
         BRL   L0423DE
         BRA   L0422C7
L042264  INC   $DE
         JSL   L02051C
         AND   #$000F
         PHA
         LDA   $DC
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DC
         SEC
         SBC   #$0000
         BEQ   L042285
         BVS   L042283
         EOR   #$8000
L042283  BMI   L04228C
L042285  JSL   L020564
         TAY
         BEQ   L0422C7
L04228C  JSL   L020599
         PHA
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
         JSL   L020599
         TAY
         BNE   L0422C7
         JSL   L02051C
         AND   #$000F
         PHA
         LDA   $DC
         PLX
         STX   $E4
         CLC
         ADC   $E4
         PHA
         PEA   $0000
         JSL   L0204BA
         PLY
         PLY
         PHA
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
L0422C7  LDA   #$0001
         PHA
         LDA   $DE
         SEC
         JSL   L0222DF
         PLA
         STA   $DE
         JSL   L020599
         PHA
         LDA   $DE
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         PLX
         STX   $E4
         CLC
         ADC   $E4
         PHA
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
         LDA   $DE
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
         LDA   #$0002
         PHA
         LDA   $DE
         SEC
         JSL   L0222DF
         PLA
         STA   $DE
         JSL   L020599
         CLC
         ADC   #$0001
         PHA
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
         LDA   $D2
         CMP   #$0028
         BNE   L042355
         LDY   #$0002
         LDA   [$CE],Y
         AND   #$0040
         TAY
         BNE   L042355
         LDA   #$0001
         PHA
         LDA   $DE
         SEC
         JSL   L0222DF
         PLA
         STA   $DE
         TAY
         BNE   L042355
         BRL   L0423DE
L042355  JSL   L02051C
         AND   #$003F
         PHA
         PEI   $FF
         PEI   $EF
         JSL   L0A55B1
         PLY
         PLY
         PLX
         STX   $E0
         CMP   $E0
         BEQ   L042381
         BCC   L042381
         LDA   $DE
         CLC
         ADC   #$000A
         PHA
         LDA   $DE
         PLX
         STX   $E4
         CLC
         ADC   $E4
         STA   $DE
L042381  PEA   $0001
         PEI   $DE
         PEI   $F9
         PEI   $F7
         PEI   $F5
         PEI   $F3
         PEI   $F1
         JSL   L0635C6
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
         STA   $D6
         LDY   #$0010
         LDA   [$CE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         PHA
         LDA   $DE
         CLC
         JSL   L0220A5
         PLA
         LSR
         LSR
         LSR
         LSR
         CLC
         ADC   #$0003
         PHA
         PEI   $FF
         PEI   $EF
         JSL   L0A57C4
         PLY
         PLY
         PLY
         JSL   L020599
         CLC
         ADC   #$0004
         PHA
         PEI   $EF
         JSL   L0A746A
         PLY
         PLY
         BRA   L0423F3
L0423DE  STZ   $DE
         STZ   $D6
         JSL   L020564
         CLC
         ADC   #$0002
         PHA
         PEI   $EF
         JSL   L0A746A
         PLY
         PLY
L0423F3  PEI   $EF
         JSL   L0A3E20
         PLY
         LDA   $D6
         CMP   #$0002
         BEQ   L042413
         PEA   $0000
         PEA   $FFFF
         PEI   $F9
         PEI   $F7
         JSL   L064FFA
         PLY
         PLY
         PLY
         PLY
L042413  LDA   $DE
L042415  TAY
         TSC
         CLC
         ADC   #$0018
         TCS
         TYA
         PLD
         RTL

L04241F  ENT
         PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00D2
         TCS
         PEI   $F9
         PEI   $F7
         JSL   L060CD1
         PLY
         PLY
         STX   $EA
         STA   $E8
         LDA   $FD
         BEQ   L04244E
         LDY   #$0002
         LDA   [$E8],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L042465
L04244E  LDA   $FD
         BNE   L04246B
         LDY   #$0002
         LDA   [$E8],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BNE   L04246B
L042465  LDA   #$0000
         BRL   L04256E
L04246B  LDY   #$0002
         LDA   [$E8],Y
         AND   #$0001
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0510A3
         LDX   #^L0510A3
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0001
         LDA   [$EC],Y
         AND   #$00FF
         SEC
         SBC   $FB
         BEQ   L0424A0
         BVS   L04249B
         EOR   #$8000
L04249B  BPL   L0424A0
         BRL   L04256B
L0424A0  LDA   $F9
         LDX   #$0000
         PHX
         PHA
         LDA   $F7
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         JSL   L021F00
         PLA
         PLX
         STX   $E6
         STA   $E4
         LDA   [$E4]
         AND   #$00FF
         AND   #$0007
         CMP   #$0004
         BEQ   L0424EA
         BRL   L04256B
L0424EA  LDA   $FF
         BEQ   L042555
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L03008A
         LDX   #$0000
         TAY
         BPL   L042500
         DEX
L042500  SEC
         JSL   L0222B8
         LDA   $FF
         LDX   #$0000
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         JSL   L021F00
         PLA
         PLX
         JSL   L021F9F
         PLA
         PLX
         STX   $D6
         STA   $D4
         LDA   #$0002
         SEP   #$20
         STA   $D8
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $D9
         REP   #$20
         LDA   $F7
         SEP   #$20
         STA   $DA
         REP   #$20
         LDA   $F9
         SEP   #$20
         STA   $DB
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L044ED1
         PLY
         PLY
         BRA   L042566
L042555  LDA   [$E4]
         AND   #$00FF
         AND   #$FFF8
         ORA   #$0005
         SEP   #$20
         STA   [$E4]
         REP   #$20
L042566  LDA   #$0001
         BRA   L04256E
L04256B  LDA   #$0000
L04256E  TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PLD
         RTL

L042578  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E9
         TCS
         STZ   $EE
         STZ   $EC
         LDA   #$000D
         STA   $F0
         BRL   L042624
L04258F  LDA   $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
         SEP   #$20
         STA   $EB
         REP   #$20
         LDA   $F0
         LDX   #$0000
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         AND   #$001B
         PHA
         LDA   $EE
         INC   $EE
         LDX   #$0000
         PHX
         PHA
         LDA   #L051109
         LDX   #^L051109
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         SEP   #$20
         STA   [$F2]
         REP   #$20
         LDA   $EB
         AND   #$00FF
         AND   #$001B
         TAY
         BEQ   L04261C
         INC   $EC
L04261C  LDA   $F0
         CLC
         ADC   #$0002
         STA   $F0
L042624  LDA   $F0
         CMP   #$02BF
         BCS   L04262E
         BRL   L04258F
L04262E  LDA   $EC
         BNE   L042638
         STZ   L030250
         STZ   L030252
L042638  LDA   #$0088
         STA   L0303D5
         LDA   #$0200
         STA   L030102
         LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$000D
         TCS
         TYA
         PLD
         RTL

L042650  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00D6
         TCS
         PEI   $FD
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDY   #$0002
         LDA   [$F9],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         STA   $E8
         PEI   $FF
         PEI   $EC
         PEI   $EA
         JSL   L060576
         PLY
         PLY
         PLY
         STA   $E6
         LDY   #$0002
         LDA   [$F9],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         STA   $DE
         TAY
         BEQ   L0426A0
         LDA   $E8
         STA   $E4
         BRA   L0426AA
L0426A0  LDA   $E6
         CLC
         ADC   $E8
         AND   #$0003
         STA   $E4
L0426AA  PEI   $FF
         PEI   $EC
         PEI   $EA
         JSL   L0604B4
         PLY
         PLY
         PLY
         STA   $E2
         CMP   #$00FF
         BNE   L0426C1
         BRL   L04277B
L0426C1  LDA   $E2
         STA   $DC
         LDY   #$0004
         LDA   [$EA],Y
         AND   #$00FF
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$0003
         STA   $DA
         LDA   #$0004
         CLC
         ADC   $E4
         SEC
         SBC   $E6
         AND   #$0003
         STA   $D8
         STZ   $E0
         BRA   L04276A
L042708  LDA   $DE
         BEQ   L042710
         LDA   $E8
         BRA   L042718
L042710  LDA   $E6
         CLC
         ADC   $E8
         AND   #$0003
L042718  PHA
         PEI   $E0
         PEI   $E4
         JSL   L062817
         PLY
         PLY
         PLY
         STA   $E4
         LDA   $DA
         CMP   #$0000
         BNE   L042742
         LDA   $DE
         BEQ   L042736
         LDA   #$0000
         BRA   L042739
L042736  LDA   #$0001
L042739  STA   $D8
         TAY
         BEQ   L042742
         LDA   $E8
         STA   $D8
L042742  LDA   $D8
         BEQ   L04275C
         LDA   $DC
         CLC
         ADC   $D8
         AND   #$0003
         PHA
         PEI   $E0
         PEI   $E2
         JSL   L062817
         PLY
         PLY
         PLY
         STA   $E2
L04275C  LDA   $E6
         LSR
         LSR
         STA   $E6
         LDA   $DC
         LSR
         LSR
         STA   $DC
         INC   $E0
L04276A  LDY   #$000E
         LDA   [$EA],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         CMP   $E0
         BCS   L042708
L04277B  PEI   $FF
         PEI   $E4
         PEI   $EC
         PEI   $EA
         JSL   L0605F5
         PLY
         PLY
         PLY
         PLY
         PEI   $FF
         PEI   $E2
         PEI   $EC
         PEI   $EA
         JSL   L060515
         PLY
         PLY
         PLY
         PLY
         LDA   L030046
         CMP   $FF
         BNE   L0427BF
         LDY   #$000E
         LDA   [$EA],Y
         AND   #$000F
         CMP   #$0006
         BNE   L0427BF
         LDY   #$0005
         LDA   [$EA],Y
         AND   #$00FF
         CLC
         ADC   #$0002
         BRA   L0427C2
         BRA   L0427C2
L0427BF  LDA   #$0001
L0427C2  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L0427CC  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         LDA   L030266
         STA   $EE
         LDY   #$0002
         LDA   [$FB],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         STA   $EC
         LDY   #$0002
         LDA   [$FB],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L042805
         LDA   $EC
         STA   $EE
         BRA   L042836
L042805  LDA   $EE
         CLC
         ADC   $EC
         AND   #$0003
         STA   $EE
         LDA   #$000E
         PHA
         LDA   #$000E
         PHA
         LDA   $FF
         CLC
         JSL   L0222DF
         PLA
         CLC
         ADC   $EC
         AND   #$0003
         CLC
         JSL   L0222A8
         LDA   $FF
         AND   #$3FFF
         PLX
         STX   $F4
         ORA   $F4
         STA   $FF
L042836  LDA   $EE
         STA   L030266
         LDA   $FF
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L042847  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         LDA   #$000A
         PHA
         LDA   $FF
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $F2
         CMP   #$0004
         BNE   L042876
         PEI   $FF
         JSL   L060468
         PLY
         AND   #$0020
         BRA   L042887
         BRA   L042887
L042876  LDA   $F2
         CMP   #$000E
         BNE   L042884
         LDA   #$0001
         BRA   L042887
         BRA   L042887
L042884  LDA   #$0000
L042887  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L042891  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00DA
         TCS
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   $FD
         LDX   #$0000
         TAY
         BPL   L0428AD
         DEX
L0428AD  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0005
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         STX   $DE
         STA   $DC
         LDA   $FF
         BEQ   L0428D6
         LDA   #$003D
         BRA   L0428D9
L0428D6  LDA   #$003C
L0428D9  SEP   #$20
         STA   $E0
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $E1
         REP   #$20
         LDA   $F9
         SEP   #$20
         STA   $E2
         REP   #$20
         LDA   $FB
         SEP   #$20
         STA   $E3
         REP   #$20
         LDA   $F7
         STA   $E4
         PEA   $0000
         TDC
         CLC
         ADC   #$00DC
         PHA
         JSL   L044ED1
         PLY
         PLY
         TSC
         CLC
         ADC   #$0016
         TCS
         PLD
         RTL

L042913  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00CE
         TCS
         STZ   $DC
         PEA   $0004
         PEA   $0000
         TDC
         CLC
         ADC   #$00D0
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         LDA   $FF
         CMP   #$FFFF
         BNE   L042988
         LDA   #$FFFE
         STA   $DE
         STZ   $E2
         BRA   L04297E
L042943  PEI   $E2
         JSL   L0A34BE
         PLY
         SEC
         SBC   #$0000
         BVS   L042953
         EOR   #$8000
L042953  BPL   L04297C
         LDA   $E2
         CLC
         ADC   #$0001
         PHA
         LDA   $E2
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         PLA
         SEP   #$20
         STA   [$EC]
         REP   #$20
L04297C  INC   $E2
L04297E  LDA   $E2
         CMP   #$0004
         BCC   L042943
         BRL   L042A17
L042988  LDA   #$FFFF
         STA   $DE
         PEI   $FF
         JSL   L060C4E
         PLY
         STX   $EA
         STA   $E8
         LDA   #$0000
         STA   $E2
         LDA   #$0000
         STA   $E0
         BRA   L042A06
L0429A4  LDA   $E2
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $E8
         CLC
         ADC   #$0006
         LDX   $EA
         BCC   L0429B7
         INX
L0429B7  JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $E0
         PLX
         STX   $F0
         ORA   $F0
         STA   $E0
         PEI   $E2
         PEI   $EA
         PEI   $E8
         JSL   L062655
         PLY
         PLY
         PLY
         TAY
         BEQ   L042A04
         LDA   $E2
         CLC
         ADC   #$0001
         PHA
         LDA   $E2
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         PLA
         SEP   #$20
         STA   [$EC]
         REP   #$20
L042A04  INC   $E2
L042A06  LDA   $E2
         CMP   #$0004
         BCC   L0429A4
         LDA   $E0
         BNE   L042A17
         LDA   #$0000
         BRL   L042D59
L042A17  LDA   $FB
         SEC
         SBC   #$0000
         BVS   L042A22
         EOR   #$8000
L042A22  BMI   L042A27
         BRL   L042BFE
L042A27  LDA   $F9
         SEC
         SBC   $FD
         STA   $E0
         SEC
         SBC   #$0000
         BVS   L042A37
         EOR   #$8000
L042A37  BMI   L042A41
         LDA   $E0
         EOR   #$FFFF
         INC
         BRA   L042A43
L042A41  LDA   $E0
L042A43  PHA
         LDA   $F7
         SEC
         SBC   $FB
         STA   $E0
         SEC
         SBC   #$0000
         BVS   L042A54
         EOR   #$8000
L042A54  BMI   L042A5E
         LDA   $E0
         EOR   #$FFFF
         INC
         BRA   L042A60
L042A5E  LDA   $E0
L042A60  PLX
         STX   $F0
         CLC
         ADC   $F0
         CMP   #$0001
         BEQ   L042A6E
         BRL   L042BFE
L042A6E  PEI   $FD
         PEI   $FB
         PEI   $F9
         PEI   $F7
         JSL   L041C4E
         PLY
         PLY
         PLY
         PLY
         STA   $E2
         LDA   $E2
         CLC
         ADC   #$0001
         AND   #$0003
         STA   $E0
         PEA   $0004
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         LDA   $E2
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $E2
         CLC
         ADC   #$0003
         AND   #$0003
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D4
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         PLA
         SEP   #$20
         STA   [$EC]
         REP   #$20
         AND   #$00FF
         BEQ   L042AEB
         LDA   #$0001
         STA   $DC
L042AEB  LDA   $E0
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $E0
         CLC
         ADC   #$0001
         AND   #$0003
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D4
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         PLA
         SEP   #$20
         STA   [$EC]
         REP   #$20
         AND   #$00FF
         BEQ   L042B38
         LDA   #$0001
         STA   $DC
L042B38  LDA   $E2
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         BNE   L042B9B
         LDA   $E2
         CLC
         ADC   #$0003
         AND   #$0003
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $E2
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         PLA
         SEP   #$20
         STA   [$EC]
         REP   #$20
L042B9B  LDA   $E0
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         BNE   L042BFE
         LDA   $E0
         CLC
         ADC   #$0001
         AND   #$0003
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $E0
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         PLA
         SEP   #$20
         STA   [$EC]
         REP   #$20
L042BFE  LDA   $F7
         STA   $DA
         LDA   $F9
         STA   $D8
L042C06  PEI   $D8
         PEI   $DA
         JSL   L060E4D
         PLY
         PLY
         STA   $E6
L042C12  LDA   $E6
         CMP   #$FFFE
         BNE   L042C1C
         BRL   L042CFF
L042C1C  LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$000E
         BEQ   L042C33
         BRL   L042CF3
L042C33  LDA   $E6
         AND   #$03FF
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDAL  L0510E1
         TAX
         LDAL  L0510DF
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0006
         LDA   [$EC],Y
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0004
         LDA   [$EC],Y
         AND   #$00FF
         CMP   #$0030
         BEQ   L042CF3
         LDA   #$000E
         PHA
         LDA   $E6
         CLC
         JSL   L0222DF
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         STA   $E2
         TAY
         BEQ   L042CF3
         PEI   $E6
         LDA   $E2
         SEC
         SBC   #$0001
         PHA
         PEI   $F9
         PEI   $F7
         PEI   $DE
         JSL   L0406BC
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L042CF3
         PEI   $E6
         JSL   L04046D
         PLY
         LDA   L030012
         CMP   #$0002
         BNE   L042CF0
         LDA   #$0001
         BRA   L042D59
L042CF0  BRL   L042C06
L042CF3  PEI   $E6
         JSL   L060D39
         PLY
         STA   $E6
         BRL   L042C12
L042CFF  LDA   $DC
         BEQ   L042D56
         LDA   $FB
         STA   $DA
         CLC
         ADC   #$0001
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         PHA
         LDA   $F7
         PLX
         STX   $F0
         ORA   $F0
         STA   $F7
         LDA   $FD
         STA   $D8
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         PHA
         LDA   $F9
         PLX
         STX   $F0
         ORA   $F0
         STA   $F9
         PEA   $0004
         PEA   $0000
         TDC
         CLC
         ADC   #$00D0
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         STZ   $DC
         BRL   L042C06
L042D56  LDA   #$0000
L042D59  TAY
         TSC
         CLC
         ADC   #$0022
         TCS
         TYA
         PLD
         RTL

L042D63  ENT
         PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00BC
         TCS
         LDA   #$FFFF
         STA   $DE
         STZ   $DC
         STZ   $D0
         STZ   $CE
         STZ   $CC
         STZ   $CA
         STZ   $C8
         STZ   $C6
         STZ   $C4
         LDA   $F7
         CMP   #$FFFF
         BEQ   L042DB2
         LDA   #$000A
         PHA
         LDA   $F7
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $DE
         LDA   #$000E
         PHA
         LDA   $F7
         CLC
         JSL   L0222DF
         PLA
         STA   $D4
         PEI   $F7
         JSL   L042847
         PLY
         STA   $DC
L042DB2  LDA   $F9
         SEC
         SBC   #$0000
         BVS   L042DBD
         EOR   #$8000
L042DBD  BPL   L042DF1
         LDA   $F7
         CMP   #$FFFF
         BEQ   L042DD5
         LDA   $DE
         CMP   #$0004
         BNE   L042DF1
         LDA   L03008A
         CMP   L030046
         BNE   L042DF1
L042DD5  PEI   $F7
         PEI   $FF
         PEI   $FD
         PEI   $FB
         PEI   $F9
         JSL   L042913
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L042DF1
         LDA   #$0001
         BRL   L043A16
L042DF1  LDA   $FD
         SEC
         SBC   #$0000
         BVS   L042DFC
         EOR   #$8000
L042DFC  BMI   L042E01
         BRL   L0436FA
L042E01  LDA   L03008A
         STA   $D8
         STA   $DA
         LDA   L030046
         CMP   $DA
         BNE   L042E1C
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L042E1A
         EOR   #$8000
L042E1A  BMI   L042E21
L042E1C  LDA   #$0000
         BRA   L042E24
L042E21  LDA   #$0001
L042E24  STA   $CE
         LDA   $F7
         CMP   #$FFFF
         BNE   L042E57
         LDA   $FD
         STA   L030040
         LDA   $FF
         STA   L030042
         LDA   #$0002
         STA   $D2
         LDA   L030160
         BNE   L042E46
         LDA   L030034
         BEQ   L042E4B
L042E46  LDA   #$0000
         BRA   L042E4E
L042E4B  LDA   #$0001
L042E4E  STA   $CA
         LDA   L030044
         STA   $D6
         BRA   L042E6A
L042E57  LDA   $DE
         CMP   #$0004
         BNE   L042E65
         LDA   #$0001
         STA   $D2
         BRA   L042E6A
L042E65  LDA   #$0003
         STA   $D2
L042E6A  LDA   $DE
         CMP   #$000E
         BNE   L042EB7
         PEI   $F7
         JSL   L060C4E
         PLY
         STX   $E6
         STA   $E4
         LDY   #$0006
         LDA   [$E4],Y
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0008
         LDA   [$EC],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         STA   L030266
L042EB7  LDA   #$03E8
         STA   $C0
         BRL   L0433D0
L042EBF  LDA   $FF
         LDX   #$0000
         TAY
         BPL   L042EC8
         DEX
L042EC8  PHX
         PHA
         LDA   $FD
         LDX   #$0000
         TAY
         BPL   L042ED3
         DEX
L042ED3  STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         STA   $E2
         LDA   #$0005
         PHA
         LDA   $E2
         SEC
         JSL   L0222DF
         PLA
         STA   $E0
         CMP   #$0005
         BEQ   L042F1E
         BRL   L043144
L042F1E  LDA   $E2
         AND   #$0008
         TAY
         BNE   L042F29
         BRL   L0433D9
L042F29  PEI   $FF
         PEI   $FD
         JSL   L060CD1
         PLY
         PLY
         STX   $E6
         STA   $E4
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         CMP   #$0001
         BNE   L042F57
         LDA   $DE
         CMP   #$0004
         BEQ   L042F57
         BRL   L0433D9
L042F57  LDA   $D2
         CMP   #$0003
         BEQ   L042F77
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         AND   $D2
         TAY
         BNE   L042F77
         BRL   L0433D9
L042F77  LDY   #$0002
         LDA   [$E4],Y
         AND   #$001F
         CMP   $FD
         BNE   L042FA8
         LDY   #$0002
         LDA   [$E4],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$001F
         CMP   $FF
         BNE   L042FA8
         LDY   #$0004
         LDA   [$E4],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         CMP   $D8
         BEQ   L042FAD
L042FA8  LDA   #$0000
         BRA   L042FB0
L042FAD  LDA   #$0001
L042FB0  STA   $C8
         LDY   #$0002
         LDA   [$E4],Y
         AND   #$001F
         STA   $FD
         LDY   #$0002
         LDA   [$E4],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$001F
         STA   $FF
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         STA   $C4
         LDY   #$0004
         LDA   [$E4],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$00FF
         STA   $D8
         PHA
         JSL   L062325
         PLY
         LDA   $F7
         CMP   #$FFFF
         BEQ   L043002
         BRL   L04308C
L043002  LDA   $FD
         STA   L030040
         LDA   $FF
         STA   L030042
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L043038
         PEA   $0000
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0011
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L043038  LDA   $CA
         AND   L0301D2
         STA   $CA
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L043068
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         PHA
         JSL   L0A342A
         PLY
         BRA   L043089
L043068  LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         PHA
         LDA   L030044
         PLX
         STX   $F0
         CLC
         ADC   $F0
         AND   #$0003
         PHA
         JSL   L0A342A
         PLY
L043089  BRL   L04313A
L04308C  LDA   $DE
         CMP   #$0004
         BNE   L0430CF
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L0430BB
         PEA   $0001
         PEI   $FF
         PEI   $FD
         PEA   $0011
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L0430BB  PEI   $DA
         PEI   $F7
         PEI   $E6
         PEI   $E4
         JSL   L042650
         PLY
         PLY
         PLY
         PLY
         STA   $D0
         BRA   L04313A
L0430CF  LDA   $DE
         CMP   #$000E
         BNE   L0430E7
         PEI   $F7
         PEI   $E6
         PEI   $E4
         JSL   L0427CC
         PLY
         PLY
         PLY
         STA   $F7
         BRA   L04313A
L0430E7  LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BNE   L04313A
         LDA   $F9
         CMP   #$FFFE
         BEQ   L04313A
         LDA   #$000E
         PHA
         LDY   #$0002
         LDA   [$E4],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         AND   #$0003
         PHA
         LDA   #$000E
         PHA
         LDA   $F7
         CLC
         JSL   L0222DF
         PLA
         PLX
         STX   $F0
         CLC
         ADC   $F0
         AND   #$0003
         CLC
         JSL   L0222A8
         LDA   $F7
         AND   #$3FFF
         PLX
         STX   $F0
         ORA   $F0
         STA   $F7
L04313A  LDA   $C8
         BEQ   L043141
         BRL   L0433D9
L043141  BRL   L0433D0
L043144  LDA   $E0
         CMP   #$0002
         BEQ   L04314E
         BRL   L0432DF
L04314E  LDA   $DC
         BEQ   L043155
         BRL   L0432DF
L043155  LDA   $E2
         AND   #$0008
         TAY
         BNE   L043160
         BRL   L0432DF
L043160  LDA   $E2
         AND   #$0001
         TAY
         BEQ   L04316B
         BRL   L0432DF
L04316B  LDA   $CA
         BEQ   L043188
         LDA   L03026A
         BNE   L043188
         LDA   L0301D2
         STA   $CA
         PEI   $FF
         PEI   $FD
         LDA   L030044
         PHA
         JSL   L0C5AB9
         PLY
         PLY
         PLY
L043188  PEA   $0000
         TDC
         CLC
         ADC   #$00FF
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00FD
         PHA
         PEA   $0001
         PEI   $D8
         JSL   L060A6A
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   $D8
         PEI   $D8
         JSL   L062325
         PLY
         LDA   $F7
         CMP   #$FFFF
         BEQ   L0431BE
         BRL   L043276
L0431BE  LDA   $FD
         STA   L030040
         LDA   $FF
         STA   L030042
         LDA   L03003E
         CMP   #$0000
         BNE   L0431D3
         BRL   L043270
L0431D3  BCS   L0431D8
         BRL   L043270
L0431D8  LDA   L03026A
         BNE   L0431E0
         BRL   L043247
L0431E0  LDA   #$0000
         STA   $E0
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $EA
         STA   $E8
         BRA   L04323E
L0431F1  LDY   #$0034
         LDA   [$E8],Y
         BEQ   L043225
         PEI   $EA
         PEI   $E8
         JSL   L0A5F66
         PLY
         PLY
         PHA
         LDY   #$010F
         LDA   [$E8],Y
         PHA
         LDA   #$0019
         CLC
         JSL   L0220A5
         PLA
         CLC
         JSL   L021F1A
         PLY
         CLC
         ADC   #$0001
         PHA
         PEI   $E0
         JSL   L0A746A
         PLY
         PLY
L043225  LDA   $E0
         INC   $E0
         LDX   $EA
         LDA   $E8
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $E8
         LDA   $EA
         BCC   L04323A
         INC
L04323A  STA   $EA
         PLA
         PLX
L04323E  LDA   $E0
         CMP   L03003E
         BCC   L0431F1
         BRA   L043270
L043247  PEA   $0002
         PEA   $0030
         PEA   $0014
         JSL   L0A73EB
         PLY
         PLY
         PLY
         TAY
         BEQ   L043270
         PEA   $0000
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0006
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L043270  STZ   L03026A
         BRL   L0432DC
L043276  LDA   $DE
         CMP   #$0004
         BEQ   L043280
         BRL   L0432DC
L043280  PEI   $DA
         JSL   L062325
         PLY
         PEA   $0000
         PEA   $0014
         PEI   $FB
         PEI   $F9
         PEI   $F7
         JSL   L060C4E
         PLY
         PHX
         PHA
         JSL   L063A54
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   $C2
         PEI   $D8
         JSL   L062325
         PLY
         LDA   $C2
         CMP   #$0002
         BEQ   L0432BB
         LDA   #$0000
         BRA   L0432BE
L0432BB  LDA   #$0001
L0432BE  STA   $CC
         TAY
         BEQ   L0432C8
         BRL   L0433D9
         BRA   L0432DC
L0432C8  LDA   $C2
         CMP   #$0001
         BNE   L0432DC
         PEI   $FF
         PEI   $FD
         PEI   $F7
         JSL   L063366
         PLY
         PLY
         PLY
L0432DC  BRL   L0433D0
L0432DF  LDA   $E0
         CMP   #$0003
         BEQ   L0432E9
         BRL   L0433CE
L0432E9  LDA   $F7
         CMP   #$FFFF
         BNE   L0432F3
         BRL   L0433CE
L0432F3  LDA   $DE
         CMP   #$000E
         BNE   L0432FD
         BRL   L0433CE
L0432FD  LDA   $E2
         AND   #$0004
         TAY
         BNE   L043331
         PEA   $0000
         TDC
         CLC
         ADC   #$00FF
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00FD
         PHA
         PEA   $0001
         PEI   $D8
         JSL   L060A6A
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         STA   $D8
         PEI   $D8
         JSL   L062325
         PLY
L043331  PEI   $FF
         PEI   $FD
         JSL   L060BC2
         PLY
         PLY
         STA   $D6
         LDA   $D6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05045C
         LDX   #^L05045C
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $FD
         PLX
         STX   $F0
         CLC
         ADC   $F0
         STA   $FD
         LDA   $D6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050464
         LDX   #^L050464
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         PHA
         LDA   $FF
         PLX
         STX   $F0
         CLC
         ADC   $F0
         STA   $FF
         LDA   $D6
         CLC
         ADC   #$0002
         AND   #$0003
         STA   $D6
         LDA   #$000E
         PHA
         LDA   $F7
         CLC
         JSL   L0222DF
         PLA
         STA   $C2
         LDA   $C2
         SEC
         SBC   $D6
         CLC
         ADC   #$0001
         AND   #$0002
         LSR
         CLC
         ADC   $D6
         AND   #$0003
         STA   $C2
         LDA   #$000E
         PHA
         LDA   $C2
         CLC
         JSL   L0222A8
         LDA   $F7
         AND   #$3FFF
         PLX
         STX   $F0
         ORA   $F0
         STA   $F7
         BRA   L0433D0
L0433CE  BRA   L0433D9
L0433D0  DEC   $C0
         LDA   $C0
         BEQ   L0433D9
         BRL   L042EBF
L0433D9  LDA   $DE
         CMP   #$0004
         BEQ   L0433E3
         BRL   L043436
L0433E3  LDA   $CC
         BNE   L0433F4
         PEI   $D8
         PEI   $F7
         JSL   L060000
         PLY
         PLY
         TAY
         BNE   L043436
L0433F4  PEI   $FF
         PEI   $FD
         PEI   $F7
         JSL   L063366
         PLY
         PLY
         PLY
         PEA   $0002
         PEI   $F7
         PEI   $FF
         PEI   $FD
         JSL   L0633D1
         PLY
         PLY
         PLY
         PLY
         PEI   $DA
         JSL   L062325
         PLY
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L043424
         EOR   #$8000
L043424  BPL   L043430
         PEI   $FB
         PEI   $F9
         JSL   L063519
         PLY
         PLY
L043430  LDA   #$0001
         BRL   L043A16
L043436  LDA   $D8
         CMP   #$0002
         BNE   L043440
         BRL   L04351F
L043440  BCS   L043445
         BRL   L04351F
L043445  LDA   $FD
         AND   #$0007
         TAY
         BEQ   L043450
         BRL   L04351F
L043450  LDA   $FF
         AND   #$0003
         TAY
         BEQ   L04345B
         BRL   L04351F
L04345B  PEA   ^L0218D6
         PEA   L0218D6
         PEA   ^L0D15F7
         PEA   L0D15F7
         JSL   L074F1C
         PLY
         PLY
         PLY
         PLY
         CMP   #$9DCC
         BEQ   L043477
         BRL   L043511
L043477  PEA   ^L021972
         PEA   L021972
         PEA   ^L0210DC
         PEA   L0210DC
         JSL   L074F1C
         PLY
         PLY
         PLY
         PLY
         CMP   #$46F2
         BEQ   L043493
         BRL   L043511
L043493  PEA   ^L0219F0
         PEA   L0219F0
         PEA   ^L021385
         PEA   L021385
         JSL   L074F1C
         PLY
         PLY
         PLY
         PLY
         CMP   #$6B78
         BEQ   L0434AF
         BRL   L043511
L0434AF  PEA   ^L021966
         PEA   L021966
         PEA   ^L0D15F7
         PEA   L0D15F7
         JSL   L07503B
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0434C9
         BRL   L043511
L0434C9  PEA   ^L021A80
         PEA   L021A80
         PEA   ^L021385
         PEA   L021385
         JSL   L07503B
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0434E3
         BRL   L043511
L0434E3  PEA   ^L0219B6
         PEA   L0219B6
         PEA   ^L0210DC
         PEA   L0210DC
         JSL   L074FC4
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L043511
         PEA   ^L021AA4
         PEA   L021AA4
         PEA   ^L021385
         PEA   L021385
         JSL   L074FC4
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L04351F
L043511  LDA   $FD
         CLC
         ADC   $FF
         STA   $FD
         LDA   $FF
         SEC
         SBC   $FD
         STA   $FF
L04351F  LDA   $FD
         STA   L030260
         LDA   $FF
         STA   L030262
         LDA   $D8
         STA   L030264
         LDA   #$000E
         PHA
         LDA   $F7
         CLC
         JSL   L0222DF
         PLA
         STA   L030268
         LDA   L0303D3
         CMP   #$022B
         BEQ   L043558
         LDA   L0303D3
         CMP   #$022B
         BEQ   L043552
         LDA   #$0000
         BRA   L043555
L043552  LDA   #$0001
L043555  INC   L030066
L043558  LDA   $D8
         CMP   $DA
         BNE   L04356A
         LDA   $FD
         CMP   $F9
         BNE   L04356A
         LDA   $FF
         CMP   $FB
         BEQ   L04356F
L04356A  LDA   #$0000
         BRA   L043572
L04356F  LDA   #$0001
L043572  STA   $C6
         LDA   $C6
         BEQ   L0435A5
         LDA   $F7
         CMP   #$FFFF
         BNE   L04358E
         LDA   L030044
         CMP   $D6
         BNE   L04358C
         LDA   #$0000
         BRL   L043A16
L04358C  BRA   L0435A2
L04358E  LDA   L030268
         CMP   $D4
         BNE   L0435A2
         LDA   $DE
         CMP   #$000E
         BEQ   L0435A2
         LDA   #$0000
         BRL   L043A16
L0435A2  BRL   L0436FA
L0435A5  LDA   $F7
         CMP   #$FFFF
         BEQ   L0435AF
         BRL   L0436ED
L0435AF  LDA   L03003E
         BNE   L0435B7
         BRL   L0436ED
L0435B7  LDA   $E2
         STA   $C2
         LDAL  L05615A
         AND   #$00FF
         STA   $E2
L0435C4  LDA   $E2
         SEC
         SBC   #$0018
         BVS   L0435CF
         EOR   #$8000
L0435CF  BPL   L0435DD
         PEA   $0000
         JSL   L0A6766
         PLY
         DEC   $E2
         BRA   L0435C4
L0435DD  LDA   $E2
         BEQ   L0435FC
         LDX   L030050
         LDA   L03004E
         SEC
         SBC   L03000C
         PHA
         TXA
         SBC   L03000E
         TAX
         PEI   $FB
         PEI   $F9
         JSL   L0A6832
         PLY
         PLY
         PLY
L0435FC  LDX   L030050
         LDA   L03004E
         STX   L03000E
         STA   L03000C
         LDAL  L05615A
         PHA
         INC
         SEP   #$20
         STAL  L05615A
         REP   #$20
         PLA
         LDAL  L056153
         AND   #$00FF
         BEQ   L04362C
         LDAL  L05615A
         SEP   #$20
         STAL  L05615D
         REP   #$20
L04362C  LDA   $FD
         AND   #$001F
         PHA
         PHA
         LDA   $E2
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$FFE0
         STA   $F0
         PLA
         ORA   $F0
         STA   [$EC]
         PLA
         LDA   $FF
         AND   #$001F
         PHA
         PHA
         LDA   $E2
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$FC1F
         STA   $F0
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F0
         STA   [$EC]
         PLA
         LDA   $D8
         AND   #$003F
         PHA
         PHA
         LDA   $E2
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05615E
         LDX   #^L05615E
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$03FF
         STA   $F0
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F0
         STA   [$EC]
         PLA
         LDA   $E2
         LDX   #$0000
         PHX
         PHA
         LDA   #L05618E
         LDX   #^L05618E
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   #$0000
         SEP   #$20
         STA   [$EC]
         REP   #$20
         PEA   $8018
         PEI   $FF
         PEI   $FD
         JSL   L0A6832
         PLY
         PLY
         PLY
         LDA   $C2
         STA   $E2
L0436ED  LDA   $D8
         CMP   $DA
         BEQ   L0436FA
         PEI   $DA
         JSL   L062325
         PLY
L0436FA  LDA   $F9
         SEC
         SBC   #$0000
         BVS   L043705
         EOR   #$8000
L043705  BMI   L04370A
         BRL   L043770
L04370A  LDA   $F7
         CMP   #$FFFF
         BNE   L043728
         PEA   $0000
         PEI   $C6
         PEA   $FFFF
         PEI   $FB
         PEI   $F9
         JSL   L04452B
         PLY
         PLY
         PLY
         PLY
         PLY
         BRA   L043770
L043728  LDA   $DC
         BEQ   L04373F
         PEI   $FB
         PEI   $F9
         PEA   $0000
         PEI   $F7
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         BRA   L043770
L04373F  PEA   $0000
         LDA   L03008A
         CMP   L030046
         BNE   L043758
         LDA   $F9
         CMP   L030040
         BNE   L043758
         LDA   $FB
         CMP   L030042
         BEQ   L04375D
L043758  LDA   #$0000
         BRA   L043760
L04375D  LDA   #$0001
L043760  PHA
         PEI   $F7
         PEI   $FB
         PEI   $F9
         JSL   L04452B
         PLY
         PLY
         PLY
         PLY
         PLY
L043770  LDA   $FD
         SEC
         SBC   #$0000
         BVS   L04377B
         EOR   #$8000
L04377B  BMI   L043780
         BRL   L043A16
L043780  LDA   $F7
         CMP   #$FFFF
         BEQ   L04378A
         BRL   L0437F9
L04378A  PEI   $D8
         JSL   L062325
         PLY
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         JSL   L06260C
         PLY
         PLY
         STA   $F7
         CMP   #$FFFE
         BEQ   L0437C9
         PEA   $0001
         PEI   $F7
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         JSL   L0633D1
         PLY
         PLY
         PLY
         PLY
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         JSL   L063519
         PLY
         PLY
L0437C9  LDA   $D8
         CMP   $DA
         BNE   L0437EA
         PEA   $0001
         PEI   $C6
         PEA   $FFFF
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         JSL   L04452B
         PLY
         PLY
         PLY
         PLY
         PLY
         BRA   L0437F6
L0437EA  PEI   $DA
         JSL   L062325
         PLY
         LDA   $D8
         STA   L03001E
L0437F6  BRL   L043A16
L0437F9  LDA   $DE
         CMP   #$0004
         BEQ   L043803
         BRL   L0439BD
L043803  PEI   $D8
         JSL   L062325
         PLY
         PEI   $F7
         JSL   L060C4E
         PLY
         STX   $E6
         STA   $E4
         LDY   #$0005
         LDA   [$E4],Y
         AND   #$00FF
         STA   $E2
         LDA   L030046
         CMP   $D8
         BNE   L043834
         LDA   $FD
         CMP   L030040
         BNE   L043834
         LDA   $FF
         CMP   L030042
         BEQ   L043843
L043834  PEI   $FF
         PEI   $FD
         JSL   L06260C
         PLY
         PLY
         CMP   #$FFFE
         BEQ   L043885
L043843  PEI   $DA
         JSL   L062325
         PLY
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L043855
         EOR   #$8000
L043855  BPL   L043861
         PEI   $FB
         PEI   $F9
         JSL   L062C24
         PLY
         PLY
L043861  LDA   $CE
         BEQ   L04386C
         PEI   $E2
         JSL   L062E9D
         PLY
L04386C  PEI   $C4
         PEI   $D8
         PEI   $FF
         PEI   $FD
         PEI   $F7
         JSL   L042891
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   #$0001
         BRL   L043A16
L043885  LDA   $F7
         AND   #$03FF
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDAL  L0510B9
         TAX
         LDAL  L0510B7
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0004
         LDA   [$EC],Y
         AND   #$00FF
         PHA
         JSL   L043A20
         PLY
         STA   $BE
         LDA   $BE
         CMP   #$0022
         BCS   L0438DA
         PEA   $0001
         PEI   $FF
         PEI   $FD
         PEI   $BE
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L0438DA  LDA   $CE
         BEQ   L0438F3
         LDA   L030046
         CMP   $D8
         BEQ   L0438F3
         PEI   $E2
         JSL   L062E9D
         PLY
         LDA   #$0001
         STA   $D0
         BRA   L043910
L0438F3  LDA   L030046
         CMP   $D8
         BNE   L043910
         LDA   $CE
         BNE   L043910
         PEI   $FF
         PEI   $FD
         PEI   $F7
         JSL   L062D0D
         PLY
         PLY
         PLY
         LDA   #$0001
         STA   $D0
L043910  LDA   $DC
         BEQ   L043927
         PEI   $FF
         PEI   $FD
         PEA   $0000
         PEI   $F7
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         BRA   L04393C
L043927  PEA   $0001
         PEA   $0000
         PEI   $F7
         PEI   $FF
         PEI   $FD
         JSL   L04452B
         PLY
         PLY
         PLY
         PLY
         PLY
L04393C  LDA   $D0
         BNE   L04394D
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L04394B
         EOR   #$8000
L04394B  BMI   L043957
L04394D  PEI   $FF
         PEI   $FD
         JSL   L062B33
         PLY
         PLY
L043957  PEI   $DA
         JSL   L062325
         PLY
         LDA   $F9
         SEC
         SBC   #$0000
         BVS   L043969
         EOR   #$8000
L043969  BPL   L0439B5
         LDA   $D0
         CMP   #$0001
         BEQ   L0439A7
         BCC   L0439A7
         PEI   $FB
         PEI   $F9
         LDA   $D0
         SEC
         SBC   #$0002
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L030108
         LDA   L030106
         JSL   L021F00
         JSL   L062CB3
         PLY
         PLY
         PLY
         PLY
         BRA   L0439B5
L0439A7  LDA   $D0
         BEQ   L0439B5
         PEI   $FB
         PEI   $F9
         JSL   L062C24
         PLY
         PLY
L0439B5  LDA   $D0
         BRL   L043A16
         BRL   L043A16
L0439BD  PEI   $D8
         JSL   L062325
         PLY
         LDA   $DE
         CMP   #$000E
         BNE   L0439DE
         PEI   $FF
         PEI   $FD
         PEA   $0000
         PEI   $F7
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         BRA   L043A0F
L0439DE  PEA   $0001
         LDA   L03008A
         CMP   L030046
         BNE   L0439F7
         LDA   $FD
         CMP   L030040
         BNE   L0439F7
         LDA   $FF
         CMP   L030042
         BEQ   L0439FC
L0439F7  LDA   #$0000
         BRA   L0439FF
L0439FC  LDA   #$0001
L0439FF  PHA
         PEI   $F7
         PEI   $FF
         PEI   $FD
         JSL   L04452B
         PLY
         PLY
         PLY
         PLY
         PLY
L043A0F  PEI   $DA
         JSL   L062325
         PLY
L043A16  TAY
         TSC
         CLC
         ADC   #$0034
         TCS
         TYA
         PLD
         RTL

L043A20  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         LDA   L030034
         BEQ   L043A36
         LDA   #$0023
         BRL   L043ACE
L043A36  LDA   $FF
         AND   #$00FF
         BRL   L043AC1
L043A3E  LDA   #$0023
         BRL   L043ACE
         BRL   L043ACE
L043A47  LDA   #$0018
         BRL   L043ACE
         BRL   L043ACE
L043A50  LDA   #$001A
         BRL   L043ACE
         BRL   L043ACE
L043A59  LDA   #$0020
         BRL   L043ACE
         BRL   L043ACE
L043A62  LDA   #$0021
         BRL   L043ACE
         BRL   L043ACE
L043A6B  LDA   #$0016
         BRL   L043ACE
         BRL   L043ACE
L043A74  LDA   #$001B
         BRL   L043ACE
         BRL   L043ACE
L043A7D  LDA   #$0017
         BRL   L043ACE
         BRL   L043ACE
L043A86  BRL   L043ACE
L043A89  DA    L043A50
         DA    L043A74
         DA    L043A47
         DA    L043A3E
         DA    L043A50
         DA    L043A50
         DA    L043A50
         DA    L043A50
         DA    L043A3E
         DA    L043A47
         DA    L043A47
         DA    L043A3E
         DA    L043A62
         DA    L043A7D
         DA    L043A47
         DA    L043A50
         DA    L043A47
         DA    L043A7D
         DA    L043A6B
         DA    L043A3E
         DA    L043A74
         DA    L043A50
         DA    L043A47
         DA    L043A3E
         DA    L043A59
         DA    L043A3E
         DA    L043A3E
         DA    L043A86
L043AC1  CMP   #$001B
         BCC   L043AC9
         LDA   #$001B
L043AC9  ASL
         TAX
         JMP   (L043A89,X)

L043ACE  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L043AD8  ENT
         PHD
         TSC
         SEC
         SBC   #$00ED
         TCD
         ADC   #$00D6
         TCS
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L03008A
         LDX   #$0000
         TAY
         BPL   L043AF5
         DEX
L043AF5  SEC
         JSL   L0222B8
         LDX   $FF
         LDA   $FD
         JSL   L021F9F
         PLA
         PLX
         STX   $DA
         STA   $D8
         LDA   $F3
         SEP   #$20
         STA   $DC
         REP   #$20
         LDA   #$0000
         SEP   #$20
         STA   $DD
         REP   #$20
         LDA   $F5
         SEP   #$20
         STA   $DE
         REP   #$20
         LDA   $F7
         SEP   #$20
         STA   $DF
         REP   #$20
         LDA   $F9
         SEP   #$20
         STA   $E0
         REP   #$20
         LDA   $FB
         SEP   #$20
         STA   $E1
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00D8
         PHA
         JSL   L044ED1
         PLY
         PLY
         TSC
         CLC
         ADC   #$0016
         TCS
         PLD
         RTL

L043B50  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E8
         TCS
         LDA   $FF
         BEQ   L043B78
         LDA   L03024E
         CMP   #$FFFF
         BEQ   L043B76
         PEI   $FD
         PEI   $FB
         LDA   L03024E
         PHA
         JSL   L0A57C4
         PLY
         PLY
         PLY
L043B76  BRA   L043BCB
L043B78  LDA   L03003E
         PHA
         LDA   $FD
         CLC
         JSL   L021F1A
         PLY
         STA   $FD
         LDA   #$0000
         STA   $EE
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $EC
         STA   $EA
         BRA   L043BC4
L043B97  LDY   #$0034
         LDA   [$EA],Y
         BEQ   L043BAB
         PEI   $FD
         PEI   $FB
         PEI   $EE
         JSL   L0A57C4
         PLY
         PLY
         PLY
L043BAB  LDA   $EE
         INC   $EE
         LDX   $EC
         LDA   $EA
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $EA
         LDA   $EC
         BCC   L043BC0
         INC
L043BC0  STA   $EC
         PLA
         PLX
L043BC4  LDA   $EE
         CMP   L03003E
         BCC   L043B97
L043BCB  TSC
         CLC
         ADC   #$000C
         TCS
         PLD
         RTL

L043BD3  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EC
         TCS
         LDA   $F9
         CMP   #$000A
         BNE   L043C04
         LDA   $FF
         CMP   #$FFFF
         BNE   L043BF1
         LDA   #$0000
         BRA   L043BF4
L043BF1  LDA   #$0001
L043BF4  PHA
         PEA   $012C
         PEA   $0008
         JSL   L043B50
         PLY
         PLY
         PLY
         BRA   L043C18
L043C04  LDA   $F9
         STA   L03025E
         LDA   $FB
         STA   L03026C
         LDA   $FD
         STA   L03026E
         LDA   $FF
         STA   L030270
L043C18  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L043C22  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00E8
         TCS
         LDA   L03025E
         CMP   #$FFFF
         BNE   L043C38
         BRL   L043D85
L043C38  LDA   L03025E
         BRL   L043D71
L043C3E  LDA   L03026E
         PHA
         LDA   L03026C
         PHA
         JSL   L060E4D
         PLY
         PLY
         STA   $F4
L043C4E  LDA   #$000A
         PHA
         LDA   $F4
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BNE   L043C7F
         LDA   L030270
         CMP   #$FFFF
         BEQ   L043C8A
         LDA   #$000E
         PHA
         LDA   $F4
         CLC
         JSL   L0222DF
         LDA   L030270
         PLX
         STX   $F6
         CMP   $F6
         BEQ   L043C8A
L043C7F  PEI   $F4
         JSL   L060D39
         PLY
         STA   $F4
         BRA   L043C4E
L043C8A  PEI   $F4
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDA   [$EE]
         STA   $F2
L043C99  LDA   $F2
         CMP   #$FFFE
         BEQ   L043CDC
         LDA   #$000A
         PHA
         LDA   $F2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BNE   L043CD1
         LDA   L030270
         CMP   #$FFFF
         BEQ   L043CDC
         LDA   #$000E
         PHA
         LDA   $F2
         CLC
         JSL   L0222DF
         LDA   L030270
         PLX
         STX   $F6
         CMP   $F6
         BEQ   L043CDC
L043CD1  PEI   $F2
         JSL   L060D39
         PLY
         STA   $F2
         BRA   L043C99
L043CDC  LDA   $F2
         CMP   #$FFFE
         BNE   L043CE6
         BRL   L043D7F
L043CE6  LDA   L03026E
         PHA
         LDA   L03026C
         PHA
         PEA   $0000
         PEI   $F4
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         PEI   $F2
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         PEI   $F2
         JSL   L060D39
         PLY
         STA   $F2
L043D0F  LDA   $F2
         CMP   #$FFFE
         BEQ   L043D5D
         LDA   #$000A
         PHA
         LDA   $F2
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BNE   L043D5D
         LDA   L030270
         CMP   #$FFFF
         BEQ   L043D47
         LDA   #$000E
         PHA
         LDA   $F2
         CLC
         JSL   L0222DF
         LDA   L030270
         PLX
         STX   $F6
         CMP   $F6
         BNE   L043D52
L043D47  PEI   $F2
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
L043D52  PEI   $F2
         JSL   L060D39
         PLY
         STA   $F2
         BRA   L043D0F
L043D5D  LDA   [$EA]
         STA   [$EE]
         LDA   $F4
         STA   [$EA]
         BRL   L043D7F
L043D68  BRL   L043D7F
L043D6B  DA    L043C3E
         DA    L043C3E
         DA    L043D68
L043D71  DEC
         CMP   #$0002
         BCC   L043D7A
         LDA   #$0002
L043D7A  ASL
         TAX
         JMP   (L043D6B,X)

L043D7F  LDA   #$FFFF
         STA   L03025E
L043D85  TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         PLD
         RTL

L043D8F  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00DC
         TCS
         LDY   #$0004
         LDA   [$F5],Y
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L043DB4
         LDY   #$0002
         LDA   [$F5],Y
         AND   #$FF80
         LDY   #$0002
         STA   [$F5],Y
L043DB4  LDY   #$0004
         LDA   [$F5],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         LDX   #$0000
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         JSL   L021F00
         PLA
         PLX
         STX   $E4
         STA   $E2
         LDY   #$0004
         LDA   [$F5],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L043E08
         PEI   $FF
         PEI   $FD
         PEI   $FB
         LDY   #$0006
         LDA   [$F5],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$0FFF
         PHA
         JSL   L043BD3
         PLY
         PLY
         PLY
         PLY
         BRL   L043ECA
L043E08  LDY   #$0006
         LDA   [$F5],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$001F
         STA   $E8
         LDY   #$0006
         LDA   [$F5],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         AND   #$001F
         STA   $E6
         LDA   #$0005
         PHA
         LDA   $E6
         LDX   #$0000
         TAY
         BPL   L043E36
         DEX
L043E36  PHX
         PHA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L043E41
         DEX
L043E41  STX   $EE
         ASL
         ROL   $EE
         ASL
         ROL   $EE
         LDX   $EE
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $EA
         STX   $EC
         LDY   #$0002
         LDA   [$EA],Y
         TAX
         LDA   [$EA]
         JSL   L021F00
         PLA
         PLX
         STA   $EA
         STX   $EC
         LDA   [$EA]
         AND   #$00FF
         SEC
         JSL   L0222DF
         PLA
         STA   $E0
         LDA   $E0
         CMP   #$0000
         BNE   L043E93
         LDY   #$0006
         LDA   [$F5],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         STA   $DE
         BRA   L043E95
L043E93  STZ   $DE
L043E95  PEI   $E4
         PEI   $E2
         PEI   $F9
         PEI   $DE
         PEI   $E6
         PEI   $E8
         LDA   $E0
         LDX   #$0000
         PHX
         PHA
         LDA   #L058858
         LDX   #^L058858
         JSL   L021F00
         PLA
         PLX
         STA   $EA
         STX   $EC
         LDA   [$EA]
         AND   #$00FF
         PHA
         JSL   L043AD8
         TAY
         TSC
         CLC
         ADC   #$000E
         TCS
         TYA
L043ECA  TSC
         CLC
         ADC   #$0012
         TCS
         PLD
         RTL

L043ED2  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         PEI   $FB
         PEI   $F9
         JSL   L060E9E
         PLY
         PLY
         STA   $EC
L043EE9  LDA   $EC
         CMP   #$FFFE
         BEQ   L043F25
         PEI   $EC
         JSL   L020ADF
         PLY
         CMP   $FF
         BNE   L043F1A
         LDA   $FD
         CMP   #$FFFF
         BEQ   L043F16
         LDA   #$000E
         PHA
         LDA   $EC
         CLC
         JSL   L0222DF
         LDA   $FD
         PLX
         STX   $EE
         CMP   $EE
         BNE   L043F1A
L043F16  LDA   $EC
         BRA   L043F28
L043F1A  PEI   $EC
         JSL   L060D39
         PLY
         STA   $EC
         BRA   L043EE9
L043F25  LDA   #$FFFF
L043F28  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L043F32  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00DC
         TCS
         STZ   $E2
         LDA   #$0000
         STA   $EA
         LDA   #L0554D4
         LDX   #^L0554D4
         STX   $F2
         STA   $F0
         BRL   L044003
L043F51  LDY   #$0034
         LDA   [$F0],Y
         BNE   L043F5B
         BRL   L043FEA
L043F5B  LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L043F66
         INX
L043F66  STX   $EE
         STA   $EC
         STZ   $E8
         BRL   L043FDF
L043F6F  LDX   $EE
         LDA   $EC
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EC
         LDA   $EE
         BCC   L043F80
         INC
L043F80  STA   $EE
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         STA   $E6
L043F8C  PEI   $E6
         JSL   L020ADF
         PLY
         STA   $E4
         CMP   $FF
         BNE   L043FA1
         LDA   #$0001
         BRL   L044022
         BRA   L043FDD
L043FA1  LDA   $E4
         CMP   #$0090
         BNE   L043FDD
         PEI   $E6
         JSL   L060C4E
         PLY
         STX   $E0
         STA   $DE
         LDY   #$0002
         LDA   [$DE],Y
         STA   $E6
L043FBA  LDA   $E6
         CMP   #$FFFE
         BEQ   L043FDD
         PEI   $E6
         JSL   L020ADF
         PLY
         CMP   $FF
         BNE   L043FD2
         LDA   #$0001
         BRL   L044022
L043FD2  PEI   $E6
         JSL   L060D39
         PLY
         STA   $E6
         BRA   L043FBA
L043FDD  INC   $E8
L043FDF  LDA   $E8
         CMP   #$001E
         BCS   L043FEA
         LDA   $E2
         BEQ   L043F6F
L043FEA  LDA   $EA
         INC   $EA
         LDX   $F2
         LDA   $F0
         PHX
         PHA
         CLC
         ADC   #$031F
         STA   $F0
         LDA   $F2
         BCC   L043FFF
         INC
L043FFF  STA   $F2
         PLA
         PLX
L044003  LDA   $EA
         CMP   L03003E
         BCS   L04400D
         BRL   L043F51
L04400D  LDA   $E2
         BNE   L04401F
         LDA   #$0001
         STA   $E2
         LDAL  L056301
         STA   $E6
         BRL   L043F8C
L04401F  LDA   #$0000
L044022  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L04402C  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00C2
         TCS
         STZ   $D8
         LDAL  L056301
         STA   $CE
         STZ   $E6
         BRA   L044064
L044043  LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   #$0000
         STA   [$F0]
         INC   $E6
L044064  LDA   $E6
         CMP   #$0004
         BCC   L044043
         PEI   $FD
         PEI   $FB
         JSL   L060E4D
         PLY
         PLY
         STA   $EE
         STA   $C8
L044079  LDA   $EE
         CMP   #$FFFE
         BEQ   L0440D7
         LDA   #$000A
         PHA
         LDA   $EE
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E8
         CMP   #$0003
         BNE   L0440C3
         LDA   #$000E
         PHA
         LDA   $EE
         CLC
         JSL   L0222DF
         PLA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         PHA
         INC
         STA   [$F0]
         PLA
         BRA   L0440CC
L0440C3  LDA   $E8
         CMP   #$0004
         BCC   L0440CC
         BRA   L0440D7
L0440CC  PEI   $EE
         JSL   L060D39
         PLY
         STA   $EE
         BRA   L044079
L0440D7  LDA   $C8
         STA   $EE
         STA   $CA
L0440DD  LDA   $EE
         CMP   #$FFFE
         BNE   L0440E7
         BRL   L04451B
L0440E7  LDA   #$000A
         PHA
         LDA   $EE
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E8
         CMP   #$0003
         BEQ   L044100
         BRL   L044502
L044100  LDA   #$000E
         PHA
         LDA   $EE
         CLC
         JSL   L0222DF
         PLA
         STA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         PHA
         DEC
         STA   [$F0]
         PLA
         PEI   $EE
         JSL   L060C4E
         PLY
         STX   $E4
         STA   $E2
         LDY   #$0002
         LDA   [$E2],Y
         AND   #$007F
         STA   $DC
         CMP   #$0000
         BNE   L04414A
         BRL   L04450B
L04414A  LDA   L03024E
         CMP   #$FFFF
         BNE   L04415C
         LDA   $DC
         CMP   #$007F
         BEQ   L04415C
         BRL   L04450B
L04415C  LDA   $E6
         CMP   $FF
         BEQ   L044165
         BRL   L04450B
L044165  LDY   #$0002
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $DA
         LDY   #$0004
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         AND   #$0003
         STA   $DE
         LDA   $DC
         BRL   L0443F4
L044185  STZ   $E0
         LDY   #$0004
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         AND   #$0003
         CMP   #$0003
         BNE   L04419A
         BRL   L04450B
L04419A  BRL   L044444
L04419D  LDY   #$0004
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         CMP   L030254
         BNE   L0441B4
         LDA   #$0000
         BRA   L0441B7
L0441B4  LDA   #$0001
L0441B7  STA   $E0
         BRL   L044444
L0441BC  LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         BEQ   L0441DD
         BRL   L04450B
L0441DD  PEI   $CE
         JSL   L020ADF
         PLY
         CMP   $DA
         BEQ   L0441ED
         LDA   #$0000
         BRA   L0441F0
L0441ED  LDA   #$0001
L0441F0  PHA
         LDY   #$0004
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         PLX
         STX   $F0
         CMP   $F0
         BEQ   L04420A
         LDA   #$0000
         BRA   L04420D
L04420A  LDA   #$0001
L04420D  STA   $E0
         LDA   $E0
         BNE   L04423B
         LDA   $DC
         CMP   #$0011
         BNE   L04423B
         LDA   $CA
         CMP   $EE
         BNE   L044223
         BRL   L044444
L044223  PEI   $CA
         JSL   L060C4E
         PLY
         STX   $C6
         STA   $C4
         LDA   [$E2]
         STA   [$C4]
         LDA   #$FFFF
         STA   [$E2]
         LDA   $CA
         STA   $EE
L04423B  LDA   $E0
         BNE   L044257
         LDA   $DC
         CMP   #$000B
         BNE   L044257
         PEI   $E6
         PEI   $FD
         PEI   $FB
         PEA   $0002
         JSL   L043BD3
         PLY
         PLY
         PLY
         PLY
L044257  BRL   L044444
L04425A  LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         BEQ   L04427B
         BRL   L04450B
L04427B  LDA   L030254
         BEQ   L044285
         LDA   #$0000
         BRA   L044288
L044285  LDA   #$0001
L044288  STA   $E0
         LDA   $E0
         BNE   L04429F
         PEI   $E6
         PEI   $FD
         PEI   $FB
         PEA   $0002
         JSL   L043BD3
         PLY
         PLY
         PLY
         PLY
L04429F  BRL   L044444
L0442A2  LDA   L030254
         BEQ   L0442DF
         PEI   $DA
         PEI   $E6
         PEI   $FD
         PEI   $FB
         JSL   L043ED2
         PLY
         PLY
         PLY
         PLY
         STA   $CE
         CMP   #$FFFF
         BNE   L0442C1
         BRL   L04450B
L0442C1  PEI   $FD
         PEI   $FB
         PEA   $0000
         PEI   $CE
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         PEA   $0001
         PEI   $CE
         JSL   L0A49CF
         PLY
         PLY
         BRA   L044330
L0442DF  PEI   $CE
         JSL   L020ADF
         PLY
         CMP   $DA
         BNE   L0442FF
         PEI   $DA
         PEI   $E6
         PEI   $FD
         PEI   $FB
         JSL   L043ED2
         PLY
         PLY
         PLY
         PLY
         CMP   #$FFFF
         BEQ   L044302
L0442FF  BRL   L04450B
L044302  JSL   L0A4ABD
         PEI   $FD
         PEI   $FB
         PEA   $0000
         LDA   #$000E
         PHA
         LDA   $E6
         CLC
         JSL   L0222A8
         LDA   $CE
         AND   #$3FFF
         PLX
         STX   $F4
         ORA   $F4
         PHA
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         LDA   #$FFFF
         STA   $CE
L044330  PEI   $E6
         PEI   $FD
         PEI   $FB
         PEA   $0002
         JSL   L043BD3
         PLY
         PLY
         PLY
         PLY
         LDA   $DE
         CMP   #$0003
         BNE   L044354
         LDA   L030254
         BNE   L044354
         LDA   #$0001
         STA   $E0
         BRA   L044356
L044354  STZ   $E0
L044356  BRL   L044444
L044359  LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00D0
         JSL   L021F00
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDA   [$F0]
         BEQ   L04437A
         BRL   L04450B
L04437A  PEI   $FD
         PEI   $FB
         JSL   L060E9E
         PLY
         PLY
         STA   $CC
         PEI   $CE
         JSL   L020ADF
         PLY
         CMP   $DA
         BNE   L044398
         LDA   $CC
         CMP   #$FFFF
         BNE   L04439B
L044398  BRL   L04450B
L04439B  PEI   $FD
         PEI   $FB
         PEA   $0000
         PEI   $CC
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         JSL   L0A4ABD
         PEI   $FD
         PEI   $FB
         PEA   $0000
         LDA   #$000E
         PHA
         LDA   $E6
         CLC
         JSL   L0222A8
         LDA   $CE
         AND   #$3FFF
         PLX
         STX   $F4
         ORA   $F4
         PHA
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
         PEA   $0001
         PEI   $CC
         JSL   L0A49CF
         PLY
         PLY
         STZ   $E0
         BRL   L044444
L0443E5  PEI   $DA
         JSL   L0A223C
         PLY
         BRL   L04450B
L0443EF  BRL   L04450B
         BRA   L044444
L0443F4  CMP   #$0001
         BNE   L0443FC
         BRL   L044185
L0443FC  CMP   #$0002
         BNE   L044404
         BRL   L04419D
L044404  CMP   #$0003
         BNE   L04440C
         BRL   L0441DD
L04440C  CMP   #$0004
         BNE   L044414
         BRL   L0441DD
L044414  CMP   #$000B
         BNE   L04441C
         BRL   L0441BC
L04441C  CMP   #$000C
         BNE   L044424
         BRL   L04425A
L044424  CMP   #$000D
         BNE   L04442C
         BRL   L0442A2
L04442C  CMP   #$0010
         BNE   L044434
         BRL   L044359
L044434  CMP   #$0011
         BNE   L04443C
         BRL   L0441BC
L04443C  CMP   #$007F
         BEQ   L0443E5
         JMP   L0443EF

L044444  LDA   $DE
         CMP   #$0003
         BNE   L04445B
         LDA   $E0
         BEQ   L044454
         LDA   #$0001
         BRA   L044457
L044454  LDA   #$0000
L044457  STA   $DE
         STZ   $E0
L04445B  LDA   $E0
         BEQ   L044462
         BRL   L044500
L044462  LDA   #$0001
         STA   $D8
         LDY   #$0004
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L04448E
         PEA   $0001
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0001
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L04448E  LDA   L030254
         BNE   L0444C3
         LDA   $DC
         CMP   #$0004
         BEQ   L0444A8
         LDA   $DC
         CMP   #$000B
         BEQ   L0444A8
         LDA   $DC
         CMP   #$0011
         BNE   L0444C3
L0444A8  PEI   $CE
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDA   #$FFFF
         STA   [$EA]
         JSL   L0A4ABD
         LDA   #$FFFF
         STA   $CE
         BRA   L0444E8
L0444C3  LDA   L030254
         BEQ   L0444E8
         LDA   $DC
         CMP   #$000C
         BNE   L0444E8
         PEI   $DA
         JSL   L0618A0
         PLY
         STA   $CE
         CMP   #$FFFF
         BEQ   L0444E8
         PEA   $0001
         PEI   $CE
         JSL   L0A49CF
         PLY
         PLY
L0444E8  PEI   $E6
         PEI   $FD
         PEI   $FB
         PEI   $DE
         PEI   $E4
         PEI   $E2
         JSL   L043D8F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L044500  BRA   L04450B
L044502  LDA   $E8
         CMP   #$0004
         BCC   L04450B
         BRA   L04451B
L04450B  LDA   $EE
         STA   $CA
         PEI   $EE
         JSL   L060D39
         PLY
         STA   $EE
         BRL   L0440DD
L04451B  JSL   L043C22
         LDA   $D8
         TAY
         TSC
         CLC
         ADC   #$0032
         TCS
         TYA
         PLD
         RTL

L04452B  ENT
         PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00CC
         TCS
         LDA   $FB
         CMP   #$FFFF
         BEQ   L044559
         LDA   #$000A
         PHA
         LDA   $FB
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E6
         PEI   $FB
         JSL   L020ADF
         PLY
         STA   $DA
         BRA   L044563
L044559  LDA   #$FFFF
         STA   $E6
         LDA   #$FFFF
         STA   $DA
L044563  LDA   $FF
         BNE   L04457F
         LDA   $E6
         CMP   #$FFFF
         BEQ   L04457F
         PEI   $F9
         PEI   $F7
         PEA   $0000
         PEI   $FB
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
L04457F  LDA   $F9
         LDX   #$0000
         PHX
         PHA
         LDA   $F7
         LDX   #$0000
         STX   $F0
         ASL
         ROL   $F0
         ASL
         ROL   $F0
         LDX   $F0
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDY   #$0002
         LDA   [$EC],Y
         TAX
         LDA   [$EC]
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         STA   $D4
         LSR
         LSR
         LSR
         LSR
         LSR
         CMP   #$0000
         BNE   L0445DA
         LDA   #$000E
         PHA
         LDA   $FB
         CLC
         JSL   L0222DF
         PLA
         STA   $EA
         BRA   L0445DF
L0445DA  LDA   #$FFFF
         STA   $EA
L0445DF  LDA   #$0000
         STA   $D6
         STA   $D8
         STA   $DC
         STA   $DE
         PEI   $F9
         PEI   $F7
         JSL   L060E4D
         PLY
         PLY
         STA   $E8
         LDA   $EA
         CMP   #$FFFF
         BEQ   L044600
         BRL   L0446C1
L044600  LDA   $E8
         CMP   #$FFFE
         BNE   L04460A
         BRL   L0446BE
L04460A  LDA   #$000A
         PHA
         LDA   $E8
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E4
         CMP   #$0004
         BNE   L044628
         LDA   #$0001
         STA   $DC
         BRL   L0446B2
L044628  LDA   $E4
         CMP   #$0002
         BNE   L044663
         LDA   $E6
         CMP   #$FFFF
         BNE   L044663
         LDA   $FF
         BEQ   L044663
         LDA   $FD
         BNE   L044663
         PEA   $0001
         PEI   $E8
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L0619C4
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0589AB
         PEA   L0589AB
         PEA   $000F
         JSL   L0842BE
         PLY
         PLY
         PLY
         BRA   L0446B2
L044663  LDA   $E4
         CMP   #$0004
         BEQ   L0446B2
         BCC   L0446B2
         LDA   $E4
         CMP   #$000E
         BCS   L0446B2
         LDA   #$0001
         STA   $DE
         PEI   $E8
         JSL   L020ADF
         PLY
         CMP   $DA
         BEQ   L044688
         LDA   #$0000
         BRA   L04468B
L044688  LDA   #$0001
L04468B  PHA
         LDA   $D8
         PLX
         STX   $F0
         ORA   $F0
         STA   $D8
         PEI   $E8
         JSL   L020ADF
         PLY
         CMP   $DA
         BNE   L0446A5
         LDA   #$0000
         BRA   L0446A8
L0446A5  LDA   #$0001
L0446A8  PHA
         LDA   $D6
         PLX
         STX   $F0
         ORA   $F0
         STA   $D6
L0446B2  PEI   $E8
         JSL   L060D39
         PLY
         STA   $E8
         BRL   L044600
L0446BE  BRL   L04473B
L0446C1  LDA   $E8
         CMP   #$FFFE
         BNE   L0446CB
         BRL   L04473B
L0446CB  LDA   #$000E
         PHA
         LDA   $E8
         CLC
         JSL   L0222DF
         PLA
         CMP   $EA
         BNE   L044730
         LDA   #$000A
         PHA
         LDA   $E8
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0004
         BEQ   L044730
         BCC   L044730
         LDA   #$0001
         STA   $DE
         PEI   $E8
         JSL   L020ADF
         PLY
         CMP   $DA
         BEQ   L044706
         LDA   #$0000
         BRA   L044709
L044706  LDA   #$0001
L044709  PHA
         LDA   $D8
         PLX
         STX   $F0
         ORA   $F0
         STA   $D8
         PEI   $E8
         JSL   L020ADF
         PLY
         CMP   $DA
         BNE   L044723
         LDA   #$0000
         BRA   L044726
L044723  LDA   #$0001
L044726  PHA
         LDA   $D6
         PLX
         STX   $F0
         ORA   $F0
         STA   $D6
L044730  PEI   $E8
         JSL   L060D39
         PLY
         STA   $E8
         BRA   L0446C1
L04473B  LDA   $FF
         BEQ   L044757
         LDA   $E6
         CMP   #$FFFF
         BEQ   L044757
         PEI   $F9
         PEI   $F7
         PEA   $0000
         PEI   $FB
         JSL   L060EE7
         PLY
         PLY
         PLY
         PLY
L044757  PEI   $F9
         PEI   $F7
         JSL   L060E4D
         PLY
         PLY
         STA   $E8
L044763  LDA   $E8
         CMP   #$FFFE
         BNE   L04476D
         BRL   L044A19
L04476D  LDA   #$000A
         PHA
         LDA   $E8
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E4
         CMP   #$0003
         BEQ   L044786
         BRL   L044A04
L044786  PEI   $E8
         JSL   L060C4E
         PLY
         STX   $E2
         STA   $E0
         LDY   #$0002
         LDA   [$E0],Y
         AND   #$007F
         CMP   #$0000
         BNE   L0447A1
         BRL   L044A0D
L0447A1  LDY   #$0002
         LDA   [$E0],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $CE
         LDA   $FF
         STA   $D2
         LDA   $EA
         CMP   #$FFFF
         BEQ   L0447BD
         BRL   L0448F9
L0447BD  LDY   #$0002
         LDA   [$E0],Y
         AND   #$007F
         BRL   L0448E8
L0447C8  LDA   $FD
         BNE   L0447D4
         LDA   $DE
         BNE   L0447D4
         LDA   $DC
         BEQ   L0447D7
L0447D4  BRL   L044A0D
L0447D7  BRL   L0448F6
L0447DA  LDA   $E6
         SEC
         SBC   #$0004
         BEQ   L0447E9
         BVS   L0447E7
         EOR   #$8000
L0447E7  BMI   L0447F1
L0447E9  LDA   $FD
         BNE   L0447F1
         LDA   $DC
         BEQ   L0447F4
L0447F1  BRL   L044A0D
L0447F4  BRL   L0448F6
L0447F7  LDA   $E6
         CMP   #$FFFF
         BNE   L044806
         LDA   L03003E
         CMP   #$0000
         BNE   L044809
L044806  BRL   L044A0D
L044809  LDA   $CE
         CMP   #$0000
         BNE   L044819
         LDA   $FD
         BEQ   L044817
         BRL   L044A0D
L044817  BRA   L044836
L044819  LDA   $FF
         BNE   L044821
         STZ   $D2
         BRA   L044836
L044821  LDA   L030044
         CLC
         ADC   #$0001
         CMP   $CE
         BEQ   L044831
         LDA   #$0000
         BRA   L044834
L044831  LDA   #$0001
L044834  STA   $D2
L044836  BRL   L0448F6
L044839  PEI   $FB
         JSL   L020ADF
         PLY
         CMP   $CE
         BNE   L044848
         LDA   $D8
         BEQ   L04484B
L044848  BRL   L044A0D
L04484B  BRL   L0448F6
L04484E  LDA   $E4
         CMP   #$FFFF
         BNE   L044861
         LDA   $D4
         LSR
         LSR
         LSR
         LSR
         LSR
         CMP   #$0003
         BEQ   L044864
L044861  BRL   L044A0D
L044864  BRL   L0448F6
L044867  BRL   L044A0D
L04486A  LDA   $E6
         SEC
         SBC   #$0004
         BEQ   L044879
         BVS   L044877
         EOR   #$8000
L044877  BMI   L044884
L044879  LDA   $E6
         CMP   #$FFFF
         BEQ   L044884
         LDA   $DC
         BEQ   L044887
L044884  BRL   L044A0D
L044887  BRL   L0448F6
L04488A  LDA   $E6
         CMP   #$FFFF
         BEQ   L044894
         BRL   L044A0D
L044894  PEI   $CE
         JSL   L043F32
         PLY
         STA   $D2
         BRL   L0448F6
L0448A0  LDA   $E6
         CMP   #$FFFF
         BNE   L0448AF
         LDA   $FF
         BEQ   L0448AF
         LDA   $FD
         BEQ   L0448B2
L0448AF  BRL   L044A0D
L0448B2  LDA   $CE
         SEC
         SBC   #$0014
         BEQ   L0448C6
         BVS   L0448BF
         EOR   #$8000
L0448BF  BPL   L0448C6
         LDA   #$0000
         BRA   L0448C9
L0448C6  LDA   #$0001
L0448C9  STA   $D2
         BRL   L0448F6
L0448CE  BRL   L044A0D
         BRL   L0448F6
L0448D4  DA    L0447C8
         DA    L0447DA
         DA    L0447F7
         DA    L044839
         DA    L04484E
         DA    L044867
         DA    L04486A
         DA    L04488A
         DA    L0448A0
         DA    L0448CE
L0448E8  DEC
         CMP   #$0009
         BCC   L0448F1
         LDA   #$0009
L0448F1  ASL
         TAX
         JMP   (L0448D4,X)

L0448F6  BRL   L044987
L0448F9  LDA   #$000E
         PHA
         LDA   $E8
         CLC
         JSL   L0222DF
         PLA
         CMP   $EA
         BEQ   L04490C
         BRL   L044A0D
L04490C  LDY   #$0002
         LDA   [$E0],Y
         AND   #$007F
         BRL   L044979
L044917  LDA   $DE
         BEQ   L04491E
         BRL   L044A0D
L04491E  BRL   L044987
L044921  LDA   $D8
         BNE   L044940
         LDY   #$0002
         LDA   [$E0],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         PEI   $FB
         JSL   L020ADF
         PLY
         PLX
         STX   $EC
         CMP   $EC
         BEQ   L044943
L044940  BRL   L044A0D
L044943  BRL   L044987
L044946  LDA   $D6
         BNE   L044965
         LDY   #$0002
         LDA   [$E0],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         PEI   $FB
         JSL   L020ADF
         PLY
         PLX
         STX   $EC
         CMP   $EC
         BNE   L044968
L044965  BRL   L044A0D
L044968  BRL   L044987
L04496B  BRL   L044A0D
         BRL   L044987
L044971  DA    L044917
         DA    L044921
         DA    L044946
         DA    L04496B
L044979  DEC
         CMP   #$0003
         BCC   L044982
         LDA   #$0003
L044982  ASL
         TAX
         JMP   (L044971,X)

L044987  LDY   #$0004
         LDA   [$E0],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         PHA
         LDA   $D2
         PLX
         STX   $F0
         EOR   $F0
         STA   $D2
         LDY   #$0004
         LDA   [$E0],Y
         LSR
         LSR
         LSR
         AND   #$0003
         STA   $D0
         CMP   #$0003
         BNE   L0449C0
         LDA   $D2
         BEQ   L0449B9
         LDA   #$0000
         BRA   L0449BC
L0449B9  LDA   #$0001
L0449BC  STA   $D0
         BRA   L0449C6
L0449C0  LDA   $D2
         BNE   L0449C6
         BRA   L044A0D
L0449C6  LDY   #$0004
         LDA   [$E0],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L0449E9
         PEA   $0001
         PEI   $F9
         PEI   $F7
         PEA   $0001
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L0449E9  PEA   $FFFF
         PEI   $F9
         PEI   $F7
         PEI   $D0
         PEI   $E2
         PEI   $E0
         JSL   L043D8F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L044A0D
L044A04  LDA   $E4
         CMP   #$0004
         BCC   L044A0D
         BRA   L044A19
L044A0D  PEI   $E8
         JSL   L060D39
         PLY
         STA   $E8
         BRL   L044763
L044A19  JSL   L043C22
         TSC
         CLC
         ADC   #$0024
         TCS
         PLD
         RTL

L044A25  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00EE
         TCS
         PEA   $0001
         LDA   L0303DF
         ASL
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0303E3
         STA   L0303E1
         PEA   $0001
         LDA   L0303DF
         ASL
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0303E7
         STA   L0303E5
         LDA   L030030
         BEQ   L044AB1
         LDA   #$0000
         STA   $F4
         LDX   L0303E3
         LDA   L0303E1
         STX   $F2
         STA   $F0
         BRA   L044AA0
L044A7B  LDA   #$0000
         SEP   #$20
         LDY   #$0004
         STA   [$F0],Y
         REP   #$20
         LDA   $F4
         INC   $F4
         LDX   $F2
         LDA   $F0
         PHX
         PHA
         CLC
         ADC   #$0010
         STA   $F0
         LDA   $F2
         BCC   L044A9C
         INC
L044A9C  STA   $F2
         PLA
         PLX
L044AA0  LDA   $F4
         CMP   L0303DF
         BCC   L044A7B
         STZ   L0303E9
         STZ   L0303EB
         JSL   L046A7A
L044AB1  TSC
         CLC
         ADC   #$000C
         TCS
         PLD
         RTL

L044AB9  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         LDY   #$0002
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDA   [$F9],Y
         AND   #$00FF
         CMP   $EC
         BCC   L044AFC
         BNE   L044B01
         LDA   [$F9]
         CMP   [$FD]
         BCC   L044AFC
         BNE   L044B01
         LDY   #$0004
         LDA   [$F9],Y
         CMP   [$FD],Y
         BCC   L044B01
         BNE   L044AFC
         LDA   $FB
         CMP   $FF
         BCC   L044AFC
         BNE   L044B01
         LDA   $F9
         CMP   $FD
         BCC   L044AFC
         BNE   L044B01
L044AFC  LDA   #$0001
         BRA   L044B04
L044B01  LDA   #$0000
L044B04  STA   $EC
         LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L044B12  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EC
         TCS
         LDA   #$0000
         STA   $F2
         LDX   L0303E7
         LDA   L0303E5
         STX   $F0
         STA   $EE
         BRA   L044B51
L044B2E  LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L044B3F
         INC
L044B3F  STA   $F0
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         CMP   $FF
         BNE   L044B4F
         BRA   L044B58
L044B4F  INC   $F2
L044B51  LDA   $F2
         CMP   L0303DF
         BCC   L044B2E
L044B58  LDA   $F2
         CMP   L0303DF
         BCC   L044B61
         STZ   $F2
L044B61  LDA   $F2
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L044B6D  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00E6
         TCS
         LDA   L0303E9
         STA   $EE
         CMP   #$0001
         BNE   L044B85
         BRL   L044E08
L044B85  LDA   $FF
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         STA   $F0
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PLA
         PLX
         STX   $EA
         STA   $E8
         STZ   $EC
L044BCE  LDA   $FF
         CMP   #$0000
         BNE   L044BD8
         BRL   L044C86
L044BD8  BCS   L044BDD
         BRL   L044C86
L044BDD  LDA   $FF
         SEC
         SBC   #$0001
         LSR
         STA   $F2
         LDA   $F2
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PEI   $EA
         PEI   $E8
         JSL   L044AB9
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L044C81
         LDA   $F2
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $FF
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
         LDA   $F2
         STA   $FF
         LDA   #$0001
         STA   $EC
         BRA   L044C83
L044C81  BRA   L044C86
L044C83  BRL   L044BCE
L044C86  LDA   $EC
         BEQ   L044C8D
         BRL   L044DE6
L044C8D  LDA   $EE
         SEC
         SBC   #$0001
         SEC
         SBC   #$0001
         LSR
         STA   $EE
L044C9A  LDA   $FF
         CMP   $EE
         BEQ   L044CA5
         BCC   L044CA5
         BRL   L044DE6
L044CA5  LDA   $FF
         ASL
         CLC
         ADC   #$0001
         STA   $F2
         LDA   $F2
         CLC
         ADC   #$0001
         CMP   L0303E9
         BCC   L044CBC
         BRL   L044D4B
L044CBC  LDA   $F2
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         LDA   $F2
         CLC
         ADC   #$0001
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         JSL   L044AB9
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L044D4B
         INC   $F2
L044D4B  PEI   $EA
         PEI   $E8
         LDA   $F2
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         JSL   L044AB9
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L044DE1
         LDA   $F2
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $FF
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
         LDA   $F2
         STA   $FF
         BRA   L044DE3
L044DE1  BRA   L044DE6
L044DE3  BRL   L044C9A
L044DE6  LDA   $FF
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   $F0
         STA   [$F4]
L044E08  TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         PLD
         RTL

L044E12  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         TCS
         LDA   $FF
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         SEP   #$20
         LDY   #$0004
         STA   [$F4],Y
         REP   #$20
         LDA   $FF
         CMP   L0303EB
         BCS   L044E5C
         LDA   $FF
         STA   L0303EB
L044E5C  LDA   L0303E9
         DEC
         STA   L0303E9
         STA   $F0
         CMP   #$0000
         BNE   L044E6D
         BRL   L044EC7
L044E6D  PEI   $FF
         JSL   L044B12
         PLY
         STA   $F2
         LDA   $F2
         CMP   $F0
         BNE   L044E7E
         BRA   L044EC7
L044E7E  LDA   $F0
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   $F2
         LDX   #$0000
         STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         PLA
         STA   [$F4]
         PEI   $F2
         JSL   L044B6D
         PLY
L044EC7  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L044ED1  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E6
         TCS
         LDA   L0303E9
         CMP   L0303DF
         BNE   L044EEC
         PEA   $002D
         JSL   L0203A1
         PLY
L044EEC  LDA   L030272
         CMP   #$0C91
         BNE   L044F04
         LDA   L030250
         CMP   #$0000
         BNE   L044F0A
         LDA   L030252
         CMP   #$0000
         BNE   L044F0A
L044F04  LDA   #$0000
         BRL   L045299
L044F0A  LDY   #$0004
         LDA   [$FD],Y
         AND   #$00FF
         SEC
         SBC   #$0005
         BVS   L044F1B
         EOR   #$8000
L044F1B  BMI   L044F20
         BRL   L045068
L044F20  LDY   #$0004
         LDA   [$FD],Y
         AND   #$00FF
         SEC
         SBC   #$000A
         BEQ   L044F38
         BVS   L044F33
         EOR   #$8000
L044F33  BPL   L044F38
         BRL   L045068
L044F38  LDA   #$0000
         STA   $F0
         LDX   L0303E3
         LDA   L0303E1
         STX   $EA
         STA   $E8
         BRL   L04505B
L044F4A  LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$0005
         BVS   L044F5B
         EOR   #$8000
L044F5B  BPL   L044FDA
         LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         SEC
         SBC   #$000A
         BEQ   L044F72
         BVS   L044F70
         EOR   #$8000
L044F70  BMI   L044FDA
L044F72  LDY   #$0002
         LDA   [$E8],Y
         TAX
         LDA   [$E8]
         PHX
         PHA
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         JSL   L022171
         BNE   L044FD6
         LDY   #$0006
         LDA   [$FD],Y
         PHA
         LDY   #$0006
         LDA   [$E8],Y
         PLX
         STX   $F2
         CMP   $F2
         BNE   L044FD6
         LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$0006
         BNE   L044FC1
         LDY   #$0008
         LDA   [$E8],Y
         AND   #$00FF
         PHA
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         PLX
         STX   $F2
         CMP   $F2
         BNE   L044FD6
L044FC1  LDY   #$0009
         LDA   [$FD],Y
         SEP   #$20
         LDY   #$0009
         STA   [$E8],Y
         REP   #$20
         LDA   $F0
         BRL   L045299
         BRA   L044FD8
L044FD6  BRA   L045042
L044FD8  BRA   L045042
L044FDA  LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$0001
         BNE   L045042
         LDY   #$0002
         LDA   [$E8],Y
         TAX
         LDA   [$E8]
         PHX
         PHA
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         JSL   L022171
         BNE   L045042
         LDY   #$0006
         LDA   [$FD],Y
         PHA
         LDY   #$0006
         LDA   [$E8],Y
         PLX
         STX   $F2
         CMP   $F2
         BNE   L045042
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L045039
         LDY   #$0009
         LDA   [$E8],Y
         AND   #$00FF
         PHA
         LDA   #$0001
         PLX
         STX   $F6
         SEC
         SBC   $F6
         SEP   #$20
         LDY   #$0009
         STA   [$FD],Y
         REP   #$20
L045039  PEI   $F0
         JSL   L044E12
         PLY
         BRA   L045065
L045042  LDA   $F0
         INC   $F0
         LDX   $EA
         LDA   $E8
         PHX
         PHA
         CLC
         ADC   #$0010
         STA   $E8
         LDA   $EA
         BCC   L045057
         INC
L045057  STA   $EA
         PLA
         PLX
L04505B  LDA   $F0
         CMP   L0303DF
         BCS   L045065
         BRL   L044F4A
L045065  BRL   L0451E4
L045068  LDY   #$0004
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0001
         BEQ   L045078
         BRL   L045136
L045078  LDA   #$0000
         STA   $F0
         LDX   L0303E3
         LDA   L0303E1
         STX   $EA
         STA   $E8
         BRL   L045129
L04508A  LDY   #$0002
         LDA   [$E8],Y
         TAX
         LDA   [$E8]
         PHX
         PHA
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         JSL   L022171
         BNE   L045110
         LDY   #$0006
         LDA   [$FD],Y
         PHA
         LDY   #$0006
         LDA   [$E8],Y
         PLX
         STX   $F2
         CMP   $F2
         BNE   L045110
         LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$000A
         BNE   L0450F0
         LDY   #$0009
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L0450E9
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         PHA
         LDA   #$0001
         PLX
         STX   $F6
         SEC
         SBC   $F6
         SEP   #$20
         LDY   #$0009
         STA   [$E8],Y
         REP   #$20
L0450E9  LDA   $F0
         BRL   L045299
         BRA   L045110
L0450F0  LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$0001
         BNE   L045110
         LDY   #$0009
         LDA   [$FD],Y
         SEP   #$20
         LDY   #$0009
         STA   [$E8],Y
         REP   #$20
         LDA   $F0
         BRL   L045299
L045110  LDA   $F0
         INC   $F0
         LDX   $EA
         LDA   $E8
         PHX
         PHA
         CLC
         ADC   #$0010
         STA   $E8
         LDA   $EA
         BCC   L045125
         INC
L045125  STA   $EA
         PLA
         PLX
L045129  LDA   $F0
         CMP   L0303DF
         BCS   L045133
         BRL   L04508A
L045133  BRL   L0451E4
L045136  LDY   #$0004
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BEQ   L045146
         BRL   L0451E4
L045146  LDA   #$0000
         STA   $F0
         LDX   L0303E3
         LDA   L0303E1
         STX   $EA
         STA   $E8
         BRL   L0451DA
L045158  LDY   #$0006
         LDA   [$FD],Y
         PHA
         LDY   #$0006
         LDA   [$E8],Y
         PLX
         STX   $F2
         CMP   $F2
         BNE   L0451C1
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         SEC
         JSL   L022303
         PLA
         PLX
         PHA
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDY   #$0002
         LDA   [$E8],Y
         TAX
         LDA   [$E8]
         SEC
         JSL   L022303
         PLA
         PLX
         PLX
         STX   $F2
         CMP   $F2
         BNE   L0451C1
         LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$0001
         BEQ   L0451BA
         LDY   #$0004
         LDA   [$E8],Y
         AND   #$00FF
         CMP   #$000A
         BNE   L0451C1
L0451BA  PEI   $F0
         JSL   L044E12
         PLY
L0451C1  LDA   $F0
         INC   $F0
         LDX   $EA
         LDA   $E8
         PHX
         PHA
         CLC
         ADC   #$0010
         STA   $E8
         LDA   $EA
         BCC   L0451D6
         INC
L0451D6  STA   $EA
         PLA
         PLX
L0451DA  LDA   $F0
         CMP   L0303DF
         BCS   L0451E4
         BRL   L045158
L0451E4  LDA   $FD
         LDX   $FF
         PHX
         PHA
         LDA   L0303EB
         STA   $EC
         LDX   #$0000
         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
         PEI   $F4
         PEI   $F2
         PEA   $0010
         JSL   L02219C
         PLA
         PLA
         PLA
         PLA
         PLX
L045224  LDA   L0303EB
         CMP   L0303DF
         BNE   L04522E
         BRA   L045267
L04522E  LDA   L0303EB
         INC
         STA   L0303EB
         LDX   #$0000
         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   #$0004
         LDA   [$F2],Y
         AND   #$00FF
         CMP   #$0000
         BNE   L045224
L045267  LDA   L0303E9
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $EC
         STA   [$F2]
         LDA   L0303E9
         PHA
         INC
         STA   L0303E9
         JSL   L044B6D
         PLY
         LDA   $EC
L045299  TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PLD
         RTL

L0452A3  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDX   L0303E7
         LDA   L0303E5
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $F0
         LDX   #$0000
         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
         LDA   $F2
         LDX   $F4
         PHX
         PHA
         LDA   $FF
         PHA
         LDA   $FD
         PHA
         PEA   $0010
         JSL   L02219C
         PLA
         PLA
         PLA
         PLA
         PLX
         PEI   $F0
         JSL   L044E12
         PLY
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L045308  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         LDA   L0303E9
         BNE   L04531B
         BRL   L04537A
L04531B  LDX   L030050
         LDA   L03004E
         PHX
         PHA
         LDX   L0303E7
         LDA   L0303E5
         STA   $F6
         STX   $F8
         LDA   [$F6]
         LDX   #$0000
         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
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         JSL   L022171
         BCC   L04537A
         LDA   L030066
         SEC
         SBC   #$0002
         BVS   L045378
         EOR   #$8000
L045378  BPL   L04537F
L04537A  LDA   #$0000
         BRA   L045382
L04537F  LDA   #$0001
L045382  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L04538C  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DA
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
         LDX   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   [$EE]
         AND   #$00FF
         AND   #$0007
         STA   $E6
         CMP   #$0005
         BNE   L0453F3
         BRL   L045644
L0453F3  LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   [$FD]
         LDY   #$0002
         LDA   [$FD],Y
         BCC   L04540B
         INC
L04540B  LDY   #$0002
         STA   [$FD],Y
         PLA
         PLX
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E8
         LDA   $E8
         CMP   #$0001
         BEQ   L045426
         BRL   L0455C5
L045426  PEI   $EA
         PEI   $EC
         JSL   L060CD1
         PLY
         PLY
         STX   $E4
         STA   $E2
         LDY   #$0002
         LDA   [$E2],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         STA   $DC
         LDA   L03008A
         CMP   L030046
         BEQ   L04544E
         BRL   L0454E9
L04544E  LDA   L030040
         CMP   $EC
         BEQ   L045458
         BRL   L0454E9
L045458  LDA   L030042
         CMP   $EA
         BEQ   L045462
         BRL   L0454E9
L045462  LDA   $E6
         CMP   #$0000
         BNE   L04546C
         BRL   L0454E9
L04546C  LDA   L03003E
         CMP   #$0000
         BEQ   L0454BA
         BCC   L0454BA
         LDA   [$EE]
         AND   #$00FF
         AND   #$FFF8
         ORA   #$0000
         SEP   #$20
         STA   [$EE]
         REP   #$20
         PEA   $0002
         LDA   #$0008
         ORA   $DC
         TAY
         BEQ   L045497
         LDA   #$0004
         BRA   L04549A
L045497  LDA   #$0003
L04549A  PHA
         PEA   $0005
         JSL   L0A73EB
         PLY
         PLY
         PLY
         TAY
         BEQ   L0454BA
         PEA   $0001
         PEI   $EA
         PEI   $EC
         PEA   $0012
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L0454BA  LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   [$FD]
         LDY   #$0002
         LDA   [$FD],Y
         BCC   L0454D2
         INC
L0454D2  LDY   #$0002
         STA   [$FD],Y
         PLA
         PLX
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
         BRL   L045644
         BRL   L0455C5
L0454E9  PEI   $EA
         PEI   $EC
         JSL   L06260C
         PLY
         PLY
         STA   $E0
         CMP   #$FFFE
         BNE   L0454FD
         BRL   L0455C5
L0454FD  PEI   $E0
         JSL   L060468
         PLY
         STA   $DE
         AND   #$0040
         TAY
         BEQ   L04550F
         BRL   L0455C5
L04550F  LDA   $DC
         BEQ   L045521
         LDA   $DE
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         BRA   L045524
L045521  LDA   #$0001
L045524  CMP   $E6
         BEQ   L04552D
         BCC   L04552D
         BRL   L0455C5
L04552D  PEA   $0001
         PEA   $0005
         PEI   $EA
         PEI   $EC
         PEI   $E0
         JSL   L060C4E
         PLY
         PHX
         PHA
         JSL   L063A54
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         CMP   #$0002
         BEQ   L045563
         PEA   $0000
         PEA   $FFFD
         PEI   $EA
         PEI   $EC
         JSL   L064FFA
         PLY
         PLY
         PLY
         PLY
L045563  LDA   $E6
         CMP   #$0000
         BNE   L04556F
         LDA   #$0000
         BRA   L045575
L04556F  LDA   $E6
         SEC
         SBC   #$0001
L045575  STA   $E6
         LDA   [$EE]
         AND   #$00FF
         AND   #$FFF8
         ORA   $E6
         SEP   #$20
         STA   [$EE]
         REP   #$20
         PEA   $0001
         PEI   $EA
         PEI   $EC
         PEA   $0004
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   [$FD]
         LDY   #$0002
         LDA   [$FD],Y
         BCC   L0455B1
         INC
L0455B1  LDY   #$0002
         STA   [$FD],Y
         PLA
         PLX
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
         BRL   L045644
L0455C5  LDA   $E8
         CMP   #$0000
         BNE   L0455D3
         LDA   $E6
         CMP   #$0000
         BEQ   L0455E1
L0455D3  LDA   $E8
         CMP   #$0001
         BNE   L0455E3
         LDA   $E6
         CMP   #$0004
         BNE   L0455E3
L0455E1  BRA   L045644
L0455E3  LDA   $E8
         CMP   #$0000
         BNE   L0455EF
         LDA   #$FFFF
         BRA   L0455F2
L0455EF  LDA   #$0001
L0455F2  PHA
         LDA   $E6
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E6
         LDA   [$EE]
         AND   #$00FF
         AND   #$FFF8
         ORA   $E6
         SEP   #$20
         STA   [$EE]
         REP   #$20
         PEA   $0001
         PEI   $EA
         PEI   $EC
         PEA   $0002
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         LDA   $E8
         CMP   #$0000
         BNE   L045631
         LDA   $E6
         CMP   #$0000
         BNE   L04562F
         BRA   L045644
L04562F  BRA   L04563A
L045631  LDA   $E6
         CMP   #$0004
         BNE   L04563A
         BRA   L045644
L04563A  PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
L045644  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L04564E  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E4
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
         LDX   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E8
         LDA   $E8
         CMP   #$0002
         BNE   L0456C9
         LDA   [$EE]
         AND   #$00FF
         AND   #$0004
         TAY
         BEQ   L0456C4
         LDA   #$0001
         BRA   L0456C7
L0456C4  LDA   #$0000
L0456C7  STA   $E8
L0456C9  LDA   $E8
         CMP   #$0001
         BEQ   L0456D3
         BRL   L04576D
L0456D3  LDA   L03008A
         CMP   L030046
         BNE   L045714
         LDA   L030040
         CMP   $EC
         BNE   L045714
         LDA   L030042
         CMP   $EA
         BNE   L045714
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   [$FD]
         LDY   #$0002
         LDA   [$FD],Y
         BCC   L045701
         INC
L045701  LDY   #$0002
         STA   [$FD],Y
         PLA
         PLX
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
         BRA   L04576B
L045714  PEI   $EA
         PEI   $EC
         JSL   L06260C
         PLY
         PLY
         STA   $E6
         CMP   #$FFFE
         BEQ   L04575D
         PEI   $E6
         JSL   L060468
         PLY
         AND   #$0040
         TAY
         BNE   L04575D
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   [$FD]
         LDY   #$0002
         LDA   [$FD],Y
         BCC   L04574A
         INC
L04574A  LDY   #$0002
         STA   [$FD],Y
         PLA
         PLX
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
         BRA   L04576B
L04575D  LDA   [$EE]
         AND   #$00FF
         AND   #$FFFB
         SEP   #$20
         STA   [$EE]
         REP   #$20
L04576B  BRA   L04577B
L04576D  LDA   [$EE]
         AND   #$00FF
         ORA   #$0004
         SEP   #$20
         STA   [$EE]
         REP   #$20
L04577B  TSC
         CLC
         ADC   #$0012
         TCS
         PLD
         RTL

L045783  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         LDX   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   [$EE]
         AND   #$00FF
         AND   #$FFF8
         ORA   #$0005
         SEP   #$20
         STA   [$EE]
         REP   #$20
         TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L0457ED  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EE
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         LDX   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         AND   #$00FF
         AND   #$0007
         STA   $F0
         CMP   #$0005
         BNE   L04584F
         BRA   L0458AD
L04584F  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L045876
         LDA   $F0
         CMP   #$0000
         BNE   L045868
         LDA   #$0001
         BRA   L04586B
L045868  LDA   #$0000
L04586B  SEP   #$20
         LDY   #$0009
         STA   [$FD],Y
         REP   #$20
         BRA   L045897
L045876  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0000
         BNE   L04588E
         LDA   $F0
         CMP   #$0000
         BNE   L04588C
         BRA   L0458AD
L04588C  BRA   L045897
L04588E  LDA   $F0
         CMP   #$0004
         BNE   L045897
         BRA   L0458AD
L045897  LDA   #$0001
         SEP   #$20
         LDY   #$0004
         STA   [$FD],Y
         REP   #$20
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
L0458AD  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0458B7  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00CA
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $DE
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E0
         PHA
         JSL   L060E4D
         PLY
         PLY
         STA   $E6
L0458E0  LDA   $E6
         CMP   #$FFFE
         BNE   L0458EA
         BRL   L045B61
L0458EA  LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $EC
         CMP   #$0002
         BEQ   L045903
         BRL   L0459C6
L045903  PEI   $E6
         JSL   L060C4E
         PLY
         STX   $E4
         STA   $E2
         LDY   #$0002
         LDA   [$E2],Y
         AND   #$0001
         STA   $EA
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L04594B
         LDA   $EA
         BEQ   L04592E
         LDA   #$0000
         BRA   L045931
L04592E  LDA   #$0001
L045931  AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$E2],Y
         AND   #$FFFE
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0002
         STA   [$E2],Y
         PLA
         BRA   L045978
L04594B  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0000
         BEQ   L04595D
         LDA   #$0000
         BRA   L045960
L04595D  LDA   #$0001
L045960  AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$E2],Y
         AND   #$FFFE
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0002
         STA   [$E2],Y
         PLA
L045978  LDA   $EA
         BEQ   L04597F
         BRL   L0459C3
L04597F  LDY   #$0002
         LDA   [$E2],Y
         AND   #$0001
         TAY
         BEQ   L0459C3
         LDA   L03008A
         CMP   L030046
         BNE   L0459C3
         LDA   L030040
         CMP   $E0
         BNE   L0459C3
         LDA   L030042
         CMP   $DE
         BNE   L0459C3
         PEA   $0001
         PEI   $E6
         PEA   ^L0589AB
         PEA   L0589AB
         JSL   L0619C4
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0589AB
         PEA   L0589AB
         PEA   $000F
         JSL   L0842BE
         PLY
         PLY
         PLY
L0459C3  BRL   L045B55
L0459C6  LDA   $EC
         CMP   #$0003
         BEQ   L0459D0
         BRL   L045B55
L0459D0  PEI   $E6
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         CMP   #$0006
         BEQ   L0459EB
         BRL   L045B55
L0459EB  LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   $E8
         LDA   $E8
         AND   #$0008
         TAY
         BEQ   L045A18
         LDA   $E8
         AND   #$0007
         PHA
         JSL   L02051C
         CLC
         JSL   L021F1A
         PLA
         STA   $E8
         BRA   L045A1A
L045A18  DEC   $E8
L045A1A  LDY   #$0006
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$0FFF
         AND   #$000F
         STA   $DC
         CMP   #$0000
         BNE   L045A4C
         LDX   L03009A
         LDA   L030098
         STA   $F2
         STX   $F4
         LDY   #$000C
         LDA   [$F2],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         AND   #$000F
         STA   $DC
L045A4C  PEI   $DE
         PEI   $E0
         JSL   L020599
         PHA
         PEI   $E8
         PEI   $DC
         LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         PHA
         JSL   L062FB0
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L045A95
         PEA   $0001
         PEI   $DE
         PEI   $E0
         PEA   $0011
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L045A95  LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L045AB2
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$FF80
         LDY   #$0002
         STA   [$EE],Y
         BRL   L045B55
L045AB2  LDY   #$0006
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$0FFF
         LSR
         LSR
         LSR
         LSR
         STA   $DC
         CMP   #$0000
         BNE   L045ACC
         BRL   L045B55
L045ACC  LDY   #$0002
         LDA   [$EE],Y
         AND   #$FF80
         LDY   #$0002
         STA   [$EE],Y
         LDA   $DC
         CMP   #$007F
         BEQ   L045AF0
         BCC   L045AF0
         LDA   $DC
         SEC
         SBC   #$007E
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         STA   $DC
L045AF0  LDA   #$0041
         SEP   #$20
         STA   $D0
         REP   #$20
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L03008A
         LDX   #$0000
         TAY
         BPL   L045B0B
         DEX
L045B0B  SEC
         JSL   L0222B8
         LDA   $DC
         LDX   #$0000
         PHX
         PHA
         LDX   L030050
         LDA   L03004E
         JSL   L021F00
         PLA
         PLX
         JSL   L021F9F
         PLA
         PLX
         STX   $CE
         STA   $CC
         LDA   #$0000
         SEP   #$20
         STA   $D1
         REP   #$20
         LDA   $E0
         SEP   #$20
         STA   $D2
         REP   #$20
         LDA   $DE
         SEP   #$20
         STA   $D3
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L044ED1
         PLY
         PLY
L045B55  PEI   $E6
         JSL   L060D39
         PLY
         STA   $E6
         BRL   L0458E0
L045B61  TSC
         CLC
         ADC   #$002C
         TCS
         PLD
         RTL

L045B69  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         PHA
         JSL   L060E4D
         PLY
         PLY
         STA   $EC
L045B8E  LDA   $EC
         CMP   #$FFFF
         BEQ   L045BDB
         LDA   #$000A
         PHA
         LDA   $EC
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BNE   L045BD0
         PEI   $EC
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         CMP   #$0000
         BNE   L045BD0
         LDY   #$0002
         LDA   [$EE],Y
         ORA   #$0006
         LDY   #$0002
         STA   [$EE],Y
         BRA   L045BDB
L045BD0  PEI   $EC
         JSL   L060D39
         PLY
         STA   $EC
         BRA   L045B8E
L045BDB  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L045BE5  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00D4
         TCS
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E4
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E2
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E8
         LDA   $E8
         CLC
         ADC   #$0002
         AND   #$0003
         STA   $E0
         LDY   #$0002
         LDA   [$F9],Y
         AND   #$007F
         STA   $E6
         LDY   #$0002
         LDA   [$F9],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $DE
         LDY   #$0006
         LDA   [$F9],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$0FFF
         AND   #$00FF
         STA   $DC
         LDY   #$0006
         LDA   [$F9],Y
         LSR
         LSR
         LSR
         LSR
         AND   #$0FFF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $DA
         LDA   $E6
         CMP   #$0007
         BEQ   L045C72
         LDA   $E6
         CMP   #$0008
         BEQ   L045C72
         LDA   $E6
         CMP   #$000E
         BEQ   L045C72
         LDA   #$0000
         BRA   L045C75
L045C72  LDA   #$0001
L045C75  STA   $D8
         LDA   $E6
         CMP   #$0008
         BEQ   L045C85
         LDA   $E6
         CMP   #$000A
         BNE   L045C92
L045C85  LDA   $DE
         CLC
         ADC   #$FF80
         STA   $EA
         STA   $EC
         BRL   L045DBC
L045C92  LDA   $E6
         CMP   #$000E
         BEQ   L045CA3
         LDA   $E6
         CMP   #$000F
         BEQ   L045CA3
         BRL   L045D94
L045CA3  PEI   $E2
         PEI   $E4
         JSL   L060E4D
         PLY
         PLY
         STA   $EC
L045CAF  LDA   $EC
         CMP   #$FFFF
         BEQ   L045CFA
         LDA   #$000E
         PHA
         LDA   $EC
         CLC
         JSL   L0222DF
         PLA
         STA   $D6
         LDA   #$000A
         PHA
         LDA   $EC
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BEQ   L045CEF
         BCC   L045CEF
         LDA   $D6
         CMP   $E8
         BEQ   L045CED
         LDA   $E8
         CLC
         ADC   #$0001
         AND   #$0003
         CMP   $D6
         BNE   L045CEF
L045CED  BRA   L045CFA
L045CEF  PEI   $EC
         JSL   L060D39
         PLY
         STA   $EC
         BRA   L045CAF
L045CFA  LDA   $EC
         CMP   #$FFFF
         BNE   L045D04
         BRL   L045E6D
L045D04  PEI   $E2
         PEI   $E4
         PEA   $0000
         PEI   $EC
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         LDA   $D8
         BEQ   L045D1C
         BRL   L045D92
L045D1C  PEI   $E2
         PEI   $E4
         JSL   L060E4D
         PLY
         PLY
         STA   $EA
L045D28  LDA   $EA
         CMP   #$FFFF
         BEQ   L045D73
         LDA   #$000E
         PHA
         LDA   $EA
         CLC
         JSL   L0222DF
         PLA
         STA   $D6
         LDA   #$000A
         PHA
         LDA   $EA
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0003
         BEQ   L045D68
         BCC   L045D68
         LDA   $D6
         CMP   $E8
         BEQ   L045D66
         LDA   $E8
         CLC
         ADC   #$0001
         AND   #$0003
         CMP   $D6
         BNE   L045D68
L045D66  BRA   L045D73
L045D68  PEI   $EA
         JSL   L060D39
         PLY
         STA   $EA
         BRA   L045D28
L045D73  LDA   $EA
         CMP   #$FFFF
         BNE   L045D81
         LDA   #$0001
         STA   $D8
         BRA   L045D92
L045D81  PEI   $E2
         PEI   $E4
         PEA   $0000
         PEI   $EA
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
L045D92  BRA   L045DBC
L045D94  PEI   $DE
         JSL   L0618A0
         PLY
         STA   $EC
         CMP   #$FFFF
         BNE   L045DA5
         BRL   L045E6D
L045DA5  LDA   $D8
         BNE   L045DBC
         PEI   $DE
         JSL   L0618A0
         PLY
         STA   $EA
         CMP   #$FFFF
         BNE   L045DBC
         LDA   #$0001
         STA   $D8
L045DBC  LDA   $D8
         BEQ   L045DD2
         JSL   L020564
         PHA
         LDA   $E0
         PLX
         STX   $F2
         CLC
         ADC   $F2
         AND   #$0003
         STA   $E0
L045DD2  LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05045C
         LDX   #^L05045C
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   [$EE]
         PHA
         LDA   $E4
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $E4
         LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050464
         LDX   #^L050464
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   [$EE]
         PHA
         LDA   $E2
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $E2
         LDA   #$0001
         STA   L030014
         PEA   $0000
         PEA   $0064
         PEI   $DC
         PEI   $E8
         PEI   $E0
         PEI   $E2
         PEI   $E4
         PEI   $EC
         JSL   L040000
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         LDA   $D8
         BNE   L045E6A
         PEA   $0000
         PEA   $0064
         PEI   $DC
         PEI   $E8
         LDA   $E0
         CLC
         ADC   #$0001
         AND   #$0003
         PHA
         PEI   $E2
         PEI   $E4
         PEI   $EA
         JSL   L040000
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
L045E6A  STZ   L030014
L045E6D  TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PLD
         RTL

L045E77  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00D8
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $DC
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $DE
         PHA
         JSL   L060E4D
         PLY
         PLY
         STA   $E8
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         STA   $DA
L045EAA  LDA   $E8
         CMP   #$FFFE
         BNE   L045EB4
         BRL   L046212
L045EB4  LDA   #$000A
         PHA
         LDA   $E8
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E6
         CMP   #$0002
         BEQ   L045ECD
         BRL   L045F5C
L045ECD  LDA   #$000E
         PHA
         LDA   $E8
         CLC
         JSL   L0222DF
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         PLX
         STX   $F2
         CMP   $F2
         BNE   L045F5C
         PEI   $E8
         JSL   L060C4E
         PLY
         STX   $EC
         STA   $EA
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L045F2C
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$0001
         TAY
         BEQ   L045F0F
         LDA   #$0000
         BRA   L045F12
L045F0F  LDA   #$0001
L045F12  AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$FFFE
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0002
         STA   [$EA],Y
         PLA
         BRA   L045F59
L045F2C  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0000
         BEQ   L045F3E
         LDA   #$0000
         BRA   L045F41
L045F3E  LDA   #$0001
L045F41  AND   #$0001
         PHA
         PHA
         LDY   #$0002
         LDA   [$EA],Y
         AND   #$FFFE
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0002
         STA   [$EA],Y
         PLA
L045F59  BRL   L046206
L045F5C  LDA   $E6
         CMP   #$0003
         BEQ   L045F66
         BRL   L046206
L045F66  PEI   $E8
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         STA   $E0
         LDY   #$0002
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   $E2
         LDA   $E0
         CMP   #$0006
         BEQ   L045F93
         BRL   L046067
L045F93  LDA   $E2
         CMP   #$0000
         BNE   L045F9D
         BRL   L046064
L045F9D  BCS   L045FA2
         BRL   L046064
L045FA2  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0000
         BNE   L045FBA
         LDA   $E2
         CMP   #$01FF
         BCS   L045FB8
         INC   $E2
L045FB8  BRA   L045FBC
L045FBA  DEC   $E2
L045FBC  LDA   $E2
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         PLX
         STX   $F6
         ORA   $F6
         LDY   #$0002
         STA   [$EE],Y
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         AND   #$0003
         CMP   #$0003
         BNE   L04603B
         LDA   $E2
         CMP   #$0000
         BEQ   L045FF4
         LDA   #$0000
         BRA   L045FF7
L045FF4  LDA   #$0001
L045FF7  PHA
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         PLX
         STX   $F2
         CMP   $F2
         BNE   L046011
         LDA   #$0000
         BRA   L046014
L046011  LDA   #$0001
L046014  STA   $E4
         PEI   $DA
         PEI   $DC
         PEI   $DE
         LDA   $E4
         BEQ   L046025
         LDA   #$0000
         BRA   L046028
L046025  LDA   #$0001
L046028  PHA
         PEI   $F0
         PEI   $EE
         JSL   L043D8F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L046064
L04603B  LDA   $E2
         CMP   #$0000
         BNE   L046064
         PEI   $DA
         PEI   $DC
         PEI   $DE
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         AND   #$0003
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L043D8F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L046064  BRL   L046206
L046067  LDA   $E0
         CMP   #$0005
         BEQ   L046071
         BRL   L04618A
L046071  LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         PHA
         LDA   #$0001
         SEC
         JSL   L0222A8
         PLA
         STA   $E4
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L0460B2
         LDA   $E2
         AND   $E4
         TAY
         BEQ   L0460AA
         LDA   $E4
         EOR   #$FFFF
         PHA
         LDA   $E2
         PLX
         STX   $F6
         AND   $F6
         STA   $E2
         BRA   L0460B0
L0460AA  LDA   $E2
         ORA   $E4
         STA   $E2
L0460B0  BRA   L0460D3
L0460B2  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         BEQ   L0460CD
         LDA   $E4
         EOR   #$FFFF
         PHA
         LDA   $E2
         PLX
         STX   $F6
         AND   $F6
         STA   $E2
         BRA   L0460D3
L0460CD  LDA   $E2
         ORA   $E4
         STA   $E2
L0460D3  LDA   $E2
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         ASL
         PHA
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$007F
         PLX
         STX   $F6
         ORA   $F6
         LDY   #$0002
         STA   [$EE],Y
         LDA   $E2
         AND   #$000F
         PHA
         LDA   $E2
         AND   #$00F0
         LSR
         LSR
         LSR
         LSR
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L04610A
         LDA   #$0000
         BRA   L04610D
L04610A  LDA   #$0001
L04610D  PHA
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0001
         PLX
         STX   $F2
         CMP   $F2
         BNE   L046127
         LDA   #$0000
         BRA   L04612A
L046127  LDA   #$0001
L04612A  STA   $E4
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         AND   #$0003
         CMP   #$0003
         BNE   L046161
         PEI   $DA
         PEI   $DC
         PEI   $DE
         LDA   $E4
         BEQ   L04614B
         LDA   #$0000
         BRA   L04614E
L04614B  LDA   #$0001
L04614E  PHA
         PEI   $F0
         PEI   $EE
         JSL   L043D8F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L046187
L046161  LDA   $E4
         BEQ   L046187
         PEI   $DA
         PEI   $DC
         PEI   $DE
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         LSR
         AND   #$0003
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L043D8F
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L046187  BRL   L046206
L04618A  LDA   $E0
         CMP   #$0007
         BCC   L04619A
         LDA   $E0
         CMP   #$000A
         BEQ   L0461A8
         BCC   L0461A8
L04619A  LDA   $E0
         CMP   #$000E
         BEQ   L0461A8
         LDA   $E0
         CMP   #$000F
         BNE   L0461EE
L0461A8  LDA   #$000E
         PHA
         LDA   $E8
         CLC
         JSL   L0222DF
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         PLX
         STX   $F2
         CMP   $F2
         BNE   L0461EE
         PEI   $FF
         PEI   $FD
         PEI   $F0
         PEI   $EE
         JSL   L045BE5
         PLY
         PLY
         PLY
         PLY
         LDY   #$0004
         LDA   [$EE],Y
         LSR
         LSR
         AND   #$0001
         TAY
         BEQ   L0461EC
         LDY   #$0002
         LDA   [$EE],Y
         AND   #$FF80
         LDY   #$0002
         STA   [$EE],Y
L0461EC  BRA   L046206
L0461EE  LDA   $E0
         CMP   #$0012
         BNE   L046206
         STZ   L0303A9
         LDA   #$0001
         STA   L030038
         PEA   $0001
         JSL   L0D3ED4
         PLY
L046206  PEI   $E8
         JSL   L060D39
         PLY
         STA   $E8
         BRL   L045EAA
L046212  JSL   L043C22
         TSC
         CLC
         ADC   #$001E
         TCS
         PLD
         RTL

L04621E  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E0
         TCS
         LDA   L03008A
         CMP   L030046
         BNE   L046257
         LDA   L030040
         CMP   $FD
         BNE   L046257
         LDA   L030042
         CMP   $FF
         BNE   L046257
         PEI   $FF
         PEI   $FD
         PEI   $FF
         PEI   $FD
         PEA   $FFFF
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L0A4763
L046257  PEI   $FF
         PEI   $FD
         JSL   L06260C
         PLY
         PLY
         STA   $E6
         CMP   #$FFFE
         BEQ   L04627B
         PEI   $FF
         PEI   $FD
         PEI   $FF
         PEI   $FD
         PEI   $E6
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
L04627B  PEI   $FF
         PEI   $FD
         JSL   L060E9E
         PLY
         PLY
         STA   $E6
         LDA   $E6
         STA   $E4
         STZ   $E2
L04628D  LDA   $E6
         CMP   #$FFFE
         BEQ   L0462B7
         LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0004
         BEQ   L0462AC
         BCC   L0462AC
         INC   $E2
L0462AC  PEI   $E6
         JSL   L060D39
         PLY
         STA   $E6
         BRA   L04628D
L0462B7  LDA   $E4
         STA   $E6
L0462BB  LDA   $E6
         CMP   #$FFFE
         BNE   L0462C5
         BRL   L0464B6
L0462C5  LDA   $E2
         BNE   L0462CC
         BRL   L0464B6
L0462CC  DEC   $E2
         PEI   $E6
         JSL   L060D39
         PLY
         STA   $E4
         LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         STA   $E8
         LDA   $E8
         CMP   #$0004
         BEQ   L046304
         BCC   L046304
         PEI   $FF
         PEI   $FD
         PEI   $FF
         PEI   $FD
         PEI   $E6
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
L046304  LDA   $E8
         CMP   #$000E
         BEQ   L04630E
         BRL   L0463F2
L04630E  PEI   $E6
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0006
         LDA   [$EE],Y
         LDX   #$0000
         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
         STX   $EC
         STA   $EA
         LDA   L030260
         AND   #$001F
         PHA
         PHA
         LDY   #$0008
         LDA   [$EA],Y
         AND   #$FFE0
         STA   $F6
         PLA
         ORA   $F6
         LDY   #$0008
         STA   [$EA],Y
         PLA
         LDA   L030262
         AND   #$001F
         PHA
         PHA
         LDY   #$0008
         LDA   [$EA],Y
         AND   #$FC1F
         STA   $F6
         PLA
         ASL
         ASL
         ASL
         ASL
         ASL
         ORA   $F6
         LDY   #$0008
         STA   [$EA],Y
         PLA
         LDA   L030266
         AND   #$0003
         PHA
         PHA
         LDY   #$0008
         LDA   [$EA],Y
         AND   #$F3FF
         STA   $F6
         PLA
         XBA
         AND   #$FF00
         ASL
         ASL
         ORA   $F6
         LDY   #$0008
         STA   [$EA],Y
         PLA
         LDA   #$000E
         PHA
         LDA   L030268
         CLC
         JSL   L0222A8
         LDA   $E6
         AND   #$3FFF
         PLX
         STX   $F6
         ORA   $F6
         LDY   #$0006
         STA   [$EA],Y
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030264
         LDX   #$0000
         SEC
         JSL   L0222B8
         LDY   #$0002
         LDA   [$EA],Y
         TAX
         LDA   [$EA]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$EA],Y
         PLA
         STA   [$EA]
         BRL   L0464AF
L0463F2  LDA   $E8
         CMP   #$000F
         BEQ   L0463FC
         BRL   L0464AF
L0463FC  LDA   #$0000
         STA   $E8
         LDX   L0303E3
         LDA   L0303E1
         STX   $EC
         STA   $EA
         BRL   L0464A5
L04640E  LDY   #$0004
         LDA   [$EA],Y
         AND   #$00FF
         CMP   #$0019
         BNE   L04648C
         LDY   #$0008
         LDA   [$EA],Y
         CMP   $E6
         BNE   L04648C
         LDA   L030260
         SEP   #$20
         LDY   #$0006
         STA   [$EA],Y
         REP   #$20
         LDA   L030262
         SEP   #$20
         LDY   #$0007
         STA   [$EA],Y
         REP   #$20
         LDA   #$000E
         PHA
         LDA   L030268
         CLC
         JSL   L0222A8
         LDA   $E6
         AND   #$3FFF
         PLX
         STX   $F6
         ORA   $F6
         LDY   #$0008
         STA   [$EA],Y
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030264
         LDX   #$0000
         SEC
         JSL   L0222B8
         LDY   #$0002
         LDA   [$EA],Y
         TAX
         LDA   [$EA]
         AND   #$FFFF
         PHA
         TXA
         AND   #$00FF
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$EA],Y
         PLA
         STA   [$EA]
L04648C  LDX   $EC
         LDA   $EA
         PHX
         PHA
         CLC
         ADC   #$0010
         STA   $EA
         LDA   $EC
         BCC   L04649D
         INC
L04649D  STA   $EC
         PLA
         PLX
         LDA   $E8
         INC   $E8
L0464A5  LDA   $E8
         CMP   L0303DF
         BCS   L0464AF
         BRL   L04640E
L0464AF  LDA   $E4
         STA   $E6
         BRL   L0462BB
L0464B6  TSC
         CLC
         ADC   #$0016
         TCS
         PLD
         RTL

L0464BE  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
         LDX   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L04653C
         LDA   [$EE]
         AND   #$00FF
         AND   #$0008
         TAY
         BEQ   L046530
         LDA   #$0001
         BRA   L046533
L046530  LDA   #$0000
L046533  SEP   #$20
         LDY   #$0009
         STA   [$FD],Y
         REP   #$20
L04653C  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0000
         BNE   L046563
         LDA   [$EE]
         AND   #$00FF
         ORA   #$0008
         SEP   #$20
         STA   [$EE]
         REP   #$20
         PEI   $EA
         PEI   $EC
         JSL   L04621E
         PLY
         PLY
         BRA   L046571
L046563  LDA   [$EE]
         AND   #$00FF
         AND   #$FFF7
         SEP   #$20
         STA   [$EE]
         REP   #$20
L046571  TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L046579  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
         LDX   #$0000
         PHX
         PHA
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDX   #$0000
         STX   $F6
         ASL
         ROL   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L0300A2
         LDA   L0300A0
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         TAX
         LDA   [$F2]
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0002
         BNE   L0465F7
         LDA   [$EE]
         AND   #$00FF
         AND   #$0008
         TAY
         BEQ   L0465EB
         LDA   #$0001
         BRA   L0465EE
L0465EB  LDA   #$0000
L0465EE  SEP   #$20
         LDY   #$0009
         STA   [$FD],Y
         REP   #$20
L0465F7  LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$0000
         BNE   L04661E
         LDA   [$EE]
         AND   #$00FF
         ORA   #$0008
         SEP   #$20
         STA   [$EE]
         REP   #$20
         PEI   $EA
         PEI   $EC
         JSL   L04621E
         PLY
         PLY
         BRA   L04662C
L04661E  LDA   [$EE]
         AND   #$00FF
         AND   #$FFF7
         SEP   #$20
         STA   [$EE]
         REP   #$20
L04662C  TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L046634  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E6
         TCS
         STZ   $E8
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
L046655  LDA   L03008A
         CMP   L030046
         BNE   L04666B
         LDA   L030040
         CMP   $EC
         BNE   L04666B
         LDA   L030042
         CMP   $EA
         BEQ   L0466B5
L04666B  PEI   $EA
         PEI   $EC
         JSL   L06260C
         PLY
         PLY
         CMP   #$FFFE
         BNE   L0466B5
         LDY   #$0004
         LDA   [$FD],Y
         AND   #$00FF
         CMP   #$003D
         BNE   L046699
         PEA   $0001
         PEI   $EA
         PEI   $EC
         PEA   $0011
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
L046699  PEI   $EA
         PEI   $EC
         PEA   $0000
         PEA   $FFFF
         LDY   #$0008
         LDA   [$FD],Y
         PHA
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
         BRL   L046757
L0466B5  LDA   $E8
         BEQ   L0466BC
         BRL   L046730
L0466BC  LDA   #$0001
         STA   $E8
         LDY   #$0008
         LDA   [$FD],Y
         PHA
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         CMP   #$0017
         BEQ   L0466E0
         BRL   L04672C
L0466E0  JSL   L020599
         TAY
         BEQ   L0466EA
         BRL   L04672C
L0466EA  JSL   L020599
         BRL   L04670F
L0466F1  DEC   $EC
         BRL   L04671C
L0466F6  INC   $EC
         BRL   L04671C
L0466FB  DEC   $EA
         BRL   L04671C
L046700  INC   $EA
L046702  BRL   L04671C
L046705  DA    L0466F1
         DA    L0466F6
         DA    L0466FB
         DA    L046700
         DA    L046702
L04670F  CMP   #$0004
         BCC   L046717
         LDA   #$0004
L046717  ASL
         TAX
         JMP   (L046705,X)

L04671C  PEI   $EA
         PEI   $EC
         JSL   L04171D
         PLY
         PLY
         TAY
         BEQ   L04672C
         BRL   L046655
L04672C  BRA   L046730
         BRA   L046757
L046730  LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         CLC
         ADC   #$0005
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
L046757  TSC
         CLC
         ADC   #$0010
         TCS
         PLD
         RTL

L04675F  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EA
         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   #$FFFF
         LDY   #$002C
         STA   [$F0],Y
         LDY   #$0030
         LDA   [$F0],Y
         AND   #$FFF7
         LDY   #$0030
         STA   [$F0],Y
         LDY   #$0020
         LDA   [$F0],Y
         AND   #$00FF
         CMP   #$00FF
         BEQ   L0467E0
         LDY   #$0020
         LDA   [$F0],Y
         AND   #$00FF
         LDX   #$0000
         PHX
         PHA
         LDA   #L05497E
         LDX   #^L05497E
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         AND   #$00FF
         PHA
         LDY   #$0040
         LDA   [$F0],Y
         PLX
         STX   $F8
         SEC
         SBC   $F8
         LDY   #$0040
         STA   [$F0],Y
L0467E0  LDY   #$0034
         LDA   [$F0],Y
         BNE   L0467EA
         BRL   L046882
L0467EA  LDY   #$0020
         LDA   [$F0],Y
         AND   #$00FF
         CMP   #$0020
         BEQ   L0467FA
         BRL   L04686E
L0467FA  LDA   $F0
         CLC
         ADC   #$00D3
         LDX   $F2
         BCC   L046805
         INX
L046805  STA   $F4
         STX   $F6
         LDA   [$F4]
         CMP   #$FFFF
         BEQ   L046813
         BRL   L04686E
L046813  LDA   #$000C
         STA   $EE
         PHA
         PEA   $0001
         PEI   $FF
         JSL   L0A4598
         PLY
         PLY
         PLY
         TAY
         BEQ   L046841
L046828  PEA   $0000
         PEI   $EE
         PEI   $FF
         JSL   L0A4E78
         PLY
         PLY
         PHA
         PEI   $FF
         JSL   L0A516C
         PLY
         PLY
         PLY
         BRA   L04686E
L046841  STZ   $EC
         BRA   L046861
L046845  LDA   $EC
         CLC
         ADC   #$0007
         STA   $EE
         PHA
         PEA   $0001
         PEI   $FF
         JSL   L0A4598
         PLY
         PLY
         PLY
         TAY
         BEQ   L04685F
         BRA   L046828
L04685F  INC   $EC
L046861  LDA   $EC
         SEC
         SBC   #$0003
         BVS   L04686C
         EOR   #$8000
L04686C  BPL   L046845
L04686E  LDY   #$0030
         LDA   [$F0],Y
         ORA   #$8000
         LDY   #$0030
         STA   [$F0],Y
         PEI   $FF
         JSL   L0A3E20
         PLY
L046882  LDA   #$00FF
         SEP   #$20
         LDY   #$0020
         STA   [$F0],Y
         REP   #$20
         TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L046896  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EE
         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   #$FFFF
         LDY   #$002E
         STA   [$F0],Y
         LDY   #$0034
         LDA   [$F0],Y
         BNE   L0468D3
         BRA   L046909
L0468D3  LDA   $FF
         CLC
         ADC   #$0001
         PHA
         LDA   L030160
         PLX
         STX   $F4
         CMP   $F4
         BNE   L0468F5
         JSL   L082EE5
         PEI   $FF
         JSL   L0A1E52
         PLY
         JSL   L082F35
         BRA   L046909
L0468F5  LDY   #$0030
         LDA   [$F0],Y
         ORA   #$0080
         LDY   #$0030
         STA   [$F0],Y
         PEI   $FF
         JSL   L0A3E20
         PLY
L046909  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L046913  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DE
         TCS
         LDY   #$0006
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EC
         LDY   #$0007
         LDA   [$FD],Y
         AND   #$00FF
         STA   $EA
         LDY   #$0008
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E8
         LDY   #$0005
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E0
         LDY   #$0009
         LDA   [$FD],Y
         AND   #$00FF
         STA   $E2
         BRL   L046A65
L046953  PEI   $E8
         PEI   $EA
         PEI   $EC
         PEA   $0000
         PEA   $FFE4
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         CLC
         ADC   #$0005
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
L046985  DEC   $E2
         LDA   $E2
         SEP   #$20
         LDY   #$0009
         STA   [$FD],Y
         REP   #$20
         PEI   $FF
         PEI   $FD
         JSL   L044ED1
         PLY
         PLY
         BRL   L046A72
L04699F  PEI   $EA
         PEI   $EC
         JSL   L060E4D
         PLY
         PLY
         STA   $E6
L0469AB  LDA   $E6
         CMP   #$FFFE
         BNE   L0469B5
         BRL   L046A49
L0469B5  LDA   #$000E
         PHA
         LDA   $E6
         CLC
         JSL   L0222DF
         PLA
         CMP   $E8
         BNE   L046A3D
         LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$000A
         BNE   L046A3D
         PEI   $E6
         JSL   L020B37
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0093
         BNE   L046A3D
         PEI   $E6
         JSL   L060C4E
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0002
         LDA   [$EE],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$0003
         CMP   $E0
         BNE   L046A3D
         PEI   $EA
         PEI   $EC
         PEA   $0000
         PEI   $E6
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         LDY   #$0002
         LDA   [$FD],Y
         TAX
         LDA   [$FD]
         PHX
         PHA
         CLC
         ADC   #$0001
         STA   [$FD]
         LDY   #$0002
         LDA   [$FD],Y
         BCC   L046A33
         INC
L046A33  LDY   #$0002
         STA   [$FD],Y
         PLA
         PLX
         BRL   L046985
L046A3D  PEI   $E6
         JSL   L060D39
         PLY
         STA   $E6
         BRL   L0469AB
L046A49  BRL   L046A72
L046A4C  LDY   #$0005
         LDA   [$FD],Y
         AND   #$00FF
         PHA
         JSL   L0A3363
         PLY
L046A5A  BRL   L046A72
L046A5D  DA    L046A4C
         DA    L04699F
         DA    L046953
         DA    L046A5A
L046A65  CMP   #$0003
         BCC   L046A6D
         LDA   #$0003
L046A6D  ASL
         TAX
         JMP   (L046A5D,X)

L046A72  TSC
         CLC
         ADC   #$0018
         TCS
         PLD
         RTL

L046A7A  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00E4
         TCS
         LDA   #$0035
         SEP   #$20
         STA   $EA
         REP   #$20
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$012C
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   L0303EF
         STA   L0303ED
         STX   $E8
         STA   $E6
         PEA   $0000
         TDC
         CLC
         ADC   #$00E6
         PHA
         JSL   L044ED1
         PLY
         PLY
         TSC
         CLC
         ADC   #$0016
         TCS
         PLD
         RTL

L046AC0  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00DA
         TCS
         LDY   #$0006
         LDA   [$FD],Y
         STA   $DE
         CMP   #$0000
         BNE   L046ADA
         BRL   L046BBB
L046ADA  LDA   $DE
         SEC
         SBC   #$0000
         BVS   L046AE5
         EOR   #$8000
L046AE5  BPL   L046AEC
         LDA   #$0000
         BRA   L046AEF
L046AEC  LDA   #$0001
L046AEF  STA   $DC
         TAY
         BEQ   L046AFC
         LDA   $DE
         EOR   #$FFFF
         INC
         STA   $DE
L046AFC  LDA   $DE
         SEC
         SBC   #$0001
         STA   $E0
         LDA   $E0
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0585CC
         LDX   #^L0585CC
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $DE
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0585CC
         LDX   #^L0585CC
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $DE
         LDA   $DC
         BEQ   L046B55
         LDA   $DE
         EOR   #$FFFF
         INC
         STA   $DE
         LDA   $E0
         EOR   #$FFFF
         INC
         STA   $E0
L046B55  LDAL  L056150
         CLC
         ADC   $DE
         STAL  L056150
         LDA   $E0
         BEQ   L046BBB
         LDA   #$0046
         SEP   #$20
         STA   $E6
         REP   #$20
         LDA   $E0
         STA   $E8
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDA   L030046
         LDX   #$0000
         TAY
         BPL   L046B83
         DEX
L046B83  SEC
         JSL   L0222B8
         LDX   L030050
         LDA   L03004E
         CLC
         ADC   #$0004
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         JSL   L021F9F
         PLA
         PLX
         STX   $E4
         STA   $E2
         LDA   #$0000
         SEP   #$20
         STA   $E7
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$00E2
         PHA
         JSL   L044ED1
         PLY
         PLY
L046BBB  TAY
         TSC
         CLC
         ADC   #$001C
         TCS
         TYA
         PLD
         RTL

L046BC5  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EA
         TCS
         LDA   #$000A
         PHA
         LDA   $FD
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $F9
         CLC
         ADC   #$00D3
         LDX   $FB
         BCC   L046BE7
         INX
L046BE7  JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0005
         BNE   L046C1C
         PEI   $FF
         PEI   $FD
         PEI   $F7
         JSL   L0A4E78
         PLY
         PLY
         PHA
         PEI   $F7
         JSL   L0A516C
         PLY
         PLY
         PLY
         LDA   #$0001
         BRA   L046C1F
L046C1C  LDA   #$0000
L046C1F  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L046C29  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EA
         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
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$00D3
         LDX   $F0
         BCC   L046C68
         INX
L046C68  JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         CMP   #$FFFF
         BEQ   L046C7B
         BRA   L046CBE
L046C7B  PEI   $FF
         PEA   $000C
         PEI   $F0
         PEI   $EE
         PEI   $FD
         JSL   L046BC5
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L046C94
         BRA   L046CBE
L046C94  LDA   #$0007
         STA   $EC
         BRA   L046CB5
L046C9B  PEI   $FF
         PEI   $EC
         PEI   $F0
         PEI   $EE
         PEI   $FD
         JSL   L046BC5
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BEQ   L046CB3
         BRA   L046CBE
L046CB3  INC   $EC
L046CB5  LDA   $EC
         CMP   #$0009
         BEQ   L046C9B
         BCC   L046C9B
L046CBE  TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PLD
         RTL

L046CC8  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         STZ   $F4
         BRA   L046D07
L046CD7  LDA   $F4
         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   #$1000
         LDY   #$0030
         STA   [$F6],Y
         INC   $F4
L046D07  LDA   $F4
         CMP   L03003E
         BCC   L046CD7
         JSL   L0A4571
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L046D1A  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00DE
         TCS
L046D25  JSL   L045308
         TAY
         BNE   L046D2F
         BRL   L0470B3
L046D2F  LDX   #$0000
         TDC
         CLC
         ADC   #$00E0
         STX   $F4
         STA   $F2
         PEI   $F4
         PEI   $F2
         JSL   L0452A3
         PLY
         PLY
         LDX   #$0000
         LDA   #$0018
         PHX
         PHA
         LDX   $E2
         LDA   $E0
         SEC
         JSL   L022303
         PLA
         PLX
         PHA
         JSL   L062325
         PLY
         LDA   $E4
         AND   #$00FF
         STA   $F0
         LDA   $F0
         CMP   #$001C
         BEQ   L046D94
         BCC   L046D94
         LDA   $F0
         CMP   #$002A
         BCS   L046D94
         LDA   $E8
         AND   #$00FF
         PHA
         PEI   $F0
         LDA   $E7
         AND   #$00FF
         PHA
         LDA   $E6
         AND   #$00FF
         PHA
         JSL   L064FFA
         PLY
         PLY
         PLY
         PLY
         BRL   L0470A7
L046D94  LDA   $F0
         BRL   L047094
L046D99  PEI   $F4
         PEI   $F2
         JSL   L040D29
         PLY
         PLY
         BRL   L0470A7
L046DA6  PEI   $F4
         PEI   $F2
         JSL   L04538C
         PLY
         PLY
         BRL   L0470A7
L046DB3  PEI   $F4
         PEI   $F2
         JSL   L04118D
         PLY
         PLY
         BRL   L0470A7
L046DC0  PEI   $F4
         PEI   $F2
         JSL   L04564E
         PLY
         PLY
         BRL   L0470A7
L046DCD  PEI   $F4
         PEI   $F2
         JSL   L045783
         PLY
         PLY
         BRL   L0470A7
L046DDA  PEI   $F4
         PEI   $F2
         JSL   L0457ED
         PLY
         PLY
         BRL   L0470A7
L046DE7  PEI   $F4
         PEI   $F2
         JSL   L046579
         PLY
         PLY
         BRL   L0470A7
L046DF4  PEI   $F4
         PEI   $F2
         JSL   L0464BE
         PLY
         PLY
         BRL   L0470A7
L046E01  PEI   $F4
         PEI   $F2
         JSL   L045E77
         PLY
         PLY
         BRL   L0470A7
L046E0E  PEI   $F4
         PEI   $F2
         JSL   L0458B7
         PLY
         PLY
         BRL   L0470A7
L046E1B  PEI   $F4
         PEI   $F2
         JSL   L046634
         PLY
         PLY
         BRL   L0470A7
L046E28  PEI   $F4
         PEI   $F2
         JSL   L045B69
         PLY
         PLY
         BRL   L0470A7
L046E35  PEA   $0001
         LDA   $E7
         AND   #$00FF
         PHA
         LDA   $E6
         AND   #$00FF
         PHA
         PEI   $E8
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         BRL   L0470A7
L046E51  LDA   L030038
         BNE   L046E7F
         LDA   $E7
         AND   #$00FF
         PHA
         LDA   $E6
         AND   #$00FF
         PHA
         PEA   $0000
         PEI   $E8
         JSL   L061113
         PLY
         PLY
         PLY
         PLY
         PEI   $E8
         JSL   L060C4E
         PLY
         STX   $F4
         STA   $F2
         LDA   #$FFFF
         STA   [$F2]
L046E7F  BRL   L0470A7
L046E82  PEA   ^L050036
         PEA   L050036
         JSL   L066467
         PLY
         PLY
         TAY
         BNE   L046E97
         LDA   #$0088
         STA   L0303D3
L046E97  BRL   L0470A7
L046E9A  LDA   $E5
         AND   #$00FF
         PHA
         JSL   L04675F
         PLY
         LDA   $E6
         AND   #$00FF
         BEQ   L046EC2
         LDA   $E6
         AND   #$00FF
         SEC
         SBC   #$0001
         PHA
         LDA   $E5
         AND   #$00FF
         PHA
         JSL   L046C29
         PLY
         PLY
L046EC2  BRL   L046F6C
L046EC5  LDA   $E5
         AND   #$00FF
         PHA
         JSL   L046896
         PLY
         BRL   L0470A7
L046ED3  PEI   $F4
         PEI   $F2
         JSL   L046A7A
         PLY
         PLY
         BRL   L0470A7
L046EE0  LDA   L030046
         PHA
         JSL   L062325
         PLY
         PEI   $F4
         PEI   $F2
         JSL   L046AC0
         PLY
         PLY
         JSL   L0A03FC
         BRL   L0470A7
L046EFA  LDAL  L0561A6
         DEC
         SEP   #$20
         STAL  L0561A6
         REP   #$20
         BRL   L0470A7
L046F0A  LDA   $E5
         AND   #$00FF
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0111
         LDA   [$F6],Y
         SEC
         SBC   $E6
         LDY   #$0111
         STA   [$F6],Y
         LDA   $E5
         AND   #$00FF
         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   #$1000
         LDY   #$0030
         STA   [$F6],Y
L046F6C  LDA   $E5
         AND   #$00FF
         PHA
         JSL   L0A3E20
         PLY
         BRL   L0470A7
L046F7A  LDAL  L056152
         DEC
         SEP   #$20
         STAL  L056152
         REP   #$20
         BRL   L0470A7
L046F8A  LDAL  L056154
         SEC
         SBC   $E6
         STAL  L056154
L046F95  JSL   L046CC8
         BRL   L0470A7
L046F9C  LDAL  L056158
         SEC
         SBC   $E6
         STAL  L056158
         BRA   L046F95
L046FA9  LDAL  L056156
         SEC
         SBC   $E6
         STAL  L056156
         BRA   L046F95
L046FB6  LDA   $E5
         AND   #$00FF
         STA   $F0
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$002A
         LDA   [$F6],Y
         PHA
         DEC
         SEP   #$20
         LDY   #$002A
         STA   [$F6],Y
         REP   #$20
         PLA
         PEI   $E6
         PEI   $F0
         JSL   L0A723F
         PLY
         PLY
         BRL   L0470A7
L046FFA  PEI   $F4
         PEI   $F2
         JSL   L046913
         PLY
         PLY
         BRL   L0470A7
L047007  LDAL  L056153
         DEC
         SEP   #$20
         STAL  L056153
         REP   #$20
         BRL   L0470A7
L047017  BRL   L0470A7
L04701A  DA    L046DA6
         DA    L046DCD
         DA    L046E0E
         DA    L046E01
         DA    L046DC0
         DA    L046DF4
         DA    L046DE7
         DA    L046DDA
         DA    L046E9A
         DA    L046EC5
         DA    L046FFA
         DA    L046E35
         DA    L046E82
         DA    L046E51
         DA    L046DB3
         DA    L046D99
         DA    L046D99
         DA    L046ED3
         DA    L046E1B
         DA    L046E1B
         DA    L046E28
         DA    L046EE0
         DA    L046EFA
         DA    L046F0A
         DA    L046F7A
         DA    L046F8A
         DA    L046FB6
         DA    L046F9C
         DA    L046FA9
         DA    L047007
         DA    L047017
L047058  DW    $0001
         DW    $0002
         DW    $0005
         DW    $0006
         DW    $0007
         DW    $0008
         DW    $0009
         DW    $000A
         DW    $000B
         DW    $000C
         DW    $000D
         DW    $0014
         DW    $0016
         DW    $0018
         DW    $0019
         DW    $0030
         DW    $0031
         DW    $0035
         DW    $003C
         DW    $003D
         DW    $0041
         DW    $0046
         DW    $0047
         DW    $0048
         DW    $0049
         DW    $004A
         DW    $004B
         DW    $004D
         DW    $004E
         DW    $004F
L047094  TAX
         PEA   ^L047058
         PEA   L047058
         LDA   #$003A
         JSL   L022262
         PLA
         PLA
         JMP   (L04701A,X)

L0470A7  LDA   L030046
         PHA
         JSL   L062325
         PLY
         BRL   L046D25
L0470B3  TSC
         CLC
         ADC   #$001C
         TCS
         PLD
         RTL

