
*---------------------------------------------------------*
*     Disassembled with The Flaming Bird Disassembler     *
*    (c) Phoenix corp. 1992,93  -  All rights reserved    *
*---------------------------------------------------------*

         REL
	 mx	%00

	 use	BIGSEG.X.S
	 
	 use	4/Misc.Macs
	 use	4/Util.Macs
	 
*-------------------------------

         MX    %10
L050000  LDA   ($6C)
         AND   #$80
         CLC
         ADC   #$0F
         STA   ($6C)
         PLP
         RTL

L05000B  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L05001C
         DEC
         STA   ($6C),Y
         BEQ   L05001C
         PLP
         RTL

L05001C  LDA   #$FF
         STA   L024410
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0010
         LDA   ($6C),Y
         BIT   #$01
         BNE   L05004C
         LDA   $5C
         SEC
         SBC   #$03
         STA   $5C
         CMP   #$1E
         BCS   L050064
         CLC
         ADC   #$02
         STA   $5C
         LDY   #$0010
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         JMP   L050064

L05004C  LDA   $5C
         CLC
         ADC   #$02
         STA   $5C
         CMP   #$58
         BCC   L050064
         SEC
         SBC   #$03
         STA   $5C
         LDY   #$0010
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
L050064  LDA   $5C
         LDY   #$0004
         STA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   $64
         LDY   #$0011
         LDA   ($6C),Y
         STA   $5C
         CMP   #$07
         BCS   L0500BD
         AND   #$01
         BNE   L0500A7
         LDA   $64
         INC
         STA   $5C
         CMP   #$5A
         BCC   L0500C9
         DEC   $5C
         LDY   #$0011
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         JMP   L0500C9

L0500A7  LDA   $64
         DEC
         STA   $5C
         CMP   #$1E
         BCS   L0500C9
         INC   $5C
         LDY   #$0011
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         JMP   L0500C9

L0500BD  LDA   $64
         SEC
         SBC   #$0C
         STA   $5C
         BCS   L0500C9
         JMP   L050000

L0500C9  LDA   $5C
         LDY   #$0005
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$000A
         STA   ($6C),Y
         LDA   L02434C
         STA   $64
         LDY   #$0007
         LDA   ($6C),Y
         STA   $5C
         CMP   $64
         BCS   L050105
         LDA   L024428
         AND   #$07
         STZ   $69
         STA   $68
         REP   #$20
         LDA   #L020178
         CLC
         ADC   $68
         STA   $60
         SEP   #$20
         LDA   #$02
         STA   $5C
         LDA   ($60)
         BEQ   L050108
L050105  LDA   L024348
L050108  LDY   #$000B
         STA   ($6C),Y
         LDY   #$0011
         LDA   ($6C),Y
         STA   $5C
         CMP   #$07
         BEQ   L05011A
         PLP
         RTL

L05011A  LDA   #$FF
         STA   L024438
         LDY   #$0011
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         PLP
         RTL

L050129  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L05013C
         DEC
         STA   ($6C),Y
         BEQ   L05013C
         PLP
         RTL

L05013C  LDA   L024E11
         STA   $5C
         CMP   #$07
         BCC   L050148
         JMP   L050000

L050148  LDA   L024E00
         AND   #$7F
         STA   $5C
         CMP   #$14
         BEQ   L050156
         JMP   L05020F

L050156  LDY   #$0010
         LDA   ($6C),Y
         INC
         STA   $5C
         CMP   #$48
         BCC   L050164
         STZ   $5C
L050164  LDA   $5C
         LDY   #$0010
         STA   ($6C),Y
         ASL
         STZ   $69
         STA   $68
         LDA   L024348
         STA   $5C
         CMP   #$04
         BEQ   L050180
         LDA   #$8E
         SEC
         SBC   $68
         STA   $68
L050180  REP   #$20
         LDA   #L0200E8
         CLC
         ADC   $68
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $68
         REP   #$20
         INC   $60
         SEP   #$20
         LDA   ($60)
         STA   $69
         LDA   L024E04
         CLC
         ADC   $68
         STA   $68
         LDA   L024E05
         CLC
         ADC   $69
         STA   $5C
         CMP   #$A0
         BCC   L0501B0
         STZ   $5C
L0501B0  LDA   $5C
         STA   $69
         REP   #$20
         LDA   $68
         LDY   #$0004
         STA   ($6C),Y
         SEP   #$20
         CLC
         ADC   #$01
         STA   $5C
         BMI   L0501D2
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$08
         STA   $5C
         BPL   L0501E0
L0501D2  LDA   $68
         CLC
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         LDA   $68
         STA   $5C
L0501E0  LDA   $5C
         LDY   #$0009
         STA   ($6C),Y
         LDA   $69
         CLC
         ADC   #$06
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         INC
         STA   $69
         CMP   #$64
         BCC   L050209
         PLP
         RTL

L050209  JSL   L031582
         PLP
         RTL

L05020F  LDA   #$FF
         STA   L024438
         LDY   #$0008
         LDA   ($6C),Y
         LDY   #$0009
         CMP   ($6C),Y
         BCC   L050223
         JMP   L050000

L050223  LDA   ($6C)
         AND   #$80
         CLC
         ADC   #$0E
         STA   ($6C)
         PLP
         RTL

L05022E  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L05023F
         DEC
         STA   ($6C),Y
         BEQ   L05023F
         PLP
         RTL

L05023F  REP   #$20
         LDY   #$0010
         LDA   ($6C),Y
         STA   $64
         SEP   #$20
         LDA   $65
         STA   $5C
         CMP   $64
         BCS   L050255
         JMP   L0502F4

L050255  LDY   #$0012
         LDA   ($6C),Y
         STZ   $68
         SEC
         SBC   $64
         STA   $5C
         BCS   L050268
         CLC
         ADC   $65
         INC   $68
L050268  SEC
         SBC   $64
         BCS   L050272
         CLC
         ADC   $65
         INC   $68
L050272  SEC
         SBC   $64
         BCS   L05027C
         CLC
         ADC   $65
         INC   $68
L05027C  SEC
         SBC   $64
         BCS   L050288
         CLC
         ADC   $65
         STA   $5C
         INC   $68
L050288  SEC
         SBC   $64
         BCS   L050292
         CLC
         ADC   $65
         INC   $68
L050292  SEC
         SBC   $64
         BCS   L05029C
         CLC
         ADC   $65
         INC   $68
L05029C  LDY   #$0012
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0013
         LDA   ($6C),Y
         BIT   #$80
         BNE   L0502BB
         LDA   $5C
         CLC
         ADC   $68
         STA   $5C
         JMP   L0502C2

L0502BB  LDA   $5C
         SEC
         SBC   $68
         STA   $5C
L0502C2  LDA   $5C
         LDY   #$0004
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0014
         LDA   ($6C),Y
         BIT   #$80
         BNE   L0502E3
         LDA   $5C
         CLC
         ADC   #$06
         STA   $5C
         JMP   L0502EA

L0502E3  LDA   $5C
         SEC
         SBC   #$06
         STA   $5C
L0502EA  LDA   $5C
         LDY   #$0005
         STA   ($6C),Y
         JMP   L05039A

L0502F4  LDY   #$0012
         LDA   ($6C),Y
         STA   $5C
         STZ   $69
         SEC
         SBC   $65
         STA   $5C
         BCS   L05030B
         CLC
         ADC   $64
         STA   $5C
         INC   $69
L05030B  SEC
         SBC   $65
         BCS   L050317
         CLC
         ADC   $64
         STA   $5C
         INC   $69
L050317  SEC
         SBC   $65
         BCS   L050323
         CLC
         ADC   $64
         STA   $5C
         INC   $69
L050323  SEC
         SBC   $65
         BCS   L05032F
         CLC
         ADC   $64
         STA   $5C
         INC   $69
L05032F  SEC
         SBC   $65
         BCS   L05033B
         CLC
         ADC   $64
         STA   $5C
         INC   $69
L05033B  SEC
         SBC   $65
         BCS   L050345
         CLC
         ADC   $64
         INC   $69
L050345  LDY   #$0012
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0014
         LDA   ($6C),Y
         BIT   #$80
         BNE   L050364
         LDA   $5C
         CLC
         ADC   $69
         STA   $5C
         JMP   L05036B

L050364  LDA   $5C
         SEC
         SBC   $69
         STA   $5C
L05036B  LDA   $5C
         LDY   #$0005
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0013
         LDA   ($6C),Y
         BIT   #$80
         BNE   L05038C
         LDA   $5C
         CLC
         ADC   #$06
         STA   $5C
         JMP   L050393

L05038C  LDA   $5C
         SEC
         SBC   #$06
         STA   $5C
L050393  LDA   $5C
         LDY   #$0004
         STA   ($6C),Y
L05039A  LDY   #$0005
         LDA   ($6C),Y
         STA   $69
         CMP   #$90
         BCC   L0503A8
         JMP   L050000

L0503A8  LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         CMP   #$76
         BCC   L0503B6
         JMP   L050000

L0503B6  LDA   $68
         CLC
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0009
         STA   ($6C),Y
         LDA   $69
         CLC
         ADC   #$02
         LDY   #$000A
         STA   ($6C),Y
         PLP
         RTL

L0503D4  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L0503E7
         DEC
         STA   ($6C),Y
         BEQ   L0503E7
         PLP
         RTL

L0503E7  LDA   L02434C
         ASL
         STA   $5C
         LDX   #L02621F
         STX   $60
         STZ   $5D
         REP   #$20
         LDA   $60
         CLC
         ADC   $5C
         STA   $60
         LDA   ($60)
         STA   $68
         SEP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5C
         JSL   L030473
         LDA   #$FF
         STA   L024410
         JSL   L0504BC
         LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$04
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$08
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$000A
         STA   ($6C),Y
         SEC
         SBC   #$02
         STA   $69
         LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$06
         STA   $68
         LDA   $69
         STA   $5C
         CMP   #$64
         BCC   L050452
         PLP
         RTL

L050452  LDA   L02434C
         STA   $5C
         CMP   #$04
         BNE   L05045E
         JMP   L0504A7

L05045E  LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         LDA   $68
         CLC
         ADC   #$0C
         STA   $68
         LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         JSL   L031582
         PLP
         RTL

L0504A7  LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         CLC
         ADC   #$0C
         STA   $68
         JSL   L031582
         PLP
         RTL

L0504BC  PHP
         SEP   #$20
         LDA   L02434E
         STA   $64
         LDY   #$0007
         LDA   ($6C),Y
         STA   $5C
         CMP   $64
         BCS   L0504E5
         LDA   L024428
         AND   #$07
         STA   $5C
         STZ   $5D
         LDX   $5C
         STX   $60
         LDA   #$02
         STA   $5C
         LDA   L026229,X
         BEQ   L0504EA
L0504E5  LDA   L024348
         STA   $5C
L0504EA  LDY   #$000B
         STA   ($6C),Y
         PLP
         RTL

L0504F1  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050502
         DEC
         STA   ($6C),Y
         BEQ   L050502
         PLP
         RTL

L050502  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         STA   ($6C),Y
         CMP   #$90
         BCC   L050513
         JMP   L050000

L050513  CLC
         ADC   #$04
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$0009
         STA   ($6C),Y
         LDA   #$7F
         LDY   #$0007
         STA   ($6C),Y
         PLP
         RTL

L050539  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L05054A
         DEC
         STA   ($6C),Y
         BEQ   L05054A
         PLP
         RTL

L05054A  LDY   #$0014
         LDA   ($6C),Y
         STA   $60
         LDY   #$0005
         LDA   ($6C),Y
         STA   $61
         REP   #$20
         LDY   #$0012
         LDA   ($6C),Y
         STA   $68
         CLC
         ADC   $60
         STA   $60
         SEP   #$20
         LDA   $60
         LDY   #$0014
         STA   ($6C),Y
         LDA   $61
         LDY   #$0005
         STA   ($6C),Y
         REP   #$20
         LDA   #$0018
         CLC
         ADC   $68
         STA   $60
         LDY   #$0012
         STA   ($6C),Y
         SEP   #$20
         LDY   #$0005
         LDA   ($6C),Y
         STA   $5C
         CMP   #$92
         BCC   L050595
         JMP   L050000

L050595  LDA   $5C
         CLC
         ADC   #$02
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         LDY   #$0010
         LDA   ($6C),Y
         ASL
         STA   $60
         STZ   $61
         LDX   $60
         JMP   (L0505B5,X)

L0505B5  DA    L0505BD
         DA    L0505FA
         DA    L0505DD
         DA    L050630
L0505BD  LDA   $68
         CLC
         ADC   #$05
         STA   $68
         CMP   #$58
         BCS   L0505CB
         JMP   L050662

L0505CB  LDY   #$0010
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0011
         STA   ($6C),Y
         JMP   L050662

L0505DD  LDA   $68
         SEC
         SBC   #$05
         STA   $68
         CMP   #$1E
         BCS   L050662
         LDY   #$0010
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0011
         STA   ($6C),Y
         JMP   L050662

L0505FA  STZ   $65
         LDY   #$0011
         LDA   ($6C),Y
         STA   $64
         REP   #$20
         LDA   #L026231
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   ($60)
         CLC
         ADC   $68
         STA   $68
         INC   $64
         LDY   #$0011
         LDA   $64
         STA   ($6C),Y
         STA   $5C
         CMP   #$11
         BCC   L050662
         LDY   #$0010
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         JMP   L050662

L050630  STZ   $65
         LDY   #$0011
         LDA   ($6C),Y
         STA   $64
         REP   #$20
         LDA   #L026231
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $68
         SEC
         SBC   ($60)
         STA   $68
         INC   $64
         LDA   $64
         LDY   #$0011
         STA   ($6C),Y
         STA   $5C
         CMP   #$11
         BCC   L050662
         LDA   #$00
         LDY   #$0010
         STA   ($6C),Y
L050662  LDA   $68
         STA   $5C
         CMP   #$76
         BCC   L05066D
         JMP   L050000

L05066D  LDA   $68
         LDY   #$0004
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$0009
         STA   ($6C),Y
         PLP
         RTL

L050686  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050697
         DEC
         STA   ($6C),Y
         BEQ   L050697
         PLP
         RTL

L050697  LDA   L02434A
         ASL
         STA   $5C
         LDX   #L0264FE
         STX   $60
         STZ   $5D
         REP   #$20
         LDA   $60
         CLC
         ADC   $5C
         STA   $60
         LDA   ($60)
         STA   $68
         SEP   #$20
         LDY   #$0006
         LDA   ($6C),Y
         STA   $5C
         BNE   L0506C0
         JSL   L030473
L0506C0  LDA   #$FF
         STA   L024410
         JSL   L050721
         LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$04
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$08
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$000A
         STA   ($6C),Y
         SEC
         SBC   #$02
         STA   $5C
         CMP   #$64
         BCC   L0506F6
         PLP
         RTL

L0506F6  LDA   $5C
         STA   $69
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         JSL   L031582
         PLP
         RTL

L050721  PHP
         SEP   #$20
         LDA   L02434C
         STA   $64
         LDY   #$0007
         LDA   ($6C),Y
         STA   $5C
         CMP   $64
         BCS   L050748
         LDA   L024428
         AND   #$07
         STA   $60
         STZ   $61
         LDA   #$02
         STA   $5C
         LDY   $60
         LDA   L0265BF,Y
         BEQ   L05074C
L050748  LDA   #$06
         STA   $5C
L05074C  LDA   $5C
         LDY   #$000B
         STA   ($6C),Y
         PLP
         RTL

L050755  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050766
         DEC
         STA   ($6C),Y
         BEQ   L050766
         PLP
         RTL

L050766  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   ($6C),Y
         CMP   #$92
         BCC   L050777
         JMP   L050000

L050777  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $64
         LDA   L024442
         STA   $5C
         CMP   $64
         PHP
         LDA   #$02
         STA   $64
         PLP
         BCS   L050794
         LDA   #$FE
         STA   $64
L050794  LDA   $64
         LDY   #$0004
         CLC
         ADC   ($6C),Y
         STA   ($6C),Y
         CMP   #$76
         BCC   L0507A5
         JMP   L050000

L0507A5  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0009
         STA   ($6C),Y
         LDA   #$02
         STA   L024E06
         PLP
         RTL

L0507CE  ENT
         PHP
         SEP   #$20
         LDA   L024E00
         AND   #$7F
         STA   $5C
         CMP   #$14
         BEQ   L0507DF
         JMP   L050000

L0507DF  LDA   #$F8
         STA   L024410
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L050800
         LDY   #$000C
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BEQ   L0507F9
         PLP
         RTL

L0507F9  LDA   #$1E
         LDY   #$0011
         STA   ($6C),Y
L050800  LDY   #$0011
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BNE   L05080D
         JMP   L050000

L05080D  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0010
         LDA   ($6C),Y
         LSR
         STA   $64
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         SEC
         SBC   $64
         STA   $5C
         BCS   L050833
         STZ   $5C
L050833  LDA   $5C
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   $64
         CLC
         ADC   $64
         STA   $5C
         BPL   L050848
         LDA   #$7F
         STA   $5C
L050848  LDA   $5C
         LDY   #$0009
         STA   ($6C),Y
         LDA   #$64
         LDY   #$0007
         STA   ($6C),Y
         LDA   #$02
         STA   L024E06
         PLP
         RTL

L05085D  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L05086E
         DEC
         STA   ($6C),Y
         BEQ   L05086E
         PLP
         RTL

L05086E  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         STA   $5C
         CMP   #$90
         BCC   L05087F
         JMP   L050000

L05087F  LDA   $5C
         LDY   #$0005
         STA   ($6C),Y
         LDY   #$0010
         LDA   ($6C),Y
         DEC
         STA   $5C
         BNE   L050893
         JMP   L05091F

L050893  BMI   L050898
         JMP   L05092F

L050898  LDX   L024442
         STX   $60
         LDA   $61
         LDY   #$0005
         SEC
         SBC   ($6C),Y
         SEC
         SBC   #$0F
         STA   $61
         LDA   $60
         STA   $5C
         SEC
         SBC   #$05
         LDY   #$0004
         SEC
         SBC   ($6C),Y
         STA   $5C
         LDA   #$02
         STA   $64
         BCS   L0508C8
         LDA   $5C
         EOR   #$FF
         INC
         STA   $5C
         DEC   $64
L0508C8  LDA   $5C
         CMP   $61
         BCC   L0508F0
         LDA   $64
         LDY   #$0010
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         INC
         INC
         STA   $69
         JSL   L03159E
         JSL   L03159E
L0508F0  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5C
         CMP   #$76
         BCC   L05090B
         JMP   L050000

L05090B  CLC
         LDA   $5C
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0009
         STA   ($6C),Y
         PLP
         RTL

L05091F  LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$06
         LDY   #$0004
         STA   ($6C),Y
         JMP   L0508F0

L05092F  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0004
         STA   ($6C),Y
         JMP   L0508F0

         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050950
         DEC
         STA   ($6C),Y
         BEQ   L050950
         PLP
         RTL

L050950  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $5C
         CMP   #$92
         BCC   L050961
         JMP   L050000

L050961  LDA   $5C
         LDY   #$0005
         STA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0011
         REP   #$20
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         LDY   #$0013
         LDA   ($6C),Y
         STA   $60
         LDY   #$0004
         LDA   ($6C),Y
         STA   $61
         LDY   #$0010
         LDA   ($6C),Y
         BIT   #$01
         BNE   L0509A0
         REP   #$20
         LDA   $60
         CLC
         ADC   $68
         STA   $60
         SEP   #$20
         JMP   L0509AB

L0509A0  REP   #$20
         SEC
         LDA   $60
         SBC   $68
         STA   $60
         SEP   #$20
L0509AB  LDA   $60
         LDY   #$0013
         STA   ($6C),Y
         LDA   $61
         LDY   #$0004
         STA   ($6C),Y
         STA   $5C
         CMP   #$76
         BCC   L0509C2
         JMP   L050000

L0509C2  CLC
         LDA   $5C
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0009
         STA   ($6C),Y
         REP   #$20
         LDA   #$0064
         CLC
         ADC   $68
         STA   $60
         LDY   #$0011
         STA   ($6C),Y
         SEP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         INC
         INC
         STA   $69
         LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         JSL   L031582
         PLP
         RTL

L050A10  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050A21
         DEC
         STA   ($6C),Y
         BEQ   L050A21
         PLP
         RTL

L050A21  LDY   #$0004
         LDA   ($6C),Y
         LDY   #$0010
         CLC
         ADC   ($6C),Y
         STA   $5C
         CMP   #$76
         BCC   L050A35
         JMP   L050000

L050A35  LDA   $5C
         LDY   #$0004
         STA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0009
         STA   ($6C),Y
         REP   #$20
         LDY   #$0011
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         LDY   #$0013
         LDA   ($6C),Y
         STA   $60
         LDY   #$0005
         LDA   ($6C),Y
         STA   $61
         REP   #$20
         LDA   $60
         CLC
         ADC   $68
         STA   $60
         SEP   #$20
         LDA   $60
         LDY   #$0013
         STA   ($6C),Y
         LDA   $61
         LDY   #$0005
         STA   ($6C),Y
         STA   $5C
         CMP   #$92
         BCC   L050A87
         JMP   L050000

L050A87  LDA   $5C
         LDY   #$0005
         STA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$000A
         STA   ($6C),Y
         REP   #$20
         LDA   #$0064
         CLC
         ADC   $68
         STA   $60
         LDY   #$0011
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         LDA   $68
         CLC
         ADC   #$05
         STA   $68
         INC   $69
         INC   $69
         LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         JSL   L031582
         PLP
         RTL

L050AD1  LDA   ($6C)
         AND   #$80
         ORA   #$0E
         STA   ($6C)
         PLP
         RTL

L050ADB  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050AEC
         DEC
         STA   ($6C),Y
         BEQ   L050AEC
         PLP
         RTL

L050AEC  LDA   L02434A
         ASL
         STA   $60
         STZ   $61
         LDY   $60
         LDX   L0265C7,Y
         STX   $68
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5D
         LDY   #$0006
         LDA   ($6C),Y
         STA   $5C
         BNE   L050B0F
         JSL   L030473
L050B0F  LDA   #$FF
         STA   L024410
         JSL   L050B7A
         LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$04
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$08
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$000A
         STA   ($6C),Y
         SEC
         SBC   #$02
         STA   $69
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         CMP   $5D
         BNE   L050B4D
         JMP   L050B75

L050B4D  LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         LDA   L02667F
         BEQ   L050B5F
         JMP   L050B75

L050B5F  LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         JSL   L031582
L050B75  STZ   L02667F
         PLP
         RTL

L050B7A  PHP
         SEP   #$20
         LDA   L02434C
         STA   $64
         LDY   #$0007
         LDA   ($6C),Y
         CMP   $64
         BCS   L050B9F
         LDA   L024428
         AND   #$07
         STA   $60
         STZ   $61
         LDA   #$02
         STA   $5C
         LDY   $60
         LDA   L026677,Y
         BEQ   L050BA3
L050B9F  LDA   #$01
         STA   $5C
L050BA3  LDA   $5C
         LDY   #$000B
         STA   ($6C),Y
         PLP
         RTL

L050BAC  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050BBD
         DEC
         STA   ($6C),Y
         BEQ   L050BBD
         PLP
         RTL

L050BBD  REP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         CLC
         ADC   #$05
         STA   $68
         XBA
         CLC
         ADC   #$02
         STA   $69
         LDX   L024442
         STX   $60
         DEC   $61
         LDA   $60
         SEC
         SBC   $68
         BCS   L050BE4
         EOR   #$FF
         INC
L050BE4  STA   $68
         LDA   $61
         SEC
         SBC   $69
         BCS   L050BF0
         EOR   #$FF
         INC
L050BF0  CMP   #$23
         BCS   L050C25
         LDA   $68
         CMP   #$28
         BCS   L050C25
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         INC
         STA   $69
         LDX   $68
         PHX
         JSL   L03159E
         PLX
         STX   $68
         PHX
         JSL   L03159E
         PLX
         STX   $68
         JSL   L03159E
         JMP   L050AD1

L050C25  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$03
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         CMP   #$92
         BCC   L050C50
         JMP   L050000

L050C50  INC
         INC
         LDY   #$000A
         STA   ($6C),Y
         PLP
         RTL

L050C59  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L050C6A
         DEC
         STA   ($6C),Y
         BEQ   L050C6A
         PLP
         RTL

L050C6A  LDA   L024E00
         AND   #$7F
         CMP   #$14
         BEQ   L050C76
         JMP   L050DB9

L050C76  LDA   #$FF
         STA   L02667F
         LDA   L02434B
         STA   L024E07
         LDA   #$FD
         STA   L024410
         LDA   L024428
         LDY   #$0010
         CLC
         ADC   ($6C),Y
         AND   #$0F
         ASL
         STZ   $61
         STA   $60
         LDA   L024E04
         LDY   $60
         CLC
         ADC   L026680,Y
         STA   $68
         REP   #$20
         INC   $60
         SEP   #$20
         LDA   L024E05
         LDY   $60
         CLC
         ADC   L026680,Y
         STA   $69
         LDA   $68
         CMP   #$76
         BCC   L050CBB
         JMP   L050D46

L050CBB  LDA   $68
         LDY   #$0004
         STA   ($6C),Y
         LDA   $69
         CMP   #$92
         BCC   L050CCB
         JMP   L050D98

L050CCB  LDA   $69
         LDY   #$0005
         STA   ($6C),Y
         LDA   $68
         CLC
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0009
         STA   ($6C),Y
         LDA   $69
         CLC
         ADC   #$04
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$000B
         LDA   ($6C),Y
         CMP   #$02
         BEQ   L050CF9
         PLP
         RTL

L050CF9  LDA   $68
         CMP   #$1A
         BCS   L050D01
         PLP
         RTL

L050D01  CMP   #$5D
         BCC   L050D07
         PLP
         RTL

L050D07  LDA   $69
         CMP   #$14
         BCS   L050D0F
         PLP
         RTL

L050D0F  CMP   #$90
         BCC   L050D15
         PLP
         RTL

L050D15  LDY   #$0011
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BEQ   L050D21
         PLP
         RTL

L050D21  LDA   #$01
         LDY   #$000B
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$04
         STA   $69
         LDA   #$02
         STA   $5C
         JSL   L180A3A
         PLP
         RTL

L050D46  CMP   #$C8
         BCS   L050D72
         LDA   #$75
         LDY   #$0004
         STA   ($6C),Y
         LDA   #$76
         LDY   #$0008
         STA   ($6C),Y
         LDA   #$74
         LDY   #$0009
         STA   ($6C),Y
         LDA   $69
         LDY   #$0005
         STA   ($6C),Y
         LDA   $69
         CLC
         ADC   #$03
         LDY   #$000A
         STA   ($6C),Y
         PLP
         RTL

L050D72  LDA   #$00
         LDY   #$0004
         STA   ($6C),Y
         LDA   #$01
         LDY   #$0008
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0009
         STA   ($6C),Y
         LDA   $69
         LDY   #$0005
         STA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$000A
         STA   ($6C),Y
         PLP
         RTL

L050D98  LDA   #$01
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$02
         LDY   #$000A
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0004
         STA   ($6C),Y
         LDY   #$0008
         STA   ($6C),Y
         LDY   #$0009
         STA   ($6C),Y
         PLP
         RTL

L050DB9  LDA   L024E07
         STA   $5C
         BNE   L050DC3
         JMP   L050AD1
L050DC3  JMP   L050000

L050DC6  ENT
         PHP
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L050DD7
         DEC
         STA   ($6C),Y
         BEQ   L050DD7
         PLP
         RTL

L050DD7  LDY   #$0012
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BNE   L050DE4
         JMP   L050AD1

L050DE4  STZ   $65
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   $69
         LDX   L024442
         STX   $60
         DEC   $61
         LDA   $60
         SEC
         SBC   $68
         STA   $5C
         BCS   L050E13
         INC   $65
         LDA   $5C
         EOR   #$FF
         INC
         STA   $5C
L050E13  LDA   $5C
         STA   $68
         ASL   $65
         LDA   $61
         SEC
         SBC   $69
         STA   $5C
         BCS   L050E29
         INC   $65
         EOR   #$FF
         INC
         STA   $5C
L050E29  LDA   $5C
         STA   $69
         ASL   $65
         CMP   $68
         BCS   L050E3D
         LDA   $68
         STA   $69
         LDA   $5C
         STA   $68
         INC   $65
L050E3D  LDA   $69
         STA   $5C
         CMP   #$28
         BCC   L050E85
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$03
         STA   ($6C),Y
L050E4F  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$02
         STA   $68
         CLC
         ADC   #$02
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   $5C
         CMP   #$92
         BCC   L050E77
         JMP   L050000

L050E77  INC   $5C
         LDA   $5C
         STA   $69
         INC
         LDY   #$000A
         STA   ($6C),Y
         PLP
         RTL

L050E85  LDA   $65
         ASL
         STA   $60
         STZ   $61
         LDX   $60
         JMP   (L050E91,X)

L050E91  DA    L050EA1
         DA    L050ED4
         DA    L050F07
         DA    L050F38
         DA    L050F6B
         DA    L050F9E
         DA    L050FD1
         DA    L051004
L050EA1  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0004
         LDA   ($6C),Y
         STA   $61
         LDY   #$0010
         LDA   ($6C),Y
         STA   $60
         JSL   L051037
         LDA   $61
         LDY   #$0004
         STA   ($6C),Y
         LDA   $60
         LDY   #$0010
         STA   ($6C),Y
         JMP   L050E4F

L050ED4  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0005
         LDA   ($6C),Y
         STA   $61
         LDY   #$0011
         LDA   ($6C),Y
         STA   $60
         JSL   L051037
         LDA   $61
         LDY   #$0005
         STA   ($6C),Y
         LDA   $60
         LDY   #$0011
         STA   ($6C),Y
         JMP   L050E4F

L050F07  LDY   #$0005
         LDA   ($6C),Y
         SEC
         SBC   #$02
         STA   ($6C),Y
         JSL   L051063
         LDY   #$0004
         LDA   ($6C),Y
         STA   $61
         LDY   #$0010
         LDA   ($6C),Y
         STA   $60
         JSL   L051037
         LDA   $61
         LDY   #$0004
         STA   ($6C),Y
         LDA   $60
         LDY   #$0010
         STA   ($6C),Y
         JMP   L050E4F

L050F38  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0005
         LDA   ($6C),Y
         STA   $61
         LDY   #$0011
         LDA   ($6C),Y
         STA   $60
         JSL   L05104D
         LDA   $61
         LDY   #$0005
         STA   ($6C),Y
         LDA   $60
         LDY   #$0011
         STA   ($6C),Y
         JMP   L050E4F

L050F6B  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0004
         LDA   ($6C),Y
         STA   $61
         LDY   #$0010
         LDA   ($6C),Y
         STA   $60
         JSL   L05104D
         LDA   $61
         LDY   #$0004
         STA   ($6C),Y
         LDA   $60
         LDY   #$0010
         STA   ($6C),Y
         JMP   L050E4F

L050F9E  LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0005
         LDA   ($6C),Y
         STA   $61
         LDY   #$0011
         LDA   ($6C),Y
         STA   $60
         JSL   L051037
         LDA   $61
         LDY   #$0005
         STA   ($6C),Y
         LDA   $60
         LDY   #$0011
         STA   ($6C),Y
         JMP   L050E4F

L050FD1  LDY   #$0005
         LDA   ($6C),Y
         SEC
         SBC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0004
         LDA   ($6C),Y
         STA   $61
         LDY   #$0010
         LDA   ($6C),Y
         STA   $60
         JSL   L05104D
         LDA   $61
         LDY   #$0004
         STA   ($6C),Y
         LDA   $60
         LDY   #$0010
         STA   ($6C),Y
         JMP   L050E4F

L051004  LDY   #$0004
         LDA   ($6C),Y
         SEC
         SBC   #$02
         STA   ($6C),Y
         STA   $5C
         JSL   L051063
         LDY   #$0005
         LDA   ($6C),Y
         STA   $61
         LDY   #$0011
         LDA   ($6C),Y
         STA   $60
         JSL   L05104D
         LDA   $61
         LDY   #$0005
         STA   ($6C),Y
         LDA   $60
         LDY   #$0011
         STA   ($6C),Y
         JMP   L050E4F

L051037  LDA   $64
         STA   $65
         STZ   $64
         LSR   $65
         ROR   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         RTL

L05104D  LDA   $64
         STA   $65
         STZ   $64
         LSR   $65
         ROR   $64
         REP   #$20
         LDA   $60
         SEC
         SBC   $64
         STA   $60
         SEP   #$20
         RTL

L051063  LDA   $69
         ROR
         STZ   $65
         SEC
         SBC   $68
         BCS   L051072
         CLC
         ADC   $69
         INC   $64
L051072  SEC
         SBC   $68
         BCS   L05107C
         CLC
         ADC   $69
         INC   $64
L05107C  SEC
         SBC   $68
         BCS   L051086
         CLC
         ADC   $69
         INC   $64
L051086  SEC
         SBC   $68
         STA   $5C
         BCC   L05108E
         RTL

L05108E  INC   $64
         RTL

L051091  ENT
         PHP
         SEP   #$20
         LDY   #$0009
         LDA   ($6C),Y
         LDY   #$0008
         CMP   ($6C),Y
         BCS   L0510A3
         JMP   L0511E0

L0510A3  LDY   #$000C
         LDA   ($6C),Y
         BEQ   L0510AC
         PLP
         RTL

L0510AC  LDY   #$0006
         LDA   ($6C),Y
         DEC
         BPL   L0510B6
         LDA   #$2F
L0510B6  LDY   #$0006
         STA   ($6C),Y
         JSL   L0320D8
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$03
         STA   $69
         CMP   #$90
         BCC   L0510D0
         JMP   L05170A

L0510D0  LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         CMP   #$76
         BCC   L0510DE
         JMP   L05170A

L0510DE  LDA   $68
         CLC
         ADC   #$05
         STA   $68
         JSL   L03204E
         LDY   #$0006
         LDA   ($6C),Y
         STA   $61
         STZ   $60
         REP   #$20
         LSR   $60
         LSR   $60
         LSR   $60
         LDA   $60
         CLC
         ADC   #L270000
         STA   $60
         LDA   #^L270000
         STA   $62
         SEP   #$20
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266CA
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266CC
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266CE
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         LDA   $5C
         ROR
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266D0
         JMP   L05134B

L0511E0  JSL   L0320D8
         JSL   L03219C
         LDA   ($6C)
         AND   #$7F
         STA   ($6C)
         PLP
         RTL

L0511F0  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L0511FC
         PLP
         RTL

L0511FC  LDY   #$0006
         LDA   ($6C),Y
         INC
         CMP   #$30
         BCC   L051208
         LDA   #$00
L051208  LDY   #$0006
         STA   ($6C),Y
         JSL   L0320D8
         REP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         LDA   $68
         CLC
         ADC   #$05
         STA   $68
         JSL   L03204E
         LDY   #$0006
         LDA   ($6C),Y
         STA   $61
         STZ   $60
         REP   #$20
         LDA   $60
         LSR
         LSR
         LSR
         CLC
         ADC   #L270000
         STA   $60
         LDA   #^L270000
         STA   $62
         SEP   #$20
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266CA
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266CC
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266CE
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $68
         STA   $64
         LDA   [$60]
         STA   $5C
         LDX   $60
         INX
         STX   $60
         JSL   L03206C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         ROL
         ROR   $5C
         LDA   $5C
         CLC
         ADC   $69
         STA   $65
         LDX   $64
         STX   L0266D0
         JMP   L05134B

L05134B  LDX   $60
         PHX
         LDX   $62
         PHX
         JSL   L03219C
         LDY   #$000B
         LDA   ($6C),Y
         STA   $60
         STZ   $61
         REP   #$20
         LDA   $60
         ASL
         TAY
         STA   $60
         LDA   L0266D3,Y
         STA   L023D85
         SEP   #$20
         PLX
         STX   $62
         PLX
         STX   $60
         LDX   #$0202
         STX   L024456
         LDX   $60
         STX   $70
         LDX   $62
         STX   $72
         LDA   [$70]
         STA   $5C
         LDY   $70
         INY
         STY   $70
         LDA   $5C
         STA   L0266D2
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         STZ   $61
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D58
         STA   L024D78
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D5C
         STA   L024D7C
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D5A
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D7A
         LDA   $70
         PHA
         LDA   $72
         PHA
         SEP   #$20
         JSL   L181103
         LDA   L0266D2
         STA   $5C
         JSL   L072EE5
         PLX
         STX   $72
         PLX
         STX   $70
         LDA   [$70]
         STA   $5C
         CMP   #$FF
         BNE   L051418
         JMP   L0516B8

L051418  LDY   $70
         INY
         STY   $70
         LDA   $5C
         STA   L0266D2
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         STZ   $61
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D58
         STA   L024D78
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D5C
         STA   L024D7C
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D5A
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D7A
         LDA   $70
         PHA
         LDA   $72
         PHA
         SEP   #$20
         JSL   L181103
         LDA   L0266D2
         STA   $5C
         JSL   L072EE5
         PLX
         STX   $72
         PLX
         STX   $70
         LDA   [$70]
         STA   $5C
         CMP   #$FF
         BNE   L0514AA
         JMP   L0516C7

L0514AA  LDY   $70
         INY
         STY   $70
         LDA   $5C
         STA   L0266D2
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         STZ   $61
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D58
         STA   L024D78
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D5C
         STA   L024D7C
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D5A
         SEP   #$20
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   L024D7A
         LDA   $70
         PHA
         LDA   $72
         PHA
         SEP   #$20
         JSL   L181103
         LDA   L0266D2
         STA   $5C
         JSL   L072EE5
         PLX
         STX   $72
         PLX
         STX   $70
L051531  LDA   [$70]
         STA   $60
         STZ   $61
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   $64
         SEP   #$20
         DEC   $64
         LDX   $64
         STX   L024DB8
         INC   $64
         INC   $64
         LDX   $64
         STX   L024DC0
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         ASL   $60
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   $64
         SEP   #$20
         INC   $65
         INC   $65
         DEC   $64
         DEC   $64
         DEC   $64
         LDX   $64
         STX   L024DBE
         LDA   $64
         CLC
         ADC   #$06
         STA   $64
         LDX   $64
         STX   L024DC6
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         LDA   $60
         CLC
         ADC   $60
         STA   $60
         BCC   L05159F
         JMP   L0516D6

L05159F  REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   $64
         SEP   #$20
         DEC   $64
         LDX   $64
         STX   L024DBA
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         LDA   $60
         CLC
         ADC   $60
         STA   $60
         BCC   L0515C6
         JMP   L0516E7

L0515C6  REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   $64
         SEP   #$20
         DEC   $64
         LDX   $64
         STX   L024DBC
L0515D8  LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         LDA   $60
         CLC
         ADC   $60
         STA   $60
         BCC   L0515ED
         JMP   L0516F0

L0515ED  STZ   $61
         REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   $64
         SEP   #$20
         INC   $64
         LDX   $64
         STX   L024DC2
         LDA   [$70]
         STA   $60
         LDY   $70
         INY
         STY   $70
         LDA   $60
         CLC
         ADC   $60
         STA   $60
         BCC   L051616
         JMP   L051701

L051616  REP   #$20
         LDY   $60
         LDA   L0266CA,Y
         STA   $64
         SEP   #$20
         INC   $64
         LDX   $64
         STX   L024DC4
L051628  LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         LDA   L024459
         LDY   #$0001
         STA   ($6C),Y
         REP   #$20
         LDA   #$0303
         INY
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DB8
         STX   $68
         DEC   $69
         DEC   $68
         DEC   $68
         REP   #$20
         LDA   $68
         LDY   #$0020
         STA   ($6C),Y
         LDA   L024DBA
         LDY   #$0022
         STA   ($6C),Y
         LDA   L024DBC
         LDY   #$0024
         STA   ($6C),Y
         LDX   L024DBE
         STX   $68
         SEP   #$20
         INC   $69
         DEC   $68
         DEC   $68
         REP   #$20
         LDA   $68
         LDY   #$0026
         STA   ($6C),Y
         LDX   L024DC0
         STX   $68
         SEP   #$20
         DEC   $69
         INC   $68
         INC   $68
         REP   #$20
         LDA   $68
         LDY   #$0040
         STA   ($6C),Y
         LDA   L024DC2
         LDY   #$0042
         STA   ($6C),Y
         LDA   L024DC4
         LDY   #$0044
         STA   ($6C),Y
         LDX   L024DC6
         STX   $68
         SEP   #$20
         INC   $69
         INC   $68
         INC   $68
         REP   #$20
         LDA   $68
         LDY   #$0046
         STA   ($6C),Y
         PLP
         RTL

L0516B8  REP   #$20
         LDA   $70
         CLC
         ADC   #$000A
         STA   $70
         SEP   #$20
         JMP   L051531

L0516C7  REP   #$20
         LDA   $70
         CLC
         ADC   #$0005
         STA   $70
         SEP   #$20
         JMP   L051531

L0516D6  LDY   $70
         INY
         STY   $70
         LDX   L024DBE
         STX   L024DBA
         STX   L024DBC
         JMP   L0515D8

L0516E7  LDX   L024DBE
         STX   L024DBC
         JMP   L0515D8

L0516F0  LDY   $70
         INY
         STY   $70
         LDX   L024DC6
         STX   L024DC2
         STX   L024DC4
         JMP   L051628

L051701  LDX   L024DC6
         STX   L024DC4
         JMP   L051628

L05170A  JSL   L03219C
         REP   #$20
         LDA   #$0101
         LDY   #$0002
         STA   ($6C),Y
         SEP   #$20
         LDA   #$E8
         LDY   #$0021
         STA   ($6C),Y
         PLP
         RTL

L051723  ENT
         PHP
         SEP   #$20
         LDA   L024436
         CLC
         ADC   #$80
         STA   L024436
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L05173A
         PLP
         RTL

L05173A  JSL   L0320D8
         LDA   L024480
         STA   $5C
         CMP   #$02
         BCS   L05175F
         LDA   #$01
         STA   L024480
         LDY   #$0005
         LDA   ($6C),Y
         LSR
         LSR
         LSR
         LSR
         LDA   $5C
         CLC
         ADC   #$0A
         STA   $5C
         STA   L024482
L05175F  REP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         LDA   $68
         CLC
         ADC   #$05
         STA   $68
         LDX   $68
         PHX
         JSL   L031E2F
         LDX   $60
         PHX
         LDA   $69
         STA   $60
         STZ   $61
         LDY   $60
         LDA   L020928,Y
         STA   $64
         LDA   L0207E8,Y
         STA   $65
         PLX
         STX   $60
         LDA   $60
         SEC
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DB8
         CLC
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DBA
         SEC
         SBC   $64
         SEC
         SBC   $65
         STA   $60
         SEC
         LDA   $61
         SBC   $65
         STA   $61
         LDX   $60
         STX   L024DBC
         CLC
         LDA   $60
         ADC   $65
         CLC
         ADC   $65
         STA   $60
         LDX   $60
         STX   L024DBE
         PLX
         STX   $68
         INC   $69
         INC   $69
         LDX   $68
         PHX
         JSL   L031E2F
         LDX   $60
         PHX
         LDA   $69
         STA   $60
         STZ   $61
         LDY   $60
         LDA   L0207E8,Y
         STA   $64
         LDA   L020748,Y
         STA   $65
         PLX
         STX   $60
         LDA   $60
         SEC
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DC0
         CLC
         LDA   $60
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DC2
         SEC
         LDA   $60
         SBC   $64
         SEC
         SBC   $65
         STA   $60
         LDA   $61
         SEC
         SBC   $64
         STA   $61
         LDX   $60
         STX   L024DC4
         CLC
         LDA   $60
         ADC   $65
         CLC
         ADC   $65
         STA   $60
         LDX   $60
         STX   L024DC6
         PLX
         STX   $68
         INC   $69
         LDX   $68
         PHX
         JSL   L031E2F
         LDX   $60
         PHX
         LDA   $69
         STA   $60
         STZ   $61
         LDY   $60
         LDA   L020888,Y
         STA   $64
         PLX
         STX   $60
         SEC
         LDA   $60
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DC8
         CLC
         LDA   $60
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DCA
         PLX
         STX   $68
         INC   $69
         INC   $69
         LDX   $68
         PHX
         JSL   L031E2F
         LDX   $60
         PHX
         LDA   $69
         STA   $60
         STZ   $61
         LDY   $60
         LDA   L0209C8,Y
         STA   $64
         PLX
         STX   $60
         SEC
         LDA   $60
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DCC
         CLC
         LDA   $60
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DCE
         PLX
         STX   $68
         INC   $69
         LDX   $68
         PHX
         JSL   L031E2F
         LDX   $60
         PHX
         LDA   $69
         STA   $60
         STZ   $61
         LDY   $60
         LDA   L0207E8,Y
         STA   $64
         PLX
         STX   $60
         SEC
         LDA   $60
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DD0
         CLC
         LDA   $60
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DD2
         PLX
         STX   $68
         INC   $69
         JSL   L031E2F
         LDX   $60
         PHX
         LDA   $69
         STA   $60
         STZ   $61
         LDY   $60
         LDA   L020748,Y
         STA   $64
         PLX
         STX   $60
         SEC
         LDA   $60
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DD4
         CLC
         LDA   $60
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DD6
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DBC
         STX   L024D58
         STX   L024D78
         LDX   L024DB8
         STX   L024D5A
         LDX   L024DD0
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DBE
         STX   L024D58
         STX   L024D78
         LDX   L024DBA
         STX   L024D7A
         LDX   L024DD2
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DC8
         STX   L024D58
         STX   L024D78
         LDX   L024DCC
         STX   L024D5A
         LDX   L024DD0
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DCA
         STX   L024D58
         STX   L024D78
         LDX   L024DCE
         STX   L024D7A
         LDX   L024DD2
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L024DC4
         STX   L024D58
         LDX   L024DC6
         STX   L024D78
         LDX   L024DD4
         STX   L024D5A
         LDX   L024DD6
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DC0
         STX   L024D5A
         LDX   L024DC2
         STX   L024D7A
         LDX   L024DD4
         STX   L024D5C
         LDX   L024DD6
         STX   L024D7C
         LDX   #$0202
         STX   L024456
         JSL   L181103
         JSL   L03219C
         LDA   #$05
         STA   L02445B
         LDX   #$6666
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$06
         STA   L02445B
         LDX   #$2222
         STX   $64
         STX   $66
         JSL   L072F07
         REP   #$20
         LDY   #$000B
         LDA   ($6C),Y
         AND   #$0007
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$01
         STA   L02445B
         REP   #$20
         LDA   L023D85
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         REP   #$20
         LDA   L023D85
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$03
         STA   L02445B
         LDX   #$3333
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         LDX   #$CCCC
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         LDX   L024DBC
         STX   $68
         DEC   $69
         DEC   $68
         REP   #$20
         LDA   $68
         LDY   #$0020
         STA   ($6C),Y
         LDX   L024DB8
         STX   $68
         SEP   #$20
         DEC   $68
         REP   #$20
         LDA   $68
         LDY   #$0022
         STA   ($6C),Y
         LDX   L024DCC
         STX   $68
         SEP   #$20
         DEC   $68
         REP   #$20
         LDA   $68
         LDY   #$0024
         STA   ($6C),Y
         LDX   L024DD4
         STX   $68
         SEP   #$20
         DEC   $68
         INC   $69
         REP   #$20
         LDA   $68
         LDY   #$0026
         STA   ($6C),Y
         LDX   L024DBE
         STX   $68
         SEP   #$20
         DEC   $69
         INC   $68
         REP   #$20
         LDA   $68
         LDY   #$0040
         STA   ($6C),Y
         LDX   L024DBA
         STX   $68
         SEP   #$20
         INC   $68
         REP   #$20
         LDA   $68
         LDY   #$0042
         STA   ($6C),Y
         LDX   L024DCE
         STX   $68
         SEP   #$20
         INC   $68
         REP   #$20
         LDA   $68
         LDY   #$0044
         STA   ($6C),Y
         LDX   L024DD6
         STX   $68
         SEP   #$20
         INC   $69
         INC   $68
         REP   #$20
         LDA   $68
         LDY   #$0046
         STA   ($6C),Y
         SEP   #$20
         LDA   L024459
         LDY   #$0001
         STA   ($6C),Y
         REP   #$20
         LDA   #$0303
         LDY   #$0002
         STA   ($6C),Y
         PLP
         RTL

L051B47  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L051B55
         PLP
         RTL

L051B55  JSL   L0320D8
         LDA   #$01
         STA   L024459
         LDY   #$0004
         LDA   ($6C),Y
         DEC
         DEC
         DEC
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         STA   $69
         JSL   L031E2F
         LDX   $60
         STX   L024DB8
         LDA   $69
         STA   $5C
         STZ   $5D
         LDX   $5C
         STX   $74
         LDA   L020A68,X
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBA
         INC   $68
         INC   $68
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSL   L031E2F
         LDX   $60
         STX   L024DBC
         LDA   $69
         STA   $5C
         STZ   $5D
         LDX   $5C
         STX   $74
         LDA   L0207E8,X
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBE
         LDA   $68
         SEC
         SBC   #$06
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DC0
         LDA   $68
         CLC
         ADC   #$0E
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DC2
         INC   $69
         JSL   L031E2F
         LDX   $60
         STX   L024DC6
         LDA   $68
         SEC
         SBC   #$0E
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DC4
         INC   $68
         INC   $68
         INC   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DC8
         LDA   $68
         CLC
         ADC   #$08
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DCA
         INC   $69
         INC   $69
         LDA   $68
         SEC
         SBC   #$0B
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DCC
         LDA   $68
         CLC
         ADC   #$0E
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DCE
         LDA   $68
         SEC
         SBC   #$07
         STA   $68
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDX   $5C
         STX   $74
         LDA   L0207E8,X
         STA   $64
         LSR
         STA   $65
         LDA   $60
         SEC
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DD0
         LDA   $60
         CLC
         ADC   $64
         CLC
         ADC   $64
         STA   $60
         LDX   $60
         STX   L024DD2
         LDA   $60
         SEC
         SBC   $64
         SEC
         SBC   $65
         STA   $60
         LDA   $61
         SEC
         SBC   $64
         STA   $61
         LDX   $60
         STX   L024DD4
         LDA   $60
         CLC
         ADC   $65
         CLC
         ADC   $65
         STA   $60
         LDX   $60
         STX   L024DD6
         LDA   $61
         CLC
         ADC   $64
         CLC
         ADC   $64
         STA   $61
         LDX   $60
         STX   L024DDA
         LDA   $60
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DD8
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDX   $5C
         STX   $74
         LDA   L0209C8,X
         STA   $64
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DDE
         LDA   $60
         SEC
         SBC   $64
         SEC
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DDC
         INC   $69
         INC   $69
         LDA   $68
         SEC
         SBC   #$09
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DE0
         STZ   $5D
         LDA   $69
         STA   $5C
         LDX   $5C
         STX   $74
         LDA   L0207E8,X
         CLC
         ADC   $60
         STA   $60
         LDA   L020748,X
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDX   $60
         STX   L024DE4
         LDA   $68
         CLC
         ADC   #$12
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DE2
         LDX   $74
         LDA   L0207E8,X
         EOR   #$FF
         INC
         CLC
         ADC   $60
         STA   $60
         LDA   L020748,X
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDX   $60
         STX   L024DE6
         INC   $69
         LDA   $68
         SEC
         SBC   #$09
         STA   $68
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDX   $5C
         STX   $74
         LDA   L0209C8,X
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DEA
         LDA   $60
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE8
         LDX   $74
         LDA   L0207E8,X
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDA   $61
         SEC
         SBC   $65
         STA   $61
         LDX   $60
         STX   L024DEC
         LDA   $61
         CLC
         ADC   $65
         CLC
         ADC   $65
         STA   $61
         LDX   $60
         STX   L024DF0
         LDX   $74
         LDA   L020A68,X
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DF2
         LDX   $74
         LDA   L0207E8,X
         ASL
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDX   $60
         STX   L024DEE
         INC   $69
         INC   $69
         LDA   $68
         SEC
         SBC   #$07
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DF4
         LDA   $68
         CLC
         ADC   #$0E
         STA   $68
         JSL   L031E2F
         LDX   $60
         STX   L024DF6
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DB8
         STX   L024D58
         STX   L024D78
         LDX   L024DEC
         STX   L024D7A
         LDX   L024DE8
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DBA
         STX   L024D58
         STX   L024D78
         LDX   L024DEE
         STX   L024D5A
         LDX   L024DEA
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DBC
         STX   L024D58
         LDX   L024DBE
         STX   L024D78
         LDX   L024DD4
         STX   L024D5A
         LDX   L024DD6
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DBC
         STX   L024D58
         STX   L024D78
         LDX   L024DD4
         STX   L024D7A
         LDX   L024DD0
         STX   L024D5A
         STX   L024D5C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L024DBE
         STX   L024D58
         STX   L024D78
         LDX   L024DD6
         STX   L024D5A
         LDX   L024DD2
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DD4
         STX   L024D58
         LDX   L024DD6
         STX   L024D78
         LDX   L024DD0
         STX   L024D5A
         LDX   L024DD2
         STX   L024D7A
         LDX   L024DD8
         STX   L024D5C
         LDX   L024DDA
         STX   L024D7C
         LDX   #$0202
         STX   L024456
         JSL   L181103
         JSL   L03219C
         LDY   #$000B
         LDA   ($6C),Y
         REP   #$20
         AND   #$0007
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$01
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FFFF
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FCFC
         STA   $64
         LDA   L023D85
         AND   #$CFCF
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$00
         XBA
         LDA   L024349
         REP   #$20
         AND   #$0007
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$03
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FFFF
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$3333
         STA   $64
         LDA   L023D85
         AND   #$CCCC
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$05
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FCFC
         STA   $64
         LDA   L023D85
         AND   #$CFCF
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDX   #$5555
         STX   L023D85
         LDA   #$06
         STA   L02445B
         LDA   L024428
         AND   #$07
         STA   $5C
         JSL   L072EE5
         LDA   #$00
         STA   L02445B
         STZ   L02454A
         LDX   L024DEC
         STX   L024D58
         STX   L024D78
         LDX   L024DE8
         STX   L024D5A
         LDX   L024DF0
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DEE
         STX   L024D58
         STX   L024D78
         LDX   L024DEA
         STX   L024D7A
         LDX   L024DF2
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DC4
         STX   L024D58
         LDX   L024DC8
         STX   L024D78
         LDX   L024DCC
         STX   L024D5A
         LDX   L024DDC
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DCA
         STX   L024D58
         LDX   L024DC6
         STX   L024D78
         LDX   L024DCE
         STX   L024D7A
         LDX   L024DDE
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DC0
         STX   L024D58
         STX   L024D78
         LDX   L024DE4
         STX   L024D7A
         LDX   L024DE0
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L024DC2
         STX   L024D58
         STX   L024D78
         LDX   L024DE6
         STX   L024D5A
         LDX   L024DE2
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DE4
         STX   L024D58
         STX   L024D78
         LDX   L024DE0
         STX   L024D5A
         LDX   L024DF4
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$07
         STA   L02445B
         STZ   L024C4A
         LDX   L024DE6
         STX   L024D58
         STX   L024D78
         LDX   L024DE2
         STX   L024D7A
         LDX   L024DF6
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$00
         STA   L02445B
         LDX   #$1111
         STX   $64
         LDX   #$4444
         STX   $66
         JSL   L072F07
         LDA   #$01
         STA   L02445B
         LDX   #$1111
         STX   $64
         LDX   #$4444
         STX   $66
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         LDX   #$0303
         STX   $64
         LDX   #$3030
         STX   $66
         JSL   L072F07
         LDA   #$03
         STA   L02445B
         LDX   #$0303
         STX   $64
         LDX   #$3030
         STX   $66
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         LDX   #$6666
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$05
         STA   L02445B
         LDX   #$6464
         STX   $64
         LDX   #$4646
         STX   $66
         JSL   L072F07
         LDA   #$06
         STA   L02445B
         LDX   #$6464
         STX   $64
         LDX   #$4646
         STX   $66
         JSL   L072F07
         LDA   #$07
         STA   L02445B
         LDX   #$5A5A
         STX   $64
         LDX   #$A5A5
         STX   $66
         JSL   L072F07
         LDX   L024DB8
         STX   $60
         DEC   $61
         DEC   $60
         DEC   $60
         LDY   #$0020
         REP   #$20
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DC0
         STX   $60
         DEC   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0022
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DE0
         STX   $60
         DEC   $60
         DEC   $60
         REP   #$20
         LDY   #$0024
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DF4
         STX   $60
         INC   $61
         DEC   $60
         DEC   $60
         REP   #$20
         LDY   #$0026
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBA
         STX   $60
         DEC   $61
         INC   $60
         INC   $60
         INC   $60
         REP   #$20
         LDY   #$0040
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DC2
         STX   $60
         INC   $60
         INC   $60
         REP   #$20
         LDY   #$0042
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DE2
         STX   $60
         INC   $60
         INC   $60
         REP   #$20
         LDY   #$0044
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DF6
         STX   $60
         INC   $61
         INC   $60
         INC   $60
         INC   $60
         REP   #$20
         LDY   #$0046
         LDA   $60
         STA   ($6C),Y
         LDA   #$0303
         LDY   #$0002
         STA   ($6C),Y
         SEP   #$20
         LDY   #$0001
         LDA   #$01
         STA   ($6C),Y
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         PLP
         RTL

L052264  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         STA   $5C
         BEQ   L052272
         PLP
         RTL

L052272  LDY   #$0006
         LDA   ($6C),Y
         STA   $5C
         JSL   L0320D8
         INC   $5C
         LDA   $5C
         STA   L024459
         LDY   #$0004
         REP   #$20
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBA
         SEC
         LDA   $60
         SBC   $65
         STA   $60
         SEC
         LDA   $64
         SBC   $65
         STA   $64
         LDX   $60
         STX   L024DB8
         CLC
         LDA   $69
         ADC   #$05
         STA   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020748,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBE
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DBC
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020A68,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC2
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC0
         LDA   $60
         CLC
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC6
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC4
         LDA   $60
         CLC
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L0207E8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DCA
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC8
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         ASL
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DCE
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DCC
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         ASL
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DD2
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DD0
         LDA   $60
         CLC
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L020A68,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DD6
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DD4
         CLC
         LDA   $60
         ADC   $65
         STA   $60
         LDX   $68
         PHX
         LDA   $61
         STA   $68
         LDY   $74
         LDA   L020888,Y
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $69
         LDY   $74
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDA   $69
         STA   $61
         LDX   $60
         STX   L024DDA
         LDA   $68
         STA   $61
         LDX   $60
         STX   L024DDE
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DDC
         LDA   $69
         STA   $61
         LDX   $60
         STX   L024DD8
         LDA   $68
         STA   $61
         CLC
         LDA   $60
         ADC   $65
         STA   $60
         PLX
         STX   $68
         LDY   $74
         LDA   L0209C8,Y
         LSR
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DE2
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE0
         CLC
         LDA   $60
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L0207E8,Y
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDA   L020748,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DE6
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE4
         INC   $69
         INC   $69
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DEA
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE8
         INC   $69
         INC   $69
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020748,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DEE
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DEC
         LDY   #$0004
         LDA   ($6C),Y
         BIT   #$40
         BNE   L052533
         LDX   L024DB8
         STX   L024D58
         STX   L024D78
         LDX   L024DD8
         STX   L024D5A
         LDX   L024DE8
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JMP   L052551

L052533  LDX   L024DBA
         STX   L024D58
         STX   L024D78
         LDX   L024DDA
         STX   L024D7A
         LDX   L024DEA
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
L052551  LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DC4
         STX   L024D58
         LDX   L024DC8
         STX   L024D78
         LDX   L024DDC
         STX   L024D5A
         LDX   L024DE0
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DCA
         STX   L024D58
         LDX   L024DC6
         STX   L024D78
         LDX   L024DE2
         STX   L024D5A
         LDX   L024DDE
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DBC
         STX   L024D58
         LDX   L024DBE
         STX   L024D78
         LDX   L024DE4
         STX   L024D5A
         LDX   L024DE6
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L024DBC
         STX   L024D58
         STX   L024D78
         LDX   L024DE4
         STX   L024D7A
         LDX   L024DE0
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DBE
         STX   L024D58
         STX   L024D78
         LDX   L024DE6
         STX   L024D5A
         LDX   L024DE2
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDY   #$0006
         LDA   ($6C),Y
         STA   $5C
         JSL   L03219C
         LDA   #$01
         STA   L02445B
         LDX   #$AAAA
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         LDX   #$8888
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$03
         STA   L02445B
         LDX   #$8888
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         LDX   #$6666
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$05
         STA   L02445B
         LDX   #$5555
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$06
         STA   L02445B
         LDX   #$5555
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DE4
         STX   L024D58
         LDX   L024DE6
         STX   L024D78
         LDX   L024DEC
         STX   L024D5A
         LDX   L024DEE
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$FFFF
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DE4
         STX   L024D58
         STX   L024D78
         LDX   L024DE0
         STX   L024D5A
         LDX   L024DEC
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$CCCC
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$03
         STA   L02445B
         STX   L02484A
         LDX   L024DE6
         STX   L024D58
         STX   L024D78
         LDX   L024DE2
         STX   L024D7A
         LDX   L024DEE
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$CCCC
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DB8
         STX   L024D58
         STX   L024D78
         LDX   L024DD8
         STX   L024D7A
         LDX   L024DD4
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         REP   #$20
         LDY   #$000B
         LDA   ($6C),Y
         AND   #$0007
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L024DBA
         STX   L024D58
         STX   L024D78
         LDX   L024DDA
         STX   L024D5A
         LDX   L024DD6
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   L023D85
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DD8
         STX   L024D58
         STX   L024D78
         LDX   L024DD4
         STX   L024D5A
         LDX   L024DE8
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         REP   #$20
         LDY   #$000B
         LDA   ($6C),Y
         AND   #$0007
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         AND   #$CCCC
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DDA
         STX   L024D58
         STX   L024D78
         LDX   L024DD6
         STX   L024D7A
         LDX   L024DEA
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         REP   #$20
         LDA   L023D85
         AND   #$CCCC
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DC0
         STX   L024D58
         STX   L024D78
         LDX   L024DCC
         STX   L024D5A
         LDX   L024DD0
         STX   L024D5C
         LDX   L024DD4
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$8888
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DC2
         STX   L024D58
         STX   L024D78
         LDX   L024DCE
         STX   L024D7A
         LDX   L024DD6
         STX   L024D5A
         LDX   L024DD2
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$8888
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L024DB8
         STX   $60
         DEC   $60
         DEC   $60
         DEC   $61
         REP   #$20
         LDA   $60
         LDY   #$0020
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DCC
         STX   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0022
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DD0
         STX   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0024
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DE8
         STX   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0026
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DEC
         STX   $60
         DEC   $60
         DEC   $60
         INC   $61
         REP   #$20
         LDA   $60
         LDY   #$0028
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBA
         STX   $60
         DEC   $61
         INC   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0040
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DCE
         STX   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0042
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DD2
         STX   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0044
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DEA
         STX   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0046
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DEE
         STX   $60
         INC   $60
         INC   $60
         INC   $61
         REP   #$20
         LDA   $60
         LDY   #$0048
         STA   ($6C),Y
         LDA   #$0404
         LDY   #$0002
         STA   ($6C),Y
         SEP   #$20
         LDA   #$01
         DEY
         STA   ($6C),Y
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         PLP
         RTL

L052982  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L05298E
         PLP
         RTL

L05298E  LDY   #$0006
         LDA   ($6C),Y
         BNE   L052999
         JSL   L0320D8
L052999  LDA   #$01
         STA   L024459
         LDY   #$0004
         REP   #$20
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020928,Y
         STA   $64
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBA
         SEC
         SBC   $64
         SEC
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DB8
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020928,Y
         ASL
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBE
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DBC
         CLC
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L0209C8,Y
         STA   $5C
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC2
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC0
         CLC
         ADC   $5C
         STA   $60
         LDY   $74
         LDA   L020888,Y
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC6
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC4
         CLC
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L020748,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DCA
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC8
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020928,Y
         ASL
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DCE
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DCC
         CLC
         ADC   $65
         STA   $60
         LDA   L020928,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DD2
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DD0
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DD6
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DD4
         CLC
         ADC   $65
         STA   $60
         LDA   L0207E8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DE6
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE4
         CLC
         ADC   $65
         STA   $60
         LDX   $68
         PHX
         LDY   $74
         LDA   L020928,Y
         STA   $68
         LDA   $61
         STA   $69
         LDA   L020748,Y
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDA   $60
         CLC
         ADC   $68
         STA   $60
         LDX   $60
         STX   L0266E7
         SEC
         SBC   $68
         SEC
         SBC   $68
         STA   $60
         LDX   $60
         STX   L0266E5
         CLC
         ADC   $68
         STA   $60
         LDA   $69
         STA   $61
         STA   $68
         LDY   $74
         LDA   L020888,Y
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $69
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDA   $69
         STA   $61
         LDX   $60
         STX   L024DDA
         LDA   $68
         STA   $61
         LDX   $60
         STX   L024DEA
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE8
         LDA   $69
         STA   $61
         LDX   $60
         STX   L024DD8
         CLC
         LDA   $60
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L0207E8,Y
         STA   $65
         EOR   #$FF
         INC
         CLC
         ADC   $68
         STA   $68
         LSR   $65
         LDA   $65
         STA   $5C
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DDE
         LDA   $68
         STA   $61
         LDX   $60
         STX   L024DE2
         SEC
         LDA   $60
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DE0
         LDA   $69
         STA   $61
         LDX   $60
         STX   L024DDC
         PLX
         STX   $68
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DEE
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DEC
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020748,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DF2
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DF0
         CLC
         ADC   $65
         STA   $60
         LDY   $74
         LDA   L0209C8,Y
         ASL
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DF6
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DF4
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         ASL
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DFE
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DFC
         CLC
         ADC   $65
         STA   $60
         LSR   $65
         CLC
         ADC   $65
         STA   $60
         LDX   $60
         STX   L024DFA
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DF8
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L0266EB
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L0266E9
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DB8
         STX   L024D58
         STX   L024D78
         LDX   L024DBC
         STX   L024D5A
         LDX   L024DCC
         STX   L024D5C
         LDX   L024DD0
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DBA
         STX   L024D58
         STX   L024D78
         LDX   L024DBE
         STX   L024D7A
         LDX   L024DCE
         STX   L024D7C
         LDX   L024DD2
         STX   L024D5A
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DC4
         STX   L024D58
         STX   L024D78
         LDX   L024DC0
         STX   L024D5A
         LDX   L024DD8
         STX   L024D7A
         LDX   L024DD4
         STX   L024D5C
         STX   L024D7C
         LDX   #$0202
         STX   L024456
         JSL   L181103
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DC6
         STX   L024D58
         STX   L024D78
         LDX   L024DDA
         STX   L024D5A
         LDX   L024DC2
         STX   L024D7A
         LDX   L024DD6
         STX   L024D5C
         STX   L024D7C
         JSL   L181103
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L024DC4
         STX   L024D58
         LDX   L024DC8
         STX   L024D78
         LDX   L024DD8
         STX   L024D5A
         LDX   L024DDC
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DCA
         STX   L024D58
         LDX   L024DC6
         STX   L024D78
         LDX   L024DDE
         STX   L024D5A
         LDX   L024DDA
         STX   L024D7A
         JSL   L181103
         LDA   #$07
         STA   L02445B
         STZ   L024C4A
         LDX   L024DC8
         STX   L024D58
         LDX   L024DCA
         STX   L024D78
         LDX   L024DDC
         STX   L024D5A
         LDX   L024DDE
         STX   L024D7A
         JSL   L181103
         LDY   #$0006
         LDA   ($6C),Y
         BNE   L052E07
         JSL   L03219C
L052E07  REP   #$20
         LDY   #$000B
         LDA   ($6C),Y
         AND   #$0007
         ASL
         TAX
         LDA   L0243B8,X
         STA   L023D85
         SEP   #$20
         LDA   #$01
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$CCCC
         STA   $64
         LDA   L023D85
         AND   #$3333
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$CCCC
         STA   $64
         LDA   L023D85
         AND   #$3333
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$03
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FCFC
         STA   $64
         LDA   L023D85
         AND   #$CFCF
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$04
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FCFC
         STA   $64
         LDA   L023D85
         AND   #$CFCF
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$05
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FFFF
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$06
         STA   L02445B
         REP   #$20
         LDA   L023D85
         AND   #$FFFF
         STA   $64
         STA   $66
         SEP   #$20
         JSL   L072F07
         LDA   #$07
         STA   L02445B
         LDX   #$5555
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DD8
         STX   L024D58
         LDX   L024DDC
         STX   L024D78
         LDX   L024DD4
         STX   L024D5A
         LDX   L024DE0
         STX   L024D7A
         LDX   L024DE4
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$CCCC
         STX   $64
         LDX   #$3333
         STX   $66
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   L024DDE
         STX   L024D58
         LDX   L024DDA
         STX   L024D78
         LDX   L024DE2
         STX   L024D5A
         LDX   L024DE6
         STX   L024D5C
         LDX   L024DD6
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$CCCC
         STX   $64
         LDX   #$3333
         STX   $66
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   L024DEC
         STX   L024D58
         STX   L024D78
         LDX   L024DF4
         STX   L024D5A
         LDX   L024DFC
         STX   L024D5C
         LDX   L024DF8
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$FFFF
         STX   $64
         STX   $66
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   L024DEE
         STX   L024D58
         STX   L024D78
         LDX   L024DFA
         STX   L024D5A
         LDX   L024DF6
         STX   L024D7A
         LDX   L024DFE
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$FFFF
         STX   $64
         STX   $66
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L0266E5
         STX   L024D58
         STX   L024D78
         LDX   L024DD4
         STX   L024D5A
         LDX   L0266E9
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$6666
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DE8
         STX   L024D7A
         LDX   L0266E9
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$8888
         STX   $64
         LDX   #$2222
         STX   $66
         JSL   L072F07
         LDA   #$05
         STA   L02445B
         STZ   L024A4A
         LDX   L0266E7
         STX   L024D58
         STX   L024D78
         LDX   L024DD6
         STX   L024D7A
         LDX   L0266EB
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$6666
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$06
         STA   L02445B
         STZ   L024B4A
         LDX   L024DEA
         STX   L024D5A
         LDX   L0266EB
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$8888
         STX   $64
         LDX   #$2222
         STX   $66
         JSL   L072F07
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DE0
         STX   L024D58
         LDX   L024DE2
         STX   L024D78
         LDX   L024DF0
         STX   L024D5A
         STX   L024D5C
         LDX   L024DF2
         STX   L024D7A
         STX   L024D7C
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$9999
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L024DE4
         STX   L024D5A
         LDX   L024DE6
         STX   L024D7A
         LDX   #$0202
         STX   L024456
         JSL   L181103
         LDX   #$8888
         STX   $64
         LDX   #$2222
         STX   $66
         JSL   L072F07
         LDX   L024DC4
         STX   $60
         DEC   $60
         DEC   $60
         DEC   $61
         REP   #$20
         LDA   $60
         LDY   #$0020
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBC
         STX   $60
         DEC   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0022
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DF4
         STX   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0024
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DFC
         STX   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0026
         STA   ($6C),Y
         SEP   #$20
         LDX   L0266E9
         STX   $60
         DEC   $60
         REP   #$20
         LDA   $60
         LDY   #$0028
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DC6
         STX   $60
         DEC   $61
         INC   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0040
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBE
         STX   $60
         INC   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0042
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DF6
         STX   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0044
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DFE
         STX   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0046
         STA   ($6C),Y
         SEP   #$20
         LDX   L0266EB
         STX   $60
         INC   $60
         REP   #$20
         LDA   $60
         LDY   #$0048
         STA   ($6C),Y
         LDA   #$0404
         LDY   #$0002
         STA   ($6C),Y
         SEP   #$20
         DEY
         LDA   #$01
         STA   ($6C),Y
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         PLP
         RTL

L0531A5  SEP   #$20
         LDA   #$FF
         STA   L024438
         PLP
         RTL

L0531AE  ENT
         PHP
         SEP   #$20
         LDX   #L024E00
         STX   $6C
         LDA   ($6C)
         AND   #$7F
         CMP   #$14
         BEQ   L053211
         LDA   L0257E8
         BNE   L0531A5
         LDA   #$FF
         STA   L0257E8
         LDA   L02443A
         CLC
         ADC   #$10
         STA   ($6C)
         JSL   L180C51
         AND   #$0F
         CLC
         ADC   #$32
         LDY   #$0004
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0005
         STA   ($6C),Y
         LDX   L024348
         STX   $60
         LDA   $61
         LDY   #$0007
         STA   ($6C),Y
         LDA   $60
         LDY   #$000B
         STA   ($6C),Y
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         JSL   L180C51
         AND   #$01
         LDY   #$0010
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0011
         STA   ($6C),Y
L053211  STZ   L024436
         LDA   #$06
         STA   $65
L053218  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         LDA   ($6C)
         STA   $5C
         BNE   L053234
         LDX   $64
         PHX
         JSL   L053243
         PLX
         STX   $64
L053234  DEC   $65
         BNE   L053218
         JSL   L05329D
         LDA   #$01
         STA   L024438
         PLP
         RTL

L053243  INC   L024438
         LDA   L0242FD
         CMP   #$0A
         BCS   L053296
         LDA   L02443A
         CLC
         ADC   #$11
         STA   ($6C)
L053255  LDA   $65
         STA   $64
         LDA   #$06
         SEC
         SBC   $64
         STA   $64
         ASL
         CLC
         ADC   $64
         LDY   #$0010
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0004
         STA   ($6C),Y
L053270  JSL   L180C51
         AND   #$3F
         CMP   #$30
         BCS   L053270
         LDY   #$0006
         STA   ($6C),Y
         LDA   #$04
         LDY   #$0007
         STA   ($6C),Y
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   L02434A
         LDY   #$000B
         STA   ($6C),Y
         RTL

L053296  LDA   #$13
         STA   ($6C)
         JMP   L053255

L05329D  PHP
         SEP   #$20
         LDA   L0250A0
         BEQ   L0532A7
         PLP
         RTL

L0532A7  LDX   #L0250A0
         STX   $6C
         JSL   L180C51
         AND   #$07
         INC
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$16
         STA   ($6C)
L0532BC  JSL   L180C51
         AND   #$7F
         CMP   #$64
         BCS   L0532BC
         CLC
         ADC   #$09
         LDY   #$0004
         STA   ($6C),Y
         STA   $64
         LDA   #$0D
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$01
         LDY   #$0007
         STA   ($6C),Y
L0532DE  JSL   L180C51
         AND   #$3F
         CMP   #$30
         BCS   L0532DE
         LDY   #$0006
         STA   ($6C),Y
         LDA   $64
         CLC
         ADC   #$05
         STA   $64
         LDA   L024442
         STA   $68
         JSL   L180C51
         AND   #$1F
         SEC
         SBC   #$0F
         CLC
         ADC   $68
         SEC
         SBC   $64
         STA   $5C
         BCC   L053316
         LDA   #$01
         LDY   #$0013
         STA   ($6C),Y
         JMP   L053324

L053316  LDA   #$FF
         LDY   #$0013
         STA   ($6C),Y
         LDA   $5C
         EOR   #$FF
         INC
         STA   $5C
L053324  LDA   #$01
         LDY   #$0014
         STA   ($6C),Y
         LDA   $5C
         LDY   #$0010
         STA   ($6C),Y
         LDA   L024443
         SEC
         SBC   #$0C
         LDY   #$0011
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0012
         STA   ($6C),Y
         LDA   L024348
         LDY   #$000B
         STA   ($6C),Y
         PLP
         RTL

L05334E  ENT
         PHP
         SEP   #$20
         STZ   L0257E8
         STZ   L0266C9
         LDA   L02441E
         STA   $5C
         BEQ   L053396
         CMP   #$03
         BEQ   L0533AE
         CMP   #$0A
         BEQ   L0533C6
         CMP   #$17
         BEQ   L0533DE
         JSL   L180D0D
L05336E  LDX   #$FFFF
         PHX
         PEA   ^L05337F
         PEA   L05337F
         _SysFailMgr
L05337F  STR   ' Trouble in bigsp0 '
         JMP   L05336E

L053396  LDX   #$0250
         STX   $64
         LDX   #$2004
         STX   $68
         LDX   #$0405
         STX   L02434A
         LDX   #$1000
         STX   $60
         JMP   L0533F3

L0533AE  LDX   #$0324
         STX   $64
         LDX   #$3A06
         STX   $68
         LDX   #$0504
         STX   L02434A
         LDX   #$1000
         STX   $60
         JMP   L0533F3

L0533C6  LDX   #$0424
         STX   $64
         LDX   #$4006
         STX   $68
         LDX   #$0507
         STX   L02434A
         LDX   #$3000
         STX   $60
         JMP   L0533F3

L0533DE  LDX   #$0440
         STX   $64
         LDX   #$3004
         STX   $68
         LDX   #$0407
         STX   L02434A
         LDX   #$9000
         STX   $60
L0533F3  LDA   $69
         LSR
         LSR
         STA   L02434C
         LDX   $68
         STX   L024348
         REP   #$20
         LDA   $60
         STAL  L1D0188
         LDA   $64
         STAL  L1D0190
         LDX   #L1D0190
         LDY   #L025150
         LDA   #$0004
         PHB
         MVN   L1D0190,L025150
         PLB
         PLP
         RTL

L05341D  ENT
         PHP
         SEP   #$20
         LDA   L024432
         STA   $5C
         BEQ   L053429
         PLP
         RTL

L053429  LDA   #$01
         STA   L024432
         STZ   L024436
         LDA   L024442
         AND   #$40
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   L0201B8
         LDA   L02434C
         ASL
         STA   $60
         STZ   $61
         LDA   L02434D
         STA   $5C
         STA   L0266C8
         LDX   $60
         JMP   (L053454,X)

L053454  DA    L05345E
         DA    L05345E
         DA    L05347D
         DA    L05345E
         DA    L05349A
L05345E  LDX   L0262C1
         STX   L024DB8
         STX   $60
         LDX   #L026E92
         STX   $64
         REP   #$20
         LDA   #L0262C0
         CLC
         ADC   #$0023
         STA   $68
         SEP   #$20
         PLP
         JMPL  L03052A

L05347D  LDX   L02637A
         STX   L024DB8
         LDX   #L026E92
         STX   $64
         REP   #$20
         LDA   #L026379
         CLC
         ADC   #$0023
         STA   $68
         SEP   #$20
         PLP
         JMPL  L03052A

L05349A  LDX   L026243
         STX   L024DB8
         LDX   #L026E92
         STX   $64
         REP   #$20
         LDA   #L026242
         CLC
         ADC   #$0023
         STA   $68
         SEP   #$20
         PLP
         JMPL  L03052A

L0534B7  ENT
         PHP
         SEP   #$20
         LDA   L024E00
         AND   #$7F
         CMP   #$14
         BEQ   L0534EB
         LDA   L024E07
         STA   $5C
         BEQ   L0534D4
         LDA   #$FF
         STA   L024438
         STZ   L024412
         PLP
         RTL

L0534D4  ENT
         LDA   #$01
         STA   L024438
         INC   L02443A
         LDA   #$11
         STA   L024350
         LDA   L024E00
         ORA   #$7F
         STA   L024E00
         PLP
         RTL

L0534EB  LDA   L024E05
         STA   $5C
         CMP   #$64
         BCC   L0534F6
         PLP
         RTL

L0534F6  LDA   L02434C
         ASL
         STA   $60
         STZ   $61
         LDX   $60
         JMP   (L053503,X)

L053503  DA    L05351B
         DA    L0535D1
         DA    L05368F
         DA    L05350D
         DA    L053514
L05350D  JSL   L05351A
         JMP   L053732

L053514  PLP
         RTL

L053516  HEX   01040506
L05351A  PHP
L05351B  SEP   #$20
         JSL   L180C51
         AND   #$07
         STA   $5C
         BEQ   L053529
         PLP
         RTL

L053529  LDA   #$02
         STA   $64
         STA   L024438
         LDA   L024E60
         STA   $65
         LDA   L024EC0
         ORA   $65
         STA   $5C
         BEQ   L053540
         PLP
         RTL

L053540  LDA   L024432
         CLC
         ADC   $64
         STA   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$02
         STA   $65
L053552  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BNE   L05355F
         JSL   L053579
L05355F  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L053552
         LDA   #$02
         STA   L024438
         PLP
         RTL

L053579  LDA   L024438
         STA   $5C
         BNE   L053581
         RTL

L053581  DEC   $5C
         LDA   $5C
         STA   L024438
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$15
         STA   ($6C)
         LDA   L024E04
         SEC
         SBC   #$0D
         STA   $64
         LDA   L024438
         ASL
         ASL
         ASL
         ASL
         CLC
         ADC   $64
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$04
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$7F
         LDY   #$0007
         STA   ($6C),Y
         LDA   L024428
         AND   #$03
         STA   $60
         STZ   $61
         LDX   $60
         LDAL  L053516,X
         LDY   #$000B
         STA   ($6C),Y
         RTL

L0535D1  SEP   #$20
         JSL   L180C51
         AND   #$07
         BEQ   L0535DD
         PLP
         RTL

L0535DD  LDA   #$03
         STA   $64
         STA   L024438
         LDA   L024E60
         STA   $65
         LDA   L024EC0
         ORA   $65
         STA   $65
         LDA   L024F20
         ORA   $65
         STA   $5C
         BEQ   L0535FB
         PLP
         RTL

L0535FB  LDA   L024432
         CLC
         ADC   $64
         STA   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$03
         STA   $65
L05360D  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BNE   L05361A
         JSL   L053634
L05361A  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L05360D
         LDA   #$01
         STA   L024438
         PLP
         RTL

L053634  LDA   L024438
         STA   $5C
         BNE   L05363C
         RTL

L05363C  DEC   $5C
         LDA   $5C
         STA   L024438
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$15
         STA   ($6C)
         LDA   L024E04
         SEC
         SBC   #$15
         STA   $64
         LDA   L024438
         ASL
         ASL
         ASL
         ASL
         CLC
         ADC   $64
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$04
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$7F
         LDY   #$0007
         STA   ($6C),Y
         LDA   L024428
         CLC
         ADC   #$03
         STA   $60
         STZ   $61
         LDX   $60
         LDAL  L053516,X
         STA   $5C
         LDY   #$000B
         STA   ($6C),Y
         RTL

L05368F  SEP   #$20
         LDA   L0257E7
         STA   $5C
         BEQ   L05369A
         PLP
         RTL

L05369A  LDA   L024E05
         STA   $5C
         CMP   #$5E
         BCC   L0536A5
         PLP
         RTL

L0536A5  LDX   #L024E00
         STX   $6C
         LDA   #$08
         STA   $65
L0536AE  LDA   ($6C)
         STA   $5C
         BEQ   L0536C6
         REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         DEC   $65
         BNE   L0536AE
         PLP
         RTL

L0536C6  LDA   #$16
         STA   ($6C)
         LDA   L024E04
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$03
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$01
         LDY   #$0007
         STA   ($6C),Y
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         JSL   L180C51
         AND   #$E0
         STA   $60
         STZ   $61
         REP   #$20
         ASL   $60
         SEP   #$20
         DEC   $61
         REP   #$20
         LDA   $60
         LDY   #$0012
         STA   ($6C),Y
         SEP   #$20
         LDA   #$00
         LDY   #$0014
         STA   ($6C),Y
         LDA   L024E04
         STA   $5C
         CMP   #$40
         JSL   L180C51
         AND   #$01
         STA   $5C
         BNE   L053729
         LDA   #$00
         LDY   #$0010
         STA   ($6C),Y
         PLP
         RTL

L053729  LDA   #$02
         LDY   #$0010
         STA   ($6C),Y
         PLP
         RTL

L053732  LDA   L0257E7
         STA   $5C
         BEQ   L05373B
         PLP
         RTL

L05373B  LDA   L024E05
         SEC
         SBC   #$32
         STA   $5C
         CMP   #$5E
         BCC   L053749
         PLP
         RTL

L053749  LDX   #L024F20
         STX   $6C
         LDA   #$05
         STA   $65
L053752  LDA   ($6C)
         STA   $5C
         BEQ   L05376A
         REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         DEC   $65
         BNE   L053752
         PLP
         RTL

L05376A  LDA   #$16
         STA   ($6C)
         LDA   L024E04
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$03
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$01
         LDY   #$0007
         STA   ($6C),Y
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         JSL   L180C51
         AND   #$E0
         STA   $60
         STZ   $61
         REP   #$20
         ASL   $60
         SEP   #$20
         DEC   $61
         REP   #$20
         LDA   $60
         LDY   #$0012
         STA   ($6C),Y
         SEP   #$20
         LDA   #$00
         LDY   #$0014
         STA   ($6C),Y
         LDA   L024E04
         STA   $5C
         CMP   #$40
         JSL   L180C51
         AND   #$01
         BNE   L0537CB
         LDA   #$00
         LDY   #$0010
         STA   ($6C),Y
         PLP
         RTL

L0537CB  LDA   #$02
         LDY   #$0010
         STA   ($6C),Y
         PLP
         RTL

L0537D4  ENT
         PHP
         SEP   #$20
         LDA   #$01
         STA   L0266C9
         LDA   L02441E
         STA   $5C
         CMP   #$01
         BNE   L0537E8
         JMP   L05385A

L0537E8  CMP   #$02
         BNE   L0537EF
         JMP   L053877

L0537EF  CMP   #$04
         BNE   L0537F6
         JMP   L053894

L0537F6  CMP   #$05
         BNE   L0537FD
         JMP   L0538B1

L0537FD  CMP   #$06
         BNE   L053804
         JMP   L0538CE

L053804  CMP   #$09
         BNE   L05380B
         JMP   L0538EB

L05380B  CMP   #$0B
         BNE   L053812
         JMP   L053908

L053812  CMP   #$0C
         BNE   L053819
         JMP   L053925

L053819  CMP   #$11
         BNE   L053820
         JMP   L053942

L053820  CMP   #$12
         BNE   L053827
         JMP   L05395F

L053827  CMP   #$19
         BNE   L05382E
         JMP   L05397C

L05382E  JSL   L180D0D
L053832  LDX   #$FFFF
         PHX
         PEA   ^L053843
         PEA   L053843
         _SysFailMgr
L053843  STR   ' Trouble in bigsp1 '
         JMP   L053832

L05385A  REP   #$20
         LDA   #$5000
         STAL  L1D031D
         LDA   #$0504
         STA   $64
         LDA   #$0250
         STA   $68
         LDA   #$7804
         STA   $60
         SEP   #$20
         JMP   L053999

L053877  REP   #$20
         LDA   #$1000
         STAL  L1D031D
         LDX   #$0504
         STX   $64
         LDX   #$0220
         STX   $68
         LDX   #$3C00
         STX   $60
         SEP   #$20
         JMP   L053999

L053894  REP   #$20
         LDA   #$1000
         STAL  L1D031D
         LDX   #$0406
         STX   $64
         LDX   #$0220
         STX   $68
         LDX   #$4C02
         STX   $60
         SEP   #$20
         JMP   L053999

L0538B1  REP   #$20
         LDA   #$2000
         STAL  L1D031D
         LDX   #$0504
         STX   $64
         LDX   #$0200
         STX   $68
         LDX   #$5001
         STX   $60
         SEP   #$20
         JMP   L053999

L0538CE  REP   #$20
         LDA   #$2000
         STAL  L1D031D
         LDX   #$0605
         STX   $64
         LDX   #$0300
         STX   $68
         LDX   #$5003
         STX   $60
         SEP   #$20
         JMP   L053999

L0538EB  REP   #$20
         LDA   #$1000
         STAL  L1D031D
         LDX   #$0406
         STX   $64
         LDX   #$0307
         STX   $68
         LDX   #$7802
         STX   $60
         SEP   #$20
         JMP   L053999

L053908  REP   #$20
         LDA   #$3000
         STAL  L1D031D
         LDX   #$0504
         STX   $64
         LDX   #$0310
         STX   $68
         LDX   #$9000
         STX   $60
         SEP   #$20
         JMP   L053999

L053925  REP   #$20
         LDA   #$1000
         STAL  L1D031D
         LDX   #$0406
         STX   $64
         LDX   #$0310
         STX   $68
         LDX   #$9002
         STX   $60
         SEP   #$20
         JMP   L053999

L053942  REP   #$20
         LDA   #$2000
         STAL  L1D031D
         LDX   #$0605
         STX   $64
         LDX   #$030A
         STX   $68
         LDX   #$9003
         STX   $60
         SEP   #$20
         JMP   L053999

L05395F  REP   #$20
         LDA   #$2000
         STAL  L1D031D
         LDX   #$0504
         STX   $64
         LDX   #$030A
         STX   $68
         LDX   #$B001
         STX   $60
         SEP   #$20
         JMP   L053999

L05397C  REP   #$20
         LDA   #$9000
         STAL  L1D031D
         LDX   #$0605
         STX   $64
         LDX   #$0420
         STX   $68
         LDX   #$8003
         STX   $60
         SEP   #$20
         JMP   L053999

L053999  LDX   $64
         STX   L024348
         REP   #$20
         LDA   $68
         STAL  L1D0325
         SEP   #$20
         LDA   $61
         LSR
         LSR
         STA   L02434E
         LDX   $60
         STX   L02434C
         REP   #$20
         LDX   #L1D0325
         LDY   #L025150
         LDA   #$0006
         PHB
         MVN   L1D0325,L025150
         PLB
         LDA   #$0001
         STA   L024412
         PLP
         RTL

L0539CC  ENT
         PHP
         SEP   #$20
         LDA   L024432
         BEQ   L0539D6
         PLP
         RTL

L0539D6  LDA   #$01
         STA   L024432
         STZ   L024436
         LDA   L024442
         AND   #$40
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   L0201B8
         LDX   L026507
         STX   L024DB8
         LDX   #L026E92
         STX   $64
         REP   #$20
         LDA   #L026506
         CLC
         ADC   #$0023
         STA   $68
         SEP   #$20
         LDA   L02434B
         STA   L0266C8
         PLP
         JMPL  L03052A

L053A0F  ENT
         PHP
         SEP   #$20
         LDA   L024E00
         AND   #$7F
         STA   $5C
         CMP   #$14
         BEQ   L053A45
         LDA   L024E07
         STA   $5C
         BEQ   L053A2E
         LDA   #$FF
         STA   L024438
         STZ   L024412
         PLP
         RTL

L053A2E  LDA   #$01
         STA   L024438
         INC   L02443A
         LDA   L024E00
         ORA   #$7F
         STA   L024E00
         LDA   #$11
         STA   L024350
         PLP
         RTL

L053A45  LDA   L02434A
         ASL
         STA   $60
         STZ   $61
         LDX   $60
         JMP   (L053A52,X)

L053A52  DA    L053A5A
         DA    L053B00
         DA    L053BCC
         DA    L053C8D
L053A5A  SEP   #$20
         LDA   L024E05
         STA   $5C
         CMP   #$64
         BCC   L053A67
         PLP
         RTL

L053A67  LDA   L024E06
         STA   $5C
         BEQ   L053A74
         DEC
         STA   L024E06
         PLP
         RTL

L053A74  LDA   L024428
         AND   #$3F
         STA   $5C
         BEQ   L053A7F
         PLP
         RTL

L053A7F  LDA   L024E60
         STA   $5C
         BEQ   L053A88
         PLP
         RTL

L053A88  LDA   #$03
         STA   L024E06
         LDA   #$01
         STA   L024438
         INC   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$01
         STA   $65
L053A9E  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BNE   L053AAB
         JSL   L053AC5
L053AAB  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L053A9E
         LDA   #$03
         STA   L024438
         PLP
         RTL

L053AC5  LDA   L024438
         STA   $5C
         BNE   L053ACD
         RTL

L053ACD  DEC   $5C
         LDA   $5C
         STA   L024438
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$17
         LDY   #$0000
         STA   ($6C),Y
         LDA   L024E04
         SEC
         SBC   #$05
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$03
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$1E
         LDY   #$0007
         STA   ($6C),Y
         RTL

L053B00  SEP   #$20
         LDA   L024E05
         STA   $5C
         CMP   #$64
         BCC   L053B0D
         PLP
         RTL

L053B0D  LDA   L024E06
         STA   $5C
         BEQ   L053B1D
         DEC   $5C
         LDA   $5C
         STA   L024E06
         PLP
         RTL

L053B1D  LDA   L024428
         AND   #$3F
         STA   $5C
         BEQ   L053B28
         PLP
         RTL

L053B28  LDA   L024432
         STA   $5C
         CMP   #$02
         BCC   L053B33
         PLP
         RTL

L053B33  LDA   #$03
         STA   L024E06
         LDA   #$07
         STA   L024438
         LDA   #$08
         STA   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$07
         STA   $65
L053B4B  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BNE   L053B58
         JSL   L053B72
L053B58  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L053B4B
         LDA   #$03
         STA   L024438
         PLP
         RTL

L053B72  LDA   L024438
         STA   $5C
         BNE   L053B7A
         RTL

L053B7A  DEC   $5C
         LDA   $5C
         STA   L024438
         EOR   #$FF
         INC
         CLC
         ADC   #$06
         ASL
         INC
         STA   $64
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$18
         STA   ($6C)
         LDA   L024E04
         SEC
         SBC   #$05
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$0D
         CLC
         ADC   $64
         CLC
         ADC   $64
         CLC
         ADC   $64
         CLC
         ADC   $64
         LDY   #$0005
         STA   ($6C),Y
         LDA   $64
         ASL
         ASL
         CLC
         ADC   #$08
         STA   $5C
         LDY   #$0010
         STA   ($6C),Y
         LDA   #$64
         LDY   #$0007
         STA   ($6C),Y
         RTL

L053BCC  SEP   #$20
         LDA   L024E05
         STA   $5C
         CMP   #$64
         BCC   L053BD9
         PLP
         RTL

L053BD9  LDA   L024E06
         STA   $5C
         BEQ   L053BE9
         DEC   $5C
         LDA   $5C
         STA   L024E06
         PLP
         RTL

L053BE9  LDA   L024428
         AND   #$3F
         STA   $5C
         BEQ   L053BF4
         PLP
         RTL

L053BF4  LDA   L024E60
         STA   $64
         LDA   L024EC0
         STA   $65
         LDA   L024F20
         ORA   $64
         ORA   $65
         STA   $5C
         BEQ   L053C0B
         PLP
         RTL

L053C0B  LDA   #$0C
         STA   L024E06
         LDA   #$03
         STA   L024438
         LDA   L024432
         CLC
         ADC   #$03
         STA   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$03
         STA   $65
L053C27  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BNE   L053C34
         JSL   L053C4E
L053C34  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L053C27
         LDA   #$03
         STA   L024438
         PLP
         RTL

L053C4E  LDA   L024438
         STA   $5C
         BNE   L053C56
         RTL

L053C56  DEC   $5C
         LDA   $5C
         STA   L024438
         ASL
         ASL
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$15
         STA   ($6C)
         LDA   L024E04
         SEC
         SBC   #$05
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$03
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$02
         LDY   #$0007
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0010
         STA   ($6C),Y
         RTL

L053C8D  SEP   #$20
         LDA   L024E05
         STA   $5C
         CMP   #$64
         BCC   L053C9A
         PLP
         RTL

L053C9A  LDA   L024E06
         STA   $5C
         BEQ   L053CA7
         DEC
         STA   L024E06
         PLP
         RTL

L053CA7  LDA   L024428
         AND   #$07
         STA   $5C
         BEQ   L053CB2
         PLP
         RTL

L053CB2  LDA   L024432
         STA   $5C
         CMP   #$06
         BCC   L053CBD
         PLP
         RTL

L053CBD  LDA   #$01
         STA   L024438
         INC   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$05
         STA   $65
L053CCE  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BNE   L053CDB
         JSL   L053CF5
L053CDB  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L053CCE
         LDA   #$02
         STA   L024438
         PLP
         RTL

L053CF5  LDA   L024438
         STA   $5C
         BNE   L053CFD
         RTL

L053CFD  DEC   $5C
         LDA   $5C
         STA   L024438
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$16
         STA   ($6C)
         LDA   #$04
         LDY   #$000B
         STA   ($6C),Y
         JSL   L180C51
         AND   #$01
         PHP
         STA   $5C
         LDA   #$FD
         STA   $68
         PLP
         BNE   L053D2A
         LDA   #$03
         STA   $68
L053D2A  LDA   L024E04
         SEC
         SBC   #$05
         LDY   #$0004
         STA   ($6C),Y
         LDA   $68
         LDY   #$0010
         STA   ($6C),Y
         LDA   L024E05
         CLC
         ADC   #$03
         LDY   #$0005
         STA   ($6C),Y
         JSL   L180C51
         LDY   #$0011
         STA   ($6C),Y
         JSL   L180C51
         AND   #$03
         LDY   #$0012
         STA   ($6C),Y
         LDA   #$80
         LDY   #$0013
         STA   ($6C),Y
         LDA   #$02
         LDY   #$0007
         STA   ($6C),Y
         RTL

L053D6A  ENT
         PHP
         SEP   #$20
         LDA   #$02
         STA   L0266C9
         LDA   L02441E
         STA   $5C
         CMP   #$07
         BEQ   L053DC8
         CMP   #$08
         BEQ   L053DDA
         CMP   #$0E
         BEQ   L053DEC
         CMP   #$0F
         BEQ   L053DFE
         CMP   #$14
         BNE   L053D8E
         JMP   L053E10

L053D8E  CMP   #$16
         BNE   L053D95
         JMP   L053E22

L053D95  CMP   #$1B
         BNE   L053D9C
         JMP   L053E34

L053D9C  JSL   L180D0D
L053DA0  LDX   #$FFFF
         PHX
         PEA   ^L053DB1
         PEA   L053DB1
         _SysFailMgr
L053DB1  STR   ' Trouble in bigsp2 '
         JMP   L053DA0

L053DC8  LDX   #$0320
         STX   $64
         LDX   #$6001
         STX   $68
         LDX   #$2000
         STX   $60
         JMP   L053E46

L053DDA  LDX   #$0305
         STX   $64
         LDX   #$6000
         STX   $68
         LDX   #$1000
         STX   $60
         JMP   L053E46

L053DEC  LDX   #$0320
         STX   $64
         LDX   #$6001
         STX   $68
         LDX   #$2000
         STX   $60
         JMP   L053E46

L053DFE  LDX   #$0405
         STX   $64
         LDX   #$9002
         STX   $68
         LDX   #$2000
         STX   $60
         JMP   L053E46

L053E10  LDX   #$040A
         STX   $64
         LDX   #$B003
         STX   $68
         LDX   #$3000
         STX   $60
         JMP   L053E46

L053E22  LDX   #$0403
         STX   $64
         LDX   #$6001
         STX   $68
         LDX   #$2000
         STX   $60
         JMP   L053E46

L053E34  LDX   #$0418
         STX   $64
         LDX   #$8001
         STX   $68
         LDX   #$9000
         STX   $60
         JMP   L053E46

L053E46  REP   #$20
         LDA   $64
         STAL  L1D04BC
         SEP   #$20
         LDA   $69
         LSR
         LSR
         STA   L02434C
         LDX   $68
         STX   L02434A
         REP   #$20
         LDA   $60
         STAL  L1D04B4
         LDX   #L1D04BC
         LDY   #L025150
         LDA   #$0006
         PHB
         MVN   L1D04BC,L025150
         PLB
         LDA   #$0001
         STA   L024412
         PLP
         RTL

L053E7A  ENT
         PHP
         SEP   #$20
         LDA   L024432
         STA   $5C
         BEQ   L053E86
         PLP
         RTL

L053E86  LDA   #$01
         STA   L024432
         STZ   L024436
         LDA   L024442
         AND   #$40
         LSR
         LSR
         LSR
         LSR
         LSR
         LSR
         STA   L0201B8
         LDA   L02434A
         STA   $5C
         BNE   L053ECB
         LDA   #$17
         STA   L024E60
         STA   L024EC0
         LDA   #$3C
         STA   L024E67
         STA   L024EC7
         LDA   #$01
         STA   L024E6B
         STA   L024ECB
         LDA   #$00
         STA   L024E6C
         STA   L024ECC
         STA   L024E70
         LDA   #$08
         STA   L024ED0
L053ECB  LDX   L0265D0
         STX   L024DB8
         LDX   #L026E92
         STX   $64
         LDX   #L0265CF
         STX   $68
         REP   #$20
         LDA   $68
         CLC
         ADC   #$0023
         STA   $68
         SEP   #$20
         LDA   L02434B
         STA   L0266C8
         PLP
         JMPL  L03052A

L053EF2  ENT
         PHP
         SEP   #$20
         LDA   L024E00
         AND   #$7F
         CMP   #$14
         BEQ   L053F24
         LDA   L024E07
         BEQ   L053F0D
         LDA   #$FF
         STA   L024438
         STZ   L024412
         PLP
         RTL

L053F0D  LDA   #$01
         STA   L024438
         INC   L02443A
         LDA   L024E00
         ORA   #$7F
         STA   L024E00
         LDA   #$11
         STA   L024350
         PLP
         RTL

L053F24  LDA   L02434A
         ASL
         STA   $60
         STZ   $61
         LDX   $60
         JMP   (L053F31,X)

L053F31  DA    L053F35
         DA    L053F72
L053F35  LDA   L024428
         AND   #$1F
         BEQ   L053F3E
         PLP
         RTL

L053F3E  LDA   L024E6B
         CMP   #$02
         BEQ   L053F56
         LDA   #$02
         STA   L024E6B
         JSL   L180C51
         AND   #$03
         CLC
         ADC   #$08
         STA   L024E71
L053F56  LDA   L024ECB
         CMP   #$02
         BNE   L053F5F
         PLP
         RTL

L053F5F  LDA   #$02
         STA   L024ECB
         JSL   L180C51
         AND   #$03
         CLC
         ADC   #$08
         STA   L024ED1
         PLP
         RTL

L053F72  LDA   L024E05
         CMP   #$46
         BCC   L053F7B
         PLP
         RTL

L053F7B  JSL   L180C51
         AND   #$03
         BEQ   L053F85
         PLP
         RTL

L053F85  LDA   #$01
         STA   L024438
         JSL   L180C51
         AND   #$03
         BEQ   L053F95
         JMP   L054013

L053F95  LDA   L024432
         CMP   #$07
         BCC   L053F9E
         PLP
         RTL

L053F9E  INC
         STA   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$07
         STA   $65
L053FAB  LDX   $64
         PHX
         LDA   ($6C)
         BNE   L053FB6
         JSL   L053FD0
L053FB6  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L053FAB
         LDA   #$02
         STA   L024438
         PLP
         RTL

L053FD0  LDA   L024438
         BNE   L053FD6
         RTL

L053FD6  DEC
         STA   L024438
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$15
         STA   ($6C)
         LDA   L024E04
         SEC
         SBC   #$05
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$05
         LDY   #$0007
         STA   ($6C),Y
         LDA   #$00
         LDY   #$0010
         STA   ($6C),Y
         LDY   #$0011
         STA   ($6C),Y
         LDA   #$90
         LDY   #$0012
         STA   ($6C),Y
         RTL

L054013  LDA   L024432
         CMP   #$07
         BCC   L05401C
         PLP
         RTL

L05401C  INC
         STA   L024432
         LDX   #L024E60
         STX   $6C
         LDA   #$07
         STA   $65
L054029  LDX   $64
         PHX
         LDA   ($6C)
         BNE   L054034
         JSL   L05404E
L054034  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L054029
         LDA   #$02
         STA   L024438
         PLP
         RTL

L05404E  LDA   L024438
         BNE   L054054
         RTL

L054054  DEC
         STA   L024438
         LDA   #$00
         LDY   #$000C
         STA   ($6C),Y
         LDA   #$16
         STA   ($6C)
         LDA   L024E04
         SEC
         SBC   #$05
         LDY   #$0004
         STA   ($6C),Y
         LDA   L024E05
         LDY   #$0005
         STA   ($6C),Y
         LDA   #$05
         LDY   #$0007
         STA   ($6C),Y
         RTL

L05407E  ENT
         PHP
         SEP   #$20
         LDA   #$03
         STA   L0266C9
         LDA   L02441E
         STA   $5C
         CMP   #$0D
         BEQ   L0540D5
         CMP   #$10
         BEQ   L0540E7
         CMP   #$13
         BEQ   L0540F9
         CMP   #$15
         BEQ   L05410B
         CMP   #$18
         BNE   L0540A2
         JMP   L05411D

L0540A2  CMP   #$1A
         BNE   L0540A9
         JMP   L05412F

L0540A9  JSL   L180D0D
L0540AD  LDX   #$FFFF
         PHX
         PEA   ^L0540BE
         PEA   L0540BE
         _SysFailMgr
L0540BE  STR   ' Trouble in bigsp3 '
         JMP   L0540AD

L0540D5  LDX   #$0302
         STX   $64
         LDX   #$9000
         STX   $68
         LDX   #$5000
         STX   $60
         JMP   L054141

L0540E7  LDX   #$0302
         STX   $64
         LDX   #$9000
         STX   $68
         LDX   #$5000
         STX   $60
         JMP   L054141

L0540F9  LDX   #$0400
         STX   $64
         LDX   #$9001
         STX   $68
         LDX   #$5000
         STX   $60
         JMP   L054141

L05410B  LDX   #$0402
         STX   $64
         LDX   #$D000
         STX   $68
         LDX   #$5000
         STX   $60
         JMP   L054141

L05411D  LDX   #$0400
         STX   $64
         LDX   #$8001
         STX   $68
         LDX   #$9000
         STX   $60
         JMP   L054141

L05412F  LDX   #$0420
         STX   $64
         LDX   #$9000
         STX   $68
         LDX   #$9000
         STX   $60
         JMP   L054141

L054141  REP   #$20
         LDA   $64
         STAL  L1D0653
         SEP   #$20
         LDA   $69
         LSR
         LSR
         STA   $5C
         STA   L02434C
         LDX   $68
         STX   L02434A
         REP   #$20
         LDA   $60
         STAL  L1D064B
         LDX   #L1D0653
         LDY   #L025150
         LDA   #$0006
         PHB
         MVN   L1D0653,L025150
         PLB
         LDA   #$0001
         STA   L024412
         PLP
         RTL

