Identified constant variable (byte*) dtvSetCpuBankSegment1::cpuBank
Identified constant variable (byte*) DTV_BLITTER_ALU
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) main::@2
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@10
Culled Empty Block (label) main::@11
Culled Empty Block (label) main::@13
Culled Empty Block (label) main::@14
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) gfx_init_screen0::@4
Culled Empty Block (label) @8

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0
  (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
  (byte*) PROCPORT#0 ← ((byte*)) (number) 1
  (byte) PROCPORT_RAM_IO#0 ← (number) 5
  (byte) PROCPORT_RAM_CHARROM#0 ← (number) 1
  (byte*) CHARGEN#0 ← ((byte*)) (number) $d000
  (byte*) RASTER#0 ← ((byte*)) (number) $d012
  (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020
  (byte*) VIC_CONTROL#0 ← ((byte*)) (number) $d011
  (byte) VIC_ECM#0 ← (number) $40
  (byte) VIC_DEN#0 ← (number) $10
  (byte) VIC_RSEL#0 ← (number) 8
  (byte*) VIC_CONTROL2#0 ← ((byte*)) (number) $d016
  (byte) VIC_MCM#0 ← (number) $10
  (byte) VIC_CSEL#0 ← (number) 8
  (byte*) VIC_MEMORY#0 ← ((byte*)) (number) $d018
  (byte*) CIA2_PORT_A#0 ← ((byte*)) (number) $dd00
  (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (number) $dd02
  to:@4
@4: scope:[]  from @begin
  (byte*) DTV_FEATURE#0 ← ((byte*)) (number) $d03f
  (byte) DTV_FEATURE_ENABLE#0 ← (number) 1
  (byte*) DTV_CONTROL#0 ← ((byte*)) (number) $d03c
  (byte) DTV_LINEAR#0 ← (number) 1
  (byte) DTV_HIGHCOLOR#0 ← (number) 4
  (byte) DTV_BADLINE_OFF#0 ← (number) $20
  (byte) DTV_CHUNKY#0 ← (number) $40
  (byte*) DTV_PALETTE#0 ← ((byte*)) (number) $d200
  (byte*) DTV_PLANEA_START_LO#0 ← ((byte*)) (number) $d03a
  (byte*) DTV_PLANEA_START_MI#0 ← ((byte*)) (number) $d03b
  (byte*) DTV_PLANEA_START_HI#0 ← ((byte*)) (number) $d045
  (byte*) DTV_PLANEA_STEP#0 ← ((byte*)) (number) $d046
  (byte*) DTV_PLANEA_MODULO_LO#0 ← ((byte*)) (number) $d038
  (byte*) DTV_PLANEA_MODULO_HI#0 ← ((byte*)) (number) $d039
  (byte*) DTV_PLANEB_START_LO#0 ← ((byte*)) (number) $d049
  (byte*) DTV_PLANEB_START_MI#0 ← ((byte*)) (number) $d04a
  (byte*) DTV_PLANEB_START_HI#0 ← ((byte*)) (number) $d04b
  (byte*) DTV_PLANEB_STEP#0 ← ((byte*)) (number) $d04c
  (byte*) DTV_PLANEB_MODULO_LO#0 ← ((byte*)) (number) $d047
  (byte*) DTV_PLANEB_MODULO_HI#0 ← ((byte*)) (number) $d048
  to:@5
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1]  from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
  (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 )
  (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (number) $ff
  *((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
  asm { .byte$32,$dd lda$ff .byte$32,$00  }
  to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1]  from dtvSetCpuBankSegment1
  return 
  to:@return
@5: scope:[]  from @4
  (byte*) SCREEN#0 ← ((byte*)) (number) $7c00
  (byte*) CHARSET8#0 ← ((byte*)) (number) $8000
  to:@9
main: scope:[main]  from @9
  asm { sei  }
  *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0
  *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0
  call gfx_init 
  to:main::@17
main::@17: scope:[main]  from main
  *((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0
  (byte~) main::$1 ← (byte) DTV_HIGHCOLOR#0 | (byte) DTV_LINEAR#0
  (byte~) main::$2 ← (byte~) main::$1 | (byte) DTV_CHUNKY#0
  (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_BADLINE_OFF#0
  *((byte*) DTV_CONTROL#0) ← (byte~) main::$3
  (byte~) main::$4 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0
  (byte~) main::$5 ← (byte~) main::$4 | (byte) VIC_RSEL#0
  (number~) main::$6 ← (byte~) main::$5 | (number) 3
  *((byte*) VIC_CONTROL#0) ← (number~) main::$6
  (byte~) main::$7 ← (byte) VIC_MCM#0 | (byte) VIC_CSEL#0
  *((byte*) VIC_CONTROL2#0) ← (byte~) main::$7
  (byte~) main::$8 ← < (byte*) SCREEN#0
  *((byte*) DTV_PLANEA_START_LO#0) ← (byte~) main::$8
  (byte~) main::$9 ← > (byte*) SCREEN#0
  *((byte*) DTV_PLANEA_START_MI#0) ← (byte~) main::$9
  *((byte*) DTV_PLANEA_START_HI#0) ← (number) 0
  *((byte*) DTV_PLANEA_STEP#0) ← (number) 1
  *((byte*) DTV_PLANEA_MODULO_LO#0) ← (number) 0
  *((byte*) DTV_PLANEA_MODULO_HI#0) ← (number) 0
  (byte~) main::$10 ← < (byte*) CHARSET8#0
  *((byte*) DTV_PLANEB_START_LO#0) ← (byte~) main::$10
  (byte~) main::$11 ← > (byte*) CHARSET8#0
  *((byte*) DTV_PLANEB_START_MI#0) ← (byte~) main::$11
  *((byte*) DTV_PLANEB_START_HI#0) ← (number) 0
  *((byte*) DTV_PLANEB_STEP#0) ← (number) 0
  *((byte*) DTV_PLANEB_MODULO_LO#0) ← (number) 0
  *((byte*) DTV_PLANEB_MODULO_HI#0) ← (number) 0
  *((byte*) CIA2_PORT_A_DDR#0) ← (number) 3
  (word~) main::$12 ← ((word)) (byte*) SCREEN#0
  (number~) main::$13 ← (word~) main::$12 / (number) $4000
  (byte~) main::$14 ← ((byte)) (number~) main::$13
  (number~) main::$15 ← (number) 3 ^ (byte~) main::$14
  *((byte*) CIA2_PORT_A#0) ← (number~) main::$15
  (word~) main::$16 ← ((word)) (byte*) SCREEN#0
  (number~) main::$17 ← (word~) main::$16 & (number) $3fff
  (number~) main::$18 ← (number~) main::$17 / (number) $40
  (byte~) main::$19 ← ((byte)) (number~) main::$18
  (word~) main::$20 ← ((word)) (byte*) SCREEN#0
  (number~) main::$21 ← (word~) main::$20 & (number) $3fff
  (number~) main::$22 ← > (number~) main::$21
  (number~) main::$23 ← (number~) main::$22 / (number) 4
  (number~) main::$24 ← (byte~) main::$19 | (number~) main::$23
  *((byte*) VIC_MEMORY#0) ← (number~) main::$24
  (byte) main::j#0 ← (byte) 0
  to:main::@1
main::@1: scope:[main]  from main::@1 main::@17
  (byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@17/(byte) main::j#0 )
  *((byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2
  (byte) main::j#1 ← (byte) main::j#2 + rangenext(0,$f)
  (bool~) main::$25 ← (byte) main::j#1 != rangelast(0,$f)
  if((bool~) main::$25) goto main::@1
  to:main::@3
main::@3: scope:[main]  from main::@1 main::@12
  if(true) goto main::@4
  to:main::@return
main::@4: scope:[main]  from main::@3
  asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  }
  (byte~) main::$26 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0
  (byte~) main::$27 ← (byte~) main::$26 | (byte) VIC_RSEL#0
  (number~) main::$28 ← (byte~) main::$27 | (number) 3
  *((byte*) VIC_CONTROL#0) ← (number~) main::$28
  *((byte*) BORDERCOL#0) ← (number) 0
  (byte) main::rst#0 ← (number) $42
  to:main::@6
main::@6: scope:[main]  from main::@4 main::@6
  (byte) main::rst#2 ← phi( main::@4/(byte) main::rst#0 main::@6/(byte) main::rst#2 )
  (bool~) main::$29 ← *((byte*) RASTER#0) != (byte) main::rst#2
  if((bool~) main::$29) goto main::@6
  to:main::@8
main::@8: scope:[main]  from main::@6
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  to:main::@12
main::@12: scope:[main]  from main::@12 main::@8
  (byte) main::rst#1 ← *((byte*) RASTER#0)
  (byte~) main::$30 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0
  (byte~) main::$31 ← (byte~) main::$30 | (byte) VIC_RSEL#0
  (number~) main::$32 ← (byte) main::rst#1 & (number) 7
  (number~) main::$33 ← (byte~) main::$31 | (number~) main::$32
  *((byte*) VIC_CONTROL#0) ← (number~) main::$33
  (number~) main::$34 ← (byte) main::rst#1 * (number) $10
  *((byte*) BORDERCOL#0) ← (number~) main::$34
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  (bool~) main::$35 ← (byte) main::rst#1 != (number) $f2
  if((bool~) main::$35) goto main::@12
  to:main::@3
main::@return: scope:[main]  from main::@3
  return 
  to:@return
gfx_init: scope:[gfx_init]  from main
  call gfx_init_screen0 
  to:gfx_init::@1
gfx_init::@1: scope:[gfx_init]  from gfx_init
  call gfx_init_plane_charset8 
  to:gfx_init::@2
gfx_init::@2: scope:[gfx_init]  from gfx_init::@1
  to:gfx_init::@return
gfx_init::@return: scope:[gfx_init]  from gfx_init::@2
  return 
  to:@return
gfx_init_screen0: scope:[gfx_init_screen0]  from gfx_init
  (byte*) gfx_init_screen0::ch#0 ← (byte*) SCREEN#0
  (byte) gfx_init_screen0::cy#0 ← (byte) 0
  to:gfx_init_screen0::@1
gfx_init_screen0::@1: scope:[gfx_init_screen0]  from gfx_init_screen0 gfx_init_screen0::@3
  (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(byte*) gfx_init_screen0::ch#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#4 )
  (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) gfx_init_screen0::cy#0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 )
  (byte) gfx_init_screen0::cx#0 ← (byte) 0
  to:gfx_init_screen0::@2
gfx_init_screen0::@2: scope:[gfx_init_screen0]  from gfx_init_screen0::@1 gfx_init_screen0::@2
  (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
  (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) gfx_init_screen0::cx#0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 )
  (byte) gfx_init_screen0::cy#2 ← phi( gfx_init_screen0::@1/(byte) gfx_init_screen0::cy#4 gfx_init_screen0::@2/(byte) gfx_init_screen0::cy#2 )
  (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (number) $f
  (number~) gfx_init_screen0::$1 ← (number~) gfx_init_screen0::$0 * (number) $10
  (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (number) $f
  (number~) gfx_init_screen0::$3 ← (number~) gfx_init_screen0::$1 | (number~) gfx_init_screen0::$2
  *((byte*) gfx_init_screen0::ch#2) ← (number~) gfx_init_screen0::$3
  (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2
  (byte) gfx_init_screen0::cx#1 ← (byte) gfx_init_screen0::cx#2 + rangenext(0,$27)
  (bool~) gfx_init_screen0::$4 ← (byte) gfx_init_screen0::cx#1 != rangelast(0,$27)
  if((bool~) gfx_init_screen0::$4) goto gfx_init_screen0::@2
  to:gfx_init_screen0::@3
gfx_init_screen0::@3: scope:[gfx_init_screen0]  from gfx_init_screen0::@2
  (byte*) gfx_init_screen0::ch#4 ← phi( gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
  (byte) gfx_init_screen0::cy#3 ← phi( gfx_init_screen0::@2/(byte) gfx_init_screen0::cy#2 )
  (byte) gfx_init_screen0::cy#1 ← (byte) gfx_init_screen0::cy#3 + rangenext(0,$18)
  (bool~) gfx_init_screen0::$5 ← (byte) gfx_init_screen0::cy#1 != rangelast(0,$18)
  if((bool~) gfx_init_screen0::$5) goto gfx_init_screen0::@1
  to:gfx_init_screen0::@return
gfx_init_screen0::@return: scope:[gfx_init_screen0]  from gfx_init_screen0::@3
  return 
  to:@return
gfx_init_plane_charset8: scope:[gfx_init_plane_charset8]  from gfx_init::@1
  (byte*~) gfx_init_plane_charset8::$0 ← (byte*) CHARSET8#0 / (number) $4000
  (byte~) gfx_init_plane_charset8::$1 ← ((byte)) (byte*~) gfx_init_plane_charset8::$0
  (byte) gfx_init_plane_charset8::gfxbCpuBank#0 ← (byte~) gfx_init_plane_charset8::$1
  (byte) dtvSetCpuBankSegment1::cpuBankIdx#0 ← (byte) gfx_init_plane_charset8::gfxbCpuBank#0
  call dtvSetCpuBankSegment1 
  to:gfx_init_plane_charset8::@9
gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8
  (byte) gfx_init_plane_charset8::gfxbCpuBank#2 ← phi( gfx_init_plane_charset8/(byte) gfx_init_plane_charset8::gfxbCpuBank#0 )
  (byte) gfx_init_plane_charset8::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank#2
  (word~) gfx_init_plane_charset8::$3 ← ((word)) (byte*) CHARSET8#0
  (number~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (number) $3fff
  (number~) gfx_init_plane_charset8::$5 ← (number) $4000 + (number~) gfx_init_plane_charset8::$4
  (byte*) gfx_init_plane_charset8::gfxa#0 ← ((byte*)) (number~) gfx_init_plane_charset8::$5
  (byte*~) gfx_init_plane_charset8::$6 ← (byte*) CHARGEN#0 + (number) 1
  (byte*) gfx_init_plane_charset8::chargen#0 ← (byte*~) gfx_init_plane_charset8::$6
  *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_CHARROM#0
  (byte) gfx_init_plane_charset8::col#0 ← (number) 0
  (byte) gfx_init_plane_charset8::ch#0 ← (byte) 0
  to:gfx_init_plane_charset8::@1
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
  (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::ch#0 )
  (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#8 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::col#0 )
  (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#8 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::gfxa#0 )
  (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#5 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::chargen#0 )
  (byte) gfx_init_plane_charset8::cr#0 ← (byte) 0
  to:gfx_init_plane_charset8::@2
gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6
  (byte) gfx_init_plane_charset8::ch#7 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 )
  (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::cr#0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 )
  (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#7 )
  (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#7 )
  (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 )
  (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2)
  (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2
  (byte) gfx_init_plane_charset8::cp#0 ← (byte) 0
  to:gfx_init_plane_charset8::@3
gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4
  (byte) gfx_init_plane_charset8::ch#5 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::ch#7 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 )
  (byte*) gfx_init_plane_charset8::chargen#7 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::chargen#6 )
  (byte) gfx_init_plane_charset8::cr#4 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cr#3 )
  (byte) gfx_init_plane_charset8::cp#3 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::cp#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 )
  (byte) gfx_init_plane_charset8::col#4 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 )
  (byte*) gfx_init_plane_charset8::gfxa#3 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 )
  (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 )
  (byte) gfx_init_plane_charset8::c#0 ← (number) 0
  (number~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (number) $80
  (bool~) gfx_init_plane_charset8::$10 ← (number~) gfx_init_plane_charset8::$9 != (number) 0
  (bool~) gfx_init_plane_charset8::$11 ← ! (bool~) gfx_init_plane_charset8::$10
  if((bool~) gfx_init_plane_charset8::$11) goto gfx_init_plane_charset8::@4
  to:gfx_init_plane_charset8::@5
gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5
  (byte) gfx_init_plane_charset8::ch#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::ch#5 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::ch#6 )
  (byte*) gfx_init_plane_charset8::chargen#6 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::chargen#7 gfx_init_plane_charset8::@5/(byte*) gfx_init_plane_charset8::chargen#8 )
  (byte) gfx_init_plane_charset8::cr#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cr#4 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::cr#5 )
  (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cp#3 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::cp#4 )
  (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::col#4 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::col#3 )
  (byte) gfx_init_plane_charset8::bits#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::bits#4 )
  (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::gfxa#3 gfx_init_plane_charset8::@5/(byte*) gfx_init_plane_charset8::gfxa#4 )
  (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::c#0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#1 )
  *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2
  (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2
  (number~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::bits#3 * (number) 2
  (byte) gfx_init_plane_charset8::bits#1 ← (number~) gfx_init_plane_charset8::$12
  (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2
  (byte) gfx_init_plane_charset8::cp#1 ← (byte) gfx_init_plane_charset8::cp#2 + rangenext(0,7)
  (bool~) gfx_init_plane_charset8::$13 ← (byte) gfx_init_plane_charset8::cp#1 != rangelast(0,7)
  if((bool~) gfx_init_plane_charset8::$13) goto gfx_init_plane_charset8::@3
  to:gfx_init_plane_charset8::@6
gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@3
  (byte) gfx_init_plane_charset8::ch#6 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::ch#5 )
  (byte*) gfx_init_plane_charset8::chargen#8 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::chargen#7 )
  (byte) gfx_init_plane_charset8::cr#5 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cr#4 )
  (byte) gfx_init_plane_charset8::cp#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cp#3 )
  (byte) gfx_init_plane_charset8::bits#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::bits#2 )
  (byte*) gfx_init_plane_charset8::gfxa#4 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::gfxa#3 )
  (byte) gfx_init_plane_charset8::col#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::col#4 )
  (byte) gfx_init_plane_charset8::c#1 ← (byte) gfx_init_plane_charset8::col#3
  to:gfx_init_plane_charset8::@4
gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@4
  (byte) gfx_init_plane_charset8::col#7 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 )
  (byte*) gfx_init_plane_charset8::gfxa#7 ← phi( gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 )
  (byte) gfx_init_plane_charset8::ch#3 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 )
  (byte*) gfx_init_plane_charset8::chargen#4 ← phi( gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::chargen#6 )
  (byte) gfx_init_plane_charset8::cr#2 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cr#3 )
  (byte) gfx_init_plane_charset8::cr#1 ← (byte) gfx_init_plane_charset8::cr#2 + rangenext(0,7)
  (bool~) gfx_init_plane_charset8::$14 ← (byte) gfx_init_plane_charset8::cr#1 != rangelast(0,7)
  if((bool~) gfx_init_plane_charset8::$14) goto gfx_init_plane_charset8::@2
  to:gfx_init_plane_charset8::@7
gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@6
  (byte) gfx_init_plane_charset8::col#8 ← phi( gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#7 )
  (byte*) gfx_init_plane_charset8::gfxa#8 ← phi( gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#7 )
  (byte*) gfx_init_plane_charset8::chargen#5 ← phi( gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 )
  (byte) gfx_init_plane_charset8::ch#2 ← phi( gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 )
  (byte) gfx_init_plane_charset8::ch#1 ← (byte) gfx_init_plane_charset8::ch#2 + rangenext(0,$ff)
  (bool~) gfx_init_plane_charset8::$15 ← (byte) gfx_init_plane_charset8::ch#1 != rangelast(0,$ff)
  if((bool~) gfx_init_plane_charset8::$15) goto gfx_init_plane_charset8::@1
  to:gfx_init_plane_charset8::@8
gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@7
  *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0
  (byte~) gfx_init_plane_charset8::$7 ← ((byte)) (number) $4000/(number) $4000
  (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte~) gfx_init_plane_charset8::$7
  call dtvSetCpuBankSegment1 
  to:gfx_init_plane_charset8::@10
gfx_init_plane_charset8::@10: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@8
  to:gfx_init_plane_charset8::@return
gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@10
  return 
  to:@return
@9: scope:[]  from @5
  call main 
  to:@10
@10: scope:[]  from @9
  to:@end
@end: scope:[]  from @10

SYMBOL TABLE SSA
(label) @10
(label) @4
(label) @5
(label) @9
(label) @begin
(label) @end
(byte*) BORDERCOL
(byte*) BORDERCOL#0
(byte*) CHARGEN
(byte*) CHARGEN#0
(byte*) CHARSET8
(byte*) CHARSET8#0
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A#0
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_A_DDR#0
(byte) DTV_BADLINE_OFF
(byte) DTV_BADLINE_OFF#0
(byte) DTV_CHUNKY
(byte) DTV_CHUNKY#0
(byte*) DTV_CONTROL
(byte*) DTV_CONTROL#0
(byte*) DTV_FEATURE
(byte*) DTV_FEATURE#0
(byte) DTV_FEATURE_ENABLE
(byte) DTV_FEATURE_ENABLE#0
(byte) DTV_HIGHCOLOR
(byte) DTV_HIGHCOLOR#0
(byte) DTV_LINEAR
(byte) DTV_LINEAR#0
(byte*) DTV_PALETTE
(byte*) DTV_PALETTE#0
(byte*) DTV_PLANEA_MODULO_HI
(byte*) DTV_PLANEA_MODULO_HI#0
(byte*) DTV_PLANEA_MODULO_LO
(byte*) DTV_PLANEA_MODULO_LO#0
(byte*) DTV_PLANEA_START_HI
(byte*) DTV_PLANEA_START_HI#0
(byte*) DTV_PLANEA_START_LO
(byte*) DTV_PLANEA_START_LO#0
(byte*) DTV_PLANEA_START_MI
(byte*) DTV_PLANEA_START_MI#0
(byte*) DTV_PLANEA_STEP
(byte*) DTV_PLANEA_STEP#0
(byte*) DTV_PLANEB_MODULO_HI
(byte*) DTV_PLANEB_MODULO_HI#0
(byte*) DTV_PLANEB_MODULO_LO
(byte*) DTV_PLANEB_MODULO_LO#0
(byte*) DTV_PLANEB_START_HI
(byte*) DTV_PLANEB_START_HI#0
(byte*) DTV_PLANEB_START_LO
(byte*) DTV_PLANEB_START_LO#0
(byte*) DTV_PLANEB_START_MI
(byte*) DTV_PLANEB_START_MI#0
(byte*) DTV_PLANEB_STEP
(byte*) DTV_PLANEB_STEP#0
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte*) PROCPORT_DDR
(byte*) PROCPORT_DDR#0
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_DDR_MEMORY_MASK#0
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_CHARROM#0
(byte) PROCPORT_RAM_IO
(byte) PROCPORT_RAM_IO#0
(byte*) RASTER
(byte*) RASTER#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL#0
(byte*) VIC_CONTROL2
(byte*) VIC_CONTROL2#0
(byte) VIC_CSEL
(byte) VIC_CSEL#0
(byte) VIC_DEN
(byte) VIC_DEN#0
(byte) VIC_ECM
(byte) VIC_ECM#0
(byte) VIC_MCM
(byte) VIC_MCM#0
(byte*) VIC_MEMORY
(byte*) VIC_MEMORY#0
(byte) VIC_RSEL
(byte) VIC_RSEL#0
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte*) dtvSetCpuBankSegment1::cpuBank#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2
(void()) gfx_init()
(label) gfx_init::@1
(label) gfx_init::@2
(label) gfx_init::@return
(void()) gfx_init_plane_charset8()
(byte*~) gfx_init_plane_charset8::$0
(byte~) gfx_init_plane_charset8::$1
(bool~) gfx_init_plane_charset8::$10
(bool~) gfx_init_plane_charset8::$11
(number~) gfx_init_plane_charset8::$12
(bool~) gfx_init_plane_charset8::$13
(bool~) gfx_init_plane_charset8::$14
(bool~) gfx_init_plane_charset8::$15
(word~) gfx_init_plane_charset8::$3
(number~) gfx_init_plane_charset8::$4
(number~) gfx_init_plane_charset8::$5
(byte*~) gfx_init_plane_charset8::$6
(byte~) gfx_init_plane_charset8::$7
(number~) gfx_init_plane_charset8::$9
(label) gfx_init_plane_charset8::@1
(label) gfx_init_plane_charset8::@10
(label) gfx_init_plane_charset8::@2
(label) gfx_init_plane_charset8::@3
(label) gfx_init_plane_charset8::@4
(label) gfx_init_plane_charset8::@5
(label) gfx_init_plane_charset8::@6
(label) gfx_init_plane_charset8::@7
(label) gfx_init_plane_charset8::@8
(label) gfx_init_plane_charset8::@9
(label) gfx_init_plane_charset8::@return
(byte) gfx_init_plane_charset8::bits
(byte) gfx_init_plane_charset8::bits#0
(byte) gfx_init_plane_charset8::bits#1
(byte) gfx_init_plane_charset8::bits#2
(byte) gfx_init_plane_charset8::bits#3
(byte) gfx_init_plane_charset8::bits#4
(byte) gfx_init_plane_charset8::c
(byte) gfx_init_plane_charset8::c#0
(byte) gfx_init_plane_charset8::c#1
(byte) gfx_init_plane_charset8::c#2
(byte) gfx_init_plane_charset8::ch
(byte) gfx_init_plane_charset8::ch#0
(byte) gfx_init_plane_charset8::ch#1
(byte) gfx_init_plane_charset8::ch#2
(byte) gfx_init_plane_charset8::ch#3
(byte) gfx_init_plane_charset8::ch#4
(byte) gfx_init_plane_charset8::ch#5
(byte) gfx_init_plane_charset8::ch#6
(byte) gfx_init_plane_charset8::ch#7
(byte) gfx_init_plane_charset8::ch#8
(byte*) gfx_init_plane_charset8::chargen
(byte*) gfx_init_plane_charset8::chargen#0
(byte*) gfx_init_plane_charset8::chargen#1
(byte*) gfx_init_plane_charset8::chargen#2
(byte*) gfx_init_plane_charset8::chargen#3
(byte*) gfx_init_plane_charset8::chargen#4
(byte*) gfx_init_plane_charset8::chargen#5
(byte*) gfx_init_plane_charset8::chargen#6
(byte*) gfx_init_plane_charset8::chargen#7
(byte*) gfx_init_plane_charset8::chargen#8
(byte) gfx_init_plane_charset8::col
(byte) gfx_init_plane_charset8::col#0
(byte) gfx_init_plane_charset8::col#1
(byte) gfx_init_plane_charset8::col#2
(byte) gfx_init_plane_charset8::col#3
(byte) gfx_init_plane_charset8::col#4
(byte) gfx_init_plane_charset8::col#5
(byte) gfx_init_plane_charset8::col#6
(byte) gfx_init_plane_charset8::col#7
(byte) gfx_init_plane_charset8::col#8
(byte) gfx_init_plane_charset8::cp
(byte) gfx_init_plane_charset8::cp#0
(byte) gfx_init_plane_charset8::cp#1
(byte) gfx_init_plane_charset8::cp#2
(byte) gfx_init_plane_charset8::cp#3
(byte) gfx_init_plane_charset8::cp#4
(byte) gfx_init_plane_charset8::cr
(byte) gfx_init_plane_charset8::cr#0
(byte) gfx_init_plane_charset8::cr#1
(byte) gfx_init_plane_charset8::cr#2
(byte) gfx_init_plane_charset8::cr#3
(byte) gfx_init_plane_charset8::cr#4
(byte) gfx_init_plane_charset8::cr#5
(byte) gfx_init_plane_charset8::cr#6
(byte*) gfx_init_plane_charset8::gfxa
(byte*) gfx_init_plane_charset8::gfxa#0
(byte*) gfx_init_plane_charset8::gfxa#1
(byte*) gfx_init_plane_charset8::gfxa#2
(byte*) gfx_init_plane_charset8::gfxa#3
(byte*) gfx_init_plane_charset8::gfxa#4
(byte*) gfx_init_plane_charset8::gfxa#5
(byte*) gfx_init_plane_charset8::gfxa#6
(byte*) gfx_init_plane_charset8::gfxa#7
(byte*) gfx_init_plane_charset8::gfxa#8
(byte) gfx_init_plane_charset8::gfxbCpuBank
(byte) gfx_init_plane_charset8::gfxbCpuBank#0
(byte) gfx_init_plane_charset8::gfxbCpuBank#1
(byte) gfx_init_plane_charset8::gfxbCpuBank#2
(void()) gfx_init_screen0()
(number~) gfx_init_screen0::$0
(number~) gfx_init_screen0::$1
(number~) gfx_init_screen0::$2
(number~) gfx_init_screen0::$3
(bool~) gfx_init_screen0::$4
(bool~) gfx_init_screen0::$5
(label) gfx_init_screen0::@1
(label) gfx_init_screen0::@2
(label) gfx_init_screen0::@3
(label) gfx_init_screen0::@return
(byte*) gfx_init_screen0::ch
(byte*) gfx_init_screen0::ch#0
(byte*) gfx_init_screen0::ch#1
(byte*) gfx_init_screen0::ch#2
(byte*) gfx_init_screen0::ch#3
(byte*) gfx_init_screen0::ch#4
(byte) gfx_init_screen0::cx
(byte) gfx_init_screen0::cx#0
(byte) gfx_init_screen0::cx#1
(byte) gfx_init_screen0::cx#2
(byte) gfx_init_screen0::cy
(byte) gfx_init_screen0::cy#0
(byte) gfx_init_screen0::cy#1
(byte) gfx_init_screen0::cy#2
(byte) gfx_init_screen0::cy#3
(byte) gfx_init_screen0::cy#4
(void()) main()
(byte~) main::$1
(byte~) main::$10
(byte~) main::$11
(word~) main::$12
(number~) main::$13
(byte~) main::$14
(number~) main::$15
(word~) main::$16
(number~) main::$17
(number~) main::$18
(byte~) main::$19
(byte~) main::$2
(word~) main::$20
(number~) main::$21
(number~) main::$22
(number~) main::$23
(number~) main::$24
(bool~) main::$25
(byte~) main::$26
(byte~) main::$27
(number~) main::$28
(bool~) main::$29
(byte~) main::$3
(byte~) main::$30
(byte~) main::$31
(number~) main::$32
(number~) main::$33
(number~) main::$34
(bool~) main::$35
(byte~) main::$4
(byte~) main::$5
(number~) main::$6
(byte~) main::$7
(byte~) main::$8
(byte~) main::$9
(label) main::@1
(label) main::@12
(label) main::@17
(label) main::@3
(label) main::@4
(label) main::@6
(label) main::@8
(label) main::@return
(byte) main::j
(byte) main::j#0
(byte) main::j#1
(byte) main::j#2
(byte) main::rst
(byte) main::rst#0
(byte) main::rst#1
(byte) main::rst#2

Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
Adding number conversion cast (unumber) 5 in (byte) PROCPORT_RAM_IO#0 ← (number) 5
Adding number conversion cast (unumber) 1 in (byte) PROCPORT_RAM_CHARROM#0 ← (number) 1
Adding number conversion cast (unumber) $40 in (byte) VIC_ECM#0 ← (number) $40
Adding number conversion cast (unumber) $10 in (byte) VIC_DEN#0 ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) VIC_RSEL#0 ← (number) 8
Adding number conversion cast (unumber) $10 in (byte) VIC_MCM#0 ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) VIC_CSEL#0 ← (number) 8
Adding number conversion cast (unumber) 1 in (byte) DTV_FEATURE_ENABLE#0 ← (number) 1
Adding number conversion cast (unumber) 1 in (byte) DTV_LINEAR#0 ← (number) 1
Adding number conversion cast (unumber) 4 in (byte) DTV_HIGHCOLOR#0 ← (number) 4
Adding number conversion cast (unumber) $20 in (byte) DTV_BADLINE_OFF#0 ← (number) $20
Adding number conversion cast (unumber) $40 in (byte) DTV_CHUNKY#0 ← (number) $40
Adding number conversion cast (unumber) 3 in (number~) main::$6 ← (byte~) main::$5 | (number) 3
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (byte~) main::$5 | (unumber)(number) 3
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEA_START_HI#0) ← (number) 0
Adding number conversion cast (unumber) 1 in *((byte*) DTV_PLANEA_STEP#0) ← (number) 1
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEA_MODULO_LO#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEA_MODULO_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEB_START_HI#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEB_STEP#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEB_MODULO_LO#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) DTV_PLANEB_MODULO_HI#0) ← (number) 0
Adding number conversion cast (unumber) 3 in *((byte*) CIA2_PORT_A_DDR#0) ← (number) 3
Adding number conversion cast (unumber) $4000 in (number~) main::$13 ← (word~) main::$12 / (number) $4000
Adding number conversion cast (unumber) main::$13 in (number~) main::$13 ← (word~) main::$12 / (unumber)(number) $4000
Adding number conversion cast (unumber) 3 in (number~) main::$15 ← (number) 3 ^ (byte~) main::$14
Adding number conversion cast (unumber) main::$15 in (number~) main::$15 ← (unumber)(number) 3 ^ (byte~) main::$14
Adding number conversion cast (unumber) $3fff in (number~) main::$17 ← (word~) main::$16 & (number) $3fff
Adding number conversion cast (unumber) main::$17 in (number~) main::$17 ← (word~) main::$16 & (unumber)(number) $3fff
Adding number conversion cast (unumber) $40 in (number~) main::$18 ← (unumber~) main::$17 / (number) $40
Adding number conversion cast (unumber) main::$18 in (number~) main::$18 ← (unumber~) main::$17 / (unumber)(number) $40
Adding number conversion cast (unumber) $3fff in (number~) main::$21 ← (word~) main::$20 & (number) $3fff
Adding number conversion cast (unumber) main::$21 in (number~) main::$21 ← (word~) main::$20 & (unumber)(number) $3fff
Adding number conversion cast (unumber) main::$22 in (number~) main::$22 ← > (unumber~) main::$21
Adding number conversion cast (unumber) 4 in (number~) main::$23 ← (unumber~) main::$22 / (number) 4
Adding number conversion cast (unumber) main::$23 in (number~) main::$23 ← (unumber~) main::$22 / (unumber)(number) 4
Adding number conversion cast (unumber) main::$24 in (number~) main::$24 ← (byte~) main::$19 | (unumber~) main::$23
Adding number conversion cast (unumber) 3 in (number~) main::$28 ← (byte~) main::$27 | (number) 3
Adding number conversion cast (unumber) main::$28 in (number~) main::$28 ← (byte~) main::$27 | (unumber)(number) 3
Adding number conversion cast (unumber) 0 in *((byte*) BORDERCOL#0) ← (number) 0
Adding number conversion cast (unumber) $42 in (byte) main::rst#0 ← (number) $42
Adding number conversion cast (unumber) 7 in (number~) main::$32 ← (byte) main::rst#1 & (number) 7
Adding number conversion cast (unumber) main::$32 in (number~) main::$32 ← (byte) main::rst#1 & (unumber)(number) 7
Adding number conversion cast (unumber) main::$33 in (number~) main::$33 ← (byte~) main::$31 | (unumber~) main::$32
Adding number conversion cast (unumber) $10 in (number~) main::$34 ← (byte) main::rst#1 * (number) $10
Adding number conversion cast (unumber) main::$34 in (number~) main::$34 ← (byte) main::rst#1 * (unumber)(number) $10
Adding number conversion cast (unumber) $f2 in (bool~) main::$35 ← (byte) main::rst#1 != (number) $f2
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$0 in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (unumber)(number) $f
Adding number conversion cast (unumber) $10 in (number~) gfx_init_screen0::$1 ← (unumber~) gfx_init_screen0::$0 * (number) $10
Adding number conversion cast (unumber) gfx_init_screen0::$1 in (number~) gfx_init_screen0::$1 ← (unumber~) gfx_init_screen0::$0 * (unumber)(number) $10
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$2 in (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (unumber)(number) $f
Adding number conversion cast (unumber) gfx_init_screen0::$3 in (number~) gfx_init_screen0::$3 ← (unumber~) gfx_init_screen0::$1 | (unumber~) gfx_init_screen0::$2
Adding number conversion cast (unumber) $4000 in (byte*~) gfx_init_plane_charset8::$0 ← (byte*) CHARSET8#0 / (number) $4000
Adding number conversion cast (unumber) $3fff in (number~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (number) $3fff
Adding number conversion cast (unumber) gfx_init_plane_charset8::$4 in (number~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (unumber)(number) $3fff
Adding number conversion cast (unumber) $4000 in (number~) gfx_init_plane_charset8::$5 ← (number) $4000 + (unumber~) gfx_init_plane_charset8::$4
Adding number conversion cast (unumber) gfx_init_plane_charset8::$5 in (number~) gfx_init_plane_charset8::$5 ← (unumber)(number) $4000 + (unumber~) gfx_init_plane_charset8::$4
Adding number conversion cast (unumber) 1 in (byte*~) gfx_init_plane_charset8::$6 ← (byte*) CHARGEN#0 + (number) 1
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::col#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) gfx_init_plane_charset8::c#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (number) $80
Adding number conversion cast (unumber) gfx_init_plane_charset8::$9 in (number~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (unumber)(number) $80
Adding number conversion cast (unumber) 0 in (bool~) gfx_init_plane_charset8::$10 ← (unumber~) gfx_init_plane_charset8::$9 != (number) 0
Adding number conversion cast (unumber) 2 in (number~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::bits#3 * (number) 2
Adding number conversion cast (unumber) gfx_init_plane_charset8::$12 in (number~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::bits#3 * (unumber)(number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0
Inlining cast (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (unumber)(number) 7
Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1
Inlining cast (byte) PROCPORT_RAM_IO#0 ← (unumber)(number) 5
Inlining cast (byte) PROCPORT_RAM_CHARROM#0 ← (unumber)(number) 1
Inlining cast (byte*) CHARGEN#0 ← (byte*)(number) $d000
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) BORDERCOL#0 ← (byte*)(number) $d020
Inlining cast (byte*) VIC_CONTROL#0 ← (byte*)(number) $d011
Inlining cast (byte) VIC_ECM#0 ← (unumber)(number) $40
Inlining cast (byte) VIC_DEN#0 ← (unumber)(number) $10
Inlining cast (byte) VIC_RSEL#0 ← (unumber)(number) 8
Inlining cast (byte*) VIC_CONTROL2#0 ← (byte*)(number) $d016
Inlining cast (byte) VIC_MCM#0 ← (unumber)(number) $10
Inlining cast (byte) VIC_CSEL#0 ← (unumber)(number) 8
Inlining cast (byte*) VIC_MEMORY#0 ← (byte*)(number) $d018
Inlining cast (byte*) CIA2_PORT_A#0 ← (byte*)(number) $dd00
Inlining cast (byte*) CIA2_PORT_A_DDR#0 ← (byte*)(number) $dd02
Inlining cast (byte*) DTV_FEATURE#0 ← (byte*)(number) $d03f
Inlining cast (byte) DTV_FEATURE_ENABLE#0 ← (unumber)(number) 1
Inlining cast (byte*) DTV_CONTROL#0 ← (byte*)(number) $d03c
Inlining cast (byte) DTV_LINEAR#0 ← (unumber)(number) 1
Inlining cast (byte) DTV_HIGHCOLOR#0 ← (unumber)(number) 4
Inlining cast (byte) DTV_BADLINE_OFF#0 ← (unumber)(number) $20
Inlining cast (byte) DTV_CHUNKY#0 ← (unumber)(number) $40
Inlining cast (byte*) DTV_PALETTE#0 ← (byte*)(number) $d200
Inlining cast (byte*) DTV_PLANEA_START_LO#0 ← (byte*)(number) $d03a
Inlining cast (byte*) DTV_PLANEA_START_MI#0 ← (byte*)(number) $d03b
Inlining cast (byte*) DTV_PLANEA_START_HI#0 ← (byte*)(number) $d045
Inlining cast (byte*) DTV_PLANEA_STEP#0 ← (byte*)(number) $d046
Inlining cast (byte*) DTV_PLANEA_MODULO_LO#0 ← (byte*)(number) $d038
Inlining cast (byte*) DTV_PLANEA_MODULO_HI#0 ← (byte*)(number) $d039
Inlining cast (byte*) DTV_PLANEB_START_LO#0 ← (byte*)(number) $d049
Inlining cast (byte*) DTV_PLANEB_START_MI#0 ← (byte*)(number) $d04a
Inlining cast (byte*) DTV_PLANEB_START_HI#0 ← (byte*)(number) $d04b
Inlining cast (byte*) DTV_PLANEB_STEP#0 ← (byte*)(number) $d04c
Inlining cast (byte*) DTV_PLANEB_MODULO_LO#0 ← (byte*)(number) $d047
Inlining cast (byte*) DTV_PLANEB_MODULO_HI#0 ← (byte*)(number) $d048
Inlining cast (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← (byte*)(number) $ff
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $7c00
Inlining cast (byte*) CHARSET8#0 ← (byte*)(number) $8000
Inlining cast *((byte*) DTV_PLANEA_START_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEA_STEP#0) ← (unumber)(number) 1
Inlining cast *((byte*) DTV_PLANEA_MODULO_LO#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEA_MODULO_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_START_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_STEP#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_MODULO_LO#0) ← (unumber)(number) 0
Inlining cast *((byte*) DTV_PLANEB_MODULO_HI#0) ← (unumber)(number) 0
Inlining cast *((byte*) CIA2_PORT_A_DDR#0) ← (unumber)(number) 3
Inlining cast (word~) main::$12 ← (word)(byte*) SCREEN#0
Inlining cast (byte~) main::$14 ← (byte)(unumber~) main::$13
Inlining cast (word~) main::$16 ← (word)(byte*) SCREEN#0
Inlining cast (byte~) main::$19 ← (byte)(unumber~) main::$18
Inlining cast (word~) main::$20 ← (word)(byte*) SCREEN#0
Inlining cast *((byte*) BORDERCOL#0) ← (unumber)(number) 0
Inlining cast (byte) main::rst#0 ← (unumber)(number) $42
Inlining cast (byte~) gfx_init_plane_charset8::$1 ← (byte)(byte*~) gfx_init_plane_charset8::$0
Inlining cast (word~) gfx_init_plane_charset8::$3 ← (word)(byte*) CHARSET8#0
Inlining cast (byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(unumber~) gfx_init_plane_charset8::$5
Inlining cast (byte) gfx_init_plane_charset8::col#0 ← (unumber)(number) 0
Inlining cast (byte) gfx_init_plane_charset8::c#0 ← (unumber)(number) 0
Inlining cast (byte~) gfx_init_plane_charset8::$7 ← (byte)(number) $4000/(number) $4000
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 7
Simplifying constant pointer cast (byte*) 1
Simplifying constant integer cast 5
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 53248
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53265
Simplifying constant integer cast $40
Simplifying constant integer cast $10
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 53270
Simplifying constant integer cast $10
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 56576
Simplifying constant pointer cast (byte*) 56578
Simplifying constant pointer cast (byte*) 53311
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 53308
Simplifying constant integer cast 1
Simplifying constant integer cast 4
Simplifying constant integer cast $20
Simplifying constant integer cast $40
Simplifying constant pointer cast (byte*) 53760
Simplifying constant pointer cast (byte*) 53306
Simplifying constant pointer cast (byte*) 53307
Simplifying constant pointer cast (byte*) 53317
Simplifying constant pointer cast (byte*) 53318
Simplifying constant pointer cast (byte*) 53304
Simplifying constant pointer cast (byte*) 53305
Simplifying constant pointer cast (byte*) 53321
Simplifying constant pointer cast (byte*) 53322
Simplifying constant pointer cast (byte*) 53323
Simplifying constant pointer cast (byte*) 53324
Simplifying constant pointer cast (byte*) 53319
Simplifying constant pointer cast (byte*) 53320
Simplifying constant pointer cast (byte*) 255
Simplifying constant pointer cast (byte*) 31744
Simplifying constant pointer cast (byte*) 32768
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast $4000
Simplifying constant integer cast 3
Simplifying constant integer cast $3fff
Simplifying constant integer cast $40
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast $42
Simplifying constant integer cast 7
Simplifying constant integer cast $10
Simplifying constant integer cast $f2
Simplifying constant integer cast $f
Simplifying constant integer cast $10
Simplifying constant integer cast $f
Simplifying constant integer cast $4000
Simplifying constant integer cast $3fff
Simplifying constant integer cast $4000
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) $40
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $42
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $f2
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $4000
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (word) $4000
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$6 ← (byte~) main::$5 | (byte) 3
Inferred type updated to word in (unumber~) main::$13 ← (word~) main::$12 / (word) $4000
Inferred type updated to byte in (unumber~) main::$15 ← (byte) 3 ^ (byte~) main::$14
Inferred type updated to word in (unumber~) main::$17 ← (word~) main::$16 & (word) $3fff
Inferred type updated to word in (unumber~) main::$18 ← (word~) main::$17 / (byte) $40
Inferred type updated to word in (unumber~) main::$21 ← (word~) main::$20 & (word) $3fff
Inferred type updated to byte in (unumber~) main::$22 ← > (word~) main::$21
Inferred type updated to byte in (unumber~) main::$23 ← (byte~) main::$22 / (byte) 4
Inferred type updated to byte in (unumber~) main::$24 ← (byte~) main::$19 | (byte~) main::$23
Inferred type updated to byte in (unumber~) main::$28 ← (byte~) main::$27 | (byte) 3
Inferred type updated to byte in (unumber~) main::$32 ← (byte) main::rst#1 & (byte) 7
Inferred type updated to byte in (unumber~) main::$33 ← (byte~) main::$31 | (byte~) main::$32
Inferred type updated to byte in (unumber~) main::$34 ← (byte) main::rst#1 * (byte) $10
Inferred type updated to byte in (unumber~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (byte) $f
Inferred type updated to byte in (unumber~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 * (byte) $10
Inferred type updated to byte in (unumber~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f
Inferred type updated to byte in (unumber~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2
Inferred type updated to word in (unumber~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (word) $3fff
Inferred type updated to word in (unumber~) gfx_init_plane_charset8::$5 ← (word) $4000 + (word~) gfx_init_plane_charset8::$4
Inferred type updated to byte in (unumber~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80
Inferred type updated to byte in (unumber~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::bits#3 * (byte) 2
Inversing boolean not [170] (bool~) gfx_init_plane_charset8::$11 ← (byte~) gfx_init_plane_charset8::$9 == (byte) 0 from [169] (bool~) gfx_init_plane_charset8::$10 ← (byte~) gfx_init_plane_charset8::$9 != (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) gfx_init_screen0::cy#2 = (byte) gfx_init_screen0::cy#3 
Alias (byte*) gfx_init_screen0::ch#1 = (byte*) gfx_init_screen0::ch#4 
Alias (byte) gfx_init_plane_charset8::gfxbCpuBank#0 = (byte~) gfx_init_plane_charset8::$1 (byte) gfx_init_plane_charset8::gfxbCpuBank#2 
Alias (byte*) gfx_init_plane_charset8::chargen#0 = (byte*~) gfx_init_plane_charset8::$6 
Alias (byte) gfx_init_plane_charset8::bits#1 = (byte~) gfx_init_plane_charset8::$12 
Alias (byte) gfx_init_plane_charset8::col#3 = (byte) gfx_init_plane_charset8::col#4 (byte) gfx_init_plane_charset8::c#1 
Alias (byte*) gfx_init_plane_charset8::gfxa#3 = (byte*) gfx_init_plane_charset8::gfxa#4 
Alias (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#4 
Alias (byte) gfx_init_plane_charset8::cp#3 = (byte) gfx_init_plane_charset8::cp#4 
Alias (byte) gfx_init_plane_charset8::cr#4 = (byte) gfx_init_plane_charset8::cr#5 
Alias (byte*) gfx_init_plane_charset8::chargen#7 = (byte*) gfx_init_plane_charset8::chargen#8 
Alias (byte) gfx_init_plane_charset8::ch#5 = (byte) gfx_init_plane_charset8::ch#6 
Alias (byte) gfx_init_plane_charset8::cr#2 = (byte) gfx_init_plane_charset8::cr#3 
Alias (byte*) gfx_init_plane_charset8::chargen#4 = (byte*) gfx_init_plane_charset8::chargen#6 (byte*) gfx_init_plane_charset8::chargen#5 
Alias (byte) gfx_init_plane_charset8::ch#2 = (byte) gfx_init_plane_charset8::ch#3 (byte) gfx_init_plane_charset8::ch#4 
Alias (byte*) gfx_init_plane_charset8::gfxa#1 = (byte*) gfx_init_plane_charset8::gfxa#7 (byte*) gfx_init_plane_charset8::gfxa#8 
Alias (byte) gfx_init_plane_charset8::col#1 = (byte) gfx_init_plane_charset8::col#7 (byte) gfx_init_plane_charset8::col#8 
Alias (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte~) gfx_init_plane_charset8::$7 
Successful SSA optimization Pass2AliasElimination
Alias (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#3 
Alias (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#3 
Alias (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#3 
Alias (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#3 
Alias (byte) gfx_init_plane_charset8::cr#2 = (byte) gfx_init_plane_charset8::cr#4 
Alias (byte*) gfx_init_plane_charset8::chargen#4 = (byte*) gfx_init_plane_charset8::chargen#7 
Alias (byte) gfx_init_plane_charset8::ch#2 = (byte) gfx_init_plane_charset8::ch#5 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) main::rst#2 (byte) main::rst#0
Identical Phi Values (byte) gfx_init_screen0::cy#2 (byte) gfx_init_screen0::cy#4
Identical Phi Values (byte) gfx_init_plane_charset8::cr#2 (byte) gfx_init_plane_charset8::cr#6
Identical Phi Values (byte*) gfx_init_plane_charset8::chargen#4 (byte*) gfx_init_plane_charset8::chargen#1
Identical Phi Values (byte) gfx_init_plane_charset8::ch#2 (byte) gfx_init_plane_charset8::ch#7
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte) gfx_init_plane_charset8::ch#7 (byte) gfx_init_plane_charset8::ch#8
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$25 [97] if((byte) main::j#1!=rangelast(0,$f)) goto main::@1
Simple Condition (bool~) main::$29 [108] if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6
Simple Condition (bool~) main::$35 [120] if((byte) main::rst#1!=(byte) $f2) goto main::@12
Simple Condition (bool~) gfx_init_screen0::$4 [138] if((byte) gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2
Simple Condition (bool~) gfx_init_screen0::$5 [142] if((byte) gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1
Simple Condition (bool~) gfx_init_plane_charset8::$11 [171] if((byte~) gfx_init_plane_charset8::$9==(byte) 0) goto gfx_init_plane_charset8::@4
Simple Condition (bool~) gfx_init_plane_charset8::$13 [180] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3
Simple Condition (bool~) gfx_init_plane_charset8::$14 [186] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2
Simple Condition (bool~) gfx_init_plane_charset8::$15 [190] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [192] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte)(number) $4000/(number) $4000
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0
Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7
Constant (const byte*) PROCPORT#0 = (byte*) 1
Constant (const byte) PROCPORT_RAM_IO#0 = 5
Constant (const byte) PROCPORT_RAM_CHARROM#0 = 1
Constant (const byte*) CHARGEN#0 = (byte*) 53248
Constant (const byte*) RASTER#0 = (byte*) 53266
Constant (const byte*) BORDERCOL#0 = (byte*) 53280
Constant (const byte*) VIC_CONTROL#0 = (byte*) 53265
Constant (const byte) VIC_ECM#0 = $40
Constant (const byte) VIC_DEN#0 = $10
Constant (const byte) VIC_RSEL#0 = 8
Constant (const byte*) VIC_CONTROL2#0 = (byte*) 53270
Constant (const byte) VIC_MCM#0 = $10
Constant (const byte) VIC_CSEL#0 = 8
Constant (const byte*) VIC_MEMORY#0 = (byte*) 53272
Constant (const byte*) CIA2_PORT_A#0 = (byte*) 56576
Constant (const byte*) CIA2_PORT_A_DDR#0 = (byte*) 56578
Constant (const byte*) DTV_FEATURE#0 = (byte*) 53311
Constant (const byte) DTV_FEATURE_ENABLE#0 = 1
Constant (const byte*) DTV_CONTROL#0 = (byte*) 53308
Constant (const byte) DTV_LINEAR#0 = 1
Constant (const byte) DTV_HIGHCOLOR#0 = 4
Constant (const byte) DTV_BADLINE_OFF#0 = $20
Constant (const byte) DTV_CHUNKY#0 = $40
Constant (const byte*) DTV_PALETTE#0 = (byte*) 53760
Constant (const byte*) DTV_PLANEA_START_LO#0 = (byte*) 53306
Constant (const byte*) DTV_PLANEA_START_MI#0 = (byte*) 53307
Constant (const byte*) DTV_PLANEA_START_HI#0 = (byte*) 53317
Constant (const byte*) DTV_PLANEA_STEP#0 = (byte*) 53318
Constant (const byte*) DTV_PLANEA_MODULO_LO#0 = (byte*) 53304
Constant (const byte*) DTV_PLANEA_MODULO_HI#0 = (byte*) 53305
Constant (const byte*) DTV_PLANEB_START_LO#0 = (byte*) 53321
Constant (const byte*) DTV_PLANEB_START_MI#0 = (byte*) 53322
Constant (const byte*) DTV_PLANEB_START_HI#0 = (byte*) 53323
Constant (const byte*) DTV_PLANEB_STEP#0 = (byte*) 53324
Constant (const byte*) DTV_PLANEB_MODULO_LO#0 = (byte*) 53319
Constant (const byte*) DTV_PLANEB_MODULO_HI#0 = (byte*) 53320
Constant (const byte*) dtvSetCpuBankSegment1::cpuBank#0 = (byte*) 255
Constant (const byte*) SCREEN#0 = (byte*) 31744
Constant (const byte*) CHARSET8#0 = (byte*) 32768
Constant (const byte) main::j#0 = 0
Constant (const byte) main::rst#0 = $42
Constant (const byte) gfx_init_screen0::cy#0 = 0
Constant (const byte) gfx_init_screen0::cx#0 = 0
Constant (const byte) gfx_init_plane_charset8::col#0 = 0
Constant (const byte) gfx_init_plane_charset8::ch#0 = 0
Constant (const byte) gfx_init_plane_charset8::cr#0 = 0
Constant (const byte) gfx_init_plane_charset8::cp#0 = 0
Constant (const byte) gfx_init_plane_charset8::c#0 = 0
Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte)$4000/$4000
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) gfx_init_screen0::ch#0 = SCREEN#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (word)SCREEN#0 in [77] (word~) main::$12 ← (word)(const byte*) SCREEN#0
Constant value identified (word)SCREEN#0 in [82] (word~) main::$16 ← (word)(const byte*) SCREEN#0
Constant value identified (word)SCREEN#0 in [86] (word~) main::$20 ← (word)(const byte*) SCREEN#0
Constant value identified (word)CHARSET8#0 in [151] (word~) gfx_init_plane_charset8::$3 ← (word)(const byte*) CHARSET8#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [98] if(true) goto main::@4
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [95] main::j#1 ← ++ main::j#2 to ++
Resolved ranged comparison value [97] if(main::j#1!=rangelast(0,$f)) goto main::@1 to (number) $10
Resolved ranged next value [136] gfx_init_screen0::cx#1 ← ++ gfx_init_screen0::cx#2 to ++
Resolved ranged comparison value [138] if(gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 to (number) $28
Resolved ranged next value [140] gfx_init_screen0::cy#1 ← ++ gfx_init_screen0::cy#4 to ++
Resolved ranged comparison value [142] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 to (number) $19
Resolved ranged next value [178] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_plane_charset8::cp#2 to ++
Resolved ranged comparison value [180] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8
Resolved ranged next value [184] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++
Resolved ranged comparison value [186] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8
Resolved ranged next value [188] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++
Resolved ranged comparison value [190] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0
Eliminating unused variable (byte) gfx_init_plane_charset8::gfxbCpuBank#1 and assignment [94] (byte) gfx_init_plane_charset8::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) $10 in if((byte) main::j#1!=(number) $10) goto main::@1
Adding number conversion cast (unumber) $28 in if((byte) gfx_init_screen0::cx#1!=(number) $28) goto gfx_init_screen0::@2
Adding number conversion cast (unumber) $19 in if((byte) gfx_init_screen0::cy#1!=(number) $19) goto gfx_init_screen0::@1
Adding number conversion cast (unumber) 8 in if((byte) gfx_init_plane_charset8::cp#1!=(number) 8) goto gfx_init_plane_charset8::@3
Adding number conversion cast (unumber) 8 in if((byte) gfx_init_plane_charset8::cr#1!=(number) 8) goto gfx_init_plane_charset8::@2
Adding number conversion cast (unumber) 0 in if((byte) gfx_init_plane_charset8::ch#1!=(number) 0) goto gfx_init_plane_charset8::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $10
Simplifying constant integer cast $28
Simplifying constant integer cast $19
Simplifying constant integer cast 8
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) $19
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [9] (byte~) main::$1 ← (const byte) DTV_HIGHCOLOR#0 | (const byte) DTV_LINEAR#0
Constant right-side identified [13] (byte~) main::$4 ← (const byte) VIC_DEN#0 | (const byte) VIC_ECM#0
Constant right-side identified [17] (byte~) main::$7 ← (const byte) VIC_MCM#0 | (const byte) VIC_CSEL#0
Constant right-side identified [19] (byte~) main::$8 ← < (const byte*) SCREEN#0
Constant right-side identified [21] (byte~) main::$9 ← > (const byte*) SCREEN#0
Constant right-side identified [27] (byte~) main::$10 ← < (const byte*) CHARSET8#0
Constant right-side identified [29] (byte~) main::$11 ← > (const byte*) CHARSET8#0
Constant right-side identified [56] (byte~) main::$26 ← (const byte) VIC_DEN#0 | (const byte) VIC_ECM#0
Constant right-side identified [64] (byte~) main::$30 ← (const byte) VIC_DEN#0 | (const byte) VIC_ECM#0
Constant right-side identified [89] (byte*~) gfx_init_plane_charset8::$0 ← (const byte*) CHARSET8#0 / (word) $4000
Constant right-side identified [97] (byte*) gfx_init_plane_charset8::chargen#0 ← (const byte*) CHARGEN#0 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$1 = DTV_HIGHCOLOR#0|DTV_LINEAR#0
Constant (const byte) main::$4 = VIC_DEN#0|VIC_ECM#0
Constant (const byte) main::$7 = VIC_MCM#0|VIC_CSEL#0
Constant (const byte) main::$8 = <SCREEN#0
Constant (const byte) main::$9 = >SCREEN#0
Constant (const byte) main::$10 = <CHARSET8#0
Constant (const byte) main::$11 = >CHARSET8#0
Constant (const word) main::$12 = (word)SCREEN#0
Constant (const word) main::$16 = (word)SCREEN#0
Constant (const word) main::$20 = (word)SCREEN#0
Constant (const byte) main::$26 = VIC_DEN#0|VIC_ECM#0
Constant (const byte) main::$30 = VIC_DEN#0|VIC_ECM#0
Constant (const byte*) gfx_init_plane_charset8::$0 = CHARSET8#0/$4000
Constant (const word) gfx_init_plane_charset8::$3 = (word)CHARSET8#0
Constant (const byte*) gfx_init_plane_charset8::chargen#0 = CHARGEN#0+1
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)gfx_init_plane_charset8::$0 in [90] (byte) gfx_init_plane_charset8::gfxbCpuBank#0 ← (byte)(const byte*) gfx_init_plane_charset8::$0
Successful SSA optimization Pass2ConstantValues
Simplifying constant evaluating to zero <(const byte*) SCREEN#0 in 
Simplifying constant evaluating to zero <(const byte*) CHARSET8#0 in 
Successful SSA optimization PassNSimplifyConstantZero
Constant right-side identified [9] (byte~) main::$2 ← (const byte) main::$1 | (const byte) DTV_CHUNKY#0
Constant right-side identified [12] (byte~) main::$5 ← (const byte) main::$4 | (const byte) VIC_RSEL#0
Constant right-side identified [29] (word~) main::$13 ← (const word) main::$12 / (word) $4000
Constant right-side identified [33] (word~) main::$17 ← (const word) main::$16 & (word) $3fff
Constant right-side identified [36] (word~) main::$21 ← (const word) main::$20 & (word) $3fff
Constant right-side identified [46] (byte~) main::$27 ← (const byte) main::$26 | (const byte) VIC_RSEL#0
Constant right-side identified [53] (byte~) main::$31 ← (const byte) main::$30 | (const byte) VIC_RSEL#0
Constant right-side identified [80] (word~) gfx_init_plane_charset8::$4 ← (const word) gfx_init_plane_charset8::$3 & (word) $3fff
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$2 = main::$1|DTV_CHUNKY#0
Constant (const byte) main::$5 = main::$4|VIC_RSEL#0
Constant (const word) main::$13 = main::$12/$4000
Constant (const word) main::$17 = main::$16&$3fff
Constant (const word) main::$21 = main::$20&$3fff
Constant (const byte) main::$27 = main::$26|VIC_RSEL#0
Constant (const byte) main::$31 = main::$30|VIC_RSEL#0
Constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 = (byte)gfx_init_plane_charset8::$0
Constant (const word) gfx_init_plane_charset8::$4 = gfx_init_plane_charset8::$3&$3fff
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 = gfx_init_plane_charset8::gfxbCpuBank#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)main::$13 in [30] (byte~) main::$14 ← (byte)(const word) main::$13
Successful SSA optimization Pass2ConstantValues
Simplifying constant evaluating to zero (const word) gfx_init_plane_charset8::$3&(word) $3fff in 
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero $4000 in [81] (word~) gfx_init_plane_charset8::$5 ← (word) $4000 + (const word) gfx_init_plane_charset8::$4
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant (const word) gfx_init_plane_charset8::$3
Eliminating unused constant (const word) gfx_init_plane_charset8::$4
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [9] (byte~) main::$3 ← (const byte) main::$2 | (const byte) DTV_BADLINE_OFF#0
Constant right-side identified [11] (byte~) main::$6 ← (const byte) main::$5 | (byte) 3
Constant right-side identified [30] (word~) main::$18 ← (const word) main::$17 / (byte) $40
Constant right-side identified [32] (byte~) main::$22 ← > (const word) main::$21
Constant right-side identified [41] (byte~) main::$28 ← (const byte) main::$27 | (byte) 3
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$3 = main::$2|DTV_BADLINE_OFF#0
Constant (const byte) main::$6 = main::$5|3
Constant (const byte) main::$14 = (byte)main::$13
Constant (const word) main::$18 = main::$17/$40
Constant (const byte) main::$22 = >main::$21
Constant (const byte) main::$28 = main::$27|3
Constant (const word) gfx_init_plane_charset8::$5 = $4000
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)main::$18 in [31] (byte~) main::$19 ← (byte)(const word) main::$18
Constant value identified (byte*)gfx_init_plane_charset8::$5 in [72] (byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(const word) gfx_init_plane_charset8::$5
Successful SSA optimization Pass2ConstantValues
Constant right-side identified [25] (byte~) main::$15 ← (byte) 3 ^ (const byte) main::$14
Constant right-side identified [28] (byte~) main::$23 ← (const byte) main::$22 / (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$15 = 3^main::$14
Constant (const byte) main::$19 = (byte)main::$18
Constant (const byte) main::$23 = main::$22/4
Constant (const byte*) gfx_init_plane_charset8::gfxa#0 = (byte*)gfx_init_plane_charset8::$5
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [26] (byte~) main::$24 ← (const byte) main::$19 | (const byte) main::$23
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$24 = main::$19|main::$23
Successful SSA optimization Pass2ConstantIdentification
Rewriting multiplication to use shift [40] (byte~) main::$34 ← (byte) main::rst#1 * (byte) $10
Rewriting multiplication to use shift [50] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 * (byte) $10
Rewriting multiplication to use shift [72] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 * (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1
Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0
Inlining constant with var siblings (const byte) main::j#0
Inlining constant with var siblings (const byte) main::rst#0
Inlining constant with var siblings (const byte) gfx_init_screen0::cy#0
Inlining constant with var siblings (const byte) gfx_init_screen0::cx#0
Inlining constant with var siblings (const byte*) gfx_init_screen0::ch#0
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::col#0
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::ch#0
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cr#0
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cp#0
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::c#0
Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::chargen#0
Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::gfxa#0
Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte)(number) $4000/(number) $4000
Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#0 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0
Constant inlined gfx_init_plane_charset8::gfxa#0 = (byte*)(word) $4000
Constant inlined main::rst#0 = (byte) $42
Constant inlined gfx_init_plane_charset8::cp#0 = (byte) 0
Constant inlined gfx_init_plane_charset8::cr#0 = (byte) 0
Constant inlined main::$12 = (word)(const byte*) SCREEN#0
Constant inlined main::$13 = (word)(const byte*) SCREEN#0/(word) $4000
Constant inlined main::$14 = (byte)(word)(const byte*) SCREEN#0/(word) $4000
Constant inlined main::$15 = (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000
Constant inlined gfx_init_plane_charset8::c#0 = (byte) 0
Constant inlined main::$30 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0
Constant inlined main::$31 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0
Constant inlined main::$10 = (byte) 0
Constant inlined main::$11 = >(const byte*) CHARSET8#0
Constant inlined gfx_init_plane_charset8::chargen#0 = (const byte*) CHARGEN#0+(byte) 1
Constant inlined main::$16 = (word)(const byte*) SCREEN#0
Constant inlined main::$17 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined main::$18 = (word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40
Constant inlined main::$19 = (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40
Constant inlined gfx_init_plane_charset8::ch#0 = (byte) 0
Constant inlined main::j#0 = (byte) 0
Constant inlined gfx_init_screen0::cx#0 = (byte) 0
Constant inlined gfx_init_screen0::cy#0 = (byte) 0
Constant inlined main::$23 = >(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4
Constant inlined main::$24 = (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4
Constant inlined main::$26 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0
Constant inlined main::$20 = (word)(const byte*) SCREEN#0
Constant inlined main::$21 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined main::$22 = >(word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined gfx_init_screen0::ch#0 = (const byte*) SCREEN#0
Constant inlined gfx_init_plane_charset8::$5 = (word) $4000
Constant inlined main::$1 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0
Constant inlined main::$27 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0
Constant inlined main::$2 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0
Constant inlined main::$28 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3
Constant inlined main::$5 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0
Constant inlined main::$6 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3
Constant inlined main::$3 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0
Constant inlined gfx_init_plane_charset8::col#0 = (byte) 0
Constant inlined main::$4 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0
Constant inlined main::$9 = >(const byte*) SCREEN#0
Constant inlined gfx_init_plane_charset8::$0 = (const byte*) CHARSET8#0/(word) $4000
Constant inlined main::$7 = (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0
Constant inlined main::$8 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@18(between main::@1 and main::@1)
Added new block during phi lifting gfx_init_screen0::@5(between gfx_init_screen0::@3 and gfx_init_screen0::@1)
Added new block during phi lifting gfx_init_screen0::@6(between gfx_init_screen0::@2 and gfx_init_screen0::@2)
Added new block during phi lifting gfx_init_plane_charset8::@11(between gfx_init_plane_charset8::@7 and gfx_init_plane_charset8::@1)
Added new block during phi lifting gfx_init_plane_charset8::@12(between gfx_init_plane_charset8::@6 and gfx_init_plane_charset8::@2)
Added new block during phi lifting gfx_init_plane_charset8::@13(between gfx_init_plane_charset8::@4 and gfx_init_plane_charset8::@3)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @5
Adding NOP phi() at start of @9
Adding NOP phi() at start of @10
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of gfx_init
Adding NOP phi() at start of gfx_init::@1
Adding NOP phi() at start of gfx_init::@2
Adding NOP phi() at start of gfx_init_plane_charset8
Adding NOP phi() at start of gfx_init_plane_charset8::@10
Adding NOP phi() at start of gfx_init_screen0
CALL GRAPH
Calls in [] to main:4 
Calls in [main] to gfx_init:10 
Calls in [gfx_init] to gfx_init_screen0:50 gfx_init_plane_charset8:52 
Calls in [gfx_init_plane_charset8] to dtvSetCpuBankSegment1:56 dtvSetCpuBankSegment1:84 

Created 19 initial phi equivalence classes
Coalesced [48] main::j#3 ← main::j#1
Coalesced [59] gfx_init_plane_charset8::chargen#10 ← gfx_init_plane_charset8::chargen#3
Coalesced [60] gfx_init_plane_charset8::gfxa#10 ← gfx_init_plane_charset8::gfxa#6
Coalesced [61] gfx_init_plane_charset8::col#10 ← gfx_init_plane_charset8::col#6
Coalesced [65] gfx_init_plane_charset8::bits#5 ← gfx_init_plane_charset8::bits#0
Coalesced [66] gfx_init_plane_charset8::gfxa#12 ← gfx_init_plane_charset8::gfxa#5
Coalesced [67] gfx_init_plane_charset8::col#12 ← gfx_init_plane_charset8::col#5
Not coalescing [71] gfx_init_plane_charset8::c#3 ← gfx_init_plane_charset8::col#2
Coalesced [87] gfx_init_plane_charset8::chargen#9 ← gfx_init_plane_charset8::chargen#1
Coalesced [88] gfx_init_plane_charset8::gfxa#9 ← gfx_init_plane_charset8::gfxa#1
Coalesced [89] gfx_init_plane_charset8::col#9 ← gfx_init_plane_charset8::col#1
Coalesced [90] gfx_init_plane_charset8::ch#9 ← gfx_init_plane_charset8::ch#1
Coalesced (already) [91] gfx_init_plane_charset8::chargen#11 ← gfx_init_plane_charset8::chargen#1
Coalesced (already) [92] gfx_init_plane_charset8::gfxa#11 ← gfx_init_plane_charset8::gfxa#1
Coalesced (already) [93] gfx_init_plane_charset8::col#11 ← gfx_init_plane_charset8::col#1
Coalesced [94] gfx_init_plane_charset8::cr#7 ← gfx_init_plane_charset8::cr#1
Coalesced [95] gfx_init_plane_charset8::bits#6 ← gfx_init_plane_charset8::bits#1
Coalesced (already) [96] gfx_init_plane_charset8::gfxa#13 ← gfx_init_plane_charset8::gfxa#1
Coalesced (already) [97] gfx_init_plane_charset8::col#13 ← gfx_init_plane_charset8::col#1
Coalesced [98] gfx_init_plane_charset8::cp#5 ← gfx_init_plane_charset8::cp#1
Coalesced [105] gfx_init_screen0::ch#6 ← gfx_init_screen0::ch#3
Coalesced [118] gfx_init_screen0::cy#5 ← gfx_init_screen0::cy#1
Coalesced [119] gfx_init_screen0::ch#5 ← gfx_init_screen0::ch#1
Coalesced [120] gfx_init_screen0::cx#3 ← gfx_init_screen0::cx#1
Coalesced (already) [121] gfx_init_screen0::ch#7 ← gfx_init_screen0::ch#1
Coalesced down to 13 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @10
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@18
Culled Empty Block (label) gfx_init::@2
Culled Empty Block (label) gfx_init_plane_charset8::@10
Culled Empty Block (label) gfx_init_plane_charset8::@11
Culled Empty Block (label) gfx_init_plane_charset8::@12
Culled Empty Block (label) gfx_init_plane_charset8::@13
Culled Empty Block (label) gfx_init_screen0::@5
Culled Empty Block (label) gfx_init_screen0::@6
Renumbering block @9 to @1
Renumbering block main::@4 to main::@2
Renumbering block main::@6 to main::@3
Renumbering block main::@8 to main::@4
Renumbering block main::@12 to main::@5
Renumbering block main::@17 to main::@6
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of gfx_init
Adding NOP phi() at start of gfx_init::@1
Adding NOP phi() at start of gfx_init_plane_charset8
Adding NOP phi() at start of gfx_init_screen0

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  asm { sei  }
  [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
  [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
  [7] call gfx_init 
  to:main::@6
main::@6: scope:[main]  from main
  [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
  [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0
  [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3
  [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0
  [12] *((const byte*) DTV_PLANEA_START_LO#0) ← (byte) 0
  [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0
  [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte) 0
  [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte) 1
  [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte) 0
  [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte) 0
  [18] *((const byte*) DTV_PLANEB_START_LO#0) ← (byte) 0
  [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0
  [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte) 0
  [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte) 0
  [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte) 0
  [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte) 0
  [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
  [25] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000
  [26] *((const byte*) VIC_MEMORY#0) ← (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4
  to:main::@1
main::@1: scope:[main]  from main::@1 main::@6
  [27] (byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@6/(byte) 0 )
  [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2
  [29] (byte) main::j#1 ← ++ (byte) main::j#2
  [30] if((byte) main::j#1!=(byte) $10) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@5
  asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  }
  [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3
  [33] *((const byte*) BORDERCOL#0) ← (byte) 0
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  [34] if(*((const byte*) RASTER#0)!=(byte) $42) goto main::@3
  to:main::@4
main::@4: scope:[main]  from main::@3
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  to:main::@5
main::@5: scope:[main]  from main::@4 main::@5
  [36] (byte) main::rst#1 ← *((const byte*) RASTER#0)
  [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte) 7
  [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32
  [39] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33
  [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte) 4
  [41] *((const byte*) BORDERCOL#0) ← (byte~) main::$34
  asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
  [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5
  to:main::@2
gfx_init: scope:[gfx_init]  from main
  [44] phi()
  [45] call gfx_init_screen0 
  to:gfx_init::@1
gfx_init::@1: scope:[gfx_init]  from gfx_init
  [46] phi()
  [47] call gfx_init_plane_charset8 
  to:gfx_init::@return
gfx_init::@return: scope:[gfx_init]  from gfx_init::@1
  [48] return 
  to:@return
gfx_init_plane_charset8: scope:[gfx_init_plane_charset8]  from gfx_init::@1
  [49] phi()
  [50] call dtvSetCpuBankSegment1 
  to:gfx_init_plane_charset8::@9
gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8
  [51] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0
  to:gfx_init_plane_charset8::@1
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
  [52] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) 0 )
  [52] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte) 0 )
  [52] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/(byte*)(word) $4000 )
  [52] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN#0+(byte) 1 )
  to:gfx_init_plane_charset8::@2
gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6
  [53] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 )
  [53] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 )
  [53] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 )
  [53] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 )
  [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2)
  [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2
  to:gfx_init_plane_charset8::@3
gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4
  [56] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 )
  [56] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 )
  [56] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 )
  [56] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 )
  [57] (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80
  [58] if((byte~) gfx_init_plane_charset8::$9==(byte) 0) goto gfx_init_plane_charset8::@4
  to:gfx_init_plane_charset8::@5
gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@3
  [59] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2
  to:gfx_init_plane_charset8::@4
gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5
  [60] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) 0 gfx_init_plane_charset8::@5/(byte~) gfx_init_plane_charset8::c#3 )
  [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2
  [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2
  [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1
  [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2
  [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2
  [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3
  to:gfx_init_plane_charset8::@6
gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@4
  [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6
  [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2
  to:gfx_init_plane_charset8::@7
gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@6
  [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8
  [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1
  to:gfx_init_plane_charset8::@8
gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@7
  [71] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
  [72] call dtvSetCpuBankSegment1 
  to:gfx_init_plane_charset8::@return
gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8]  from gfx_init_plane_charset8::@8
  [73] return 
  to:@return
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1]  from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
  [74] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 )
  [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
  asm { .byte$32,$dd lda$ff .byte$32,$00  }
  to:dtvSetCpuBankSegment1::@return
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1]  from dtvSetCpuBankSegment1
  [77] return 
  to:@return
gfx_init_screen0: scope:[gfx_init_screen0]  from gfx_init
  [78] phi()
  to:gfx_init_screen0::@1
gfx_init_screen0::@1: scope:[gfx_init_screen0]  from gfx_init_screen0 gfx_init_screen0::@3
  [79] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) SCREEN#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 )
  [79] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 )
  to:gfx_init_screen0::@2
gfx_init_screen0::@2: scope:[gfx_init_screen0]  from gfx_init_screen0::@1 gfx_init_screen0::@2
  [80] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
  [80] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 )
  [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f
  [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4
  [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f
  [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2
  [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3
  [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2
  [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2
  [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2
  to:gfx_init_screen0::@3
gfx_init_screen0::@3: scope:[gfx_init_screen0]  from gfx_init_screen0::@2
  [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4
  [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1
  to:gfx_init_screen0::@return
gfx_init_screen0::@return: scope:[gfx_init_screen0]  from gfx_init_screen0::@3
  [91] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BORDERCOL
(byte*) CHARGEN
(byte*) CHARSET8
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A_DDR
(byte) DTV_BADLINE_OFF
(byte) DTV_CHUNKY
(byte*) DTV_CONTROL
(byte*) DTV_FEATURE
(byte) DTV_FEATURE_ENABLE
(byte) DTV_HIGHCOLOR
(byte) DTV_LINEAR
(byte*) DTV_PALETTE
(byte*) DTV_PLANEA_MODULO_HI
(byte*) DTV_PLANEA_MODULO_LO
(byte*) DTV_PLANEA_START_HI
(byte*) DTV_PLANEA_START_LO
(byte*) DTV_PLANEA_START_MI
(byte*) DTV_PLANEA_STEP
(byte*) DTV_PLANEB_MODULO_HI
(byte*) DTV_PLANEB_MODULO_LO
(byte*) DTV_PLANEB_START_HI
(byte*) DTV_PLANEB_START_LO
(byte*) DTV_PLANEB_START_MI
(byte*) DTV_PLANEB_STEP
(byte*) PROCPORT
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO
(byte*) RASTER
(byte*) SCREEN
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL2
(byte) VIC_CSEL
(byte) VIC_DEN
(byte) VIC_ECM
(byte) VIC_MCM
(byte*) VIC_MEMORY
(byte) VIC_RSEL
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(byte*) dtvSetCpuBankSegment1::cpuBank
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 2.0
(void()) gfx_init()
(void()) gfx_init_plane_charset8()
(byte~) gfx_init_plane_charset8::$9 2002.0
(byte) gfx_init_plane_charset8::bits
(byte) gfx_init_plane_charset8::bits#0 101.0
(byte) gfx_init_plane_charset8::bits#1 500.5
(byte) gfx_init_plane_charset8::bits#2 443.42857142857144
(byte) gfx_init_plane_charset8::c
(byte) gfx_init_plane_charset8::c#2 2002.0
(byte~) gfx_init_plane_charset8::c#3 2002.0
(byte) gfx_init_plane_charset8::ch
(byte) gfx_init_plane_charset8::ch#1 16.5
(byte) gfx_init_plane_charset8::ch#8 1.2941176470588236
(byte*) gfx_init_plane_charset8::chargen
(byte*) gfx_init_plane_charset8::chargen#1 13.3125
(byte*) gfx_init_plane_charset8::chargen#2 157.0
(byte*) gfx_init_plane_charset8::chargen#3 22.0
(byte) gfx_init_plane_charset8::col
(byte) gfx_init_plane_charset8::col#1 302.0
(byte) gfx_init_plane_charset8::col#2 388.0
(byte) gfx_init_plane_charset8::col#5 71.0
(byte) gfx_init_plane_charset8::col#6 22.0
(byte) gfx_init_plane_charset8::cp
(byte) gfx_init_plane_charset8::cp#1 1501.5
(byte) gfx_init_plane_charset8::cp#2 222.44444444444446
(byte) gfx_init_plane_charset8::cr
(byte) gfx_init_plane_charset8::cr#1 151.5
(byte) gfx_init_plane_charset8::cr#6 14.428571428571429
(byte*) gfx_init_plane_charset8::gfxa
(byte*) gfx_init_plane_charset8::gfxa#1 234.8888888888889
(byte*) gfx_init_plane_charset8::gfxa#2 517.3333333333334
(byte*) gfx_init_plane_charset8::gfxa#5 71.0
(byte*) gfx_init_plane_charset8::gfxa#6 22.0
(byte) gfx_init_plane_charset8::gfxbCpuBank
(void()) gfx_init_screen0()
(byte~) gfx_init_screen0::$0 202.0
(byte~) gfx_init_screen0::$1 101.0
(byte~) gfx_init_screen0::$2 202.0
(byte~) gfx_init_screen0::$3 202.0
(byte*) gfx_init_screen0::ch
(byte*) gfx_init_screen0::ch#1 42.599999999999994
(byte*) gfx_init_screen0::ch#2 52.33333333333333
(byte*) gfx_init_screen0::ch#3 22.0
(byte) gfx_init_screen0::cx
(byte) gfx_init_screen0::cx#1 151.5
(byte) gfx_init_screen0::cx#2 43.285714285714285
(byte) gfx_init_screen0::cy
(byte) gfx_init_screen0::cy#1 16.5
(byte) gfx_init_screen0::cy#4 12.299999999999999
(void()) main()
(byte~) main::$32 202.0
(byte~) main::$33 202.0
(byte~) main::$34 202.0
(byte) main::j
(byte) main::j#1 16.5
(byte) main::j#2 22.0
(byte) main::rst
(byte) main::rst#1 57.714285714285715

Initial phi equivalence classes
[ main::j#2 main::j#1 ]
[ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
[ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
[ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
[ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
[ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
[ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
[ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
[ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
[ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
[ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
[ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
[ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
Added variable main::rst#1 to zero page equivalence class [ main::rst#1 ]
Added variable main::$32 to zero page equivalence class [ main::$32 ]
Added variable main::$33 to zero page equivalence class [ main::$33 ]
Added variable main::$34 to zero page equivalence class [ main::$34 ]
Added variable gfx_init_plane_charset8::$9 to zero page equivalence class [ gfx_init_plane_charset8::$9 ]
Added variable gfx_init_screen0::$0 to zero page equivalence class [ gfx_init_screen0::$0 ]
Added variable gfx_init_screen0::$1 to zero page equivalence class [ gfx_init_screen0::$1 ]
Added variable gfx_init_screen0::$2 to zero page equivalence class [ gfx_init_screen0::$2 ]
Added variable gfx_init_screen0::$3 to zero page equivalence class [ gfx_init_screen0::$3 ]
Complete equivalence classes
[ main::j#2 main::j#1 ]
[ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
[ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
[ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
[ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
[ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
[ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
[ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
[ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
[ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
[ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
[ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
[ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
[ main::rst#1 ]
[ main::$32 ]
[ main::$33 ]
[ main::$34 ]
[ gfx_init_plane_charset8::$9 ]
[ gfx_init_screen0::$0 ]
[ gfx_init_screen0::$1 ]
[ gfx_init_screen0::$2 ]
[ gfx_init_screen0::$3 ]
Allocated zp ZP_BYTE:2 [ main::j#2 main::j#1 ]
Allocated zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
Allocated zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
Allocated zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
Allocated zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
Allocated zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
Allocated zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
Allocated zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
Allocated zp ZP_BYTE:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
Allocated zp ZP_BYTE:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
Allocated zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
Allocated zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
Allocated zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
Allocated zp ZP_BYTE:18 [ main::rst#1 ]
Allocated zp ZP_BYTE:19 [ main::$32 ]
Allocated zp ZP_BYTE:20 [ main::$33 ]
Allocated zp ZP_BYTE:21 [ main::$34 ]
Allocated zp ZP_BYTE:22 [ gfx_init_plane_charset8::$9 ]
Allocated zp ZP_BYTE:23 [ gfx_init_screen0::$0 ]
Allocated zp ZP_BYTE:24 [ gfx_init_screen0::$1 ]
Allocated zp ZP_BYTE:25 [ gfx_init_screen0::$2 ]
Allocated zp ZP_BYTE:26 [ gfx_init_screen0::$3 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
// C64DTV 8bpp charmode stretcher
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = 5
  // RAM in $A000, $E000 CHAR ROM in $D000
  .const PROCPORT_RAM_CHARROM = 1
  // The address of the CHARGEN character set
  .label CHARGEN = $d000
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label VIC_CONTROL = $d011
  .const VIC_ECM = $40
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label VIC_CONTROL2 = $d016
  .const VIC_MCM = $10
  .const VIC_CSEL = 8
  .label VIC_MEMORY = $d018
  // CIA#2 Port A: Serial bus, RS-232, VIC memory bank
  .label CIA2_PORT_A = $dd00
  // CIA #2 Port A data direction register.
  .label CIA2_PORT_A_DDR = $dd02
  // Feature enables or disables the extra C64 DTV features
  .label DTV_FEATURE = $d03f
  .const DTV_FEATURE_ENABLE = 1
  // Controls the graphics modes of the C64 DTV
  .label DTV_CONTROL = $d03c
  .const DTV_LINEAR = 1
  .const DTV_HIGHCOLOR = 4
  .const DTV_BADLINE_OFF = $20
  .const DTV_CHUNKY = $40
  // Defines colors for the 16 first colors ($00-$0f)
  .label DTV_PALETTE = $d200
  // Linear Graphics Plane A Counter Control
  .label DTV_PLANEA_START_LO = $d03a
  .label DTV_PLANEA_START_MI = $d03b
  .label DTV_PLANEA_START_HI = $d045
  .label DTV_PLANEA_STEP = $d046
  .label DTV_PLANEA_MODULO_LO = $d038
  .label DTV_PLANEA_MODULO_HI = $d039
  // Linear Graphics Plane B Counter Control
  .label DTV_PLANEB_START_LO = $d049
  .label DTV_PLANEB_START_MI = $d04a
  .label DTV_PLANEB_START_HI = $d04b
  .label DTV_PLANEB_STEP = $d04c
  .label DTV_PLANEB_MODULO_LO = $d047
  .label DTV_PLANEB_MODULO_HI = $d048
  // Plane with the screen
  .label SCREEN = $7c00
  // Plane with all pixels
  .label CHARSET8 = $8000
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .label _32 = $13
    .label _33 = $14
    .label _34 = $15
    .label j = 2
    .label rst = $12
    // asm { sei  }
    sei
    // [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [7] call gfx_init 
    // [44] phi from main to gfx_init [phi:main->gfx_init]
  gfx_init_from_main:
    jsr gfx_init
    jmp b6
    // main::@6
  b6:
    // [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2 
    // Enable DTV extended modes
    lda #DTV_FEATURE_ENABLE
    sta DTV_FEATURE
    // [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 -- _deref_pbuc1=vbuc2 
    // 8BPP Pixel Cell Mode
    lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
    sta DTV_CONTROL
    // [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
    sta VIC_CONTROL
    // [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 -- _deref_pbuc1=vbuc2 
    lda #VIC_MCM|VIC_CSEL
    sta VIC_CONTROL2
    // [12] *((const byte*) DTV_PLANEA_START_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    // Plane A: SCREEN
    lda #0
    sta DTV_PLANEA_START_LO
    // [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 -- _deref_pbuc1=vbuc2 
    lda #>SCREEN
    sta DTV_PLANEA_START_MI
    // [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_START_HI
    // [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    lda #1
    sta DTV_PLANEA_STEP
    // [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_MODULO_LO
    // [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_MODULO_HI
    // [18] *((const byte*) DTV_PLANEB_START_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    // Plane B: CHARSET8
    lda #0
    sta DTV_PLANEB_START_LO
    // [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 -- _deref_pbuc1=vbuc2 
    lda #>CHARSET8
    sta DTV_PLANEB_START_MI
    // [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_START_HI
    // [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_STEP
    // [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_MODULO_LO
    // [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_MODULO_HI
    // [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    // VIC Graphics Bank
    lda #3
    sta CIA2_PORT_A_DDR
    // [25] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000 -- _deref_pbuc1=vbuc2 
    // Set VIC Bank bits to output - all others to input
    lda #3^SCREEN/$4000
    sta CIA2_PORT_A
    // [26] *((const byte*) VIC_MEMORY#0) ← (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4 -- _deref_pbuc1=vbuc2 
    // Set VIC Bank
    // VIC memory
    lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4
    sta VIC_MEMORY
    // [27] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
    // [27] phi (byte) main::j#2 = (byte) 0 [phi:main::@6->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z j
    jmp b1
  // DTV Palette - Grey Tones
    // [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
    // [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuz1=vbuz1 
    ldy.z j
    tya
    sta DTV_PALETTE,y
    // [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1 
    inc.z j
    // [30] if((byte) main::j#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z j
    bne b1_from_b1
    jmp b2
    // main::@2
  b2:
    // asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  }
    // Stabilize Raster
    ldx #$ff
  rff:
    cpx RASTER
    bne rff
  stabilize:
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    cpx RASTER
    beq eat+0
  eat:
    inx
    cpx #8
    bne stabilize
    // [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
    sta VIC_CONTROL
    // [33] *((const byte*) BORDERCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BORDERCOL
    jmp b3
    // main::@3
  b3:
    // [34] if(*((const byte*) RASTER#0)!=(byte) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$42
    cmp RASTER
    bne b3
    jmp b4
    // main::@4
  b4:
    // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    jmp b5
    // main::@5
  b5:
    // [36] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuz1=_deref_pbuc1 
    lda RASTER
    sta.z rst
    // [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and.z rst
    sta.z _32
    // [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 -- vbuz1=vbuc1_bor_vbuz2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL
    ora.z _32
    sta.z _33
    // [39] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 -- _deref_pbuc1=vbuz1 
    lda.z _33
    sta VIC_CONTROL
    // [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte) 4 -- vbuz1=vbuz2_rol_4 
    lda.z rst
    asl
    asl
    asl
    asl
    sta.z _34
    // [41] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 -- _deref_pbuc1=vbuz1 
    lda.z _34
    sta BORDERCOL
    // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    // [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 
    lda #$f2
    cmp.z rst
    bne b5
    jmp b2
}
  // gfx_init
// Initialize the different graphics in the memory
gfx_init: {
    // [45] call gfx_init_screen0 
    // [78] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
  gfx_init_screen0_from_gfx_init:
    jsr gfx_init_screen0
    // [46] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
  b1_from_gfx_init:
    jmp b1
    // gfx_init::@1
  b1:
    // [47] call gfx_init_plane_charset8 
    // [49] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8]
  gfx_init_plane_charset8_from_b1:
    jsr gfx_init_plane_charset8
    jmp breturn
    // gfx_init::@return
  breturn:
    // [48] return 
    rts
}
  // gfx_init_plane_charset8
// Initialize Plane with 8bpp charset
gfx_init_plane_charset8: {
    .const gfxbCpuBank = $ff&CHARSET8/$4000
    .label _9 = $16
    .label bits = 7
    .label chargen = 4
    .label gfxa = 8
    .label col = $a
    .label cp = $b
    .label cr = 6
    .label ch = 3
    .label c = $c
    // [50] call dtvSetCpuBankSegment1 
    // [74] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
  dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
    // [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 
    lda #gfxbCpuBank
    sta.z dtvSetCpuBankSegment1.cpuBankIdx
    jsr dtvSetCpuBankSegment1
    jmp b9
    // gfx_init_plane_charset8::@9
  b9:
    // [51] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_CHARROM
    sta PROCPORT
    // [52] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
  b1_from_b9:
    // [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z ch
    // [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z col
    // [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 
    lda #<$4000
    sta.z gfxa
    lda #>$4000
    sta.z gfxa+1
    // [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN#0+(byte) 1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 
    lda #<CHARGEN+1
    sta.z chargen
    lda #>CHARGEN+1
    sta.z chargen+1
    jmp b1
    // [52] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
  b1_from_b7:
    // [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy 
    // [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy 
    // [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy 
    // [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy 
    jmp b1
    // gfx_init_plane_charset8::@1
  b1:
    // [53] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
  b2_from_b1:
    // [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cr
    // [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy 
    jmp b2
    // [53] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
  b2_from_b6:
    // [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy 
    // [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy 
    jmp b2
    // gfx_init_plane_charset8::@2
  b2:
    // [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 
    ldy #0
    lda (chargen),y
    sta.z bits
    // [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 
    inc.z chargen
    bne !+
    inc.z chargen+1
  !:
    // [56] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
  b3_from_b2:
    // [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cp
    // [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy 
    // [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy 
    jmp b3
    // [56] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
  b3_from_b4:
    // [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy 
    // [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy 
    jmp b3
    // gfx_init_plane_charset8::@3
  b3:
    // [57] (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 
    lda #$80
    and.z bits
    sta.z _9
    // [58] if((byte~) gfx_init_plane_charset8::$9==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuz1_eq_0_then_la1 
    lda.z _9
    cmp #0
    beq b4_from_b3
    jmp b5
    // gfx_init_plane_charset8::@5
  b5:
    // [59] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuz1=vbuz2 
    lda.z col
    sta.z c
    // [60] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
  b4_from_b5:
    // [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte~) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy 
    jmp b4
    // [60] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4]
  b4_from_b3:
    // [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    jmp b4
    // gfx_init_plane_charset8::@4
  b4:
    // [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuz2 
    lda.z c
    ldy #0
    sta (gfxa),y
    // [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 
    inc.z gfxa
    bne !+
    inc.z gfxa+1
  !:
    // [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl.z bits
    // [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 
    inc.z col
    // [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuz1=_inc_vbuz1 
    inc.z cp
    // [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z cp
    bne b3_from_b4
    jmp b6
    // gfx_init_plane_charset8::@6
  b6:
    // [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 
    inc.z cr
    // [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z cr
    bne b2_from_b6
    jmp b7
    // gfx_init_plane_charset8::@7
  b7:
    // [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 
    inc.z ch
    // [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 
    lda.z ch
    cmp #0
    bne b1_from_b7
    jmp b8
    // gfx_init_plane_charset8::@8
  b8:
    // [71] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [72] call dtvSetCpuBankSegment1 
    // [74] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
  dtvSetCpuBankSegment1_from_b8:
    // [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 
    lda #$4000/$4000
    sta.z dtvSetCpuBankSegment1.cpuBankIdx
    jsr dtvSetCpuBankSegment1
    jmp breturn
    // gfx_init_plane_charset8::@return
  breturn:
    // [73] return 
    rts
}
  // dtvSetCpuBankSegment1
// Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff)
// This sets which actual memory is addressed when the CPU reads/writes to $4000-$7fff
// The actual memory addressed will be $4000*cpuSegmentIdx
// dtvSetCpuBankSegment1(byte zeropage($d) cpuBankIdx)
dtvSetCpuBankSegment1: {
    // Move CPU BANK 1 SEGMENT ($4000-$7fff)
    .label cpuBank = $ff
    .label cpuBankIdx = $d
    // [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuz1 
    lda.z cpuBankIdx
    sta cpuBank
    // asm { .byte$32,$dd lda$ff .byte$32,$00  }
    .byte $32, $dd
    lda.z $ff
    .byte $32, $00
    jmp breturn
    // dtvSetCpuBankSegment1::@return
  breturn:
    // [77] return 
    rts
}
  // gfx_init_screen0
// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos)
gfx_init_screen0: {
    .label _0 = $17
    .label _1 = $18
    .label _2 = $19
    .label _3 = $1a
    .label ch = $10
    .label cx = $f
    .label cy = $e
    // [79] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
  b1_from_gfx_init_screen0:
    // [79] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) SCREEN#0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z ch
    lda #>SCREEN
    sta.z ch+1
    // [79] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z cy
    jmp b1
    // [79] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
  b1_from_b3:
    // [79] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy 
    // [79] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy 
    jmp b1
    // gfx_init_screen0::@1
  b1:
    // [80] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
  b2_from_b1:
    // [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy 
    // [80] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta.z cx
    jmp b2
    // [80] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
  b2_from_b2:
    // [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy 
    // [80] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy 
    jmp b2
    // gfx_init_screen0::@2
  b2:
    // [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and.z cy
    sta.z _0
    // [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuz2_rol_4 
    lda.z _0
    asl
    asl
    asl
    asl
    sta.z _1
    // [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and.z cx
    sta.z _2
    // [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuz1=vbuz2_bor_vbuz3 
    lda.z _1
    ora.z _2
    sta.z _3
    // [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuz2 
    lda.z _3
    ldy #0
    sta (ch),y
    // [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 
    inc.z ch
    bne !+
    inc.z ch+1
  !:
    // [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuz1=_inc_vbuz1 
    inc.z cx
    // [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$28
    cmp.z cx
    bne b2_from_b2
    jmp b3
    // gfx_init_screen0::@3
  b3:
    // [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 
    inc.z cy
    // [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z cy
    bne b1_from_b3
    jmp breturn
    // gfx_init_screen0::@return
  breturn:
    // [91] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [12] *((const byte*) DTV_PLANEA_START_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) DTV_PLANEB_START_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [26] *((const byte*) VIC_MEMORY#0) ← (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  } always clobbers reg byte x 
Statement [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [33] *((const byte*) BORDERCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [34] if(*((const byte*) RASTER#0)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ main::rst#1 ]
Statement [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) always clobbers reg byte a 
Statement [51] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] ) always clobbers reg byte a 
Statement [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
Statement [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
Statement [71] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] ) always clobbers reg byte a 
Statement asm { .byte$32,$dd lda$ff .byte$32,$00  } always clobbers reg byte a 
Statement [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
Statement [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ gfx_init_screen0::$1 ]
Statement [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
Statement [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [12] *((const byte*) DTV_PLANEA_START_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) DTV_PLANEB_START_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [25] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [26] *((const byte*) VIC_MEMORY#0) ← (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  } always clobbers reg byte x 
Statement [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [33] *((const byte*) BORDERCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [34] if(*((const byte*) RASTER#0)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a 
Statement [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a 
Statement [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) always clobbers reg byte a 
Statement [51] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] ) always clobbers reg byte a 
Statement [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y 
Statement [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y 
Statement [71] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] ) always clobbers reg byte a 
Statement asm { .byte$32,$dd lda$ff .byte$32,$00  } always clobbers reg byte a 
Statement [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) always clobbers reg byte a 
Statement [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a 
Statement [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a 
Statement [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y 
Potential registers zp ZP_BYTE:2 [ main::j#2 main::j#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] : zp ZP_BYTE:3 , reg byte x , 
Potential registers zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] : zp ZP_BYTE:6 , reg byte x , 
Potential registers zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , 
Potential registers zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] : zp ZP_WORD:8 , 
Potential registers zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] : zp ZP_BYTE:10 , reg byte x , 
Potential registers zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , 
Potential registers zp ZP_BYTE:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] : zp ZP_BYTE:14 , reg byte x , 
Potential registers zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] : zp ZP_BYTE:15 , reg byte x , 
Potential registers zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] : zp ZP_WORD:16 , 
Potential registers zp ZP_BYTE:18 [ main::rst#1 ] : zp ZP_BYTE:18 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:19 [ main::$32 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ main::$33 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:21 [ main::$34 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ gfx_init_plane_charset8::$9 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ gfx_init_screen0::$0 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] : zp ZP_BYTE:24 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:25 [ gfx_init_screen0::$2 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ gfx_init_screen0::$3 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [gfx_init_plane_charset8] 4,004: zp ZP_BYTE:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] 2,002: zp ZP_BYTE:22 [ gfx_init_plane_charset8::$9 ] 1,723.94: zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] 1,044.93: zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 845.22: zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] 783: zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] 192.31: zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] 165.93: zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 17.79: zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] 
Uplift Scope [gfx_init_screen0] 202: zp ZP_BYTE:23 [ gfx_init_screen0::$0 ] 202: zp ZP_BYTE:25 [ gfx_init_screen0::$2 ] 202: zp ZP_BYTE:26 [ gfx_init_screen0::$3 ] 194.79: zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] 116.93: zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] 101: zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] 28.8: zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] 
Uplift Scope [main] 202: zp ZP_BYTE:19 [ main::$32 ] 202: zp ZP_BYTE:20 [ main::$33 ] 202: zp ZP_BYTE:21 [ main::$34 ] 57.71: zp ZP_BYTE:18 [ main::rst#1 ] 38.5: zp ZP_BYTE:2 [ main::j#2 main::j#1 ] 
Uplift Scope [dtvSetCpuBankSegment1] 2: zp ZP_BYTE:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] 
Uplift Scope [gfx_init] 
Uplift Scope [] 

Uplifting [gfx_init_plane_charset8] best 98394 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$9 ] reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] 
Limited combination testing to 100 combinations of 1152 possible.
Uplifting [gfx_init_screen0] best 95594 combination reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] reg byte a [ gfx_init_screen0::$3 ] reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] 
Limited combination testing to 100 combinations of 768 possible.
Uplifting [main] best 92994 combination reg byte a [ main::$32 ] reg byte a [ main::$33 ] reg byte a [ main::$34 ] reg byte x [ main::rst#1 ] zp ZP_BYTE:2 [ main::j#2 main::j#1 ] 
Limited combination testing to 100 combinations of 768 possible.
Uplifting [dtvSetCpuBankSegment1] best 92985 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] 
Uplifting [gfx_init] best 92985 combination 
Uplifting [] best 92985 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
Uplifting [gfx_init_plane_charset8] best 92985 combination zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
Uplifting [gfx_init_plane_charset8] best 92985 combination zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
Uplifting [gfx_init_plane_charset8] best 92985 combination zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ gfx_init_screen0::$1 ]
Uplifting [gfx_init_screen0] best 92985 combination zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::j#2 main::j#1 ]
Uplifting [main] best 92865 combination reg byte x [ main::j#2 main::j#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
Uplifting [gfx_init_screen0] best 92865 combination zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
Uplifting [gfx_init_plane_charset8] best 92865 combination zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] 
Coalescing zero page register [ zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] ] with [ zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] ]
Coalescing zero page register [ zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] ] with [ zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] ] with [ zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] ]
Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:2 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
Allocated (was zp ZP_WORD:8) zp ZP_WORD:3 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:5 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
Allocated (was zp ZP_BYTE:14) zp ZP_BYTE:6 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
Allocated (was zp ZP_WORD:16) zp ZP_WORD:7 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:9 [ gfx_init_screen0::$1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// C64DTV 8bpp charmode stretcher
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = 5
  // RAM in $A000, $E000 CHAR ROM in $D000
  .const PROCPORT_RAM_CHARROM = 1
  // The address of the CHARGEN character set
  .label CHARGEN = $d000
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label VIC_CONTROL = $d011
  .const VIC_ECM = $40
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label VIC_CONTROL2 = $d016
  .const VIC_MCM = $10
  .const VIC_CSEL = 8
  .label VIC_MEMORY = $d018
  // CIA#2 Port A: Serial bus, RS-232, VIC memory bank
  .label CIA2_PORT_A = $dd00
  // CIA #2 Port A data direction register.
  .label CIA2_PORT_A_DDR = $dd02
  // Feature enables or disables the extra C64 DTV features
  .label DTV_FEATURE = $d03f
  .const DTV_FEATURE_ENABLE = 1
  // Controls the graphics modes of the C64 DTV
  .label DTV_CONTROL = $d03c
  .const DTV_LINEAR = 1
  .const DTV_HIGHCOLOR = 4
  .const DTV_BADLINE_OFF = $20
  .const DTV_CHUNKY = $40
  // Defines colors for the 16 first colors ($00-$0f)
  .label DTV_PALETTE = $d200
  // Linear Graphics Plane A Counter Control
  .label DTV_PLANEA_START_LO = $d03a
  .label DTV_PLANEA_START_MI = $d03b
  .label DTV_PLANEA_START_HI = $d045
  .label DTV_PLANEA_STEP = $d046
  .label DTV_PLANEA_MODULO_LO = $d038
  .label DTV_PLANEA_MODULO_HI = $d039
  // Linear Graphics Plane B Counter Control
  .label DTV_PLANEB_START_LO = $d049
  .label DTV_PLANEB_START_MI = $d04a
  .label DTV_PLANEB_START_HI = $d04b
  .label DTV_PLANEB_STEP = $d04c
  .label DTV_PLANEB_MODULO_LO = $d047
  .label DTV_PLANEB_MODULO_HI = $d048
  // Plane with the screen
  .label SCREEN = $7c00
  // Plane with all pixels
  .label CHARSET8 = $8000
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // asm { sei  }
    sei
    // [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [7] call gfx_init 
    // [44] phi from main to gfx_init [phi:main->gfx_init]
  gfx_init_from_main:
    jsr gfx_init
    jmp b6
    // main::@6
  b6:
    // [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2 
    // Enable DTV extended modes
    lda #DTV_FEATURE_ENABLE
    sta DTV_FEATURE
    // [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 -- _deref_pbuc1=vbuc2 
    // 8BPP Pixel Cell Mode
    lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
    sta DTV_CONTROL
    // [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
    sta VIC_CONTROL
    // [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 -- _deref_pbuc1=vbuc2 
    lda #VIC_MCM|VIC_CSEL
    sta VIC_CONTROL2
    // [12] *((const byte*) DTV_PLANEA_START_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    // Plane A: SCREEN
    lda #0
    sta DTV_PLANEA_START_LO
    // [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 -- _deref_pbuc1=vbuc2 
    lda #>SCREEN
    sta DTV_PLANEA_START_MI
    // [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_START_HI
    // [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    lda #1
    sta DTV_PLANEA_STEP
    // [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_MODULO_LO
    // [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_MODULO_HI
    // [18] *((const byte*) DTV_PLANEB_START_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    // Plane B: CHARSET8
    lda #0
    sta DTV_PLANEB_START_LO
    // [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 -- _deref_pbuc1=vbuc2 
    lda #>CHARSET8
    sta DTV_PLANEB_START_MI
    // [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_START_HI
    // [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_STEP
    // [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_MODULO_LO
    // [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_MODULO_HI
    // [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    // VIC Graphics Bank
    lda #3
    sta CIA2_PORT_A_DDR
    // [25] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000 -- _deref_pbuc1=vbuc2 
    // Set VIC Bank bits to output - all others to input
    lda #3^SCREEN/$4000
    sta CIA2_PORT_A
    // [26] *((const byte*) VIC_MEMORY#0) ← (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4 -- _deref_pbuc1=vbuc2 
    // Set VIC Bank
    // VIC memory
    lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4
    sta VIC_MEMORY
    // [27] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
    // [27] phi (byte) main::j#2 = (byte) 0 [phi:main::@6->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  // DTV Palette - Grey Tones
    // [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
    // [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta DTV_PALETTE,x
    // [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx 
    inx
    // [30] if((byte) main::j#1!=(byte) $10) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$10
    bne b1_from_b1
    jmp b2
    // main::@2
  b2:
    // asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  }
    // Stabilize Raster
    ldx #$ff
  rff:
    cpx RASTER
    bne rff
  stabilize:
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    cpx RASTER
    beq eat+0
  eat:
    inx
    cpx #8
    bne stabilize
    // [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
    sta VIC_CONTROL
    // [33] *((const byte*) BORDERCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BORDERCOL
    jmp b3
    // main::@3
  b3:
    // [34] if(*((const byte*) RASTER#0)!=(byte) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$42
    cmp RASTER
    bne b3
    jmp b4
    // main::@4
  b4:
    // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    jmp b5
    // main::@5
  b5:
    // [36] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuxx=_deref_pbuc1 
    ldx RASTER
    // [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #7
    // [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 -- vbuaa=vbuc1_bor_vbuaa 
    ora #VIC_DEN|VIC_ECM|VIC_RSEL
    // [39] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 -- _deref_pbuc1=vbuaa 
    sta VIC_CONTROL
    // [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte) 4 -- vbuaa=vbuxx_rol_4 
    txa
    asl
    asl
    asl
    asl
    // [41] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 -- _deref_pbuc1=vbuaa 
    sta BORDERCOL
    // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    // [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$f2
    bne b5
    jmp b2
}
  // gfx_init
// Initialize the different graphics in the memory
gfx_init: {
    // [45] call gfx_init_screen0 
    // [78] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
  gfx_init_screen0_from_gfx_init:
    jsr gfx_init_screen0
    // [46] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
  b1_from_gfx_init:
    jmp b1
    // gfx_init::@1
  b1:
    // [47] call gfx_init_plane_charset8 
    // [49] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8]
  gfx_init_plane_charset8_from_b1:
    jsr gfx_init_plane_charset8
    jmp breturn
    // gfx_init::@return
  breturn:
    // [48] return 
    rts
}
  // gfx_init_plane_charset8
// Initialize Plane with 8bpp charset
gfx_init_plane_charset8: {
    .const gfxbCpuBank = $ff&CHARSET8/$4000
    .label bits = 2
    .label chargen = 7
    .label gfxa = 3
    .label col = 5
    .label cr = 9
    .label ch = 6
    // [50] call dtvSetCpuBankSegment1 
    // [74] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
  dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
    // [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 
    lda #gfxbCpuBank
    jsr dtvSetCpuBankSegment1
    jmp b9
    // gfx_init_plane_charset8::@9
  b9:
    // [51] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_CHARROM
    sta PROCPORT
    // [52] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
  b1_from_b9:
    // [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z ch
    // [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z col
    // [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 
    lda #<$4000
    sta.z gfxa
    lda #>$4000
    sta.z gfxa+1
    // [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN#0+(byte) 1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 
    lda #<CHARGEN+1
    sta.z chargen
    lda #>CHARGEN+1
    sta.z chargen+1
    jmp b1
    // [52] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
  b1_from_b7:
    // [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy 
    // [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy 
    // [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy 
    // [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy 
    jmp b1
    // gfx_init_plane_charset8::@1
  b1:
    // [53] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
  b2_from_b1:
    // [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cr
    // [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy 
    jmp b2
    // [53] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
  b2_from_b6:
    // [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy 
    // [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy 
    jmp b2
    // gfx_init_plane_charset8::@2
  b2:
    // [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 
    ldy #0
    lda (chargen),y
    sta.z bits
    // [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 
    inc.z chargen
    bne !+
    inc.z chargen+1
  !:
    // [56] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
  b3_from_b2:
    // [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 
    ldx #0
    // [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy 
    // [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy 
    jmp b3
    // [56] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
  b3_from_b4:
    // [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy 
    // [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy 
    jmp b3
    // gfx_init_plane_charset8::@3
  b3:
    // [57] (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and.z bits
    // [58] if((byte~) gfx_init_plane_charset8::$9==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4_from_b3
    jmp b5
    // gfx_init_plane_charset8::@5
  b5:
    // [59] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1 
    lda.z col
    // [60] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
  b4_from_b5:
    // [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte~) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy 
    jmp b4
    // [60] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4]
  b4_from_b3:
    // [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 
    lda #0
    jmp b4
    // gfx_init_plane_charset8::@4
  b4:
    // [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (gfxa),y
    // [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 
    inc.z gfxa
    bne !+
    inc.z gfxa+1
  !:
    // [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl.z bits
    // [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 
    inc.z col
    // [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx 
    inx
    // [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b3_from_b4
    jmp b6
    // gfx_init_plane_charset8::@6
  b6:
    // [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 
    inc.z cr
    // [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z cr
    bne b2_from_b6
    jmp b7
    // gfx_init_plane_charset8::@7
  b7:
    // [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 
    inc.z ch
    // [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 
    lda.z ch
    cmp #0
    bne b1_from_b7
    jmp b8
    // gfx_init_plane_charset8::@8
  b8:
    // [71] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [72] call dtvSetCpuBankSegment1 
    // [74] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
  dtvSetCpuBankSegment1_from_b8:
    // [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 
    lda #$4000/$4000
    jsr dtvSetCpuBankSegment1
    jmp breturn
    // gfx_init_plane_charset8::@return
  breturn:
    // [73] return 
    rts
}
  // dtvSetCpuBankSegment1
// Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff)
// This sets which actual memory is addressed when the CPU reads/writes to $4000-$7fff
// The actual memory addressed will be $4000*cpuSegmentIdx
// dtvSetCpuBankSegment1(byte register(A) cpuBankIdx)
dtvSetCpuBankSegment1: {
    // Move CPU BANK 1 SEGMENT ($4000-$7fff)
    .label cpuBank = $ff
    // [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa 
    sta cpuBank
    // asm { .byte$32,$dd lda$ff .byte$32,$00  }
    .byte $32, $dd
    lda.z $ff
    .byte $32, $00
    jmp breturn
    // dtvSetCpuBankSegment1::@return
  breturn:
    // [77] return 
    rts
}
  // gfx_init_screen0
// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos)
gfx_init_screen0: {
    .label _1 = 9
    .label ch = 7
    .label cy = 6
    // [79] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
  b1_from_gfx_init_screen0:
    // [79] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) SCREEN#0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z ch
    lda #>SCREEN
    sta.z ch+1
    // [79] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z cy
    jmp b1
    // [79] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
  b1_from_b3:
    // [79] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy 
    // [79] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy 
    jmp b1
    // gfx_init_screen0::@1
  b1:
    // [80] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
  b2_from_b1:
    // [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy 
    // [80] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b2
    // [80] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
  b2_from_b2:
    // [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy 
    // [80] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy 
    jmp b2
    // gfx_init_screen0::@2
  b2:
    // [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 
    lda #$f
    and.z cy
    // [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 
    asl
    asl
    asl
    asl
    sta.z _1
    // [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f
    // [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z _1
    // [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (ch),y
    // [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 
    inc.z ch
    bne !+
    inc.z ch+1
  !:
    // [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx 
    inx
    // [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$28
    bne b2_from_b2
    jmp b3
    // gfx_init_screen0::@3
  b3:
    // [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 
    inc.z cy
    // [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z cy
    bne b1_from_b3
    jmp breturn
    // gfx_init_screen0::@return
  breturn:
    // [91] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b6
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b9
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b4
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b3_from_b4 with b3
Replacing label b2_from_b6 with b2
Replacing label b1_from_b7 with b1
Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_gfx_init:
Removing instruction gfx_init_plane_charset8_from_b1:
Removing instruction b1_from_b7:
Removing instruction b2_from_b1:
Removing instruction b2_from_b6:
Removing instruction b3_from_b4:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction gfx_init_from_main:
Removing instruction b6:
Removing instruction b1_from_b6:
Removing instruction b4:
Removing instruction gfx_init_screen0_from_gfx_init:
Removing instruction b1:
Removing instruction breturn:
Removing instruction dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
Removing instruction b9:
Removing instruction b1_from_b9:
Removing instruction b3_from_b2:
Removing instruction b5:
Removing instruction b4_from_b5:
Removing instruction b6:
Removing instruction b7:
Removing instruction b8:
Removing instruction dtvSetCpuBankSegment1_from_b8:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction b1_from_gfx_init_screen0:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Relabelling long label b4_from_b3 to b5
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = (byte*) 53248
(byte*) CHARSET8
(const byte*) CHARSET8#0 CHARSET8 = (byte*) 32768
(byte*) CIA2_PORT_A
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = (byte*) 56576
(byte*) CIA2_PORT_A_DDR
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = (byte*) 56578
(byte) DTV_BADLINE_OFF
(const byte) DTV_BADLINE_OFF#0 DTV_BADLINE_OFF = (byte) $20
(byte) DTV_CHUNKY
(const byte) DTV_CHUNKY#0 DTV_CHUNKY = (byte) $40
(byte*) DTV_CONTROL
(const byte*) DTV_CONTROL#0 DTV_CONTROL = (byte*) 53308
(byte*) DTV_FEATURE
(const byte*) DTV_FEATURE#0 DTV_FEATURE = (byte*) 53311
(byte) DTV_FEATURE_ENABLE
(const byte) DTV_FEATURE_ENABLE#0 DTV_FEATURE_ENABLE = (byte) 1
(byte) DTV_HIGHCOLOR
(const byte) DTV_HIGHCOLOR#0 DTV_HIGHCOLOR = (byte) 4
(byte) DTV_LINEAR
(const byte) DTV_LINEAR#0 DTV_LINEAR = (byte) 1
(byte*) DTV_PALETTE
(const byte*) DTV_PALETTE#0 DTV_PALETTE = (byte*) 53760
(byte*) DTV_PLANEA_MODULO_HI
(const byte*) DTV_PLANEA_MODULO_HI#0 DTV_PLANEA_MODULO_HI = (byte*) 53305
(byte*) DTV_PLANEA_MODULO_LO
(const byte*) DTV_PLANEA_MODULO_LO#0 DTV_PLANEA_MODULO_LO = (byte*) 53304
(byte*) DTV_PLANEA_START_HI
(const byte*) DTV_PLANEA_START_HI#0 DTV_PLANEA_START_HI = (byte*) 53317
(byte*) DTV_PLANEA_START_LO
(const byte*) DTV_PLANEA_START_LO#0 DTV_PLANEA_START_LO = (byte*) 53306
(byte*) DTV_PLANEA_START_MI
(const byte*) DTV_PLANEA_START_MI#0 DTV_PLANEA_START_MI = (byte*) 53307
(byte*) DTV_PLANEA_STEP
(const byte*) DTV_PLANEA_STEP#0 DTV_PLANEA_STEP = (byte*) 53318
(byte*) DTV_PLANEB_MODULO_HI
(const byte*) DTV_PLANEB_MODULO_HI#0 DTV_PLANEB_MODULO_HI = (byte*) 53320
(byte*) DTV_PLANEB_MODULO_LO
(const byte*) DTV_PLANEB_MODULO_LO#0 DTV_PLANEB_MODULO_LO = (byte*) 53319
(byte*) DTV_PLANEB_START_HI
(const byte*) DTV_PLANEB_START_HI#0 DTV_PLANEB_START_HI = (byte*) 53323
(byte*) DTV_PLANEB_START_LO
(const byte*) DTV_PLANEB_START_LO#0 DTV_PLANEB_START_LO = (byte*) 53321
(byte*) DTV_PLANEB_START_MI
(const byte*) DTV_PLANEB_START_MI#0 DTV_PLANEB_START_MI = (byte*) 53322
(byte*) DTV_PLANEB_STEP
(const byte*) DTV_PLANEB_STEP#0 DTV_PLANEB_STEP = (byte*) 53324
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = (byte*) 1
(byte*) PROCPORT_DDR
(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0
(byte) PROCPORT_DDR_MEMORY_MASK
(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7
(byte) PROCPORT_RAM_CHARROM
(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte) 1
(byte) PROCPORT_RAM_IO
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) 5
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 31744
(byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265
(byte*) VIC_CONTROL2
(const byte*) VIC_CONTROL2#0 VIC_CONTROL2 = (byte*) 53270
(byte) VIC_CSEL
(const byte) VIC_CSEL#0 VIC_CSEL = (byte) 8
(byte) VIC_DEN
(const byte) VIC_DEN#0 VIC_DEN = (byte) $10
(byte) VIC_ECM
(const byte) VIC_ECM#0 VIC_ECM = (byte) $40
(byte) VIC_MCM
(const byte) VIC_MCM#0 VIC_MCM = (byte) $10
(byte*) VIC_MEMORY
(const byte*) VIC_MEMORY#0 VIC_MEMORY = (byte*) 53272
(byte) VIC_RSEL
(const byte) VIC_RSEL#0 VIC_RSEL = (byte) 8
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
(label) dtvSetCpuBankSegment1::@return
(byte*) dtvSetCpuBankSegment1::cpuBank
(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = (byte*) 255
(byte) dtvSetCpuBankSegment1::cpuBankIdx
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 reg byte a 2.0
(void()) gfx_init()
(label) gfx_init::@1
(label) gfx_init::@return
(void()) gfx_init_plane_charset8()
(byte~) gfx_init_plane_charset8::$9 reg byte a 2002.0
(label) gfx_init_plane_charset8::@1
(label) gfx_init_plane_charset8::@2
(label) gfx_init_plane_charset8::@3
(label) gfx_init_plane_charset8::@4
(label) gfx_init_plane_charset8::@5
(label) gfx_init_plane_charset8::@6
(label) gfx_init_plane_charset8::@7
(label) gfx_init_plane_charset8::@8
(label) gfx_init_plane_charset8::@9
(label) gfx_init_plane_charset8::@return
(byte) gfx_init_plane_charset8::bits
(byte) gfx_init_plane_charset8::bits#0 bits zp ZP_BYTE:2 101.0
(byte) gfx_init_plane_charset8::bits#1 bits zp ZP_BYTE:2 500.5
(byte) gfx_init_plane_charset8::bits#2 bits zp ZP_BYTE:2 443.42857142857144
(byte) gfx_init_plane_charset8::c
(byte) gfx_init_plane_charset8::c#2 reg byte a 2002.0
(byte~) gfx_init_plane_charset8::c#3 reg byte a 2002.0
(byte) gfx_init_plane_charset8::ch
(byte) gfx_init_plane_charset8::ch#1 ch zp ZP_BYTE:6 16.5
(byte) gfx_init_plane_charset8::ch#8 ch zp ZP_BYTE:6 1.2941176470588236
(byte*) gfx_init_plane_charset8::chargen
(byte*) gfx_init_plane_charset8::chargen#1 chargen zp ZP_WORD:7 13.3125
(byte*) gfx_init_plane_charset8::chargen#2 chargen zp ZP_WORD:7 157.0
(byte*) gfx_init_plane_charset8::chargen#3 chargen zp ZP_WORD:7 22.0
(byte) gfx_init_plane_charset8::col
(byte) gfx_init_plane_charset8::col#1 col zp ZP_BYTE:5 302.0
(byte) gfx_init_plane_charset8::col#2 col zp ZP_BYTE:5 388.0
(byte) gfx_init_plane_charset8::col#5 col zp ZP_BYTE:5 71.0
(byte) gfx_init_plane_charset8::col#6 col zp ZP_BYTE:5 22.0
(byte) gfx_init_plane_charset8::cp
(byte) gfx_init_plane_charset8::cp#1 reg byte x 1501.5
(byte) gfx_init_plane_charset8::cp#2 reg byte x 222.44444444444446
(byte) gfx_init_plane_charset8::cr
(byte) gfx_init_plane_charset8::cr#1 cr zp ZP_BYTE:9 151.5
(byte) gfx_init_plane_charset8::cr#6 cr zp ZP_BYTE:9 14.428571428571429
(byte*) gfx_init_plane_charset8::gfxa
(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp ZP_WORD:3 234.8888888888889
(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp ZP_WORD:3 517.3333333333334
(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp ZP_WORD:3 71.0
(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp ZP_WORD:3 22.0
(byte) gfx_init_plane_charset8::gfxbCpuBank
(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = (byte)(const byte*) CHARSET8#0/(word) $4000
(void()) gfx_init_screen0()
(byte~) gfx_init_screen0::$0 reg byte a 202.0
(byte~) gfx_init_screen0::$1 $1 zp ZP_BYTE:9 101.0
(byte~) gfx_init_screen0::$2 reg byte a 202.0
(byte~) gfx_init_screen0::$3 reg byte a 202.0
(label) gfx_init_screen0::@1
(label) gfx_init_screen0::@2
(label) gfx_init_screen0::@3
(label) gfx_init_screen0::@return
(byte*) gfx_init_screen0::ch
(byte*) gfx_init_screen0::ch#1 ch zp ZP_WORD:7 42.599999999999994
(byte*) gfx_init_screen0::ch#2 ch zp ZP_WORD:7 52.33333333333333
(byte*) gfx_init_screen0::ch#3 ch zp ZP_WORD:7 22.0
(byte) gfx_init_screen0::cx
(byte) gfx_init_screen0::cx#1 reg byte x 151.5
(byte) gfx_init_screen0::cx#2 reg byte x 43.285714285714285
(byte) gfx_init_screen0::cy
(byte) gfx_init_screen0::cy#1 cy zp ZP_BYTE:6 16.5
(byte) gfx_init_screen0::cy#4 cy zp ZP_BYTE:6 12.299999999999999
(void()) main()
(byte~) main::$32 reg byte a 202.0
(byte~) main::$33 reg byte a 202.0
(byte~) main::$34 reg byte a 202.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(byte) main::j
(byte) main::j#1 reg byte x 16.5
(byte) main::j#2 reg byte x 22.0
(byte) main::rst
(byte) main::rst#1 reg byte x 57.714285714285715

reg byte x [ main::j#2 main::j#1 ]
zp ZP_BYTE:2 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
zp ZP_WORD:3 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
zp ZP_BYTE:5 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
zp ZP_BYTE:6 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
zp ZP_WORD:7 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
reg byte x [ main::rst#1 ]
reg byte a [ main::$32 ]
reg byte a [ main::$33 ]
reg byte a [ main::$34 ]
reg byte a [ gfx_init_plane_charset8::$9 ]
reg byte a [ gfx_init_screen0::$0 ]
zp ZP_BYTE:9 [ gfx_init_screen0::$1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
reg byte a [ gfx_init_screen0::$2 ]
reg byte a [ gfx_init_screen0::$3 ]


FINAL ASSEMBLER
Score: 75375

  // File Comments
// C64DTV 8bpp charmode stretcher
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = 5
  // RAM in $A000, $E000 CHAR ROM in $D000
  .const PROCPORT_RAM_CHARROM = 1
  // The address of the CHARGEN character set
  .label CHARGEN = $d000
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label VIC_CONTROL = $d011
  .const VIC_ECM = $40
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label VIC_CONTROL2 = $d016
  .const VIC_MCM = $10
  .const VIC_CSEL = 8
  .label VIC_MEMORY = $d018
  // CIA#2 Port A: Serial bus, RS-232, VIC memory bank
  .label CIA2_PORT_A = $dd00
  // CIA #2 Port A data direction register.
  .label CIA2_PORT_A_DDR = $dd02
  // Feature enables or disables the extra C64 DTV features
  .label DTV_FEATURE = $d03f
  .const DTV_FEATURE_ENABLE = 1
  // Controls the graphics modes of the C64 DTV
  .label DTV_CONTROL = $d03c
  .const DTV_LINEAR = 1
  .const DTV_HIGHCOLOR = 4
  .const DTV_BADLINE_OFF = $20
  .const DTV_CHUNKY = $40
  // Defines colors for the 16 first colors ($00-$0f)
  .label DTV_PALETTE = $d200
  // Linear Graphics Plane A Counter Control
  .label DTV_PLANEA_START_LO = $d03a
  .label DTV_PLANEA_START_MI = $d03b
  .label DTV_PLANEA_START_HI = $d045
  .label DTV_PLANEA_STEP = $d046
  .label DTV_PLANEA_MODULO_LO = $d038
  .label DTV_PLANEA_MODULO_HI = $d039
  // Linear Graphics Plane B Counter Control
  .label DTV_PLANEB_START_LO = $d049
  .label DTV_PLANEB_START_MI = $d04a
  .label DTV_PLANEB_START_HI = $d04b
  .label DTV_PLANEB_STEP = $d04c
  .label DTV_PLANEB_MODULO_LO = $d047
  .label DTV_PLANEB_MODULO_HI = $d048
  // Plane with the screen
  .label SCREEN = $7c00
  // Plane with all pixels
  .label CHARSET8 = $8000
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // asm
    // asm { sei  }
    sei
    // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
    // [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // *PROCPORT = PROCPORT_RAM_IO
    // [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // gfx_init()
    // [7] call gfx_init 
    // [44] phi from main to gfx_init [phi:main->gfx_init]
    jsr gfx_init
    // main::@6
    // *DTV_FEATURE = DTV_FEATURE_ENABLE
    // [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2 
    // Enable DTV extended modes
    lda #DTV_FEATURE_ENABLE
    sta DTV_FEATURE
    // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY | DTV_BADLINE_OFF
    // [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 -- _deref_pbuc1=vbuc2 
    // 8BPP Pixel Cell Mode
    lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
    sta DTV_CONTROL
    // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3
    // [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
    sta VIC_CONTROL
    // *VIC_CONTROL2 = VIC_MCM | VIC_CSEL
    // [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 -- _deref_pbuc1=vbuc2 
    lda #VIC_MCM|VIC_CSEL
    sta VIC_CONTROL2
    // *DTV_PLANEA_START_LO = < SCREEN
    // [12] *((const byte*) DTV_PLANEA_START_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    // Plane A: SCREEN
    lda #0
    sta DTV_PLANEA_START_LO
    // *DTV_PLANEA_START_MI = > SCREEN
    // [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 -- _deref_pbuc1=vbuc2 
    lda #>SCREEN
    sta DTV_PLANEA_START_MI
    // *DTV_PLANEA_START_HI = 0
    // [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_START_HI
    // *DTV_PLANEA_STEP = 1
    // [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    lda #1
    sta DTV_PLANEA_STEP
    // *DTV_PLANEA_MODULO_LO = 0
    // [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEA_MODULO_LO
    // *DTV_PLANEA_MODULO_HI = 0
    // [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_PLANEA_MODULO_HI
    // *DTV_PLANEB_START_LO = < CHARSET8
    // [18] *((const byte*) DTV_PLANEB_START_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    // Plane B: CHARSET8
    sta DTV_PLANEB_START_LO
    // *DTV_PLANEB_START_MI = > CHARSET8
    // [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 -- _deref_pbuc1=vbuc2 
    lda #>CHARSET8
    sta DTV_PLANEB_START_MI
    // *DTV_PLANEB_START_HI = 0
    // [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta DTV_PLANEB_START_HI
    // *DTV_PLANEB_STEP = 0
    // [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_PLANEB_STEP
    // *DTV_PLANEB_MODULO_LO = 0
    // [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_PLANEB_MODULO_LO
    // *DTV_PLANEB_MODULO_HI = 0
    // [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta DTV_PLANEB_MODULO_HI
    // *CIA2_PORT_A_DDR = %00000011
    // [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 -- _deref_pbuc1=vbuc2 
    // VIC Graphics Bank
    lda #3
    sta CIA2_PORT_A_DDR
    // *CIA2_PORT_A = %00000011 ^ (byte)((word)SCREEN/$4000)
    // [25] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const byte*) SCREEN#0/(word) $4000 -- _deref_pbuc1=vbuc2 
    // Set VIC Bank bits to output - all others to input
    lda #3^SCREEN/$4000
    sta CIA2_PORT_A
    // *VIC_MEMORY = (byte)((((word)SCREEN)&$3fff)/$40)  |   ((>(((word)SCREEN)&$3fff))/4)
    // [26] *((const byte*) VIC_MEMORY#0) ← (byte)(word)(const byte*) SCREEN#0&(word) $3fff/(byte) $40|>(word)(const byte*) SCREEN#0&(word) $3fff/(byte) 4 -- _deref_pbuc1=vbuc2 
    // Set VIC Bank
    // VIC memory
    lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4
    sta VIC_MEMORY
    // [27] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [27] phi (byte) main::j#2 = (byte) 0 [phi:main::@6->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
  // DTV Palette - Grey Tones
    // [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
    // [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy 
    // main::@1
  b1:
    // DTV_PALETTE[j] = j
    // [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta DTV_PALETTE,x
    // for(byte j : 0..$f)
    // [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx 
    inx
    // [30] if((byte) main::j#1!=(byte) $10) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$10
    bne b1
    // main::@2
  b2:
    // asm
    // asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize  }
    // Stabilize Raster
    ldx #$ff
  rff:
    cpx RASTER
    bne rff
  stabilize:
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    cpx RASTER
    beq eat+0
  eat:
    inx
    cpx #8
    bne stabilize
    // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3
    // [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
    sta VIC_CONTROL
    // *BORDERCOL = 0
    // [33] *((const byte*) BORDERCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BORDERCOL
    // main::@3
  b3:
    // while(*RASTER!=rst)
    // [34] if(*((const byte*) RASTER#0)!=(byte) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$42
    cmp RASTER
    bne b3
    // main::@4
    // asm
    // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    // main::@5
  b5:
    // rst = *RASTER
    // [36] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuxx=_deref_pbuc1 
    ldx RASTER
    // rst&7
    // [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #7
    // VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7)
    // [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 -- vbuaa=vbuc1_bor_vbuaa 
    ora #VIC_DEN|VIC_ECM|VIC_RSEL
    // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7)
    // [39] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 -- _deref_pbuc1=vbuaa 
    sta VIC_CONTROL
    // rst*$10
    // [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte) 4 -- vbuaa=vbuxx_rol_4 
    txa
    asl
    asl
    asl
    asl
    // *BORDERCOL = rst*$10
    // [41] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 -- _deref_pbuc1=vbuaa 
    sta BORDERCOL
    // asm
    // asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop  }
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    nop
    // while (rst!=$f2)
    // [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$f2
    bne b5
    jmp b2
}
  // gfx_init
// Initialize the different graphics in the memory
gfx_init: {
    // gfx_init_screen0()
    // [45] call gfx_init_screen0 
    // [78] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
    jsr gfx_init_screen0
    // [46] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
    // gfx_init::@1
    // gfx_init_plane_charset8()
    // [47] call gfx_init_plane_charset8 
    // [49] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8]
    jsr gfx_init_plane_charset8
    // gfx_init::@return
    // }
    // [48] return 
    rts
}
  // gfx_init_plane_charset8
// Initialize Plane with 8bpp charset
gfx_init_plane_charset8: {
    .const gfxbCpuBank = $ff&CHARSET8/$4000
    .label bits = 2
    .label chargen = 7
    .label gfxa = 3
    .label col = 5
    .label cr = 9
    .label ch = 6
    // dtvSetCpuBankSegment1(gfxbCpuBank++)
    // [50] call dtvSetCpuBankSegment1 
    // [74] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
    // [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 
    lda #gfxbCpuBank
    jsr dtvSetCpuBankSegment1
    // gfx_init_plane_charset8::@9
    // *PROCPORT = PROCPORT_RAM_CHARROM
    // [51] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_CHARROM
    sta PROCPORT
    // [52] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
    // [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z ch
    // [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 
    sta.z col
    // [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 
    lda #<$4000
    sta.z gfxa
    lda #>$4000
    sta.z gfxa+1
    // [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN#0+(byte) 1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 
    lda #<CHARGEN+1
    sta.z chargen
    lda #>CHARGEN+1
    sta.z chargen+1
    // [52] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
    // [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy 
    // [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy 
    // [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy 
    // [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy 
    // gfx_init_plane_charset8::@1
  b1:
    // [53] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
    // [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z cr
    // [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy 
    // [53] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
    // [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy 
    // [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy 
    // [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy 
    // gfx_init_plane_charset8::@2
  b2:
    // bits = *chargen++
    // [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 
    ldy #0
    lda (chargen),y
    sta.z bits
    // [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 
    inc.z chargen
    bne !+
    inc.z chargen+1
  !:
    // [56] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
    // [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 
    ldx #0
    // [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy 
    // [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy 
    // [56] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
    // [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy 
    // [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy 
    // [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy 
    // gfx_init_plane_charset8::@3
  b3:
    // bits & $80
    // [57] (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 
    lda #$80
    and.z bits
    // if((bits & $80) != 0)
    // [58] if((byte~) gfx_init_plane_charset8::$9==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b5
    // gfx_init_plane_charset8::@5
    // [59] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1 
    lda.z col
    // [60] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
    // [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte~) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy 
    jmp b4
    // [60] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4]
  b5:
    // [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 
    lda #0
    // gfx_init_plane_charset8::@4
  b4:
    // *gfxa++ = c
    // [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (gfxa),y
    // *gfxa++ = c;
    // [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 
    inc.z gfxa
    bne !+
    inc.z gfxa+1
  !:
    // bits = bits*2
    // [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 
    asl.z bits
    // col++;
    // [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 
    inc.z col
    // for ( byte cp : 0..7)
    // [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx 
    inx
    // [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b3
    // gfx_init_plane_charset8::@6
    // for ( byte cr : 0..7)
    // [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 
    inc.z cr
    // [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #8
    cmp.z cr
    bne b2
    // gfx_init_plane_charset8::@7
    // for(byte ch : $00..$ff)
    // [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 
    inc.z ch
    // [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 
    lda.z ch
    cmp #0
    bne b1
    // gfx_init_plane_charset8::@8
    // *PROCPORT = PROCPORT_RAM_IO
    // [71] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // dtvSetCpuBankSegment1((byte)($4000/$4000))
    // [72] call dtvSetCpuBankSegment1 
    // [74] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
    // [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 
    lda #$4000/$4000
    jsr dtvSetCpuBankSegment1
    // gfx_init_plane_charset8::@return
    // }
    // [73] return 
    rts
}
  // dtvSetCpuBankSegment1
// Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff)
// This sets which actual memory is addressed when the CPU reads/writes to $4000-$7fff
// The actual memory addressed will be $4000*cpuSegmentIdx
// dtvSetCpuBankSegment1(byte register(A) cpuBankIdx)
dtvSetCpuBankSegment1: {
    // Move CPU BANK 1 SEGMENT ($4000-$7fff)
    .label cpuBank = $ff
    // *cpuBank = cpuBankIdx
    // [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa 
    sta cpuBank
    // asm
    // asm { .byte$32,$dd lda$ff .byte$32,$00  }
    .byte $32, $dd
    lda.z $ff
    .byte $32, $00
    // dtvSetCpuBankSegment1::@return
    // }
    // [77] return 
    rts
}
  // gfx_init_screen0
// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos)
gfx_init_screen0: {
    .label _1 = 9
    .label ch = 7
    .label cy = 6
    // [79] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
    // [79] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) SCREEN#0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z ch
    lda #>SCREEN
    sta.z ch+1
    // [79] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z cy
    // [79] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
    // [79] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy 
    // [79] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy 
    // gfx_init_screen0::@1
  b1:
    // [80] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
    // [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy 
    // [80] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 
    ldx #0
    // [80] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
    // [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy 
    // [80] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy 
    // gfx_init_screen0::@2
  b2:
    // cy&$f
    // [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 
    lda #$f
    and.z cy
    // (cy&$f)*$10
    // [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 
    asl
    asl
    asl
    asl
    sta.z _1
    // cx&$f
    // [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f
    // (cy&$f)*$10|(cx&$f)
    // [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z _1
    // *ch++ = (cy&$f)*$10|(cx&$f)
    // [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (ch),y
    // *ch++ = (cy&$f)*$10|(cx&$f);
    // [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 
    inc.z ch
    bne !+
    inc.z ch+1
  !:
    // for(byte cx: 0..39)
    // [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx 
    inx
    // [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$28
    bne b2
    // gfx_init_screen0::@3
    // for(byte cy: 0..24 )
    // [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 
    inc.z cy
    // [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$19
    cmp.z cy
    bne b1
    // gfx_init_screen0::@return
    // }
    // [91] return 
    rts
}
  // File Data

