*
* Mancala
* (c) California Dreams
* (k) Brutal Deluxe Software
*

* Segment 1, kind $0000
*
* AV 202507
*  Fixed a bug in L060020 size:  masterSCB HAD TO be a WORD not a byte!!
*  Some optimizations from compiled Pascal code
*

	mx	%00
	rel

GSOS	=	$E100A8
	 
	use	MAIN.X.S

	use	4/Ctl.Macs
	use	4/Desk.Macs
	use	4/Dialog.Macs
	use 	4/Event.Macs
	use	4/Int.Macs
	use	4/Line.Macs
	use	4/Locator.Macs
	use	4/Mem.Macs
	use	4/Menu.Macs
	use	4/Misc.Macs
	use	4/NoteSyn.Macs
	use	4/Qd.Macs
	use	4/SANE.Macs
	use	4/Scrap.Macs
	use	4/Sound.Macs
	use	4/Std.Macs
	use 	4/Text.Macs
	use	4/Util.Macs
	use	4/Window.Macs

*-----------------------

            PHA
            SEP   #$20
            LDA   #^L060004
            PHA
            PLB
            REP   #$20
            PLA
            STA   L060004
            STX   L060014
            STY   L060012
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00EE
            TCS
            PHA
            _MMStartUp
            PLA
            PHX
            PHA
            PEA   $0000
            PEA   $0100
            LDA   L060004
            PHA
            PEA   $C011
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            STX   L060018
            STA   L060016
            STX   $F6
            ORA   $F6
            BNE   L01007C
            PEA   ^L020000
            PEA   L020000
            _WriteCString
            BRL   L01014A
L01007C     LDX   L060018
            LDA   L060016
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F4
            PEI   $F4
            _SANEStartUp
            LDX   L060014
            LDA   L060012
            PHX
            PHA
            JSL   L016A91
            PLY
            PLY
            PEA   $0000
            JSL   L017227
            PLY
            LDA   #L070000
            LDX   #^L070000
            STX   $F2
            STA   $F0
            PEA   ^L020020
            PEA   L020020
            JSL   L017134
            PLY
            PLY
            TAY
            BNE   L0100E1
            LDX   L06000A
            LDA   L060008
            PHX
            PHA
            LDA   L060006
            PHA
            JSL   L0114AC
            PLY
            PLY
            PLY
            PHA
            JSL   L0173CF
            PLY
L0100E1     LDA   L060004
            ORA   #$0F00
            PHA
            _DisposeAll
            SEC
            LDA   L06000E
            SBC   #$0000
            BNE   L010109
            LDA   L060010
            SBC   #$0000
            BRA   L010111
L010109     LDA   L060010
            SBC   #$0000
            REP   #$02
L010111     BEQ   L010121
            LDX   L060010
            LDA   L06000E
            PHX
            PHA
            JSL   L016F12
            PLY
            PLY
L010121     LDX   L060010
            LDA   L06000E
            PHA
            TXA
            STAL  L02002A
            PLA
            STAL  L020028
            LDA   L060000
            STAL  L02002C
            LDA   L06000C
            PHA
            PEA   ^L020028
            PEA   L020028
            JSL   L0176FA
            PLY
            PLY
            PLY
L01014A     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L010154     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00E8
            TCS
            STZ   $EE
            BRA   L0101AE
L010163     LDA   $EE
            LDX   #$0000
            TAY
            BPL   L01016C
            DEX
L01016C     STX   $F4
            ASL
            ROL   $F4
            LDX   $F4
            PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L016FC0
            PLA
            PLX
            STA   $F0
            STX   $F2
            LDA   [$F0]
            STA   $EA
            LDA   $EA
            AND   #$0888
            STA   $EC
            TAY
            BEQ   L010196
            LDA   $EC
            LSR
            STA   $EC
L010196     PEI   $FB
            PEI   $EE
            PEI   $EC
            _SetColorEntry
            INC   $EE
L0101AE     LDA   $EE
            SEC
            SBC   #$0010
            BVS   L0101B9
            EOR   #$8000
L0101B9     BPL   L010163
            PEA   $09C4
            JSL   L014CC8
            PLY
            STZ   $EE
            BRA   L01020A
L0101C7     LDA   $EE
            LDX   #$0000
            TAY
            BPL   L0101D0
            DEX
L0101D0     STX   $F4
            ASL
            ROL   $F4
            LDX   $F4
            PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L016FC0
            PLA
            PLX
            STA   $F0
            STX   $F2
            LDA   [$F0]
            STA   $EA
            LDA   $EA
            AND   #$0888
            STA   $EC
            PEI   $FB
            PEI   $EE
            PEI   $EC
            _SetColorEntry
            INC   $EE
L01020A     LDA   $EE
            SEC
            SBC   #$0010
            BVS   L010215
            EOR   #$8000
L010215     BPL   L0101C7
            TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            RTL

L01021F     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00DC
            TCS
            STZ   $DE
            BRL   L0102ED
L01022F     PHA
            PEI   $FB
            PEI   $DE
            _GetColorEntry
            PLA
            STA   $E2
            LDA   $DE
            LDX   #$0000
            TAY
            BPL   L010250
            DEX
L010250     STX   $F4
            ASL
            ROL   $F4
            LDX   $F4
            PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L016FC0
            PLA
            PLX
            STA   $F0
            STX   $F2
            LDA   [$F0]
            STA   $E0
            LDA   $E2
            CLC
            ADC   #$0111
            STA   $E2
            LDA   $E2
            AND   #$0F00
            STA   $E6
            LDA   $E2
            AND   #$00F0
            STA   $E8
            LDA   $E2
            AND   #$000F
            STA   $E4
            LDA   $E0
            AND   #$0F00
            STA   $EC
            LDA   $E0
            AND   #$00F0
            STA   $EE
            LDA   $E0
            AND   #$000F
            STA   $EA
            LDA   $EA
            CMP   $E4
            BEQ   L0102A9
            BCC   L0102A9
            LDA   $E4
            BRA   L0102AB
L0102A9     LDA   $EA
L0102AB     PHA
            LDA   $EE
            CMP   $E8
            BEQ   L0102B8
            BCC   L0102B8
            LDA   $E8
            BRA   L0102BA
L0102B8     LDA   $EE
L0102BA     PHA
            LDA   $EC
            CMP   $E6
            BEQ   L0102C7
            BCC   L0102C7
            LDA   $E6
            BRA   L0102C9
L0102C7     LDA   $EC
L0102C9     PLX
            STX   $F4
            ORA   $F4
            PLX
            STX   $F4
            ORA   $F4
            STA   $E2
            PEI   $FB
            PEI   $DE
            PEI   $E2
            _SetColorEntry
            INC   $DE
L0102ED     LDA   $DE
            SEC
            SBC   #$0010
            BVS   L0102F8
            EOR   #$8000
L0102F8     BMI   L0102FD
            BRL   L01022F
L0102FD     TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            RTL

L010305     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EC
            TCS
            STZ   $F2
            BRA   L01034B
L010314     PHA
            PEI   $FF
            PEI   $F2
            _GetColorEntry
            PLA
            STA   $F0
            LDA   $F0
            AND   #$0777
            STA   $F0
            PEI   $FF
            PEI   $F2
            PEI   $F0
            _SetColorEntry
            INC   $F2
L01034B     LDA   $F2
            SEC
            SBC   #$0010
            BVS   L010356
            EOR   #$8000
L010356     BPL   L010314
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L010360     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00E0
            TCS
            STZ   $E2
            BRL   L0103FC
L010370     PHA
            PEI   $FF
            PEI   $E2
            _GetColorEntry
            PLA
            STA   $E6
            LDA   $E6
            AND   #$0F00
            STA   $EA
            LDA   $E6
            AND   #$00F0
            STA   $EC
            LDA   $E6
            AND   #$000F
            STA   $E8
            LDA   $EA
            CMP   #$0000
            BEQ   L0103AE
            BCC   L0103AE
            LDA   $EA
            SEC
            SBC   #$0100
            BRA   L0103B0
L0103AE     LDA   $EA
L0103B0     STA   $EA
            LDA   $E8
            CMP   #$0000
            BEQ   L0103C3
            BCC   L0103C3
            LDA   $E8
            SEC
            SBC   #$0001
            BRA   L0103C5
L0103C3     LDA   $E8
L0103C5     STA   $E8
            LDA   $EC
            CMP   #$0000
            BEQ   L0103D8
            BCC   L0103D8
            LDA   $EC
            SEC
            SBC   #$0010
            BRA   L0103DA
L0103D8     LDA   $EC
L0103DA     STA   $EC
            LDA   $EA
            ORA   $EC
            ORA   $E8
            STA   $E6
            PEI   $FF
            PEI   $E2
            PEI   $E6
            _SetColorEntry
            INC   $E2
L0103FC     LDA   $E2
            SEC
            SBC   #$0010
            BVS   L010407
            EOR   #$8000
L010407     BMI   L01040C
            BRL   L010370
L01040C     TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L010414     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EE
            TCS
            PEI   $FF
            PEI   $FD
            PEA   $0000
            JSL   L010154
            PLY
            PLY
            PLY
            PEA   $09C4
            JSL   L014CC8
            PLY
            STZ   $F0
            BRA   L010451
L010439     PEI   $FF
            PEI   $FD
            PEA   $0000
            JSL   L01021F
            PLY
            PLY
            PLY
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F0
L010451     LDA   $F0
            SEC
            SBC   #$0007
            BVS   L01045C
            EOR   #$8000
L01045C     BPL   L010439
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L010466     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            PEA   $0000
            JSL   L010305
            PLY
            PEA   $05DC
            JSL   L014CC8
            PLY
            STZ   $F4
            BRA   L010497
L010485     PEA   $0000
            JSL   L010360
            PLY
            PEA   $05DC
            JSL   L014CC8
            PLY
            INC   $F4
L010497     LDA   $F4
            SEC
            SBC   #$0007
            BVS   L0104A2
            EOR   #$8000
L0104A2     BPL   L010485
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0104AC     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            PEA   $0000
            JSL   L010305
            PLY
            PEA   $01F4
            JSL   L014CC8
            PLY
            STZ   $F4
            BRA   L0104DD
L0104CB     PEA   $0000
            JSL   L010360
            PLY
            PEA   $01F4
            JSL   L014CC8
            PLY
            INC   $F4
L0104DD     LDA   $F4
            SEC
            SBC   #$0007
            BVS   L0104E8
            EOR   #$8000
L0104E8     BPL   L0104CB
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0104F2     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00DC
            TCS
            LDA   L060020
            STA   $E6
            LDA   #L0202A2
            LDX   #^L0202A2
            STX   $EA
            STA   $E8
            LDA   #$00A0
            STA   $EC
            PEA   $0000
            TDC
            CLC
            ADC   #$00EE
            PHA
            PEA   $0000
            PEA   $0000
            PEA   $0140
            PEA   $00C8
            _SetRect
            LDA   L06001A
            BEQ   L01058D
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            PEA   $0000
            PEA   $0140
            PEA   $00C8
            _SetRect
            PEA   $0000
            TDC
            CLC
            ADC   #$00E6
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _PPToPort
            BRA   L0105DD
L01058D     PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            PEA   $000D
            PEA   $0140
            PEA   $00C8
            _SetRect
            PEA   $0000
            TDC
            CLC
            ADC   #$00E6
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            PEA   $000D
            PEA   $0000
            _PPToPort
L0105DD     STZ   L06001A
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0105E8     PHD
            TSC
            SEC
            SBC   #$00EF
            TCD
            ADC   #$00DE
            TCS
            LDX   $F7
            LDA   $F5
            STX   $E6
            STA   $E4
            LDX   $FB
            LDA   $F9
            STX   $E2
            STA   $E0
            STZ   $E8
            BRA   L010652
L010607     PEI   $E6
            PEI   $E4
            PEI   $E2
            PEI   $E0
            LDA   $FF
            LDX   #$0000
            TAY
            BPL   L010618
            DEX
L010618     PHX
            PHA
            _BlockMove
            LDX   $E6
            LDA   $E4
            CLC
            ADC   #$00A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E6
            STA   $E4
            LDX   $E2
            LDA   $E0
            CLC
            ADC   #$00A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E2
            STA   $E0
            INC   $E8
L010652     LDA   $E8
            SEC
            SBC   $FD
            BVS   L01065C
            EOR   #$8000
L01065C     BPL   L010607
            TDC
            CLC
            ADC   #$00EF
            TCS
            PLD
            RTL

L010666     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00D4
            TCS
            LDX   #$0000
            LDA   #$4D80
            STX   $E0
            STA   $DE
            LDA   #L0202A2
            LDX   #^L0202A2
            STX   $DC
            STA   $DA
            LDX   #$00E1
            LDA   #$2000
            STX   $D8
            STA   $D6
            PEA   $0000
            PEA   ^L02002E
            PEA   L02002E
            _SetColorTable
            PEA   $7D00
            PEA   ^L0202A2
            PEA   L0202A2
            PEA   ^L0200CE
            PEA   L0200CE
            JSL   L04092E
            PLY
            PLY
            PLY
            PLY
            PLY
            STZ   L06001C
            JSL   L043F3C
            LDX   $D8
            LDA   $D6
            CLC
            ADC   #$0640
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E4
            STA   $E2
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$0640
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEI   $E8
            PEI   $E6
            PEI   $E4
            PEI   $E2
            PEI   $E0
            PEI   $DE
            _BlockMove
            PEA   ^L02008E
            PEA   L02008E
            JSL   L010414
            PLY
            PLY
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$5460
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            LDX   $D8
            LDA   $D6
            CLC
            ADC   #$1AE0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$001A
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E4
            STA   $E2
            JSL   L04405E
            STZ   $F4
            BRA   L010790
L010759     PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $E8
            LDA   $E6
            CLC
            ADC   #$000C
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L010790     LDA   $F4
            SEC
            SBC   #$0008
            BVS   L01079B
            EOR   #$8000
L01079B     BPL   L010759
            LDX   $E8
            LDA   $E6
            SEC
            SBC   #$0018
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            STZ   $F4
            BRA   L0107EB
L0107B4     PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $E8
            LDA   $E6
            SEC
            SBC   #$000C
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L0107EB     LDA   $F4
            SEC
            SBC   #$0007
            BVS   L0107F6
            EOR   #$8000
L0107F6     BPL   L0107B4
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$1AE0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$001A
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $09C4
            PEA   $000A
            JSL   L014CED
            PLY
            PLY
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$6220
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            LDX   $D8
            LDA   $D6
            CLC
            ADC   #$23A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$004F
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E4
            STA   $E2
            JSL   L0440C3
            STZ   $F4
            BRA   L0108B7
L010880     PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $E8
            LDA   $E6
            CLC
            ADC   #$000C
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L0108B7     LDA   $F4
            SEC
            SBC   #$0008
            BVS   L0108C2
            EOR   #$8000
L0108C2     BPL   L010880
            LDX   $E8
            LDA   $E6
            SEC
            SBC   #$0018
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            STZ   $F4
            BRA   L010912
L0108DB     PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $E8
            LDA   $E6
            SEC
            SBC   #$000C
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L010912     LDA   $F4
            SEC
            SBC   #$0007
            BVS   L01091D
            EOR   #$8000
L01091D     BPL   L0108DB
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$23A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$004F
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$6FE0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            LDX   $D8
            LDA   $D6
            CLC
            ADC   #$1B80
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$0082
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E4
            STA   $E2
            JSL   L044128
            STZ   $F4
            BRA   L0109D2
L01099B     PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $E8
            LDA   $E6
            CLC
            ADC   #$000C
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L0109D2     LDA   $F4
            SEC
            SBC   #$0008
            BVS   L0109DD
            EOR   #$8000
L0109DD     BPL   L01099B
            LDX   $E8
            LDA   $E6
            SEC
            SBC   #$0018
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            STZ   $F4
            BRA   L010A2D
L0109F6     PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $E8
            LDA   $E6
            SEC
            SBC   #$000C
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L010A2D     LDA   $F4
            SEC
            SBC   #$0007
            BVS   L010A38
            EOR   #$8000
L010A38     BPL   L0109F6
            LDX   $DC
            LDA   $DA
            CLC
            ADC   #$1B80
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$0082
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E8
            STA   $E6
            PEA   $0008
            PEA   $0014
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $0000
            PEA   $000F
            PEA   $0000
            _SetColorEntry
            PEA   $0000
            PEA   $0001
            PEA   $0000
            _SetColorEntry
            PEA   $0000
            PEA   $000E
            PEA   $0000
            _SetColorEntry
            LDX   $DC
            LDA   $DA
            STX   $E8
            STA   $E6
            LDX   $D8
            LDA   $D6
            CLC
            ADC   #$4CE0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            CLC
            ADC   #$0061
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E4
            STA   $E2
            PEA   $0022
            PEA   $0008
            PEI   $E4
            PEI   $E2
            PEI   $E8
            PEI   $E6
            JSL   L0105E8
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            STZ   $EE
            LDA   #$0333
            STA   $F0
            STZ   $F2
            STZ   $F4
            BRA   L010B74
L010B0A     PEA   $0000
            PEA   $000F
            PEI   $F2
            _SetColorEntry
            PEA   $0000
            PEA   $0001
            PEI   $F0
            _SetColorEntry
            PEA   $0000
            PEA   $000E
            PEI   $EE
            _SetColorEntry
            LDA   $F2
            CLC
            ADC   #$0222
            STA   $F2
            LDA   $F0
            CLC
            ADC   #$0111
            STA   $F0
            LDA   $EE
            CLC
            ADC   #$0111
            STA   $EE
            PEA   $09C4
            JSL   L014CC8
            PLY
            INC   $F4
L010B74     LDA   $F4
            SEC
            SBC   #$0008
            BVS   L010B7F
            EOR   #$8000
L010B7F     BPL   L010B0A
            PEA   $0000
            PEA   $000F
            PEA   $0FFF
            _SetColorEntry
            PEA   $0000
            PEA   $0001
            PEA   $0CBB
            _SetColorEntry
            PEA   $0000
            PEA   $000E
            PEA   $0998
            _SetColorEntry
            PEA   $07D0
            PEA   $000A
            JSL   L014CED
            PLY
            PLY
            JSL   L04403B
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L010BE4     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            PHA
            PEA   $0000
            PEA   $000F
            _GetColorEntry
            PLA
            STA   $F4
            PEA   $0000
            PEA   $000F
            PEA   $0000
            _SetColorEntry
            LDA   L06001E
            PHA
            LDA   L060021
            CLC
            ADC   #$0500
            PHA
            _MenuStartUp
            PEA   ^L0200D2
            PEA   L0200D2
            JSL   L011045
            PLY
            PLY
            PEA   $0780
            PEA   $0000
            PEA   $00E1
            PEA   $2000
            JSL   L016FEF
            PLY
            PLY
            PLY
            PLY
            PEA   $0000
            PEA   $000F
            PEI   $F4
            _SetColorEntry
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L010C7E     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$008A
            TCS
            LDA   #$0001
            STA   $8C
            LDX   #$0000
            TDC
            CLC
            ADC   #$0092
            STX   $90
            STA   $8E
            PEA   $000A
            PEA   $0000
            TDC
            CLC
            ADC   #$008C
            PHA
            JSL   L017481
            LDA   #$0000
            STA   $8C
            PEA   $0009
            PEA   $0000
            TDC
            CLC
            ADC   #$008C
            PHA
            JSL   L017481
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L010CC7     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$0088
            TCS
            LDA   #$0001
            STA   $F0
            LDX   #$0000
            TDC
            CLC
            ADC   #$008A
            STX   $F4
            STA   $F2
            PEA   $000A
            PEA   $0000
            TDC
            CLC
            ADC   #$00F0
            PHA
            JSL   L017481
            _GrafOff
            PHA
            PEA   ^L0200DF
            PEA   L0200DF
            PEI   $F4
            PEI   $F2
            PEA   ^L0200F3
            PEA   L0200F3
            PEA   ^L020100
            PEA   L020100
            _TLTextMountVolume
            PLA
            STA   $EE
            _GrafOn
            LDA   $EE
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L010D49     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   #$0001
            STAL  L029379
            JSL   L042FAD
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L010D67     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $7D00
            PEA   ^L0303BC
            PEA   L0303BC
            PEA   ^L02010D
            PEA   L02010D
            JSL   L04092E
            PLY
            PLY
            PLY
            PLY
            PLY
            JSL   L04306A
            PEA   $7D00
            PEA   ^L0202A2
            PEA   L0202A2
            PEA   ^L020111
            PEA   L020111
            JSL   L04092E
            PLY
            PLY
            PLY
            PLY
            PLY
            JSL   L010D49
            JSL   L010466
            LDA   #$0001
            STA   L06001A
            JSL   L0104F2
            PEA   ^L02004E
            PEA   L02004E
            JSL   L010414
            PLY
            PLY
            PEA   $0008
            JSL   L040B65
            PLY
            JSL   L0405CF
            JSL   L0166F5
            TAY
            BEQ   L010DD9
            BRA   L010DEF
L010DD9     JSL   L01679B
            TAY
            BEQ   L010DE2
            BRA   L010DEF
L010DE2     JSL   L01695C
            TAY
            BEQ   L010DEB
            BRA   L010DEF
L010DEB     JSL   L040481
L010DEF     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L010DF9     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            PEA   $0007
            PEA   ^L02006E
            PEA   L02006E
            _SetColorTable
            LDA   #$0053
            STA   $F4
            BRA   L010E3B
L010E24     PEI   $F4
            PEA   $0007
            _SetSCB
            INC   $F4
L010E3B     LDA   $F4
            SEC
            SBC   #$005E
            BVS   L010E46
            EOR   #$8000
L010E46     BPL   L010E24
            LDA   #$0077
            STA   $F4
            BRA   L010E66
L010E4F     PEI   $F4
            PEA   $0007
            _SetSCB
            INC   $F4
L010E66     LDA   $F4
            SEC
            SBC   #$0082
            BVS   L010E71
            EOR   #$8000
L010E71     BPL   L010E4F
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L010E7B     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   L010D67
            JSL   L040A6B
            PEA   $7D00
            PEA   ^L0202A2
            PEA   L0202A2
            PEA   ^L020115
            PEA   L020115
            JSL   L04092E
            PLY
            PLY
            PLY
            PLY
            PLY
            PEA   $0000
            JSL   L040B65
            PLY
            JSL   L010466
            PEA   $0000
            _ClearScreen
            JSL   L0104F2
            PEA   ^L0200AE
            PEA   L0200AE
            JSL   L010414
            PLY
            PLY
            JSL   L010DF9
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L010EE1     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            _NSShutDown
            _SoundShutDown
            _DeskShutDown
            _SFShutDown
            _DialogShutDown
            _LEShutDown
            _ScrapShutDown
            LDA   $FF
            CMP   #$000B
            BEQ   L010F73
            _MenuShutDown
L010F73     _WindShutDown
            _CtlShutDown
            LDA   $FF
            BEQ   L010FB9
            PEA   $0000
            PEA   ^L020266
            PEA   L020266
            _SetColorTable
            LDA   L060023
            PHA
            JSL   L040B65
            PLY
L010FB9     _EMShutDown
            _QDShutDown
            _MTShutDown
            LDA   $FF
            BEQ   L011019
            LDX   L060027
            LDA   L060025
            PHX
            PHA
            _DisposeHandle
            LDA   L06001E
            PHA
            _DisposeAll
L011019     LDA   L06001E
            PHA
            _MMShutDown
            _TLShutDown
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L011045     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$009E
            TCS
            LDA   L060002
            STA   $A0
            TAY
            BNE   L01105B
            BRL   L01117E
L01105B     PEA   $FFFF
            _ClearScreen
            PEA   $0000
            PEA   $0046
            _MoveTo
            PEI   $FF
            PEI   $FD
            PEA   ^L020119
            PEA   L020119
            PEA   $0000
            TDC
            CLC
            ADC   #$00A2
            PHA
            JSL   L0169EA
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $0000
            TDC
            CLC
            ADC   #$00A2
            PHA
            _DrawCString
            PEA   $0000
            PEA   $0050
            _MoveTo
            PEI   $A0
            PEA   ^L020132
            PEA   L020132
            PEA   $0000
            TDC
            CLC
            ADC   #$00A2
            PHA
            JSL   L0169EA
            PLY
            PLY
            PLY
            PLY
            PLY
            PEA   $0000
            TDC
            CLC
            ADC   #$00A2
            PHA
            _DrawCString
            PEA   $0000
            PEA   $005A
            _MoveTo
            PEA   ^L020148
            PEA   L020148
            _DrawCString
            PEA   $0000
            PEA   $0064
            _MoveTo
            PEA   ^L02016D
            PEA   L02016D
            _DrawCString
            PHA
            PEA   $0000
            _ReadChar
            PLA
            PEA   $0000
            JSL   L010EE1
            PLY
            JSL   L0174C7
L01117E     TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

*            PHD
*            TSC
*            SEC
*            SBC   #$00FB
*            TCD
*            ADC   #$00F4
*            TCS
*            TDC
*            CLC
*            ADC   #$00FB
*            TCS
*            PLD
L011186     RTL

L011199     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            _TLStartUp
            PHA
            _MMStartUp
            PLA
            STA   L06001E
            _MTStartUp
            PHX
            PHA
            PEA   $0000
            PEA   $0C00
            LDA   L06001E
            PHA
            PEA   $C005
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            STX   L060027
            STA   L060025
            PEA   ^L0201B1
            PEA   L0201B1
            JSL   L011045
            PLY
            PLY
*            PHA
            LDX   L060027
            LDA   L060025
            STA   $F6
            STX   $F8
*            LDY   #$0002
*            LDA   [$F6],Y
*            TAX
            LDA   [$F6]
*            PHX
*            PHA
*            _LoWord
*            PLA
            STA   L060021
*            SEP   #$20
*            STZ   L060020
*            REP   #$20
*            LDA   L060021	; dPageAddr
            PHA
            LDA   L060020	; masterSCB
*            AND   #$00FF
            PHA
            PEA   $0000	; maxWidth - screen
            LDA   L06001E	; userID
            PHA
            _QDStartUp
            PEA   ^L0201C8
            PEA   L0201C8
            JSL   L011045
            PLY
            PLY
            JSL   L040B3E
            STA   L060023
            PEA   $0000
            JSL   L040B65
            PLY
            JSL   L040BC2
            JSL   L010666
            PEA   ^L02017F
            PEA   L02017F
            _LoadTools
            PEA   ^L0201D5
            PEA   L0201D5
            JSL   L011045
            PLY
            PLY
            LDA   L060021
            CLC
            ADC   #$0300
            PHA
            PEA   $0014
            PEA   $0000
            PEA   $0140
            PEA   $0000
            PEA   $00C2
            LDA   L06001E
            PHA
            _EMStartUp
            PEA   ^L0201E7
            PEA   L0201E7
            JSL   L011045
            PLY
            PLY
            LDA   L06001E
            PHA
            _WindStartUp
            PEA   ^L0201F5
            PEA   L0201F5
            JSL   L011045
            PLY
            PLY
            LDA   L06001E
            PHA
            LDA   L060021
            CLC
            ADC   #$0400
            PHA
            _CtlStartUp
            PEA   ^L020204
            PEA   L020204
            JSL   L011045
            PLY
            PLY
            LDA   L060021
            CLC
            ADC   #$0600
            PHA
            LDA   L06001E
            PHA
            _LEStartUp
            PEA   ^L020214
            PEA   L020214
            JSL   L011045
            PLY
            PLY
            LDA   L06001E
            PHA
            _DialogStartUp
            PEA   ^L020226
            PEA   L020226
            JSL   L011045
            PLY
            PLY
            _ScrapStartUp
            PEA   ^L020235
            PEA   L020235
            JSL   L011045
            PLY
            PLY
            _DeskStartUp
            PEA   ^L020243
            PEA   L020243
            JSL   L011045
            PLY
            PLY
            PHX
            PHA
            PEA   $0005
            PEA   ^L011186
            PEA   L011186
            _Desktop
            PLA
            PLX
            LDA   L06001E
            PHA
            LDA   L060021
            CLC
            ADC   #$0700
            PHA
            _SFStartUp
            PEA   ^L020250
            PEA   L020250
            JSL   L011045
            PLY
            PLY
            LDA   L060020
*            AND   #$00FF
            PHA
            _SetAllSCBs
            LDA   #$0001
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L011411     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0001
            JSL   L010EE1
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01142C     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            STZ   $F4
            BRA   L01145A
L01143B     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   L060029
            STA   [$F6]
            INC   $F4
L01145A     LDA   $F4
            SEC
            SBC   #$000C
            BVS   L011465
            EOR   #$8000
L011465     BPL   L01143B
            LDA   #$0000
            STAL  L02029E
            LDA   #$0000
            STAL  L0202A0
            LDA   #$0001
            STA   L06002B
            STZ   L06008F
            JSL   doHIDECURSOR
            PEA   $0001
            JSL   L015162
            PLY
            LDA   L06003F
            BEQ   L011494
            STZ   L06003F
            BRA   L011498
L011494     JSL   doSHOWCURSOR
L011498     JSL   L0129BE
            JSL   L0429BA
            JSL   L0405CF
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0114AC     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   L010C7E
            JSL   L011199
            JSL   L010E7B
            JSL   L0116ED
            JSL   L01142C
            LDA   L060085
            BEQ   L0114F7
            PEA   $00A0
            PEA   $009F
            JSL   L040F1C
            PLY
            PLY
            JSL   L011EEC
            PEA   $0001
            LDA   L060035
            PHA
            JSL   L0122F2
            PLY
            PLY
            PEA   $0139
            JSL   L011D94
            PLY
            BRA   L0114FB
L0114F7     		; JSL   L040BEC	; call protection
L0114FB     JSL   L0404A6
            JSL   L011411
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01150B     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PHX
            PHA
            PEA   ^L0280DC
            PEA   L0280DC
            _NewMenu
            PEA   $0000
            _InsertMenu
            PHX
            PHA
            PEA   ^L028059
            PEA   L028059
            _NewMenu
            PEA   $0000
            _InsertMenu
            PHX
            PHA
            PEA   ^L027FF6
            PEA   L027FF6
            _NewMenu
            PEA   $0000
            _InsertMenu

*            LDA   L060085	; if demo mode
*            BEQ   L0115C9

            PHX		; always show the Info menu
            PHA
            PEA   ^L027FC4
            PEA   L027FC4
            _NewMenu
            PEA   $0000
            _InsertMenu

*            BRA   L0115F4
*L0115C9     PHX
*            PHA
*            PEA   ^L027FA2
*            PEA   L027FA2
*            _NewMenu
*            PEA   $0000
*            _InsertMenu

L0115F4     PHA
            _FixMenuBar
            PLA
            _DrawMenuBar
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01161E     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00EC
            TCS
            PHX
            PHA
            _GetBarColors
            PLA
            PLX
            STX   $F4
            STA   $F2
            LDA   #$0010
            PHA
            LDA   #$0100
            PHA
            PHA
            PEI   $F4
            PEI   $F2
            _LoWord
            PLA
            CLC
            JSL   L017037
            PLA
            CLC
            JSL   L017037
            PLA
            STA   $F0
            LDA   #$0010
            PHA
            LDA   #$0100
            PHA
            PHA
            PEI   $F4
            PEI   $F2
            _LoWord
            PLA
            CLC
            JSL   L017037
            PLA
            CLC
            JSL   L017037
            PLY
            STA   $EE
            LDA   $F0
            PHA
            LDA   #$0010
            CLC
            JSL   L01715C
            PLA
            CLC
            ADC   $EE
            PHA
            LDA   #$0100
            PHA
            PHA
            PEI   $F4
            PEI   $F2
            _LoWord
            PLA
            CLC
            JSL   L017037
            PLY
            PHA
            LDA   $EE
            PHA
            LDA   #$0010
            CLC
            JSL   L01715C
            _SetBarColors
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0116ED     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   L010BE4
            _InitPalette
            JSL   L01161E
            JSL   L01150B
            PEA   $013B
            JSL   L0117FE
            PLY
            PEA   $013D
            JSL   L0117FE
            PLY
            PEA   $013F
            JSL   L0117FE
            PLY
            LDA   L0600A7
            BNE   L011742
            PEA   $0142
            JSL   L0117FE
            PLY
            LDA   L06008D
            PHA
            JSL   L0406BC
            PLY
L011742     LDA   L060085
            BNE   L01174A
            BRL   L0117A4
L01174A     PEA   $0139
            JSL   L0117FE
            PLY
            PEA   $012D
            JSL   L0117D9
            PLY
            PEA   $012E
            JSL   L0117D9
            PLY
            PEA   $012F
            JSL   L0117D9
            PLY
            PEA   $0132
            JSL   L0117D9
            PLY
            PEA   $0133
            JSL   L0117D9
            PLY
            PEA   $0134
            JSL   L0117D9
            PLY
            PEA   $0135
            JSL   L0117D9
            PLY
            PEA   $0136
            JSL   L0117D9
            PLY
            PEA   $0137
            JSL   L0117D9
            PLY
            PEA   $0138
            JSL   L0117D9
            PLY
            BRA   L0117AC
L0117A4     PEA   $0137
            JSL   L0117FE
            PLY
L0117AC     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0117B4     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            PEI   $FF
            _EnableMItem
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0117D9     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            PEI   $FF
            _DisableMItem
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0117FE     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            PHA
            PEI   $FF
            _GetMItemMark
            PLA
            TAY
            BEQ   L011825
            LDA   #$0000
            BRA   L011828
L011825     LDA   #$0001
L011828     PHA
            PEI   $FF
            _CheckMItem
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L011843     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00D2
            TCS
            LDAL  L0281E6
            TAX
            LDAL  L0281E4
            JSL   L016A58
            PEA   $0000
            TDC
            CLC
            ADC   #$00D4
            PHA
            JSL   L01753C
            PLY
            PLY
            PLY
            PLY
            PLY
            LDA   #L0281DE
            LDX   #^L0281DE
            PHX
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0018
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
            LDA   L060045
            CMP   #$0001
            BEQ   L011895
            BRL   L01196C
L011895     PEA   $4002
            PEA   $A000
            PEA   $0000
            PEA   $0000
            PEA   $0000
            PEI   $DA
            PEI   $D8
            PEI   $D6
            PEI   $D4
            JSL   L016F7E
            LDX   $E6
            LDA   $E4
            JSL   L016A58
            JSL   L0170BC
            JSL   L0170F8
            BEQ   L0118C7
            BMI   L0118C7
            BRL   L01196C
L0118C7     PHA
            PEA   $0002
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            _EventAvail
            PLA
            TAY
            BNE   L0118EB
            BRL   L011969
L0118EB     LDA   $E8
            SEC
            SBCL  L0281E8
            PHA
            JSL   L016EE6
            PLY
            SEC
            SBC   #$000A
            BEQ   L011908
            BVS   L011903
            EOR   #$8000
L011903     BPL   L011908
            BRL   L011969
L011908     LDA   $EA
            SEC
            SBCL  L0281EA
            PHA
            JSL   L016EE6
            PLY
            SEC
            SBC   #$000A
            BEQ   L011922
            BVS   L011920
            EOR   #$8000
L011920     BMI   L011969
L011922     PHA
            PEA   $0002
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            _GetNextEvent
            PLA
L011940     PHA
            PEA   $0004
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            _GetNextEvent
            PLA
            TAY
            BEQ   L011940
            STZ   L060045
            LDA   #$0001
            BRA   L01196F
L011969     BRL   L011895
L01196C     LDA   #$0000
L01196F     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L011979     ENT
            PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00CE
            TCS
            PHA
            PEA   $0004
            PEA   $0002
            _FlushEvents
            PEA   $040A
            PEA   $0000
            TDC
            CLC
            ADC   #$00D2
            PHA
            _GetNextEvent
            PLA
            LDA   $D2
            BRL   L011AFA
L0119BD     JSL   L011D20
            LDA   $E0
            ORA   #$0100
            STA   $E0
            PEA   $0000
            TDC
            CLC
            ADC   #$00D2
            PHA
            PEA   $0000
            PEA   $0000
            _MenuKey
            PHA
            PEI   $E4
            PEI   $E2
            _LoWord
            PLA
            CMP   #$0000
            BNE   L011A08
            LDA   #$0002
            BRL   L011B3C
L011A08     BRL   L011B08
L011A0B     PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EA
            PHA
            PEI   $DE
            PEI   $DC
            _FindWindow
            PLA
            CMP   #$0011
            BEQ   L011A32
            BRL   L011A92
L011A32     STZ   L060045
            JSL   L011D20
            JSL   L011C4F
            JSL   doSHOWCURSOR
            PEA   $0000
            TDC
            CLC
            ADC   #$00D2
            PHA
            PEA   $0000
            PEA   $0000
            _MenuSelect
            PHA
            PEI   $E4
            PEI   $E2
            _LoWord
            PLA
            CMP   #$0000
            BNE   L011A89
            JSL   L011D3F
            JSL   L0405CF
            LDA   #$0000
            BRL   L011B3C
L011A89     JSL   L011D3F
            BRL   L011B08
            BRA   L011AE9
L011A92     PHA
            PEA   $0004
            PEA   $0000
            TDC
            CLC
            ADC   #$00D2
            PHA
            _GetNextEvent
            PLA
            TAY
            BNE   L011AB5
            BRA   L011A92
L011AB5     LDX   #$0000
            TDC
            CLC
            ADC   #$00D2
            PHX
            PHA
            PEA   ^L0281DE
            PEA   L0281DE
            PEA   $0018
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
            LDA   #$0001
            STA   L060045
            LDAL  L0281EA
            STA   [$F9]
            LDAL  L0281E8
            STA   [$FD]
            LDA   #$0003
            BRL   L011B3C
L011AE9     LDA   #$0000
            BRL   L011B3C
            BRL   L011B08
L011AF2     DA    L011A0B
            DA    L011AE9
            DA    L0119BD
            DA    L011AE9
L011AFA     DEC
            CMP   #$0003
            BCC   L011B03
            LDA   #$0003
L011B03     ASL
            TAX
            JMP   (L011AF2,X)

L011B08     PHA
            PEI   $E4
            PEI   $E2
            _HiWord
            PLA
            STA   L060047
            PHA
            PEI   $E4
            PEI   $E2
            _LoWord
            PLA
            STA   [$F9]
            LDA   #$0001
L011B3C     TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L011B46     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00D6
            TCS
            PHA
            PEA   $0004
            PEA   $0002
            _FlushEvents
            PEA   $040A
            PEA   $0000
            TDC
            CLC
            ADC   #$00DA
            PHA
            _GetNextEvent
            PLA
            LDA   $DA
            BRL   L011BCD
L011B8A     LDA   #$0002
            BRL   L011BDB
            BRL   L011BDB
L011B93     PHA
            PEA   $0004
            PEA   $0000
            TDC
            CLC
            ADC   #$00DA
            PHA
            _GetNextEvent
            PLA
            TAY
            BNE   L011BB6
            BRA   L011B93
L011BB6     LDA   #$0003
            BRL   L011BDB
L011BBC     LDA   #$0000
            BRL   L011BDB
            BRL   L011BDB
L011BC5     DA    L011B93
            DA    L011BBC
            DA    L011B8A
            DA    L011BBC
L011BCD     DEC
            CMP   #$0003
            BCC   L011BD6
            LDA   #$0003
L011BD6     ASL
            TAX
            JMP   (L011BC5,X)

L011BDB     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L011BE5     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0000
            LDA   L060047
            PHA
            _HiliteMenu
            JSL   L011D3F
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011C13     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06004B
            CMP   #$0000
            BEQ   L011C47
            JSL   doHIDECURSOR
            PEA   ^L0281F6
            PEA   L0281F6
            _SetCursor
            STZ   L06004B
            JSL   doSHOWCURSOR
L011C47     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011C4F     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06004B
            CMP   #$0001
            BEQ   L011C80
            JSL   doHIDECURSOR
            _InitCursor
            LDA   #$0001
            STA   L06004B
            JSL   doSHOWCURSOR
L011C80     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011C88     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06004B
            CMP   #$0002
            BEQ   L011CBF
            JSL   doHIDECURSOR
            PEA   ^L02833E
            PEA   L02833E
            _SetCursor
            LDA   #$0002
            STA   L06004B
            JSL   doSHOWCURSOR
L011CBF     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

doHIDECURSOR ENT
*            PHD
*            TSC
*            SEC
*            SBC   #$00FB
*            TCD
*            ADC   #$00F4
*            TCS
            LDA   L060049
            BEQ   L011CE7
            _HideCursor
            STZ   L060049
L011CE7
*            TDC
*            CLC
*            ADC   #$00FB
*            TCS
*            PLD
            RTL

doSHOWCURSOR ENT
*            PHD
*            TSC
*            SEC
*            SBC   #$00FB
*            TCD
*           ADC   #$00F4
*            TCS
            LDA   L060049
            BNE   L011D12
            _ShowCursor
            LDA   #$0001
            STA   L060049
L011D12
*            TDC
*            CLC
*            ADC   #$00FB
*            TCS
*            PLD
            RTL

L011D20     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L060049
            STA   L06004D
            LDA   L06004B
            STA   L06004F
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011D3F     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06004D
            BNE   L011D55
            JSL   doHIDECURSOR
            BRA   L011D59
L011D55     JSL   doSHOWCURSOR
L011D59     LDA   L06004F
            BRL   L011D7F
L011D5F     JSL   L011C13
            BRL   L011D8C
L011D66     JSL   L011C4F
            BRL   L011D8C
L011D6D     JSL   L011C88
            BRL   L011D8C
L011D74     BRL   L011D8C
L011D77     DA    L011D5F
            DA    L011D66
            DA    L011D6D
            DA    L011D74
L011D7F     CMP   #$0003
            BCC   L011D87
            LDA   #$0003
L011D87     ASL
            TAX
            JMP   (L011D77,X)

L011D8C     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011D94     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            BRL   L011EA0
L011DA4     JSL   L011ED1
            BRL   L011EB1
L011DAB     JSL   L011EEC
            BRL   L011EB1
L011DB2     JSL   L041528
            BRL   L011EB1
L011DB9     JSL   L0412A9
            BRL   L011EB1
L011DC0     JSL   L041919
            BRL   L011EB1
L011DC7     JSL   L011F07
            BRL   L011EB1
L011DCE     JSL   L011F2D
            BRL   L011EB1
L011DD5     JSL   L011F76
            BRL   L011EB1
L011DDC     PEA   $0000
            JSL   L011FDC
            PLY
            BRL   L011EB1
L011DE7     JSL   L01201E
            BRL   L011EB1
L011DEE     JSL   L012046
            BRL   L011EB1
L011DF5     JSL   L012097
            BRL   L011EB1
L011DFC     JSL   L0120AE
            BRL   L011EB1
L011E03     JSL   L0120CE
            BRL   L011EB1
L011E0A     JSL   L0120EE
            BRL   L011EB1
L011E11     JSL   L01211F
            BRL   L011EB1
L011E18     JSL   L01216E
            BRL   L011EB1
L011E1F     JSL   L01219C
            BRL   L011EB1
L011E26     JSL   L0121C0
            BRL   L011EB1
L011E2D     JSL   L0121E4
            BRL   L011EB1
L011E34     PEA   $0000
            LDA   L060035
            PHA
            JSL   L0122F2
            PLY
            PLY
            BRL   L011EB1
L011E44     PEA   $0001
            LDA   L060035
            PHA
            JSL   L0122F2
            PLY
            PLY
            BRL   L011EB1
L011E54     PEA   $0002
            LDA   L060035
            PHA
            JSL   L0122F2
            PLY
            PLY
            BRL   L011EB1
L011E64     JSL   L012208
            BRL   L011EB1
L011E6B     BRL   L011EB1
L011E6E     DA    L011DA4
            DA    L011DB2
            DA    L011DB9
            DA    L011DC0
            DA    L011DC7
            DA    L011DCE
            DA    L011DD5
            DA    L011DDC
            DA    L011DE7
            DA    L011DEE
            DA    L011DF5
            DA    L011DFC
            DA    L011E03
            DA    L011E0A
            DA    L011E11
            DA    L011E18
            DA    L011E1F
            DA    L011E26
            DA    L011E2D
            DA    L011E34
            DA    L011E44
            DA    L011E54
            DA    L011E64
            DA    L011DAB
            DA    L011E6B
L011EA0     SEC
            SBC   #$012C
            CMP   #$0018
            BCC   L011EAC
            LDA   #$0018
L011EAC     ASL
            TAX
            JMP   (L011E6E,X)

L011EB1     PHA
            PEA   $FFFF
            PEA   $0000
            _FlushEvents
            PLA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L011ED1     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $000C
            JSL   L01382D
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011EEC     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0010
            JSL   L01382D
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011F07     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0008
            JSL   L01382D
            PLY
            TAY
            BNE   L011F1F
            BRA   L011F23
L011F1F     JSL   L040B17
L011F23     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L011F2D     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L060085
            BNE   L011F44
            JSL   L013001
            STZ   L060063
L011F44     PEA   $0007
            JSL   L01382D
            PLY
            TAY
            BNE   L011F51
            BRA   L011F6C
L011F51     LDA   L060085
            BNE   L011F62
            JSL   L013B82
            PEA   $0001
            JSL   L011FDC
            PLY
L011F62     LDA   #$0002
            STA   L060031
            JSL   L01142C
L011F6C     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L011F76     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0132
            JSL   L0117FE
            PLY
            LDA   L060039
            BNE   L011F91
            BRL   L011FC6
L011F91     STZ   L060039
            JSL   doHIDECURSOR
            LDA   L060037
            CMP   #$0001
            BNE   L011FA9
            LDA   L06008B
            PHA
            JSL   L0160BF
            PLY
L011FA9     JSL   L01631B
            JSL   doSHOWCURSOR
            STZ   L060037
            JSL   L0427B9
            JSL   L0129BE
            PEA   $0135
            JSL   L0117B4
            PLY
            BRA   L011FD4
L011FC6     LDA   #$0001
            STA   L060039
            PEA   $0135
            JSL   L0117D9
            PLY
L011FD4     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L011FDC     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
L011FE7     LDA   #$0001
            BEQ   L012016
            JSL   L013001
            LDA   #$0001
            STA   L060063
            PEA   $0005
            JSL   L01382D
            PLY
            TAY
            BNE   L012012
            LDA   #$0001
            STA   L060051
            JSL   L041919
            TAY
            BNE   L012010
            BRA   L012016
L012010     BRA   L012014
L012012     BRA   L012016
L012014     BRA   L011FE7
L012016     TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L01201E     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0006
            JSL   L01382D
            PLY
            TAY
            BNE   L012036
            BRA   L01203C
L012036     STZ   L06003B
            STZ   L06003D
L01203C     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L012046     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00EE
            TCS
            LDA   L060035
            STA   $F2
            LDA   L060033
            STA   $F0
            JSL   L011D20
            JSL   L011C88
            STZ   L060035
            STZ   L060033
            JSL   L0400E5
            STA   $F4
            LDA   $F2
            STA   L060035
            LDA   $F0
            STA   L060033
            JSL   L011D3F
            JSL   L0442B0
            PEI   $F4
            JSL   L012BC6
            PLY
            PEI   $F4
            JSL   L04022B
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012097     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   L012A36
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0120AE     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0001
            LDA   L06002F
            PHA
            JSL   L012386
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0120CE     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0002
            LDA   L06002F
            PHA
            JSL   L012386
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0120EE     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   L012C88
            TAY
            BNE   L012117
            LDA   L060085
            BEQ   L01210A
            STZ   L06002F
            BRA   L012117
L01210A     PEA   $0000
            LDA   L06002F
            PHA
            JSL   L012386
            PLY
            PLY
L012117     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01211F     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06002D
            BEQ   L012137
            LDA   #$0000
            STA   L06002D
            BRA   L01213D
L012137     LDA   #$0001
            STA   L06002D
L01213D     LDA   #$0001
            STA   L06002B
            PEA   $013A
            JSL   L0117FE
            PLY
            JSL   doHIDECURSOR
            LDA   L06002D
            BEQ   L01215A
            JSL   L016419
            BRA   L01215E
L01215A     JSL   L016456
L01215E     JSL   doSHOWCURSOR
            JSL   L04273F
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01216E     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L060033
            BEQ   L012186
            LDA   #$0000
            STA   L060033
            BRA   L01218C
L012186     LDA   #$0001
            STA   L060033
L01218C     PEA   $013B
            JSL   L0117FE
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01219C     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0000
            PEA   $0003
            LDA   L060029
            PHA
            JSL   L012236
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0121C0     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0000
            PEA   $0004
            LDA   L060029
            PHA
            JSL   L012236
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0121E4     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0000
            PEA   $0005
            LDA   L060029
            PHA
            JSL   L012236
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012208     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L0600A7
            BEQ   L012220
            LDA   #$0000
            STA   L0600A7
            BRA   L012226
L012220     LDA   #$0001
            STA   L0600A7
L012226     PEA   $0142
            JSL   L0117FE
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012236     ENT
            PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EE
            TCS
            LDA   $FF
            BNE   L012253
            PEA   $0007
            JSL   L01382D
            PLY
            TAY
            BNE   L012253
            BRL   L0122E8
L012253     LDA   $FB
            BRL   L012284
L012258     PEA   $013C
            JSL   L0117FE
            PLY
            BRL   L012294
L012263     PEA   $013D
            JSL   L0117FE
            PLY
            BRL   L012294
L01226E     PEA   $013E
            JSL   L0117FE
            PLY
            BRL   L012294
L012279     BRL   L012294
L01227C     DA    L012258
            DA    L012263
            DA    L01226E
            DA    L012279
L012284     DEC
            DEC
            DEC
            CMP   #$0003
            BCC   L01228F
            LDA   #$0003
L01228F     ASL
            TAX
            JMP   (L01227C,X)

L012294     LDA   $FD
            BRL   L0122C5
L012299     PEA   $013C
            JSL   L0117FE
            PLY
            BRL   L0122D5
L0122A4     PEA   $013D
            JSL   L0117FE
            PLY
            BRL   L0122D5
L0122AF     PEA   $013E
            JSL   L0117FE
            PLY
            BRL   L0122D5
L0122BA     BRL   L0122D5
L0122BD     DA    L012299
            DA    L0122A4
            DA    L0122AF
            DA    L0122BA
L0122C5     DEC
            DEC
            DEC
            CMP   #$0003
            BCC   L0122D0
            LDA   #$0003
L0122D0     ASL
            TAX
            JMP   (L0122BD,X)

L0122D5     LDA   $FD
            STA   L060029
            LDA   $FF
            BNE   L0122E8
            LDA   #$0002
            STA   L060031
            JSL   L01142C
L0122E8     TAY
            TDC
            CLC
            ADC   #$00F5
            TCS
            TYA
            PLD
            RTL

L0122F2     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   $FD
            BRL   L01232E
L012302     PEA   $013F
            JSL   L0117FE
            PLY
            BRL   L01233B
L01230D     PEA   $0140
            JSL   L0117FE
            PLY
            BRL   L01233B
L012318     PEA   $0141
            JSL   L0117FE
            PLY
            BRL   L01233B
L012323     BRL   L01233B
L012326     DA    L012302
            DA    L01230D
            DA    L012318
            DA    L012323
L01232E     CMP   #$0003
            BCC   L012336
            LDA   #$0003
L012336     ASL
            TAX
            JMP   (L012326,X)

L01233B     LDA   $FF
            BRL   L01236C
L012340     PEA   $013F
            JSL   L0117FE
            PLY
            BRL   L012379
L01234B     PEA   $0140
            JSL   L0117FE
            PLY
            BRL   L012379
L012356     PEA   $0141
            JSL   L0117FE
            PLY
            BRL   L012379
L012361     BRL   L012379
L012364     DA    L012340
            DA    L01234B
            DA    L012356
            DA    L012361
L01236C     CMP   #$0003
            BCC   L012374
            LDA   #$0003
L012374     ASL
            TAX
            JMP   (L012364,X)

L012379     LDA   $FF
            STA   L060035
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L012386     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   $FD
            BRL   L0123C2
L012396     PEA   $0138
            JSL   L0117FE
            PLY
            BRL   L0123CF
L0123A1     PEA   $0137
            JSL   L0117FE
            PLY
            BRL   L0123CF
L0123AC     PEA   $0139
            JSL   L0117FE
            PLY
            BRL   L0123CF
L0123B7     BRL   L0123CF
L0123BA     DA    L0123AC
            DA    L0123A1
            DA    L012396
            DA    L0123B7
L0123C2     CMP   #$0003
            BCC   L0123CA
            LDA   #$0003
L0123CA     ASL
            TAX
            JMP   (L0123BA,X)

L0123CF     LDA   $FF
            BRL   L012400
L0123D4     PEA   $0138
            JSL   L0117FE
            PLY
            BRL   L01240D
L0123DF     PEA   $0137
            JSL   L0117FE
            PLY
            BRL   L01240D
L0123EA     PEA   $0139
            JSL   L0117FE
            PLY
            BRL   L01240D
L0123F5     BRL   L01240D
L0123F8     DA    L0123EA
            DA    L0123DF
            DA    L0123D4
            DA    L0123F5
L012400     CMP   #$0003
            BCC   L012408
            LDA   #$0003
L012408     ASL
            TAX
            JMP   (L0123F8,X)

L01240D     LDA   $FF
            STA   L06002F
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L01241A     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDAL  L0202A0
            SEC
            SBCL  L02029E
            BEQ   L01243F
            BVS   L012435
            EOR   #$8000
L012435     BPL   L01243F
            LDA   #$0002
            STA   L060031
            BRA   L012455
L01243F     LDAL  L0202A0
            SEC
            SBCL  L02029E
            BVS   L01244D
            EOR   #$8000
L01244D     BMI   L012455
            LDA   #$0001
            STA   L060031
L012455     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01245D     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F0
            TCS
            STZ   $F2
            LDA   L060031
            CMP   #$0001
            BNE   L0124AD
            STZ   $F4
            BRA   L01249C
L012476     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            CMP   #$0000
            BEQ   L01249A
            LDA   #$0001
            STA   $F2
L01249A     INC   $F4
L01249C     LDA   $F4
            SEC
            SBC   #$0005
            BEQ   L012476
            BVS   L0124A9
            EOR   #$8000
L0124A9     BPL   L012476
            BRA   L0124E9
L0124AD     LDA   #$0006
            STA   $F4
            BRA   L0124DA
L0124B4     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            CMP   #$0000
            BEQ   L0124D8
            LDA   #$0001
            STA   $F2
L0124D8     INC   $F4
L0124DA     LDA   $F4
            SEC
            SBC   #$000B
            BEQ   L0124B4
            BVS   L0124E7
            EOR   #$8000
L0124E7     BPL   L0124B4
L0124E9     LDA   $F2
            CMP   #$0000
            BEQ   L0124F3
            BRL   L012560
L0124F3     LDA   L06002F
            CMP   #$0000
            BNE   L012532
            LDA   L060085
            BEQ   L01251D
            LDA   L0600A7
            BNE   L012513
            PEA   $7D00
            PEA   $0005
            JSL   L014CED
            PLY
            PLY
            BRA   L012517
L012513     JSL   L043CDA
L012517     JSL   L01241A
            BRA   L012530
L01251D     JSL   L012C46
            TAY
            BEQ   L01252C
            LDA   #$0002
            STA   L060031
            BRA   L012530
L01252C     JSL   L01241A
L012530     BRA   L01255C
L012532     JSL   L01241A
            LDA   L06003B
            CLC
            ADCL  L0202A0
            STA   L06003B
            LDA   L06003D
            CLC
            ADCL  L02029E
            STA   L06003D
            JSL   L042858
            JSL   L013BCA
            PEA   $0001
            JSL   L011FDC
            PLY
L01255C     JSL   L01142C
L012560     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012568     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EC
            TCS
            LDA   $FF
            STA   $F0
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            STA   $EE
            JSL   doHIDECURSOR
            LDA   L06002B
            CMP   #$FFFF
            BEQ   L0125A2
            BRL   L012675
L0125A2     STZ   $F2
            BRL   L012663
L0125A7     LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            DEC
            STA   [$F4]
            PLA
            PEA   $0001
            PEA   $0001
            PEI   $FF
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            INC   $F0
            LDA   #$000C
            PHA
            LDA   $F0
            SEC
            JSL   L017037
            PLA
            STA   $F0
            LDA   $F0
            CMP   $FF
            BNE   L012617
            INC   $F0
            LDA   #$000C
            PHA
            LDA   $F0
            SEC
            JSL   L017037
            PLA
            STA   $F0
L012617     LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            INC
            STA   [$F4]
            PLA
            PEA   $FFFF
            PEA   $0001
            PEI   $F0
            LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            INC   $F2
L012663     LDA   $F2
            SEC
            SBC   $EE
            BVS   L01266D
            EOR   #$8000
L01266D     BMI   L012672
            BRL   L0125A7
L012672     BRL   L012741
L012675     STZ   $F2
            BRL   L012732
L01267A     LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            DEC
            STA   [$F4]
            PLA
            PEA   $0001
            PEA   $0001
            PEI   $FF
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            DEC   $F0
            LDA   $F0
            CMP   #$FFFF
            BNE   L0126D2
            LDA   #$000B
            STA   $F0
L0126D2     LDA   $F0
            CMP   $FF
            BNE   L0126E6
            DEC   $F0
            LDA   $F0
            CMP   #$FFFF
            BNE   L0126E6
            LDA   #$000B
            STA   $F0
L0126E6     LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            INC
            STA   [$F4]
            PLA
            PEA   $FFFF
            PEA   $0001
            PEI   $F0
            LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            INC   $F2
L012732     LDA   $F2
            SEC
            SBC   $EE
            BVS   L01273C
            EOR   #$8000
L01273C     BMI   L012741
            BRL   L01267A
L012741     LDA   $F0
            TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L01274D     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EC
            TCS
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            STA   $F0
            LDA   L060031
            CMP   #$0001
            BNE   L012783
            LDA   #$000D
            STA   $EE
            BRA   L012788
L012783     LDA   #$000C
            STA   $EE
L012788     STZ   $F2
            BRA   L012798
L01278C     PEI   $EE
            PEI   $FF
            JSL   L012CB0
            PLY
            PLY
            INC   $F2
L012798     LDA   $F2
            SEC
            SBC   $F0
            BVS   L0127A2
            EOR   #$8000
L0127A2     BPL   L01278C
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0127AC     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            STZ   $F0
            LDA   L060031
            CMP   #$0001
            BEQ   L0127C4
            BRL   L01283F
L0127C4     LDA   $FF
            STA   $F2
            BRA   L0127E2
L0127CA     JSL   doHIDECURSOR
            PEI   $F2
            JSL   L01274D
            PLY
            LDA   #$0001
            STA   $F0
            LDA   $F2
            CLC
            ADC   L06002B
            STA   $F2
L0127E2     LDA   $F2
            SEC
            SBC   #$000B
            BEQ   L0127F1
            BVS   L0127EF
            EOR   #$8000
L0127EF     BMI   L01283C
L0127F1     LDA   $F2
            SEC
            SBC   #$0006
            BVS   L0127FC
            EOR   #$8000
L0127FC     BPL   L01283C
            LDA   $F2
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            CMP   #$0002
            BEQ   L0127CA
            LDA   $F2
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            CMP   #$0003
            BEQ   L0127CA
L01283C     BRL   L0128B7
L01283F     LDA   $FF
            STA   $F2
            BRA   L01285D
L012845     JSL   doHIDECURSOR
            PEI   $F2
            JSL   L01274D
            PLY
            LDA   #$0001
            STA   $F0
            LDA   $F2
            CLC
            ADC   L06002B
            STA   $F2
L01285D     LDA   $F2
            SEC
            SBC   #$0005
            BEQ   L01286C
            BVS   L01286A
            EOR   #$8000
L01286A     BMI   L0128B7
L01286C     LDA   $F2
            SEC
            SBC   #$0000
            BVS   L012877
            EOR   #$8000
L012877     BPL   L0128B7
            LDA   $F2
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            CMP   #$0002
            BEQ   L012845
            LDA   $F2
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            CMP   #$0003
            BEQ   L012845
L0128B7     LDA   $F0
            BEQ   L0128DA
            LDA   L06002D
            BEQ   L0128DA
            LDA   L06002B
            CMP   #$0001
            BNE   L0128D0
            LDA   #$FFFF
            STA   L06002B
            BRA   L0128D6
L0128D0     LDA   #$0001
            STA   L06002B
L0128D6     JSL   L016489
L0128DA     TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0128E2     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            PEI   $FF
            JSL   L012568
            PLY
            STA   $F2
            LDA   L060033
            BEQ   L012906
            JSL   doHIDECURSOR
            PEI   $FF
            JSL   L0160BF
            PLY
L012906     LDA   L060031
            CMP   #$0001
            BNE   L012916
            LDAL  L0202A0
            STA   $F0
            BRA   L01291C
L012916     LDAL  L02029E
            STA   $F0
L01291C     PEI   $F2
            JSL   L0127AC
            PLY
            LDA   L060031
            CMP   #$0001
            BNE   L012936
            LDAL  L0202A0
            SEC
            SBC   $F0
            STA   $F0
            BRA   L01293F
L012936     LDAL  L02029E
            SEC
            SBC   $F0
            STA   $F0
L01293F     PEI   $F0
            PEI   $FF
            JSL   L042692
            PLY
            PLY
            JSL   L012DCE
            LDA   L06002F
            CMP   #$0000
            BEQ   L012959
            JSL   L0405CF
L012959     TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L012961     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            LDA   L06002F
            CMP   #$0000
            BNE   L012978
            JSL   L0129BE
L012978     LDA   L060035
            CMP   #$0002
            BNE   L012988
            LDA   L06002F
            CMP   #$0000
            BNE   L012991
L012988     LDA   L060033
            BNE   L012991
            JSL   L011C88
L012991     JSL   L0400E5
            STA   $F4
            LDA   L060033
            BEQ   L0129A3
            PEI   $F4
            JSL   L012FD1
            PLY
L0129A3     PEI   $F4
            JSL   L0128E2
            PLY
            LDA   L06002F
            CMP   #$0000
            BEQ   L0129B6
            JSL   L011C13
L0129B6     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0129BE     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            STZ   $F4
            BRA   L012A05
L0129CD     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            PHA
            LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0284AE
            LDX   #^L0284AE
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            PLA
            STA   [$F6]
            INC   $F4
L012A05     LDA   $F4
            SEC
            SBC   #$000E
            BVS   L012A10
            EOR   #$8000
L012A10     BPL   L0129CD
            LDA   L060031
            STAL  L0284CA
            LDA   L06002B
            STAL  L0284CC
            LDA   L060097
            STAL  L0284CE
            LDA   L06002D
            STAL  L0284D0
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012A36     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            LDAL  L0284CA
            STA   L060031
            LDAL  L0284CC
            STA   L06002B
            LDAL  L0284CE
            STA   L060097
            LDA   L06002D
            CMPL  L0284D0
            BEQ   L012A67
            PEA   $013A
            JSL   L0117FE
            PLY
L012A67     LDAL  L0284D0
            STA   L06002D
            STZ   $F4
            BRA   L012AAA
L012A72     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0284AE
            LDX   #^L0284AE
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            PHA
            LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            PLA
            STA   [$F6]
            INC   $F4
L012AAA     LDA   $F4
            SEC
            SBC   #$000C
            BVS   L012AB5
            EOR   #$8000
L012AB5     BPL   L012A72
            JSL   doHIDECURSOR
            PEA   $0000
            JSL   L015162
            PLY
            LDAL  L0284C8
            PHA
            LDAL  L0284C6
            PHA
            JSL   L015891
            PLY
            PLY
            JSL   doSHOWCURSOR
            JSL   L040246
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012AE3     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            JSL   L0129BE
            PEI   $FF
            JSL   L0128E2
            PLY
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L012B01     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            LDA   $FF
            STA   $F0
            LDA   L06002B
            CMP   #$FFFF
            BNE   L012B6C
            STZ   $F2
            BRA   L012B44
L012B1C     INC   $F0
            LDA   #$000C
            PHA
            LDA   $F0
            SEC
            JSL   L017037
            PLA
            STA   $F0
            LDA   $F0
            CMP   $FF
            BNE   L012B42
            INC   $F0
            LDA   #$000C
            PHA
            LDA   $F0
            SEC
            JSL   L017037
            PLA
            STA   $F0
L012B42     INC   $F2
L012B44     LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            SEC
            SBC   $F2
            BEQ   L012B6A
            BVS   L012B68
            EOR   #$8000
L012B68     BMI   L012B1C
L012B6A     BRA   L012BBA
L012B6C     STZ   $F2
            BRA   L012B94
L012B70     DEC   $F0
            LDA   $F0
            CMP   #$FFFF
            BNE   L012B7E
            LDA   #$000B
            STA   $F0
L012B7E     LDA   $F0
            CMP   $FF
            BNE   L012B92
            DEC   $F0
            LDA   $F0
            CMP   #$FFFF
            BNE   L012B92
            LDA   #$000B
            STA   $F0
L012B92     INC   $F2
L012B94     LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            SEC
            SBC   $F2
            BEQ   L012BBA
            BVS   L012BB8
            EOR   #$8000
L012BB8     BMI   L012B70
L012BBA     LDA   $F0
            TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L012BC6     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            JSL   doHIDECURSOR
            LDA   #$0001
            STA   L060053
            LDA   $FF
            STA   L060057
            PEI   $FF
            JSL   L015DAE
            PLY
            PEI   $FF
            JSL   L012B01
            PLY
            STA   L060059
            LDA   L060059
            CMP   L060057
            BEQ   L012C02
            LDA   L060059
            PHA
            JSL   L016113
            PLY
L012C02     JSL   doSHOWCURSOR
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L012C0E     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   doHIDECURSOR
            STZ   L060053
            LDA   L060057
            PHA
            JSL   L015EB5
            PLY
            LDA   L060059
            CMP   L060057
            BEQ   L012C3A
            LDA   L060059
            PHA
            JSL   L016113
            PLY
L012C3A     JSL   doSHOWCURSOR
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012C46     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $000B
            JSL   L01382D
            PLY
            TAY
            BNE   L012C61
            LDA   #$0000
            BRA   L012C7E
L012C61     LDA   L060085
            BEQ   L012C6E
            LDA   #$0002
            STA   L06002F
            BRA   L012C7B
L012C6E     PEA   $0001
            LDA   L06002F
            PHA
            JSL   L012386
            PLY
            PLY
L012C7B     LDA   #$0001
L012C7E     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L012C88     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $000A
            JSL   L01382D
            PLY
            TAY
            BEQ   L012CA3
            LDA   #$0000
            BRA   L012CA6
L012CA3     LDA   #$0001
L012CA6     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L012CB0     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   $FD
            CMP   $FF
            BNE   L012CC4
            BRL   L012DC6
L012CC4     LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            DEC
            STA   [$F2]
            PLA
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            INC
            STA   [$F2]
            PLA
            LDA   $FD
            BRL   L012D53
L012D07     PEA   $0001
            PEI   $FD
            JSL   L015645
            PLY
            PLY
            PEI   $FD
            JSL   L015EFD
            PLY
            BRL   L012D64
L012D1C     PEA   $0001
            PEA   $0001
            PEI   $FD
            LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            BRL   L012D64
            BRL   L012D64
L012D4D     DA    L012D07
            DA    L012D07
            DA    L012D1C
L012D53     SEC
            SBC   #$000C
            CMP   #$0002
            BCC   L012D5F
            LDA   #$0002
L012D5F     ASL
            TAX
            JMP   (L012D4D,X)

L012D64     LDA   $FF
            BRL   L012DB5
L012D69     PEA   $0001
            PEI   $FF
            JSL   L01529A
            PLY
            PLY
            PEI   $FF
            JSL   L015EFD
            PLY
            BRL   L012DC6
L012D7E     PEA   $FFFF
            PEA   $0001
            PEI   $FF
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            BRL   L012DC6
            BRL   L012DC6
L012DAF     DA    L012D69
            DA    L012D69
            DA    L012D7E
L012DB5     SEC
            SBC   #$000C
            CMP   #$0002
            BCC   L012DC1
            LDA   #$0002
L012DC1     ASL
            TAX
            JMP   (L012DAF,X)

L012DC6     TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L012DCE     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L060031
            CMP   #$0001
            BNE   L012DE9
            LDA   #$0002
            STA   L060031
            BRA   L012DEF
L012DE9     LDA   #$0001
            STA   L060031
L012DEF     JSL   doHIDECURSOR
            JSL   L01624C
            LDA   L06002F
            CMP   #$0000
            BNE   L012E0C
            LDA   L060033
            BNE   L012E25
            LDA   L060035
            CMP   #$0000
            BNE   L012E25
L012E0C     LDA   L06002F
            CMP   #$0001
            BNE   L012E21
            LDA   L060031
            CMP   #$0001
            BNE   L012E21
            LDA   L060033
            BNE   L012E25
L012E21     JSL   doSHOWCURSOR
L012E25     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012E2D     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06002B
            EOR   #$FFFF
            INC
            STA   L06002B
            JSL   doHIDECURSOR
            JSL   L016489
            LDA   L06002F
            CMP   #$0000
            BNE   L012E57
            LDA   L060033
            BNE   L012E5B
L012E57     JSL   doSHOWCURSOR
L012E5B     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L012E63     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00E6
            TCS
            LDA   L060033
            BNE   L012E76
            BRL   L012FC7
L012E76     LDA   L060055
            BNE   L012E7E
            BRL   L012F6B
L012E7E     STZ   L06005F
            LDA   L060031
            CMP   #$0002
            BNE   L012EE2
            LDA   #$0006
            STA   $F4
            BRA   L012ED3
L012E90     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            CMP   #$0000
            BEQ   L012ED1
            LDA   L06005F
            ASL
            LDX   #$0000
            PHX
            PHA
            LDX   #$0000
            TDC
            CLC
            ADC   #$00E8
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   $F4
            STA   [$F6]
            INC   L06005F
L012ED1     INC   $F4
L012ED3     LDA   $F4
            SEC
            SBC   #$000C
            BVS   L012EDE
            EOR   #$8000
L012EDE     BPL   L012E90
            BRA   L012F36
L012EE2     STZ   $F4
            BRA   L012F29
L012EE6     LDA   $F4
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            CMP   #$0000
            BEQ   L012F27
            LDA   L06005F
            ASL
            LDX   #$0000
            PHX
            PHA
            LDX   #$0000
            TDC
            CLC
            ADC   #$00E8
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   $F4
            STA   [$F6]
            INC   L06005F
L012F27     INC   $F4
L012F29     LDA   $F4
            SEC
            SBC   #$0006
            BVS   L012F34
            EOR   #$8000
L012F34     BPL   L012EE6
L012F36     LDA   L06005F
            PHA
            JSL   L04071C
            PLY
            SEC
            SBC   #$0001
            STA   L06005B
            LDA   L06005B
            ASL
            LDX   #$0000
            PHX
            PHA
            LDX   #$0000
            TDC
            CLC
            ADC   #$00E8
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            STA   L06005B
            STZ   L060055
            BRA   L012F71
L012F6B     LDA   L06005D
            STA   L06005B
L012F71     LDA   L06005F
            PHA
            JSL   L04071C
            PLY
            SEC
            SBC   #$0001
            STA   L06005D
            LDA   L06005D
            ASL
            LDX   #$0000
            PHX
            PHA
            LDX   #$0000
            TDC
            CLC
            ADC   #$00E8
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            STA   L06005D
            LDA   L06005B
            CMP   L06005D
            BEQ   L012FC7
            JSL   doHIDECURSOR
            LDA   L06005D
            PHA
            LDA   L06005B
            PHA
            JSL   L01615C
            PLY
            PLY
            JSL   L04312F
            PEA   $4E20
            JSL   L014CC8
            PLY
L012FC7     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L012FD1     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   L06005D
            CMP   $FF
            BEQ   L012FF3
            PEI   $FF
            LDA   L06005D
            PHA
            JSL   L01615C
            PLY
            PLY
            JSL   L04312F
L012FF3     LDA   #$0001
            STA   L060055
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L013001     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   #$0001
            STA   L060061
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01301A     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E6
            TCS
            LDA   $FD
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L028552
            LDX   #^L028552
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $E8
            LDA   #$0001
            PHA
            LDA   $E8
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0284D2
            LDX   #^L0284D2
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L013070
            DEX
L013070     PHX
            PHA
            LDA   $E8
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0284D2
            LDX   #^L0284D2
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L0130A2
            DEX
L0130A2     PHX
            PHA
            LDA   #L0380BC
            LDX   #^L0380BC
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $F0
            STA   $EE
            LDA   $FF
            BEQ   L013102
            LDA   $FD
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L028552
            LDX   #^L028552
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            STA   $EC
            LDA   $FD
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L028552
            LDX   #^L028552
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDY   #$0004
            LDA   [$F2],Y
            STA   $EA
            BRA   L01312C
L013102     PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EA
            PHA
            JSL   L0143BB
            PLY
            PLY
            PLY
            PLY
            LDA   $EC
            CLC
            ADC   #$0006
            STA   $EC
            LDA   $EA
            CLC
            ADC   #$0003
            STA   $EA
L01312C     JSL   doHIDECURSOR
            LDA   $E8
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0284D2
            LDX   #^L0284D2
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDY   #$0006
            LDA   [$F2],Y
            PHA
            LDA   $E8
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0284D2
            LDX   #^L0284D2
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDY   #$0004
            LDA   [$F2],Y
            PHA
            LDA   $EA
            CLC
            ADC   #$0005
            PHA
            LDA   $EC
            CLC
            ADC   #$0005
            PHA
            PEI   $F0
            PEI   $EE
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            JSL   doSHOWCURSOR
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L01319A     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $FFFF
            PEA   $0016
            PEA   $FFFF
            PEA   $000A
            PEA   $0000
            PEA   ^L0285FF
            PEA   L0285FF
            PEA   ^L0285FE
            PEA   L0285FE
            PEA   ^L0285FD
            PEA   L0285FD
            PEA   ^L0285FA
            PEA   L0285FA
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            PEA   $0001
            PEA   $000C
            JSL   L01301A
            PLY
            PLY
            PEA   $0001
            PEA   $000D
            JSL   L01301A
            PLY
            PLY
            PEA   $0001
            PEA   $000E
            JSL   L01301A
            PLY
            PLY
            PEA   ^L028600
            PEA   L028600
            PEA   $0000
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L028608
            PEA   L028608
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L028617
            PEA   L028617
            PEA   $0002
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   $0041
            PEA   ^L028632
            PEA   L028632
            PEA   $0004
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0041
            PEA   ^L028642
            PEA   L028642
            PEA   $0006
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0041
            PEA   ^L028656
            PEA   L028656
            PEA   $0007
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0041
            PEA   ^L02866A
            PEA   L02866A
            PEA   $0009
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            JSL   L0169B1
            JSL   L0147AF
            PEA   $0001
            JSL   L0147DC
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L013294     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            PEA   $0008
            PEA   $0000
            PEA   ^L028680
            PEA   L028680
            PEA   ^L02867F
            PEA   L02867F
            PEA   ^L02867E
            PEA   L02867E
            PEA   ^L02867B
            PEA   L02867B
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            PEA   $0001
            PEA   $0010
            JSL   L01301A
            PLY
            PLY
            PEA   $0013
            PEA   $0002
            PEA   ^L028681
            PEA   L028681
            JSL   L01444C
            PLY
            PLY
            PLY
            PLY
            PEA   $0002
            PEA   ^L028694
            PEA   L028694
            PEA   $0002
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0014
            PEA   ^L02869B
            PEA   L02869B
            PEA   $0003
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0075
            PEA   ^L0286A1
            PEA   L0286A1
            PEA   $0003
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0014
            PEA   ^L0286B0
            PEA   L0286B0
            PEA   $0004
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0075
            PEA   ^L0286B6
            PEA   L0286B6
            PEA   $0004
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0002
            PEA   ^L0286C5
            PEA   L0286C5
            PEA   $0005
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0014
            PEA   ^L0286E4
            PEA   L0286E4
            PEA   $0006
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0087
            PEA   ^L0286EA
            PEA   L0286EA
            PEA   $0006
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0014
            PEA   ^L0286F7
            PEA   L0286F7
            PEA   $0007
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            PEA   $0087
            PEA   ^L0286FD
            PEA   L0286FD
            PEA   $0007
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            JSL   L0147AF
            PEA   $0001
            JSL   L0147DC
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0133CE     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EE
            TCS
            LDA   $FB
            CMP   #$0011
            BNE   L013415
            PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            PEA   $0004
            PEA   $0000
            PEA   ^L02870F
            PEA   L02870F
            PEA   ^L02870E
            PEA   L02870E
            PEA   ^L02870D
            PEA   L02870D
            PEA   ^L02870A
            PEA   L02870A
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            BRA   L013448
L013415     PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            PEA   $0003
            PEA   $0000
            PEA   ^L028715
            PEA   L028715
            PEA   ^L028714
            PEA   L028714
            PEA   ^L028713
            PEA   L028713
            PEA   ^L028710
            PEA   L028710
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
L013448     LDA   $FB
            CMP   #$0009
            BEQ   L013456
            LDA   $FB
            CMP   #$0011
            BNE   L013463
L013456     PEA   $0001
            PEI   $FB
            JSL   L01301A
            PLY
            PLY
            BRA   L01346E
L013463     PEA   $0000
            PEI   $FB
            JSL   L01301A
            PLY
            PLY
L01346E     LDA   $FB
            BRL   L01355A
L013473     PEA   ^L028716
            PEA   L028716
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L013594
L013486     PEA   ^L028722
            PEA   L028722
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L013594
L013499     PEA   $0039
            PEA   ^L02872F
            PEA   L02872F
            PEA   $0001
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            BRL   L013594
L0134B0     PEA   ^L028745
            PEA   L028745
            PEA   $0000
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L028759
            PEA   L028759
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L013594
L0134D3     PEA   ^L028761
            PEA   L028761
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEI   $FF
            PEI   $FD
            PEA   $0002
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L013594
L0134F4     PEA   ^L02876D
            PEA   L02876D
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEI   $FF
            PEI   $FD
            PEA   $0002
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L013594
L013515     PEA   $0039
            PEA   ^L028779
            PEA   L028779
            PEA   $0001
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            BRL   L013594

L01355A     CMP   #$0000
            BNE   L013562
            BRL   L013473
L013562     CMP   #$0001
            BNE   L01356A
            BRL   L013486
L01356A     CMP   #$0003
            BNE   L013572
            BRL   L0134D3
L013572     CMP   #$0004
            BNE   L01357A
            BRL   L0134F4
L01357A     CMP   #$0009
            BEQ   L013515
            CMP   #$0013
            BNE   L01358C
            BRL   L013499
L01358C     CMP   #$0014
            BNE   L013594
            BRL   L0134B0

L013594     JSL   L0147AF
            LDA   L060061
            BNE   L0135A7
            PEA   $0001
            JSL   L0147DC
            PLY
            BRA   L0135AF
L0135A7     PEA   $0000
            JSL   L0147DC
            PLY
L0135AF     TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            RTL

L0135B7     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F0
            TCS
            LDA   $FF
            BRL   L0136A4
L0135C7     PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            LDA   $FF
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L028552
            LDX   #^L028552
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDY   #$0006
            LDA   [$F4],Y
            PHA
            PEA   $0001
            PEA   ^L0287CB
            PEA   L0287CB
            PEA   ^L0287CA
            PEA   L0287CA
            PEA   ^L0287C3
            PEA   L0287C3
            PEA   ^L0287BA
            PEA   L0287BA
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            BRL   L0136BF
L01361A     PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            PEA   $0003
            PEA   $0001
            PEA   ^L0287D4
            PEA   L0287D4
            PEA   ^L0287D3
            PEA   L0287D3
            PEA   ^L0287CF
            PEA   L0287CF
            PEA   ^L0287CC
            PEA   L0287CC
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            BRL   L0136BF
L013650     PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            LDA   $FF
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L028552
            LDX   #^L028552
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDY   #$0006
            LDA   [$F4],Y
            PHA
            PEA   $0001
            PEA   ^L0287DD
            PEA   L0287DD
            PEA   ^L0287DC
            PEA   L0287DC
            PEA   ^L0287D9
            PEA   L0287D9
            PEA   ^L0287D5
            PEA   L0287D5
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            BRA   L0136BF
            BRA   L0136BF
L0136A4     CMP   #$0002
            BNE   L0136AC
            BRL   L0135C7
L0136AC     CMP   #$000A
            BNE   L0136B4
            BRL   L0135C7
L0136B4     CMP   #$0012
            BNE   L0136BC
            BRL   L01361A
L0136BC     JMP   L013650

L0136BF     LDA   $FF
            CMP   #$0007
            BEQ   L0136CD
            LDA   $FF
            CMP   #$0012
            BNE   L0136DA
L0136CD     PEA   $0001
            PEI   $FF
            JSL   L01301A
            PLY
            PLY
            BRA   L0136E5
L0136DA     PEA   $0000
            PEI   $FF
            JSL   L01301A
            PLY
            PLY
L0136E5     LDA   $FF
            BRL   L0137B6
L0136EA     PEA   ^L0287DE
            PEA   L0287DE
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L0137EB
L0136FD     PEA   ^L0287ED
            PEA   L0287ED
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L0137EB
L013710     PEA   $0050
            PEA   ^L0287FB
            PEA   L0287FB
            PEA   $0001
            JSL   L014487
            PLY
            PLY
            PLY
            PLY
            BRL   L0137EB
L013727     PEA   ^L02880D
            PEA   L02880D
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L0137EB
L01373A     PEA   ^L02881B
            PEA   L02881B
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L0137EB
L01374D     PEA   ^L02882B
            PEA   L02882B
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L028839
            PEA   L028839
            PEA   $0002
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L028853
            PEA   L028853
            PEA   $0003
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRL   L0137EB
L013780     PEA   ^L028866
            PEA   L028866
            PEA   $0000
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L02887A
            PEA   L02887A
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEA   ^L028895
            PEA   L028895
            PEA   $0002
            JSL   L0143DA
            PLY
            PLY
            PLY
            BRA   L0137EB
            BRA   L0137EB
            BRA   L0137EB
L0137B6     CMP   #$0002
            BNE   L0137BE
            BRL   L0136EA
L0137BE     CMP   #$0006
            BNE   L0137C6
            BRL   L0136FD
L0137C6     CMP   #$0007
            BNE   L0137CE
            BRL   L013710
L0137CE     CMP   #$0008
            BNE   L0137D6
            BRL   L013727
L0137D6     CMP   #$000A
            BNE   L0137DE
            BRL   L01374D
L0137DE     CMP   #$000B
            BNE   L0137E6
            BRL   L01373A
L0137E6     CMP   #$0012
            BEQ   L013780
L0137EB     JSL   L0147AF
            STA   $F2
            LDA   L060061
            BEQ   L013802
            LDA   L060061
            BEQ   L01380C
            LDA   $F2
            CMP   L060063
            BEQ   L01380C
L013802     PEA   $0001
            JSL   L0147DC
            PLY
            BRA   L013814
L01380C     PEA   $0000
            JSL   L0147DC
            PLY
L013814     LDA   $F2
            CMP   #$0000
            BEQ   L013820
            LDA   #$0000
            BRA   L013823
L013820     LDA   #$0001
L013823     TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L01382D     ENT
            PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EE
            TCS
            JSL   L0405CF
            LDA   $FB
            BRL   L0138C5
L013841     JSL   L01319A
            BRL   L0138ED
L013848     JSL   L013294
            BRL   L0138ED
L01384F     JSL   L0405CF
            JSL   L0138FB
            BRL   L0138F1
            BRL   L0138ED
L01385D     JSL   L0405CF
            BRL   L0138F1
            BRL   L0138ED
L01386B     PEI   $FB
            JSL   L0135B7
            PLY
            BRL   L0138F1
            JSL   L0405CF
            BRL   L0138ED
L01387C     LDA   $FB
            SEC
            SBC   #$0005
            BVS   L013887
            EOR   #$8000
L013887     BPL   L0138A5
            LDA   $FB
            CMP   #$0009
            BEQ   L0138A5
            LDA   $FB
            CMP   #$0011
            BEQ   L0138A5
            LDA   $FB
            CMP   #$0013
            BEQ   L0138A5
            LDA   $FB
            CMP   #$0014
            BNE   L0138B4
L0138A5     PEI   $FF
            PEI   $FD
            PEI   $FB
            JSL   L0133CE
            PLY
            PLY
            PLY
            BRA   L0138C1
L0138B4     JSL   L0405CF
            PEI   $FB
            JSL   L0135B7
            PLY
            BRA   L0138F1
L0138C1     BRA   L0138ED
            BRA   L0138ED
L0138C5     CMP   #$0002
            BEQ   L01386B
            CMP   #$0005
            BNE   L0138D2
            BRL   L01384F
L0138D2     CMP   #$000C
            BNE   L0138DA
            BRL   L013841
L0138DA     CMP   #$000F
            BNE   L0138E2
            BRL   L01385D
L0138E2     CMP   #$0010
            BNE   L0138EA
            BRL   L013848
L0138EA     JMP   L01387C

L0138ED     JSL   L0405CF
L0138F1     TAY
            TDC
            CLC
            ADC   #$00F5
            TCS
            TYA
            PLD
            RTL

L0138FB     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$0052
            TCS
            LDA   L06003B
            CMP   #$0001
            BNE   L01392C
            LDA   L06003B
            PHA
            PEA   ^L0288A3
            PEA   L0288A3
            PEA   $0000
            TDC
            CLC
            ADC   #$00A4
            PHA
            JSL   L0169EA
            PLY
            PLY
            PLY
            PLY
            PLY
            BRA   L013948
L01392C     LDA   L06003B
            PHA
            PEA   ^L0288B0
            PEA   L0288B0
            PEA   $0000
            TDC
            CLC
            ADC   #$00A4
            PHA
            JSL   L0169EA
            PLY
            PLY
            PLY
            PLY
            PLY
L013948     LDA   L06003D
            CMP   #$0001
            BNE   L01396E
            LDA   L06003D
            PHA
            PEA   ^L0288BC
            PEA   L0288BC
            PEA   $0000
            TDC
            CLC
            ADC   #$0054
            PHA
            JSL   L0169EA
            PLY
            PLY
            PLY
            PLY
            PLY
            BRA   L01398A
L01396E     LDA   L06003D
            PHA
            PEA   ^L0288C9
            PEA   L0288C9
            PEA   $0000
            TDC
            CLC
            ADC   #$0054
            PHA
            JSL   L0169EA
            PLY
            PLY
            PLY
            PLY
            PLY
L01398A     JSL   L013B98
            PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            PEA   $0004
            PEA   $0000
            PEA   ^L0288DD
            PEA   L0288DD
            PEA   ^L0288DC
            PEA   L0288DC
            PEA   ^L0288D8
            PEA   L0288D8
            PEA   ^L0288D5
            PEA   L0288D5
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            PEA   $0001
            PEA   $0005
            JSL   L01301A
            PLY
            PLY
            PEA   $0019
            PEA   $0046
            PEA   ^L0288DE
            PEA   L0288DE
            JSL   L01444C
            PLY
            PLY
            PLY
            PLY
            PEA   $002D
            PEA   $0002
            PEA   ^L0288EB
            PEA   L0288EB
            JSL   L01444C
            PLY
            PLY
            PLY
            PLY
            PEA   $002D
            PEA   $0082
            PEA   $0000
            TDC
            CLC
            ADC   #$00A4
            PHA
            JSL   L01444C
            PLY
            PLY
            PLY
            PLY
            PEA   $0038
            PEA   $0002
            PEA   ^L0288F7
            PEA   L0288F7
            JSL   L01444C
            PLY
            PLY
            PLY
            PLY
            PEA   $0038
            PEA   $0082
            PEA   $0000
            TDC
            CLC
            ADC   #$0054
            PHA
            JSL   L01444C
            PLY
            PLY
            PLY
            PLY
            JSL   L0147AF
            STA   $F4
            PEA   $0001
            JSL   L0147DC
            PLY
            LDA   $F4
            CMP   #$0000
            BEQ   L013A51
            LDA   #$0000
            BRA   L013A54
L013A51     LDA   #$0001
L013A54     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L013A5E     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PHX
            PHA
            _GetPort
            PLA
            PLX
            STX   L060075
            STA   L060073
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L013A8B     ENT
            PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00EA
            TCS
            STZ   $EC
            BRA   L013A9C
L013A9A     INC   $EC
L013A9C     LDA   $EC
            LDX   #$0000
            TAY
            BPL   L013AA5
            DEX
L013AA5     PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L016FC0
            PLA
            PLX
            STA   $EE
            STX   $F0
            LDA   [$EE]
            PHA
            LDA   $EC
            CLC
            ADC   #$0001
            LDX   #$0000
            TAY
            BPL   L013AC5
            DEX
L013AC5     PHX
            PHA
            LDX   $FB
            LDA   $F9
            JSL   L016FC0
            PLA
            PLX
            STA   $EE
            STX   $F0
            PLA
            SEP   #$20
            STA   [$EE]
            REP   #$20
            AND   #$00FF
            BNE   L013A9A
            LDA   $EC
            SEP   #$20
            STA   [$F9]
            REP   #$20
            TDC
            CLC
            ADC   #$00F3
            TCS
            PLD
            RTL

L013AF1     ENT
            PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00EA
            TCS
            LDA   #$0001
            STA   $EC
            BRA   L013B45
L013B03     LDA   $EC
            LDX   #$0000
            TAY
            BPL   L013B0C
            DEX
L013B0C     PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L016FC0
            PLA
            PLX
            STA   $EE
            STX   $F0
            LDA   [$EE]
            PHA
            LDA   $EC
            SEC
            SBC   #$0001
            LDX   #$0000
            TAY
            BPL   L013B2C
            DEX
L013B2C     PHX
            PHA
            LDX   $FB
            LDA   $F9
            JSL   L016FC0
            PLA
            PLX
            STA   $EE
            STX   $F0
            PLA
            SEP   #$20
            STA   [$EE]
            REP   #$20
            INC   $EC
L013B45     LDA   [$FD]
            AND   #$00FF
            SEC
            SBC   $EC
            BVS   L013B52
            EOR   #$8000
L013B52     BMI   L013B03
            LDA   $EC
            SEC
            SBC   #$0001
            LDX   #$0000
            TAY
            BPL   L013B61
            DEX
L013B61     PHX
            PHA
            LDX   $FB
            LDA   $F9
            JSL   L016FC0
            PLA
            PLX
            STA   $EE
            STX   $F0
            LDA   #$0000
            SEP   #$20
            STA   [$EE]
            REP   #$20
            TDC
            CLC
            ADC   #$00F3
            TCS
            PLD
            RTL

L013B82     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            STZ   L060069
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L013B98     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   #$0001
            STA   L060065
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   #$0001
            STA   L060067
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L013BCA     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   #$0001
            STA   L06006B
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L013BE3     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00D2
            TCS
            LDA   #$0000
            STA   $D4
            LDA   $FF
            CMP   #$0000
            BNE   L013C23
            LDA   #L028976
            LDX   #^L028976
            STX   $D8
            STA   $D6
            LDA   #L028A12
            LDX   #^L028A12
            PHX
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00E4
            PHA
            PEA   $0008
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
            BRA   L013C4A
L013C23     LDA   #L028906
            LDX   #^L028906
            STX   $D8
            STA   $D6
            LDA   #L028A1A
            LDX   #^L028A1A
            PHX
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00E4
            PHA
            PEA   $0008
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
L013C4A     LDA   #$0008
            STA   $DA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            PEA   $0000
            PEA   $0000
            PEA   $0010
            PEA   $000D
            _SetRect
            LDX   #$0000
            TDC
            CLC
            ADC   #$00EC
            PHX
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DC
            PHA
            PEA   $0008
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
            PEA   $0000
            TDC
            CLC
            ADC   #$00D4
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            LDA   $E6
            CLC
            ADC   #$0007
            PHA
            LDAL  L028A0E
            SEC
            SBCL  L028A0A
            SEC
            SBC   #$0014
            PHA
            PEA   $0000
            _PPToPort
            PEA   $0000
            _SetSolidPenPat
            PEA   $0000
            TDC
            CLC
            ADC   #$00E4
            PHA
            PEA   $000A
            PEA   $000A
            _FrameRRect
            LDA   $E6
            DEC   $E6
            LDA   $EA
            INC   $EA
            PEA   $0000
            TDC
            CLC
            ADC   #$00E4
            PHA
            PEA   $000A
            PEA   $000A
            _FrameRRect
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L013D2E     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EC
            TCS
            JSL   L016A50
            STA   $EE
            PEA   $0000
            JSL   L013BE3
            PLY
            PEI   $EE
            JSL   L016FBA
            PLY
            TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            SEP   #$20
            LDA   $03,S
            STA   $09,S
            LDA   $02,S
            STA   $08,S
            LDA   $01,S
            STA   $07,S
            REP   #$20
            TSC
            CLC
            ADC   #$0006
            TCS
            RTL

L013D6C     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EC
            TCS
            JSL   L016A50
            STA   $EE
            PEA   $0001
            JSL   L013BE3
            PLY
            PEI   $EE
            JSL   L016FBA
            PLY
            TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            SEP   #$20
            LDA   $03,S
            STA   $09,S
            LDA   $02,S
            STA   $08,S
            LDA   $01,S
            STA   $07,S
            REP   #$20
            TSC
            CLC
            ADC   #$0006
            TCS
            RTL

L013DAA     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            PEA   ^L0289E6
            PEA   L0289E6
            PEI   $FF
            PEI   $FD
            JSL   L0171A1
            PLY
            PLY
            PLY
            PLY
            CMP   #$0000
            BEQ   L013DE3
            PEA   ^L0289E8
            PEA   L0289E8
            PEI   $FF
            PEI   $FD
            JSL   L0171A1
            PLY
            PLY
            PLY
            PLY
            CMP   #$0000
            BNE   L013DEA
L013DE3     LDA   #$0010
            BRA   L013E00
            BRA   L013E00
L013DEA     PHA
            PEI   $FF
            PEI   $FD
            _CStringWidth
            PLA
L013E00     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L013E0A     PHD
            TSC
            SEC
            SBC   #$00ED
            TCD
            ADC   #$00E6
            TCS
            PEA   ^L0289EA
            PEA   L0289EA
            PEI   $FD
            PEI   $FB
            JSL   L0171A1
            PLY
            PLY
            PLY
            PLY
            CMP   #$0000
            BEQ   L013E46
            PEA   ^L0289EC
            PEA   L0289EC
            PEI   $FD
            PEI   $FB
            JSL   L0171A1
            PLY
            PLY
            PLY
            PLY
            CMP   #$0000
            BEQ   L013E46
            BRL   L013F50
L013E46     PEI   $F5
            PEI   $F3
            LDA   L060077
            PHA
            LDAL  L028A0E
            SEC
            SBCL  L028A0A
            SEC
            SBC   #$0014
            PHA
            LDA   L060077
            CLC
            ADC   #$0010
            CLC
            ADC   #$000E
            PHA
            LDAL  L028A0E
            SEC
            SBCL  L028A0A
            SEC
            SBC   #$0005
            PHA
            _SetRect
            PEA   ^L0289EE
            PEA   L0289EE
            PEI   $FD
            PEI   $FB
            JSL   L0171A1
            PLY
            PLY
            PLY
            PLY
            CMP   #$0000
            BNE   L013EEA
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            PEI   $FF
            PEI   $F5
            PEI   $F3
            PEA   $0014
            PEA   ^L013D2E
            PEA   L013D2E
            PEA   $0000
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _NewDItem
            LDA   $F3
            LDX   $F5
            PHX
            PHA
            PEA   ^L028A12
            PEA   L028A12
            PEA   $0008
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
            BRA   L013F35
L013EEA     LDX   L060071
            LDA   L06006F
            PHX
            PHA
            PEI   $FF
            PEI   $F5
            PEI   $F3
            PEA   $0014
            PEA   ^L013D6C
            PEA   L013D6C
            PEA   $0000
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _NewDItem
            LDA   $F3
            LDX   $F5
            PHX
            PHA
            PEA   ^L028A1A
            PEA   L028A1A
            PEA   $0008
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
L013F35     LDA   #$0010
            CLC
            ADC   L060079
            CLC
            ADC   #$000E
            PHA
            LDA   L060077
            PLX
            STX   $EC
            CLC
            ADC   $EC
            STA   L060077
            BRL   L014007
L013F50     LDA   [$FB]
            AND   #$00FF
            BNE   L013F5A
            BRL   L014007
L013F5A     PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            JSL   L013A8B
            PLY
            PLY
            PLY
            PLY
            PEI   $F5
            PEI   $F3
            LDA   L060077
            PHA
            LDAL  L028A0E
            SEC
            SBCL  L028A0A
            SEC
            SBC   #$0014
            PHA
            PEI   $FD
            PEI   $FB
            JSL   L013DAA
            PLY
            PLY
            PHA
            LDA   L060077
            PLX
            STX   $EC
            CLC
            ADC   $EC
            CLC
            ADC   #$000E
            PHA
            LDAL  L028A0E
            SEC
            SBCL  L028A0A
            SEC
            SBC   #$0005
            PHA
            _SetRect
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            PEI   $FF
            PEI   $F5
            PEI   $F3
            PEA   $000A
            PEI   $F9
            PEI   $F7
            PEA   $0000
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _NewDItem
            PEI   $FD
            PEI   $FB
            JSL   L013DAA
            PLY
            PLY
            CLC
            ADC   L060079
            CLC
            ADC   #$000E
            PHA
            LDA   L060077
            PLX
            STX   $EC
            CLC
            ADC   $EC
            STA   L060077
L014007     TDC
            CLC
            ADC   #$00ED
            TCS
            PLD
            RTL

L01400F     ENT
            PHD
            TSC
            SEC
            SBC   #$00E1
            TCD
            ADC   #$00B0
            TCS
            LDA   $F9
            CMP   #$FFFF
            BNE   L014026
            LDA   #$0004
            STA   $F9
L014026     LDA   #$0019
            STA   $B2
            LDA   $F9
            SEC
            SBC   #$0000
            BEQ   L01406A
            BVS   L014038
            EOR   #$8000
L014038     BPL   L01406A
            LDA   $F9
            SEC
            SBC   #$0001
            PHA
            LDA   #$0005
            SEC
            JSL   L01715C
            LDA   $F9
            PHA
            LDA   #$0009
            SEC
            JSL   L01715C
            PLA
            PLX
            STX   $E0
            CLC
            ADC   $E0
            CLC
            ADC   #$000A
            PHA
            LDA   $B2
            PLX
            STX   $E0
            CLC
            ADC   $E0
            STA   $B2
L01406A     LDA   $FB
            CMP   #$FFFF
            BNE   L014076
            LDA   #$00E6
            STA   $FB
L014076     LDA   $FD
            CMP   #$FFFF
            BNE   L01408F
            LDA   #$0002
            PHA
            LDA   #$00C8
            SEC
            SBC   $B2
            SEC
            JSL   L017037
            PLY
            STA   $FD
L01408F     LDA   $FF
            CMP   #$FFFF
            BNE   L0140A8
            LDA   #$0002
            PHA
            LDA   #$0140
            SEC
            SBC   $FB
            SEC
            JSL   L017037
            PLY
            STA   $FF
L0140A8     LDA   $F7
            STA   L06006D
            PEA   ^L028A0A
            PEA   L028A0A
            PEI   $FF
            PEI   $FD
            LDA   $FF
            CLC
            ADC   $FB
            PHA
            LDA   $FD
            CLC
            ADC   $B2
            PHA
            _SetRect
            LDA   L060069
            BEQ   L0140E0
            JSL   L01658D
            JSL   L013A5E
L0140E0     JSL   L011C13
            LDA   L060067
            CMP   #$0001
            BNE   L014129
            PHX
            PHA
            PEA   ^L028A0A
            PEA   L028A0A
            PEA   $0000
            PEA   $0000
            PEA   $FFFF
            PEA   $FFFF
            PEA   $2000
            PEA   $0000
            PEA   $0000
            PEA   ^L028A0A
            PEA   L028A0A
            _NewModelessDialog
            PLA
            PLX
            STX   L060071
            STA   L06006F
            BRA   L014152
L014129     PHX
            PHA
            PEA   ^L028A0A
            PEA   L028A0A
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _NewModalDialog
            PLA
            PLX
            STX   L060071
            STA   L06006F
L014152     LDA   #$0001
            STA   $DA
            LDA   [$E7]
            AND   #$00FF
            BEQ   L014160
            INC   $DA
L014160     LDA   [$EB]
            AND   #$00FF
            BEQ   L014169
            INC   $DA
L014169     LDA   [$EF]
            AND   #$00FF
            BEQ   L014172
            INC   $DA
L014172     LDA   [$F3]
            AND   #$00FF
            BEQ   L01417B
            INC   $DA
L01417B     LDAL  L028A10
            SEC
            SBCL  L028A0C
            CLC
            ADC   #$0001
            STA   $D8
            LDA   $DA
            PHA
            LDA   $DA
            SEC
            SBC   #$0001
            ASL
            PHA
            LDA   #$0007
            SEC
            JSL   L01715C
            PEI   $F5
            PEI   $F3
            JSL   L013DAA
            PLY
            PLY
            PHA
            PEI   $F1
            PEI   $EF
            JSL   L013DAA
            PLY
            PLY
            PHA
            PEI   $ED
            PEI   $EB
            JSL   L013DAA
            PLY
            PLY
            PHA
            PEI   $E9
            PEI   $E7
            JSL   L013DAA
            PLY
            PLY
            PHA
            LDA   $D8
            PLX
            STX   $E0
            SEC
            SBC   $E0
            PLX
            STX   $E0
            SEC
            SBC   $E0
            PLX
            STX   $E0
            SEC
            SBC   $E0
            PLX
            STX   $E0
            SEC
            SBC   $E0
            PLX
            STX   $E0
            SEC
            SBC   $E0
            SEC
            JSL   L017037
            PLY
            STA   L060079
            LDA   L060079
            STA   L060077
            PEA   $000A
            PEI   $E9
            PEI   $E7
            PEA   ^L028A22
            PEA   L028A22
            PEA   $0000
            TDC
            CLC
            ADC   #$00CC
            PHA
            JSL   L013E0A
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            PEA   $000B
            PEI   $ED
            PEI   $EB
            PEA   ^L028A72
            PEA   L028A72
            PEA   $0000
            TDC
            CLC
            ADC   #$00C4
            PHA
            JSL   L013E0A
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            PEA   $000C
            PEI   $F1
            PEI   $EF
            PEA   ^L028AC2
            PEA   L028AC2
            PEA   $0000
            TDC
            CLC
            ADC   #$00BC
            PHA
            JSL   L013E0A
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            PEA   $000D
            PEI   $F5
            PEI   $F3
            PEA   ^L028B12
            PEA   L028B12
            PEA   $0000
            TDC
            CLC
            ADC   #$00B4
            PHA
            JSL   L013E0A
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            LDA   #$000A
            CLC
            ADC   $F7
            PHA
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            _GetDItemBox
            LDA   L06006B
            CMP   #$0001
            BNE   L0142AD
            JSL   L043CDA
            BRA   L0142B1
L0142AD     JSL   L043596
L0142B1     LDX   L060071
            LDA   L06006F
            PHX
            PHA
            _ShowWindow
            LDA   L060067
            CMP   #$0001
            BNE   L0142E9
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            _DrawControls
L0142E9     LDX   L060071
            LDA   L06006F
            PHX
            PHA
            _SetPort
            LDA   L060065
            CMP   #$0001
            BNE   L01431E
            PEA   $0002
            _SetFontFlags
            BRA   L014331
L01431E     PEA   $0000
            _SetFontFlags
L014331     TDC
            CLC
            ADC   #$00E1
            TCS
            PLD
            RTL

L014339     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            PHA
            LDA   #$0005
            SEC
            JSL   L01715C
            LDA   $FF
            CLC
            ADC   #$0001
            PHA
            LDA   #$0009
            SEC
            JSL   L01715C
            LDA   #$0005
            PLX
            STX   $F8
            CLC
            ADC   $F8
            PLX
            STX   $F8
            CLC
            ADC   $F8
            TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDAL  L028A0E
            SEC
            SBCL  L028A0A
            CLC
            ADC   #$0001
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDAL  L028A10
            SEC
            SBCL  L028A0C
            CLC
            ADC   #$0001
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L0143BB     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00EC
            TCS
            LDAL  L028A0A
            STA   [$F9]
            LDAL  L028A0C
            STA   [$FD]
            TDC
            CLC
            ADC   #$00F3
            TCS
            PLD
            RTL

L0143DA     ENT
            PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EE
            TCS
            LDA   #$0002
            PHA
            PHA
            PEI   $FF
            PEI   $FD
            _CStringWidth
            LDAL  L028A10
            SEC
            SBCL  L028A0C
            CLC
            ADC   #$0001
            PLX
            STX   $F4
            SEC
            SBC   $F4
            SEC
            JSL   L017037
            PLY
            PHA
            PEI   $FB
            JSL   L014339
            PLY
            PHA
            _MoveTo
            PEI   $FF
            PEI   $FD
            _DrawCString
            TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            RTL

L01444C     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00EC
            TCS
            PEI   $FD
            PEI   $FF
            _MoveTo
            PEI   $FB
            PEI   $F9
            _DrawCString
            TDC
            CLC
            ADC   #$00F3
            TCS
            PLD
            RTL

L014487     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00EC
            TCS
            PEI   $FF
            PEI   $F9
            JSL   L014339
            PLY
            PHA
            _MoveTo
            PEI   $FD
            PEI   $FB
            _DrawCString
            TDC
            CLC
            ADC   #$00F3
            TCS
            PLD
            RTL

L0144C8     ENT
            PHD
            TSC
            SEC
            SBC   #$00ED
            TCD
            ADC   #$0086
            TCS
            PEA   $0002
            _SetFontFlags
            SEC
            LDA   $FB
            SBC   #$0000
            BNE   L0144F5
            LDA   $FD
            SBC   #$0000
            BRA   L0144FC
L0144F5     LDA   $FD
            SBC   #$0000
            REP   #$02
L0144FC     BEQ   L014521
            PEI   $FD
            PEI   $FB
            PEA   $0000
            TDC
            CLC
            ADC   #$008C
            PHA
            JSL   L013A8B
            PLY
            PLY
            PLY
            PLY
            LDX   #$0000
            TDC
            CLC
            ADC   #$008C
            STX   $8A
            STA   $88
            BRA   L014525
L014521     STZ   $88
            STZ   $8A
L014525     LDA   $FF
            ASL
            ASL
            ASL
            CLC
            ADC   #$000F
            STA   $DE
            LDA   $F5
            CMP   #$FFFF
            BNE   L01456E
            LDA   #$0002
            PHA
            PHA
            PEI   $F9
            PEI   $F7
            _CStringWidth
            LDAL  L028A10
            SEC
            SBCL  L028A0C
            CLC
            ADC   #$0001
            PLX
            STX   $EC
            SEC
            SBC   $EC
            SEC
            SBC   $DE
            SEC
            JSL   L017037
            PLY
            STA   $F5
L01456E     PEI   $F5
            PEI   $F3
            JSL   L014339
            PLY
            PHA
            _MoveTo
            PEI   $F9
            PEI   $F7
            _DrawCString
            PHA
            PEI   $F9
            PEI   $F7
            _CStringWidth
            LDA   $F5
            PLX
            STX   $EC
            CLC
            ADC   $EC
            CLC
            ADC   #$0003
            STA   $DC
            PEA   $0000
            TDC
            CLC
            ADC   #$00E0
            PHA
            PEI   $DC
            PEI   $F3
            JSL   L014339
            PLY
            SEC
            SBC   #$0009
            SEC
            SBC   #$0001
            PHA
            LDA   $DC
            CLC
            ADC   $DE
            SEC
            SBC   #$0003
            PHA
            PEI   $F3
            JSL   L014339
            PLY
            CLC
            ADC   #$0003
            PHA
            _SetRect
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            PEA   $00C8
            PEA   $0000
            TDC
            CLC
            ADC   #$00E0
            PHA
            PEA   $8011
            PEI   $8A
            PEI   $88
            PEI   $FF
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _NewDItem
            TDC
            CLC
            ADC   #$00ED
            TCS
            PLD
            RTL

L01463E     PHD
            TSC
            SEC
            SBC   #$00D9
            TCD
            ADC   #$00D2
            TCS
            PEA   $FFFF
            PEA   $FFFF
            PEA   $FFFF
            PEA   $0004
            PEI   $FF
            PEI   $ED
            PEI   $EB
            PEI   $E9
            PEI   $E7
            PEI   $E5
            PEI   $E3
            PEI   $E1
            PEI   $DF
            JSL   L01400F
            TAY
            TSC
            CLC
            ADC   #$001A
            TCS
            TYA
            PEI   $F1
            PEI   $EF
            PEA   $0000
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEI   $F5
            PEI   $F3
            PEA   $0001
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEI   $F9
            PEI   $F7
            PEA   $0002
            JSL   L0143DA
            PLY
            PLY
            PLY
            PEI   $FD
            PEI   $FB
            PEA   $0003
            JSL   L0143DA
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00D9
            TCS
            PLD
            RTL

L0146B3     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F2
            TCS
            PHA
            PEA   $0000
            PEA   $0000
            _ModalDialog
            PLA
            STA   $F4
            LDA   $F4
            SEC
            SBC   #$000A
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L0146E8     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00BE
            TCS
            PHA
            PEA   $0002
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            _GetNextEvent
            PLA
            TAY
            BNE   L01471A
            LDA   #$00FF
            BRL   L0147A5
L01471A     PHA
            PEA   $0004
            PEA   $0000
            TDC
            CLC
            ADC   #$00C6
            PHA
            _GetNextEvent
            PLA
            TAY
            BEQ   L01471A
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            _IsDialogEvent
            PLA
            TAY
            BNE   L01475E
            LDA   #$00FF
            BRA   L0147A5
L01475E     PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00C2
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00C0
            PHA
            _DialogSelect
            PLA
            TAY
            BNE   L014793
            LDA   #$00FF
            BRA   L0147A5
L014793     LDA   $C0
            CMP   #$0001
            BNE   L01479F
            LDA   L06006D
            BRA   L0147A5
L01479F     LDA   $C0
            SEC
            SBC   #$000A
L0147A5     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L0147AF     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   doSHOWCURSOR
            LDA   L060067
            CMP   #$0001
            BNE   L0147CE
            JSL   L0146E8
            BRA   L0147D2
            BRA   L0147D2
L0147CE     JSL   L0146B3
L0147D2     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L0147DC     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            STZ   L060067
            STZ   L060065
            STZ   L06006B
            LDA   #$0001
            STA   L060069
            STZ   L060061
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            _CloseDialog
            LDA   $FF
            BEQ   L014819
            JSL   L0165CA
L014819     LDX   L060075
            LDA   L060073
            PHX
            PHA
            _SetPort
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L014839     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00A0
            TCS
            LDX   L060071
            LDA   L06006F
            PHX
            PHA
            PEA   $00C8
            PEA   $0000
            TDC
            CLC
            ADC   #$00A2
            PHA
            _GetIText
            PEA   $0000
            TDC
            CLC
            ADC   #$00A2
            PHA
            PEI   $FF
            PEI   $FD
            JSL   L013AF1
            PLY
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L014885     ENT
            PHD
            TSC
            SEC
            SBC   #$00EB
            TCD
            ADC   #$00E4
            TCS
            PEA   $0000
            PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEI   $F5
            PEI   $F3
            PEI   $F1
            PEA   ^L0289F5
            PEA   L0289F5
            PEA   ^L0289F4
            PEA   L0289F4
            PEA   ^L0289F3
            PEA   L0289F3
            PEA   ^L0289F0
            PEA   L0289F0
            JSL   L01463E
            TAY
            TSC
            CLC
            ADC   #$0022
            TCS
            TYA
            JSL   L0147AF
            PEA   $0001
            JSL   L0147DC
            PLY
            TDC
            CLC
            ADC   #$00EB
            TCS
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00EB
            TCD
            ADC   #$00E2
            TCS
            PEA   $0000
            PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEI   $F5
            PEI   $F3
            PEI   $F1
            PEA   ^L0289FE
            PEA   L0289FE
            PEA   ^L0289FD
            PEA   L0289FD
            PEA   ^L0289FA
            PEA   L0289FA
            PEA   ^L0289F6
            PEA   L0289F6
            JSL   L01463E
            TAY
            TSC
            CLC
            ADC   #$0022
            TCS
            TYA
            JSL   L0147AF
            STA   $E4
            PEA   $0001
            JSL   L0147DC
            PLY
            LDA   $E4
            CMP   #$0000
            BEQ   L014937
            LDA   #$0000
            BRA   L01493A
L014937     LDA   #$0001
L01493A     TAY
            TDC
            CLC
            ADC   #$00EB
            TCS
            TYA
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00EB
            TCD
            ADC   #$00E2
            TCS
            PEA   $0001
            PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEI   $F5
            PEI   $F3
            PEI   $F1
            PEA   ^L028A07
            PEA   L028A07
            PEA   ^L028A06
            PEA   L028A06
            PEA   ^L028A03
            PEA   L028A03
            PEA   ^L0289FF
            PEA   L0289FF
            JSL   L01463E
            TAY
            TSC
            CLC
            ADC   #$0022
            TCS
            TYA
            JSL   L0147AF
            STA   $E4
            PEA   $0001
            JSL   L0147DC
            PLY
            LDA   $E4
            CMP   #$0001
            BEQ   L0149A0
            LDA   #$0000
            BRA   L0149A3
L0149A0     LDA   #$0001
L0149A3     TAY
            TDC
            CLC
            ADC   #$00EB
            TCS
            TYA
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00E3
            TCD
            ADC   #$00DA
            TCS
            PEA   $0000
            PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEI   $F5
            PEI   $F3
            PEI   $F1
            PEA   ^L028A09
            PEA   L028A09
            PEA   ^L028A08
            PEA   L028A08
            PEI   $EF
            PEI   $ED
            PEI   $EB
            PEI   $E9
            JSL   L01463E
            TAY
            TSC
            CLC
            ADC   #$0022
            TCS
            TYA
            JSL   L0147AF
            STA   $DC
            PEA   $0001
            JSL   L0147DC
            PLY
            LDA   $DC
            CMP   #$0000
            BEQ   L014A05
            LDA   #$0000
            BRA   L014A08
L014A05     LDA   #$0001
L014A08     TAY
            TDC
            CLC
            ADC   #$00E3
            TCS
            TYA
            PLD
            RTL

getSHRPTR
*            PHD
*            TSC
*            SEC
*            SBC   #$00FB
*            TCD
*            ADC   #$00F4
*            TCS
            LDX   #$00E1
            LDA   #$2000
*            TAY
*            TDC
*            CLC
*            ADC   #$00FB
*            TCS
*            TYA
*            PLD
            RTL

L014A2D     PHD
            TSC
            SEC
            SBC   #$00EB
            TCD
            ADC   #$00D6
            TCS
            LDA   #$0001
            PHA
            LDA   $F5
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L014A4B
            DEX
L014A4B     PHX
            PHA
            LDA   $F7
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L014A60
            DEX
L014A60     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $DA
            STA   $D8
            LDX   $F3
            LDA   $F1
            STX   $DE
            STA   $DC
            LDA   #$0001
            PHA
            LDA   $F9
            SEC
            JSL   L016FCB
            LDA   #$00A0
            PLX
            STX   $EA
            SEC
            SBC   $EA
            STA   $E0
            STZ   $E4
            BRL   L014B45
L014A99     STZ   $E2
            BRA   L014AE0
L014A9D     LDA   [$FD]
            AND   #$00FF
            PHA
            LDA   [$DC]
            AND   #$00FF
            PLX
            STX   $EA
            AND   $EA
            PHA
            LDA   [$FD]
            AND   #$00FF
            EOR   #$FFFF
            PHA
            LDA   [$D8]
            AND   #$00FF
            PLX
            STX   $EA
            AND   $EA
            PLX
            STX   $EA
            ORA   $EA
            SEP   #$20
            STA   [$D8]
            REP   #$20
            INC   $D8
            BNE   L014AD2
            INC   $DA
L014AD2     INC   $DC
            BNE   L014AD8
            INC   $DE
L014AD8     INC   $FD
            BNE   L014ADE
            INC   $FF
L014ADE     INC   $E2
L014AE0     LDA   #$0001
            PHA
            LDA   $F9
            SEC
            JSL   L016FCB
            PLA
            SEC
            SBC   $E2
            BEQ   L014AF8
            BVS   L014AF6
            EOR   #$8000
L014AF6     BMI   L014A9D
L014AF8     LDA   $E0
            LDX   #$0000
            TAY
            BPL   L014B01
            DEX
L014B01     PHX
            PHA
            LDX   $DA
            LDA   $D8
            JSL   L016FC0
            PLA
            PLX
            STX   $DA
            STA   $D8
            LDA   $E0
            LDX   #$0000
            TAY
            BPL   L014B1A
            DEX
L014B1A     PHX
            PHA
            LDX   $DE
            LDA   $DC
            JSL   L016FC0
            PLA
            PLX
            STX   $DE
            STA   $DC
            LDA   $E0
            LDX   #$0000
            TAY
            BPL   L014B33
            DEX
L014B33     PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L016FC0
            PLA
            PLX
            STX   $FF
            STA   $FD
            INC   $E4
L014B45     LDA   $E4
            SEC
            SBC   $FB
            BVS   L014B4F
            EOR   #$8000
L014B4F     BMI   L014B54
            BRL   L014A99
L014B54     TDC
            CLC
            ADC   #$00EB
            TCS
            PLD
            RTL

L014B5C     PHD
            TSC
            SEC
            SBC   #$00EF
            TCD
            ADC   #$00DE
            TCS
            LDA   #$0001
            PHA
            LDA   $F9
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L014B7A
            DEX
L014B7A     PHX
            PHA
            LDA   $FB
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L014B8F
            DEX
L014B8F     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E6
            STA   $E4
            LDX   $F7
            LDA   $F5
            STX   $E2
            STA   $E0
            STZ   $E8
            BRA   L014C06
L014BB1     PEI   $E2
            PEI   $E0
            PEI   $E6
            PEI   $E4
            LDA   #$0001
            PHA
            LDA   $FD
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L014BCC
            DEX
L014BCC     PHX
            PHA
            _BlockMove
            LDX   $E6
            LDA   $E4
            CLC
            ADC   #$00A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E6
            STA   $E4
            LDX   $E2
            LDA   $E0
            CLC
            ADC   #$00A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E2
            STA   $E0
            INC   $E8
L014C06     LDA   $E8
            SEC
            SBC   $FF
            BVS   L014C10
            EOR   #$8000
L014C10     BPL   L014BB1
            TDC
            CLC
            ADC   #$00EF
            TCS
            PLD
            RTL

L014C1A     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EA
            TCS
            LDA   #L03B354
            LDX   #^L03B354
            STX   $EE
            STA   $EC
            PEI   $FB
            PEA   $0010
            PEI   $FF
            PEI   $FD
            PEI   $EE
            PEI   $EC
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            RTL

L014C50     PHD
            TSC
            SEC
            SBC   #$00EF
            TCD
            ADC   #$00E4
            TCS
            LDA   #$0001
            PHA
            LDA   $FB
            ASL
            ASL
            ASL
            PHA
            LDA   #$00A0
            PLX
            STX   $EE
            CLC
            ADC   $EE
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L014C7B
            DEX
L014C7B     PHX
            PHA
            LDA   $F9
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L014C90
            DEX
L014C90     PHX
            PHA
            LDX   $F7
            LDA   $F5
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E8
            STA   $E6
            PEA   $0007
            PEA   $0006
            PEI   $FF
            PEI   $FD
            PEI   $E8
            PEI   $E6
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00EF
            TCS
            PLD
            RTL

L014CC8     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F0
            TCS
            STZ   $F2
            BRA   L014CD9
L014CD7     INC   $F2
L014CD9     LDA   $F2
            SEC
            SBC   $FF
            BVS   L014CE3
            EOR   #$8000
L014CE3     BPL   L014CD7
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L014CED     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EE
            TCS
            STZ   $F0
            BRA   L014D05
L014CFC     PEI   $FF
            JSL   L014CC8
            PLY
            INC   $F0
L014D05     LDA   $F0
            SEC
            SBC   $FD
            BVS   L014D0F
            EOR   #$8000
L014D0F     BPL   L014CFC
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            CMP   #$0000
            BNE   L014D32
            LDA   #$0001
            BRA   L014D35
            BRA   L014D35
L014D32     LDA   #$0005
L014D35     TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L014D3F     PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            LDA   $F7
            BRL   L014DE0
L014D4F     LDA   #$0018
            STA   [$F9]
            BRL   L014DED
L014D57     LDA   #$0048
            STA   [$F9]
            BRL   L014DED
L014D5F     LDA   #$0078
            STA   [$F9]
            BRL   L014DED
L014D67     LDA   #$00A8
            STA   [$F9]
            BRL   L014DED
L014D6F     LDA   #$00D8
            STA   [$F9]
            BRL   L014DED
L014D77     LDA   #$0108
            STA   [$F9]
            BRL   L014DED
L014D7F     LDA   #$0108
            STA   [$F9]
            BRL   L014DED
L014D87     LDA   #$00D8
            STA   [$F9]
            BRL   L014DED
L014D8F     LDA   #$00A8
            STA   [$F9]
            BRL   L014DED
L014D97     LDA   #$0078
            STA   [$F9]
            BRL   L014DED
L014D9F     LDA   #$0048
            STA   [$F9]
            BRL   L014DED
L014DA7     LDA   #$0018
            STA   [$F9]
            BRL   L014DED
L014DAF     LDA   #$002A
            STA   [$F9]
            BRL   L014DED
L014DB7     LDA   #$00B6
            STA   [$F9]
            BRL   L014DED
L014DBF     BRL   L014DED
L014DC2     DA    L014D4F
            DA    L014D57
            DA    L014D5F
            DA    L014D67
            DA    L014D6F
            DA    L014D77
            DA    L014D7F
            DA    L014D87
            DA    L014D8F
            DA    L014D97
            DA    L014D9F
            DA    L014DA7
            DA    L014DAF
            DA    L014DB7
            DA    L014DBF
L014DE0     CMP   #$000E
            BCC   L014DE8
            LDA   #$000E
L014DE8     ASL
            TAX
            JMP   (L014DC2,X)

L014DED     LDA   $F7
            SEC
            SBC   #$0005
            BEQ   L014DFC
            BVS   L014DFA
            EOR   #$8000
L014DFA     BMI   L014E03
L014DFC     LDA   #$0027
            STA   [$FD]
            BRA   L014E1E
L014E03     LDA   $F7
            SEC
            SBC   #$000B
            BEQ   L014E12
            BVS   L014E10
            EOR   #$8000
L014E10     BMI   L014E19
L014E12     LDA   #$0089
            STA   [$FD]
            BRA   L014E1E
L014E19     LDA   #$0058
            STA   [$FD]
L014E1E     TDC
            CLC
            ADC   #$00F1
            TCS
            PLD
            RTL

L014E26     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EC
            TCS
            LDA   $FD
            SEC
            SBC   #$000A
            BEQ   L014E40
            BVS   L014E3E
            EOR   #$8000
L014E3E     BMI   L014E4E
L014E40     LDA   $FD
            CMP   #$0000
            BEQ   L014E4E
            LDA   #$0000
            STA   $F0
            BRA   L014E53
L014E4E     LDA   #$0032
            STA   $F0
L014E53     LDA   $F0
            BNE   L014E79
            LDA   $FF
            SEC
            SBC   #$0001
            PHA
            LDA   $FD
            SEC
            SBC   #$0001
            PHA
            LDA   #$0005
            SEC
            JSL   L01715C
            PLA
            PLX
            STX   $F6
            CLC
            ADC   $F6
            STA   $EE
            BRL   L014EE0
L014E79     LDA   $FD
            SEC
            SBC   #$000F
            BEQ   L014E88
            BVS   L014E86
            EOR   #$8000
L014E86     BMI   L014EB8
L014E88     LDA   $FD
            CMP   #$0000
            BEQ   L014EB8
            LDA   $FF
            SEC
            SBC   #$0001
            PHA
            LDA   $FD
            SEC
            SBC   #$000B
            PHA
            LDA   #$0005
            SEC
            JSL   L01715C
            LDA   $F0
            PLX
            STX   $F6
            CLC
            ADC   $F6
            PLX
            STX   $F6
            CLC
            ADC   $F6
            STA   $EE
            BRL   L014EE0
L014EB8     LDA   $FD
            BRL   L014ED1
L014EBD     LDA   #$001D
            STA   $EE
            BRL   L014ED9
L014EC5     LDA   #$0013
            CLC
            ADC   $FF
            STA   $EE
            BRA   L014ED9
            BRA   L014ED9
L014ED1     CMP   #$0000
            BEQ   L014EBD
            JMP   L014EC5

L014ED9     LDA   $EE
            CLC
            ADC   $F0
            STA   $EE
L014EE0     LDA   $EE
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L014EEC     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00E2
            TCS
            PEI   $FB
            PEI   $F9
            JSL   L014E26
            PLY
            PLY
            STA   $E8
            LDA   $E8
            STA   [$FD]
            LDA   $E8
            SEC
            SBC   #$0032
            BVS   L014F12
            EOR   #$8000
L014F12     BMI   L014F7A
            LDA   #$0005
            PHA
            LDA   $E8
            SEC
            JSL   L017037
            PLY
            PHA
            JSL   L016EE6
            PLY
            STA   $EC
            LDA   #$0005
            PHA
            LDA   $E8
            SEC
            JSL   L017037
            PLA
            STA   $EA
            LDA   $EA
            PHA
            LDA   #$0025
            SEC
            JSL   L01715C
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L014F51
            DEX
L014F51     PHX
            PHA
            LDA   $EC
            ASL
            ASL
            ASL
            ASL
            LDX   #$0000
            TAY
            BPL   L014F60
            DEX
L014F60     PHX
            PHA
            LDA   #L0303BC
            LDX   #^L0303BC
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E6
            STA   $E4
            BRA   L014FE6
L014F7A     LDA   $E8
            SEC
            SBC   #$0032
            STA   $E8
            LDA   #$0005
            PHA
            LDA   $E8
            SEC
            JSL   L017037
            PLY
            PHA
            JSL   L016EE6
            PLY
            STA   $EC
            LDA   #$0005
            PHA
            LDA   $E8
            SEC
            JSL   L017037
            PLA
            STA   $EA
            LDA   $EA
            PHA
            LDA   #$0025
            SEC
            JSL   L01715C
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L014FBF
            DEX
L014FBF     PHX
            PHA
            LDA   $EC
            ASL
            ASL
            ASL
            ASL
            LDX   #$0000
            TAY
            BPL   L014FCE
            DEX
L014FCE     PHX
            PHA
            LDA   #L0380BC
            LDX   #^L0380BC
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E6
            STA   $E4
L014FE6     LDX   $E6
            LDA   $E4
            TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L014FF4     PHD
            TSC
            SEC
            SBC   #$00ED
            TCD
            ADC   #$00E6
            TCS
            LDA   $F7
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L030000
            LDX   #^L030000
            JSL   L016FC0
            PLA
            PLX
            STA   $E8
            STX   $EA
            LDA   [$E8]
            PHA
            LDA   $F3
            PLX
            STX   $EC
            CLC
            ADC   $EC
            STA   [$F9]
            LDA   $F7
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L030096
            LDX   #^L030096
            JSL   L016FC0
            PLA
            PLX
            STA   $E8
            STX   $EA
            LDA   [$E8]
            PHA
            LDA   $F5
            PLX
            STX   $EC
            CLC
            ADC   $EC
            STA   [$FD]
            TDC
            CLC
            ADC   #$00ED
            TCS
            PLD
            RTL

L015051     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00DC
            TCS
            PEI   $FB
            PEI   $F9
            JSL   L04076F
            PLY
            PLY
            STA   $EC
            PEA   $0000
            TDC
            CLC
            ADC   #$00EA
            PHA
            PEI   $EC
            PEI   $F9
            JSL   L014EEC
            PLY
            PLY
            PLY
            PLY
            STX   $E8
            STA   $E6
            PEA   $0000
            TDC
            CLC
            ADC   #$00E2
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00E4
            PHA
            PEI   $FB
            JSL   L014D3F
            PLY
            PLY
            PLY
            PLY
            PLY
            LDA   $FD
            BEQ   L0150DE
            LDA   $FF
            CMP   #$FFFF
            BNE   L0150DE
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00E0
            PHA
            PEI   $EA
            PEI   $E2
            PEI   $E4
            JSL   L014FF4
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            PEI   $FF
            PEI   $DE
            PEI   $E0
            JSL   L015A23
            PLY
            PLY
            PLY
            JSL   L0436FC
L0150DE     PEA   $0025
            PEA   $0020
            PEI   $E2
            PEI   $E4
            PEI   $E8
            PEI   $E6
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   $FD
            BEQ   L01515A
            LDA   $FF
            CMP   #$0001
            BNE   L01515A
            PEI   $FB
            LDA   $F9
            CLC
            ADC   #$0001
            PHA
            JSL   L04076F
            PLY
            PLY
            STA   $EC
            PEI   $EC
            LDA   $F9
            CLC
            ADC   #$0001
            PHA
            JSL   L014E26
            PLY
            PLY
            STA   $EA
            PEA   $0000
            TDC
            CLC
            ADC   #$00DE
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00E0
            PHA
            PEI   $EA
            PEI   $E2
            PEI   $E4
            JSL   L014FF4
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            JSL   L043DD6
            PEI   $FF
            PEI   $DE
            PEI   $E0
            JSL   L015A23
            PLY
            PLY
            PLY
L01515A     TDC
            CLC
            ADC   #$00F3
            TCS
            PLD
            RTL

L015162     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            STZ   L06007B
            LDA   $FF
            BEQ   L0151A6
            JSL   L04418D
            STZ   $F2
            BRA   L015191
L01517C     PEA   $0000
            PEA   $0000
            PEI   $F2
            PEA   $0000
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            INC   $F2
L015191     LDA   $F2
            SEC
            SBC   #$000C
            BVS   L01519C
            EOR   #$8000
L01519C     BPL   L01517C
            JSL   L04418D
            JSL   L015984
L0151A6     PEA   $000C
            JSL   L015EFD
            PLY
            PEA   $000D
            JSL   L015EFD
            PLY
            PEA   $7D00
            JSL   L014CC8
            PLY
            LDA   $FF
            BNE   L0151C5
            BRL   L015224
L0151C5     LDA   #$000B
            STA   $F2
            BRA   L015215
L0151CC     LDA   #$0001
            STA   $F0
            BRA   L0151E7
L0151D3     PEA   $FFFF
            PEA   $0001
            PEI   $F2
            PEI   $F0
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            INC   $F0
L0151E7     LDA   $F2
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            SEC
            SBC   $F0
            BVS   L015209
            EOR   #$8000
L015209     BMI   L0151D3
            PEA   $0064
            JSL   L014CC8
            PLY
            DEC   $F2
L015215     LDA   $F2
            SEC
            SBC   #$0000
            BVS   L015220
            EOR   #$8000
L015220     BMI   L0151CC
            BRA   L015265
L015224     LDA   #$000B
            STA   $F2
            BRA   L015258
L01522B     PEA   $0000
            PEA   $0000
            PEI   $F2
            LDA   $F2
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            JSL   L015051
            PLY
            PLY
            PLY
            PLY
            DEC   $F2
L015258     LDA   $F2
            SEC
            SBC   #$0000
            BVS   L015263
            EOR   #$8000
L015263     BMI   L01522B
L015265     LDA   L06002D
            BEQ   L015270
            JSL   L016419
            BRA   L015274
L015270     JSL   L016456
L015274     LDA   L060037
            CMP   #$0001
            BNE   L015288
            LDA   L06008B
            PHA
            JSL   L0160BF
            PLY
            STZ   L060037
L015288     JSL   L01624C
            LDA   #$0001
            STA   L06007B
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L01529A     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00DA
            TCS
            LDA   $FD
            CMP   #$000C
            BEQ   L0152AF
            BRL   L015322
L0152AF     LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            SBC   #$0001
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03012C
            LDX   #^L03012C
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $E4
            LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            SBC   #$0001
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0301A4
            LDX   #^L0301A4
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $E2
            BRL   L015392
L015322     LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            SBC   #$0001
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03021C
            LDX   #^L03021C
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $E4
            LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            SBC   #$0001
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L030294
            LDX   #^L030294
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $E2
L015392     LDA   $FF
            BEQ   L0153A4
            PEA   $FFFF
            PEI   $E2
            PEI   $E4
            JSL   L015A23
            PLY
            PLY
            PLY
L0153A4     LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            SBC   #$0018
            BEQ   L0153CB
            BVS   L0153C9
            EOR   #$8000
L0153C9     BMI   L0153F2
L0153CB     LDA   #L03F47C
            LDX   #^L03F47C
            STX   $E8
            STA   $E6
            PEA   $000A
            PEA   $000A
            PEI   $E2
            PEI   $E4
            PEI   $E8
            PEI   $E6
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            BRL   L015639
L0153F2     LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            SEC
            SBC   #$0026
            BEQ   L01541C
            BVS   L015417
            EOR   #$8000
L015417     BPL   L01541C
            BRL   L01552C
L01541C     LDA   #$0001
            PHA
            LDA   $E4
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L01542F
            DEX
L01542F     PHX
            PHA
            LDA   $E2
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L015444
            DEX
L015444     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E8
            STA   $E6
            LDA   #L03F469
            LDX   #^L03F469
            STX   $F0
            STA   $EE
            LDA   #L03F464
            LDX   #^L03F464
            STX   $EC
            STA   $EA
            LDA   #$009B
            STA   $DC
            STZ   $E0
            BRL   L015519
L015478     STZ   $DE
            BRA   L0154BF
L01547C     LDA   [$EA]
            AND   #$00FF
            PHA
            LDA   [$EE]
            AND   #$00FF
            PLX
            STX   $F6
            AND   $F6
            PHA
            LDA   [$EA]
            AND   #$00FF
            EOR   #$FFFF
            PHA
            LDA   [$E6]
            AND   #$00FF
            PLX
            STX   $F6
            AND   $F6
            PLX
            STX   $F6
            ORA   $F6
            SEP   #$20
            STA   [$E6]
            REP   #$20
            INC   $E6
            BNE   L0154B1
            INC   $E8
L0154B1     INC   $EE
            BNE   L0154B7
            INC   $F0
L0154B7     INC   $EA
            BNE   L0154BD
            INC   $EC
L0154BD     INC   $DE
L0154BF     LDA   $DE
            SEC
            SBC   #$0005
            BVS   L0154CA
            EOR   #$8000
L0154CA     BPL   L01547C
            LDA   $DC
            LDX   #$0000
            TAY
            BPL   L0154D5
            DEX
L0154D5     PHX
            PHA
            LDX   $E8
            LDA   $E6
            JSL   L016FC0
            PLA
            PLX
            STX   $E8
            STA   $E6
            LDA   $DC
            LDX   #$0000
            TAY
            BPL   L0154EE
            DEX
L0154EE     PHX
            PHA
            LDX   $F0
            LDA   $EE
            JSL   L016FC0
            PLA
            PLX
            STX   $F0
            STA   $EE
            LDA   $DC
            LDX   #$0000
            TAY
            BPL   L015507
            DEX
L015507     PHX
            PHA
            LDX   $EC
            LDA   $EA
            JSL   L016FC0
            PLA
            PLX
            STX   $EC
            STA   $EA
            INC   $E0
L015519     LDA   $E0
            SEC
            SBC   #$0008
            BVS   L015524
            EOR   #$8000
L015524     BMI   L015529
            BRL   L015478
L015529     BRL   L015639
L01552C     LDA   #$0001
            PHA
            LDA   $E4
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L01553F
            DEX
L01553F     PHX
            PHA
            LDA   $E2
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L015554
            DEX
L015554     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E8
            STA   $E6
            LDA   #L03F460
            LDX   #^L03F460
            STX   $F0
            STA   $EE
            LDA   #L03F45C
            LDX   #^L03F45C
            STX   $EC
            STA   $EA
            LDA   #$009C
            STA   $DC
            STZ   $E0
            BRL   L015629
L015588     STZ   $DE
            BRA   L0155CF
L01558C     LDA   [$EA]
            AND   #$00FF
            PHA
            LDA   [$EE]
            AND   #$00FF
            PLX
            STX   $F6
            AND   $F6
            PHA
            LDA   [$EA]
            AND   #$00FF
            EOR   #$FFFF
            PHA
            LDA   [$E6]
            AND   #$00FF
            PLX
            STX   $F6
            AND   $F6
            PLX
            STX   $F6
            ORA   $F6
            SEP   #$20
            STA   [$E6]
            REP   #$20
            INC   $E6
            BNE   L0155C1
            INC   $E8
L0155C1     INC   $EE
            BNE   L0155C7
            INC   $F0
L0155C7     INC   $EA
            BNE   L0155CD
            INC   $EC
L0155CD     INC   $DE
L0155CF     LDA   $DE
            SEC
            SBC   #$0004
            BVS   L0155DA
            EOR   #$8000
L0155DA     BPL   L01558C
            LDA   $DC
            LDX   #$0000
            TAY
            BPL   L0155E5
            DEX
L0155E5     PHX
            PHA
            LDX   $E8
            LDA   $E6
            JSL   L016FC0
            PLA
            PLX
            STX   $E8
            STA   $E6
            LDA   $DC
            LDX   #$0000
            TAY
            BPL   L0155FE
            DEX
L0155FE     PHX
            PHA
            LDX   $F0
            LDA   $EE
            JSL   L016FC0
            PLA
            PLX
            STX   $F0
            STA   $EE
            LDA   $DC
            LDX   #$0000
            TAY
            BPL   L015617
            DEX
L015617     PHX
            PHA
            LDX   $EC
            LDA   $EA
            JSL   L016FC0
            PLA
            PLX
            STX   $EC
            STA   $EA
            INC   $E0
L015629     LDA   $E0
            SEC
            SBC   #$0008
            BVS   L015634
            EOR   #$8000
L015634     BMI   L015639
            BRL   L015588
L015639     JSL   L04381A
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L015645     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E2
            TCS
            LDA   $FD
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $F0
            LDA   $F0
            SEC
            SBC   #$0018
            BVS   L015677
            EOR   #$8000
L015677     BMI   L01568F
            LDA   #$00A6
            STA   $EE
            LDA   #$009E
            STA   $EC
            LDA   #$000A
            STA   $EA
            LDA   #$000A
            STA   $E8
            BRA   L0156C6
L01568F     LDA   $F0
            SEC
            SBC   #$0026
            BVS   L01569A
            EOR   #$8000
L01569A     BMI   L0156B2
            LDA   #$002E
            STA   $EE
            LDA   #$00B9
            STA   $EC
            LDA   #$0008
            STA   $EA
            LDA   #$000A
            STA   $E8
            BRA   L0156C6
L0156B2     LDA   #$0038
            STA   $EE
            LDA   #$00B9
            STA   $EC
            LDA   #$0008
            STA   $EA
            LDA   #$0008
            STA   $E8
L0156C6     LDA   #$0001
            PHA
            LDA   $EE
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L0156D9
            DEX
L0156D9     PHX
            PHA
            LDA   $EC
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L0156EE
            DEX
L0156EE     PHX
            PHA
            LDA   #L0380BC
            LDX   #^L0380BC
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $E6
            STA   $E4
            LDA   $FD
            CMP   #$000C
            BNE   L015747
            LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03012C
            LDX   #^L03012C
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $EE
            LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L0301A4
            LDX   #^L0301A4
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $EC
            BRA   L01577F
L015747     LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03021C
            LDX   #^L03021C
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $EE
            LDA   $F0
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L030294
            LDX   #^L030294
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            STA   $EC
L01577F     LDA   $F0
            SEC
            SBC   #$002E
            BEQ   L01578E
            BVS   L01578C
            EOR   #$8000
L01578C     BMI   L0157A6
L01578E     PEI   $EA
            PEI   $E8
            PEI   $EC
            PEI   $EE
            PEI   $E6
            PEI   $E4
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
L0157A6     LDA   $FF
            BEQ   L0157BC
            JSL   L043DD6
            PEA   $0001
            PEI   $EC
            PEI   $EE
            JSL   L015A23
            PLY
            PLY
            PLY
L0157BC     TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L0157C4     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00E8
            TCS
            LDA   #L03DF6C
            LDX   #^L03DF6C
            STX   $F2
            STA   $F0
            LDA   $FF
            CMP   #$000C
            BNE   L015803
            PEA   $0022
            PEA   $0014
            PEA   $005B
            PEA   $002A
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   #$003E
            STA   $EC
            BRA   L015824
L015803     PEA   $0022
            PEA   $0014
            PEA   $005B
            PEA   $00B6
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   #$00CA
            STA   $EC
L015824     LDA   #L03DF71
            LDX   #^L03DF71
            STX   $F2
            STA   $F0
            STZ   $EE
            BRA   L015857
L015832     PEA   $0022
            PEA   $000C
            PEA   $005B
            PEI   $EC
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   $EC
            CLC
            ADC   #$000C
            STA   $EC
            INC   $EE
L015857     LDA   $EE
            SEC
            SBC   #$0005
            BVS   L015862
            EOR   #$8000
L015862     BPL   L015832
            LDA   #L03DF74
            LDX   #^L03DF74
            STX   $F2
            STA   $F0
            PEA   $0022
            PEA   $0008
            PEA   $005B
            PEI   $EC
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L015891     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EE
            TCS
            LDAL  L02029E
            STA   $F0
            BRA   L0158C5
L0158A4     LDAL  L02029E
            PHA
            DEC
            STAL  L02029E
            PLA
            PEA   $0000
            PEA   $000C
            JSL   L015645
            PLY
            PLY
            PEA   $000C
            JSL   L015EFD
            PLY
            DEC   $F0
L0158C5     LDA   $F0
            SEC
            SBC   $FD
            BEQ   L0158D3
            BVS   L0158D1
            EOR   #$8000
L0158D1     BMI   L0158A4
L0158D3     LDAL  L0202A0
            STA   $F0
            BRA   L0158FC
L0158DB     LDAL  L0202A0
            PHA
            DEC
            STAL  L0202A0
            PLA
            PEA   $0000
            PEA   $000D
            JSL   L015645
            PLY
            PLY
            PEA   $000D
            JSL   L015EFD
            PLY
            DEC   $F0
L0158FC     LDA   $F0
            SEC
            SBC   $FF
            BEQ   L01590A
            BVS   L015908
            EOR   #$8000
L015908     BMI   L0158DB
L01590A     LDA   L060039
            BNE   L015912
            BRL   L01597C
L015912     LDAL  L02029E
            STA   $F0
            BRA   L01593B
L01591A     LDAL  L02029E
            PHA
            INC
            STAL  L02029E
            PLA
            PEA   $0000
            PEA   $000C
            JSL   L01529A
            PLY
            PLY
            PEA   $000C
            JSL   L015EFD
            PLY
            INC   $F0
L01593B     LDA   $F0
            SEC
            SBC   $FD
            BVS   L015945
            EOR   #$8000
L015945     BPL   L01591A
            LDAL  L0202A0
            STA   $F0
            BRA   L015970
L01594F     LDAL  L0202A0
            PHA
            INC
            STAL  L0202A0
            PLA
            PEA   $0000
            PEA   $000D
            JSL   L01529A
            PLY
            PLY
            PEA   $000D
            JSL   L015EFD
            PLY
            INC   $F0
L015970     LDA   $F0
            SEC
            SBC   $FF
            BVS   L01597A
            EOR   #$8000
L01597A     BPL   L01594F
L01597C     TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L015984     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F0
            TCS
            PEA   $000C
            JSL   L0157C4
            PLY
            PEA   $000D
            JSL   L0157C4
            PLY
            LDAL  L02029E
            STA   $F2
            LDA   #$0000
            STAL  L02029E
            STZ   $F4
            BRA   L0159D1
L0159B0     LDAL  L02029E
            PHA
            INC
            STAL  L02029E
            PLA
            PEA   $0001
            PEA   $000C
            JSL   L01529A
            PLY
            PLY
            PEA   $000C
            JSL   L015EFD
            PLY
            INC   $F4
L0159D1     LDA   $F4
            SEC
            SBC   $F2
            BVS   L0159DB
            EOR   #$8000
L0159DB     BPL   L0159B0
            LDAL  L0202A0
            STA   $F2
            LDA   #$0000
            STAL  L0202A0
            STZ   $F4
            BRA   L015A0F
L0159EE     LDAL  L0202A0
            PHA
            INC
            STAL  L0202A0
            PLA
            PEA   $0001
            PEA   $000D
            JSL   L01529A
            PLY
            PLY
            PEA   $000D
            JSL   L015EFD
            PLY
            INC   $F4
L015A0F     LDA   $F4
            SEC
            SBC   $F2
            BVS   L015A19
            EOR   #$8000
L015A19     BPL   L0159EE
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L015A23     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$0058
            TCS
            LDX   #$0000
            TDC
            CLC
            ADC   #$0078
            STX   $6A
            STA   $68
            LDA   #$0001
            PHA
            LDA   $FB
            SEC
            SBC   #$0004
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015A51
            DEX
L015A51     PHX
            PHA
            LDA   $FD
            SEC
            SBC   #$0004
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L015A6A
            DEX
L015A6A     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $66
            STA   $64
            STZ   $62
            BRA   L015ACA
L015A84     PEI   $66
            PEI   $64
            PEI   $6A
            PEI   $68
            PEA   $0000
            PEA   $0008
            _BlockMove
            LDX   $6A
            LDA   $68
            CLC
            ADC   #$0008
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $6A
            STA   $68
            LDX   $66
            LDA   $64
            CLC
            ADC   #$00A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $66
            STA   $64
            INC   $62
L015ACA     LDA   $62
            SEC
            SBC   #$000F
            BVS   L015AD5
            EOR   #$8000
L015AD5     BPL   L015A84
            LDA   #$0098
            STA   $5E
            LDA   #$0008
            STA   $5A
            STZ   $5C
            BRL   L015CE3
L015AE6     LDX   #$0000
            TDC
            CLC
            ADC   #$0078
            STX   $76
            STA   $74
            LDA   #$0001
            PHA
            LDA   $FB
            SEC
            SBC   #$0004
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015B09
            DEX
L015B09     PHX
            PHA
            LDA   $FD
            SEC
            SBC   #$0004
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L015B22
            DEX
L015B22     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $6A
            STA   $68
            LDA   $FF
            CMP   #$0001
            BEQ   L015B42
            BRL   L015BAB
L015B42     LDA   #$0001
            PHA
            LDA   $5C
            ASL
            ASL
            ASL
            ASL
            PHA
            LDA   #$0000
            PLX
            STX   $F4
            CLC
            ADC   $F4
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015B63
            DEX
L015B63     PHX
            PHA
            LDA   #L03775C
            LDX   #^L03775C
            JSL   L016FC0
            PLA
            PLX
            STX   $6E
            STA   $6C
            LDA   #$0001
            PHA
            LDA   $5C
            ASL
            ASL
            ASL
            ASL
            PHA
            LDA   #$0050
            PLX
            STX   $F4
            CLC
            ADC   $F4
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015B96
            DEX
L015B96     PHX
            PHA
            LDA   #L03775C
            LDX   #^L03775C
            JSL   L016FC0
            PLA
            PLX
            STX   $72
            STA   $70
            BRL   L015C19
L015BAB     LDA   #$0001
            PHA
            LDA   #$0004
            SEC
            SBC   $5C
            ASL
            ASL
            ASL
            ASL
            PHA
            LDA   #$0000
            PLX
            STX   $F4
            CLC
            ADC   $F4
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015BD0
            DEX
L015BD0     PHX
            PHA
            LDA   #L03775C
            LDX   #^L03775C
            JSL   L016FC0
            PLA
            PLX
            STX   $6E
            STA   $6C
            LDA   #$0001
            PHA
            LDA   #$0004
            SEC
            SBC   $5C
            ASL
            ASL
            ASL
            ASL
            PHA
            LDA   #$0050
            PLX
            STX   $F4
            CLC
            ADC   $F4
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015C07
            DEX
L015C07     PHX
            PHA
            LDA   #L03775C
            LDX   #^L03775C
            JSL   L016FC0
            PLA
            PLX
            STX   $72
            STA   $70
L015C19     STZ   $62
            BRL   L015CC4
L015C1E     STZ   $60
            BRA   L015C6B
L015C22     LDA   [$70]
            AND   #$00FF
            PHA
            LDA   [$6C]
            AND   #$00FF
            PLX
            STX   $F4
            AND   $F4
            PHA
            LDA   [$70]
            AND   #$00FF
            EOR   #$FFFF
            PHA
            LDA   [$74]
            AND   #$00FF
            PLX
            STX   $F4
            AND   $F4
            PLX
            STX   $F4
            ORA   $F4
            SEP   #$20
            STA   [$68]
            REP   #$20
            INC   $68
            BNE   L015C57
            INC   $6A
L015C57     INC   $74
            BNE   L015C5D
            INC   $76
L015C5D     INC   $6C
            BNE   L015C63
            INC   $6E
L015C63     INC   $70
            BNE   L015C69
            INC   $72
L015C69     INC   $60
L015C6B     LDA   $60
            SEC
            SBC   $5A
            BVS   L015C75
            EOR   #$8000
L015C75     BPL   L015C22
            LDA   $5E
            LDX   #$0000
            TAY
            BPL   L015C80
            DEX
L015C80     PHX
            PHA
            LDX   $6E
            LDA   $6C
            JSL   L016FC0
            PLA
            PLX
            STX   $6E
            STA   $6C
            LDA   $5E
            LDX   #$0000
            TAY
            BPL   L015C99
            DEX
L015C99     PHX
            PHA
            LDX   $72
            LDA   $70
            JSL   L016FC0
            PLA
            PLX
            STX   $72
            STA   $70
            LDA   $5E
            LDX   #$0000
            TAY
            BPL   L015CB2
            DEX
L015CB2     PHX
            PHA
            LDX   $6A
            LDA   $68
            JSL   L016FC0
            PLA
            PLX
            STX   $6A
            STA   $68
            INC   $62
L015CC4     LDA   $62
            SEC
            SBC   #$000F
            BVS   L015CCF
            EOR   #$8000
L015CCF     BMI   L015CD4
            BRL   L015C1E
L015CD4     LDA   L06007B
            BEQ   L015CE1
            PEA   $03E8
            JSL   L014CC8
            PLY
L015CE1     INC   $5C
L015CE3     LDA   $5C
            SEC
            SBC   #$0005
            BVS   L015CEE
            EOR   #$8000
L015CEE     BMI   L015CF3
            BRL   L015AE6
L015CF3     LDA   $FF
            CMP   #$0001
            BEQ   L015CFD
            BRL   L015DA6
L015CFD     LDX   #$0000
            TDC
            CLC
            ADC   #$0078
            STX   $66
            STA   $64
            LDA   #$0001
            PHA
            LDA   $FB
            SEC
            SBC   #$0004
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L015D20
            DEX
L015D20     PHX
            PHA
            LDA   $FD
            SEC
            SBC   #$0004
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L015D39
            DEX
L015D39     PHX
            PHA
            JSL   getSHRPTR
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $6A
            STA   $68
            STZ   $62
            BRA   L015D99
L015D53     PEI   $66
            PEI   $64
            PEI   $6A
            PEI   $68
            PEA   $0000
            PEA   $0008
            _BlockMove
            LDX   $66
            LDA   $64
            CLC
            ADC   #$0008
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $66
            STA   $64
            LDX   $6A
            LDA   $68
            CLC
            ADC   #$00A0
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $6A
            STA   $68
            INC   $62
L015D99     LDA   $62
            SEC
            SBC   #$000F
            BVS   L015DA4
            EOR   #$8000
L015DA4     BPL   L015D53
L015DA6     TDC
            CLC
            ADC   #$00F5
            TCS
            PLD
            RTL

L015DAE     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00E6
            TCS
            PEI   $FF
            PEA   $0000
            TDC
            CLC
            ADC   #$00EE
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00F0
            PHA
            JSL   L015FDD
            PLY
            PLY
            PLY
            PLY
            PLY
            LDA   #L03F523
            LDX   #^L03F523
            STX   $EA
            STA   $E8
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            STA   $EC
            STZ   $F2
            BRA   L015E41
L015E00     PEA   $03E8
            JSL   L014CC8
            PLY
            PEA   $0009
            PEA   $0010
            LDA   $EE
            SEC
            SBC   #$0003
            PHA
            LDA   $F0
            SEC
            SBC   #$0002
            PHA
            PEI   $EA
            PEI   $E8
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDX   $EA
            LDA   $E8
            CLC
            ADC   #$0008
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $EA
            STA   $E8
            INC   $F2
L015E41     LDA   $F2
            SEC
            SBC   #$0004
            BVS   L015E4C
            EOR   #$8000
L015E4C     BPL   L015E00
            LDA   $EE
            SEC
            SBC   #$0002
            PHA
            PEI   $F0
            LDA   #$000A
            PHA
            LDA   $EC
            SEC
            JSL   L017037
            PLY
            PHA
            JSL   L016EE6
            PLY
            PHA
            PEA   $00B9
            PEA   ^L0380BC
            PEA   L0380BC
            JSL   L014C50
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   $EE
            SEC
            SBC   #$0002
            PHA
            LDA   $F0
            CLC
            ADC   #$0006
            PHA
            LDA   #$000A
            PHA
            LDA   $EC
            SEC
            JSL   L017037
            PEA   $00B9
            PEA   ^L0380BC
            PEA   L0380BC
            JSL   L014C50
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L015EB5     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00E4
            TCS
            PEI   $FF
            PEA   $0000
            TDC
            CLC
            ADC   #$00F0
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00F2
            PHA
            JSL   L015FDD
            PLY
            PLY
            PLY
            PLY
            PLY
            LDA   $F0
            SEC
            SBC   #$0003
            PHA
            LDA   $F2
            SEC
            SBC   #$0002
            PHA
            PEA   $0009
            JSL   L014C1A
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L015EFD     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F0
            TCS
            LDA   $FF
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L020286
            LDX   #^L020286
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            STA   $F2
            LDA   $FF
            CMP   #$000C
            BNE   L015F81
            PEA   $006D
            PEA   $0010
            LDA   #$000A
            PHA
            LDA   $F2
            SEC
            JSL   L017037
            PLY
            PHA
            JSL   L016EE6
            PLY
            PHA
            PEA   $00B9
            PEA   ^L0303BC
            PEA   L0303BC
            JSL   L014C50
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $006D
            PEA   $0016
            LDA   #$000A
            PHA
            LDA   $F2
            SEC
            JSL   L017037
            PEA   $00B9
            PEA   ^L0303BC
            PEA   L0303BC
            JSL   L014C50
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            BRA   L015FD5
L015F81     PEA   $0061
            PEA   $0125
            LDA   #$000A
            PHA
            LDA   $F2
            SEC
            JSL   L017037
            PLY
            PHA
            JSL   L016EE6
            PLY
            PHA
            PEA   $00C1
            PEA   ^L0380BC
            PEA   L0380BC
            JSL   L014C50
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $0061
            PEA   $012B
            LDA   #$000A
            PHA
            LDA   $F2
            SEC
            JSL   L017037
            PEA   $00C1
            PEA   ^L0380BC
            PEA   L0380BC
            JSL   L014C50
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
L015FD5     TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L015FDD     PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            LDA   $FF
            BRL   L016052
L015FED     LDA   #$0056
            STA   [$FB]
            LDA   #$0016
            STA   [$F7]
            BRL   L016063
L015FFA     LDA   #$007C
            STA   [$FB]
            LDA   #$011E
            STA   [$F7]
            BRL   L016063
L016007     LDA   $FF
            SEC
            SBC   #$0005
            BEQ   L016016
            BVS   L016014
            EOR   #$8000
L016014     BMI   L01601D
L016016     LDA   #$001C
            STA   [$FB]
            BRA   L016030
L01601D     LDA   #$00B7
            STA   [$FB]
            LDA   $FF
            SEC
            SBC   #$000B
            PHA
            JSL   L016EE6
            PLY
            STA   $FF
L016030     LDA   $FF
            PHA
            LDA   #$0030
            SEC
            JSL   L01715C
            LDA   #$0022
            PLX
            STX   $F0
            CLC
            ADC   $F0
            STA   [$F7]
            BRL   L016063
            BRL   L016063
L01604C     DA    L015FED
            DA    L015FFA
            DA    L016007
L016052     SEC
            SBC   #$000C
            CMP   #$0002
            BCC   L01605E
            LDA   #$0002
L01605E     ASL
            TAX
            JMP   (L01604C,X)

L016063     TDC
            CLC
            ADC   #$00F1
            TCS
            PLD
            RTL

L01606B     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EA
            TCS
            LDA   #L03F755
            LDX   #^L03F755
            STX   $F2
            STA   $F0
            PEI   $FF
            PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EE
            PHA
            JSL   L015FDD
            PLY
            PLY
            PLY
            PLY
            PLY
            PEA   $0004
            PEA   $000C
            PEI   $EC
            PEI   $EE
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0160BF     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EA
            TCS
            LDA   #L03F4D5
            LDX   #^L03F4D5
            STX   $F2
            STA   $F0
            PEI   $FF
            PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EE
            PHA
            JSL   L015FDD
            PLY
            PLY
            PLY
            PLY
            PLY
            PEA   $0004
            PEA   $000C
            PEI   $EC
            PEI   $EE
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L016113     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   L060081
            BEQ   L016142
            STZ   L060081
            LDA   L060039
            BEQ   L016137
            LDA   L060037
            BEQ   L016137
            LDA   $FF
            CMP   L06008B
            BEQ   L016140
L016137     LDA   L060083
            PHA
            JSL   L0160BF
            PLY
L016140     BRA   L016154
L016142     LDA   #$0001
            STA   L060081
            LDA   $FF
            STA   L060083
            PEI   $FF
            JSL   L01606B
            PLY
L016154     TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L01615C     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00DE
            TCS
            LDA   $FD
            CMP   $FF
            BNE   L016178
            PEA   $1388
            JSL   L014CC8
            PLY
            BRL   L016242
L016178     LDA   #L03F4D5
            LDX   #^L03F4D5
            STX   $E2
            STA   $E0
            LDA   #L03F755
            LDX   #^L03F755
            STX   $E6
            STA   $E4
            PEI   $FD
            PEA   $0000
            TDC
            CLC
            ADC   #$00EA
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EE
            PHA
            JSL   L015FDD
            PLY
            PLY
            PLY
            PLY
            PLY
            PEI   $FF
            PEA   $0000
            TDC
            CLC
            ADC   #$00EA
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            JSL   L015FDD
            PLY
            PLY
            PLY
            PLY
            PLY
            PEI   $FD
            JSL   L01606B
            PLY
            PEI   $FD
            JSL   L0160BF
            PLY
            LDA   #$0008
            PHA
            LDA   $EC
            SEC
            SBC   $EE
            SEC
            JSL   L017037
            PLY
            STA   $E8
            STZ   $F0
            BRA   L01622E
L0161E9     LDA   $EE
            CLC
            ADC   $E8
            STA   $EE
            PEA   $0004
            PEA   $000C
            PEI   $EA
            PEI   $EE
            PEI   $E6
            PEI   $E4
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $03E8
            JSL   L014CC8
            PLY
            PEA   $0004
            PEA   $000C
            PEI   $EA
            PEI   $EE
            PEI   $E2
            PEI   $E0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            INC   $F0
L01622E     LDA   $F0
            SEC
            SBC   #$0007
            BVS   L016239
            EOR   #$8000
L016239     BPL   L0161E9
            PEI   $FF
            JSL   L01606B
            PLY
L016242     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01624C     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00EC
            TCS
            JSL   L043B74
            LDA   L060031
            CMP   #$0002
            BNE   L016274
            LDA   #L038154
            LDX   #^L038154
            STX   $F0
            STA   $EE
            LDA   #$0001
            STA   $F2
            BRA   L016283
L016274     LDA   #L03A6D4
            LDX   #^L03A6D4
            STX   $F0
            STA   $EE
            LDA   #$FFFF
            STA   $F2
L016283     STZ   $F4
            BRA   L0162E3
L016287     PEA   $0BB8
            JSL   L014CC8
            PLY
            LDA   $F4
            CMP   #$0002
            BNE   L01629A
            JSL   L043B74
L01629A     PEA   $000F
            PEA   $0010
            PEA   $0062
            PEA   $0098
            PEI   $F0
            PEI   $EE
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   $F2
            PHA
            LDA   #$000F
            SEC
            JSL   L01715C
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L0162D1
            DEX
L0162D1     PHX
            PHA
            LDX   $F0
            LDA   $EE
            JSL   L016FC0
            PLA
            PLX
            STX   $F0
            STA   $EE
            INC   $F4
L0162E3     LDA   $F4
            SEC
            SBC   #$0005
            BVS   L0162EE
            EOR   #$8000
L0162EE     BPL   L016287
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0162F8     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0062
            PEA   $0098
            PEA   $000F
            JSL   L014C1A
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01631B     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F0
            TCS
            LDA   L060031
            CMP   #$0001
            BNE   L01633A
            LDA   #L038154
            LDX   #^L038154
            STX   $F4
            STA   $F2
            BRA   L016344
L01633A     LDA   #L03A6D4
            LDX   #^L03A6D4
            STX   $F4
            STA   $F2
L016344     PEA   $000F
            PEA   $0010
            PEA   $0062
            PEA   $0098
            PEI   $F4
            PEI   $F2
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L016368     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            INC   L06007D
            LDA   L06007D
            CMP   #$01F4
            BNE   L0163A1
            JSL   doHIDECURSOR
            LDA   L06007F
            BEQ   L016390
            STZ   L06007F
            JSL   L0162F8
            BRA   L01639A
L016390     LDA   #$0001
            STA   L06007F
            JSL   L01631B
L01639A     JSL   doSHOWCURSOR
            STZ   L06007D
L0163A1     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0163A9     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            LDA   #L03F4DE
            LDX   #^L03F4DE
            STX   $F2
            STA   $F0
            PEA   $000B
            PEA   $000E
            PEI   $FF
            PEA   $009A
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0163E1     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            LDA   #L03F4E7
            LDX   #^L03F4E7
            STX   $F2
            STA   $F0
            PEA   $000B
            PEA   $000E
            PEI   $FF
            PEA   $009A
            PEI   $F2
            PEI   $F0
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L016419     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   L06002B
            CMP   #$0001
            BNE   L01643E
            PEA   $0053
            JSL   L0163E1
            PLY
            PEA   $0077
            JSL   L0163A9
            PLY
            BRA   L01644E
L01643E     PEA   $0077
            JSL   L0163E1
            PLY
            PEA   $0053
            JSL   L0163A9
            PLY
L01644E     TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L016456     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            PEA   $0053
            PEA   $009A
            PEA   $000B
            JSL   L014C1A
            PLY
            PLY
            PLY
            PEA   $0077
            PEA   $009A
            PEA   $000B
            JSL   L014C1A
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L016489     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00E8
            TCS
            LDA   L06002B
            CMP   #$0001
            BNE   L0164B7
            LDA   #L03BF34
            LDX   #^L03BF34
            STX   $F0
            STA   $EE
            LDA   #L03F634
            LDX   #^L03F634
            STX   $EC
            STA   $EA
            LDA   #$0001
            STA   $F2
            BRA   L0164D0
L0164B7     LDA   #L03BF34
            LDX   #^L03BF34
            STX   $EC
            STA   $EA
            LDA   #L03F634
            LDX   #^L03F634
            STX   $F0
            STA   $EE
            LDA   #$FFFF
            STA   $F2
L0164D0     STZ   $F4
            BRL   L016571
L0164D5     PEA   $07D0
            JSL   L014CC8
            PLY
            PEA   $000B
            PEA   $0010
            PEA   $0053
            PEA   $009A
            PEI   $F0
            PEI   $EE
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            PEA   $000B
            PEA   $0010
            PEA   $0077
            PEA   $009A
            PEI   $EC
            PEI   $EA
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   $F2
            PHA
            LDA   #$000B
            SEC
            JSL   L01715C
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L016530
            DEX
L016530     PHX
            PHA
            LDX   $F0
            LDA   $EE
            JSL   L016FC0
            PLA
            PLX
            STX   $F0
            STA   $EE
            LDA   $F2
            EOR   #$FFFF
            INC
            PHA
            LDA   #$000B
            SEC
            JSL   L01715C
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L01655F
            DEX
L01655F     PHX
            PHA
            LDX   $EC
            LDA   $EA
            JSL   L016FC0
            PLA
            PLX
            STX   $EC
            STA   $EA
            INC   $F4
L016571     LDA   $F4
            SEC
            SBC   #$0009
            BVS   L01657C
            EOR   #$8000
L01657C     BMI   L016581
            BRL   L0164D5
L016581     JSL   L043430
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L01658D     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   doHIDECURSOR
            PEA   $00E1
            PEA   $2AA0
            PEA   ^L0202A2
            PEA   L0202A2
            PEA   $0000
            PEA   $7080
            _BlockMove
            JSL   doSHOWCURSOR
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0165CA     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            JSL   doHIDECURSOR
            PEA   ^L0202A2
            PEA   L0202A2
            PEA   $00E1
            PEA   $2AA0
            PEA   $0000
            PEA   $7080
            _BlockMove
            JSL   doSHOWCURSOR
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L016607     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E8
            TCS
            LDA   #L0303C8
            LDX   #^L0303C8
            STX   $F0
            STA   $EE
            LDA   #L032BC8
            LDX   #^L032BC8
            STX   $EC
            STA   $EA
            PEI   $EC
            PEI   $EA
            PEA   $001F
            PEA   $0018
            PEI   $FF
            PEI   $FD
            PEI   $F0
            PEI   $EE
            JSL   L014A2D
            TAY
            TSC
            CLC
            ADC   #$0010
            TCS
            TYA
            LDA   #L0303BC
            LDX   #^L0303BC
            STX   $F0
            STA   $EE
            LDA   #L032BBC
            LDX   #^L032BBC
            STX   $EC
            STA   $EA
            PEI   $EC
            PEI   $EA
            PEA   $001F
            PEA   $0018
            PEI   $FF
            PEI   $FD
            PEI   $F0
            PEI   $EE
            JSL   L014A2D
            TAY
            TSC
            CLC
            ADC   #$0010
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L01667E     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E8
            TCS
            LDA   #L033F28
            LDX   #^L033F28
            STX   $EC
            STA   $EA
            LDA   #L031728
            LDX   #^L031728
            STX   $F0
            STA   $EE
            PEI   $EC
            PEI   $EA
            PEA   $0021
            PEA   $0018
            PEI   $FF
            PEI   $FD
            PEI   $F0
            PEI   $EE
            JSL   L014A2D
            TAY
            TSC
            CLC
            ADC   #$0010
            TCS
            TYA
            LDA   #L033F1C
            LDX   #^L033F1C
            STX   $EC
            STA   $EA
            LDA   #L03171C
            LDX   #^L03171C
            STX   $F0
            STA   $EE
            PEI   $EC
            PEI   $EA
            PEA   $0021
            PEA   $0018
            PEI   $FF
            PEI   $FD
            PEI   $F0
            PEI   $EE
            JSL   L014A2D
            TAY
            TSC
            CLC
            ADC   #$0010
            TCS
            TYA
            TDC
            CLC
            ADC   #$00F7
            TCS
            PLD
            RTL

L0166F5     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
L016700     LDAL  L029610
            CMP   #$0040
            BEQ   L016718
            JSL   L0405FA
            TAY
            BEQ   L016716
            LDA   #$0001
            BRL   L016791
L016716     BRA   L016700
L016718     PEA   $009C
            PEA   $006E
            JSL   L01667E
            PLY
            PLY
L016724     LDAL  L029610
            CMP   #$0050
            BEQ   L01673C
            JSL   L0405FA
            TAY
            BEQ   L01673A
            LDA   #$0001
            BRL   L016791
L01673A     BRA   L016724
L01673C     PEA   $0076
            PEA   $0056
            JSL   L016607
            PLY
            PLY
L016748     LDAL  L029610
            CMP   #$0060
            BEQ   L01675F
            JSL   L0405FA
            TAY
            BEQ   L01675D
            LDA   #$0001
            BRA   L016791
L01675D     BRA   L016748
L01675F     PEA   $0050
            PEA   $006E
            JSL   L01667E
            PLY
            PLY
L01676B     LDAL  L029610
            CMP   #$0070
            BEQ   L016782
            JSL   L0405FA
            TAY
            BEQ   L016780
            LDA   #$0001
            BRA   L016791
L016780     BRA   L01676B
L016782     PEA   $004E
            PEA   $0052
            JSL   L016607
            PLY
            PLY
            LDA   #$0000
L016791     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L01679B     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00EA
            TCS
            STZ   $F4
            BRL   L01693F
L0167AB     LDA   $F4
            ASL
            ASL
            ASL
            PHA
            LDA   #$0090
            PLX
            STX   $FA
            CLC
            ADC   $FA
            CMPL  L029610
            BEQ   L0167CF
            JSL   L0405FA
            TAY
            BEQ   L0167CD
            LDA   #$0001
            BRL   L016952
L0167CD     BRA   L0167AB
L0167CF     LDA   #$0001
            PHA
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L0167FC
            DEX
L0167FC     PHX
            PHA
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L01682E
            DEX
L01682E     PHX
            PHA
            LDA   #L0303BC
            LDX   #^L0303BC
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $F2
            STA   $F0
            LDA   #$0001
            PHA
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDY   #$0006
            LDA   [$F6],Y
            PHA
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDA   [$F6]
            PLX
            STX   $FA
            CLC
            ADC   $FA
            SEC
            JSL   L016FCB
            PLA
            LDX   #$0000
            TAY
            BPL   L016899
            DEX
L016899     PHX
            PHA
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            PHA
            LDA   #$00A0
            SEC
            JSL   L01715C
            PLA
            LDX   #$0000
            TAY
            BPL   L0168CB
            DEX
L0168CB     PHX
            PHA
            LDA   #L0303BC
            LDX   #^L0303BC
            JSL   L016FC0
            PLA
            PLX
            JSL   L016FC0
            PLA
            PLX
            STX   $EE
            STA   $EC
            PEI   $EE
            PEI   $EC
            PEA   $002B
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDY   #$0006
            LDA   [$F6],Y
            PHA
            PEA   $001A
            LDA   $F4
            ASL
            ASL
            ASL
            LDX   #$0000
            PHX
            PHA
            LDA   #L03030C
            LDX   #^L03030C
            JSL   L016FC0
            PLA
            PLX
            STA   $F6
            STX   $F8
            LDY   #$0004
            LDA   [$F6],Y
            PHA
            PEI   $F2
            PEI   $F0
            JSL   L014A2D
            TAY
            TSC
            CLC
            ADC   #$0010
            TCS
            TYA
            INC   $F4
L01693F     LDA   $F4
            SEC
            SBC   #$0016
            BVS   L01694A
            EOR   #$8000
L01694A     BMI   L01694F
            BRL   L0167AB
L01694F     LDA   #$0000
L016952     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L01695C     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F0
            TCS
L016967     LDAL  L029610
            CMP   #$0160
            BEQ   L01697E
            JSL   L0405FA
            TAY
            BEQ   L01697C
            LDA   #$0001
            BRA   L0169A7
L01697C     BRA   L016967
L01697E     LDA   #L03498E
            LDX   #^L03498E
            STX   $F4
            STA   $F2
            PEA   $0057
            PEA   $005C
            PEA   $005B
            PEA   $00BA
            PEI   $F4
            PEI   $F2
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            LDA   #$0000
L0169A7     TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L0169B1     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F0
            TCS
            LDA   #L037BB8
            LDX   #^L037BB8
            STX   $F4
            STA   $F2
            PEA   $0009
            PEA   $0006
            PEA   $009A
            PEA   $00AA
            PEI   $F4
            PEI   $F2
            JSL   L014B5C
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TDC
            CLC
            ADC   #$00FB
            TCS
            PLD
            RTL

L0169EA     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00D0
            TCS
            LDA   #$7FFF
            STA   $D6
            LDX   $F9
            LDA   $F7
            STX   $DA
            STA   $D8
            STX   $DE
            STA   $DC
            LDA   #$0002
            STA   $E6
            LDA   #$0014
            STA   $E8
            LDX   #$0000
            TDC
            CLC
            ADC   #$00FF
            STX   $D4
            STA   $D2
            PEA   $0000
            TDC
            CLC
            ADC   #$00D6
            PHA
            PEI   $D4
            PEI   $D2
            PEI   $FD
            PEI   $FB
            JSL   L017713
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            STA   $EA
            LDA   #$0000
            SEP   #$20
            STA   [$D8]
            REP   #$20
            LDA   $EA
            TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L016A50     PHB
            LDA   #^L0600D5
            PHA
            PLB
            PLA
            RTL

L016A58     PEA   $0000
            PEA   $0000
            PEA   $0000
            PEA   $0000
            PEA   $0000
            STA   $04,S
            TXA
            STA   $06,S
            LDA   $0A,S
            STA   $00,S
            LDA   $0C,S
            STA   $02,S
            LDA   #$0000
            STA   $0A,S
            TSC
            CLC
            ADC   #$0004
            PEA   $0000
            PHA
            PEA   $0000
            PHA
            PEA   $050E
            _SANEFP816
            RTL

L016A91     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00DF
            TCS
            STZ   $EF
            STZ   L060006
            LDA   $FD
            CMP   #$0000
            BNE   L016AB8
            LDA   $FF
            CMP   #$0000
            BNE   L016AB8
            LDA   #$0001
            STA   L0600D6
            BRL   L016EDC
L016AB8     LDX   $FF
            LDA   $FD
            CLC
            ADC   #$0008
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E9
            STA   $E7
            LDA   [$E7]
            SEP   #$20
            STA   $F1
            REP   #$20
            LDA   #$0000
            SEP   #$20
            STA   [$E7]
            REP   #$20
            PEA   $0001
            PEA   ^L02BE93
            PEA   L02BE93
            PEI   $FF
            PEI   $FD
            JSL   L017560
            PLY
            PLY
            PLY
            PLY
            PLY
            TAY
            BNE   L016B06
            LDA   #$0001
            STA   L0600D6
            LDA   $F1
            SEP   #$20
            STA   [$E7]
            REP   #$20
            BRL   L016EDC
L016B06     STZ   L0600D6
            LDA   $F1
            SEP   #$20
            STA   [$E7]
            REP   #$20
            PHX
            PHA
            PEA   $0000
            PEA   $0100
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $0000
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            STX   $ED
            STA   $EB
            LDA   L060002
            BEQ   L016B4C
            PEA   $FFFF
            JSL   L0174C7
            PLY
L016B4C     LDA   #$0100
            STA   $E1
L016B51     LDA   [$E7]
            AND   #$00FF
            CMP   #$0000
            BNE   L016B5E
            BRL   L016DBC
L016B5E     INC   L060006
            LDA   [$E7]
            AND   #$00FF
            CMP   #$0022
            BEQ   L016B6E
            BRL   L016C95
L016B6E     INC   $E7
            BNE   L016B74
            INC   $E9
L016B74     LDA   [$E7]
            AND   #$00FF
            CMP   #$0000
            BNE   L016B81
            BRL   L016C92
L016B81     LDA   [$E7]
            AND   #$00FF
            CMP   #$0022
            BEQ   L016B8E
            BRL   L016C1A
L016B8E     INC   $E7
            BNE   L016B94
            INC   $E9
L016B94     LDA   [$E7]
            AND   #$00FF
            CMP   #$0022
            BNE   L016C15
            LDA   $EF
            CMP   $E1
            BNE   L016BDC
            LDA   $E1
            CLC
            ADC   #$0100
            LDX   #$0000
            TAY
            BPL   L016BB1
            DEX
L016BB1     PHX
            PHA
            PEI   $ED
            PEI   $EB
            _SetHandleSize
            LDA   L060002
            BEQ   L016BD4
            PEA   $FFFF
            JSL   L0174C7
            PLY
L016BD4     LDA   $E1
            CLC
            ADC   #$0100
            STA   $E1
L016BDC     LDX   $E9
            LDA   $E7
            INC   $E7
            BNE   L016BE6
            INC   $E9
L016BE6     STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            LDA   $EF
            INC   $EF
            LDX   #$0000
            TAY
            BPL   L016BF8
            DEX
L016BF8     PHX
            PHA
            LDY   #$0002
            LDA   [$EB],Y
            TAX
            LDA   [$EB]
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            PLA
            SEP   #$20
            STA   [$F2]
            REP   #$20
            BRA   L016C18
L016C15     BRL   L016C92
L016C18     BRA   L016C8F
L016C1A     LDA   $EF
            CMP   $E1
            BNE   L016C58
            LDA   $E1
            CLC
            ADC   #$0100
            LDX   #$0000
            TAY
            BPL   L016C2D
            DEX
L016C2D     PHX
            PHA
            PEI   $ED
            PEI   $EB
            _SetHandleSize
            LDA   L060002
            BEQ   L016C50
            PEA   $FFFF
            JSL   L0174C7
            PLY
L016C50     LDA   $E1
            CLC
            ADC   #$0100
            STA   $E1
L016C58     LDX   $E9
            LDA   $E7
            INC   $E7
            BNE   L016C62
            INC   $E9
L016C62     STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            LDA   $EF
            INC   $EF
            LDX   #$0000
            TAY
            BPL   L016C74
            DEX
L016C74     PHX
            PHA
            LDY   #$0002
            LDA   [$EB],Y
            TAX
            LDA   [$EB]
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            PLA
            SEP   #$20
            STA   [$F2]
            REP   #$20
L016C8F     BRL   L016B74
L016C92     BRL   L016D37
L016C95     LDA   [$E7]
            SEP   #$20
            STA   $F1
            REP   #$20
            AND   #$00FF
            CMP   #$0020
            BNE   L016CA8
            BRL   L016D37
L016CA8     LDA   $F1
            AND   #$00FF
            CMP   #$0000
            BNE   L016CB5
            BRL   L016D37
L016CB5     LDA   $F1
            AND   #$00FF
            CMP   #$0009
            BEQ   L016D37
            LDA   $EF
            CMP   $E1
            BNE   L016CFD
            LDA   $E1
            CLC
            ADC   #$0100
            LDX   #$0000
            TAY
            BPL   L016CD2
            DEX
L016CD2     PHX
            PHA
            PEI   $ED
            PEI   $EB
            _SetHandleSize
            LDA   L060002
            BEQ   L016CF5
            PEA   $FFFF
            JSL   L0174C7
            PLY
L016CF5     LDA   $E1
            CLC
            ADC   #$0100
            STA   $E1
L016CFD     LDX   $E9
            LDA   $E7
            INC   $E7
            BNE   L016D07
            INC   $E9
L016D07     STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            LDA   $EF
            INC   $EF
            LDX   #$0000
            TAY
            BPL   L016D19
            DEX
L016D19     PHX
            PHA
            LDY   #$0002
            LDA   [$EB],Y
            TAX
            LDA   [$EB]
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            PLA
            SEP   #$20
            STA   [$F2]
            REP   #$20
            BRL   L016C95
L016D37     LDA   $EF
            CMP   $E1
            BNE   L016D75
            LDA   $E1
            CLC
            ADC   #$0100
            LDX   #$0000
            TAY
            BPL   L016D4A
            DEX
L016D4A     PHX
            PHA
            PEI   $ED
            PEI   $EB
            _SetHandleSize
            LDA   L060002
            BEQ   L016D6D
            PEA   $FFFF
            JSL   L0174C7
            PLY
L016D6D     LDA   $E1
            CLC
            ADC   #$0100
            STA   $E1
L016D75     LDA   $EF
            INC   $EF
            LDX   #$0000
            TAY
            BPL   L016D80
            DEX
L016D80     PHX
            PHA
            LDY   #$0002
            LDA   [$EB],Y
            TAX
            LDA   [$EB]
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   #$0000
            SEP   #$20
            STA   [$F2]
            REP   #$20
L016D9D     LDA   [$E7]
            AND   #$00FF
            CMP   #$0020
            BEQ   L016DB1
            LDA   [$E7]
            AND   #$00FF
            CMP   #$0009
            BNE   L016DB9
L016DB1     INC   $E7
            BNE   L016DB7
            INC   $E9
L016DB7     BRA   L016D9D
L016DB9     BRL   L016B51
L016DBC     LDA   $EF
            LDX   #$0000
            TAY
            BPL   L016DC5
            DEX
L016DC5     PHX
            PHA
            PEI   $ED
            PEI   $EB
            _SetHandleSize
            PEI   $ED
            PEI   $EB
            _HLock
            LDA   L060006
            CLC
            ADC   #$0001
            LDX   #$0000
            TAY
            BPL   L016DFD
            DEX
L016DFD     STX   $F6
            ASL
            ROL   $F6
            ASL
            ROL   $F6
            LDX   $F6
            PHX
            PHA
            JSL   L0174E5
            PLY
            PLY
            STX   L06000A
            STA   L060008
            LDY   #$0002
            LDA   [$EB],Y
            TAX
            LDA   [$EB]
            PHX
            PHA
            LDX   L06000A
            LDA   L060008
            STA   $F2
            STX   $F4
            PLA
            PLX
            LDY   #$0002
            PHA
            TXA
            STA   [$F2],Y
            PLA
            STA   [$F2]
            LDA   #$0001
            STA   $EF
            LDY   #$0002
            LDA   [$EB],Y
            TAX
            LDA   [$EB]
            STX   $E5
            STA   $E3
            BRA   L016E99
L016E48     LDA   [$E3]
            AND   #$00FF
            BNE   L016E93
            LDX   $E5
            LDA   $E3
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            PHX
            PHA
            LDA   $EF
            INC   $EF
            LDX   #$0000
            TAY
            BPL   L016E6B
            DEX
L016E6B     STX   $F6
            ASL
            ROL   $F6
            ASL
            ROL   $F6
            LDX   $F6
            PHX
            PHA
            LDX   L06000A
            LDA   L060008
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            PLA
            PLX
            LDY   #$0002
            PHA
            TXA
            STA   [$F2],Y
            PLA
            STA   [$F2]
L016E93     INC   $E3
            BNE   L016E99
            INC   $E5
L016E99     LDA   $EF
            SEC
            SBC   L060006
            BVS   L016EA4
            EOR   #$8000
L016EA4     BPL   L016E48
            LDA   L060006
            LDX   #$0000
            TAY
            BPL   L016EB0
            DEX
L016EB0     STX   $F6
            ASL
            ROL   $F6
            ASL
            ROL   $F6
            LDX   $F6
            PHX
            PHA
            LDX   L06000A
            LDA   L060008
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDX   #$0000
            LDA   #$0000
            LDY   #$0002
            PHA
            TXA
            STA   [$F2],Y
            PLA
            STA   [$F2]
L016EDC     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L016EE6     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            SEC
            SBC   #$0000
            BVS   L016EFC
            EOR   #$8000
L016EFC     BPL   L016F02
            LDA   $FF
            BRA   L016F08
L016F02     LDA   $FF
            EOR   #$FFFF
            INC
L016F08     TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L016F12     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E6
            TCS
            LDX   $FF
            LDA   $FD
            STX   $EA
            STA   $E8
            LDX   $FF
            LDA   $FD
            STX   $F2
            ORA   $F2
            BEQ   L016F70
L016F2F     LDA   [$FD]
            AND   #$00FF
            STA   $EC
            LDA   $EE
            PHA
            LDX   $FF
            LDA   $FD
            INC   $FD
            BNE   L016F43
            INC   $FF
L016F43     STA   $F2
            STX   $F4
            PLA
            SEP   #$20
            STA   [$F2]
            REP   #$20
            LDA   $EC
            STA   $EE
            LDA   $EC
            BNE   L016F2F
            LDX   $EA
            LDA   $E8
            PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L017151
            PLA
            PLX
            SEC
            SBC   #$0001
            SEP   #$20
            STA   [$E8]
            REP   #$20
L016F70     LDX   $EA
            LDA   $E8
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L016F7E     LDA   $04,S
            STA   L0600B9
            LDA   $06,S
            STA   L0600BB
            LDA   $08,S
            STA   L0600BD
            LDA   $0A,S
            STA   L0600BF
            TSC
            SEC
            SBC   #$0002
            TCS
            LDA   $02,S
            STA   $00,S
            LDA   $04,S
            STA   $02,S
            PEA   ^L0600B9
            PEA   L0600B9
            TSC
            CLC
            ADC   #$0008
            PEA   $0000
            PHA
            PEA   $010E
            _SANEFP816
            RTL

L016FBA     LDA   $04,S
            PHA
            PLB
            PLB
            RTL

L016FC0     ENT
            CLC
            ADC   $04,S
            STA   $04,S
            TXA
            ADC   $06,S
            STA   $06,S
            RTL

L016FCB     BCC   L016FDF
            TAY
            LDA   $04,S
            TAX
            BEQ   L016FEB
            TYA
            BEQ   L016FEC
            BPL   L016FE6
L016FD8     SEC
            ROR
            DEX
            BNE   L016FD8
            BRA   L016FEC
L016FDF     TAY
            LDA   $04,S
            TAX
            BEQ   L016FEB
            TYA
L016FE6     LSR
            DEX
            BNE   L016FE6
            TAY
L016FEB     TYA
L016FEC     STA   $04,S
            RTL

L016FEF     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00E8
            TCS
            LDX   $FB
            LDA   $F9
            STX   $EC
            STA   $EA
L017002     DEC   $FF
            LDA   $FF
            SEC
            SBC   #$0000
            BVS   L01700F
            EOR   #$8000
L01700F     BPL   L017029
            LDX   $FB
            LDA   $F9
            INC   $F9
            BNE   L01701B
            INC   $FB
L01701B     STA   $EE
            STX   $F0
            LDA   $FD
            SEP   #$20
            STA   [$EE]
            REP   #$20
            BRA   L017002
L017029     LDX   $EC
            LDA   $EA
            TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L017037     ENT
            PHD
            PHA
            PEA   $0001
            TSC
            TCD
            LDA   $0A
            BEQ   L0170AC
            LDX   #$0000
            BCC   L017062
            BIT   #$8000
            BEQ   L017053
            EOR   #$FFFF
            INC
            STA   $0A
            INX
L017053     LDA   $03
            BIT   #$8000
            BEQ   L017062
            EOR   #$FFFF
            INC
            STA   $03
            INX
            INX
L017062     LDY   #$0000
            BRA   L017069
L017067     ASL   $01
L017069     ASL   $0A
            BCC   L017067
            ROR   $0A
L01706F     LDA   $03
            CMP   $0A
            BCC   L017080
            LDA   $03
            SEC
            SBC   $0A
            STA   $03
            TYA
            ORA   $01
            TAY
L017080     LSR   $0A
            LSR   $01
            BCC   L01706F
            LDA   $03
            STA   $0A
            TYA
            CPX   #$0000
            BEQ   L0170A8
            CPX   #$0003
            BEQ   L01709E
            EOR   #$FFFF
            INC
            CPX   #$0001
            BEQ   L0170A8
L01709E     TAY
            LDA   $0A
            EOR   #$FFFF
            INC
            STA   $0A
            TYA
L0170A8     PLY
            PLY
            PLD
            RTL

L0170AC     PEA   $0004
            PEA   $0000
            PEA   $0000
            _SysFailMgr
L0170BC     TSC
            CLC
            ADC   #$000E
            PEA   $0000
            PHA
            SBC   #$0009
            PEA   $0000
            PHA
            PEA   $0002
            _SANEFP816
            LDA   $0C,S
            STA   $16,S
            LDA   $0A,S
            STA   $14,S
            LDA   $08,S
            STA   $12,S
            LDA   $06,S
            STA   $10,S
            LDA   $04,S
            STA   $0E,S
            LDA   $02,S
            STA   $0C,S
            LDA   $00,S
            STA   $0A,S
            PLY
            PLY
            PLY
            PLY
            PLY
            RTL

L0170F8     TSC
            CLC
            ADC   #$0004
            PEA   $0000
            PHA
            ADC   #$000A
            PEA   $0000
            PHA
            PEA   $000A
            _SANEFP816
            PHP
            PHP
            PLA
            STA   L0600B9
            LDA   $02,S
            STA   $16,S
            LDA   $00,S
            STA   $14,S
            TSC
            CLC
            ADC   #$0014
            TCS
            LDA   L0600B9
            PHA
            PLP
            PLP
            SEC
            BVC   L017130
            CLC
L017130     BPL   L017133
            SEC
L017133     RTL

L017134     PHD
            TSC
            TCD
            STA   [$06]
            LDA   $01,S
            LDY   #$0002
            STA   [$06],Y
            LDA   $02,S
            INY
            INY
            STA   [$06],Y
            LDA   $04,S
            INY
            INY
            STA   [$06],Y
            PLD
            LDA   #$0000
            RTL

L017151     SEC
            SBC   $04,S
            STA   $04,S
            TXA
            SBC   $06,S
            STA   $06,S
            RTL

L01715C     ENT
            PHD
            PHA
            TSC
            TCD
            LDX   #$0000
            BCC   L017181
            LDA   $08
            BIT   #$8000
            BEQ   L017173
            EOR   #$FFFF
            INC
            STA   $08
            INX
L017173     LDA   $01
            BIT   #$8000
            BEQ   L017181
            EOR   #$FFFF
            INC
            STA   $01
            DEX
L017181     LDA   #$0000
            BRA   L01718F
L017186     LSR   $01
            BCC   L01718D
            CLC
            ADC   $08
L01718D     ASL   $08
L01718F     LDY   $01
            BNE   L017186
            CPX   #$0000
            BEQ   L01719C
            EOR   #$FFFF
            INC
L01719C     STA   $08
            PLY
            PLD
            RTL

L0171A1     ENT
            PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00EC
            TCS
            LDA   $F9
            CMP   $FD
            BNE   L0171BD
            LDA   $FB
            CMP   $FF
            BNE   L0171BD
            LDA   #$0000
            BRA   L01721D
L0171BD     LDA   [$F9]
            AND   #$00FF
            PHA
            LDX   $FF
            LDA   $FD
            INC   $FD
            BNE   L0171CD
            INC   $FF
L0171CD     STA   $EE
            STX   $F0
            LDA   [$EE]
            AND   #$00FF
            PLX
            STX   $EE
            CMP   $EE
            BNE   L0171FC
            LDX   $FB
            LDA   $F9
            INC   $F9
            BNE   L0171E7
            INC   $FB
L0171E7     STA   $EE
            STX   $F0
            LDA   [$EE]
            AND   #$00FF
            CMP   #$0000
            BNE   L0171FA
            LDA   #$0000
            BRA   L01721D
L0171FA     BRA   L0171BD
L0171FC     LDA   $FD
            BNE   L017202
            DEC   $FF
L017202     DEC   $FD
            LDX   $FF
            LDA   $FD
            STA   $EE
            STX   $F0
            LDA   [$EE]
            AND   #$00FF
            PHA
            LDA   [$F9]
            AND   #$00FF
            PLX
            STX   $F2
            SEC
            SBC   $F2
L01721D     TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L017227     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$FFEA
            TCS
            LDA   #L0176D7
            LDX   #^L0176D7
            PHX
            PHA
            LDAL  L02BE75+2
            TAX
            LDAL  L02BE75
            STA   $F4
            STX   $F6
            PLA
            PLX
            LDY   #$0002
            PHA
            TXA
            STA   [$F4],Y
            PLA
            STA   [$F4]
            LDA   L0600D6
            BNE   L01725B
            BRL   L0173AD
L01725B     LDX   #$0000
            TDC
            CLC
            ADC   #$FFEC
            PHA
            TXA
            STAL  L02BEE2
            PLA
            STAL  L02BEE0
            PEA   $0027
            PEA   ^L02BEE0
            PEA   L02BEE0
            JSL   L017481
            LDAL  L02BEE2
            TAX
            LDAL  L02BEE0
            STA   $F4
            STX   $F6
            LDA   [$F4]
            AND   #$00FF
            STA   $F0
            STA   $EE
L017291     LDA   $F0
            LDX   #$0000
            TAY
            BPL   L01729A
            DEX
L01729A     PHX
            PHA
            LDAL  L02BEE2
            TAX
            LDAL  L02BEE0
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            AND   #$00FF
            CMP   #$002F
            BEQ   L0172CC
            LDA   $F0
            SEC
            SBC   #$0000
            BEQ   L0172CC
            BVS   L0172C6
            EOR   #$8000
L0172C6     BPL   L0172CC
            DEC   $F0
            BRA   L017291
L0172CC     LDA   $EE
            SEC
            SBC   $F0
            STA   $EC
            SEP   #$20
            STAL  L02BED0
            REP   #$20
            BRA   L01732F
L0172DD     LDA   $EE
            DEC   $EE
            LDX   #$0000
            TAY
            BPL   L0172E8
            DEX
L0172E8     PHX
            PHA
            LDAL  L02BEE2
            TAX
            LDAL  L02BEE0
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            PHA
            LDA   $EC
            LDX   #$0000
            TAY
            BPL   L017309
            DEX
L017309     PHX
            PHA
            LDA   #L02BED1
            LDX   #^L02BED1
            JSL   L016FC0
            PLA
            PLX
            SEC
            SBC   #$0001
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STA   $F4
            STX   $F6
            PLA
            SEP   #$20
            STA   [$F4]
            REP   #$20
            DEC   $EC
L01732F     LDA   $EC
            SEC
            SBC   #$0000
            BEQ   L01733E
            BVS   L01733C
            EOR   #$8000
L01733C     BMI   L0172DD
L01733E     LDA   #L02BED0
            LDX   #^L02BED0
            PHX
            PHA
            LDAL  L02BE67+2
            TAX
            LDAL  L02BE67
            STA   $F4
            STX   $F6
            PLA
            PLX
            LDY   #$0002
            PHA
            TXA
            STA   [$F4],Y
            PLA
            STA   [$F4]
            LDA   $FF
            BNE   L017380
            LDAL  L02BE67+2
            TAX
            LDAL  L02BE67
            STA   $F4
            STX   $F6
            LDY   #$0002
            LDA   [$F4],Y
            TAX
            LDA   [$F4]
            PHX
            PHA
            JSL   L018A47
            PLY
            PLY
L017380     LDA   #$0001
            STA   L060006
            LDAL  L02BE67+2
            TAX
            LDAL  L02BE67
            STX   L06000A
            STA   L060008
            PEA   $007F
            PEA   $0000
            _SetInGlobals
            BRA   L0173C5
L0173AD     LDA   L060006
            STAL  L02BE65
            LDX   L06000A
            LDA   L060008
            PHA
            TXA
            STAL  L02BE67+2
            PLA
            STAL  L02BE67
L0173C5     TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L0173CF     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            LDAL  L02BE75+2
            TAX
            LDAL  L02BE75
            STA   $F4
            STX   $F6
            LDX   $F6
            LDA   #$0024
            CLC
            ADC   $F4
            BCC   L0173F2
            INX
L0173F2     STX   $F2
            STA   $F0
            BRA   L017431
L0173F8     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0002
            LDA   [$F0],Y
            TAX
            LDA   [$F0]
            JSL   L017652
            BEQ   L017425
            PEI   $FF
            LDY   #$0002
            LDA   [$F0],Y
            TAX
            LDA   [$F0]
            STA   $F4
            STX   $F6
            LDA   $F4
            LDX   $F6
            JSL   L0174BF
            PLY
L017425     LDA   $F0
            SEC
            SBC   #$0004
            STA   $F0
            BCS   L017431
            DEC   $F2
L017431     SEC
            LDA   $F0
            SBCL  L02BE75
            BNE   L017442
            LDA   $F2
            SBCL  L02BE75+2
            BRA   L01744A
L017442     LDA   $F2
            SBCL  L02BE75+2
            REP   #$02
L01744A     BEQ   L017453
            BVS   L017451
            EOR   #$8000
L017451     BMI   L0173F8
L017453     LDA   $FF
            STA   L06000C
            LDAL  L02BE75+2
            TAX
            LDAL  L02BE75
            STA   $F4
            STX   $F6
            LDY   #$0002
            LDA   [$F4],Y
            TAX
            LDA   [$F4]
            STA   $F4
            STX   $F6
            LDA   $F4
            LDX   $F6
            JSL   L0174BF
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L017481     ENT
            PHB
            PLA
            XBA
            STAL  L0174BC
            PLA
            STAL  L0174BD
            PLA
            STAL  L0174A2
            PLA
            STAL  L0174A2+2
            PLA
            STAL  L0174A0
            JSL   GSOS
L0174A0     DW    $0000
L0174A2     ADRL  $00000000
            BCS   L0174AB
            LDA   #$0000
L0174AB     STAL  L060002
            LDAL  L0174BD
            PHA
            PHB
            LDAL  L0174BC
            STA   $01,S
            RTL

L0174BC     DB    $00
L0174BD     DB    $00
            DB    $00
L0174BF     ENT
            SEP   #$10
            PHX
            REP   #$10
            DEC
            PHA
            RTL

L0174C7     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            AND   #$FFFF
            PHA
            JSL   L0173CF
            PLY
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0174E5     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EC
            TCS
            PHX
            PHA
            PEI   $FF
            PEI   $FD
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $8300
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            STX   $F0
            STA   $EE
            STX   $F2
            ORA   $F2
            BEQ   L01752C
            LDY   #$0002
            LDA   [$EE],Y
            TAX
            LDA   [$EE]
            BRA   L017532
L01752C     LDX   #$0000
            LDA   #$0000
L017532     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01753C     TSC
            CLC
            ADC   #$0008
            PEA   $0000
            PHA
            LDA   $0A,S
            PHA
            LDA   $0A,S
            PHA
            PEA   $0110
            _SANEFP816
            LDA   $02,S
            STA   $06,S
            LDA   $00,S
            STA   $04,S
            PLY
            PLY
            RTL

L017560     PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            BRL   L017631
L01756E     LDA   [$F7]
            AND   #$00FF
            PHA
            LDA   [$FB]
            AND   #$00FF
            PLX
            STX   $EC
            CMP   $EC
            BNE   L017586
            LDA   #$0001
            BRL   L01760B
L017586     LDA   $FF
            BEQ   L01758F
            LDA   #$0000
            BRA   L01760B
L01758F     LDA   [$F7]
            AND   #$00FF
            SEC
            SBC   #$0061
            BVS   L01759D
            EOR   #$8000
L01759D     BPL   L0175B1
            LDA   [$F7]
            AND   #$00FF
            SEC
            SBC   #$007A
            BEQ   L0175B8
            BVS   L0175AF
            EOR   #$8000
L0175AF     BPL   L0175B8
L0175B1     LDA   [$F7]
            AND   #$00FF
            BRA   L0175C5
L0175B8     LDA   [$F7]
            AND   #$00FF
            CLC
            ADC   #$0041
            SEC
            SBC   #$0061
L0175C5     PHA
            LDA   [$FB]
            AND   #$00FF
            SEC
            SBC   #$0061
            BVS   L0175D4
            EOR   #$8000
L0175D4     BPL   L0175E8
            LDA   [$FB]
            AND   #$00FF
            SEC
            SBC   #$007A
            BEQ   L0175EF
            BVS   L0175E6
            EOR   #$8000
L0175E6     BPL   L0175EF
L0175E8     LDA   [$FB]
            AND   #$00FF
            BRA   L0175FC
L0175EF     LDA   [$FB]
            AND   #$00FF
            CLC
            ADC   #$0041
            SEC
            SBC   #$0061
L0175FC     PLX
            STX   $EC
            CMP   $EC
            BEQ   L017608
            LDA   #$0000
            BRA   L01760B
L017608     LDA   #$0001
L01760B     TAY
            BNE   L017613
            LDA   #$0000
            BRA   L017648
L017613     LDX   $F9
            LDA   $F7
            INC   $F7
            BNE   L01761D
            INC   $F9
L01761D     STA   $EC
            STX   $EE
            LDX   $FD
            LDA   $FB
            INC   $FB
            BNE   L01762B
            INC   $FD
L01762B     STA   $EC
            STX   $EE
            LDA   [$EC]
L017631     LDA   [$F7]
            AND   #$00FF
            BEQ   L01763B
            BRL   L01756E
L01763B     LDA   [$FB]
            AND   #$00FF
            BEQ   L017645
            BRL   L01756E
L017645     LDA   #$0001
L017648     TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L017652     PHX
            PHA
            LDA   $08,S
            TAX
            LDA   $0A,S
            TAY
            LDA   $06,S
            STA   $0A,S
            LDA   $04,S
            STA   $08,S
            TXA
            SEC
            SBC   $01,S
            BNE   L01766D
            TYA
            SBC   $03,S
            BRA   L017672
L01766D     TYA
            SBC   $03,S
            REP   #$02
L017672     PHP
            LDA   $00,S
            STA   $08,S
            PLY
            PLY
            PLY
            PLY
            PLP
            RTL

L01767D     PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00E6
            TCS
            LDX   $FB
            LDA   $F9
            STX   $EA
            STA   $E8
L017690     LDA   $F7
            CMP   #$0001
            BEQ   L0176BB
            BCC   L0176BB
            LDA   [$FD]
            STA   [$F9]
            LDA   $F9
            CLC
            ADC   #$0002
            STA   $F9
            BCC   L0176A9
            INC   $FB
L0176A9     LDA   $FD
            CLC
            ADC   #$0002
            STA   $FD
            BCC   L0176B5
            INC   $FF
L0176B5     DEC   $F7
            DEC   $F7
            BRA   L017690
L0176BB     LDA   $F7
            BEQ   L0176C7
            SEP   #$20
            LDA   [$FD]
            STA   [$F9]
            REP   #$20
L0176C7     LDX   $EA
            LDA   $E8
            STX   $FF
            STA   $FD
            TDC
            CLC
            ADC   #$00F1
            TCS
            PLD
            RTL

L0176D7     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            PEA   $0001
            PEA   ^L020020
            PEA   L020020
            JSL   L0189F0
            PLY
            PLY
            PLY
            TDC
            CLC
            ADC   #$00F9
            TCS
            PLD
            RTL

L0176FA     LDA   $04,S
            STAL  L01770E
            LDA   $06,S
            STAL  L01770E+2
            LDA   $08,S
            JSL   GSOS
            DW    $0029
L01770E     ADRL  $00000000
            RTL

L017713     PHD
            TSC
            SEC
            SBC   #$00EF
            TCD
            ADC   #$004A
            TCS
            STZ   $E8
L017720     LDX   $F7
            LDA   $F5
            STX   $E6
            STA   $E4
            BRA   L017730
L01772A     INC   $F5
            BNE   L017730
            INC   $F7
L017730     LDA   [$F5]
            AND   #$00FF
            STA   $DA
            CMP   #$0000
            BEQ   L017743
            LDA   $DA
            CMP   #$0025
            BNE   L01772A
L017743     LDX   $E6
            LDA   $E4
            PHX
            PHA
            LDX   $F7
            LDA   $F5
            JSL   L017151
            PLA
            PLX
            STA   $50
            TAY
            BNE   L01775B
            BRL   L017823
L01775B     LDA   $E8
            CLC
            ADC   $50
            STA   $E8
            LDA   $50
            CMP   #$0001
            BNE   L0177C4
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L017777
            EOR   #$8000
L017777     BPL   L0177B1
            LDA   [$E4]
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L01779A
            INC
L01779A     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L0177C2
L0177B1     PEI   $FF
            PEI   $FD
            LDA   [$E4]
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L0177C2     BRA   L017823
L0177C4     LDY   #$0012
            LDA   [$FD],Y
            CMP   #$0014
            BNE   L01780A
            LDA   $50
            LDX   #$0000
            TAY
            BPL   L0177D7
            DEX
L0177D7     PHX
            PHA
            PEI   $50
            PEI   $E6
            PEI   $E4
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            JSL   L018B61
            PLY
            PLY
            PLY
            PLY
            PLY
            JSL   L016FC0
            PLA
            PLX
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            BRA   L017823
L01780A     PEI   $FF
            PEI   $FD
            PEI   $50
            PEA   $0001
            PEI   $E6
            PEI   $E4
            JSL   L018D1B
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
L017823     LDA   $DA
            CMP   #$0000
            BNE   L01783F
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0020
            TAY
            BEQ   L01783A
            LDA   #$FFFF
            BRA   L01783C
L01783A     LDA   $E8
L01783C     BRL   L0189E6
L01783F     LDA   #$0000
            STA   $CA
            STA   $CC
            STA   $CE
            STA   $D0
            STA   $D2
L01784C     INC   $F5
            BNE   L017852
            INC   $F7
L017852     LDX   $F7
            LDA   $F5
            STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            STA   $DA
            BRL   L017879
L017864     INC   $D2
            BRL   L01788F
L017869     INC   $D0
            BRL   L01788F
L01786E     INC   $CE
            BRL   L01788F
L017873     INC   $CC
            BRA   L01788F
            BRA   L01788D
L017879     CMP   #$0020
            BEQ   L01786E
            CMP   #$0023
            BEQ   L017873
            CMP   #$002B
            BEQ   L017864
            CMP   #$002D
            BEQ   L017869
L01788D     BRA   L017891
L01788F     BRA   L01784C
L017891     LDA   $DA
            CMP   #$002A
            BNE   L0178DD
            LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0002
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFE
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDA   [$EA]
            STA   $DE
            LDA   $DE
            SEC
            SBC   #$0000
            BVS   L0178C9
            EOR   #$8000
L0178C9     BMI   L0178D5
            LDA   $DE
            EOR   #$FFFF
            INC
            STA   $DE
            INC   $D0
L0178D5     INC   $F5
            BNE   L0178DB
            INC   $F7
L0178DB     BRA   L017936
L0178DD     LDA   $DA
            CMP   #$0030
            BNE   L0178E6
            INC   $CA
L0178E6     STZ   $DE
            BRA   L01790B
L0178EA     LDA   $DA
            SEC
            SBC   #$0030
            PHA
            LDA   $DE
            PHA
            LDA   #$000A
            SEC
            JSL   L01715C
            PLA
            PLX
            STX   $EE
            CLC
            ADC   $EE
            STA   $DE
            INC   $F5
            BNE   L01790B
            INC   $F7
L01790B     LDA   [$F5]
            AND   #$00FF
            STA   $DA
            LDX   #$0000
            TAY
            BPL   L017919
            DEX
L017919     PHX
            PHA
            LDA   #L02BF27
            LDX   #^L02BF27
            JSL   L016FC0
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            AND   #$0004
            TAY
            BNE   L0178EA
L017936     LDA   [$F5]
            AND   #$00FF
            CMP   #$002E
            BEQ   L017948
            LDA   #$FFFF
            STA   $DC
            BRL   L0179DE
L017948     INC   $F5
            BNE   L01794E
            INC   $F7
L01794E     LDX   $F7
            LDA   $F5
            STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            CMP   #$002A
            BNE   L01798E
            LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0002
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFE
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDA   [$EA]
            STA   $DC
            INC   $F5
            BNE   L01798C
            INC   $F7
L01798C     BRA   L0179DE
L01798E     STZ   $DC
            BRA   L0179B3
L017992     LDA   $DA
            SEC
            SBC   #$0030
            PHA
            LDA   $DC
            PHA
            LDA   #$000A
            SEC
            JSL   L01715C
            PLA
            PLX
            STX   $EE
            CLC
            ADC   $EE
            STA   $DC
            INC   $F5
            BNE   L0179B3
            INC   $F7
L0179B3     LDA   [$F5]
            AND   #$00FF
            STA   $DA
            LDX   #$0000
            TAY
            BPL   L0179C1
            DEX
L0179C1     PHX
            PHA
            LDA   #L02BF27
            LDX   #^L02BF27
            JSL   L016FC0
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            AND   #$0004
            TAY
            BNE   L017992
L0179DE     STZ   $D4
            LDA   [$F5]
            AND   #$00FF
            BRL   L0179FF
L0179E8     INC   $D4
L0179EA     INC   $F5
            BNE   L0179F0
            INC   $F7
L0179F0     BRL   L017A10
L0179F3     DA    L0179EA
            DA    L0179F0
            DA    L0179F0
            DA    L0179F0
            DA    L0179E8
            DA    L0179F0
L0179FF     SEC
            SBC   #$0068
            CMP   #$0005
            BCC   L017A0B
            LDA   #$0005
L017A0B     ASL
            TAX
            JMP   (L0179F3,X)

L017A10     LDA   #L02BCD6
            LDX   #^L02BCD6
            STX   $77
            STA   $75
            LDA   #$0000
            SEP   #$20
            STA   $70
            REP   #$20
            LDX   #$0000
            TDC
            CLC
            ADC   #$0070
            STX   $73
            STA   $71
            LDA   #$0000
            STA   $D6
            STA   $D8
            LDX   $F7
            LDA   $F5
            INC   $F5
            BNE   L017A40
            INC   $F7
L017A40     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            STA   $DA
            BRL   L0185A7
L017A4E     LDA   #$0005
            STA   $4E
            BRL   L017A63
L017A56     LDA   #$0004
            STA   $4E
            BRL   L017A63
L017A5E     LDA   #$0008
            STA   $4E
L017A63     LDA   $DC
            SEC
            SBC   #$0000
            BVS   L017A6E
            EOR   #$8000
L017A6E     BMI   L017A8E
            LDA   $CA
            BEQ   L017A89
            LDA   $DE
            SEC
            SBC   #$0000
            BEQ   L017A89
            BVS   L017A81
            EOR   #$8000
L017A81     BPL   L017A89
            LDA   $DE
            STA   $DC
            BRA   L017A8E
L017A89     LDA   #$0001
            STA   $DC
L017A8E     LDA   $D4
            BEQ   L017AC2
            LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0004
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFC
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDY   #$0002
            LDA   [$EA],Y
            TAX
            LDA   [$EA]
            STX   $68
            STA   $66
            BRA   L017B25
L017AC2     LDA   $DA
            CMP   #$0064
            BNE   L017AFA
            LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0002
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFE
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDA   [$EA]
            LDX   #$0000
            TAY
            BPL   L017AF4
            DEX
L017AF4     STX   $68
            STA   $66
            BRA   L017B25
L017AFA     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0002
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFE
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDA   [$EA]
            LDX   #$0000
            STX   $68
            STA   $66
L017B25     LDA   $DA
            CMP   #$0064
            BEQ   L017B2F
            BRL   L017B9A
L017B2F     SEC
            LDA   $66
            SBC   #$0000
            BNE   L017B3E
            LDA   $68
            SBC   #$0000
            BRA   L017B45
L017B3E     LDA   $68
            SBC   #$0000
            REP   #$02
L017B45     BVS   L017B4A
            EOR   #$8000
L017B4A     BMI   L017B7C
            LDA   #L02BCD7
            LDX   #^L02BCD7
            STX   $77
            STA   $75
            SEC
            LDA   $66
            SBC   #$0000
            BNE   L017B65
            LDA   $68
            SBC   #$8000
            BRA   L017B6C
L017B65     LDA   $68
            SBC   #$8000
            REP   #$02
L017B6C     BEQ   L017B7A
            LDX   $68
            LDA   $66
            JSL   L018B52
            STX   $68
            STA   $66
L017B7A     BRA   L017B9A
L017B7C     LDA   $D2
            BEQ   L017B8C
            LDA   #L02BCD9
            LDX   #^L02BCD9
            STX   $77
            STA   $75
            BRA   L017B9A
L017B8C     LDA   $CE
            BEQ   L017B9A
            LDA   #L02BCDB
            LDX   #^L02BCDB
            STX   $77
            STA   $75
L017B9A     LDA   $DA
            CMP   #$0058
            BNE   L017BA9
            LDA   #L02BCDD
            LDX   #^L02BCDD
            BRA   L017BAF
L017BA9     LDA   #L02BCEE
            LDX   #^L02BCEE
L017BAF     STX   $56
            STA   $54
            LDX   #$0000
            TDC
            CLC
            ADC   #$0084
            STX   $E6
            STA   $E4
            STX   $E2
            STA   $E0
L017BC3     SEC
            LDA   $66
            SBC   #$0000
            BNE   L017BD2
            LDA   $68
            SBC   #$0000
            BRA   L017BD9
L017BD2     LDA   $68
            SBC   #$0000
            REP   #$02
L017BD9     BNE   L017BDE
            BRL   L017C80
L017BDE     LDX   $68
            LDA   $66
            AND   #$0001
            PHA
            TXA
            AND   #$0000
            TAX
            PLA
            STA   $4C
            LDX   #$0000
            LDA   #$0001
            PHX
            PHA
            LDX   $68
            LDA   $66
            SEC
            JSL   L018B09
            PLA
            PLX
            AND   #$FFFF
            PHA
            TXA
            AND   #$7FFF
            TAX
            PLA
            STX   $68
            STA   $66
            LDA   $4C
            LDX   #$0000
            TAY
            BPL   L017C18
            DEX
L017C18     PHX
            PHA
            LDA   $4E
            LDX   #$0000
            TAY
            BPL   L017C23
            DEX
L017C23     PHX
            PHA
            LDX   $68
            LDA   $66
            SEC
            JSL   L018C2A
            PLA
            PLX
            STX   $EE
            ASL
            ROL   $EE
            LDX   $EE
            JSL   L016FC0
            LDX   $56
            LDA   $54
            JSL   L016FC0
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   [$EA]
            PHA
            LDA   $E4
            BNE   L017C52
            DEC   $E6
L017C52     DEC   $E4
            LDX   $E6
            LDA   $E4
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            LDA   $4E
            LDX   #$0000
            TAY
            BPL   L017C6C
            DEX
L017C6C     PHX
            PHA
            LDX   $68
            LDA   $66
            SEC
            JSL   L018C2A
            PLY
            PLY
            STX   $68
            STA   $66
            BRL   L017BC3
L017C80     LDX   $E2
            LDA   $E0
            PHX
            PHA
            LDX   $E6
            LDA   $E4
            JSL   L017151
            PLA
            PLX
            CLC
            ADC   $DC
            STA   $D8
            LDA   $CC
            BNE   L017C9C
            BRL   L017CF8
L017C9C     SEC
            LDA   $E4
            SBC   $E0
            BNE   L017CA9
            LDA   $E6
            SBC   $E2
            BRA   L017CAF
L017CA9     LDA   $E6
            SBC   $E2
            REP   #$02
L017CAF     BNE   L017CB4
            BRL   L017CF8
L017CB4     LDA   $DA
            BRL   L017CE9
L017CB9     LDA   $D8
            SEC
            SBC   #$0001
            BVS   L017CC4
            EOR   #$8000
L017CC4     BMI   L017CCB
            LDA   #$0001
            STA   $D8
L017CCB     BRL   L017CF8
L017CCE     LDA   #L02BCFF
            LDX   #^L02BCFF
            STX   $77
            STA   $75
            BRL   L017CF8
L017CDB     LDA   #L02BD02
            LDX   #^L02BD02
            STX   $77
            STA   $75
            BRA   L017CF8
            BRA   L017CF8
L017CE9     CMP   #$0058
            BEQ   L017CDB
            CMP   #$006F
            BEQ   L017CB9
            CMP   #$0078
            BEQ   L017CCE
L017CF8     BRL   L0185BA
L017CFB     LDA   $DC
            SEC
            SBC   #$0000
            BVS   L017D06
            EOR   #$8000
L017D06     BMI   L017D0D
            LDA   #$0006
            STA   $DC
L017D0D     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$000A
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFF6
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDY   #$0008
            LDA   [$EA],Y
            PHA
            LDY   #$0006
            LDA   [$EA],Y
            PHA
            LDY   #$0004
            LDA   [$EA],Y
            PHA
            LDY   #$0002
            LDA   [$EA],Y
            PHA
            LDA   [$EA]
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$005C
            PHA
            JSL   L018A23
            PLY
            PLY
            PLY
            PLY
            PLY
L017D5C     PEA   $0000
            TDC
            CLC
            ADC   #$0058
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$005A
            PHA
            LDA   $DC
            CLC
            ADC   #$0001
            SEC
            SBC   #$0013
            BVS   L017D7D
            EOR   #$8000
L017D7D     BMI   L017D87
            LDA   $DC
            CLC
            ADC   #$0001
            BRA   L017D8A
L017D87     LDA   #$0013
L017D8A     PHA
            PEI   $64
            PEI   $62
            PEI   $60
            PEI   $5E
            PEI   $5C
            JSL   L019032
            TAY
            TSC
            CLC
            ADC   #$0014
            TCS
            TYA
            STX   $E6
            STA   $E4
L017DA5     LDA   $58
            BEQ   L017DB5
            LDA   #L02BD05
            LDX   #^L02BD05
            STX   $77
            STA   $75
            BRA   L017DD3
L017DB5     LDA   $D2
            BEQ   L017DC5
            LDA   #L02BD07
            LDX   #^L02BD07
            STX   $77
            STA   $75
            BRA   L017DD3
L017DC5     LDA   $CE
            BEQ   L017DD3
            LDA   #L02BD09
            LDX   #^L02BD09
            STX   $77
            STA   $75
L017DD3     LDX   #$0000
            TDC
            CLC
            ADC   #$0079
            STX   $E2
            STA   $E0
            LDA   [$E4]
            AND   #$00FF
            CMP   #$0049
            BEQ   L017DF3
            LDA   [$E4]
            AND   #$00FF
            CMP   #$004E
            BNE   L017DF6
L017DF3     BRL   L017F99
L017DF6     LDA   [$E4]
            AND   #$00FF
            CMP   #$0000
            BEQ   L017E15
            LDX   $E6
            LDA   $E4
            INC   $E4
            BNE   L017E0A
            INC   $E6
L017E0A     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            BRA   L017E18
L017E15     LDA   #$0030
L017E18     PHA
            LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L017E23
            INC   $E2
L017E23     STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            LDA   $DC
            CMP   #$0000
            BNE   L017E39
            LDA   $CC
            BEQ   L017E50
L017E39     LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L017E43
            INC   $E2
L017E43     STA   $EA
            STX   $EC
            LDA   #$002E
            SEP   #$20
            STA   [$EA]
            REP   #$20
L017E50     LDA   $DC
            STA   $D6
            BRA   L017E7E
L017E56     LDX   $E6
            LDA   $E4
            INC   $E4
            BNE   L017E60
            INC   $E6
L017E60     STA   $EA
            STX   $EC
            LDA   [$EA]
            PHA
            LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L017E71
            INC   $E2
L017E71     STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            DEC   $D6
L017E7E     LDA   $D6
            SEC
            SBC   #$0000
            BEQ   L017E97
            BVS   L017E8B
            EOR   #$8000
L017E8B     BPL   L017E97
            LDA   [$E4]
            AND   #$00FF
            CMP   #$0000
            BNE   L017E56
L017E97     LDX   #$0000
            TDC
            CLC
            ADC   #$0079
            STX   $E6
            STA   $E4
            LDA   $5A
            SEC
            SBC   #$0001
            STA   $50
            LDA   $50
            SEC
            SBC   #$0000
            BVS   L017EB6
            EOR   #$8000
L017EB6     BMI   L017EC0
            LDA   $50
            EOR   #$FFFF
            INC
            STA   $50
L017EC0     LDA   #$000A
            PHA
            LDA   $50
            SEC
            JSL   L017037
            PLA
            CLC
            ADC   #$0030
            PHA
            LDA   $71
            BNE   L017ED7
            DEC   $73
L017ED7     DEC   $71
            LDX   $73
            LDA   $71
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            LDA   #$000A
            PHA
            LDA   $50
            SEC
            JSL   L017037
            PLY
            STA   $50
            LDA   $50
            CMP   #$0000
            BNE   L017EC0
            LDX   #$0000
            TDC
            CLC
            ADC   #$0070
            SEC
            SBC   #$0002
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            PHX
            PHA
            LDX   $73
            LDA   $71
            JSL   L017652
            BVS   L017F1F
            EOR   #$8000
L017F1F     BPL   L017EC0
            LDA   $5A
            SEC
            SBC   #$0000
            BEQ   L017F35
            BVS   L017F2E
            EOR   #$8000
L017F2E     BPL   L017F35
            LDA   #$002B
            BRA   L017F38
L017F35     LDA   #$002D
L017F38     PHA
            LDA   $71
            BNE   L017F3F
            DEC   $73
L017F3F     DEC   $71
            LDX   $73
            LDA   $71
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            LDA   $DA
            LDX   #$0000
            TAY
            BPL   L017F59
            DEX
L017F59     PHX
            PHA
            LDA   #L02BF27
            LDX   #^L02BF27
            JSL   L016FC0
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            AND   #$0001
            TAY
            BEQ   L017F7B
            LDA   #$0045
            BRA   L017F7E
L017F7B     LDA   #$0065
L017F7E     PHA
            LDA   $71
            BNE   L017F85
            DEC   $73
L017F85     DEC   $71
            LDX   $73
            LDA   $71
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            BRL   L0185BA
L017F99     LDA   [$E4]
            AND   #$00FF
            CMP   #$0049
            BNE   L017FB8
            PEA   ^L02BD0B
            PEA   L02BD0B
            PEI   $E2
            PEI   $E0
            JSL   L018FE4
            PLY
            PLY
            PLY
            PLY
            BRL   L01804E
L017FB8     PEA   ^L02BD0F
            PEA   L02BD0F
            PEI   $E2
            PEI   $E0
            JSL   L018FE4
            PLY
            PLY
            PLY
            PLY
            LDY   #$0004
            LDA   [$E4],Y
            AND   #$00FF
            PHA
            JSL   L018BB9
            PLY
            PHA
            LDY   #$0003
            LDA   [$E4],Y
            AND   #$00FF
            PHA
            JSL   L018BB9
            PLY
            PHA
            LDA   #$0010
            SEC
            JSL   L01715C
            PLA
            PLX
            STX   $EE
            CLC
            ADC   $EE
            STA   $50
            LDA   #$0006
            STA   $52
            BRA   L018041
L018000     LDA   #$000A
            PHA
            LDA   $50
            SEC
            JSL   L017037
            PLA
            CLC
            ADC   #$0030
            PHA
            LDA   $52
            DEC   $52
            LDX   #$0000
            TAY
            BPL   L01801C
            DEX
L01801C     PHX
            PHA
            LDX   $E2
            LDA   $E0
            JSL   L016FC0
            PLA
            PLX
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            LDA   #$000A
            PHA
            LDA   $50
            SEC
            JSL   L017037
            PLY
            STA   $50
L018041     LDA   $52
            SEC
            SBC   #$0004
            BVS   L01804C
            EOR   #$8000
L01804C     BMI   L018000
L01804E     LDX   $E2
            LDA   $E0
            STX   $E6
            STA   $E4
            PEI   $E6
            PEI   $E4
            JSL   L018F92
            PLY
            PLY
            LDX   #$0000
            TAY
            BPL   L018067
            DEX
L018067     PHX
            PHA
            LDX   $E6
            LDA   $E4
            JSL   L016FC0
            PLA
            PLX
            STX   $E2
            STA   $E0
            BRL   L0185BA
L01807A     LDA   $DC
            SEC
            SBC   #$0000
            BVS   L018085
            EOR   #$8000
L018085     BMI   L01808C
            LDA   #$0006
            STA   $DC
L01808C     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$000A
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFF6
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDY   #$0008
            LDA   [$EA],Y
            PHA
            LDY   #$0006
            LDA   [$EA],Y
            PHA
            LDY   #$0004
            LDA   [$EA],Y
            PHA
            LDY   #$0002
            LDA   [$EA],Y
            PHA
            LDA   [$EA]
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$005C
            PHA
            JSL   L018A23
            PLY
            PLY
            PLY
            PLY
            PLY
            PEA   $0000
            TDC
            CLC
            ADC   #$0058
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$005A
            PHA
            PEI   $DC
            PEI   $64
            PEI   $62
            PEI   $60
            PEI   $5E
            PEI   $5C
            JSL   L01906A
            TAY
            TSC
            CLC
            ADC   #$0014
            TCS
            TYA
            STX   $E6
            STA   $E4
L018109     LDA   $58
            BEQ   L018119
            LDA   #L02BD18
            LDX   #^L02BD18
            STX   $77
            STA   $75
            BRA   L018137
L018119     LDA   $D2
            BEQ   L018129
            LDA   #L02BD1A
            LDX   #^L02BD1A
            STX   $77
            STA   $75
            BRA   L018137
L018129     LDA   $CE
            BEQ   L018137
            LDA   #L02BD1C
            LDX   #^L02BD1C
            STX   $77
            STA   $75
L018137     LDX   #$0000
            TDC
            CLC
            ADC   #$0079
            STX   $E2
            STA   $E0
            LDA   [$E4]
            AND   #$00FF
            CMP   #$0049
            BEQ   L018157
            LDA   [$E4]
            AND   #$00FF
            CMP   #$004E
            BNE   L01815A
L018157     BRL   L017F99
L01815A     LDA   $DC
            SEC
            SBC   #$0000
            BEQ   L018169
            BVS   L018167
            EOR   #$8000
L018167     BMI   L01816D
L018169     LDA   $CC
            BEQ   L018175
L01816D     LDA   #$0001
            CLC
            ADC   $DC
            BRA   L018178
L018175     LDA   #$0000
L018178     PHA
            LDA   [$75]
            AND   #$00FF
            CMP   #$0000
            BNE   L018188
            LDA   #$0000
            BRA   L01818B
L018188     LDA   #$0001
L01818B     CLC
            ADC   $5A
            PLX
            STX   $EE
            CLC
            ADC   $EE
            SEC
            SBC   #$0050
            BEQ   L0181A9
            BVS   L01819F
            EOR   #$8000
L01819F     BPL   L0181A9
            LDA   #$0012
            STA   $DC
            BRL   L017D5C
L0181A9     LDA   $5A
            STA   $50
L0181AD     LDA   $50
            SEC
            SBC   #$0000
            BEQ   L0181C6
            BVS   L0181BA
            EOR   #$8000
L0181BA     BPL   L0181C6
            LDA   [$E4]
            AND   #$00FF
            CMP   #$0000
            BNE   L0181CB
L0181C6     LDA   #$0030
            BRA   L0181DE
L0181CB     LDX   $E6
            LDA   $E4
            INC   $E4
            BNE   L0181D5
            INC   $E6
L0181D5     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
L0181DE     PHA
            LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L0181E9
            INC   $E2
L0181E9     STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            DEC   $50
            LDA   $50
            SEC
            SBC   #$0000
            BEQ   L018205
            BVS   L018203
            EOR   #$8000
L018203     BMI   L0181AD
L018205     LDA   $CC
            BNE   L018218
            LDA   $DC
            SEC
            SBC   #$0000
            BEQ   L01822F
            BVS   L018216
            EOR   #$8000
L018216     BPL   L01822F
L018218     LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L018222
            INC   $E2
L018222     STA   $EA
            STX   $EC
            LDA   #$002E
            SEP   #$20
            STA   [$EA]
            REP   #$20
L01822F     LDA   $DC
            STA   $50
L018233     DEC   $50
            LDA   $50
            SEC
            SBC   #$0000
            BVS   L018240
            EOR   #$8000
L018240     BPL   L01828D
            INC   $5A
            LDA   $5A
            SEC
            SBC   #$0000
            BEQ   L01825D
            BVS   L018251
            EOR   #$8000
L018251     BPL   L01825D
            LDA   [$E4]
            AND   #$00FF
            CMP   #$0000
            BNE   L018262
L01825D     LDA   #$0030
            BRA   L018275
L018262     LDX   $E6
            LDA   $E4
            INC   $E4
            BNE   L01826C
            INC   $E6
L01826C     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
L018275     PHA
            LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L018280
            INC   $E2
L018280     STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            BRA   L018233
L01828D     LDX   #$0000
            TDC
            CLC
            ADC   #$0079
            STX   $E6
            STA   $E4
            BRL   L0185BA
L01829C     LDA   $DC
            SEC
            SBC   #$0000
            BVS   L0182A7
            EOR   #$8000
L0182A7     BMI   L0182B0
            LDA   #$0006
            STA   $DC
            BRA   L0182BC
L0182B0     LDA   $DC
            CMP   #$0000
            BNE   L0182BC
            LDA   #$0001
            STA   $DC
L0182BC     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$000A
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFF6
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDY   #$0008
            LDA   [$EA],Y
            PHA
            LDY   #$0006
            LDA   [$EA],Y
            PHA
            LDY   #$0004
            LDA   [$EA],Y
            PHA
            LDY   #$0002
            LDA   [$EA],Y
            PHA
            LDA   [$EA]
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$005C
            PHA
            JSL   L018A23
            PLY
            PLY
            PLY
            PLY
            PLY
            PEA   $0000
            TDC
            CLC
            ADC   #$0058
            PHA
            PEA   $0000
            TDC
            CLC
            ADC   #$005A
            PHA
            LDA   $DC
            SEC
            SBC   #$0013
            BVS   L018328
            EOR   #$8000
L018328     BMI   L01832E
            LDA   $DC
            BRA   L018331
L01832E     LDA   #$0013
L018331     PHA
            PEI   $64
            PEI   $62
            PEI   $60
            PEI   $5E
            PEI   $5C
            JSL   L019032
            TAY
            TSC
            CLC
            ADC   #$0014
            TCS
            TYA
            STX   $E6
            STA   $E4
            LDA   $DC
            STA   $52
            LDA   $CC
            BNE   L0183A8
            PEI   $E6
            PEI   $E4
            JSL   L018F92
            PLY
            PLY
            STA   $50
            LDA   $50
            SEC
            SBC   $52
            BVS   L01836A
            EOR   #$8000
L01836A     BMI   L018370
            LDA   $50
            STA   $52
L018370     LDA   $52
            SEC
            SBC   #$0001
            BVS   L01837B
            EOR   #$8000
L01837B     BPL   L0183A8
            LDA   $52
            SEC
            SBC   #$0001
            LDX   #$0000
            TAY
            BPL   L01838A
            DEX
L01838A     PHX
            PHA
            LDX   $E6
            LDA   $E4
            JSL   L016FC0
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            CMP   #$0030
            BNE   L0183A8
            DEC   $52
            BRA   L018370
L0183A8     LDA   $5A
            SEC
            SBC   #$FFFD
            BVS   L0183B3
            EOR   #$8000
L0183B3     BPL   L0183C3
            LDA   $5A
            SEC
            SBC   $DC
            BEQ   L0183CE
            BVS   L0183C1
            EOR   #$8000
L0183C1     BPL   L0183CE
L0183C3     LDA   $52
            SEC
            SBC   #$0001
            STA   $DC
            BRL   L017DA5
L0183CE     LDA   $52
            SEC
            SBC   $5A
            STA   $DC
            BRL   L018109
L0183D8     LDA   $DA
            SEP   #$20
            STA   $79
            REP   #$20
            BRL   L01840D
L0183E3     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0002
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFE
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDA   [$EA]
            SEP   #$20
            STA   $79
            REP   #$20
L01840D     LDX   #$0000
            TDC
            CLC
            ADC   #$0079
            STX   $E6
            STA   $E4
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E2
            STA   $E0
            BRL   L0185BA
L01842B     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0004
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFC
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDY   #$0002
            LDA   [$EA],Y
            TAX
            LDA   [$EA]
            STX   $E6
            STA   $E4
            STX   $E2
            STA   $E0
            LDA   $DC
            SEC
            SBC   #$0000
            BVS   L018468
            EOR   #$8000
L018468     BMI   L01848D
            PEI   $E6
            PEI   $E4
            JSL   L018F92
            PLY
            PLY
            LDX   #$0000
            TAY
            BPL   L01847B
            DEX
L01847B     PHX
            PHA
            LDX   $E2
            LDA   $E0
            JSL   L016FC0
            PLA
            PLX
            STX   $E2
            STA   $E0
            BRA   L0184BE
L01848D     LDX   $E2
            LDA   $E0
            INC   $E0
            BNE   L018497
            INC   $E2
L018497     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            CMP   #$0000
            BEQ   L0184B6
            DEC   $DC
            LDA   $DC
            SEC
            SBC   #$0000
            BVS   L0184B2
            EOR   #$8000
L0184B2     BPL   L0184B6
            BRA   L01848D
L0184B6     LDA   $E0
            BNE   L0184BC
            DEC   $E2
L0184BC     DEC   $E0
L0184BE     BRL   L0185BA
L0184C1     LDX   $FB
            LDA   $F9
            CLC
            ADC   #$0004
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $FB
            STA   $F9
            CLC
            ADC   #$FFFC
            PHA
            TXA
            ADC   #$FFFF
            TAX
            PLA
            STA   $EA
            STX   $EC
            LDY   #$0002
            LDA   [$EA],Y
            TAX
            LDA   [$EA]
            STX   $E6
            STA   $E4
            STX   $E2
            STA   $E0
            LDA   $DC
            SEC
            SBC   #$0000
            BVS   L0184FE
            EOR   #$8000
L0184FE     BPL   L01850F
            LDA   [$E4]
            AND   #$00FF
            SEC
            SBC   $DC
            BVS   L01850D
            EOR   #$8000
L01850D     BMI   L018531
L01850F     LDA   [$E4]
            AND   #$00FF
            CLC
            ADC   #$0001
            LDX   #$0000
            TAY
            BPL   L01851F
            DEX
L01851F     PHX
            PHA
            LDX   $E2
            LDA   $E0
            JSL   L016FC0
            PLA
            PLX
            STX   $E2
            STA   $E0
            BRA   L01854E
L018531     LDA   $DC
            CLC
            ADC   #$0001
            LDX   #$0000
            TAY
            BPL   L01853E
            DEX
L01853E     PHX
            PHA
            LDX   $E2
            LDA   $E0
            JSL   L016FC0
            PLA
            PLX
            STX   $E2
            STA   $E0
L01854E     LDX   $E6
            LDA   $E4
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $E6
            STA   $E4
            BRL   L0185BA
L018564     LDA   #$FFFF
            BRL   L0189E6
            BRL   L0185BA
L01856D     DA    L018564
            DA    L017CFB
            DA    L01829C
            DA    L017A5E
            DA    L0183E3
            DA    L017A4E
            DA    L017CFB
            DA    L01807A
            DA    L01829C
            DA    L017A56
            DA    L0184C1
            DA    L01842B
            DA    L017A4E
            DA    L017A5E
            DA    L0183D8
L01858B     DW    $0000
            DW    $0045
            DW    $0047
            DW    $0058
            DW    $0063
            DW    $0064
            DW    $0065
            DW    $0066
            DW    $0067
            DW    $006F
            DW    $0070
            DW    $0073
            DW    $0075
            DW    $0078
L0185A7     TAX
            PEA   ^L01858B
            PEA   L01858B
            LDA   #$001A
            JSL   L018AC3
            PLA
            PLA
            JMP   (L01856D,X)

L0185BA     LDA   $D8
            SEC
            SBC   #$0000
            BVS   L0185C5
            EOR   #$8000
L0185C5     BMI   L0185C9
            STZ   $D8
L0185C9     LDA   $D6
            SEC
            SBC   #$0000
            BVS   L0185D4
            EOR   #$8000
L0185D4     BMI   L0185D8
            STZ   $D6
L0185D8     LDX   $73
            LDA   $71
            PHX
            PHA
            LDA   [$75]
            AND   #$00FF
            CMP   #$0000
            BNE   L0185ED
            LDA   #$0000
            BRA   L018602
L0185ED     LDY   #$0001
            LDA   [$75],Y
            AND   #$00FF
            CMP   #$0000
            BNE   L0185FF
            LDA   #$0001
            BRA   L018602
L0185FF     LDA   #$0002
L018602     PHA
            LDX   $E6
            LDA   $E4
            PHX
            PHA
            LDX   $E2
            LDA   $E0
            JSL   L017151
            PLA
            PLX
            STA   $50
            CLC
            ADC   $D8
            CLC
            ADC   $D6
            PLX
            STX   $EE
            CLC
            ADC   $EE
            LDX   #$0000
            TAY
            BPL   L018628
            DEX
L018628     PHX
            PHA
            LDX   #$0000
            TDC
            CLC
            ADC   #$0070
            JSL   L016FC0
            PLA
            PLX
            JSL   L017151
            PLA
            PLX
            STA   $52
            LDA   $DE
            SEC
            SBC   $52
            BEQ   L018652
            BVS   L01864C
            EOR   #$8000
L01864C     BPL   L018652
            LDA   $DE
            BRA   L018654
L018652     LDA   $52
L018654     PHA
            LDA   $E8
            PLX
            STX   $EE
            CLC
            ADC   $EE
            STA   $E8
            LDA   $D0
            BNE   L0186CC
L018663     DEC   $DE
            LDA   $DE
            SEC
            SBC   $52
            BVS   L01866F
            EOR   #$8000
L01866F     BPL   L0186CC
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L01867F
            EOR   #$8000
L01867F     BPL   L0186B8
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L01869F
            INC
L01869F     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   #$0020
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L0186CA
L0186B8     PEI   $FF
            PEI   $FD
            LDA   #$0020
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L0186CA     BRA   L018663
L0186CC     LDA   [$75]
            AND   #$00FF
            CMP   #$0000
            BEQ   L01874E
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L0186E4
            EOR   #$8000
L0186E4     BPL   L01872C
            LDX   $77
            LDA   $75
            INC   $75
            BNE   L0186F0
            INC   $77
L0186F0     STA   $EA
            STX   $EC
            LDA   [$EA]
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L018715
            INC
L018715     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L01874B
L01872C     PEI   $FF
            PEI   $FD
            LDX   $77
            LDA   $75
            INC   $75
            BNE   L01873A
            INC   $77
L01873A     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L01874B     BRL   L0186CC
L01874E     DEC   $D8
            LDA   $D8
            SEC
            SBC   #$0000
            BVS   L01875B
            EOR   #$8000
L01875B     BPL   L0187B8
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L01876B
            EOR   #$8000
L01876B     BPL   L0187A4
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L01878B
            INC
L01878B     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   #$0030
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L0187B6
L0187A4     PEI   $FF
            PEI   $FD
            LDA   #$0030
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L0187B6     BRA   L01874E
L0187B8     LDA   $50
            SEC
            SBC   #$0000
            BNE   L0187C3
            BRL   L01888E
L0187C3     BVS   L0187C8
            EOR   #$8000
L0187C8     BMI   L0187CD
            BRL   L01888E
L0187CD     LDA   $50
            CMP   #$0001
            BNE   L01882F
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L0187E2
            EOR   #$8000
L0187E2     BPL   L01881C
            LDA   [$E4]
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L018805
            INC
L018805     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L01882D
L01881C     PEI   $FF
            PEI   $FD
            LDA   [$E4]
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L01882D     BRA   L01888E
L01882F     LDY   #$0012
            LDA   [$FD],Y
            CMP   #$0014
            BNE   L018875
            LDA   $50
            LDX   #$0000
            TAY
            BPL   L018842
            DEX
L018842     PHX
            PHA
            PEI   $50
            PEI   $E6
            PEI   $E4
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            JSL   L018B61
            PLY
            PLY
            PLY
            PLY
            PLY
            JSL   L016FC0
            PLA
            PLX
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            BRA   L01888E
L018875     PEI   $FF
            PEI   $FD
            PEI   $50
            PEA   $0001
            PEI   $E6
            PEI   $E4
            JSL   L018D1B
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
L01888E     DEC   $D6
            LDA   $D6
            SEC
            SBC   #$0000
            BVS   L01889B
            EOR   #$8000
L01889B     BPL   L0188F8
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L0188AB
            EOR   #$8000
L0188AB     BPL   L0188E4
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L0188CB
            INC
L0188CB     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   #$0030
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L0188F6
L0188E4     PEI   $FF
            PEI   $FD
            LDA   #$0030
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L0188F6     BRA   L01888E
L0188F8     LDA   [$71]
            AND   #$00FF
            CMP   #$0000
            BEQ   L01897A
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L018910
            EOR   #$8000
L018910     BPL   L018958
            LDX   $73
            LDA   $71
            INC   $71
            BNE   L01891C
            INC   $73
L01891C     STA   $EA
            STX   $EC
            LDA   [$EA]
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L018941
            INC
L018941     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            PLA
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L018977
L018958     PEI   $FF
            PEI   $FD
            LDX   $73
            LDA   $71
            INC   $71
            BNE   L018966
            INC   $73
L018966     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L018977     BRL   L0188F8
L01897A     DEC   $DE
            LDA   $DE
            SEC
            SBC   $52
            BVS   L018986
            EOR   #$8000
L018986     BPL   L0189E3
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L018996
            EOR   #$8000
L018996     BPL   L0189CF
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L0189B6
            INC
L0189B6     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $EA
            STX   $EC
            LDA   #$0020
            SEP   #$20
            STA   [$EA]
            REP   #$20
            AND   #$00FF
            BRA   L0189E1
L0189CF     PEI   $FF
            PEI   $FD
            LDA   #$0020
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L0189E1     BRA   L01897A
L0189E3     BRL   L017720
L0189E6     TAY
            TDC
            CLC
            ADC   #$00EF
            TCS
            TYA
            PLD
            RTL

L0189F0     TSC
            TCD
            LDA   [$04]
            TAX
            LDA   $04,S
            TAY
            LDA   $06,S
            TCD
            LDA   $08,S
            TXS
            PHA
            PHA
            PHD
            PHY
            TSC
            TCD
            LDY   #$0002
            LDA   [$01],Y
            TAX
            INY
            INY
            LDA   [$01],Y
            STA   $08,S
            INY
            INY
            LDA   [$01],Y
            STA   $0A,S
            PLA
            PLA
            PLA
            PLY
            CMP   #$0000
            BNE   L018A20
            INC
L018A20     PHX
            PLD
            RTL

L018A23     TSC
            CLC
            ADC   #$0008
            PEA   $0000
            PHA
            LDA   $0A,S
            PHA
            LDA   $0A,S
            PHA
            PEA   $0010
            _SANEFP816
            LDA   $02,S
            STA   $06,S
            LDA   $00,S
            STA   $04,S
            PLY
            PLY
            RTL

L018A47     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E6
            TCS
            LDX   $FF
            LDA   $FD
            STX   $EA
            STA   $E8
            LDX   $FF
            LDA   $FD
            STX   $F2
            ORA   $F2
            BEQ   L018AB5
            LDX   $FF
            LDA   $FD
            INC   $FD
            BNE   L018A6E
            INC   $FF
L018A6E     STX   $EE
            STA   $EC
            STA   $F2
            STX   $F4
            LDA   [$F2]
            AND   #$00FF
            STA   $F0
            BRA   L018AA5
L018A7F     LDX   $FF
            LDA   $FD
            INC   $FD
            BNE   L018A89
            INC   $FF
L018A89     STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            LDX   $EE
            LDA   $EC
            INC   $EC
            BNE   L018A9A
            INC   $EE
L018A9A     STA   $F2
            STX   $F4
            PLA
            SEP   #$20
            STA   [$F2]
            REP   #$20
L018AA5     LDA   $F0
            DEC   $F0
            TAY
            BNE   L018A7F
            LDA   #$0000
            SEP   #$20
            STA   [$EC]
            REP   #$20
L018AB5     LDX   $EA
            LDA   $E8
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L018AC3     TAY
            PHB
            LDA   $06,S
            PHA
            PLB
            PLB
            PHY
            PHY
            PEA   $0000
            TXA
            CMP   ($0B,S),Y
            BEQ   L018B03
            LDY   #$0000
            CMP   ($0B,S),Y
            BEQ   L018B03
            BRA   L018AE0
L018ADD     TYA
            STA   $03,S
L018AE0     LDA   $03,S
            CMP   $01,S
            BEQ   L018AFE
            CLC
            ADC   $01,S
            LSR
            AND   #$00FE
            CMP   $01,S
            BEQ   L018AFE
            TAY
            TXA
            CMP   ($0B,S),Y
            BEQ   L018B03
            BCC   L018ADD
            TYA
            STA   $01,S
            BRA   L018AE0
L018AFE     LDA   $05,S
            INC
            INC
            TAY
L018B03     TYX
            PLA
            PLA
            PLA
            PLB
            RTL

L018B09     ENT
            BCC   L018B2B
            PHD
            PHX
            PHA
            TSC
            TCD
            LDX   $0A
            LDA   $0C
            BEQ   L018B19
            LDX   #$0021
L018B19     TXY
            BEQ   L018B46
            LDA   $03
            BPL   L018B3C
L018B20     SEC
            ROR
            ROR   $01
            DEX
            BNE   L018B20
            STA   $03
            BRA   L018B46
L018B2B     PHD
            PHX
            PHA
            TSC
            TCD
            LDX   $0A
            LDA   $0C
            BEQ   L018B39
            LDX   #$0021
L018B39     TXY
            BEQ   L018B46
L018B3C     LDA   $03
L018B3E     LSR
            ROR   $01
            DEX
            BNE   L018B3E
            STA   $03
L018B46     LDA   $03
            STA   $0C
            LDA   $01
            STA   $0A
            PLY
            PLY
            PLD
            RTL

L018B52     PHA
            TXA
            EOR   #$FFFF
            TAX
            PLA
            EOR   #$FFFF
            INC
            BNE   L018B60
            INX
L018B60     RTL

L018B61     PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00E6
            TCS
            LDX   $F9
            LDA   $F7
            STX   $EA
            STA   $E8
L018B74     DEC   $FF
            LDA   $FF
            SEC
            SBC   #$0000
            BVS   L018B81
            EOR   #$8000
L018B81     BPL   L018BAB
            LDX   $FD
            LDA   $FB
            INC   $FB
            BNE   L018B8D
            INC   $FD
L018B8D     STA   $EC
            STX   $EE
            LDA   [$EC]
            PHA
            LDX   $F9
            LDA   $F7
            INC   $F7
            BNE   L018B9E
            INC   $F9
L018B9E     STA   $EC
            STX   $EE
            PLA
            SEP   #$20
            STA   [$EC]
            REP   #$20
            BRA   L018B74
L018BAB     LDX   $EA
            LDA   $E8
            TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L018BB9     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            AND   #$00FF
            LDX   #$0000
            PHX
            PHA
            LDA   #L02BF27
            LDX   #^L02BF27
            JSL   L016FC0
            PLA
            PLX
            STA   $F4
            STX   $F6
            LDA   [$F4]
            AND   #$00FF
            AND   #$0080
            TAY
            BEQ   L018C1D
            LDA   $FF
            AND   #$00FF
            SEC
            SBC   #$0039
            BEQ   L018BFB
            BVS   L018BF9
            EOR   #$8000
L018BF9     BMI   L018C06
L018BFB     LDA   $FF
            AND   #$00FF
            SEC
            SBC   #$0030
            BRA   L018C19
L018C06     LDA   $FF
            AND   #$00FF
            PHA
            JSL   L019365
            PLY
            SEC
            SBC   #$0061
            CLC
            ADC   #$000A
L018C19     BRA   L018C20
            BRA   L018C20
L018C1D     LDA   #$FFFF
L018C20     TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L018C2A     PHD
            PHX
            PHA
            PEA   $0000
            PEA   $0001
            PEA   $0000
            PEA   $0000
            TSC
            TCD
            LDA   $12
            ORA   $14
            BNE   L018C47
            LDX   #$0000
            BRL   L018D0B
L018C47     LDX   #$0000
            BCC   L018C7F
            LDA   $14
            BIT   #$8000
            BEQ   L018C65
            EOR   #$FFFF
            STA   $14
            LDA   $12
            EOR   #$FFFF
            INC
            BNE   L018C62
            INC   $14
L018C62     STA   $12
            INX
L018C65     LDA   $0B
            BIT   #$8000
            BEQ   L018C7F
            EOR   #$FFFF
            STA   $0B
            LDA   $09
            EOR   #$FFFF
            INC
            BNE   L018C7B
            INC   $0B
L018C7B     STA   $09
            INX
            INX
L018C7F     BRA   L018C85
L018C81     ASL   $05
            ROL   $07
L018C85     ASL   $12
            ROL   $14
            BCC   L018C81
            ROR   $14
            ROR   $12
L018C8F     LDA   $0B
            CMP   $14
            BEQ   L018C99
            BCC   L018CB8
            BRA   L018C9F
L018C99     LDA   $09
            CMP   $12
            BCC   L018CB8
L018C9F     LDA   $09
            SEC
            SBC   $12
            STA   $09
            LDA   $0B
            SBC   $14
            STA   $0B
            LDA   $01
            ORA   $05
            STA   $01
            LDA   $03
            ORA   $07
            STA   $03
L018CB8     LSR   $14
            ROR   $12
            LSR   $07
            ROR   $05
            BCC   L018C8F
            CPX   #$0000
            BEQ   L018CF7
            CPX   #$0003
            BEQ   L018CE4
            LDA   $01
            EOR   #$FFFF
            STA   $01
            LDA   $03
            EOR   #$FFFF
            INC   $01
            BNE   L018CDD
            INC
L018CDD     STA   $03
            CPX   #$0001
            BEQ   L018CF7
L018CE4     LDA   $09
            EOR   #$FFFF
            STA   $09
            LDA   $0B
            EOR   #$FFFF
            INC   $09
            BNE   L018CF5
            INC
L018CF5     STA   $0B
L018CF7     LDA   $09
            STA   $12
            LDA   $0B
            STA   $14
            LDA   $01
            LDX   $03
            PLY
            PLY
            PLY
            PLY
            PLY
            PLY
            PLD
            RTL

L018D0B     PEA   $0004
            PEA   $0000
            PEA   $0000
            _SysFailMgr
L018D1B     PHD
            TSC
            SEC
            SBC   #$00EF
            TCD
            ADC   #$00DC
            TCS
            LDA   $F9
            SEC
            SBC   #$0000
            BNE   L018D31
            BRL   L018DAF
L018D31     BVS   L018D36
            EOR   #$8000
L018D36     BPL   L018DAF
            LDA   $FB
            SEC
            SBC   #$0000
            BEQ   L018DAF
            BVS   L018D45
            EOR   #$8000
L018D45     BPL   L018DAF
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0012
            CMP   #$0002
            BNE   L018D9D
            LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L017652
            BEQ   L018D9D
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017652
            BNE   L018DA9
            LDA   [$FD]
            CMP   #$0000
            BNE   L018DA9
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0044
            TAY
            BNE   L018DA9
L018D9D     PEI   $FF
            PEI   $FD
            JSL   L019280
            PLY
            PLY
            BRA   L018DAC
L018DA9     LDA   #$0000
L018DAC     TAY
            BEQ   L018DB5
L018DAF     LDA   #$0000
            BRL   L018F88
L018DB5     LDA   $F9
            PHA
            LDA   $FB
            SEC
            JSL   L01715C
            PLA
            STA   $E8
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0044
            TAY
            BNE   L018DD0
            BRL   L018E55
L018DD0     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0004
            TAY
            BEQ   L018DF3
            PEI   $E8
            PEI   $F7
            PEI   $F5
            LDY   #$0012
            LDA   [$FD],Y
            PHA
            JSL   L0193A0
            PLY
            PLY
            PLY
            PLY
            STA   $E6
            BRA   L018E25
L018DF3     STZ   $E6
            BRA   L018E1F
L018DF7     PEI   $FF
            PEI   $FD
            LDX   $F7
            LDA   $F5
            INC   $F5
            BNE   L018E05
            INC   $F7
L018E05     STA   $EA
            STX   $EC
            LDA   [$EA]
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
            CMP   #$FFFF
            BNE   L018E1D
            BRA   L018E25
L018E1D     INC   $E6
L018E1F     LDA   $E6
            CMP   $E8
            BCC   L018DF7
L018E25     LDA   $E6
            SEC
            SBC   #$0000
            BVS   L018E30
            EOR   #$8000
L018E30     BMI   L018E3A
            LDA   #$0000
            BRL   L018F88
            BRA   L018E55
L018E3A     LDA   $E6
            CMP   $E8
            BNE   L018E47
            LDA   $FB
            BRL   L018F88
            BRA   L018E55
L018E47     LDA   $F9
            PHA
            LDA   $E6
            SEC
            JSL   L017037
            PLY
            BRL   L018F88
L018E55     LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            STX   $E0
            STA   $DE
L018E64     LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            STX   $E4
            STA   $E2
            PHX
            PHA
            LDX   $E0
            LDA   $DE
            JSL   L017151
            PLA
            PLX
            STA   $E6
            SEC
            SBC   #$0000
            BEQ   L018E8E
            BVS   L018E8C
            EOR   #$8000
L018E8C     BMI   L018EBD
L018E8E     PEI   $FF
            PEI   $FD
            JSL   L019819
            PLY
            PLY
            CMP   #$FFFF
            BNE   L018EBB
            LDA   $F9
            PHA
            LDA   $E8
            CLC
            ADC   $F9
            SEC
            SBC   #$0001
            CLC
            JSL   L017037
            PLY
            PHA
            LDA   $FB
            PLX
            STX   $EE
            SEC
            SBC   $EE
            BRL   L018F88
L018EBB     BRA   L018E64
L018EBD     LDA   $E6
            CMP   $E8
            BEQ   L018EC9
            BCC   L018EC9
            LDA   $E8
            BRA   L018ECB
L018EC9     LDA   $E6
L018ECB     STA   $E6
            PEI   $E6
            PEI   $F7
            PEI   $F5
            PEI   $E4
            PEI   $E2
            JSL   L018B61
            PLY
            PLY
            PLY
            PLY
            PLY
            LDA   [$FD]
            SEC
            SBC   $E6
            STA   [$FD]
            LDA   $E6
            LDX   #$0000
            TAY
            BPL   L018EF0
            DEX
L018EF0     PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L016FC0
            PLA
            PLX
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            JSL   L017151
            PLA
            PLX
            PHA
            LDA   [$FD]
            SEC
            SBC   #$0000
            BVS   L018F3A
            EOR   #$8000
L018F3A     BMI   L018F41
            LDA   #$0000
            BRA   L018F43
L018F41     LDA   [$FD]
L018F43     PLX
            STX   $EA
            SEC
            SBC   $EA
            BEQ   L018F5C
            BVS   L018F50
            EOR   #$8000
L018F50     BPL   L018F5C
            PEI   $FF
            PEI   $FD
            JSL   L0197AD
            PLY
            PLY
L018F5C     LDA   $E8
            SEC
            SBC   $E6
            STA   $E8
            CMP   #$0000
            BNE   L018F6C
            LDA   $FB
            BRA   L018F88
L018F6C     LDA   $E6
            LDX   #$0000
            TAY
            BPL   L018F75
            DEX
L018F75     PHX
            PHA
            LDX   $F7
            LDA   $F5
            JSL   L016FC0
            PLA
            PLX
            STX   $F7
            STA   $F5
            BRL   L018E64
L018F88     TAY
            TDC
            CLC
            ADC   #$00EF
            TCS
            TYA
            PLD
            RTL

L018F92     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EC
            TCS
            LDX   $FF
            LDA   $FD
            CLC
            ADC   #$0001
            PHA
            TXA
            ADC   #$0000
            TAX
            PLA
            STX   $F0
            STA   $EE
L018FB0     LDX   $FF
            LDA   $FD
            INC   $FD
            BNE   L018FBA
            INC   $FF
L018FBA     STA   $F2
            STX   $F4
            LDA   [$F2]
            AND   #$00FF
            CMP   #$0000
            BEQ   L018FCA
            BRA   L018FB0
L018FCA     LDX   $F0
            LDA   $EE
            PHX
            PHA
            LDX   $FF
            LDA   $FD
            JSL   L017151
            PLA
            PLX
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L018FE4     ENT
            PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00E8
            TCS
            LDX   $FB
            LDA   $F9
            STX   $EC
            STA   $EA
L018FF7     LDX   $FF
            LDA   $FD
            INC   $FD
            BNE   L019001
            INC   $FF
L019001     STA   $EE
            STX   $F0
            LDA   [$EE]
            PHA
            LDX   $FB
            LDA   $F9
            INC   $F9
            BNE   L019012
            INC   $FB
L019012     STA   $EE
            STX   $F0
            PLA
            SEP   #$20
            STA   [$EE]
            REP   #$20
            AND   #$00FF
            BEQ   L019024
            BRA   L018FF7
L019024     LDX   $EC
            LDA   $EA
            TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L019032     PHD
            TSC
            SEC
            SBC   #$00E7
            TCD
            ADC   #$00E0
            TCS
            PEA   $0000
            PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEI   $F5
            PEI   $F3
            PEI   $F1
            PEI   $EF
            PEI   $ED
            JSL   L0196D8
            TAY
            TSC
            CLC
            ADC   #$0016
            TCS
            TYA
            TAY
            TDC
            CLC
            ADC   #$00E7
            TCS
            TYA
            PLD
            RTL

L01906A     PHD
            TSC
            SEC
            SBC   #$00E7
            TCD
            ADC   #$00E0
            TCS
            PEA   $0001
            PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEI   $F5
            PEI   $F3
            PEI   $F1
            PEI   $EF
            PEI   $ED
            JSL   L0196D8
            TAY
            TSC
            CLC
            ADC   #$0016
            TCS
            TYA
            TAY
            TDC
            CLC
            ADC   #$00E7
            TCS
            TYA
            PLD
            RTL

L0190A2     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00ED
            TCS
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0052
            CMP   #$0042
            BEQ   L0190BD
            BRL   L019142
L0190BD     LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017652
            BEQ   L0190E2
            BVS   L0190E0
            EOR   #$8000
L0190E0     BMI   L0190E5
L0190E2     BRL   L019191
L0190E5     LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L019103
            INC
L019103     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $F0
            STX   $F2
            LDA   $FB
            SEP   #$20
            STA   [$F0]
            REP   #$20
            AND   #$00FF
            CMP   #$000A
            BEQ   L019126
            LDA   $FB
            AND   #$00FF
            BRL   L019276
L019126     PEI   $FF
            PEI   $FD
            JSL   L019819
            PLY
            PLY
            CMP   #$FFFF
            BNE   L01913A
            LDA   #$FFFF
            BRA   L01913F
L01913A     LDA   $FB
            AND   #$00FF
L01913F     BRL   L019276
L019142     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0016
            CMP   #$0006
            BNE   L019191
            LDA   $FB
            SEP   #$20
            STA   $EF
            REP   #$20
            PEA   $0001
            PEA   $0000
            TDC
            CLC
            ADC   #$00EF
            PHA
            LDY   #$0012
            LDA   [$FD],Y
            PHA
            JSL   L0193A0
            PLY
            PLY
            PLY
            PLY
            CMP   #$0001
            BNE   L01917E
            LDA   $FB
            AND   #$00FF
            BRL   L019276
L01917E     LDY   #$0010
            LDA   [$FD],Y
            ORA   #$0020
            LDY   #$0010
            STA   [$FD],Y
            LDA   #$FFFF
            BRL   L019276
L019191     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0012
            CMP   #$0002
            BNE   L0191E7
            LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L017652
            BEQ   L0191E7
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017652
            BNE   L0191F3
            LDA   [$FD]
            CMP   #$0000
            BNE   L0191F3
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0044
            TAY
            BNE   L0191F3
L0191E7     PEI   $FF
            PEI   $FD
            JSL   L019280
            PLY
            PLY
            BRA   L0191F6
L0191F3     LDA   #$0000
L0191F6     TAY
            BEQ   L0191FE
            LDA   #$FFFF
            BRA   L019276
L0191FE     PEI   $FF
            PEI   $FD
            JSL   L019819
            PLY
            PLY
            LDA   [$FD]
            DEC
            STA   [$FD]
            SEC
            SBC   #$0000
            BVS   L019216
            EOR   #$8000
L019216     BPL   L019250
            LDA   $FB
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0004
            LDA   [$FD],Y
            BCC   L019239
            INC
L019239     LDY   #$0004
            STA   [$FD],Y
            PLA
            PLX
            STA   $F0
            STX   $F2
            PLA
            SEP   #$20
            STA   [$F0]
            REP   #$20
            AND   #$00FF
            BRA   L019261
L019250     PEI   $FF
            PEI   $FD
            LDA   $FB
            AND   #$00FF
            PHA
            JSL   L0190A2
            PLY
            PLY
            PLY
L019261     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0020
            TAY
            BEQ   L019271
            LDA   #$FFFF
            BRA   L019276
L019271     LDA   $FB
            AND   #$00FF
L019276     TAY
            TDC
            CLC
            ADC   #$00F5
            TCS
            TYA
            PLD
            RTL

L019280     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0012
            CMP   #$0002
            BEQ   L0192B9
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0082
            TAY
            BNE   L0192A9
            LDA   #$FFFF
            BRL   L01935B
L0192A9     LDY   #$0010
            LDA   [$FD],Y
            AND   #$FFEF
            ORA   #$0002
            LDY   #$0010
            STA   [$FD],Y
L0192B9     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017652
            BNE   L0192DC
            PEI   $FF
            PEI   $FD
            JSL   L019482
            PLY
            PLY
L0192DC     LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017652
            BNE   L019358
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0044
            TAY
            BNE   L019358
            LDY   #$000E
            LDA   [$FD],Y
            STA   [$FD]
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            JSL   L017151
            PLA
            PLX
            PHA
            LDA   [$FD]
            SEC
            SBC   #$0000
            BVS   L019336
            EOR   #$8000
L019336     BMI   L01933D
            LDA   #$0000
            BRA   L01933F
L01933D     LDA   [$FD]
L01933F     PLX
            STX   $F2
            SEC
            SBC   $F2
            BEQ   L019358
            BVS   L01934C
            EOR   #$8000
L01934C     BPL   L019358
            PEI   $FF
            PEI   $FD
            JSL   L0197AD
            PLY
            PLY
L019358     LDA   #$0000
L01935B     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019365     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F2
            TCS
            LDA   $FF
            SEC
            SBC   #$0041
            BVS   L01937B
            EOR   #$8000
L01937B     BPL   L019394
            LDA   $FF
            SEC
            SBC   #$005A
            BEQ   L01938C
            BVS   L01938A
            EOR   #$8000
L01938A     BMI   L019394
L01938C     LDA   $FF
            SEC
            SBC   #$FFE0
            STA   $FF
L019394     LDA   $FF
            TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L0193A0     ENT
            PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00E6
            TCS
            LDA   $F9
            SEC
            SBC   #$0000
            BVS   L0193B6
            EOR   #$8000
L0193B6     BMI   L0193CA
            PEA   $0000
            PEA   $0016
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRL   L019478
L0193CA     PEA   $0000
            TDC
            CLC
            ADC   #$00F9
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $EC
            STA   $EA
            LDA   $EA
            CMP   #$0000
            BNE   L0193F1
            LDA   $EC
            CMP   #$0000
            BNE   L0193F1
            LDA   #$FFFF
            BRL   L019478
L0193F1     LDA   [$EA]
            AND   #$0002
            TAY
            BNE   L01940A
            PEA   $0000
            PEA   $0009
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRA   L019478
L01940A     LDA   $FF
            LDY   #$000C
            STA   [$EA],Y
            LDX   $FD
            LDA   $FB
            LDY   #$0010
            PHA
            TXA
            STA   [$EA],Y
            PLA
            LDY   #$000E
            STA   [$EA],Y
            PEI   $EC
            PEI   $EA
            LDY   #$0006
            LDA   [$EA],Y
            TAX
            LDY   #$0004
            LDA   [$EA],Y
            STA   $EE
            STX   $F0
            LDY   #$0012
            LDA   [$EE],Y
            TAX
            LDY   #$0010
            LDA   [$EE],Y
            STA   $EE
            STX   $F0
            LDA   $EE
            LDX   $F0
            JSL   L0174BF
            PLY
            PLY
            STA   $E8
            LDA   $E8
            CMP   #$0000
            BEQ   L01946A
            LDY   #$0002
            LDA   [$EA],Y
            PHA
            PEI   $E8
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRA   L019478
L01946A     LDY   #$000C
            LDA   [$EA],Y
            PHA
            LDA   $FF
            PLX
            STX   $F2
            SEC
            SBC   $F2
L019478     TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L019482     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EA
            TCS
            LDA   L0600AD
            STA   $F0
            LDA   L060002
            STA   $EE
            LDA   L0600D3
            BEQ   L0194AB
            STZ   L0600D3
            PEA   ^L019684
            PEA   L019684
            JSL   L019A82
            PLY
            PLY
L0194AB     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0004
            TAY
            BEQ   L0194D4
            LDA   #$0000
            LDY   #$000E
            STA   [$FD],Y
            LDX   #$0000
            LDA   #$0000
            LDY   #$0008
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0006
            STA   [$FD],Y
            BRL   L019605
L0194D4     LDY   #$000E
            LDA   [$FD],Y
            CMP   #$0000
            BNE   L01953C
            LDX   #$0000
            LDA   #$0000
            LDY   #$0008
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0006
            STA   [$FD],Y
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0040
            TAY
            BEQ   L019506
            LDA   #$0064
            LDY   #$000E
            STA   [$FD],Y
            BRA   L01953C
L019506     PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            PEA   $6603
            LDY   #$0012
            LDA   [$FD],Y
            PHA
            JSL   L01A15F
            PLY
            PLY
            PLY
            PLY
            SEC
            SBC   #$0000
            BVS   L019529
            EOR   #$8000
L019529     BPL   L019534
            LDA   $EC
            LDY   #$000E
            STA   [$FD],Y
            BRA   L01953C
L019534     LDA   #$0400
            LDY   #$000E
            STA   [$FD],Y
L01953C     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L017652
            BEQ   L019558
            BRL   L019605
L019558     LDY   #$000E
            LDA   [$FD],Y
            LDX   #$0000
            PHX
            PHA
            JSL   L0174E5
            PLY
            PLY
            LDY   #$0008
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0006
            STA   [$FD],Y
            LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L017652
            BNE   L0195D0
            LDY   #$000E
            LDA   [$FD],Y
            CMP   #$0064
            BEQ   L0195D0
            BCC   L0195D0
            LDY   #$000E
            LDA   [$FD],Y
            CMP   #$0400
            BEQ   L0195AB
            BCC   L0195AB
            LDA   #$0400
            BRA   L0195AE
L0195AB     LDA   #$0064
L0195AE     LDY   #$000E
            STA   [$FD],Y
            LDY   #$000E
            LDA   [$FD],Y
            LDX   #$0000
            PHX
            PHA
            JSL   L0174E5
            PLY
            PLY
            LDY   #$0008
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0006
            STA   [$FD],Y
L0195D0     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L017652
            BEQ   L0195F8
            LDY   #$0010
            LDA   [$FD],Y
            ORA   #$0008
            LDY   #$0010
            STA   [$FD],Y
            BRA   L019605
L0195F8     LDY   #$0010
            LDA   [$FD],Y
            ORA   #$0004
            LDY   #$0010
            STA   [$FD],Y
L019605     LDY   #$000E
            LDA   [$FD],Y
            LDX   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L016FC0
            PLA
            PLX
            LDY   #$000C
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$000A
            STA   [$FD],Y
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            PEA   $0000
            PEA   $6602
            LDY   #$0012
            LDA   [$FD],Y
            PHA
            JSL   L01A15F
            PLY
            PLY
            PLY
            SEC
            SBC   #$0000
            BVS   L019661
            EOR   #$8000
L019661     BPL   L019670
            LDY   #$0010
            LDA   [$FD],Y
            ORA   #$0100
            LDY   #$0010
            STA   [$FD],Y
L019670     LDA   $F0
            STA   L0600AD
            LDA   $EE
            STA   L060002
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019684     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F0
            TCS
            LDA   #L02C027
            LDX   #^L02C027
            STX   $F4
            STA   $F2
            BRA   L0196B1
L01969B     PEI   $F4
            PEI   $F2
            JSL   L019903
            PLY
            PLY
            LDA   $F2
            CLC
            ADC   #$0014
            STA   $F2
            BCC   L0196B1
            INC   $F4
L0196B1     SEC
            LDA   $F2
            SBC   L0600C5
            BNE   L0196C0
            LDA   $F4
            SBC   L0600C5+2
            BRA   L0196C7
L0196C0     LDA   $F4
            SBC   L0600C5+2
            REP   #$02
L0196C7     BVS   L0196CC
            EOR   #$8000
L0196CC     BPL   L01969B
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L0196D8     PHD
            TSC
            SEC
            SBC   #$00E5
            TCD
            ADC   #$00DA
            TCS
            LDA   $FF
            STA   $DC
            LDA   $F5
            STA   $DE
            PEA   ^L02C1B7
            PEA   L02C1B7
            PEI   $F3
            PEI   $F1
            PEI   $EF
            PEI   $ED
            PEI   $EB
            PEA   $0000
            TDC
            CLC
            ADC   #$00DC
            PHA
            JSL   L019B18
            TAY
            TSC
            CLC
            ADC   #$0012
            TCS
            TYA
            LDAL  L02C1BC
            AND   #$00FF
            BRL   L01975B
L01971A     BRL   L019772
L01971D     PEA   $0000
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            PEA   $0013
            PEI   $F3
            PEI   $F1
            PEI   $EF
            PEI   $ED
            PEI   $EB
            JSL   L0196D8
            TAY
            TSC
            CLC
            ADC   #$0016
            TCS
            TYA
            BRL   L0197A3
L019744     LDA   #$0000
            STAL  L02C1B9
L01974B     LDAL  L02C1BB
            AND   #$00FF
            CLC
            ADCL  L02C1B9
            STA   [$F7]
            BRA   L019772
L01975B     CMP   #$0030
            BEQ   L019744
            CMP   #$003F
            BEQ   L01971D
            CMP   #$0049
            BEQ   L01971A
            CMP   #$004E
            BEQ   L01971A
            JMP   L01974B

L019772     LDAL  L02C1B7
            STA   [$FB]
            LDAL  L02C1BB
            AND   #$00FF
            LDX   #$0000
            PHX
            PHA
            LDA   #L02C1BC
            LDX   #^L02C1BC
            JSL   L016FC0
            PLA
            PLX
            STA   $E0
            STX   $E2
            LDA   #$0000
            SEP   #$20
            STA   [$E0]
            REP   #$20
            LDA   #L02C1BC
            LDX   #^L02C1BC
L0197A3     TAY
            TDC
            CLC
            ADC   #$00E5
            TCS
            TYA
            PLD
            RTL

L0197AD     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EE
            TCS
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            JSL   L017151
            PLA
            PLX
            STA   $F0
            SEC
            SBC   #$0000
            BVS   L0197E1
            EOR   #$8000
L0197E1     BMI   L0197FD
            LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            BRA   L01980F
L0197FD     LDA   [$FD]
            SEC
            SBC   $F0
            BEQ   L01980F
            BVS   L019809
            EOR   #$8000
L019809     BPL   L01980F
            LDA   $F0
            STA   [$FD]
L01980F     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019819     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EA
            TCS
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            STX   $F0
            STA   $EE
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017151
            PLA
            PLX
            STA   $EC
            LDX   $F0
            LDA   $EE
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0044
            TAY
            BEQ   L019869
            LDA   #$0000
            BRA   L01986E
L019869     LDY   #$000E
            LDA   [$FD],Y
L01986E     STA   [$FD]
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$000C
            LDA   [$FD],Y
            TAX
            LDY   #$000A
            LDA   [$FD],Y
            JSL   L017151
            PLA
            PLX
            PHA
            LDA   [$FD]
            SEC
            SBC   #$0000
            BVS   L01989A
            EOR   #$8000
L01989A     BMI   L0198A1
            LDA   #$0000
            BRA   L0198A3
L0198A1     LDA   [$FD]
L0198A3     PLX
            STX   $F2
            SEC
            SBC   $F2
            BEQ   L0198BC
            BVS   L0198B0
            EOR   #$8000
L0198B0     BPL   L0198BC
            PEI   $FF
            PEI   $FD
            JSL   L0197AD
            PLY
            PLY
L0198BC     LDA   $EC
            SEC
            SBC   #$0000
            BEQ   L0198F6
            BVS   L0198C9
            EOR   #$8000
L0198C9     BPL   L0198F6
            LDA   $EC
            PHA
            PEI   $F0
            PEI   $EE
            LDY   #$0012
            LDA   [$FD],Y
            PHA
            JSL   L0193A0
            PLY
            PLY
            PLY
            PLY
            CMP   $EC
            BEQ   L0198F6
            LDY   #$0010
            LDA   [$FD],Y
            ORA   #$0020
            LDY   #$0010
            STA   [$FD],Y
            LDA   #$FFFF
            BRA   L0198F9
L0198F6     LDA   #$0000
L0198F9     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019903     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EE
            TCS
            LDA   #$FFFF
            STA   $F0
            LDA   $FD
            CMP   #$0000
            BNE   L019927
            LDA   $FF
            CMP   #$0000
            BNE   L019927
            LDA   #$FFFF
            BRL   L0199DD
L019927     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0083
            TAY
            BEQ   L019969
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0004
            TAY
            BEQ   L019942
            LDA   #$0000
            BRA   L01994C
L019942     PEI   $FF
            PEI   $FD
            JSL   L0199E7
            PLY
            PLY
L01994C     STA   $F0
            LDY   #$0012
            LDA   [$FD],Y
            PHA
            JSL   L01A0B6
            PLY
            SEC
            SBC   #$0000
            BVS   L019962
            EOR   #$8000
L019962     BMI   L019969
            LDA   #$FFFF
            STA   $F0
L019969     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0008
            TAY
            BEQ   L0199B6
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            PHX
            PHA
            _FindHandle
            _DisposeHandle
            LDX   #$0000
            LDA   #$0000
            LDY   #$0008
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0006
            STA   [$FD],Y
L0199B6     LDA   #$0000
            LDY   #$0010
            STA   [$FD],Y
            LDA   #$0000
            STA   [$FD]
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            LDA   $F0
L0199DD     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L0199E7     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0002
            TAY
            BNE   L019A07
            LDA   #$0000
            STA   [$FD]
            LDA   #$0000
            BRA   L019A78
L019A07     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0004
            TAY
            BNE   L019A65
            LDY   #$0010
            LDA   [$FD],Y
            AND   #$0002
            TAY
            BEQ   L019A65
            LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            JSL   L017652
            BEQ   L019A65
            LDY   #$0008
            LDA   [$FD],Y
            TAX
            LDY   #$0006
            LDA   [$FD],Y
            PHX
            PHA
            LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            JSL   L017652
            BVS   L019A57
            EOR   #$8000
L019A57     BMI   L019A65
            PEI   $FF
            PEI   $FD
            JSL   L019819
            PLY
            PLY
            BRA   L019A07
L019A65     LDY   #$0010
            LDA   [$FD],Y
            AND   #$0020
            TAY
            BEQ   L019A75
            LDA   #$FFFF
            BRA   L019A78
L019A75     LDA   #$0000
L019A78     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019A82     PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EC
            TCS
            LDAL  L02BE75+2
            TAX
            LDAL  L02BE75
            STA   $F2
            STX   $F4
            LDX   $F4
            LDA   #$0010
            CLC
            ADC   $F2
            BCC   L019AA5
            INX
L019AA5     STX   $F0
            STA   $EE
            BRA   L019AE0
L019AAB     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0002
            LDA   [$EE],Y
            TAX
            LDA   [$EE]
            JSL   L017652
            BNE   L019AD4
            LDX   $FF
            LDA   $FD
            LDY   #$0002
            PHA
            TXA
            STA   [$EE],Y
            PLA
            STA   [$EE]
            LDA   #$0000
            BRA   L019B0E
L019AD4     LDA   $EE
            CLC
            ADC   #$0004
            STA   $EE
            BCC   L019AE0
            INC   $F0
L019AE0     LDAL  L02BE75+2
            TAX
            LDAL  L02BE75
            STA   $F2
            STX   $F4
            LDX   $F4
            LDA   #$0028
            CLC
            ADC   $F2
            BCC   L019AF8
            INX
L019AF8     PHX
            PHA
            LDX   $F0
            LDA   $EE
            JSL   L017652
            BEQ   L019B0B
            BVS   L019B09
            EOR   #$8000
L019B09     BMI   L019AAB
L019B0B     LDA   #$0001
L019B0E     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019B18     PHD
            TSC
            SEC
            SBC   #$00E9
            TCD
            ADC   #$00E2
            TCS
            PEI   $F1
            PEI   $EF
            PEA   $0000
            TDC
            CLC
            ADC   #$00F3
            PHA
            PEI   $FF
            PEI   $FD
            PEA   $000B
            _SANEFP816
            TDC
            CLC
            ADC   #$00E9
            TCS
            PLD
            RTL

L019B4F     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E6
            TCS
            LDAL  L02BE79
            CMP   #$0000
            BNE   L019B67
            JSL   L019D9C
L019B67     LDA   #$0012
            PHA
            LDAL  L02BE79
            SEC
            JSL   L017037
            PLY
            SEC
            SBC   #$0001
            STA   $F0
            LDA   [$FD]
            SEC
            SBC   #$0000
            BVS   L019B86
            EOR   #$8000
L019B86     BPL   L019B8C
            LDA   [$FD]
            BRA   L019B98
L019B8C     LDA   [$FD]
            PHA
            LDA   #$FFFF
            PLX
            STX   $F6
            SEC
            SBC   $F6
L019B98     SEC
            SBC   $F0
            BEQ   L019BB9
            BVS   L019BA2
            EOR   #$8000
L019BA2     BPL   L019BB9
            PEA   $0000
            PEA   $0016
            JSL   L019D72
            PLY
            PLY
            LDX   #$0000
            LDA   #$0000
            BRL   L019D68
L019BB9     LDA   [$FD]
            SEC
            SBC   #$0000
            BVS   L019BC4
            EOR   #$8000
L019BC4     BPL   L019C07
            LDA   [$FD]
            LDX   #$0000
            TAY
            BPL   L019BCF
            DEX
L019BCF     PEA   $0000
            PEA   $0012
            CLC
            JSL   L01A459
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            JSL   L016FC0
            PLA
            PLX
            STX   $EE
            STA   $EC
            LDA   [$EC]
            CMP   #$0000
            BNE   L019C04
            PEA   $0000
            PEA   $0009
            JSL   L019D72
            PLY
            PLY
            STZ   $EC
            STZ   $EE
L019C04     BRL   L019D64
L019C07     LDA   [$FD]
            PHA
            LDA   #$FFFF
            PLX
            STX   $F6
            SEC
            SBC   $F6
            LDX   #$0000
            TAY
            BPL   L019C1A
            DEX
L019C1A     PEA   $0000
            PEA   $0012
            CLC
            JSL   L01A459
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            JSL   L016FC0
            PLA
            PLX
            STX   $EE
            STA   $EC
            BRA   L019C4F
L019C3A     LDA   [$EC]
            CMP   #$0000
            BNE   L019C43
            BRA   L019C7F
L019C43     LDA   $EC
            CLC
            ADC   #$0012
            STA   $EC
            BCC   L019C4F
            INC   $EE
L019C4F     LDA   $F0
            LDX   #$0000
            TAY
            BPL   L019C58
            DEX
L019C58     PEA   $0000
            PEA   $0012
            CLC
            JSL   L01A459
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            JSL   L016FC0
            LDX   $EE
            LDA   $EC
            JSL   L017652
            BVS   L019C7D
            EOR   #$8000
L019C7D     BMI   L019C3A
L019C7F     LDA   $F0
            LDX   #$0000
            TAY
            BPL   L019C88
            DEX
L019C88     PEA   $0000
            PEA   $0012
            CLC
            JSL   L01A459
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            JSL   L016FC0
            LDX   $EE
            LDA   $EC
            JSL   L017652
            BVS   L019CAD
            EOR   #$8000
L019CAD     BPL   L019CB2
            BRL   L019D3E
L019CB2     LDAL  L02BE79
            CLC
            ADC   #$00B4
            LDX   #$0000
            TAY
            BPL   L019CC1
            DEX
L019CC1     PHX
            PHA
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            PHX
            PHA
            JSL   L01A5A3
            PLY
            PLY
            PLY
            PLY
            STX   $EA
            STA   $E8
            LDA   $E8
            CMP   #$0000
            BNE   L019CFD
            LDA   $EA
            CMP   #$0000
            BNE   L019CFD
            PEA   $0000
            PEA   $0018
            JSL   L019D72
            PLY
            PLY
            LDX   #$0000
            LDA   #$0000
            BRL   L019D68
L019CFD     LDA   $F0
            CLC
            ADC   #$0001
            LDX   #$0000
            TAY
            BPL   L019D0A
            DEX
L019D0A     PEA   $0000
            PEA   $0012
            CLC
            JSL   L01A459
            LDX   $EA
            LDA   $E8
            JSL   L016FC0
            PLA
            PLX
            STX   $EE
            STA   $EC
            LDAL  L02BE79
            CLC
            ADC   #$00B4
            STAL  L02BE79
            LDX   $EA
            LDA   $E8
            PHA
            TXA
            STAL  L02BE7D
            PLA
            STAL  L02BE7B
L019D3E     LDX   #$0000
            LDA   #$0012
            PHX
            PHA
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            PHX
            PHA
            LDX   $EE
            LDA   $EC
            JSL   L017151
            PLA
            PLX
            SEC
            JSL   L018C2A
            PLY
            PLY
            STA   [$FD]
L019D64     LDX   $EE
            LDA   $EC
L019D68     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019D72     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   $FF
            CMP   #$0000
            BNE   L019D88
            LDA   $FD
            BRA   L019D8F
L019D88     PEI   $FF
            JSL   L01A344
            PLY
L019D8F     STA   L0600AD
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L019D9C     PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00EE
            TCS
            LDA   #$00B4
            STAL  L02BE79
            PEA   $0000
            PEA   $00B4
            PEA   $0000
            PEA   $0000
            JSL   L01A5A3
            PLY
            PLY
            PLY
            PLY
            PHA
            TXA
            STAL  L02BE7D
            PLA
            STAL  L02BE7B
            SEC
            LDAL  L02BE83
            SBC   #$0000
            BNE   L019DE0
            LDAL  L02BE85
            SBC   #$0000
            BRA   L019DE9
L019DE0     LDAL  L02BE85
            SBC   #$0000
            REP   #$02
L019DE9     BNE   L019DEE
            BRL   L019EAB
L019DEE     LDAL  L02BE85
            TAX
            LDAL  L02BE83
            STA   $F6
            STX   $F8
            LDY   #$001A
            LDA   [$F6],Y
            TAX
            LDY   #$0018
            LDA   [$F6],Y
            PHX
            PHA
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            PHX
            PHA
            PEA   $0000
            PEA   $0036
            _BlockMove
            LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            STX   $F4
            STA   $F2
            BRA   L019E7F
L019E38     LDA   [$F2]
            CMP   #$0000
            BEQ   L019E73
            PEA   $0000
            PEA   $6601
            PEI   $F4
            PEI   $F2
            LDY   #$0006
            LDA   [$F2],Y
            TAX
            LDY   #$0004
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0016
            LDA   [$F6],Y
            TAX
            LDY   #$0014
            LDA   [$F6],Y
            STA   $F6
            STX   $F8
            LDA   $F6
            LDX   $F8
            JSL   L0174BF
            PLY
            PLY
            PLY
            PLY
L019E73     LDA   $F2
            CLC
            ADC   #$0012
            STA   $F2
            BCC   L019E7F
            INC   $F4
L019E7F     LDAL  L02BE7D
            TAX
            LDAL  L02BE7B
            STA   $F6
            STX   $F8
            LDX   $F8
            LDA   #$0024
            CLC
            ADC   $F6
            BCC   L019E97
            INX
L019E97     PHX
            PHA
            LDX   $F4
            LDA   $F2
            JSL   L017652
            BVS   L019EA6
            EOR   #$8000
L019EA6     BMI   L019E38
            BRL   L01A088
L019EAB     PEA   $0000
            PEA   ^L02BD1E
            PEA   L02BD1E
            JSL   L01A4E0
            PLY
            PLY
            PLY
            STA   $F0
            PEA   $0000
            TDC
            CLC
            ADC   #$00F0
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $F4
            STA   $F2
            PHX
            PHA
            PEA   $0000
            PEA   $0004
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $8300
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            LDY   #$000A
            PHA
            TXA
            STA   [$F2],Y
            PLA
            LDY   #$0008
            STA   [$F2],Y
            LDY   #$000A
            LDA   [$F2],Y
            TAX
            LDY   #$0008
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F6
            STX   $F8
            LDA   #$0000
            STA   [$F6]
            LDY   #$000A
            LDA   [$F2],Y
            TAX
            LDY   #$0008
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F6
            STX   $F8
            LDA   #$0000
            LDY   #$0002
            STA   [$F6],Y
            PEA   $0001
            PEA   ^L02BD27
            PEA   L02BD27
            JSL   L01A4E0
            PLY
            PLY
            PLY
            STA   $F0
            PEA   $0000
            TDC
            CLC
            ADC   #$00F0
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $F4
            STA   $F2
            PHX
            PHA
            PEA   $0000
            PEA   $0004
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $8300
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            LDY   #$000A
            PHA
            TXA
            STA   [$F2],Y
            PLA
            LDY   #$0008
            STA   [$F2],Y
            LDY   #$000A
            LDA   [$F2],Y
            TAX
            LDY   #$0008
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F6
            STX   $F8
            LDA   #$0000
            STA   [$F6]
            LDY   #$000A
            LDA   [$F2],Y
            TAX
            LDY   #$0008
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F6
            STX   $F8
            LDA   #$0001
            LDY   #$0002
            STA   [$F6],Y
            PEA   $0001
            PEA   ^L02BD30
            PEA   L02BD30
            JSL   L01A4E0
            PLY
            PLY
            PLY
            STA   $F0
            PEA   $0000
            TDC
            CLC
            ADC   #$00F0
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $F4
            STA   $F2
            PHX
            PHA
            PEA   $0000
            PEA   $0004
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $8300
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            LDY   #$000A
            PHA
            TXA
            STA   [$F2],Y
            PLA
            LDY   #$0008
            STA   [$F2],Y
            LDY   #$000A
            LDA   [$F2],Y
            TAX
            LDY   #$0008
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F6
            STX   $F8
            LDA   #$0000
            STA   [$F6]
            LDY   #$000A
            LDA   [$F2],Y
            TAX
            LDY   #$0008
            LDA   [$F2],Y
            STA   $F6
            STX   $F8
            LDY   #$0002
            LDA   [$F6],Y
            TAX
            LDA   [$F6]
            STA   $F6
            STX   $F8
            LDA   #$0002
            LDY   #$0002
            STA   [$F6],Y
L01A088     LDA   #L01A300
            LDX   #^L01A300
            PHX
            PHA
            LDAL  L02BE75+2
            TAX
            LDAL  L02BE75
            STA   $F6
            STX   $F8
            PLA
            PLX
            LDY   #$000A
            PHA
            TXA
            STA   [$F6],Y
            PLA
            LDY   #$0008
            STA   [$F6],Y
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L01A0B6     ENT
            PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EC
            TCS
            LDA   $FF
            SEC
            SBC   #$0000
            BVS   L01A0CC
            EOR   #$8000
L01A0CC     BMI   L01A0DF
            PEA   $0000
            PEA   $0016
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRA   L01A155
L01A0DF     PEA   $0000
            TDC
            CLC
            ADC   #$00FF
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $F2
            STA   $F0
            LDA   $F0
            CMP   #$0000
            BNE   L01A105
            LDA   $F2
            CMP   #$0000
            BNE   L01A105
            LDA   #$FFFF
            BRA   L01A155
L01A105     PEI   $F2
            PEI   $F0
            LDY   #$0006
            LDA   [$F0],Y
            TAX
            LDY   #$0004
            LDA   [$F0],Y
            STA   $F4
            STX   $F6
            LDY   #$000A
            LDA   [$F4],Y
            TAX
            LDY   #$0008
            LDA   [$F4],Y
            STA   $F4
            STX   $F6
            LDA   $F4
            LDX   $F6
            JSL   L0174BF
            PLY
            PLY
            STA   $EE
            LDA   #$0000
            STA   [$F0]
            LDA   $EE
            CMP   #$0000
            BEQ   L01A152
            LDY   #$0002
            LDA   [$F0],Y
            PHA
            PEI   $EE
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRA   L01A155
L01A152     LDA   #$0000
L01A155     TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L01A15F     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00DE
            TCS
            LDA   $F9
            SEC
            SBC   #$0000
            BVS   L01A175
            EOR   #$8000
L01A175     BMI   L01A189
            PEA   $0000
            PEA   $0016
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRL   L01A2F6
L01A189     PEA   $0000
            TDC
            CLC
            ADC   #$00F9
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $EC
            STA   $EA
            LDA   $EA
            CMP   #$0000
            BNE   L01A1B0
            LDA   $EC
            CMP   #$0000
            BNE   L01A1B0
            LDA   #$FFFF
            BRL   L01A2F6
L01A1B0     LDA   $FB
            BRL   L01A2EB
L01A1B5     PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $EC
            PEI   $EA
            LDY   #$0006
            LDA   [$EA],Y
            TAX
            LDY   #$0004
            LDA   [$EA],Y
            STA   $EE
            STX   $F0
            LDY   #$0016
            LDA   [$EE],Y
            TAX
            LDY   #$0014
            LDA   [$EE],Y
            STA   $EE
            STX   $F0
            LDA   $EE
            LDX   $F0
            JSL   L0174BF
            PLY
            PLY
            PLY
            PLY
            PLY
            STA   $E2
            LDA   $E2
            CMP   #$0000
            BNE   L01A1F9
            LDA   #$0000
            BRL   L01A2F6
L01A1F9     LDY   #$0002
            LDA   [$EA],Y
            PHA
            PEI   $E2
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRL   L01A2F6
L01A20D     LDX   $FF
            LDA   $FD
            SEC
            SBC   #$0000
            BVS   L01A21A
            EOR   #$8000
L01A21A     BMI   L01A22E
            PEA   $0000
            PEA   $0009
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRL   L01A2F6
L01A22E     LDX   $FF
            LDA   $FD
            PHA
            LDA   #$FFFF
            PLX
            STX   $F2
            SEC
            SBC   $F2
            STA   $E4
            PEA   $0000
            TDC
            CLC
            ADC   #$00E4
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $E8
            STA   $E6
            LDA   $E6
            CMP   #$0000
            BNE   L01A265
            LDA   $E8
            CMP   #$0000
            BNE   L01A265
            LDA   #$FFFF
            BRL   L01A2F6
L01A265     PEA   $0000
            TDC
            CLC
            ADC   #$00F9
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $EC
            STA   $EA
            LDA   $EA
            LDX   $EC
            PHX
            PHA
            LDA   $E8
            PHA
            LDA   $E6
            PHA
            PEA   $0012
            JSL   L01767D
            PLA
            PLA
            PLA
            PLA
            PLX
            PEA   $0000
            PEA   $6601
            PEI   $EC
            PEI   $EA
            LDY   #$0006
            LDA   [$EA],Y
            TAX
            LDY   #$0004
            LDA   [$EA],Y
            STA   $EE
            STX   $F0
            LDY   #$0016
            LDA   [$EE],Y
            TAX
            LDY   #$0014
            LDA   [$EE],Y
            STA   $EE
            STX   $F0
            LDA   $EE
            LDX   $F0
            JSL   L0174BF
            PLY
            PLY
            PLY
            PLY
            STA   $E2
            LDA   $E2
            CMP   #$0000
            BEQ   L01A2E5
            LDA   #$0000
            STA   [$E6]
            LDY   #$0002
            LDA   [$EA],Y
            PHA
            PEI   $E2
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRA   L01A2F6
L01A2E5     LDA   $E4
            BRA   L01A2F6
            BRA   L01A2F6
L01A2EB     CMP   #$6601
            BNE   L01A2F3
            BRL   L01A20D
L01A2F3     JMP   L01A1B5

L01A2F6     TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L01A300     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00EE
            TCS
            LDA   #$0012
            PHA
            LDAL  L02BE79
            SEC
            JSL   L017037
            PLY
            SEC
            SBC   #$0001
            STA   $F0
            STZ   $F2
            BRA   L01A32C
L01A323     PEI   $F2
            JSL   L01A0B6
            PLY
            INC   $F2
L01A32C     LDA   $F2
            SEC
            SBC   $F0
            BEQ   L01A323
            BVS   L01A338
            EOR   #$8000
L01A338     BPL   L01A323
            TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L01A344     PHD
            TSC
            SEC
            SBC   #$00F9
            TCD
            ADC   #$00F0
            TCS
            STZ   $F2
            LDA   $FF
            BRL   L01A43A
L01A356     BRL   L01A44D
L01A359     LDA   #$0014
            STA   $F2
            BRL   L01A44D
L01A361     LDA   #$000E
            STA   $F2
            BRL   L01A44D
L01A369     LDA   #$001C
            STA   $F2
            BRL   L01A44D
L01A371     LDA   #$0011
            STA   $F2
            BRL   L01A44D
L01A379     LDA   #$0006
            STA   $F2
            BRL   L01A44D
L01A381     LDA   #$0006
            STA   $F2
            BRL   L01A44D
L01A389     LDA   #$0010
            STA   $F2
            BRL   L01A44D
L01A391     LDA   #$0002
            STA   $F2
            BRL   L01A44D
L01A399     LDA   #$0009
            STA   $F2
            BRL   L01A44D
L01A3A1     LDA   #$0005
            STA   $F2
            BRL   L01A44D
L01A3A9     LDA   #$0017
            STA   $F2
            BRL   L01A44D
L01A3B1     LDA   #$000C
            STA   $F2
            BRL   L01A44D
L01A3B9     LDA   #$001A
            STA   $F2
            BRL   L01A44D
L01A3C1     LDA   #$0016
            STA   $F2
            BRL   L01A44D
L01A3C9     LDA   #$000D
            STA   $F2
            BRL   L01A44D
L01A3D1     LDA   #$001E
            STA   $F2
            BRL   L01A44D
            BRL   L01A44D
L01A3DC     DA    L01A356
            DA    L01A3A1
            DA    L01A3D1
            DA    L01A361
            DA    L01A3A9
            DA    L01A399
            DA    L01A391
            DA    L01A381
            DA    L01A391
            DA    L01A371
            DA    L01A369
            DA    L01A369
            DA    L01A359
            DA    L01A379
            DA    L01A381
            DA    L01A3C9
            DA    L01A3B9
            DA    L01A359
            DA    L01A3C1
            DA    L01A3B1
            DA    L01A389
            DA    L01A381
            DA    L01A381
            DA    L01A356
L01A40C     DW    $0000
            DW    $0027
            DW    $002B
            DW    $0040
            DW    $0042
            DW    $0043
            DW    $0044
            DW    $0045
            DW    $0046
            DW    $0047
            DW    $0048
            DW    $0049
            DW    $004B
            DW    $004C
            DW    $004D
            DW    $004E
            DW    $0050
            DW    $0052
            DW    $0053
            DW    $0054
            DW    $0057
            DW    $0058
            DW    $005A
L01A43A     TAX
            PEA   ^L01A40C
            PEA   L01A40C
            LDA   #$002C
            JSL   L018AC3
            PLA
            PLA
            JMP   (L01A3DC,X)

L01A44D     LDA   $F2
            TAY
            TDC
            CLC
            ADC   #$00F9
            TCS
            TYA
            PLD
            RTL

L01A459     ENT
            PHD
            PHX
            PHA
            PEA   $0000
            PEA   $0000
            TSC
            TCD
            LDX   #$0000
            BCC   L01A49B
            LDA   $10
            BIT   #$8000
            BEQ   L01A482
            EOR   #$FFFF
            STA   $10
            LDA   $0E
            EOR   #$FFFF
            INC
            BNE   L01A47F
            INC   $10
L01A47F     STA   $0E
            INX
L01A482     LDA   $07
            BIT   #$8000
            BEQ   L01A49B
            EOR   #$FFFF
            STA   $07
            LDA   $05
            EOR   #$FFFF
            INC
            BNE   L01A498
            INC   $07
L01A498     STA   $05
            DEX
L01A49B     BRA   L01A4B4
L01A49D     LSR   $07
            ROR   $05
            BCC   L01A4B0
            LDA   $01
            CLC
            ADC   $0E
            STA   $01
            LDA   $03
            ADC   $10
            STA   $03
L01A4B0     ASL   $0E
            ROL   $10
L01A4B4     LDA   $05
            ORA   $07
            BNE   L01A49D
            CPX   #$0000
            BEQ   L01A4D2
            LDA   $01
            EOR   #$FFFF
            STA   $01
            LDA   $03
            EOR   #$FFFF
            INC   $01
            BNE   L01A4D0
            INC
L01A4D0     STA   $03
L01A4D2     LDA   $01
            STA   $0E
            LDA   $03
            STA   $10
            PLY
            PLY
            PLY
            PLY
            PLD
            RTL

L01A4E0     ENT
            PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00E2
            TCS
            LDA   #$FFFF
            STA   $E6
            PEA   $0000
            TDC
            CLC
            ADC   #$00E6
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $EA
            STA   $E8
            LDA   $E8
            CMP   #$0000
            BNE   L01A517
            LDA   $EA
            CMP   #$0000
            BNE   L01A517
            LDA   #$FFFF
            BRL   L01A599
L01A517     LDA   $FF
            CLC
            ADC   #$0001
            STA   [$E8]
            LDA   #$0000
            LDY   #$0002
            STA   [$E8],Y
            LDX   #$0000
            LDA   #$0000
            LDY   #$0006
            PHA
            TXA
            STA   [$E8],Y
            PLA
            LDY   #$0004
            STA   [$E8],Y
            PEI   $EA
            PEI   $E8
            PEA   $6400
            PEI   $FD
            PEI   $FB
            PEA   $0000
            TDC
            CLC
            ADC   #$00EC
            PHA
            JSL   L01A7A0
            TAY
            TSC
            CLC
            ADC   #$000E
            TCS
            TYA
            STA   $E4
            LDA   $E4
            CMP   #$0000
            BEQ   L01A56D
            LDA   #$0000
            STA   [$E8]
            LDA   #$FFFF
            BRA   L01A599
L01A56D     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0006
            LDA   [$E8],Y
            TAX
            LDY   #$0004
            LDA   [$E8],Y
            JSL   L017652
            BNE   L01A597
            LDX   $EE
            LDA   $EC
            LDY   #$0006
            PHA
            TXA
            STA   [$E8],Y
            PLA
            LDY   #$0004
            STA   [$E8],Y
L01A597     LDA   $E6
L01A599     TAY
            TDC
            CLC
            ADC   #$00F5
            TCS
            TYA
            PLD
            RTL

L01A5A3     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00DC
            TCS
            STZ   $EA
            STZ   $EC
            STZ   $E6
            STZ   $E8
            SEC
            LDA   $F9
            SBC   #$0000
            BNE   L01A5C5
            LDA   $FB
            SBC   #$0000
            BRA   L01A5CC
L01A5C5     LDA   $FB
            SBC   #$0000
            REP   #$02
L01A5CC     BNE   L01A5D1
            BRL   L01A664
L01A5D1     PHX
            PHA
            PEI   $FB
            PEI   $F9
            _FindHandle
            PLA
            PLX
            STX   $EC
            STA   $EA
            PHX
            PHA
            PEI   $EC
            PEI   $EA
            _GetHandleSize
            PLA
            PLX
            STX   $E8
            STA   $E6
            SEC
            LDA   $FD
            SBC   $E6
            BNE   L01A616
            LDA   $FF
            SBC   $E8
            BRA   L01A61C
L01A616     LDA   $FF
            SBC   $E8
            REP   #$02
L01A61C     BVS   L01A621
            EOR   #$8000
L01A621     BMI   L01A650
            PEI   $EC
            PEI   $EA
            PEI   $FF
            PEI   $FD
            _SetHandleSize
            LDY   #$0002
            LDA   [$EA],Y
            TAX
            LDA   [$EA]
            AND   #$FFFF
            PHA
            TXA
            AND   #$00FF
            TAX
            PLA
            BRL   L01A796
L01A650     PEI   $EC
            PEI   $EA
            _HUnlock
L01A664     PHX
            PHA
            PEI   $FF
            PEI   $FD
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $8300
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            STX   $E4
            STA   $E2
            LDA   L060002
            BEQ   L01A6CA
            SEC
            LDA   $EA
            SBC   #$0000
            BNE   L01A6A4
            LDA   $EC
            SBC   #$0000
            BRA   L01A6AB
L01A6A4     LDA   $EC
            SBC   #$0000
            REP   #$02
L01A6AB     BEQ   L01A6C1
            PEI   $EC
            PEI   $EA
            _HLock
L01A6C1     LDX   #$0000
            LDA   #$0000
            BRL   L01A796
L01A6CA     PEI   $E4
            PEI   $E2
            _HLock
            SEC
            LDA   $F9
            SBC   #$0000
            BNE   L01A6ED
            LDA   $FB
            SBC   #$0000
            BRA   L01A6F4
L01A6ED     LDA   $FB
            SBC   #$0000
            REP   #$02
L01A6F4     BEQ   L01A732
            LDY   #$0002
            LDA   [$EA],Y
            TAX
            LDA   [$EA]
            PHX
            PHA
            LDY   #$0002
            LDA   [$E2],Y
            TAX
            LDA   [$E2]
            PHX
            PHA
            PEI   $E8
            PEI   $E6
            _BlockMove
            PEI   $EC
            PEI   $EA
            _DisposeHandle
L01A732     LDY   #$0002
            LDA   [$E2],Y
            TAX
            LDA   [$E2]
            CLC
            ADC   $E6
            PHA
            TXA
            ADC   $E8
            TAX
            PLA
            STX   $E0
            STA   $DE
L01A747     LDY   #$0002
            LDA   [$E2],Y
            TAX
            LDA   [$E2]
            CLC
            ADC   $FD
            PHA
            TXA
            ADC   $FF
            TAX
            PLA
            PHX
            PHA
            LDX   $E0
            LDA   $DE
            JSL   L017652
            BEQ   L01A784
            BVS   L01A769
            EOR   #$8000
L01A769     BPL   L01A784
            LDX   $E0
            LDA   $DE
            INC   $DE
            BNE   L01A775
            INC   $E0
L01A775     STA   $EE
            STX   $F0
            LDA   #$0000
            SEP   #$20
            STA   [$EE]
            REP   #$20
            BRA   L01A747
L01A784     LDY   #$0002
            LDA   [$E2],Y
            TAX
            LDA   [$E2]
            AND   #$FFFF
            PHA
            TXA
            AND   #$00FF
            TAX
            PLA
L01A796     TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL

L01A7A0     PHD
            TSC
            SEC
            SBC   #$00ED
            TCD
            ADC   #$00DE
            TCS
            LDA   [$F7]
            AND   #$00FF
            CMP   #$0000
            BEQ   L01A7BA
            LDA   #$0000
            BRA   L01A7BD
L01A7BA     LDA   #$0001
L01A7BD     PHA
            LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDX   $F9
            LDA   $F7
            JSL   L017652
            BEQ   L01A7D5
            LDA   #$0000
            BRA   L01A7D8
L01A7D5     LDA   #$0001
L01A7D8     PLX
            STX   $EC
            ORA   $EC
            TAY
            BEQ   L01A7F2
            PEA   $0000
            PEA   $0016
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
            BRL   L01A968
L01A7F2     LDAL  L02BE7F
            CMP   #$0000
            BNE   L01A815
            LDAL  L02BE81
            CMP   #$0000
            BNE   L01A815
            LDA   #L02BC5E
            LDX   #^L02BC5E
            PHA
            TXA
            STAL  L02BE81
            PLA
            STAL  L02BE7F
L01A815     LDAL  L02BE81
            TAX
            LDAL  L02BE7F
            STX   $E2
            STA   $E0
            BRA   L01A84B
L01A824     LDX   #$0000
            LDA   #$0000
            PHX
            PHA
            LDY   #$0006
            LDA   [$E0],Y
            TAX
            LDY   #$0004
            LDA   [$E0],Y
            JSL   L017652
            BNE   L01A83F
            BRA   L01A876
L01A83F     LDA   $E0
            CLC
            ADC   #$0018
            STA   $E0
            BCC   L01A84B
            INC   $E2
L01A84B     LDAL  L02BE81
            TAX
            LDAL  L02BE7F
            STA   $E8
            STX   $EA
            LDX   $EA
            LDA   #$0078
            CLC
            ADC   $E8
            BCC   L01A863
            INX
L01A863     PHX
            PHA
            LDX   $E2
            LDA   $E0
            JSL   L017652
            BEQ   L01A876
            BVS   L01A874
            EOR   #$8000
L01A874     BMI   L01A824
L01A876     LDA   #$4006
            STA   $E6
L01A87B     LDAL  L02BE81
            TAX
            LDAL  L02BE7F
            PHX
            PHA
            LDX   $E2
            LDA   $E0
            SEC
            SBC   #$0018
            STA   $E0
            PHA
            LDA   $E2
            SBC   #$0000
            TAX
            STA   $E2
            PLA
            JSL   L017652
            BEQ   L01A8A7
            BVS   L01A8A5
            EOR   #$8000
L01A8A5     BMI   L01A8E0
L01A8A7     PEI   $FF
            PEI   $FD
            PEI   $FB
            PEI   $F9
            PEI   $F7
            LDY   #$0006
            LDA   [$E0],Y
            TAX
            LDY   #$0004
            LDA   [$E0],Y
            STA   $E8
            STX   $EA
            LDA   $E8
            LDX   $EA
            JSL   L0174BF
            PLY
            PLY
            PLY
            PLY
            PLY
            STA   $E6
            LDA   $E6
            SEC
            SBC   #$0000
            BVS   L01A8DA
            EOR   #$8000
L01A8DA     BPL   L01A8DE
            BRA   L01A8E0
L01A8DE     BRA   L01A87B
L01A8E0     SEC
            LDA   $F3
            SBC   #$0000
            BNE   L01A8EF
            LDA   $F5
            SBC   #$0000
            BRA   L01A8F6
L01A8EF     LDA   $F5
            SBC   #$0000
            REP   #$02
L01A8F6     BEQ   L01A926
            SEC
            LDA   $E0
            SBCL  L02BE7F
            BNE   L01A909
            LDA   $E2
            SBCL  L02BE81
            BRA   L01A911
L01A909     LDA   $E2
            SBCL  L02BE81
            REP   #$02
L01A911     BVS   L01A916
            EOR   #$8000
L01A916     BPL   L01A926
            LDX   $E2
            LDA   $E0
            LDY   #$0002
            PHA
            TXA
            STA   [$F3],Y
            PLA
            STA   [$F3]
L01A926     LDA   $E6
            AND   #$4000
            CMP   #$0000
            BNE   L01A934
            LDA   $E6
            BRA   L01A968
L01A934     LDA   $E6
            STA   $E4
            LDA   $E4
            AND   #$8000
            TAY
            BEQ   L01A952
            LDA   $E4
            AND   #$BFFF
            STA   $E4
            LDA   $E4
            AND   #$7FFF
            STA   $E4
            STZ   $E6
            BRA   L01A95B
L01A952     LDA   $E6
            AND   #$BFFF
            STA   $E6
            STZ   $E4
L01A95B     PEI   $E4
            PEI   $E6
            JSL   L019D72
            PLY
            PLY
            LDA   #$FFFF
L01A968     TAY
            TDC
            CLC
            ADC   #$00ED
            TCS
            TYA
            PLD
            RTL

L01A972     ENT
            PHD
            TSC
            SEC
            SBC   #$00FB
            TCD
            ADC   #$00F4
            TCS
            LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00FB
            TCS
            TYA
            PLD
            RTL

L01A98A     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L01A9A2     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EE
            TCS
            LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDA   [$F2]
            DEC
            STA   [$F2]
            SEC
            SBC   #$0000
            BEQ   L01A9DD
            BVS   L01A9D8
            EOR   #$8000
L01A9D8     BPL   L01A9DD
            BRL   L01AA45
L01A9DD     LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            STAL  L02BF0C
            PEA   $0014
            PEA   ^L02BF0C
            PEA   L02BF0C
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01AA1E
            LDA   L060002
            LDY   #$0002
            STA   [$FD],Y
L01AA1E     LDA   L060002
            STA   $F0
            LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            PHX
            PHA
            _DisposeHandle
            LDA   $F0
            STA   L060002
L01AA45     LDA   L060002
            CMP   #$0000
            BNE   L01AA52
            LDA   #$0000
            BRA   L01AA55
L01AA52     LDA   #$0009
L01AA55     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01AA5F     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00E6
            TCS
            LDA   $FB
            BRL   L01ADCC
L01AA6F     LDA   #$0000
            LDY   #$0002
            STA   [$F7],Y
            LDA   #$0016
            BRL   L01ADFD
L01AA7D     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            STA   $EA
            LDA   $EA
            STAL  L02BF20
            PEA   $0019
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01AAC0
            LDA   #$001D
            BRL   L01ADFD
L01AAC0     LDA   $EA
            STAL  L02BF1A
            LDA   [$FD]
            BRL   L01AB69
L01AACB     LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHA
            TXA
            STAL  L02BF1E
            PLA
            STAL  L02BF1C
            BRL   L01AB76
L01AAE4     PEA   $0017
            PEA   ^L02BF1A
            PEA   L02BF1A
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01AAFC
            BRL   L01AB76
L01AAFC     LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            LDAL  L02BF1E
            TAX
            LDAL  L02BF1C
            JSL   L016FC0
            PLA
            PLX
            PHA
            TXA
            STAL  L02BF1E
            PLA
            STAL  L02BF1C
            BRL   L01AB76
L01AB26     LDY   #$0004
            LDA   [$FD],Y
            TAX
            LDY   #$0002
            LDA   [$FD],Y
            PHX
            PHA
            LDAL  L02BF24
            TAX
            LDAL  L02BF22
            JSL   L016FC0
            PLA
            PLX
            PHA
            TXA
            STAL  L02BF1E
            PLA
            STAL  L02BF1C
            BRL   L01AB76
L01AB50     LDA   #$0000
            LDY   #$0002
            STA   [$F7],Y
            LDA   #$0016
            BRL   L01ADFD
            BRL   L01AB76
L01AB61     DA    L01AACB
            DA    L01AAE4
            DA    L01AB26
            DA    L01AB50
L01AB69     CMP   #$0003
            BCC   L01AB71
            LDA   #$0003
L01AB71     ASL
            TAX
            JMP   (L01AB61,X)

L01AB76     LDA   L060002
            CMP   #$0000
            BEQ   L01AB88
            LDA   [$FD]
            CMP   #$0000
            BEQ   L01AB88
            BRL   L01AC1A
L01AB88     SEC
            LDAL  L02BF1C
            SBCL  L02BF22
            BNE   L01AB9D
            LDAL  L02BF1E
            SBCL  L02BF24
            BRA   L01ABA7
L01AB9D     LDAL  L02BF1E
            SBCL  L02BF24
            REP   #$02
L01ABA7     BNE   L01ABAC
            BRL   L01AC0D
L01ABAC     BVS   L01ABB1
            EOR   #$8000
L01ABB1     BMI   L01ABB6
            BRL   L01AC0D
L01ABB6     LDA   [$FD]
            CMP   #$0002
            BEQ   L01ABDE
            LDA   $EA
            STAL  L02BF20
            PEA   $0019
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01ABDE
            LDA   #$001D
            BRL   L01ADFD
L01ABDE     LDAL  L02BF1E
            TAX
            LDAL  L02BF1C
            PHA
            TXA
            STAL  L02BF24
            PLA
            STAL  L02BF22
            PEA   $0018
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01AC0D
            LDA   #$001D
            BRL   L01ADFD
L01AC0D     PEA   $0016
            PEA   ^L02BF1A
            PEA   L02BF1A
            JSL   L017481
L01AC1A     LDA   L060002
            CMP   #$0000
            BEQ   L01AC30
            LDA   L060002
            LDY   #$0002
            STA   [$F7],Y
            LDA   #$001D
            BRL   L01ADFD
L01AC30     LDAL  L02BF1E
            TAX
            LDAL  L02BF1C
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            BRL   L01ADDD
L01AC49     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDA   [$EC]
            INC
            STA   [$EC]
            BRL   L01ADDD
L01AC6C     LDA   #$0000
            LDY   #$0002
            STA   [$F7],Y
            LDA   #$0016
            BRL   L01ADFD
L01AC7A     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            STA   [$FD]
            BRL   L01ADDD
L01AC9F     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            STAL  L02BF20
            PEA   $0019
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            LDAL  L02BF24
            TAX
            LDAL  L02BF22
            LDY   #$0002
            PHA
            TXA
            STA   [$FD],Y
            PLA
            STA   [$FD]
            BRL   L01ADDD
L01ACE6     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            STAL  L02BF20
            LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BF24
            PLA
            STAL  L02BF22
            PEA   $0018
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            BRL   L01ADDD
L01AD29     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            STAL  L02BF1A
            PEA   $0017
            PEA   ^L02BF1A
            PEA   L02BF1A
            JSL   L017481
            LDAL  L02BF1E
            TAX
            LDAL  L02BF1C
            LDY   #$0002
            PHA
            TXA
            STA   [$FD],Y
            PLA
            STA   [$FD]
            BRL   L01ADDD
L01AD70     LDY   #$000A
            LDA   [$F7],Y
            TAX
            LDY   #$0008
            LDA   [$F7],Y
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            TAX
            LDA   [$EC]
            STA   $EC
            STX   $EE
            LDY   #$0002
            LDA   [$EC],Y
            STAL  L02BF1A
            LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BF1E
            PLA
            STAL  L02BF1C
            PEA   $0016
            PEA   ^L02BF1A
            PEA   L02BF1A
            JSL   L017481
            BRL   L01ADDD
            BRL   L01ADDD
L01ADB6     DA    L01AA7D
            DA    L01AC49
            DA    L01AA6F
            DA    L01AC6C
            DA    L01AA6F
            DA    L01AC7A
            DA    L01ACE6
            DA    L01AC9F
            DA    L01AD70
            DA    L01AD29
            DA    L01AA6F
L01ADCC     SEC
            SBC   #$6600
            CMP   #$000A
            BCC   L01ADD8
            LDA   #$000A
L01ADD8     ASL
            TAX
            JMP   (L01ADB6,X)

L01ADDD     LDA   L060002
            CMP   #$0000
            BEQ   L01ADED
            LDA   L060002
            LDY   #$0002
            STA   [$F7],Y
L01ADED     LDA   L060002
            CMP   #$0000
            BNE   L01ADFA
            LDA   #$0000
            BRA   L01ADFD
L01ADFA     LDA   #$0016
L01ADFD     TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L01AE07     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            CMP   #$0002
            BNE   L01AEA8
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            PHX
            PHA
            PEA   $0000
            LDY   #$000C
            LDA   [$FD],Y
            PHA
            _ErrWriteBlock
            LDY   #$000C
            LDA   [$FD],Y
            SEC
            SBC   #$0001
            LDX   #$0000
            PHX
            PHA
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            AND   #$00FF
            CMP   #$000A
            BNE   L01AEA6
            PEA   ^L02BD5F
            PEA   L02BD5F
            PEA   $0000
            PEA   $0001
            _ErrWriteBlock
L01AEA6     BRA   L01AF17
L01AEA8     LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            PHX
            PHA
            PEA   $0000
            LDY   #$000C
            LDA   [$FD],Y
            PHA
            _TextWriteBlock
            LDY   #$000C
            LDA   [$FD],Y
            SEC
            SBC   #$0001
            LDX   #$0000
            PHX
            PHA
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            JSL   L016FC0
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            AND   #$00FF
            CMP   #$000A
            BNE   L01AF17
            PEA   ^L02BD61
            PEA   L02BD61
            PEA   $0000
            PEA   $0001
            _TextWriteBlock
L01AF17     LDY   #$000C
            LDA   [$FD],Y
            LDX   #$0000
            PHX
            PHA
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            JSL   L016FC0
            PLA
            PLX
            LDY   #$0010
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$000E
            STA   [$FD],Y
            LDA   #$0000
            LDY   #$000C
            STA   [$FD],Y
            LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01AF54     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01AF6C     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00EA
            TCS
            LDA   [$FD]
            AND   #$0008
            TAY
            BNE   L01AF82
            BRL   L01B019
L01AF82     LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            STAL  L02BF20
            PEA   $0019
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01AFBE
            BRL   L01B019
L01AFBE     LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            STAL  L02BF1A
            LDAL  L02BF24
            TAX
            LDAL  L02BF22
            PHA
            TXA
            STAL  L02BF1E
            PLA
            STAL  L02BF1C
            PEA   $0016
            PEA   ^L02BF1A
            PEA   L02BF1A
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01B019
            LDA   L060002
            LDY   #$0002
            STA   [$FD],Y
            LDA   #$001D
            BRL   L01B124
L01B019     LDA   [$FD]
            AND   #$0020
            TAY
            BNE   L01B069
            LDY   #$000C
            LDA   [$FD],Y
            STA   $F0
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            STX   $EE
            STA   $EC
            BRA   L01B05A
L01B039     LDA   [$EC]
            AND   #$00FF
            CMP   #$000A
            BNE   L01B04C
            LDA   #$000D
            SEP   #$20
            STA   [$EC]
            REP   #$20
L01B04C     LDA   $F0
            DEC   $F0
            LDX   $EE
            LDA   $EC
            INC   $EC
            BNE   L01B05A
            INC   $EE
L01B05A     LDA   $F0
            SEC
            SBC   #$0000
            BEQ   L01B069
            BVS   L01B067
            EOR   #$8000
L01B067     BMI   L01B039
L01B069     LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            STAL  L02BF0C
            LDY   #$000C
            LDA   [$FD],Y
            LDX   #$0000
            PHA
            TXA
            STAL  L02BF14
            PLA
            STAL  L02BF12
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            PHA
            TXA
            STAL  L02BF10
            PLA
            STAL  L02BF0E
            PEA   $0013
            PEA   ^L02BF0C
            PEA   L02BF0C
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BNE   L01B10C
            LDY   #$000C
            LDA   [$FD],Y
            LDX   #$0000
            SEC
            SBCL  L02BF16
            PHA
            TXA
            SBCL  L02BF18
            TAX
            PLA
            LDY   #$000C
            STA   [$FD],Y
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            CLC
            ADCL  L02BF16
            PHA
            TXA
            ADCL  L02BF18
            TAX
            PLA
            LDY   #$0010
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$000E
            STA   [$FD],Y
            BRA   L01B114
L01B10C     LDA   L060002
            LDY   #$0002
            STA   [$FD],Y
L01B114     LDA   L060002
            CMP   #$0000
            BNE   L01B121
            LDA   #$0000
            BRA   L01B124
L01B121     LDA   #$0005
L01B124     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01B12E     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            LDA   $FB
            BRL   L01B171
L01B13E     LDA   #$0000
            STA   [$FD]
            LDX   #$0000
            LDA   #$0000
            LDY   #$0004
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0002
            STA   [$FD],Y
            LDA   #$0000
            BRL   L01B182
L01B15C     LDA   #$0000
            BRL   L01B182
L01B162     LDA   #$0016
            BRL   L01B182
            BRL   L01B182
L01B16B     DA    L01B13E
            DA    L01B15C
            DA    L01B162
L01B171     SEC
            SBC   #$6600
            CMP   #$0002
            BCC   L01B17D
            LDA   #$0002
L01B17D     ASL
            TAX
            JMP   (L01B16B,X)

L01B182     TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L01B18C     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDY   #$000C
            LDA   [$FD],Y
            LDX   #$0000
            PHX
            PHA
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            JSL   L016FC0
            PLA
            PLX
            LDY   #$0010
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$000E
            STA   [$FD],Y
            LDA   #$0000
            LDY   #$000C
            STA   [$FD],Y
            LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01B1D4     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   L0600C9
            SEC
            SBC   #$0000
            BEQ   L01B1EF
            BVS   L01B1ED
            EOR   #$8000
L01B1ED     BMI   L01B20E
L01B1EF     PEA   $0100
            PEA   ^L02BD63
            PEA   L02BD63
            JSL   L01B75E
            PLY
            PLY
            PLY
            STA   L0600C9
            LDA   #L02BD63
            LDX   #^L02BD63
            STX   L0600CD
            STA   L0600CB
L01B20E     LDY   #$000C
            LDA   [$FD],Y
            CMP   #$0000
            BNE   L01B21B
            BRL   L01B2B3
L01B21B     BCS   L01B220
            BRL   L01B2B3
L01B220     LDA   L0600C9
            SEC
            SBC   #$0000
            BNE   L01B22C
            BRL   L01B2B3
L01B22C     BVS   L01B231
            EOR   #$8000
L01B231     BMI   L01B236
            BRL   L01B2B3
L01B236     LDX   L0600CD
            LDA   L0600CB
            STA   $F2
            STX   $F4
            LDA   [$F2]
            AND   #$00FF
            CMP   #$0000
            BNE   L01B24D
            BRL   L01B2B3
L01B24D     LDX   L0600CD
            LDA   L0600CB
            PHX
            PHA
            CLC
            ADC   #$0001
            STA   L0600CB
            LDA   L0600CD
            BCC   L01B262
            INC
L01B262     STA   L0600CD
            PLA
            PLX
            STA   $F2
            STX   $F4
            LDA   [$F2]
            PHA
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            PHX
            PHA
            CLC
            ADC   #$0001
            LDY   #$000E
            STA   [$FD],Y
            LDY   #$0010
            LDA   [$FD],Y
            BCC   L01B28C
            INC
L01B28C     LDY   #$0010
            STA   [$FD],Y
            PLA
            PLX
            STA   $F2
            STX   $F4
            PLA
            SEP   #$20
            STA   [$F2]
            REP   #$20
            LDY   #$000C
            LDA   [$FD],Y
            DEC
            LDY   #$000C
            STA   [$FD],Y
            LDA   L0600C9
            DEC
            STA   L0600C9
            BRL   L01B20E
L01B2B3     LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01B2C0     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00E8
            TCS
            LDY   #$000A
            LDA   [$FD],Y
            TAX
            LDY   #$0008
            LDA   [$FD],Y
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            TAX
            LDA   [$F2]
            STA   $F2
            STX   $F4
            LDY   #$0002
            LDA   [$F2],Y
            STAL  L02BF0C
            LDY   #$000C
            LDA   [$FD],Y
            LDX   #$0000
            PHA
            TXA
            STAL  L02BF14
            PLA
            STAL  L02BF12
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            PHA
            TXA
            STAL  L02BF10
            PLA
            STAL  L02BF0E
            PEA   $0012
            PEA   ^L02BF0C
            PEA   L02BF0C
            JSL   L017481
            LDA   [$FD]
            AND   #$0020
            TAY
            BNE   L01B379
            LDAL  L02BF18
            TAX
            LDAL  L02BF16
            STA   $EE
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            STX   $EC
            STA   $EA
            BRA   L01B36A
L01B349     LDA   [$EA]
            AND   #$00FF
            CMP   #$000D
            BNE   L01B35C
            LDA   #$000A
            SEP   #$20
            STA   [$EA]
            REP   #$20
L01B35C     LDA   $EE
            DEC   $EE
            LDX   $EC
            LDA   $EA
            INC   $EA
            BNE   L01B36A
            INC   $EC
L01B36A     LDA   $EE
            SEC
            SBC   #$0000
            BEQ   L01B379
            BVS   L01B377
            EOR   #$8000
L01B377     BMI   L01B349
L01B379     LDA   L060002
            CMP   #$004C
            BNE   L01B385
            STZ   $F0
            BRA   L01B38A
L01B385     LDA   L060002
            STA   $F0
L01B38A     LDA   $F0
            CMP   #$0000
            BNE   L01B3D2
            LDY   #$000C
            LDA   [$FD],Y
            LDX   #$0000
            SEC
            SBCL  L02BF16
            PHA
            TXA
            SBCL  L02BF18
            TAX
            PLA
            LDY   #$000C
            STA   [$FD],Y
            LDY   #$0010
            LDA   [$FD],Y
            TAX
            LDY   #$000E
            LDA   [$FD],Y
            CLC
            ADCL  L02BF16
            PHA
            TXA
            ADCL  L02BF18
            TAX
            PLA
            LDY   #$0010
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$000E
            STA   [$FD],Y
            BRA   L01B3D9
L01B3D2     LDA   $F0
            LDY   #$0002
            STA   [$FD],Y
L01B3D9     LDA   $F0
            CMP   #$0000
            BNE   L01B3E5
            LDA   #$0000
            BRA   L01B3E8
L01B3E5     LDA   #$0005
L01B3E8     TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01B3F2     ENT
            PHD
            TSC
            SEC
            SBC   #$00F7
            TCD
            ADC   #$00F0
            TCS
            LDA   #$0000
            TAY
            TDC
            CLC
            ADC   #$00F7
            TCS
            TYA
            PLD
            RTL

L01B40A     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            PEA   $0001
            PEA   $0000
            PEA   ^L02BD56
            PEA   L02BD56
            PEI   $F9
            PEI   $F7
            JSL   L017560
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TAY
            BNE   L01B43A
            LDA   #$FFFF
            BRL   L01B454
L01B43A     LDA   $FB
            BRL   L01B44C
L01B43F     LDA   #$4016
            BRL   L01B454
L01B445     LDA   #$0000
            BRA   L01B454
            BRA   L01B454
L01B44C     CMP   #$6400
            BEQ   L01B445
            JMP   L01B43F

L01B454     TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L01B45E     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00EA
            TCS
            SEC
            LDA   $F7
            SBC   #$0000
            BNE   L01B478
            LDA   $F9
            SBC   #$0000
            BRA   L01B47F
L01B478     LDA   $F9
            SBC   #$0000
            REP   #$02
L01B47F     BEQ   L01B48B
            LDA   [$F7]
            AND   #$00FF
            CMP   #$0000
            BNE   L01B491
L01B48B     LDA   #$4016
            BRL   L01B5DA
L01B491     LDA   $FB
            BRL   L01B5A7
L01B496     LDA   #$4016
            BRL   L01B5DA
L01B49C     PEI   $F9
            PEI   $F7
            PEI   $FF
            PEI   $FD
            JSL   L01B8CD
            PLY
            PLY
            PLY
            PLY
            BRL   L01B5DA
L01B4AF     PEI   $F9
            PEI   $F7
            JSL   L016F12
            PLY
            PLY
            LDX   $F9
            LDA   $F7
            PHA
            TXA
            STAL  L02BEE2
            PLA
            STAL  L02BEE0
            PEA   $0002
            PEA   ^L02BEE0
            PEA   L02BEE0
            JSL   L017481
            PEI   $F9
            PEI   $F7
            JSL   L018A47
            PLY
            PLY
            BRL   L01B5B8
L01B4E2     PEI   $F9
            PEI   $F7
            JSL   L016F12
            PLY
            PLY
            PEI   $FF
            PEI   $FD
            JSL   L016F12
            PLY
            PLY
            LDX   $F9
            LDA   $F7
            PHA
            TXA
            STAL  L02BEE2
            PLA
            STAL  L02BEE0
            LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BEE6
            PLA
            STAL  L02BEE4
            PEA   $0004
            PEA   ^L02BEE0
            PEA   L02BEE0
            JSL   L017481
            PEI   $F9
            PEI   $F7
            JSL   L018A47
            PLY
            PLY
            PEI   $FF
            PEI   $FD
            JSL   L018A47
            PLY
            PLY
            BRL   L01B5B8
L01B538     PEI   $F9
            PEI   $F7
            JSL   L016F12
            PLY
            PLY
            LDX   $F9
            LDA   $F7
            PHA
            TXA
            STAL  L02BEEA
            PLA
            STAL  L02BEE8
            PEA   $0006
            PEA   ^L02BEE8
            PEA   L02BEE8
            JSL   L017481
            LDA   $FB
            CMP   #$6403
            BNE   L01B56F
            LDX   $FF
            LDA   $FD
            STAL  L02BEEE
            BRA   L01B57E
L01B56F     LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BEF2
            PLA
            STAL  L02BEF0
L01B57E     PEA   $0005
            PEA   ^L02BEE8
            PEA   L02BEE8
            JSL   L017481
            PEI   $F9
            PEI   $F7
            JSL   L018A47
            PLY
            PLY
            BRL   L01B5B8
            BRL   L01B5B8
L01B59B     DA    L01B49C
            DA    L01B4AF
            DA    L01B4E2
            DA    L01B538
            DA    L01B538
            DA    L01B496
            MX    %00
L01B5A7     SEC
            SBC   #$6400
            CMP   #$0005
            BCC   L01B5B3
            LDA   #$0005
L01B5B3     ASL
            TAX
            JMP   (L01B59B,X)

L01B5B8     LDA   L060002
            CMP   #$0000
            BNE   L01B5C5
            LDA   #$0000
            BRA   L01B5DA
L01B5C5     LDA   L060002
            PHA
            LDA   #$8000
            PLX
            STX   $F0
            ORA   $F0
            PHA
            LDA   #$4000
            PLX
            STX   $F0
            ORA   $F0
L01B5DA     TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L01B5E4     ENT
            PHD
            TSC
            SEC
            SBC   #$00F1
            TCD
            ADC   #$00E4
            TCS
            PEA   $0001
            PEA   $0000
            PEA   ^L02BD39
            PEA   L02BD39
            PEI   $F9
            PEI   $F7
            JSL   L017560
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TAY
            BEQ   L01B614
            LDA   #$0000
            BRL   L01B754
L01B614     PEA   $0001
            PEA   $0000
            PEA   ^L02BD3F
            PEA   L02BD3F
            PEI   $F9
            PEI   $F7
            JSL   L017560
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TAY
            BEQ   L01B638
            STZ   $EA
            BRL   L01B68A
L01B638     PEA   $0001
            PEA   $0000
            PEA   ^L02BD46
            PEA   L02BD46
            PEI   $F9
            PEI   $F7
            JSL   L017560
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TAY
            BEQ   L01B65E
            LDA   #$0001
            STA   $EA
            BRA   L01B68A
L01B65E     PEA   $0001
            PEA   $0000
            PEA   ^L02BD4E
            PEA   L02BD4E
            PEI   $F9
            PEI   $F7
            JSL   L017560
            TAY
            TSC
            CLC
            ADC   #$000C
            TCS
            TYA
            TAY
            BEQ   L01B684
            LDA   #$0002
            STA   $EA
            BRA   L01B68A
L01B684     LDA   #$FFFF
            BRL   L01B754
L01B68A     LDA   $FB
            CMP   #$6400
            BEQ   L01B697
            LDA   #$4016
            BRL   L01B754
L01B697     LDA   [$FD]
            AND   #$0500
            CMP   #$0500
            BNE   L01B6A7
            LDA   #$4011
            BRL   L01B754
L01B6A7     PEA   $0000
            TDC
            CLC
            ADC   #$00EA
            PHA
            JSL   L019B4F
            PLY
            PLY
            STX   $E8
            STA   $E6
            LDA   $E6
            CMP   #$0000
            BNE   L01B6CE
            LDA   $E8
            CMP   #$0000
            BNE   L01B6CE
            LDA   #$4009
            BRL   L01B754
L01B6CE     LDA   [$FD]
            PHA
            LDA   [$E6]
            PLX
            STX   $F0
            AND   $F0
            AND   #$0003
            PHA
            LDA   [$FD]
            AND   #$0003
            PLX
            STX   $EC
            CMP   $EC
            BEQ   L01B6ED
            LDA   #$400D
            BRA   L01B754
L01B6ED     PEA   $0000
            PEA   $6601
            PEI   $E8
            PEI   $E6
            LDY   #$0006
            LDA   [$E6],Y
            TAX
            LDY   #$0004
            LDA   [$E6],Y
            STA   $EC
            STX   $EE
            LDY   #$0016
            LDA   [$EC],Y
            TAX
            LDY   #$0014
            LDA   [$EC],Y
            STA   $EC
            STX   $EE
            LDA   $EC
            LDX   $EE
            JSL   L0174BF
            PLY
            PLY
            PLY
            PLY
            LDY   #$0006
            LDA   [$E6],Y
            TAX
            LDY   #$0004
            LDA   [$E6],Y
            LDY   #$0006
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0004
            STA   [$FD],Y
            LDY   #$000A
            LDA   [$E6],Y
            TAX
            LDY   #$0008
            LDA   [$E6],Y
            LDY   #$000A
            PHA
            TXA
            STA   [$FD],Y
            PLA
            LDY   #$0008
            STA   [$FD],Y
            LDA   #$0000
L01B754     TAY
            TDC
            CLC
            ADC   #$00F1
            TCS
            TYA
            PLD
            RTL

L01B75E     PHD
            TSC
            SEC
            SBC   #$00F5
            TCD
            ADC   #$00EB
            TCS
            STZ   $EE
L01B76B     LDA   $EE
            SEC
            SBC   $FF
            BVS   L01B775
            EOR   #$8000
L01B775     BPL   L01B77A
            BRL   L01B8C1
L01B77A     PHA
            PEA   $0001
            _ReadChar
            PLA
            SEP   #$20
            STA   $ED
            REP   #$20
            PHA
            LDX   $FD
            LDA   $FB
            INC   $FB
            BNE   L01B7A0
            INC   $FD
L01B7A0     STA   $F0
            STX   $F2
            PLA
            SEP   #$20
            STA   [$F0]
            REP   #$20
            INC   $EE
            LDA   $ED
            AND   #$00FF
            CMP   #$000D
            BNE   L01B7E9
            LDX   $FD
            LDA   $FB
            SEC
            SBC   #$0001
            PHA
            TXA
            SBC   #$0000
            TAX
            PLA
            STA   $F0
            STX   $F2
            LDA   #$000A
            SEP   #$20
            STA   [$F0]
            REP   #$20
            PEA   $000A
            _WriteChar
            BRL   L01B8C1
L01B7E9     LDA   $ED
            AND   #$00FF
            CMP   #$0000
            BNE   L01B81C
            PEA   $000D
            _WriteChar
            PEA   $000A
            _WriteChar
            BRL   L01B8C1
L01B81C     LDA   $ED
            AND   #$00FF
            CMP   #$007F
            BEQ   L01B829
            BRL   L01B8BE
L01B829     LDA   $FB
            BNE   L01B82F
            DEC   $FD
L01B82F     DEC   $FB
            DEC   $EE
            PEA   $0008
            _WriteChar
            PEA   $0020
            _WriteChar
            PEA   $0008
            _WriteChar
            LDA   $EE
            SEC
            SBC   #$0000
            BEQ   L01B8BE
            BVS   L01B879
            EOR   #$8000
L01B879     BPL   L01B8BE
            LDA   $FB
            BNE   L01B881
            DEC   $FD
L01B881     DEC   $FB
            DEC   $EE
            PEA   $0008
            _WriteChar
            PEA   $0020
            _WriteChar
            PEA   $0008
            _WriteChar
L01B8BE     BRL   L01B76B
L01B8C1     LDA   $EE
            TAY
            TDC
            CLC
            ADC   #$00F5
            TCS
            TYA
            PLD
            RTL

L01B8CD     PHD
            TSC
            SEC
            SBC   #$00F3
            TCD
            ADC   #$00E6
            TCS
            STZ   $EA
            PEI   $FF
            PEI   $FD
            JSL   L016F12
            PLY
            PLY
            LDA   [$F9]
            STA   $EC
            LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BEEA
            PLA
            STAL  L02BEE8
            PEA   $0006
            PEA   ^L02BEE8
            PEA   L02BEE8
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01B90F
            BRL   L01B9C5
L01B90F     LDA   $EC
            AND   #$0500
            CMP   #$0500
            BNE   L01B921
            LDA   #$0011
            STA   $EA
            BRL   L01B9C2
L01B921     LDA   $EC
            AND   #$0001
            TAY
            BEQ   L01B933
            LDAL  L02BEEC
            AND   #$0001
            TAY
            BEQ   L01B945
L01B933     LDA   $EC
            AND   #$0002
            TAY
            BEQ   L01B94D
            LDAL  L02BEEC
            AND   #$0002
            TAY
            BNE   L01B94D
L01B945     LDA   #$000D
            STA   $EA
            BRL   L01B9C2
L01B94D     LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BF06
            PLA
            STAL  L02BF04
            PEA   $0010
            PEA   ^L02BF02
            PEA   L02BF02
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01B974
            BRL   L01B9C2
L01B974     LDA   $EC
            AND   #$0200
            TAY
            BNE   L01B97F
            BRL   L01B9C2
L01B97F     LDX   #$0000
            LDA   #$0000
            PHA
            TXA
            STAL  L02BF24
            PLA
            STAL  L02BF22
            LDAL  L02BF02
            STAL  L02BF20
            PEA   $0018
            PEA   ^L02BF20
            PEA   L02BF20
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01B9C2
            LDAL  L02BF02
            STAL  L02BF0C
            PEA   $0014
            PEA   ^L02BF0C
            PEA   L02BF0C
            JSL   L017481
L01B9C2     BRL   L01BA6B
L01B9C5     LDA   L060002
            CMP   #$0046
            BEQ   L01B9D0
            BRL   L01BA6B
L01B9D0     LDA   $EC
            AND   #$0100
            TAY
            BNE   L01B9DB
            BRL   L01BA6B
L01B9DB     LDAL  L02BEEC
            ORA   #$00C3
            STAL  L02BEEC
            LDA   $EC
            AND   #$0020
            TAY
            BEQ   L01B9F7
            LDA   #$0000
            STAL  L02BEEE
            BRA   L01B9FE
L01B9F7     LDA   #$0004
            STAL  L02BEEE
L01B9FE     LDA   #$0000
            STAL  L02BEF8
            STAL  L02BEF6
            PEA   $0001
            PEA   ^L02BEE8
            PEA   L02BEE8
            JSL   L017481
            LDA   L060002
            CMP   #$0000
            BEQ   L01BA21
            BRL   L01BA6B
L01BA21     LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BF06
            PLA
            STAL  L02BF04
            PEA   $0010
            PEA   ^L02BF02
            PEA   L02BF02
            JSL   L017481
            LDA   L060002
            STA   $E8
            LDA   L060002
            CMP   #$0000
            BEQ   L01BA6B
            LDX   $FF
            LDA   $FD
            PHA
            TXA
            STAL  L02BEE2
            PLA
            STAL  L02BEE0
            PEA   $0002
            PEA   ^L02BEE0
            PEA   L02BEE0
            JSL   L017481
            LDA   $E8
            STA   L060002
L01BA6B     PEI   $FF
            PEI   $FD
            JSL   L018A47
            PLY
            PLY
            LDA   L060002
            CMP   #$0000
            BEQ   L01BA95
            LDA   L060002
            PHA
            LDA   #$8000
            PLX
            STX   $F2
            ORA   $F2
            STA   $EA
            LDA   L060002
            LDY   #$0002
            STA   [$F9],Y
            BRA   L01BAA4
L01BA95     LDA   $EA
            CMP   #$0000
            BEQ   L01BAA4
            LDA   #$0000
            LDY   #$0002
            STA   [$F9],Y
L01BAA4     LDA   $EA
            CMP   #$0000
            BNE   L01BB26
            PHX
            PHA
            PEA   $0000
            PEA   $000E
            LDA   L060004
            ORA   #$0F00
            PHA
            PEA   $8300
            PEA   $0000
            PEA   $0000
            _NewHandle
            PLA
            PLX
            LDY   #$000A
            PHA
            TXA
            STA   [$F9],Y
            PLA
            LDY   #$0008
            STA   [$F9],Y
            LDY   #$000A
            LDA   [$F9],Y
            TAX
            LDY   #$0008
            LDA   [$F9],Y
            STA   $EE
            STX   $F0
            LDY   #$0002
            LDA   [$EE],Y
            TAX
            LDA   [$EE]
            STA   $EE
            STX   $F0
            LDAL  L02BF02
            LDY   #$0002
            STA   [$EE],Y
            LDY   #$000A
            LDA   [$F9],Y
            TAX
            LDY   #$0008
            LDA   [$F9],Y
            STA   $EE
            STX   $F0
            LDY   #$0002
            LDA   [$EE],Y
            TAX
            LDA   [$EE]
            STA   $EE
            STX   $F0
            LDA   #$0001
            STA   [$EE]
L01BB26     LDA   $EA
            CMP   #$0000
            BNE   L01BB32
            LDA   #$0000
            BRA   L01BB3D
L01BB32     LDA   $EA
            PHA
            LDA   #$4000
            PLX
            STX   $F2
            ORA   $F2
L01BB3D     TAY
            TDC
            CLC
            ADC   #$00F3
            TCS
            TYA
            PLD
            RTL


