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

         mx	%00
	rel
	dsk	START.L
	lst	off

	use	START.X

L0D0000  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E4
         TCS
         LDA   #$0000
         SEP   #$20
         STA   [$F7]
         REP   #$20
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         PEA   $007E
         PEI   $FD
         PEI   $FB
         JSL   L0223B9
         PLY
         PLY
         PLY
         STX   $EA
         STA   $E8
         JSL   L022171
         BNE   L0D0037
         BRL   L0D00CC
L0D0037  LDX   $FD
         LDA   $FB
         PHX
         PHA
         LDX   $EA
         LDA   $E8
         JSL   L02209A
         PLA
         PLX
         STA   $E6
         PHA
         PEI   $FD
         PEI   $FB
         PEI   $F9
         PEI   $F7
         JSL   L022619
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $E6
         LDX   #$0000
         PHX
         PHA
         LDX   $F9
         LDA   $F7
         JSL   L021F00
         PLA
         PLX
         STA   $EC
         STX   $EE
         LDA   #$0000
         SEP   #$20
         STA   [$EC]
         REP   #$20
         LDA   L030144
         BNE   L0D0085
         LDA   $FF
         CMP   #$0001
         BNE   L0D009B
L0D0085  LDX   L030152
         LDA   L030150
         PHX
         PHA
         PEI   $F9
         PEI   $F7
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         BRA   L0D00AF
L0D009B  LDX   L030156
         LDA   L030154
         PHX
         PHA
         PEI   $F9
         PEI   $F7
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
L0D00AF  LDX   $EA
         LDA   $E8
         CLC
         ADC   #$0001
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         PHX
         PHA
         PEI   $F9
         PEI   $F7
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
L0D00CC  TSC
         CLC
         ADC   #$000C
         TCS
         PLD
         RTL

L0D00D4  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDA   $FF
         LDX   #$0000
         STX   $EE
         STA   $EC
         JSL   L022171
         BNE   L0D00FC
         LDA   #$0001
         BRL   L0D0189
L0D00FC  LDA   L0303B9
         BNE   L0D0104
         BRL   L0D0174
L0D0104  SEC
         LDA   $EC
         SBC   L0303BF
         BNE   L0D0113
         LDA   $EE
         SBC   L0303C1
         BRA   L0D011A
L0D0113  LDA   $EE
         SBC   L0303C1
         REP   #$02
L0D011A  BEQ   L0D0129
         BVS   L0D0121
         EOR   #$8000
L0D0121  BPL   L0D0129
         LDA   #$0000
         BRL   L0D0189
L0D0129  LDX   $EE
         LDA   $EC
         PHA
         PEI   $FD
         PEI   $FB
         LDX   L0303BD
         LDA   L0303BB
         PHX
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDX   L0303BD
         LDA   L0303BB
         CLC
         ADC   $EC
         PHA
         TXA
         ADC   $EE
         TAX
         PLA
         STX   L0303BD
         STA   L0303BB
         LDX   L0303C1
         LDA   L0303BF
         SEC
         SBC   $EC
         PHA
         TXA
         SBC   $EE
         TAX
         PLA
         STX   L0303C1
         STA   L0303BF
         LDA   #$0001
         BRA   L0D0189
         BRA   L0D0189
L0D0174  PEI   $FD
         PEI   $FB
         PEI   $EE
         PEI   $EC
         LDA   L0303A1
         PHA
         JSL   L081ACB
         PLY
         PLY
         PLY
         PLY
         PLY
L0D0189  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0D0193  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         LDX   #$0000
         LDA   #$0000
         PHX
         PHA
         LDA   $FF
         LDX   #$0000
         STX   $EE
         STA   $EC
         JSL   L022171
         BNE   L0D01BA
         LDA   #$0001
         BRA   L0D01CF
L0D01BA  PEI   $FD
         PEI   $FB
         PEI   $EE
         PEI   $EC
         LDA   L0303A1
         PHA
         JSL   L081B35
         PLY
         PLY
         PLY
         PLY
         PLY
L0D01CF  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0D01D9  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         LDA   $FD
         STA   $EC
L0D01E8  LDA   [$F9]
         PHA
         LDA   $EC
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $EC
         LDA   [$F9]
         EOR   $FD
         STA   [$F9]
         LDX   $FB
         LDA   $F9
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $F9
         LDA   $FB
         BCC   L0D020C
         INC
L0D020C  STA   $FB
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   [$EE]
         PHA
         LDA   $EC
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $EC
         LDA   $FD
         CLC
         ADC   $FF
         STA   $FD
         DEC   $FF
         LDA   $FF
         BNE   L0D01E8
         LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0D023A  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00EA
         TCS
         LDA   $FD
         STA   $EC
L0D0249  LDA   [$F9]
         PHA
         LDA   $EC
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $EC
         LDX   $FB
         LDA   $F9
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $F9
         LDA   $FB
         BCC   L0D0267
         INC
L0D0267  STA   $FB
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   [$EE]
         EOR   $FD
         PHA
         LDA   $EC
         PLX
         STX   $F2
         CLC
         ADC   $F2
         STA   $EC
         LDA   $FD
         CLC
         ADC   $FF
         STA   $FD
         DEC   $FF
         LDA   $FF
         BNE   L0D0249
         LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0D0297  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00EA
         TCS
         PEI   $FB
         PEI   $F9
         PEI   $F7
         JSL   L0D00D4
         PLY
         PLY
         PLY
         TAY
         BEQ   L0D02C8
         LDA   $FB
         LSR
         PHA
         PEI   $FD
         PEI   $F9
         PEI   $F7
         JSL   L0D01D9
         PLY
         PLY
         PLY
         PLY
         CMP   $FF
         BEQ   L0D02CD
L0D02C8  LDA   #$0000
         BRA   L0D02D0
L0D02CD  LDA   #$0001
L0D02D0  TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L0D02DA  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E4
         TCS
         LDA   $F9
         LSR
         STA   $E6
         PHA
         PEI   $FB
         PEI   $F7
         PEI   $F5
         JSL   L0D01D9
         PLY
         PLY
         PLY
         PLY
         STA   [$FD]
         PEI   $F9
         PEI   $F7
         PEI   $F5
         JSL   L0D0193
         PLY
         PLY
         PLY
         STA   $E8
         PEI   $E6
         PEI   $FB
         PEI   $F7
         PEI   $F5
         JSL   L0D01D9
         PLY
         PLY
         PLY
         PLY
         LDA   $E8
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0D0326  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         STZ   $EA
         PEI   $FF
         PEI   $F9
         PEI   $F7
         JSL   L0D00D4
         PLY
         PLY
         PLY
         TAY
         BNE   L0D0348
         LDA   #$0000
         BRA   L0D0379
L0D0348  LDA   $FF
         DEC   $FF
         TAY
         BEQ   L0D036F
         LDX   $F9
         LDA   $F7
         INC   $F7
         BNE   L0D0359
         INC   $F9
L0D0359  STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         PHA
         LDA   $EA
         PLX
         STX   $F0
         CLC
         ADC   $F0
         STA   $EA
         BRA   L0D0348
L0D036F  LDA   [$FB]
         CLC
         ADC   $EA
         STA   [$FB]
         LDA   #$0001
L0D0379  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0D0383  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00E8
         TCS
         STZ   $EA
         PEI   $FF
         PEI   $F9
         PEI   $F7
         JSL   L0D0193
         PLY
         PLY
         PLY
         TAY
         BNE   L0D03A5
         LDA   #$0000
         BRA   L0D03D6
L0D03A5  LDA   $FF
         DEC   $FF
         TAY
         BEQ   L0D03CC
         LDX   $F9
         LDA   $F7
         INC   $F7
         BNE   L0D03B6
         INC   $F9
L0D03B6  STA   $EC
         STX   $EE
         LDA   [$EC]
         AND   #$00FF
         PHA
         LDA   $EA
         PLX
         STX   $F0
         CLC
         ADC   $F0
         STA   $EA
         BRA   L0D03A5
L0D03CC  LDA   [$FB]
         CLC
         ADC   $EA
         STA   [$FB]
         LDA   #$0001
L0D03D6  TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0D03E0  PHD
         TSC
         SEC
         SBC   #$00F3
         TCD
         ADC   #$00CA
         TCS
         JSL   L082F35
         LDX   L0300E4
         LDA   L0300E2
         STX   $EC
         STA   $EA
         LDX   L0300E8
         LDA   L0300E6
         STX   $E8
         STA   $E6
         LDX   L0300EC
         LDA   L0300EA
         STX   $E4
         STA   $E2
         LDX   L0300F0
         LDA   L0300EE
         STX   $E0
         STA   $DE
         LDX   #$0000
         LDA   #$0000
         STX   L0300F0
         STA   L0300EE
         STX   L0300EC
         STA   L0300EA
         STX   L0300E8
         STA   L0300E6
         LDA   $F9
         SEC
         SBC   #$0001
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $FB
         ASL
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L051A52
         LDX   #^L051A52
         JSL   L021F00
         PLA
         PLX
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDY   #$0002
         LDA   [$EE],Y
         TAX
         LDA   [$EE]
         STX   L0300E4
         STA   L0300E2
         JSL   L0703AA
         LDA   #$0063
         STA   L030070
L0D0475  JSL   L071A00
         JSL   L0901A7
         LDA   L030070
         CMP   #$0063
         BNE   L0D04A2
         LDA   $F9
         CMP   #$0001
         BNE   L0D04A2
         JSL   L081DFE
         TAY
         BEQ   L0D04A2
         JSL   L081E53
         CMP   #$000D
         BNE   L0D04A2
         LDA   #$0001
         STA   L030070
L0D04A2  PEI   $FD
         JSL   L0823EC
         PLY
         TAY
         BEQ   L0D04B1
         LDA   $FF
         STA   L030070
L0D04B1  LDA   L030070
         CMP   #$0063
         BEQ   L0D0475
         STZ   L03012C
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         LDA   L030070
         SEC
         SBC   #$0001
         LDX   #$0000
         PEA   $0000
         PEA   $000C
         CLC
         JSL   L0220EA
         LDX   L0300E4
         LDA   L0300E2
         JSL   L021F00
         PLA
         PLX
         STA   $EE
         STX   $F0
         LDA   $EE
         LDX   $F0
         CLC
         ADC   #$0002
         BCC   L0D04F8
         INX
L0D04F8  PHX
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $CC
         SEC
         SBC   #$0003
         STA   $CC
         LDA   $CE
         CLC
         ADC   #$0003
         STA   $CE
         LDA   $D0
         SEC
         SBC   #$0003
         STA   $D0
         LDA   $D2
         CLC
         ADC   #$0004
         STA   $D2
         JSL   L082EE5
         LDA   #$0001
         STA   L03001A
         LDA   #$0000
         STA   $D4
         LDA   #$0000
         STA   $D8
         LDA   $D2
         SEC
         SBC   $D0
         CLC
         ADC   #$0003
         STA   $DA
         LDA   $CE
         SEC
         SBC   $CC
         CLC
         ADC   #$0003
         STA   $D6
         PEA   $FFFF
         PEA   $00A0
         PEA   $00A0
         PEI   $D0
         PEI   $CC
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         JSL   L0901A7
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $D8
         STA   $DA
         PEA   $0005
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $D4
         STA   $D6
         DEC   $DA
         LDA   $DA
         PEA   $0005
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         DEC   $DA
         LDA   $DA
         STA   $D8
         LDA   $D4
         SEC
         SBC   #$0002
         STA   $D4
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $D6
         STA   $D4
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0005
         JSL   L020447
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         INC   $D8
         LDA   $D8
         STA   $DA
         LDA   $D6
         SEC
         SBC   #$0002
         STA   $D6
         PEA   $0005
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         INC   $D4
         LDA   $D4
         STA   $D6
         LDA   $DA
         DEC   $DA
         PEA   $0005
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         DEC   $D6
         LDA   $D6
         STA   $D4
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $DA
         SEC
         SBC   #$0002
         STA   $DA
         STA   $D8
         LDA   $D4
         INC   $D4
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $DA
         CLC
         ADC   #$0002
         STA   $DA
         STA   $D8
         LDA   $D4
         DEC   $D4
         LDA   $D6
         CLC
         ADC   #$0002
         STA   $D6
         PEA   $000D
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0008
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   $D6
         CLC
         ADC   #$0003
         STA   $D6
         STA   $D4
         LDA   $DA
         CLC
         ADC   #$0002
         STA   $DA
         PEA   $000D
         PEA   $0000
         TDC
         CLC
         ADC   #$00D4
         PHA
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0005
         JSL   L020447
         PLY
         LDA   $CE
         CLC
         ADC   #$0003
         STA   $CE
         LDA   $D2
         CLC
         ADC   #$0003
         STA   $D2
         PEA   $FFFF
         PEA   $00A0
         PEA   $00A0
         PEA   $0000
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00CC
         PHA
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDX   $EC
         LDA   $EA
         STX   L0300E4
         STA   L0300E2
         LDX   $E8
         LDA   $E6
         STX   L0300E8
         STA   L0300E6
         LDX   $E4
         LDA   $E2
         STX   L0300EC
         STA   L0300EA
         LDX   $E0
         LDA   $DE
         STX   L0300F0
         STA   L0300EE
         JSL   L0703AA
         LDA   L030070
         TAY
         TSC
         CLC
         ADC   #$0028
         TCS
         TYA
         PLD
         RTL

L0D086C  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E8
         TCS
         SEC
         LDA   $F9
         SBC   #$0000
         BNE   L0D0886
         LDA   $FB
         SBC   #$0000
         BRA   L0D088D
L0D0886  LDA   $FB
         SBC   #$0000
         REP   #$02
L0D088D  BEQ   L0D08D7
         LDA   #$0001
         PHA
         PEI   $FB
         PEI   $F9
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   $FD
         PLX
         STX   $EE
         SEC
         SBC   $EE
         STA   $FD
         PEI   $FB
         PEI   $F9
         PEA   $0005
         PEA   $0009
         PEI   $FF
         PEI   $FD
         PEA   $0070
         PEI   $F7
         PEI   $F5
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
L0D08D7  TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0D08DF  PHD
         TSC
         SEC
         SBC   #$00EF
         TCD
         ADC   #$00E4
         TCS
         PEI   $F7
         PEI   $F5
         JSL   L022405
         PLY
         PLY
         STA   $E8
         LDA   $E8
         CMP   #$001E
         BEQ   L0D08FF
         BCS   L0D0907
L0D08FF  LDA   #$0000
         BRL   L0D0985
         BRA   L0D0982
L0D0907  PEI   $F7
         PEI   $F5
         PEI   $FB
         PEI   $F9
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         LDA   $E8
         LSR
         STA   $E6
L0D091C  LDA   $E6
         LDX   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   L021F00
         PLA
         PLX
         STA   $EA
         STX   $EC
         LDA   [$EA]
         AND   #$00FF
         CMP   #$0020
         BEQ   L0D0945
         LDA   $E6
         CMP   $E8
         BCS   L0D0945
         INC   $E6
         BRA   L0D091C
L0D0945  LDA   $E6
         LDX   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   L021F00
         PLA
         PLX
         STA   $EA
         STX   $EC
         LDA   #$0000
         SEP   #$20
         STA   [$EA]
         REP   #$20
         LDA   $E6
         CLC
         ADC   #$0001
         LDX   #$0000
         PHX
         PHA
         LDX   $FB
         LDA   $F9
         JSL   L021F00
         PEI   $FF
         PEI   $FD
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
L0D0982  LDA   #$0001
L0D0985  TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0D098F  PHD
         TSC
         SEC
         SBC   #$00DD
         TCD
         ADC   #$0072
         TCS
         PEA   $0000
         PEA   $0000
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         LDX   L030082
         LDA   L030080
         PHX
         PHA
         JSL   L080000
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   ^L057F81
         PEA   L057F81
         PEA   $0001
         PEA   $0002
         PEA   $0007
         PEA   $00C0
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         LDA   #$0001
         STA   $80
         SEC
         LDA   $EF
         SBC   #$0000
         BNE   L0D09F9
         LDA   $F1
         SBC   #$0000
         BRA   L0D0A00
L0D09F9  LDA   $F1
         SBC   #$0000
         REP   #$02
L0D0A00  BEQ   L0D0A04
         INC   $80
L0D0A04  SEC
         LDA   $F3
         SBC   #$0000
         BNE   L0D0A13
         LDA   $F5
         SBC   #$0000
         BRA   L0D0A1A
L0D0A13  LDA   $F5
         SBC   #$0000
         REP   #$02
L0D0A1A  BEQ   L0D0A1E
         INC   $80
L0D0A1E  SEC
         LDA   $F7
         SBC   #$0000
         BNE   L0D0A2D
         LDA   $F9
         SBC   #$0000
         BRA   L0D0A34
L0D0A2D  LDA   $F9
         SBC   #$0000
         REP   #$02
L0D0A34  BEQ   L0D0A38
         INC   $80
L0D0A38  LDA   $FF
         BEQ   L0D0A48
         PEA   ^L05041C
         PEA   L05041C
         JSL   L0D2EEF
         PLY
         PLY
L0D0A48  LDA   $FD
         BEQ   L0D0A5E
         PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
L0D0A5E  STZ   L03012C
         LDA   $80
         CMP   #$0001
         BEQ   L0D0A6B
         BRL   L0D0AF5
L0D0A6B  PEA   $0000
         PEA   $0000
         PEA   $20D0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   $76
         STA   $74
         PEA   $FFFF
         PEA   $0070
         PEA   $0070
         PEA   $000E
         PEA   $0000
         PEA   ^L0518E2
         PEA   L0518E2
         PEI   $76
         PEI   $74
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         PEA   $FFFF
         PEA   $0070
         PEA   ^L0518EA
         PEA   L0518EA
         PEI   $76
         PEI   $74
         JSL   L0203C3
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0000
         PEA   $20D0
         JSL   L0B0175
         PLY
         PLY
         PEA   $0072
         PEA   $0070
         PEI   $ED
         PEI   $EB
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRL   L0D0C89
L0D0AF5  LDA   $80
         CMP   #$0002
         BEQ   L0D0AFF
         BRL   L0D0B6F
L0D0AFF  PEA   $FFFF
         PEA   $0070
         PEA   $0070
         PEA   $0034
         PEA   $0066
         PEA   ^L0518F2
         PEA   L0518F2
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         PEA   $004D
         PEA   $0070
         PEI   $ED
         PEI   $EB
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0072
         PEA   $0070
         PEI   $F1
         PEI   $EF
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRL   L0D0C89
L0D0B6F  LDA   $80
         CMP   #$0003
         BEQ   L0D0B79
         BRL   L0D0BD6
L0D0B79  PEA   $004D
         PEA   $0070
         PEI   $ED
         PEI   $EB
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0072
         PEA   $003B
         PEI   $F1
         PEI   $EF
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0072
         PEA   $00A6
         PEI   $F5
         PEI   $F3
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRL   L0D0C89
L0D0BD6  LDA   $80
         CMP   #$0004
         BEQ   L0D0BE0
         BRL   L0D0C89
L0D0BE0  PEA   $FFFF
         PEA   $0070
         PEA   $0070
         PEA   $0063
         PEA   $0066
         PEA   ^L0518FA
         PEA   L0518FA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         PEA   $004D
         PEA   $003B
         PEI   $ED
         PEI   $EB
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $004D
         PEA   $00A6
         PEI   $F1
         PEI   $EF
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0072
         PEA   $003B
         PEI   $F5
         PEI   $F3
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0072
         PEA   $00A6
         PEI   $F9
         PEI   $F7
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0D086C
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0D0C89  LDA   #$001D
         STA   $82
         SEC
         LDA   $E3
         SBC   #$0000
         BNE   L0D0C9D
         LDA   $E5
         SBC   #$0000
         BRA   L0D0CA4
L0D0C9D  LDA   $E5
         SBC   #$0000
         REP   #$02
L0D0CA4  BNE   L0D0CA9
         BRL   L0D0DEB
L0D0CA9  PEA   $0000
         TDC
         CLC
         ADC   #$0088
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         PEI   $E5
         PEI   $E3
         JSL   L0D08DF
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BNE   L0D0CD1
         BRL   L0D0D96
L0D0CD1  LDA   #$0015
         STA   $82
         LDA   #$0001
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$0071
         PLX
         STX   $DC
         SEC
         SBC   $DC
         STA   $84
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         PEA   $0005
         PEA   $000B
         PEI   $82
         PEI   $84
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         LDA   $82
         CLC
         ADC   #$0008
         STA   $82
         LDA   #$0001
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0088
         PHA
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$0071
         PLX
         STX   $DC
         SEC
         SBC   $DC
         STA   $84
         PEA   $0000
         TDC
         CLC
         ADC   #$0088
         PHA
         PEA   $0005
         PEA   $000B
         PEI   $82
         PEI   $84
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         LDA   $82
         CLC
         ADC   #$0008
         STA   $82
         BRA   L0D0DEB
L0D0D96  LDA   #$0001
         PHA
         PEI   $E5
         PEI   $E3
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$0071
         PLX
         STX   $DC
         SEC
         SBC   $DC
         STA   $84
         PEI   $E5
         PEI   $E3
         PEA   $0005
         PEA   $000B
         PEI   $82
         PEI   $84
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         LDA   $82
         CLC
         ADC   #$0008
         STA   $82
L0D0DEB  SEC
         LDA   $E7
         SBC   #$0000
         BNE   L0D0DFA
         LDA   $E9
         SBC   #$0000
         BRA   L0D0E01
L0D0DFA  LDA   $E9
         SBC   #$0000
         REP   #$02
L0D0E01  BNE   L0D0E06
         BRL   L0D0F33
L0D0E06  PEA   $0000
         TDC
         CLC
         ADC   #$0088
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         PEI   $E9
         PEI   $E7
         JSL   L0D08DF
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BNE   L0D0E2E
         BRL   L0D0EE6
L0D0E2E  LDA   #$0001
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$0071
         PLX
         STX   $DC
         SEC
         SBC   $DC
         STA   $84
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         PEA   $0005
         PEA   $0009
         PEI   $82
         PEI   $84
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         LDA   $82
         CLC
         ADC   #$0008
         STA   $82
         LDA   #$0001
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0088
         PHA
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$0071
         PLX
         STX   $DC
         SEC
         SBC   $DC
         STA   $84
         PEA   $0000
         TDC
         CLC
         ADC   #$0088
         PHA
         PEA   $0005
         PEA   $0009
         PEI   $82
         PEI   $84
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
         BRA   L0D0F33
L0D0EE6  LDA   #$0001
         PHA
         PEI   $E9
         PEI   $E7
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         SEC
         JSL   L0222DF
         LDA   #$0071
         PLX
         STX   $DC
         SEC
         SBC   $DC
         STA   $84
         PEI   $E9
         PEI   $E7
         PEA   $0005
         PEA   $0009
         PEI   $82
         PEI   $84
         PEA   $0070
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L083D49
         TAY
         TSC
         CLC
         ADC   #$0012
         TCS
         TYA
L0D0F33  LDA   $FB
         BEQ   L0D0F78
         LDA   #$0021
         STA   $7C
         LDA   #$00A8
         STA   $7E
         LDA   #$002F
         STA   $78
         LDA   #$010E
         STA   $7A
         JSL   L082EE5
         PEA   $FFFF
         PEA   $0070
         PEA   $0000
         TDC
         CLC
         ADC   #$0078
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         JSL   L082F35
         BRA   L0D0F84
L0D0F78  PEA   $0000
         JSL   L090262
         PLY
         JSL   L0901A7
L0D0F84  LDA   $FF
         BEQ   L0D0F94
         PEA   ^L058306
         PEA   L058306
         JSL   L0D2EEF
         PLY
         PLY
L0D0F94  LDA   #$0001
         STA   L03001A
         TSC
         CLC
         ADC   #$006A
         TCS
         PLD
         RTL

L0D0FA2  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$009A
         TCS
         LDA   #$0001
         STA   $EC
         PEA   $0001
         JSL   L082142	; CHECK MASTER.DISK
         PLY
         CMP   #$0000
         BNE   L0D0FCB
         LDA   $FD
         CMP   #$0002
         BEQ   L0D0FCB
         LDA   $EC
         BRL   L0D1069
L0D0FCB  STZ   $EE
         STZ   $F0
         PEA   $0001
         LDX   L03036D+2
         LDA   L03036D
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$009C
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY

L0D0FEC  LDA   $FD
         BNE   L0D1000
         PEA   $0001
         JSL   L082142	; CHECK MASTER DISK
         PLY
         CMP   #$0000
         BNE   L0D1000
         BRL   L0D1067

L0D1000  LDA   #$0000
         STA   $FD
         STA   $EC
         PEA   $0001
         JSL   L082394
         PLY
         PEI   $FF
         PEI   $FF
         PEI   $FF
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030399+2	; OK
         LDA   L030399
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$009C
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0001
         PEA   $0001
         PEI   $FF
         PEA   $0001
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         LDX   L030341+2	; THAT'S NOT THE MASTER DISK!
         LDA   L030341
         STX   $F0
         STA   $EE
         BRA   L0D0FEC
	
L0D1067  LDA   $EC
L0D1069  TAY
         TSC
         CLC
         ADC   #$005C
         TCS
         TYA
         PLD
         RTL

L0D1073  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E6
         TCS
         PEA   $0200
         LDX   $FF
         LDA   $FD
         STX   $F0
         STA   $EE
         PHX
         PHA
         JSL   L0D00D4
         PLY
         PLY
         PLY
         TAY
         BNE   L0D109B
         LDA   #$0000
         BRL   L0D1197
L0D109B  LDA   #$0020
         STA   $EC
         STZ   $EA
L0D10A2  LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D10B3
         INC
L0D10B3  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $EA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D10D9
         INC
L0D10D9  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         EOR   $F6
         STA   $EA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D10FE
         INC
L0D10FE  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $EA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D1124
         INC
L0D1124  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         EOR   $F6
         STA   $EA
         DEC   $EC
         LDA   $EC
         BEQ   L0D1141
         BRL   L0D10A2
L0D1141  PEA   $0080
         LDY   #$0014
         LDA   [$FD],Y
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L0D01D9
         PLY
         PLY
         PLY
         PLY
         STZ   $E8
         LDA   #$0080
         STA   $EC
L0D115D  LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D116E
         INC
L0D116E  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         DEC   $EC
         LDA   $EC
         BNE   L0D115D
         LDA   $EA
         CMP   $E8
         BEQ   L0D1194
         LDA   #$0000
         BRA   L0D1197
L0D1194  LDA   #$0001
L0D1197  TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PLD
         RTL

L0D11A1  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E6
         TCS
         STZ   $E8
         LDA   #$0080
         STA   $EC
         LDX   $FF
         LDA   $FD
         CLC
         ADC   #$0100
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $F0
         STA   $EE
L0D11C6  LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D11D7
         INC
L0D11D7  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         PHA
         LDA   $E8
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $E8
         DEC   $EC
         LDA   $EC
         BNE   L0D11C6
         LDA   #$0020
         STA   $EC
         STZ   $EA
         LDX   $FF
         LDA   $FD
         STX   $F0
         STA   $EE
L0D1201  JSL   L02051C
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D1217
         INC
L0D1217  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         STA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         CLC
         ADC   $F6
         STA   $EA
         JSL   L02051C
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D1243
         INC
L0D1243  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         STA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         EOR   $F6
         STA   $EA
         JSL   L02051C
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D126E
         INC
L0D126E  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         STA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         SEC
         SBC   $F6
         STA   $EA
         DEC   $EC
         LDA   $EC
         BEQ   L0D12B7
         JSL   L02051C
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D12A0
         INC
L0D12A0  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         STA   [$F2]
         PHA
         LDA   $EA
         PLX
         STX   $F6
         EOR   $F6
         STA   $EA
         BRA   L0D12DA
L0D12B7  LDA   $EA
         EOR   $E8
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $EE
         LDA   $F0
         BCC   L0D12CD
         INC
L0D12CD  STA   $F0
         PLA
         PLX
         STA   $F2
         STX   $F4
         PLA
         STA   [$F2]
         BRA   L0D12DD
L0D12DA  BRL   L0D1201
L0D12DD  PEA   $0080
         LDY   #$0014
         LDA   [$FD],Y
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L0D01D9
         PLY
         PLY
         PLY
         PLY
         PEA   $0200
         PEI   $FF
         PEI   $FD
         JSL   L0D0193
         PLY
         PLY
         PLY
         STA   $EC
         PEA   $0080
         LDY   #$0014
         LDA   [$FD],Y
         PHA
         PEI   $F0
         PEI   $EE
         JSL   L0D01D9
         PLY
         PLY
         PLY
         PLY
         LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PLD
         RTL

         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         LDA   $FF
         AND   #$000F
         TAY
         BEQ   L0D1338
         DEC   $FF
L0D1338  LDA   $FF
         AND   #$00F0
         TAY
         BEQ   L0D1348
         LDA   $FF
         SEC
         SBC   #$0010
         STA   $FF
L0D1348  LDA   $FF
         AND   #$0F00
         TAY
         BEQ   L0D1358
         LDA   $FF
         SEC
         SBC   #$0100
         STA   $FF
L0D1358  LDA   $FF
         TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L0D1364  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$0088
         TCS
         STZ   $EE
         PEA   $0002
         LDX   L030371+2
         LDA   L030371
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00BC
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0002
         LDX   L030385+2
         LDA   L030385
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$008A
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY
         STZ   $F2
         STZ   $F4
L0D13AF  SEC
         LDA   $F2
         SBC   #$0000
         BNE   L0D13BE
         LDA   $F4
         SBC   #$0000
         BRA   L0D13C5
L0D13BE  LDA   $F4
         SBC   #$0000
         REP   #$02
L0D13C5  BEQ   L0D13CF
         PEA   $0002
         JSL   L082394
         PLY
L0D13CF  PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L03039D+2
         LDA   L03039D
         PHX
         PHA
         LDX   L030395+2
         LDA   L030395
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00BC
         PHA
         PEI   $F4
         PEI   $F2
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0001
         PEA   $0002
         PEA   $0000
         PEA   $0002
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         STA   $F0
         LDA   $F0
         CMP   #$0002
         BNE   L0D142D
         BRL   L0D15ED
L0D142D  PEA   $0002
         JSL   L082305
         PLY
         CMP   #$0001
         BNE   L0D1442
         LDA   #$0001
         STA   $EE
         BRL   L0D1551
L0D1442  STZ   $EE
         LDA   L030146
         BRL   L0D1544
L0D144A  LDX   L03033D+2
         LDA   L03033D
         STX   $F4
         STA   $F2
         BRL   L0D1551
L0D1457  LDX   L030359+2
         LDA   L030359
         STX   $F4
         STA   $F2
         BRL   L0D1551
L0D1464  LDX   #$0000
         TDC
         CLC
         ADC   #$008A
         STX   $F4
         STA   $F2
         BRL   L0D1551
L0D1473  PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L03039D+2
         LDA   L03039D
         PHX
         PHA
         LDX   L030399+2
         LDA   L030399
         PHX
         PHA
         LDX   L030381+2
         LDA   L030381
         PHX
         PHA
         LDX   L030355+2
         LDA   L030355
         PHX
         PHA
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0002
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         STA   $F0
         LDA   $F0
         CMP   #$0001
         BEQ   L0D14D4
         BRL   L0D152E
L0D14D4  PEA   $0002
         JSL   L082142	; CHECK MASTER.DISK
         PLY
         BRL   L0D151F
L0D14DF  LDX   L03033D+2
         LDA   L03033D
         STX   $F4
         STA   $F2
         BRL   L0D152C
L0D14EC  LDX   L030359+2
         LDA   L030359
         STX   $F4
         STA   $F2
         BRL   L0D152C
L0D14F9  LDX   #$0000
         TDC
         CLC
         ADC   #$008A
         STX   $F4
         STA   $F2
         BRL   L0D152C
L0D1508  LDA   #$0001
         STA   $EE
         BRL   L0D152C
L0D1510  BRL   L0D152C
L0D1513  DA    L0D14DF
         DA    L0D1508
         DA    L0D14EC
         DA    L0D1508
         DA    L0D14F9
         DA    L0D1510
L0D151F  CMP   #$0005
         BCC   L0D1527
         LDA   #$0005
L0D1527  ASL
         TAX
         JMP   (L0D1513,X)

L0D152C  BRA   L0D1532
L0D152E  STZ   $F2
         STZ   $F4
L0D1532  BRL   L0D1551
L0D1535  BRL   L0D1551
L0D1538  DA    L0D144A
         DA    L0D1473
         DA    L0D1457
         DA    L0D1535
         DA    L0D1464
         DA    L0D1535
L0D1544  CMP   #$0005
         BCC   L0D154C
         LDA   #$0005
L0D154C  ASL
         TAX
         JMP   (L0D1538,X)

L0D1551  LDA   $EE
         BNE   L0D1558
         BRL   L0D13AF
L0D1558  PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L03037D+2
         LDA   L03037D
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         JSL   L08229A
         CMP   #$0000
         BNE   L0D15ED
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030399+2
         LDA   L030399
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         LDX   L03034D+2
         LDA   L03034D
         PHX
         PHA
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0001
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
L0D15ED  TAY
         TSC
         CLC
         ADC   #$0072
         TCS
         TYA
         PLD
         RTL

L0D15F7  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$FF1E
         TCS
         STZ   $EC
         JSL   L0D4849
         LDA   #$0000
         STA   $E8
L0D160D  LDA   #$0000
         PHA
         PEI   $E8
         JSL   L0D0FA2
         PLY
         PLY
         LDA   #$0002
         STA   $E8
         JSL   L021385
         BCS   L0D160D
         JSL   L082EE5
         STZ   $F2
         STZ   $F4
         PEA   $0000
         PEA   $0000
         PEA   $0200
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   $F0
         STA   $EE
         PEA   $0002
         LDX   L030369+2
         LDA   L030369
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0002
         LDX   L030385+2
         LDA   L030385
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$007E
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY
L0D167A  SEC
         LDA   $F2
         SBC   #$0000
         BNE   L0D1689
         LDA   $F4
         SBC   #$0000
         BRA   L0D1690
L0D1689  LDA   $F4
         SBC   #$0000
         REP   #$02
L0D1690  BEQ   L0D169A
         PEA   $0002
         JSL   L082394
         PLY
L0D169A  PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L03039D+2
         LDA   L03039D
         PHX
         PHA
         LDX   L030395+2
         LDA   L030395
         PHX
         PHA
         LDX   L030391+2
         LDA   L030391
         PHX
         PHA
         LDX   L03038D+2
         LDA   L03038D
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B0
         PHA
         PEI   $F4
         PEI   $F2
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0004
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         STA   $E8
         LDA   $E8
         CMP   #$0003
         BNE   L0D1704
         JSL   L0D1364
         STZ   $F2
         STZ   $F4
         BRL   L0D1791
L0D1704  LDA   $E8
         CMP   #$0004
         BNE   L0D1711
         BRL   L0D1E65
         BRL   L0D1791
L0D1711  LDA   $E8
         CMP   #$0001
         BEQ   L0D171D
         LDA   #$0000
         BRA   L0D1720
L0D171D  LDA   #$0001
L0D1720  STA   $EA
         PEA   $0000
         JSL   L082305
         PLY
         CMP   #$0001
         BNE   L0D1737
         LDA   #$0001
         STA   $EC
         BRL   L0D1791
L0D1737  STZ   $EC
         LDA   L030146
         BRL   L0D1784
L0D173F  LDX   L03033D+2
         LDA   L03033D
         STX   $F4
         STA   $F2
         BRL   L0D1791
L0D174C  LDX   L030359+2
         LDA   L030359
         STX   $F4
         STA   $F2
         BRL   L0D1791
L0D1759  LDX   #$0000
         TDC
         CLC
         ADC   #$007E
         STX   $F4
         STA   $F2
         BRL   L0D1791
L0D1768  LDX   L03035D+2
         LDA   L03035D
         STX   $F4
         STA   $F2
         BRL   L0D1791
L0D1775  BRL   L0D1791
L0D1778  DA    L0D173F
         DA    L0D1775
         DA    L0D174C
         DA    L0D1768
         DA    L0D1759
         DA    L0D1775
L0D1784  CMP   #$0005
         BCC   L0D178C
         LDA   #$0005
L0D178C  ASL
         TAX
         JMP   (L0D1778,X)

L0D1791  LDA   $EC
         CMP   #$0000
         BNE   L0D179B
         BRL   L0D167A
L0D179B  PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030375+2
         LDA   L030375
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         LDX   L03014E
         LDA   L03014C
         PHX
         PHA
         JSL   L081C9A
         PLY
         PLY
         LDX   L03014E
         LDA   L03014C
         PHX
         PHA
         LDX   L03014A
         LDA   L030148
         PHX
         PHA
         JSL   L081CDD
         PLY
         PLY
         PLY
         PLY
         LDX   L03014A
         LDA   L030148
         PHX
         PHA
         JSL   L081C23
         PLY
         PLY
         STA   L0303A1
         PHA
         JSL   L081DA1
         PLY
         TAY
         BEQ   L0D1819
         BRL   L0D1E0B
L0D1819  LDA   L030254
         BNE   L0D185D
         LDAL  L056301
         PHA
         JSL   L060112
         PLY
         STA   $E4
         PHA
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$010F
         LDA   [$F6],Y
         PLX
         STX   $FA
         SEC
         SBC   $FA
         LDY   #$010F
         STA   [$F6],Y
L0D185D  LDX   L030050
         LDA   L03004E
         TXY
         LDX   #$FF80
         STY   $02,X
         STA   $00,X
         TYX
         LDX   L030086
         LDA   L030084
         TXY
         LDX   #$FF84
         STY   $02,X
         STA   $00,X
         TYX
         LDA   L03003E
         LDX   #$FF8A
         STA   $00,X
         LDA   L030040
         LDX   #$FF8C
         STA   $00,X
         LDA   L030042
         LDX   #$FF8E
         STA   $00,X
         LDA   L030044
         LDX   #$FF90
         STA   $00,X
         LDA   L030046
         LDX   #$FF92
         STA   $00,X
         LDA   L03024E
         LDX   #$FF94
         STA   $00,X
         LDA   L0301EC
         LDX   #$FF96
         STA   $00,X
         LDA   L0303E9
         LDX   #$FF98
         STA   $00,X
         LDA   L0303EB
         LDX   #$FF9A
         STA   $00,X
         LDA   L0303DF
         LDX   #$FF9C
         STA   $00,X
         LDA   L030104
         LDX   #$FF9E
         STA   $00,X
         LDX   L03000A
         LDA   L030008
         TXY
         LDX   #$FFA0
         STY   $02,X
         STA   $00,X
         TYX
         LDX   L03000E
         LDA   L03000C
         TXY
         LDX   #$FFA4
         STY   $02,X
         STA   $00,X
         TYX
         LDA   L030048
         LDX   #$FFA8
         STA   $00,X
         LDA   L03004A
         LDX   #$FFAA
         STA   $00,X
         LDA   L03004C
         LDX   #$FFAC
         STA   $00,X
         LDAL  L056301
         LDX   #$FF88
         STA   $00,X
         LDA   L03010A
         LDX   #$FFAE
         STA   $00,X
         PEA   $0050
         PEA   $0000
         TDC
         CLC
         ADC   #$FFB0
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         PEA   $0060
         PEA   $0000
         TDC
         CLC
         ADC   #$FF20
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF80
         TXY
         LDX   #$FF20
         STY   $02,X
         STA   $00,X
         TYX
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF20
         STA   $F6
         STX   $F8
         LDA   #$0080
         LDY   #$0004
         STA   [$F6],Y
         LDX   L030108
         LDA   L030106
         TXY
         LDX   #$FF26
         STY   $02,X
         STA   $00,X
         TYX
         LDA   L03010A
         ASL
         ASL
         ASL
         ASL
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF26
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0004
         STA   [$F6],Y
         LDA   #L0554D4
         LDX   #^L0554D4
         TXY
         LDX   #$FF2C
         STY   $02,X
         STA   $00,X
         TYX
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF2C
         STA   $F6
         STX   $F8
         LDA   #$0CFC
         LDY   #$0004
         STA   [$F6],Y
         LDX   L0303E3
         LDA   L0303E1
         TXY
         LDX   #$FF32
         STY   $02,X
         STA   $00,X
         TYX
         LDA   L0303DF
         ASL
         ASL
         ASL
         ASL
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF32
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0004
         STA   [$F6],Y
         LDX   L0303E7
         LDA   L0303E5
         TXY
         LDX   #$FF38
         STY   $02,X
         STA   $00,X
         TYX
         LDA   L0303DF
         ASL
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0004
         STA   [$F6],Y
         LDA   $EA
         LDY   #$0130
         STA   [$EE],Y
         PEA   $0086
         LDA   $EE
         CLC
         ADC   #$017A
         TAX
         LDA   $F0
         BCC   L0D1A16
         INC
L0D1A16  PHA
         PHX
         PEA   ^L0580F4
         PEA   L0580F4
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDX   L0303AB+2
         LDA   L0303AB
         LDY   #$0134
         PHA
         TXA
         STA   [$EE],Y
         PLA
         LDY   #$0132
         STA   [$EE],Y
         LDA   L0303B3
         SEP   #$20
         LDY   #$012B
         STA   [$EE],Y
         REP   #$20
         LDA   L0303B5
         SEP   #$20
         LDY   #$012A
         STA   [$EE],Y
         REP   #$20
         LDA   L0303B1
         LDY   #$0176
         STA   [$EE],Y
         LDA   L0303AF
         LDY   #$0178
         STA   [$EE],Y
         STZ   $E8
         BRA   L0D1A8D
L0D1A66  JSL   L02051C
         PHA
         LDA   $E8
         INC   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$0136
         LDX   $F0
         BCC   L0D1A80
         INX
L0D1A80  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
L0D1A8D  LDA   $E8
         SEC
         SBC   #$0010
         BVS   L0D1A98
         EOR   #$8000
L0D1A98  BPL   L0D1A66
         STZ   $E8
         BRL   L0D1B41
L0D1A9F  LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF20
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0004
         LDA   [$F6],Y
         LSR
         PHA
         LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$0136
         LDX   $F0
         BCC   L0D1ADC
         INX
L0D1ADC  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF20
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0D023A
         PLY
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$0156
         LDX   $F0
         BCC   L0D1B32
         INX
L0D1B32  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         INC   $E8
L0D1B41  LDA   $E8
         SEC
         SBC   #$0005
         BVS   L0D1B4C
         EOR   #$8000
L0D1B4C  BMI   L0D1B51
         BRL   L0D1A9F
L0D1B51  PEI   $F0
         PEI   $EE
         JSL   L0D11A1
         PLY
         PLY
         TAY
         BNE   L0D1B61
         BRL   L0D1E0B
L0D1B61  STZ   $E8
         BRL   L0D1BF9
L0D1B66  PEA   $0000
         TDC
         CLC
         ADC   #$00E6
         PHA
         LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   $EE
         CLC
         ADC   #$0136
         LDX   $F0
         BCC   L0D1B82
         INX
L0D1B82  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF20
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0004
         LDA   [$F6],Y
         PHA
         LDA   $E8
         PHA
         LDA   #$0006
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF20
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0D02DA
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TAY
         BNE   L0D1BF7
         BRL   L0D1E0B
L0D1BF7  INC   $E8
L0D1BF9  LDA   $E8
         SEC
         SBC   #$0005
         BVS   L0D1C04
         EOR   #$8000
L0D1C04  BMI   L0D1C09
         BRL   L0D1B66
L0D1C09  LDX   #$0000
         TDC
         CLC
         ADC   #$00E2
         STX   $F4
         STA   $F2
         STZ   $E2
         PEA   $002C
         PEI   $F4
         PEI   $F2
         LDX   L0300B2
         LDA   L0300B0
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1C35
         BRL   L0D1E0B
L0D1C35  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0004
         LDA   [$F6],Y
         AND   #$00FF
         ASL
         ASL
         ASL
         ASL
         PHA
         PEI   $F4
         PEI   $F2
         LDX   L0300AE
         LDA   L0300AC
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1C67
         BRL   L0D1E0B
L0D1C67  LDA   L0300C0
         ASL
         PHA
         PEI   $F4
         PEI   $F2
         LDX   L0300BA
         LDA   L0300B8
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1C87
         BRL   L0D1E0B
L0D1C87  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$000A
         LDA   [$F6],Y
         ASL
         PHA
         PEI   $F4
         PEI   $F2
         LDX   L0300C4
         LDA   L0300C2
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1CB3
         BRL   L0D1E0B
L0D1CB3  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0006
         LDA   [$F6],Y
         ASL
         PHA
         PEI   $F4
         PEI   $F2
         LDX   L03008E
         LDA   L03008C
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1CDF
         BRL   L0D1E0B
L0D1CDF  STZ   $E8
         BRL   L0D1D67
L0D1CE4  LDA   $E8
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$000C
         CLC
         ADC   $F6
         BCC   L0D1D01
         INX
L0D1D01  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDA   #L05046C
         LDX   #^L05046C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         CLC
         JSL   L0220A5
         PEI   $F4
         PEI   $F2
         LDA   $E8
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0510A7
         LDX   #^L0510A7
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1D65
         BRL   L0D1E0B
L0D1D65  INC   $E8
L0D1D67  LDA   $E8
         SEC
         SBC   #$0010
         BVS   L0D1D72
         EOR   #$8000
L0D1D72  BMI   L0D1D77
         BRL   L0D1CE4
L0D1D77  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         PHA
         PEI   $F4
         PEI   $F2
         LDX   L0300AA
         LDA   L0300A8
         PHX
         PHA
         JSL   L0D0383
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1DA2
         BRL   L0D1E0B
L0D1DA2  PEA   $0002
         PEI   $F4
         PEI   $F2
         JSL   L0D0193
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1DB6
         BRL   L0D1E0B
L0D1DB6  LDA   L0303A1
         PHA
         JSL   L081BF5
         PLY
         LDA   $EA
         BNE   L0D1DCF
         JSL   L082F35
         PEA   $0000
         JSL   L0D3ED4
         PLY
L0D1DCF  LDA   L030254
         BNE   L0D1E03
         LDA   L03024E
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$010F
         LDA   [$F6],Y
         CLC
         ADC   $E4
         LDY   #$010F
         STA   [$F6],Y
L0D1E03  LDA   #$0001
         STA   L0303A9
         BRA   L0D1E65
L0D1E0B  LDA   L0303A1
         PHA
         JSL   L081BF5
         PLY
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030399+2
         LDA   L030399
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         LDX   L030349+2
         LDA   L030349
         PHX
         PHA
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0001
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
L0D1E65  PEA   $0000
         PEA   $0200
         JSL   L0B0175
         PLY
         PLY
         PEA   $0000
         PEA   $0000
         JSL   L0D0FA2
         PLY
         PLY
         JSL   L0D48BE
         JSL   L082F35
         TSC
         CLC
         ADC   #$01DC
         TCS
         PLD
         RTL

L0D1E8D  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00D0
         TCS
         STZ   $DE
         STZ   L0303B9
         LDA   L030030
         BNE   L0D1EA5
         BRL   L0D1F83
L0D1EA5  PEA   $0000
         TDC
         CLC
         ADC   #$00D2
         PHA
         PEA   $0000
         PEA   $0008
         LDA   L0303A1
         PHA
         JSL   L081ACB
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1EC7
         BRL   L0D27EE
L0D1EC7  LDA   $D2
         CMP   #$8104
         BEQ   L0D1EE2
         PEA   $0000
         PEA   $0000
         LDA   L0303A1
         PHA
         JSL   L081A7E
         PLY
         PLY
         PLY
         BRL   L0D1F83
L0D1EE2  LDA   $D8
         STA   L0303AF
         LDA   #$0001
         STA   L0303B9
         PEA   $0002
         LDX   $D6
         LDA   $D4
         STX   L0303C1
         STA   L0303BF
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0303BD
         STA   L0303BB
         PEA   $0002
         LDA   L0303A1
         PHA
         JSL   L081D6D
         PLY
         SEC
         SBC   #$0008
         PHA
         TXA
         SBC   #$0000
         TAX
         PLA
         STX   $DC
         STA   $DA
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   $F4
         STA   $F2
         PEA   $0000
         PEA   $0008
         LDA   L0303A1
         PHA
         JSL   L081A7E
         PLY
         PLY
         PLY
         PEI   $F4
         PEI   $F2
         PEI   $DC
         PEI   $DA
         LDA   L0303A1
         PHA
         JSL   L081ACB
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1F5D
         BRL   L0D27EE
L0D1F5D  PEI   $D6
         PEI   $D4
         LDX   L0303BD
         LDA   L0303BB
         PHX
         PHA
         PEI   $F4
         PEI   $F2
         JSL   L020019
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $DC
         PEI   $DA
         JSL   L0B01CC
         PLY
         PLY
L0D1F83  LDA   L0303A7
         BNE   L0D1F9E
         PEA   $0001
         PEA   $0000
         PEA   $002C
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300B2
         STA   L0300B0
L0D1F9E  PEA   $002C
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDX   L0300B2
         LDA   L0300B0
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D1FC1
         BRL   L0D27EE
L0D1FC1  LDA   L030030
         BEQ   L0D2006
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0008
         LDA   [$F6],Y
         STA   $EA
         AND   #$001F
         STA   L030040
         LDA   #$0005
         PHA
         LDA   $EA
         SEC
         JSL   L0222DF
         PLA
         STA   $EA
         AND   #$001F
         STA   L030042
         LDA   #$0005
         PHA
         LDA   $EA
         SEC
         JSL   L0222DF
         PLA
         AND   #$0003
         STA   L030044
         STZ   L030046
L0D2006  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0004
         LDA   [$F6],Y
         AND   #$00FF
         STA   $EC
         LDA   L0303A7
         BNE   L0D2044
         PEA   $0001
         LDA   $EC
         PHA
         LDA   #$0010
         SEC
         JSL   L0220A5
         PLA
         LDX   #$0000
         TAY
         BPL   L0D2035
         DEX
L0D2035  PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300AE
         STA   L0300AC
L0D2044  LDA   $EC
         ASL
         ASL
         ASL
         ASL
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDX   L0300AE
         LDA   L0300AC
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D206B
         BRL   L0D27EE
L0D206B  LDA   L0303A7
         BNE   L0D208C
         PEA   $0001
         LDA   $EC
         ASL
         LDX   #$0000
         TAY
         BPL   L0D207D
         DEX
L0D207D  PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300BE
         STA   L0300BC
L0D208C  LDA   #$0000
         STA   $E8
         STA   $E6
         BRA   L0D2105
L0D2095  LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D209E
         DEX
L0D209E  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300BE
         LDA   L0300BC
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $E6
         STA   [$F6]
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D20C4
         DEX
L0D20C4  STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300AE
         LDA   L0300AC
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0008
         LDA   [$F6],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$001F
         CLC
         ADC   #$0001
         PHA
         LDA   $E6
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E6
         INC   $E8
L0D2105  LDA   $E8
         SEC
         SBC   $EC
         BVS   L0D210F
         EOR   #$8000
L0D210F  BPL   L0D2095
         LDA   $E6
         STA   L0300C0
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$000A
         LDA   [$F6],Y
         STA   $E8
         LDA   L030030
         BEQ   L0D2144
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$000A
         LDA   [$F6],Y
         CLC
         ADC   #$012C
         LDY   #$000A
         STA   [$F6],Y
L0D2144  LDA   L0303A7
         BEQ   L0D214C
         BRL   L0D21B8
L0D214C  PEA   $0001
         LDA   $E6
         ASL
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300BA
         STA   L0300B8
         PEA   $0001
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$000A
         LDA   [$F6],Y
         ASL
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300C4
         STA   L0300C2
         PEA   $0001
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0006
         LDA   [$F6],Y
         LDX   #$0000
         SEC
         JSL   L0222B8
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L03008E
         STA   L03008C
L0D21B8  LDA   $E6
         ASL
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDX   L0300BA
         LDA   L0300B8
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D21DC
         BRL   L0D27EE
L0D21DC  LDA   $E8
         ASL
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDX   L0300C4
         LDA   L0300C2
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2200
         BRL   L0D27EE
L0D2200  LDA   L030030
         BEQ   L0D223B
         STZ   $E6
         BRA   L0D2234
L0D2209  LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D2214
         DEX
L0D2214  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300C4
         LDA   L0300C2
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$FFFF
         STA   [$F6]
         INC   $E6
L0D2234  LDA   $E6
         CMP   #$012C
         BCC   L0D2209
L0D223B  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0006
         LDA   [$F6],Y
         ASL
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDX   L03008E
         LDA   L03008C
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D226C
         BRL   L0D27EE
L0D226C  LDA   L030030
         BEQ   L0D2277
         LDA   #$0064
         STA   L0303DF
L0D2277  STZ   $EA
         BRL   L0D24D5
L0D227C  LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$000C
         CLC
         ADC   $F6
         BCC   L0D2299
         INX
L0D2299  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         STA   $E8
         LDA   L030030
         BEQ   L0D2313
         LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05047C
         LDX   #^L05047C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         PHA
         LDA   $E8
         PLX
         STX   $FA
         CLC
         ADC   $FA
         PHA
         LDA   $EA
         CMP   #$000F
         BNE   L0D22DE
         LDA   #$0300
         BRA   L0D22E1
L0D22DE  LDA   #$0400
L0D22E1  PHA
         JSL   L020493
         PLY
         PLY
         PHA
         LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$000C
         CLC
         ADC   $F6
         BCC   L0D2306
         INX
L0D2306  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
L0D2313  LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05046C
         LDX   #^L05046C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         STA   $E6
         LDA   L0303A7
         BNE   L0D239E
         PEA   $0001
         LDA   $E6
         PHA
         LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$000C
         CLC
         ADC   $F6
         BCC   L0D2359
         INX
L0D2359  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         PHX
         PHA
         LDA   $EA
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0510A7
         LDX   #^L0510A7
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
L0D239E  LDA   $EA
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0510A7
         LDX   #^L0510A7
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         STX   $F4
         STA   $F2
         LDA   $E8
         PHA
         LDA   $E6
         CLC
         JSL   L0220A5
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDA   $EA
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0510A7
         LDX   #^L0510A7
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2408
         BRL   L0D27EE
L0D2408  LDA   L030030
         BNE   L0D2410
         BRL   L0D24D3
L0D2410  LDA   $EA
         CMP   #$0004
         BEQ   L0D2424
         LDA   $EA
         SEC
         SBC   #$000E
         BVS   L0D2422
         EOR   #$8000
L0D2422  BPL   L0D245A
L0D2424  LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDX   $F8
         LDA   #$000C
         CLC
         ADC   $F6
         BCC   L0D2441
         INX
L0D2441  JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   L0303DF
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   L0303DF
L0D245A  LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDA   $E6
         LSR
         STA   $E6
         PHA
         LDA   $E8
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         SEC
         JSL   L0222B8
         LDX   $F4
         LDA   $F2
         JSL   L021F00
         PLA
         PLX
         STX   $F4
         STA   $F2
         LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L05047C
         LDX   #^L05047C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         STA   $E8
         BRA   L0D24CF
L0D24A6  LDA   #$FFFF
         STA   [$F2]
         LDA   $E8
         DEC   $E8
         LDX   #$0000
         LDA   #$0001
         PHX
         PHA
         LDA   $E6
         LDX   #$0000
         SEC
         JSL   L0222B8
         LDX   $F4
         LDA   $F2
         JSL   L021F00
         PLA
         PLX
         STX   $F4
         STA   $F2
L0D24CF  LDA   $E8
         BNE   L0D24A6
L0D24D3  INC   $EA
L0D24D5  LDA   $EA
         SEC
         SBC   #$0010
         BVS   L0D24E0
         EOR   #$8000
L0D24E0  BMI   L0D24E5
         BRL   L0D227C
L0D24E5  LDA   L0303A7
         BNE   L0D250E
         PEA   $0001
         LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300AA
         STA   L0300A8
L0D250E  LDX   L0300B2
         LDA   L0300B0
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00DE
         PHA
         LDX   L0300AA
         LDA   L0300A8
         PHX
         PHA
         JSL   L0D0326
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D253E
         BRL   L0D27EE
L0D253E  PEA   $0002
         PEA   $0000
         TDC
         CLC
         ADC   #$00E0
         PHA
         JSL   L0D00D4
         PLY
         PLY
         PLY
         TAY
         BEQ   L0D255D
         LDA   $E0
         CMP   $DE
         BEQ   L0D255D
         BRL   L0D27EE
L0D255D  LDA   L0303A7
         BEQ   L0D2565
         BRL   L0D27D7
L0D2565  PEA   ^L0218D6
         PEA   L0218D6
         PEA   ^L0D15F7
         PEA   L0D15F7
         JSL   L074DD0
         PLY
         PLY
         PLY
         PLY
         CMP   #$9D88
         BEQ   L0D2581
         BRL   L0D27D7
L0D2581  PEA   ^L021972
         PEA   L021972
         PEA   ^L0210DC
         PEA   L0210DC
         JSL   L074DD0
         PLY
         PLY
         PLY
         PLY
         CMP   #$2F8E
         BEQ   L0D259D
         BRL   L0D27D7
L0D259D  PEA   ^L0219F0
         PEA   L0219F0
         PEA   ^L021385
         PEA   L021385
         JSL   L074DD0
         PLY
         PLY
         PLY
         PLY
         CMP   #$6CCD
         BEQ   L0D25B9
         BRL   L0D27D7
L0D25B9  PEA   ^L021966
         PEA   L021966
         PEA   ^L0D15F7
         PEA   L0D15F7
         JSL   L07503B
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D25D3
         BRL   L0D27D7
L0D25D3  PEA   ^L021966
         PEA   L021966
         PEA   ^L0D15F7
         PEA   L0D15F7
         JSL   L07503B
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D25ED
         BRL   L0D27D7
L0D25ED  PEA   ^L0219B6
         PEA   L0219B6
         PEA   ^L0210DC
         PEA   L0210DC
         JSL   L074FC4
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2607
         BRL   L0D27D7
L0D2607  PEA   ^L021AA4
         PEA   L021AA4
         PEA   ^L021385
         PEA   L021385
         JSL   L074FC4
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2621
         BRL   L0D27D7
L0D2621  PEA   $0001
         LDA   L0300C0
         CLC
         ADC   $EC
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0300B6
         STA   L0300B4
         LDX   #$0000
         LDA   #$0002
         PHX
         PHA
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   L0D264F
         DEX
L0D264F  SEC
         JSL   L0222B8
         LDX   L0300B6
         LDA   L0300B4
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         STZ   $E8
         BRL   L0D27C8
L0D2669  LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D2672
         DEX
L0D2672  STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300B6
         LDA   L0300B4
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDX   $F0
         LDA   $EE
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D26A5
         DEX
L0D26A5  STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300AE
         LDA   L0300AC
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         LDX   #$0000
         PHX
         PHA
         LDX   L0300AA
         LDA   L0300A8
         JSL   L021F00
         PLA
         PLX
         STX   $E4
         STA   $E2
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0004
         STA   $EE
         LDA   $F0
         BCC   L0D26F1
         INC
L0D26F1  STA   $F0
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   #$0001
         STA   $EA
         BRA   L0D2786
L0D270C  LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D2715
         DEX
L0D2715  STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300AE
         LDA   L0300AC
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0008
         LDA   [$F6],Y
         XBA
         AND   #$00FF
         LSR
         LSR
         LSR
         AND   #$001F
         CLC
         ADC   #$0001
         LDX   #$0000
         PHX
         PHA
         LDX   $E4
         LDA   $E2
         JSL   L021F00
         PLA
         PLX
         STX   $E4
         STA   $E2
         PHX
         PHA
         LDX   $F0
         LDA   $EE
         PHX
         PHA
         CLC
         ADC   #$0004
         STA   $EE
         LDA   $F0
         BCC   L0D2770
         INC
L0D2770  STA   $F0
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         INC   $EA
L0D2786  LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D278F
         DEX
L0D278F  STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L0300AE
         LDA   L0300AC
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0008
         LDA   [$F6],Y
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         AND   #$001F
         CMP   $EA
         BCC   L0D27C6
         BRL   L0D270C
L0D27C6  INC   $E8
L0D27C8  LDA   $E8
         SEC
         SBC   $EC
         BVS   L0D27D2
         EOR   #$8000
L0D27D2  BMI   L0D27D7
         BRL   L0D2669
L0D27D7  LDA   L0303B9
         BEQ   L0D27E9
         STZ   L0303B9
         PEI   $D6
         PEI   $D4
         JSL   L0B01CC
         PLY
         PLY
L0D27E9  LDA   #$0001
         BRA   L0D27F1
L0D27EE  LDA   #$0000
L0D27F1  TAY
         TSC
         CLC
         ADC   #$002A
         TCS
         TYA
         PLD
         RTL

L0D27FB  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$FDFE
         TCS
         STZ   $EC
         LDA   #$0003
         STA   L0303B3
         LDA   #$0001
         STA   L0303B5
         LDA   #$0002
         STA   L0303B1
         LDA   #$000A
         STA   L0303AF
         STZ   $F2
         STZ   $F4
         LDA   L030030
         BNE   L0D282C
         BRL   L0D28B4
L0D282C  PEA   $0001
         PEA   $0000
         JSL   L0D0FA2
         PLY
         PLY
         TAY
         BEQ   L0D2840
         LDA   #$0000
         BRA   L0D2843
L0D2840  LDA   #$0001
L0D2843  STA   $EC
         LDA   L0303B7
         BEQ   L0D2862
         PEA   ^L057F86
         PEA   L057F86
         JSL   L081B9F
         PLY
         PLY
         STA   L0303A1
         PHA
         JSL   L081DA1
         PLY
         TAY
         BEQ   L0D2871
L0D2862  PEA   ^L057F96
         PEA   L057F96
         JSL   L081B9F
         PLY
         PLY
         STA   L0303A1
L0D2871  LDA   L0303A1
         PHA
         JSL   L081DA1
         PLY
         TAY
         BEQ   L0D2887
         PEA   $0032
         JSL   L0203A1
         PLY
L0D2885  BRA   L0D2885
L0D2887  STZ   L0303A9
         STZ   L03003E
         LDA   #$FFFF
         STAL  L056301
         JSL   L02051C
         LDX   #$0000
         PHX
         PHA
         JSL   L02051C
         LDX   #$0000
         SEC
         JSL   L0220EA
         PLA
         PLX
         STX   L0303AB+2
         STA   L0303AB
         BRL   L0D2D5A
L0D28B4  STZ   $F2
         STZ   $F4
         PEA   $0002
         LDX   L030369+2
         LDA   L030369
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B8
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0002
         LDX   L030385+2
         LDA   L030385
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0086
         PHA
         JSL   L0D0000
         PLY
         PLY
         PLY
         PLY
         PLY
L0D28F2  LDA   L030144
         CMP   #$0001
         BNE   L0D2916
         PEA   $0002
         JSL   L082142	; CHECK MASTER.DISK
         PLY
         CMP   #$0001
         BNE   L0D290C
         BRL   L0D29B4
         BRA   L0D2914
L0D290C  PEA   $0002
         JSL   L082394
         PLY
L0D2914  BRA   L0D2927
L0D2916  LDA   $F2
         CMP   #$0000
         BNE   L0D2927
         LDA   $F4
         CMP   #$0000
         BNE   L0D2927
         BRL   L0D29B4
L0D2927  SEC
         LDA   $F2
         SBC   #$0000
         BNE   L0D2936
         LDA   $F4
         SBC   #$0000
         BRA   L0D293D
L0D2936  LDA   $F4
         SBC   #$0000
         REP   #$02
L0D293D  BEQ   L0D2947
         PEA   $0002
         JSL   L082394
         PLY
L0D2947  PEA   $0001
         PEA   $0001
         PEA   $0001
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L03039D+2
         LDA   L03039D
         PHX
         PHA
         LDX   L030389+2
         LDA   L030389
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00B8
         PHA
         PEI   $F4
         PEI   $F2
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0001
         PEA   $0002
         PEA   $0001
         PEA   $0002
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         STA   $F0
         LDA   $F0
         CMP   #$0002
         BNE   L0D29B4
L0D29A2  PEA   $0001
         PEA   $0000
         JSL   L0D0FA2
         PLY
         PLY
         LDA   #$FFFF
         BRL   L0D2EE5
L0D29B4  PEA   $0001
         JSL   L082305
         PLY
         CMP   #$0001
         BEQ   L0D29C4
         BRL   L0D2A45
L0D29C4  STZ   $EE
         LDX   L03014A
         LDA   L030148
         PHX
         PHA
         JSL   L081B9F
         PLY
         PLY
         STA   L0303A1
         PHA
         JSL   L081DA1
         PLY
         TAY
         BNE   L0D29E3
         BRL   L0D2A42
L0D29E3  LDX   L03014E
         LDA   L03014C
         PHX
         PHA
         JSL   L081B9F
         PLY
         PLY
         STA   L0303A1
         PHA
         JSL   L081DA1
         PLY
         TAY
         BNE   L0D2A05
         LDA   #$0001
         STA   $EE
         BRL   L0D2A42
L0D2A05  LDA   L0303A7
         BNE   L0D2A32
         PEA   ^L057FA5
         PEA   L057FA5
         JSL   L081B9F
         PLY
         PLY
         STA   L0303A1
         PHA
         JSL   L081DA1
         PLY
         TAY
         BNE   L0D2A32
         LDA   #$0001
         STA   $EC
         LDA   #$0001
         STA   L030030
         BRL   L0D2887
         BRA   L0D2A42
L0D2A32  LDX   L030345+2
         LDA   L030345
         STX   $F4
         STA   $F2
         LDA   #$0003
         STA   L030146
L0D2A42  BRL   L0D2A96
L0D2A45  LDA   L030146
         CMP   #$0000
         BNE   L0D2A5A
         LDX   L030351+2
         LDA   L030351
         STX   $F4
         STA   $F2
         BRL   L0D2A96
L0D2A5A  LDA   L030146
         CMP   #$0003
         BNE   L0D2A6E
         LDX   L03035D+2
         LDA   L03035D
         STX   $F4
         STA   $F2
         BRA   L0D2A96
L0D2A6E  LDA   L030146
         CMP   #$0002
         BNE   L0D2A82
         LDX   L030359+2
         LDA   L030359
         STX   $F4
         STA   $F2
         BRA   L0D2A96
L0D2A82  LDA   L030146
         CMP   #$0004
         BNE   L0D2A96
         LDX   #$0000
         TDC
         CLC
         ADC   #$0086
         STX   $F4
         STA   $F2
L0D2A96  LDA   L030146
         CMP   #$0001
         BEQ   L0D2AA1
         BRL   L0D2927
L0D2AA1  PEA   $0000
         TDC
         CLC
         ADC   #$FE00
         PHA
         JSL   L0D1073
         PLY
         PLY
         TAY
         BNE   L0D2AB6
         BRL   L0D2E30
L0D2AB6  LDA   L0303A7
         BEQ   L0D2AE9
         SEC
         LDX   #$FF32
         LDA   $00,X
         SBC   L0303AB
         BNE   L0D2AD0
         LDX   #$FF34
         LDA   $00,X
         SBC   L0303AB+2
         BRA   L0D2ADA
L0D2AD0  LDX   #$FF34
         LDA   $00,X
         SBC   L0303AB+2
         REP   #$02
L0D2ADA  BEQ   L0D2AE9
         LDX   L030361+2
         LDA   L030361
         STX   $F4
         STA   $F2
         BRL   L0D28F2
L0D2AE9  LDX   #$FF34
         LDA   $00,X
         TAX
         PHX
         LDX   #$FF32
         LDA   $00,X
         PLX
         STX   L0303AB+2
         STA   L0303AB
         PEA   $0086
         PEA   ^L0580F4
         PEA   L0580F4
         PEA   $0000
         TDC
         CLC
         ADC   #$FF7A
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDX   #$FF2B
         LDA   $00,X
         AND   #$00FF
         CMP   #$0001
         BEQ   L0D2B2E
         LDX   #$FF76
         LDA   $00,X
         CMP   #$0002
         BEQ   L0D2B31
L0D2B2E  BRL   L0D2E30
L0D2B31  LDX   #$FF56
         LDA   $00,X
         PHA
         LDX   #$FF36
         LDA   $00,X
         PHA
         PEA   $0080
         PEA   $0000
         TDC
         CLC
         ADC   #$0006
         PHA
         JSL   L0D0297
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2B58
         BRL   L0D2E30
L0D2B58  LDX   $08
         LDA   $06
         STX   L030050
         STA   L03004E
         STX   L030058
         STA   L030056
         LDX   $0C
         LDA   $0A
         STX   L030086
         STA   L030084
         LDA   $10
         STA   L03003E
         LDA   $12
         STA   L030040
         LDA   $14
         STA   L030042
         LDA   $16
         STA   L030044
         LDA   $18
         STA   L030046
         LDA   $1A
         STA   L03024E
         LDA   $1C
         STA   L0301EC
         LDA   $1E
         STA   L0303E9
         LDA   $20
         STA   L0303EB
         LDA   $22
         STA   L0303DF
         LDA   $24
         STA   L030104
         LDX   $28
         LDA   $26
         STX   L03000A
         STA   L030008
         LDX   $2C
         LDA   $2A
         STX   L03000E
         STA   L03000C
         LDA   $2E
         STA   L030048
         LDA   $30
         STA   L03004A
         LDA   $32
         STA   L03004C
         LDA   $0E
         STAL  L056301
         LDA   $34
         STA   L03010A
         LDA   L0303A7
         BNE   L0D2BE4
         JSL   L044A25
         JSL   L063E98
L0D2BE4  LDX   #$FF58
         LDA   $00,X
         PHA
         LDX   #$FF38
         LDA   $00,X
         PHA
         LDA   L03010A
         PHA
         LDA   #$0010
         CLC
         JSL   L0220A5
         LDX   L030108
         LDA   L030106
         PHX
         PHA
         JSL   L0D0297
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2C13
         BRL   L0D2E30
L0D2C13  LDX   #$FF5A
         LDA   $00,X
         PHA
         LDX   #$FF3A
         LDA   $00,X
         PHA
         PEA   $0CFC
         PEA   ^L0554D4
         PEA   L0554D4
         JSL   L0D0297
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2C37
         BRL   L0D2E30
L0D2C37  LDX   #$FF5C
         LDA   $00,X
         PHA
         LDX   #$FF3C
         LDA   $00,X
         PHA
         LDA   L0303DF
         PHA
         LDX   #$FF2B
         LDA   $00,X
         AND   #$00FF
         CMP   #$0002
         BNE   L0D2C59
         LDA   #$000A
         BRA   L0D2C5C
L0D2C59  LDA   #$0010
L0D2C5C  CLC
         JSL   L0220A5
         LDX   L0303E3
         LDA   L0303E1
         PHX
         PHA
         JSL   L0D0297
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2C78
         BRL   L0D2E30
L0D2C78  LDX   #$FF2B
         LDA   $00,X
         AND   #$00FF
         CMP   #$0002
         BEQ   L0D2C88
         BRL   L0D2D2B
L0D2C88  LDA   L0303DF
         STA   $F0
         BRL   L0D2D1F
L0D2C90  PEA   $000A
         LDA   $F0
         SEC
         SBC   #$0001
         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
         LDA   $F0
         SEC
         SBC   #$0001
         LDX   #$0000
         PEA   $0000
         PEA   $000A
         CLC
         JSL   L0220EA
         LDX   L0303E3
         LDA   L0303E1
         JSL   L021F00
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0006
         LDA   $F0
         SEC
         SBC   #$0001
         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
         CLC
         ADC   #$000A
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         DEC   $F0
L0D2D1F  LDA   $F0
         CMP   #$0000
         BEQ   L0D2D2B
         BCC   L0D2D2B
         BRL   L0D2C90
L0D2D2B  LDX   #$FF5E
         LDA   $00,X
         PHA
         LDX   #$FF3E
         LDA   $00,X
         PHA
         LDA   L0303DF
         PHA
         LDA   #$0002
         CLC
         JSL   L0220A5
         LDX   L0303E7
         LDA   L0303E5
         PHX
         PHA
         JSL   L0D0297
         PLY
         PLY
         PLY
         PLY
         PLY
         TAY
         BNE   L0D2D5A
         BRL   L0D2E30
L0D2D5A  JSL   L0D1E8D
         TAY
         BNE   L0D2D64
         BRL   L0D2E30
L0D2D64  LDA   L0303A1
         PHA
         JSL   L081BF5
         PLY
         LDA   L030030
         BNE   L0D2D75
         BRL   L0D2DBE
L0D2D75  JSL   L044A25
         JSL   L063E98
         LDA   $EC
         BEQ   L0D2DAF
         PEA   ^L05041C
         PEA   L05041C
         JSL   L0D2EEF
         PLY
         PLY
         JSL   L0901A7
         PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         PEA   ^L058306
         PEA   L058306
         JSL   L0D2EEF
         PLY
         PLY
L0D2DAF  PEA   $0001
         PEA   $0000
         JSL   L0D0FA2
         PLY
         PLY
         BRL   L0D2E27
L0D2DBE  LDA   #$0001
         STA   L0303A9
         LDA   $EE
         BEQ   L0D2DE0
         LDX   L03014A
         LDA   L030148
         PHX
         PHA
         LDX   L03014E
         LDA   L03014C
         PHX
         PHA
         JSL   L081CDD
         PLY
         PLY
         PLY
         PLY
L0D2DE0  PEA   $0001
         PEA   $0001
         JSL   L0D0FA2
         PLY
         PLY
         PEA   $0001
         PEA   $0001
         PEA   $0001
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030379+2
         LDA   L030379
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
L0D2E27  STZ   L03003A
         LDA   #$0001
         BRL   L0D2EE5
L0D2E30  LDA   L0303A7
         BNE   L0D2E38
         BRL   L0D2E90
L0D2E38  PEA   $0001
         PEA   $0001
         PEA   $0001
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030399+2
         LDA   L030399
         PHX
         PHA
         LDX   L03036D+2
         LDA   L03036D
         PHX
         PHA
         LDX   L030365+2
         LDA   L030365
         PHX
         PHA
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0001
         PEA   $0001
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         BRL   L0D29A2
         BRA   L0D2EE5
L0D2E90  PEA   $0001
         PEA   $0001
         PEA   $0001
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030399+2
         LDA   L030399
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         LDX   L030365+2
         LDA   L030365
         PHX
         PHA
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0001
         PEA   $0001
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         JSL   L0817D1
L0D2EE5  TAY
         TSC
         CLC
         ADC   #$02FC
         TCS
         TYA
         PLD
         RTL

L0D2EEF  PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00E8
         TCS
         STZ   $EA
         BRL   L0D3048
L0D2EFF  JSL   L0901A7
         STZ   $EC
         BRL   L0D3036
L0D2F08  LDA   $EC
         LDX   #$0000
         TAY
         BPL   L0D2F11
         DEX
L0D2F11  STX   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L030022
         LDA   L030020
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $F0
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   L0D2F37
         DEX
L0D2F37  STX   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   $FF
         LDA   $FD
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $EE
         LDA   $F0
         AND   #$000F
         PHA
         LDA   $EE
         AND   #$000F
         PLX
         STX   $F2
         CMP   $F2
         BCS   L0D2F66
         DEC   $F0
L0D2F66  LDA   $F0
         AND   #$000F
         PHA
         LDA   $EE
         AND   #$000F
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L0D2F7C
         BCC   L0D2F7C
         INC   $F0
L0D2F7C  LDA   $F0
         AND   #$00F0
         PHA
         LDA   $EE
         AND   #$00F0
         PLX
         STX   $F2
         CMP   $F2
         BCS   L0D2F96
         LDA   $F0
         SEC
         SBC   #$0010
         STA   $F0
L0D2F96  LDA   $F0
         AND   #$00F0
         PHA
         LDA   $EE
         AND   #$00F0
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L0D2FB2
         BCC   L0D2FB2
         LDA   $F0
         CLC
         ADC   #$0010
         STA   $F0
L0D2FB2  LDA   $F0
         AND   #$0F00
         PHA
         LDA   $EE
         AND   #$0F00
         PLX
         STX   $F2
         CMP   $F2
         BCS   L0D2FCC
         LDA   $F0
         SEC
         SBC   #$0100
         STA   $F0
L0D2FCC  LDA   $F0
         AND   #$0F00
         PHA
         LDA   $EE
         AND   #$0F00
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L0D2FE8
         BCC   L0D2FE8
         LDA   $F0
         CLC
         ADC   #$0100
         STA   $F0
L0D2FE8  LDA   $EC
         LDX   #$0000
         TAY
         BPL   L0D2FF1
         DEX
L0D2FF1  STX   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L030022
         LDA   L030020
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $F0
         STA   [$F2]
         LDA   $EC
         LDX   #$0000
         TAY
         BPL   L0D3017
         DEX
L0D3017  STX   $F6
         ASL
         ROL   $F6
         LDX   $F6
         PHX
         PHA
         LDX   L030026
         LDA   L030024
         JSL   L021F00
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $F0
         STA   [$F2]
         INC   $EC
L0D3036  LDA   $EC
         SEC
         SBC   #$0010
         BVS   L0D3041
         EOR   #$8000
L0D3041  BMI   L0D3046
         BRL   L0D2F08
L0D3046  INC   $EA
L0D3048  LDA   $EA
         SEC
         SBC   #$0010
         BVS   L0D3053
         EOR   #$8000
L0D3053  BMI   L0D3058
         BRL   L0D2EFF
L0D3058  TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L0D3060  PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F2
         TCS
         JSL   L0901A7
         SEP   #$30
         LDA   $C034
         AND   #$F0
         ORA   $FF
         STA   $C034
         REP   #$30
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0D3085  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$FF16
         TCS
         STZ   L03012C
         SEC
         LDA   L0301A0
         SBC   #$1B4C
         BNE   L0D30A4
         LDA   L0301A2
         SBC   #$0002
         BRA   L0D30AC
L0D30A4  LDA   L0301A2
         SBC   #$0002
         REP   #$02
L0D30AC  BVS   L0D30B1
         EOR   #$8000
L0D30B1  BMI   L0D30B6
         BRL   L0D36C5
L0D30B6  PEA   $0000
         PEA   $0002
         PEA   $07C0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   $E6
         STA   $E4
         LDX   $E6
         LDA   $E4
         CLC
         ADC   #$0100
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $E6
         STA   $E4
         LDX   $E6
         LDA   $E4
         AND   #$FF00
         PHA
         TXA
         AND   #$FFFF
         TAX
         PLA
         STX   $E6
         STA   $E4
         PEA   $0000
         PEA   $0000
         LDX   $E6
         LDA   $E4
         STX   $EE
         STA   $EC
         PHX
         PHA
         PEA   $0001
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
         LDX   $E6
         LDA   $E4
         CLC
         ADC   #$7D00
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $E6
         STA   $E4
         LDA   #$000C
         STA   $F2
         LDA   #$0030
         STA   $F0
         STZ   $F4
         BRL   L0D32B4
L0D312D  LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$008C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDX   $E6
         LDA   $E4
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         PEA   ^L05822A
         PEA   L05822A
         PEI   $F2
         PEI   $F0
         PEA   $0050
         PEA   $0140
         PEI   $E6
         PEI   $E4
         PEI   $EE
         PEI   $EC
         JSL   L080421
         TAY
         TSC
         CLC
         ADC   #$0014
         TCS
         TYA
         LDA   #$0001
         PHA
         LDA   #$0140
         SEC
         SBC   $F0
         SEC
         JSL   L0222DF
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         CLC
         ADC   $F0
         SEC
         SBC   #$0001
         PHA
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0002
         STA   [$F6],Y
         LDA   #$0001
         PHA
         LDA   #$00A0
         SEC
         SBC   $F2
         SEC
         JSL   L0222DF
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0004
         STA   [$F6],Y
         CLC
         ADC   $F2
         SEC
         SBC   #$0001
         PHA
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0006
         STA   [$F6],Y
         LDA   $F2
         PHA
         LDA   #$0004
         PHA
         LDA   $F0
         CLC
         ADC   #$000F
         SEC
         JSL   L0222DF
         PLA
         ASL
         ASL
         ASL
         PHA
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0008
         STA   [$F6],Y
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   $E6
         LDA   $E4
         JSL   L021F00
         PLA
         PLX
         STX   $E6
         STA   $E4
         LDA   $F2
         CLC
         ADC   #$0004
         STA   $F2
         LDA   $F0
         CLC
         ADC   #$0010
         STA   $F0
         INC   $F4
L0D32B4  LDA   $F4
         SEC
         SBC   #$000C
         BVS   L0D32BF
         EOR   #$8000
L0D32BF  BMI   L0D32C4
         BRL   L0D312D
L0D32C4  LDX   L03002A
         LDA   L030028
         STX   $E2
         STA   $E0
         STX   $EA
         STA   $E8
         LDX   $EE
         LDA   $EC
         STX   $DE
         STA   $DC
         STX   $8A
         STA   $88
         PEA   $0002
         PEA   $0009
         PEA   $0010
         PEA   $0000
         TDC
         CLC
         ADC   #$FF18
         PHA
         JSL   L020284
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$FF18
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0002
         JSL   L0D3060
         PLY
         PEA   $7D00
         PEI   $EA
         PEI   $E8
         JSL   L020232
         PLY
         PLY
         PLY
         PEA   $FFFF
         PEA   $00A0
         PEA   $00A0
         PEA   $0089
         PEA   $0000
         PEA   ^L0581CA
         PEA   L0581CA
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         PEI   $EE
         PEI   $EC
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDA   #$0FFF
         LDX   #$FF36
         STA   $00,X
         PEA   $0000
         TDC
         CLC
         ADC   #$FF18
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $FFFF
         PEA   $00A0
         PEA   $00A0
         PEA   $0050
         PEA   $0000
         PEA   ^L0581C2
         PEA   L0581C2
         LDX   $E6
         LDA   $E4
         STX   $86
         STA   $84
         PHX
         PHA
         PEI   $EE
         PEI   $EC
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDX   $E6
         LDA   $E4
         CLC
         ADC   #$23A0
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $E6
         STA   $E4
         LDA   #$000C
         STA   $F4
         BRL   L0D3533
L0D33AC  LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$008C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDX   $E6
         LDA   $E4
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         PEA   ^L05822A
         PEA   L05822A
         PEI   $F2
         PEI   $F0
         PEA   $0050
         PEA   $0140
         PEI   $E6
         PEI   $E4
         PEI   $EE
         PEI   $EC
         JSL   L080421
         TAY
         TSC
         CLC
         ADC   #$0014
         TCS
         TYA
         LDA   #$0001
         PHA
         LDA   #$0140
         SEC
         SBC   $F0
         SEC
         JSL   L0222DF
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         CLC
         ADC   $F0
         SEC
         SBC   #$0001
         PHA
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0002
         STA   [$F6],Y
         LDA   #$0001
         PHA
         LDA   #$00A0
         SEC
         SBC   $F2
         SEC
         JSL   L0222DF
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0004
         STA   [$F6],Y
         CLC
         ADC   $F2
         SEC
         SBC   #$0001
         PHA
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0006
         STA   [$F6],Y
         LDA   $F2
         PHA
         LDA   #$0004
         PHA
         LDA   $F0
         CLC
         ADC   #$000F
         SEC
         JSL   L0222DF
         PLA
         ASL
         ASL
         ASL
         PHA
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         LDY   #$0008
         STA   [$F6],Y
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   $E6
         LDA   $E4
         JSL   L021F00
         PLA
         PLX
         STX   $E6
         STA   $E4
         LDA   $F2
         CLC
         ADC   #$0004
         STA   $F2
         LDA   $F0
         CLC
         ADC   #$0010
         STA   $F0
         INC   $F4
L0D3533  LDA   $F4
         SEC
         SBC   #$0012
         BVS   L0D353E
         EOR   #$8000
L0D353E  BMI   L0D3543
         BRL   L0D33AC
L0D3543  LDA   #$0009
         LDX   #$FF36
         STA   $00,X
         PEA   $0000
         TDC
         CLC
         ADC   #$FF18
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         LDA   #$0A82
         LDX   #$FF1E
         STA   $00,X
         LDA   #$0842
         LDX   #$FF20
         STA   $00,X
         LDA   #$0CA2
         LDX   #$FF22
         STA   $00,X
         LDA   #$0A62
         LDX   #$FF24
         STA   $00,X
         LDA   #$0FF4
         LDX   #$FF28
         STA   $00,X
         LDA   #$0F00
         LDX   #$FF36
         STA   $00,X
         LDA   #$0009
         LDX   #$FF2C
         STA   $00,X
         LDA   #$0009
         LDX   #$FF30
         STA   $00,X
         PEA   $0000
         TDC
         CLC
         ADC   #$FF18
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         STZ   $F4
         BRL   L0D3651
L0D35C0  JSL   L0901A7
         PEA   $FFFF
         PEA   $00A0
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0008
         LDA   [$F6],Y
         PHA
         PEA   $0000
         PEA   $0000
         LDA   $F4
         PHA
         LDA   #$000A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$FF38
         JSL   L021F00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$008C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         INC   $F4
L0D3651  LDA   $F4
         SEC
         SBC   #$0012
         BVS   L0D365C
         EOR   #$8000
L0D365C  BMI   L0D3661
         BRL   L0D35C0
L0D3661  JSL   L0901A7
         JSL   L0901A7
         PEA   $0000
         PEA   $00A0
         PEA   $00A0
         PEA   $0000
         PEA   $0000
         PEA   ^L0581BA
         PEA   L0581BA
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         PEI   $86
         PEI   $84
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDA   #$0000
         LDX   #$FF2C
         STA   $00,X
         LDA   #$0700
         LDX   #$FF30
         STA   $00,X
         PEA   $0000
         TDC
         CLC
         ADC   #$FF18
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         JSL   L0901A7
         PEA   $0002
         PEA   $07C0
         JSL   L0B0175
         PLY
         PLY
L0D36C5  TAY
         TSC
         CLC
         ADC   #$01E4
         TCS
         TYA
         PLD
         RTL

L0D36CF  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00DC
         TCS
         LDA   #L05817A
         LDX   #^L05817A
         STX   $F4
         STA   $F2
         LDX   L03002A
         LDA   L030028
         CLC
         ADC   #$12C0
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $EE
         STA   $EC
         LDY   #$0026
         LDA   [$F2],Y
         TAX
         LDY   #$0024
         LDA   [$F2],Y
         STX   $EA
         STA   $E8
         LDA   #$0001
         STA   $F0
         LDA   #$00FF
         SEP   #$20
         STA   $DE
         REP   #$20
         LDA   #$00FF
         SEP   #$20
         STA   $DF
         REP   #$20
L0D371F  LDAL  L0581DC
         SEC
         SBC   #$0004
         STAL  L0581DC
         LDAL  L0581E2
         CLC
         ADC   #$0004
         STAL  L0581E2
         LDA   #$0003
         PHA
         LDA   $F0
         CLC
         JSL   L021F1A
         PLA
         CMP   #$0001
         BEQ   L0D374B
         BRL   L0D38F7
L0D374B  LDX   #$0000
         TDC
         CLC
         ADC   #$00DE
         TAY
         TSC
         SEC
         SBC   #$0002
         TCS
         PHX
         PHY
         PEA   $0000
         INC
         PHA
         PEA   $0002
         JSL   L02219C
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0091
         PEA   $0002
         JSL   L083716
         PLY
         PLY
         PLY
         PEA   $5080
         LDY   #$0026
         LDA   [$F2],Y
         TAX
         LDY   #$0024
         LDA   [$F2],Y
         PHX
         PHA
         LDY   #$0022
         LDA   [$F2],Y
         TAX
         LDY   #$0020
         LDA   [$F2],Y
         PHX
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $FFFF
         PEA   $0080
         PEA   $0070
         PEA   $0000
         PEA   $0000
         PEA   ^L0581D2
         PEA   L0581D2
         LDY   #$0026
         LDA   [$F2],Y
         TAX
         LDY   #$0024
         LDA   [$F2],Y
         PHX
         PHA
         LDX   L03002E
         LDA   L03002C
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDAL  L0581DC
         SEC
         SBC   #$0000
         BVS   L0D37E3
         EOR   #$8000
L0D37E3  BPL   L0D3844
         PEA   $FFFF
         PEA   $0080
         PEA   $0040
         PEA   $0000
         LDA   $F0
         AND   #$00FC
         ASL
         ASL
         PHA
         PEA   ^L0581DA
         PEA   L0581DA
         LDY   #$0026
         LDA   [$F2],Y
         TAX
         LDY   #$0024
         LDA   [$F2],Y
         PHX
         PHA
         LDA   $F0
         AND   #$0003
         LDX   #$0000
         STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
L0D3844  LDAL  L0581E2
         SEC
         SBC   #$00E7
         BEQ   L0D3855
         BVS   L0D3853
         EOR   #$8000
L0D3853  BMI   L0D38BE
L0D3855  PEA   $FFFF
         PEA   $0080
         PEA   $0040
         PEA   $0000
         LDA   $F0
         AND   #$0003
         ASL
         ASL
         PHA
         PEA   ^L0581E2
         PEA   L0581E2
         LDY   #$0026
         LDA   [$F2],Y
         TAX
         LDY   #$0024
         LDA   [$F2],Y
         PHX
         PHA
         LDA   $F0
         AND   #$0003
         PHA
         LDA   #$0004
         PLX
         STX   $FA
         CLC
         ADC   $FA
         LDX   #$0000
         STX   $FA
         ASL
         ROL   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   $F4
         LDA   $F2
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
L0D38BE  LDX   $EA
         LDA   $E8
         STX   $E6
         STA   $E4
         LDX   $EE
         LDA   $EC
         STX   $E2
         STA   $E0
         LDX   #$00A1
L0D38D1  LDY   #$0072
L0D38D4  LDA   [$E4],Y
         STA   [$E0],Y
         DEY
         DEY
         BPL   L0D38D4
         CLC
         LDA   $E4
         ADC   #$0080
         STA   $E4
         BCC   L0D38E8
         INC   $E6
L0D38E8  CLC
         LDA   $E0
         ADC   #$00A0
         STA   $E0
         BCC   L0D38F4
         INC   $E2
L0D38F4  DEX
         BNE   L0D38D1
L0D38F7  INC   $F0
         LDA   $F0
         CMP   #$0020
         BEQ   L0D3903
         BRL   L0D371F
L0D3903  TSC
         CLC
         ADC   #$001E
         TCS
         PLD
         RTL

L0D390B  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$0049
         TCS
         LDA   #$00FF
         STA   L030046
         LDA   #$0001
         STA   L03001A
         LDA   #$0005
         STA   L0300A4
         LDA   #$0005
         STA   L0300A6
         LDX   #$0000
         TDC
         CLC
         ADC   #$0074
         STX   L0300A2
         STA   L0300A0
         LDX   #$0000
         TDC
         CLC
         ADC   #$004B
         STX   L03009A
         STA   L030098
         PEA   $0001
         PEA   $0000
         PEA   $0019
         PEA   $0000
         TDC
         CLC
         ADC   #$005B
         PHA
         JSL   L020259
         PLY
         PLY
         PLY
         PLY
         PLY
         STZ   $F4
         BRA   L0D39D5
L0D3969  LDA   $F4
         PHA
         LDA   #$0005
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$005B
         JSL   L021F00
         LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$0074
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         LDA   $F4
         CLC
         ADC   #$000A
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$005B
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$0020
         SEP   #$20
         STA   [$F6]
         REP   #$20
         INC   $F4
L0D39D5  LDA   $F4
         CMP   #$0005
         BCC   L0D3969
         LDA   #$0020
         SEP   #$20
         STA   $62
         REP   #$20
         PEA   $0000
         JSL   L0D3060
         PLY
         PEA   ^L05041C
         PEA   L05041C
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0000
         PEA   $0000
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         LDX   L0303C5
         LDA   L0303C3
         PHX
         PHA
         JSL   L080000
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0000
         PEA   $0002
         PEA   $0002
         JSL   L0C5AB9
         PLY
         PLY
         PLY
         STZ   L03005E
         LDA   #$0000
         STA   L03012C
         PEA   $FFFF
         PEA   $0080
         PEA   $00A0
         PEA   $001E
         PEA   $0000
         PEA   ^L0581EA
         PEA   L0581EA
         LDAL  L05819C
         TAX
         LDAL  L05819A
         PHX
         PHA
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         PEA   $FFFF
         PEA   $0040
         PEA   ^L0581F2
         PEA   L0581F2
         LDAL  L05817C
         TAX
         LDAL  L05817A
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $FFFF
         PEA   $0040
         PEA   ^L0581FA
         PEA   L0581FA
         LDAL  L05818C
         TAX
         LDAL  L05818A
         PHX
         PHA
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   ^L0582E6
         PEA   L0582E6
         JSL   L0D2EEF
         PLY
         PLY
         TSC
         CLC
         ADC   #$00B1
         TCS
         PLD
         RTL

L0D3AC2  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EA
         TCS
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEI   $FB
         JSL   L0B26A4
         PLY
         LDX   #$0000
         STX   $EE
         STA   $EC
         PHX
         PHA
         JSL   L0B006E
         PLY
         PLY
         PLY
         LDY   #$0002
         PHA
         TXA
         STA   [$FD],Y
         PLA
         STA   [$FD]
         PHX
         PHA
         LDA   $FB
         ORA   #$8000
         PHA
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
         LDX   $EE
         LDA   $EC
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0D3B16  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00E0
         TCS
         LDA   #$00FF
         SEP   #$20
         STA   $E2
         REP   #$20
         LDA   #$00FF
         SEP   #$20
         STA   $E3
         REP   #$20
         LDA   #L051272
         LDX   #^L051272
         STX   L0300E4
         STA   L0300E2
         STZ   L0300E6
         STZ   L0300E8
         STZ   L0300EA
         STZ   L0300EC
         STZ   L0300EE
         STZ   L0300F0
         STZ   $F4
         BRA   L0D3B8E
L0D3B55  PEA   $0000
         PEA   $0000
         PEA   $2840
         JSL   L0B006E
         PLY
         PLY
         PLY
         PHX
         PHA
         LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05817A
         LDX   #^L05817A
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         PLX
         LDY   #$0002
         PHA
         TXA
         STA   [$F6],Y
         PLA
         STA   [$F6]
         INC   $F4
L0D3B8E  LDA   $F4
         CMP   #$0008
         BCC   L0D3B55
         PEA   $0000
         PEA   $0000
         PEA   $5080
         JSL   L0B006E
         PLY
         PLY
         PLY
         PHA
         TXA
         STAL  L05819C
         PLA
         STAL  L05819A
         PEA   $0000
         PEA   $0000
         PEA   $5080
         JSL   L0B006E
         PLY
         PLY
         PLY
         PHA
         TXA
         STAL  L0581A0
         PLA
         STAL  L05819E
         PEA   $0000
         PEA   $0000
         LDAL  L05818C
         TAX
         LDAL  L05818A
         PHX
         PHA
         PEA   $0003
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         PEA   $0000
         LDAL  L05817C
         TAX
         LDAL  L05817A
         PHX
         PHA
         PEA   $0002
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   ^L0303C3
         PEA   L0303C3
         PEA   $0004
         JSL   L0D3AC2
         PLY
         PLY
         PLY
         STX   $F2
         STA   $F0
         PEA   ^L0303C7
         PEA   L0303C7
         PEA   $0005
         JSL   L0D3AC2
         PLY
         PLY
         PLY
         PHX
         PHA
         LDX   $F2
         LDA   $F0
         JSL   L021F00
         PLA
         PLX
         STX   $F2
         STA   $F0
         JSL   L0B0AC6
         STZ   L03012C
         LDA   #$0000
         STA   $E4
         LDA   #$0064
         STA   $E6
         LDA   #$0000
         STA   $E8
         LDA   #$00A0
         STA   $EA
         LDA   #$0001
         STA   $F4
         BRA   L0D3CB9
L0D3C5B  PEA   $FFFF
         PEA   $0040
         PEA   $0040
         PEA   $0000
         LDA   $F4
         ASL
         ASL
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$00E4
         PHA
         LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05817A
         LDX   #^L05817A
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         LDAL  L05817C
         TAX
         LDAL  L05817A
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         LDA   $E6
         SEC
         SBC   #$0004
         STA   $E6
         INC   $F4
L0D3CB9  LDA   $F4
         CMP   #$0004
         BCC   L0D3C5B
         LDA   #$007F
         STA   $E6
         LDA   #$0005
         STA   $F4
         BRA   L0D3D28
L0D3CCC  LDA   $E4
         CLC
         ADC   #$0004
         STA   $E4
         PEA   $FFFF
         PEA   $0040
         PEA   $0040
         PEA   $0000
         PEA   $0000
         PEA   $0000
         TDC
         CLC
         ADC   #$00E4
         PHA
         LDA   $F4
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05817A
         LDX   #^L05817A
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         TAX
         LDA   [$F6]
         PHX
         PHA
         LDAL  L05818C
         TAX
         LDAL  L05818A
         PHX
         PHA
         JSL   L0807BE
         TAY
         TSC
         CLC
         ADC   #$0016
         TCS
         TYA
         INC   $F4
L0D3D28  LDA   $F4
         CMP   #$0008
         BCC   L0D3CCC
L0D3D2F  JSL   L0D390B
         JSL   L082F35
         JSL   L0703AA
         LDA   #$0063
         STA   L030030
L0D3D41  JSL   L0901A7
         JSL   L071A00
         LDA   L030030
         CMP   #$0063
         BEQ   L0D3D41
         LDA   L030030
         CMP   #$00CB
         BEQ   L0D3D2F
         LDX   #$0000
         TDC
         CLC
         ADC   #$00E2
         TAY
         TSC
         SEC
         SBC   #$0002
         TCS
         PHX
         PHY
         PEA   $0000
         INC
         PHA
         PEA   $0002
         JSL   L02219C
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0070
         PEA   $0001
         JSL   L083716
         PLY
         PLY
         PLY
         PEA   $0014
         JSL   L020447
         PLY
         JSL   L082EE5
         LDA   L030030
         BEQ   L0D3D9D
         JSL   L0D36CF
L0D3D9D  LDX   $F2
         LDA   $F0
         CLC
         ADC   #$4200
         PHA
         TXA
         ADC   #$0001
         TAX
         PLA
         CLC
         ADC   #$A100
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         PHX
         PHA
         JSL   L0B0175
         PLY
         PLY
         TSC
         CLC
         ADC   #$001A
         TCS
         PLD
         RTL

L0D3DC7  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   #$0708
         STA   $F4
         JSL   L082EE5
         PEA   ^L05041C
         PEA   L05041C
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0000
         PEA   $0000
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         LDX   L0303C9
         LDA   L0303C7
         PHX
         PHA
         JSL   L080000
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   ^L0582C6
         PEA   L0582C6
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0002
         JSL   L0D3060
         PLY
L0D3E1D  JSL   L0901A7
         DEC   $F4
         LDA   $F4
         BEQ   L0D3E35
         JSL   L082603
         TAY
         BNE   L0D3E35
         JSL   L081DFE
         TAY
         BEQ   L0D3E1D
L0D3E35  LDA   #$00CB
         STA   L030030
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0D3E43  PHD
         TSC
         SEC
         SBC   #$00F1
         TCD
         ADC   #$00B4
         TCS
         LDX   #$0000
         TDC
         CLC
         ADC   #$00B6
         STX   $EA
         STA   $E8
L0D3E5A  LDX   $FF
         LDA   $FD
         INC   $FD
         BNE   L0D3E64
         INC   $FF
L0D3E64  STA   $EC
         STX   $EE
         LDA   [$EC]
         SEP   #$20
         STA   [$E8]
         REP   #$20
         AND   #$00FF
         BEQ   L0D3EAE
         LDA   [$E8]
         AND   #$00FF
         SEC
         SBC   #$0041
         BVS   L0D3E83
         EOR   #$8000
L0D3E83  BPL   L0D3EA6
         LDA   [$E8]
         AND   #$00FF
         SEC
         SBC   #$005A
         BEQ   L0D3E97
         BVS   L0D3E95
         EOR   #$8000
L0D3E95  BMI   L0D3EA6
L0D3E97  LDA   [$E8]
         AND   #$00FF
         SEC
         SBC   #$0040
         SEP   #$20
         STA   [$E8]
         REP   #$20
L0D3EA6  INC   $E8
         BNE   L0D3EAC
         INC   $EA
L0D3EAC  BRA   L0D3E5A
L0D3EAE  PEA   $0000
         TDC
         CLC
         ADC   #$00B6
         PHA
         PEA   $000C
         PEI   $FB
         PEI   $F9
         PEI   $F7
         JSL   L084545
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         TSC
         CLC
         ADC   #$003C
         TCS
         PLD
         RTL

L0D3ED4  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$005F
         TCS
         LDA   #$0001
         STA   $61
         PEA   $0000
         JSL   L082634
         PLY
         JSL   L082EE5
         STZ   L0300E2
         STZ   L0300E4
         STZ   L0300E6
         STZ   L0300E8
         STZ   L0300EA
         STZ   L0300EC
         STZ   L0300EE
         STZ   L0300F0
         LDA   $FF
         BEQ   L0D3F2F
         LDA   L030038
         BNE   L0D3F2F
         PEA   $0000
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0006
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         PEA   $00F0
         JSL   L020447
         PLY
L0D3F2F  PEA   $0000
         PEA   $0000
         JSL   L0D0FA2
         PLY
         PLY
         JSL   L0B0A80
         LDX   L0302C8
         LDA   L0302C6
         STX   $F2
         STA   $F0
         LDA   $FF
         BEQ   L0D3FB4
         LDX   $F2
         LDA   $F0
         STX   $EE
         STA   $EC
         LDX   $F2
         LDA   $F0
         CLC
         ADC   #$0230
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $F2
         STA   $F0
         PEA   $0000
         PEA   $0000
         PEI   $EE
         PEI   $EC
         PEA   $0006
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   L030038
         BEQ   L0D3FB4
         LDX   $F2
         LDA   $F0
         STX   $D9
         STA   $D7
         LDX   $F2
         LDA   $F0
         CLC
         ADC   #$0560
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   $F2
         STA   $F0
         PEA   $0000
         PEA   $0000
         PEI   $D9
         PEI   $D7
         PEA   $00D0
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
L0D3FB4  PEA   $0000
         PEA   $0000
         LDX   $F2
         LDA   $F0
         STX   $DD
         STA   $DB
         PHX
         PHA
         PEA   $8005
         JSL   L0B2447
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L0B0AC6
         PEA   ^L05041C
         PEA   L05041C
         JSL   L0D2EEF
         PLY
         PLY
         LDA   $FF
         BNE   L0D3FE7
         BRL   L0D43FB
L0D3FE7  LDA   L030038
         BNE   L0D3FEF
         BRL   L0D4254
L0D3FEF  PEA   $0FA0
         PEA   $000C
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L080CE0
         PLY
         PLY
         PLY
         PLY
         STZ   $EA
         BRL   L0D4225
L0D400A  LDA   $EA
         PHA
         LDA   #$0030
         SEC
         JSL   L0220A5
         PLA
         STA   $E8
         LDA   $EA
         PHA
         LDA   #$031F
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0554D4
         LDX   #^L0554D4
         JSL   L021F00
         PLA
         PLX
         STX   $E1
         STA   $DF
         PEA   $000A
         PEA   $0020
         PEA   ^L05821A
         PEA   L05821A
         PEI   $D9
         PEI   $D7
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0001
         PEA   $0010
         PEA   ^L058222
         PEA   L058222
         LDA   $DF
         CLC
         ADC   #$014F
         TAX
         LDA   $E1
         BCC   L0D406D
         INC
L0D406D  PHA
         PHX
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEI   $E1
         PEI   $DF
         PEA   $0009
         LDA   $E8
         CLC
         ADC   #$000E
         STA   $E8
         PHA
         PEA   $0057
         JSL   L0D3E43
         PLY
         PLY
         PLY
         PLY
         PLY
         PEI   $E1
         PEI   $DF
         JSL   L022405
         PLY
         PLY
         PHA
         LDA   #$0006
         SEC
         JSL   L0220A5
         PLA
         CLC
         ADC   #$0057
         STA   $E6
         LDA   $DF
         CLC
         ADC   #$0008
         LDX   $E1
         BCC   L0D40BC
         INX
L0D40BC  STA   $F4
         STX   $F6
         LDA   [$F4]
         SEP   #$20
         STA   $E3
         REP   #$20
         LDA   $E3
         AND   #$00FF
         CMP   #$002C
         BEQ   L0D40EE
         LDA   $E3
         AND   #$00FF
         CMP   #$003B
         BEQ   L0D40EE
         LDA   $E3
         AND   #$00FF
         CMP   #$002D
         BEQ   L0D40EE
         LDA   $E6
         CLC
         ADC   #$0006
         STA   $E6
L0D40EE  LDA   $DF
         CLC
         ADC   #$0008
         TAX
         LDA   $E1
         BCC   L0D40FA
         INC
L0D40FA  PHA
         PHX
         PEA   $0009
         LDA   $E8
         INC   $E8
         PHA
         PEI   $E6
         JSL   L0D3E43
         PLY
         PLY
         PLY
         PLY
         PLY
         STZ   $E6
         BRL   L0D41DE
L0D4114  LDA   $E6
         ORA   #$C000
         PHA
         PEI   $EA
         JSL   L0A55B1
         PLY
         PLY
         PHA
         PEA   $0010
         JSL   L020493
         PLY
         PLY
         STA   $E4
         LDA   $E4
         CMP   #$0001
         BNE   L0D4138
         BRL   L0D41DC
L0D4138  LDA   $E4
         SEC
         SBC   #$0002
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0542ED
         LDX   #^L0542ED
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0063
         PHA
         JSL   L02251A+1
         PLY
         PLY
         PLY
         PLY
         PEA   ^L057FBF
         PEA   L057FBF
         PEA   $0000
         TDC
         CLC
         ADC   #$0063
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         LDA   $E6
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L055463
         LDX   #^L055463
         JSL   L021F00
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         TAX
         LDA   [$F4]
         PHX
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0063
         PHA
         JSL   L02234C
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$0063
         PHA
         PEA   $000D
         LDA   $E8
         CLC
         ADC   #$0008
         STA   $E8
         PHA
         PEA   $0069
         JSL   L0D3E43
         PLY
         PLY
         PLY
         PLY
         PLY
L0D41DC  INC   $E6
L0D41DE  LDA   $E6
         SEC
         SBC   #$0003
         BNE   L0D41E9
         BRL   L0D4114
L0D41E9  BVS   L0D41EE
         EOR   #$8000
L0D41EE  BMI   L0D41F3
         BRL   L0D4114
L0D41F3  LDAL  L05821E
         CLC
         ADC   #$0030
         STAL  L05821E
         LDAL  L058220
         CLC
         ADC   #$0030
         STAL  L058220
         LDAL  L058226
         CLC
         ADC   #$0030
         STAL  L058226
         LDAL  L058228
         CLC
         ADC   #$0030
         STAL  L058228
         INC   $EA
L0D4225  LDA   $EA
         CMP   L03003E
         BCS   L0D422F
         BRL   L0D400A
L0D422F  PEA   ^L058306
         PEA   L058306
         JSL   L0D2EEF
         PLY
         PLY
         JSL   L0703AA
L0D423F  JSL   L081DCB
         TAY
         BNE   L0D4248
         BRA   L0D423F
L0D4248  PEA   ^L05041C
         PEA   L05041C
         JSL   L0D2EEF
         PLY
         PLY
L0D4254  PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         PEA   $FFFF
         PEA   $0028
         PEA   ^L058202
         PEA   L058202
         PEI   $EE
         PEI   $EC
         JSL   L020405
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   $0002
         PEA   $0009
         PEA   $0010
         PEA   $0000
         TDC
         CLC
         ADC   #$0077
         PHA
         JSL   L020284
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0020
         PEA   $0000
         TDC
         CLC
         ADC   #$00B7
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0077
         PHA
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         LDA   #$0FFF
         STA   $D5
         PEA   $0000
         TDC
         CLC
         ADC   #$00B7
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0002
         JSL   L0D3060
         PLY
         LDA   $61
         BEQ   L0D42E3
         PEA   $012C
         JSL   L020447
         PLY
L0D42E3  LDA   L0303A9
         BNE   L0D42EB
         BRL   L0D43EC
L0D42EB  STZ   L03012C
         PEA   $0001
         PEA   ^L05820A
         PEA   L05820A
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0000
         PEA   ^L058212
         PEA   L058212
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   ^L057FC1
         PEA   L057FC1
         PEA   $0000
         PEA   $0004
         PEA   $009A
         PEA   $006E
         JSL   L084545
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         LDA   #$086F
         STA   $B9
         LDA   #$0FFF
         STA   $BF
         LDA   #L0512AE
         LDX   #^L0512AE
         STX   L0300E4
         STA   L0300E2
         JSL   L0703AA
         JSL   L082F35
         PEA   $0000
         TDC
         CLC
         ADC   #$00B7
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         LDA   #$0384
         STA   $EA
         BRA   L0D4368
L0D4360  JSL   L071A00
         JSL   L0901A7
L0D4368  DEC   $EA
         LDA   $EA
         BEQ   L0D4373
         LDA   L0303A7
         BEQ   L0D4360
L0D4373  JSL   L082EE5
         LDA   L0303A7
         BNE   L0D437F
         BRL   L0D43EC
L0D437F  PEA   $0000
         TDC
         CLC
         ADC   #$0077
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         PEA   ^L058326
         PEA   L058326
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0000
         JSL   L0D3060
         PLY
         PEA   $0020
         LDX   L030022
         LDA   L030020
         PHX
         PHA
         PEA   ^L058326
         PEA   L058326
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         STZ   L030030
         JSL   L0D27FB
         CMP   #$FFFF
         BEQ   L0D43EC
         JSL   L0D5514
         STZ   L0303A7
         JSL   L082F35
         JSL   L0703AA
         BRL   L0D447E
L0D43EC  PEA   $0000
         TDC
         CLC
         ADC   #$0077
         PHA
         JSL   L0D2EEF
         PLY
         PLY
L0D43FB  PEA   $0000
         PEA   $0000
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         PEI   $DD
         PEI   $DB
         JSL   L080000
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         PEA   ^L0582C6
         PEA   L0582C6
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0002
         JSL   L0D3060
         PLY
         JSL   L0703AA
L0D4431  JSL   L081DCB
         TAY
         BNE   L0D443A
         BRA   L0D4431
L0D443A  JSL   L0703AA
         PEA   $0002
         PEA   $0009
         PEA   $0010
         PEA   $0000
         TDC
         CLC
         ADC   #$0077
         PHA
         JSL   L020284
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0000
         TDC
         CLC
         ADC   #$0077
         PHA
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         JSL   L0817D1
L0D447E  TAY
         TSC
         CLC
         ADC   #$0099
         TCS
         TYA
         PLD
         RTL

L0D4488  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         JSL   L046D1A
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         LDA   L030044
         PHA
         JSL   L0C5AB9
         PLY
         PLY
         PLY
         JSL   L083ACF
         INC   L03004E
         BNE   L0D44B6
         INC   L030050
L0D44B6  TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0D44BE  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$0003
         TCS
         LDA   #$0001
         STA   L030038
         LDA   L030160
         BEQ   L0D44DC
         PEA   $0004
         JSL   L0A1ED3
         PLY
L0D44DC  JSL   L070746
         LDA   #$00C8
         STAL  L056150
         JSL   L0A03FC
         LDA   #$0064
         STAL  L056154
         STAL  L056158
         STAL  L056156
         JSL   L046CC8
         JSL   L0D4488
         LDA   L030040
         STA   $E2
         LDA   L030042
         STA   $E0
         LDA   L030044
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05045C
         LDX   #^L05045C
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E2
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E2
         LDA   L030044
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L050464
         LDX   #^L050464
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E0
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E0
         PEI   $E0
         PEI   $E2
         JSL   L06260C
         PLY
         PLY
         STA   $DE
         PHA
         JSL   L060C4E
         PLY
         STX   $F4
         STA   $F2
         LDA   $F2
         CLC
         ADC   #$0006
         LDX   $F4
         BCC   L0D4579
         INX
L0D4579  STA   $F6
         STX   $F8
         LDA   #$2710
         STA   [$F6]
         LDA   L030046
         PHA
         PEA   $00FF
         PEI   $F4
         PEI   $F2
         JSL   L060515
         PLY
         PLY
         PLY
         PLY
         LDA   L030046
         PHA
         LDA   L030044
         CLC
         ADC   #$0002
         AND   #$0003
         PHA
         PEI   $F4
         PEI   $F2
         JSL   L0605F5
         PLY
         PLY
         PLY
         PLY
         LDA   #$0001
         STA   L030280
         JSL   L0D4488
         STZ   $EC
         BRA   L0D45FA
L0D45BE  STZ   $EA
         BRA   L0D45EB
L0D45C2  PEI   $EA
         PEI   $EC
         JSL   L06260C
         PLY
         PLY
         STA   $E6
         CMP   #$FFFE
         BEQ   L0D45E9
         LDA   $EC
         CMP   $E2
         BNE   L0D45DF
         LDA   $EA
         CMP   $E0
         BEQ   L0D45E9
L0D45DF  PEI   $EA
         PEI   $EC
         JSL   L063519
         PLY
         PLY
L0D45E9  INC   $EA
L0D45EB  LDA   $EA
         SEC
         SBC   L0300A6
         BVS   L0D45F6
         EOR   #$8000
L0D45F6  BPL   L0D45C2
         INC   $EC
L0D45FA  LDA   $EC
         SEC
         SBC   L0300A4
         BVS   L0D4605
         EOR   #$8000
L0D4605  BPL   L0D45BE
         JSL   L0D4488
         LDA   #$0037
         STA   $EC
         BRA   L0D4633
L0D4612  PEA   $00FF
         PEI   $E0
         PEI   $E2
         PEI   $EC
         PEA   $FF80
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L0D4488
         LDA   $EC
         CLC
         ADC   #$0028
         STA   $EC
L0D4633  LDA   $EC
         SEC
         SBC   #$00FF
         BEQ   L0D4612
         BVS   L0D4640
         EOR   #$8000
L0D4640  BPL   L0D4612
         PEA   $0001
         PEI   $E0
         PEI   $E2
         PEA   $0011
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         LDA   #$0019
         SEP   #$20
         LDY   #$0004
         STA   [$F2],Y
         REP   #$20
         JSL   L0D4488
         LDA   #$0037
         STA   $EC
         BRA   L0D468C
L0D466B  PEA   $00FF
         PEI   $E0
         PEI   $E2
         PEI   $EC
         PEA   $FF83
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L0D4488
         LDA   $EC
         CLC
         ADC   #$0028
         STA   $EC
L0D468C  LDA   $EC
         SEC
         SBC   #$00FF
         BEQ   L0D466B
         BVS   L0D4699
         EOR   #$8000
L0D4699  BPL   L0D466B
         LDA   #$0004
         STA   $EA
         BRA   L0D46EB
L0D46A2  LDA   #$0005
         STA   $EC
         BRA   L0D46E5
L0D46A9  PEA   $0001
         PEI   $E0
         PEI   $E2
         PEA   $0011
         JSL   L083913
         PLY
         PLY
         PLY
         PLY
         LDA   $EC
         AND   #$0001
         TAY
         BEQ   L0D46C8
         LDA   #$0019
         BRA   L0D46CB
L0D46C8  LDA   #$0017
L0D46CB  SEP   #$20
         LDY   #$0004
         STA   [$F2],Y
         REP   #$20
         LDA   $EA
         STA   $E8
         BRA   L0D46DE
L0D46DA  JSL   L0D4488
L0D46DE  LDA   $E8
         DEC   $E8
         TAY
         BNE   L0D46DA
L0D46E5  DEC   $EC
         LDA   $EC
         BNE   L0D46A9
L0D46EB  DEC   $EA
         LDA   $EA
         BNE   L0D46A2
         PEA   $00FF
         PEI   $E0
         PEI   $E2
         PEA   $00FF
         PEA   $FF80
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $00FF
         PEI   $E0
         PEI   $E2
         PEA   $00FF
         PEA   $FF83
         JSL   L040156
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L0D4488
         LDA   #$001A
         SEP   #$20
         LDY   #$0004
         STA   [$F2],Y
         REP   #$20
         JSL   L0D4488
         PEA   $0000
         PEA   $0000
         JSL   L060E4D
         PLY
         PLY
         STA   $E6
         STZ   $EC
L0D4741  LDA   $E6
         CMP   #$FFFE
         BEQ   L0D4787
         LDA   #$000A
         PHA
         LDA   $E6
         AND   #$3C00
         CLC
         JSL   L0222DF
         PLA
         CMP   #$0002
         BNE   L0D477C
         LDA   $EC
         INC   $EC
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00CD
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $E6
         STA   [$F6]
L0D477C  PEI   $E6
         JSL   L060D39
         PLY
         STA   $E6
         BRA   L0D4741
L0D4787  LDA   #$0041
         SEP   #$20
         STA   $DD
         REP   #$20
         LDA   $EC
         STA   $E8
L0D4794  LDA   $EC
         DEC   $EC
         TAY
         BNE   L0D479E
         BRL   L0D482E
L0D479E  STZ   $EA
         BRL   L0D481C
L0D47A3  PEA   $8001
         LDA   $EA
         ASL
         LDX   #$0000
         PHX
         PHA
         LDX   #$0000
         TDC
         CLC
         ADC   #$00CD
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         PEA   $0000
         TDC
         CLC
         ADC   #$0005
         PHA
         JSL   L0619C4
         PLY
         PLY
         PLY
         PLY
         LDA   $06
         AND   #$00FF
         PHA
         LDA   $DD
         AND   #$00FF
         PLX
         STX   $F6
         CMP   $F6
         BNE   L0D481A
         JSL   L083FAD
         LDA   #$000A
         SEP   #$20
         STA   $06
         REP   #$20
         PEA   $0000
         TDC
         CLC
         ADC   #$0006
         PHA
         PEA   $000F
         JSL   L0842BE
         PLY
         PLY
         PLY
         JSL   L0D4488
         PEA   $030C
         JSL   L020447
         PLY
         SEP   #$20
         INC   $DD
         REP   #$20
         BRA   L0D482B
L0D481A  INC   $EA
L0D481C  LDA   $EA
         SEC
         SBC   $E8
         BVS   L0D4826
         EOR   #$8000
L0D4826  BMI   L0D482B
         BRL   L0D47A3
L0D482B  BRL   L0D4794
L0D482E  PEA   $0258
         JSL   L020447
         PLY
         STZ   L0303A9
         PEA   $0001
         JSL   L0D3ED4
         PLY
         TSC
         CLC
         ADC   #$00F7
         TCS
         PLD
         RTL

L0D4849  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         LDA   L030034
         BEQ   L0D485C
         BRL   L0D48B6
L0D485C  JSL   L082EE5
         JSL   L070746
         STZ   L03012C
         LDA   L030160
         BEQ   L0D487A
         LDA   L030158
         CMP   #$0004
         BNE   L0D4878
         JSL   L0A0155
L0D4878  BRA   L0D488A
L0D487A  PEA   $0000
         PEA   ^L0581B2
         PEA   L0581B2
         JSL   L080EDB
         PLY
         PLY
         PLY
L0D488A  PEA   $0000
         PEA   ^L0581A2
         PEA   L0581A2
         JSL   L080EDB
         PLY
         PLY
         PLY
         PEA   $0000
         PEA   ^L0581AA
         PEA   L0581AA
         JSL   L080EDB
         PLY
         PLY
         PLY
         PEA   $0000
         JSL   L082634
         PLY
         JSL   L082F35
L0D48B6  TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0D48BE  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         LDA   L030034
         BEQ   L0D48DD
         JSL   L0719AE
         PEA   $0000
         JSL   L090262
         PLY
         BRL   L0D4923
L0D48DD  LDA   L0301EC
         STA   $F4
         LDA   #$FFFF
         STA   L0301EC
         PEI   $F4
         JSL   L073014
         PLY
         LDA   L0301EE
         BNE   L0D48FA
         LDA   #$0001
         STA   L0301F4
L0D48FA  JSL   L072774
         LDA   L030160
         STA   $F4
         TAY
         BEQ   L0D4917
         STZ   L030160
         LDA   $F4
         SEC
         SBC   #$0001
         PHA
         JSL   L0A1ED3
         PLY
         BRA   L0D491F
L0D4917  JSL   L0C13B4
         JSL   L07313E
L0D491F  JSL   L08294C
L0D4923  TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0D492B  PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00EE
         TCS
         LDA   #$0005
         PHA
         LDA   #$0001
         PHA
         LDA   $FF
         SEC
         JSL   L0222DF
         LDA   $FF
         PHA
         LDA   $FD
         SEC
         JSL   L0220A5
         PLA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         SEC
         JSL   L0222DF
         LDA   #$0005
         PHA
         LDA   #$0001
         PHA
         LDA   $FF
         SEC
         JSL   L0222DF
         LDA   $FF
         PHA
         LDA   $FB
         SEC
         JSL   L0220A5
         PLA
         PLX
         STX   $F4
         CLC
         ADC   $F4
         SEC
         JSL   L0222DF
         PLA
         CLC
         ADC   #$0007
         AND   #$FFF8
         SEC
         JSL   L0220A5
         PLA
         TAY
         TSC
         CLC
         ADC   #$0006
         TCS
         TYA
         PLD
         RTL

L0D4998  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00D8
         TCS
         PEA   $0001
         PEA   $0000
         PEA   $0CB0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302AC
         STA   L0302AA
         PEA   $0001
         PEA   $0000
         PEA   $1EA0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302A8
         STA   L0302A6
         PEA   $0001
         PEA   $0000
         PEA   $0188
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302BC
         STA   L0302BA
         PEA   $0001
         PEA   $0000
         PEA   $0188
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302B8
         STA   L0302B6
         PEA   $0001
         PEA   $0000
         PEA   $0CC0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302C0
         STA   L0302BE
         PEA   $0001
         PEA   $0000
         PEA   $13F8
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302C4
         STA   L0302C2
         PEA   $0001
         PEA   $0000
         PEA   $3780
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302C8
         STA   L0302C6
         PEA   $0001
         PEA   $0000
         PEA   $0880
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302CC
         STA   L0302CA
         PEA   $0001
         PEA   $0000
         PEA   $0880
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302D0
         STA   L0302CE
         PEA   $0001
         PEA   $0000
         PEA   $0090
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302D4
         STA   L0302D2
         PEA   $0001
         PEA   $0000
         PEA   $0100
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302D8
         STA   L0302D6
         PEA   $0001
         PEA   $0000
         PEA   $02B0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302DC
         STA   L0302DA
         PEA   $0001
         PEA   $0000
         PEA   $02C0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302E0
         STA   L0302DE
         PEA   $0001
         PEA   $0000
         PEA   $0618
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302E4
         STA   L0302E2
         PEA   $0001
         PEA   $0000
         PEA   $05E0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302E8
         STA   L0302E6
         PEA   $0001
         PEA   $0000
         PEA   $05E0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302F0
         STA   L0302EE
         PEA   $0001
         PEA   $0000
         PEA   $07B0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302EC
         STA   L0302EA
         PEA   $0001
         PEA   $0000
         PEA   $3B80
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L03002E
         STA   L03002C
         LDX   L03002E
         LDA   L03002C
         CLC
         ADC   #$0CB0
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   L0302B0
         STA   L0302AE
         LDX   L0302B0
         LDA   L0302AE
         CLC
         ADC   #$1030
         PHA
         TXA
         ADC   #$0000
         TAX
         PLA
         STX   L0302B4
         STA   L0302B2
         LDX   L030184
         LDA   L030182
         STA   $F6
         STX   $F8
         LDA   #$3B80
         STA   [$F6]
         LDX   L030184
         LDA   L030182
         STA   $F6
         STX   $F8
         LDA   #$11D0
         LDY   #$0002
         STA   [$F6],Y
         LDX   L030184
         LDA   L030182
         STA   $F6
         STX   $F8
         LDA   #$04A0
         LDY   #$0004
         STA   [$F6],Y
         LDX   L030184
         LDA   L030182
         STA   $F6
         STX   $F8
         LDA   #$0378
         LDY   #$0006
         STA   [$F6],Y
         LDA   #$000F
         STA   $EC
         BRL   L0D4C48
L0D4BAA  LDA   $EC
         CLC
         ADC   #$011E
         PHA
         LDA   $EC
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05762A
         LDX   #^L05762A
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         LDA   $EC
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L05762A
         LDX   #^L05762A
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$0001
         LDY   #$0002
         STA   [$F6],Y
         LDA   $EC
         ASL
         CLC
         ADC   #$0044
         LDX   #$0000
         TAY
         BPL   L0D4BFC
         DEX
L0D4BFC  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$03D8
         STA   [$F6]
         LDA   $EC
         ASL
         CLC
         ADC   #$0045
         LDX   #$0000
         TAY
         BPL   L0D4C28
         DEX
L0D4C28  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   #$07A0
         STA   [$F6]
         INC   $EC
L0D4C48  LDA   $EC
         SEC
         SBC   #$0010
         BNE   L0D4C53
         BRL   L0D4BAA
L0D4C53  BVS   L0D4C58
         EOR   #$8000
L0D4C58  BMI   L0D4C5D
         BRL   L0D4BAA
L0D4C5D  LDA   #$00F1
         STAL  L057626
         LDA   #L057626
         LDX   #^L057626
         STA   $F6
         STX   $F8
         LDA   #$0001
         LDY   #$0002
         STA   [$F6],Y
         LDA   #$0000
         STA   $EC
         LDA   #L056D10
         LDX   #^L056D10
         STX   $F4
         STA   $F2
         BRL   L0D4E9D
L0D4C88  LDY   #$0001
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         LDA   #$0068
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E8
         PEA   $0010
         LDY   #$0003
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         LDY   #$0002
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D4CC4
         DEX
L0D4CC4  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         PEA   $0014
         LDY   #$0003
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         LDY   #$0002
         LDA   [$F2],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D4D08
         DEX
L0D4D08  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         LDY   #$0004
         LDA   [$F2],Y
         AND   #$00FF
         AND   #$0001
         TAY
         BNE   L0D4D35
         BRL   L0D4DD5
L0D4D35  LDA   $E8
         SEC
         SBC   #$0002
         LDX   #$0000
         TAY
         BPL   L0D4D42
         DEX
L0D4D42  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D4D67
         DEX
L0D4D67  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         INC   $E8
         LDA   $E8
         SEC
         SBC   #$0002
         LDX   #$0000
         TAY
         BPL   L0D4D92
         DEX
L0D4D92  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D4DB7
         DEX
L0D4DB7  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         INC   $E8
L0D4DD5  LDY   #$0004
         LDA   [$F2],Y
         AND   #$00FF
         AND   #$0010
         TAY
         BNE   L0D4DE6
         BRL   L0D4E84
L0D4DE6  LDA   $E8
         SEC
         SBC   #$0002
         LDX   #$0000
         TAY
         BPL   L0D4DF3
         DEX
L0D4DF3  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D4E18
         DEX
L0D4E18  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         INC   $E8
         LDA   $E8
         SEC
         SBC   #$0002
         LDX   #$0000
         TAY
         BPL   L0D4E43
         DEX
L0D4E43  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         PHA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D4E68
         DEX
L0D4E68  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
L0D4E84  LDA   $EC
         INC   $EC
         LDX   $F4
         LDA   $F2
         PHX
         PHA
         CLC
         ADC   #$0006
         STA   $F2
         LDA   $F4
         BCC   L0D4E99
         INC
L0D4E99  STA   $F4
         PLA
         PLX
L0D4E9D  LDA   $EC
         SEC
         SBC   #$0055
         BVS   L0D4EA8
         EOR   #$8000
L0D4EA8  BMI   L0D4EAD
         BRL   L0D4C88
L0D4EAD  LDA   #$0000
         STA   $EC
         LDA   #L056F0E
         LDX   #^L056F0E
         STX   $E4
         STA   $E2
         BRL   L0D4FE3
L0D4EBF  LDY   #$0004
         LDA   [$E2],Y
         AND   #$0100
         TAY
         BEQ   L0D4ECD
         BRL   L0D4FCA
L0D4ECD  LDY   #$0001
         LDA   [$E2],Y
         AND   #$00FF
         PHA
         LDA   #$011A
         PLX
         STX   $FA
         CLC
         ADC   $FA
         STA   $E8
         STZ   $EA
         BRL   L0D4FBA
L0D4EE6  LDA   $EA
         LDX   #$0000
         PHX
         PHA
         LDA   #L056F9A
         LDX   #^L056F9A
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         AND   #$00FF
         PHA
         LDY   #$0003
         LDA   [$E2],Y
         AND   #$00FF
         PHA
         LDY   #$0002
         LDA   [$E2],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         STA   $E6
         PHA
         LDA   $E8
         LDX   #$0000
         TAY
         BPL   L0D4F28
         DEX
L0D4F28  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         LDY   #$0004
         LDA   [$E2],Y
         AND   #$0003
         CMP   #$0003
         BEQ   L0D4FB2
         LDA   $E8
         CLC
         ADC   #$0006
         LDX   #$0000
         TAY
         BPL   L0D4F5E
         DEX
L0D4F5E  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $E6
         STA   [$F6]
         LDY   #$0004
         LDA   [$E2],Y
         AND   #$0003
         CMP   #$0002
         BEQ   L0D4FB2
         LDA   $E8
         CLC
         ADC   #$000C
         LDX   #$0000
         TAY
         BPL   L0D4F95
         DEX
L0D4F95  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $E6
         STA   [$F6]
L0D4FB2  LDA   $EA
         INC   $EA
         LDA   $E8
         INC   $E8
L0D4FBA  LDA   $EA
         SEC
         SBC   #$0006
         BVS   L0D4FC5
         EOR   #$8000
L0D4FC5  BMI   L0D4FCA
         BRL   L0D4EE6
L0D4FCA  LDA   $EC
         INC   $EC
         LDX   $E4
         LDA   $E2
         PHX
         PHA
         CLC
         ADC   #$0006
         STA   $E2
         LDA   $E4
         BCC   L0D4FDF
         INC
L0D4FDF  STA   $E4
         PLA
         PLX
L0D4FE3  LDA   $EC
         SEC
         SBC   #$000E
         BVS   L0D4FEE
         EOR   #$8000
L0D4FEE  BMI   L0D4FF3
         BRL   L0D4EBF
L0D4FF3  LDA   #L056F7A
         LDX   #^L056F7A
         PHA
         TXA
         STAL  L057590
         PLA
         STAL  L05758E
         LDA   #L056F8A
         LDX   #^L056F8A
         PHA
         TXA
         STAL  L057594
         PLA
         STAL  L057592
         LDA   #L05822A
         LDX   #^L05822A
         PHA
         TXA
         STAL  L05759C
         PLA
         STAL  L05759A
         PHA
         TXA
         STAL  L057598
         PLA
         STAL  L057596
         LDA   #$01B6
         STA   $E8
         LDA   #$0000
         STA   $EC
         LDA   #L056F62
         LDX   #^L056F62
         STX   $E0
         STA   $DE
         BRL   L0D50FE
L0D5048  LDA   #$0004
         STA   $EA
         BRA   L0D5097
L0D504F  PEI   $EA
         LDY   #$0001
         LDA   [$DE],Y
         AND   #$00FF
         PHA
         LDA   [$DE]
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D5073
         DEX
L0D5073  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         LDA   $EA
         CLC
         ADC   #$0002
         STA   $EA
L0D5097  LDA   $EA
         SEC
         SBC   #$0020
         BVS   L0D50A2
         EOR   #$8000
L0D50A2  BPL   L0D504F
         LDA   $EC
         CMP   #$0003
         BNE   L0D50E5
         LDY   #$0001
         LDA   [$DE],Y
         AND   #$00FF
         PHA
         LDA   [$DE]
         AND   #$00FF
         SEC
         JSL   L0220A5
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D50C9
         DEX
L0D50C9  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
L0D50E5  LDA   $EC
         INC   $EC
         LDX   $E0
         LDA   $DE
         PHX
         PHA
         CLC
         ADC   #$0002
         STA   $DE
         LDA   $E0
         BCC   L0D50FA
         INC
L0D50FA  STA   $E0
         PLA
         PLX
L0D50FE  LDA   $EC
         SEC
         SBC   #$0004
         BVS   L0D5109
         EOR   #$8000
L0D5109  BMI   L0D510E
         BRL   L0D5048
L0D510E  LDA   #$01EF
         STA   $E8
         STZ   $EA
         BRL   L0D544F
L0D5118  LDA   $EA
         PHA
         LDA   #$000C
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0570F2
         LDX   #^L0570F2
         JSL   L021F00
         PLA
         PLX
         STX   $F0
         STA   $EE
         LDA   $EA
         PHA
         LDA   #$001A
         CLC
         JSL   L0220A5
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L050B05
         LDX   #^L050B05
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0004
         LDA   [$F6],Y
         STA   $EC
         LDA   $E8
         LDY   #$0002
         STA   [$EE],Y
         PEA   $0010
         LDY   #$0005
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         STA   $DA
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D5192
         DEX
L0D5192  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         PEA   $0014
         LDY   #$0005
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         STA   $DC
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D51D8
         DEX
L0D51D8  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         LDA   $EC
         AND   #$0008
         TAY
         BNE   L0D51FF
         BRL   L0D5287
L0D51FF  PEA   $0010
         LDY   #$0007
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0006
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D5227
         DEX
L0D5227  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         PEA   $0014
         LDY   #$0007
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0006
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D526B
         DEX
L0D526B  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
L0D5287  LDA   $EC
         AND   #$0010
         TAY
         BEQ   L0D52DF
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D529A
         DEX
L0D529A  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $DA
         STA   [$F6]
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D52C2
         DEX
L0D52C2  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   $DC
         STA   [$F6]
L0D52DF  LDA   $EC
         AND   #$0020
         TAY
         BNE   L0D52EA
         BRL   L0D5372
L0D52EA  PEA   $0010
         LDY   #$0009
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0008
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D5312
         DEX
L0D5312  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         PEA   $0014
         LDY   #$0009
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0008
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D5356
         DEX
L0D5356  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
L0D5372  LDA   $EC
         AND   #$0003
         STA   $DA
         TAY
         BNE   L0D537F
         BRL   L0D544D
L0D537F  LDY   #$0005
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         SEC
         JSL   L0220A5
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D53A0
         DEX
L0D53A0  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         PEA   $0010
         LDY   #$0005
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D53E4
         DEX
L0D53E4  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         PEA   $0014
         LDY   #$0005
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         LDY   #$0004
         LDA   [$EE],Y
         AND   #$00FF
         PHA
         JSL   L0D492B
         PLY
         PLY
         PLY
         PHA
         LDA   $E8
         INC   $E8
         LDX   #$0000
         TAY
         BPL   L0D5428
         DEX
L0D5428  STX   $FA
         ASL
         ROL   $FA
         LDX   $FA
         PHX
         PHA
         LDX   L030184
         LDA   L030182
         JSL   L021F00
         PLA
         PLX
         STA   $F6
         STX   $F8
         PLA
         STA   [$F6]
         DEC   $DA
         LDA   $DA
         BEQ   L0D544D
         BRL   L0D537F
L0D544D  INC   $EA
L0D544F  LDA   $EA
         SEC
         SBC   #$001B
         BVS   L0D545A
         EOR   #$8000
L0D545A  BMI   L0D545F
         BRL   L0D5118
L0D545F  TSC
         CLC
         ADC   #$0022
         TCS
         PLD
         RTL

L0D5467  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         PEA   $0001
         PEA   $0000
         PEA   $0CC0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302F4
         STA   L0302F2
         PEA   $0001
         PEA   $0000
         PEA   $13F8
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302F8
         STA   L0302F6
         PEA   $0001
         PEA   $0000
         PEA   $3780
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L0302FC
         STA   L0302FA
         PEA   $0001
         PEA   $0000
         PEA   $0880
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L030300
         STA   L0302FE
         PEA   $0001
         PEA   $0000
         PEA   $0880
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L030304
         STA   L030302
         PEA   $0001
         PEA   $0000
         PEA   $1EA0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L03031C
         STA   L03031A
         PEA   $0001
         PEA   $0000
         PEA   $0CB0
         JSL   L0B006E
         PLY
         PLY
         PLY
         STX   L030320
         STA   L03031E
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0D5514  PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F2
         TCS
         STZ   L030068
         STZ   L03006A
         STZ   L03006C
         STZ   L03006E
         STZ   L03007A
         STZ   L03007C
         STZ   L030034
         STZ   L0301EE
         LDA   #$0001
         STA   L0301F4
         STZ   L03021C
         LDX   #$00FF
         LDA   #$FFFF
         STX   L0303EF
         STA   L0303ED
         LDA   #L0512C6
         LDX   #^L0512C6
         STX   L0300E4
         STA   L0300E2
         LDA   #L051386
         LDX   #^L051386
         STX   L0300E8
         STA   L0300E6
         LDA   #L05181E
         LDX   #^L05181E
         STX   L0300EC
         STA   L0300EA
         LDA   #L05183A
         LDX   #^L05183A
         STX   L0300F0
         STA   L0300EE
         LDA   L030046
         PHA
         JSL   L0207B5
         PLY
         LDA   L030030
         BEQ   L0D558D
         BRL   L0D5640
L0D558D  PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         PEA   ^L058306
         PEA   L058306
         JSL   L0D2EEF
         PLY
         PLY
         PEA   $0001
         PEA   $0001
         PEA   $0001
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         PEA   $0000
         LDX   L030399+2
         LDA   L030399
         PHX
         PHA
         LDX   L030339+2
         LDA   L030339
         PHX
         PHA
         PEA   $0000
         PEA   $0000
         JSL   L0D098F
         TAY
         TSC
         CLC
         ADC   #$001E
         TCS
         TYA
         PEA   $0000
         PEA   $0000
         PEA   $0001
         PEA   $0001
         JSL   L0D03E0
         PLY
         PLY
         PLY
         PLY
         LDA   L030166
         STA   $F4
         TAY
         BEQ   L0D560E
         LDA   #$0001
         STA   L030166
         JSL   L0B0AC6
L0D560E  PEA   $0001
         PEA   $0000
         JSL   L0D0FA2
         PLY
         PLY
         LDA   $F4
         BEQ   L0D5627
         JSL   L0B0A80
         LDA   $F4
         STA   L030166
L0D5627  JSL   L0901A7
         PEA   $7D00
         LDX   L03002A
         LDA   L030028
         PHX
         PHA
         JSL   L020232
         PLY
         PLY
         PLY
         BRL   L0D5677
L0D5640  STZ   L03012C
         JSL   L0901A7
         PEA   $0000
         PEA   ^L05896F
         PEA   L05896F
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0000
         PEA   ^L058977
         PEA   L058977
         JSL   L080D34
         PLY
         PLY
         PLY
         PEA   $0000
         PEA   ^L05897F
         PEA   L05897F
         JSL   L080D34
         PLY
         PLY
         PLY
L0D5677  PEA   $0020
         LDX   L030022
         LDA   L030020
         PHX
         PHA
         PEA   ^L058306
         PEA   L058306
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         PEA   $0020
         LDX   L030026
         LDA   L030024
         PHX
         PHA
         PEA   ^L058306
         PEA   L058306
         JSL   L0202AB
         PLY
         PLY
         PLY
         PLY
         PLY
         JSL   L07313E
         JSL   L0A2119
         LDA   #$0001
         STA   L030036
         TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0D56C1  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         JSL   L081F10
         JSL   L0818B7
         JSL   L0B0AF0
         JSL   L0D4998
         JSL   L08147D
         JSL   L0D3085
         PEA   $0000
         JSL   L0C0214
         PLY
         PEA   $0000
         JSL   L0C0273
         PLY
         PEA   ^L050036
         PEA   L050036
         JSL   L02176B
         PLY
         PLY
         JSL   L08457B
         JSL   L0209B6
         JSL   L082404
         JSL   L083529
         JSL   L0D3B16
L0D5714  JSL   L0D27FB
         CMP   #$0001
         BEQ   L0D5727
         JSL   L0B0A80
         JSL   L0D3B16
         BRA   L0D5714
L0D5727  JSL   L0B0A80
         JSL   L07317B
         JSL   L0B09E5
         JSL   L0D5514
         JSL   L0B0AC6
         LDA   L030030
         BEQ   L0D575A
         LDA   L030042
         PHA
         LDA   L030040
         PHA
         PEA   $0000
         PEA   $FFFF
         PEA   $FFFF
         JSL   L042D63
         PLY
         PLY
         PLY
         PLY
         PLY
L0D575A  JSL   L082F35
         JSL   L0703AA
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

