Identified constant variable (byte*) D011
Identified constant variable (byte) RST8
Identified constant variable (byte) ECM
Identified constant variable (byte) BMM
Identified constant variable (byte) DEN
Identified constant variable (byte) RSEL
Identified constant variable (byte*) RASTER
Identified constant variable (byte*) D016
Identified constant variable (byte) MCM
Identified constant variable (byte) CSEL
Identified constant variable (byte*) D018
Identified constant variable (byte*) BGCOL
Identified constant variable (byte*) FGCOL
Identified constant variable (byte*) COLS
Identified constant variable (byte*) SCREEN
Identified constant variable (byte) plots_cnt
Culled Empty Block (label) main::@1
Culled Empty Block (label) main::@4
Culled Empty Block (label) plots::@4
Culled Empty Block (label) plots::@3
Culled Empty Block (label) plots::@5
Culled Empty Block (label) plots::@6
Culled Empty Block (label) @3
Culled Empty Block (label) init_plot_tables::@8
Culled Empty Block (label) @4
Culled Empty Block (label) init_screen::@4
Culled Empty Block (label) init_screen::@5
Culled Empty Block (label) init_screen::@6
Culled Empty Block (label) init_screen::@10
Culled Empty Block (label) init_screen::@9
Culled Empty Block (label) init_screen::@11
Culled Empty Block (label) init_screen::@12

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) D011#0 ← ((byte*)) (number) $d011
  (byte) BMM#0 ← (number) $20
  (byte) DEN#0 ← (number) $10
  (byte) RSEL#0 ← (number) 8
  (byte*) RASTER#0 ← ((byte*)) (number) $d012
  (byte*) D018#0 ← ((byte*)) (number) $d018
  (byte*) BGCOL#0 ← ((byte*)) (number) $d020
  (byte*) FGCOL#0 ← ((byte*)) (number) $d021
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  (byte*) BITMAP#0 ← ((byte*)) (number) $2000
  to:@1
main: scope:[main]  from @5
  *((byte*) BGCOL#0) ← (number) 0
  *((byte*) FGCOL#0) ← (number) 0
  (byte~) main::$0 ← (byte) BMM#0 | (byte) DEN#0
  (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#0
  (number~) main::$2 ← (byte~) main::$1 | (number) 3
  *((byte*) D011#0) ← (number~) main::$2
  (word~) main::$3 ← ((word)) (byte*) SCREEN#0
  (number~) main::$4 ← (word~) main::$3 / (number) $40
  (word~) main::$5 ← ((word)) (byte*) BITMAP#0
  (number~) main::$6 ← (word~) main::$5 / (number) $400
  (number~) main::$7 ← (number~) main::$4 | (number~) main::$6
  (byte~) main::$8 ← ((byte)) (number~) main::$7
  *((byte*) D018#0) ← (byte~) main::$8
  call init_screen 
  to:main::@5
main::@5: scope:[main]  from main
  call init_plot_tables 
  to:main::@6
main::@6: scope:[main]  from main::@5
  to:main::@2
main::@2: scope:[main]  from main::@2 main::@6 main::@7
  (bool~) main::$11 ← *((byte*) RASTER#0) != (number) $ff
  if((bool~) main::$11) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2
  *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0)
  call plots 
  to:main::@7
main::@7: scope:[main]  from main::@3
  *((byte*) BGCOL#0) ← -- *((byte*) BGCOL#0)
  if(true) goto main::@2
  to:main::@return
main::@return: scope:[main]  from main::@7
  return 
  to:@return
@1: scope:[]  from @begin
  (byte[]) plots_x#0 ← { (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28, (number) $a, (number) $28 }
  (byte[]) plots_y#0 ← { (number) $a, (number) $28, (number) $3c, (number) $50, (number) $6e, (number) $50, (number) $3c, (number) $28 }
  (byte) plots_cnt#0 ← (number) 8
  to:@2
plots: scope:[plots]  from main::@3
  (byte) plots::i#0 ← (number) 0
  to:plots::@1
plots::@1: scope:[plots]  from plots plots::@7
  (byte) plots::i#2 ← phi( plots/(byte) plots::i#0 plots::@7/(byte) plots::i#1 )
  (bool~) plots::$0 ← (byte) plots::i#2 < (byte) plots_cnt#0
  if((bool~) plots::$0) goto plots::@2
  to:plots::@return
plots::@2: scope:[plots]  from plots::@1
  (byte) plots::i#3 ← phi( plots::@1/(byte) plots::i#2 )
  (byte) plot::x#0 ← *((byte[]) plots_x#0 + (byte) plots::i#3)
  (byte) plot::y#0 ← *((byte[]) plots_y#0 + (byte) plots::i#3)
  call plot 
  to:plots::@7
plots::@7: scope:[plots]  from plots::@2
  (byte) plots::i#4 ← phi( plots::@2/(byte) plots::i#3 )
  (byte) plots::i#1 ← ++ (byte) plots::i#4
  to:plots::@1
plots::@return: scope:[plots]  from plots::@1
  return 
  to:@return
@2: scope:[]  from @1
  (byte[$100]) plot_xlo#0 ← { fill( $100, 0) }
  (byte[$100]) plot_xhi#0 ← { fill( $100, 0) }
  (byte[$100]) plot_ylo#0 ← { fill( $100, 0) }
  (byte[$100]) plot_yhi#0 ← { fill( $100, 0) }
  (byte[$100]) plot_bit#0 ← { fill( $100, 0) }
  to:@5
plot: scope:[plot]  from plots::@2
  (byte) plot::y#1 ← phi( plots::@2/(byte) plot::y#0 )
  (byte) plot::x#1 ← phi( plots::@2/(byte) plot::x#0 )
  (byte*) plot::plotter_x#0 ← ((byte*)) (number) 0
  (word) plot::plotter_y#0 ← (number) 0
  (byte~) plot::$6 ← *((byte[$100]) plot_xhi#0 + (byte) plot::x#1)
  (byte*) plot::plotter_x#1 ← (byte*) plot::plotter_x#0 hi= (byte~) plot::$6
  (byte~) plot::$7 ← *((byte[$100]) plot_xlo#0 + (byte) plot::x#1)
  (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7
  (byte~) plot::$8 ← *((byte[$100]) plot_yhi#0 + (byte) plot::y#1)
  (word) plot::plotter_y#1 ← (word) plot::plotter_y#0 hi= (byte~) plot::$8
  (byte~) plot::$9 ← *((byte[$100]) plot_ylo#0 + (byte) plot::y#1)
  (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9
  (byte*~) plot::$4 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2
  (byte*) plot::plotter#0 ← (byte*~) plot::$4
  (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((byte[$100]) plot_bit#0 + (byte) plot::x#1)
  *((byte*) plot::plotter#0) ← (byte~) plot::$5
  to:plot::@return
plot::@return: scope:[plot]  from plot
  return 
  to:@return
init_plot_tables: scope:[init_plot_tables]  from main::@5
  (byte) init_plot_tables::bits#0 ← (number) $80
  (byte) init_plot_tables::x#0 ← (byte) 0
  to:init_plot_tables::@1
init_plot_tables::@1: scope:[init_plot_tables]  from init_plot_tables init_plot_tables::@2
  (byte) init_plot_tables::bits#3 ← phi( init_plot_tables/(byte) init_plot_tables::bits#0 init_plot_tables::@2/(byte) init_plot_tables::bits#4 )
  (byte) init_plot_tables::x#2 ← phi( init_plot_tables/(byte) init_plot_tables::x#0 init_plot_tables::@2/(byte) init_plot_tables::x#1 )
  (number~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (number) $f8
  *((byte[$100]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (number~) init_plot_tables::$0
  (byte~) init_plot_tables::$1 ← > (byte*) BITMAP#0
  *((byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$1
  *((byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3
  (number~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 / (number) 2
  (byte) init_plot_tables::bits#1 ← (number~) init_plot_tables::$2
  (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (number) 0
  (bool~) init_plot_tables::$4 ← ! (bool~) init_plot_tables::$3
  if((bool~) init_plot_tables::$4) goto init_plot_tables::@2
  to:init_plot_tables::@3
init_plot_tables::@2: scope:[init_plot_tables]  from init_plot_tables::@1 init_plot_tables::@3
  (byte) init_plot_tables::bits#4 ← phi( init_plot_tables::@1/(byte) init_plot_tables::bits#1 init_plot_tables::@3/(byte) init_plot_tables::bits#2 )
  (byte) init_plot_tables::x#3 ← phi( init_plot_tables::@1/(byte) init_plot_tables::x#2 init_plot_tables::@3/(byte) init_plot_tables::x#4 )
  (byte) init_plot_tables::x#1 ← (byte) init_plot_tables::x#3 + rangenext(0,$ff)
  (bool~) init_plot_tables::$5 ← (byte) init_plot_tables::x#1 != rangelast(0,$ff)
  if((bool~) init_plot_tables::$5) goto init_plot_tables::@1
  to:init_plot_tables::@4
init_plot_tables::@3: scope:[init_plot_tables]  from init_plot_tables::@1
  (byte) init_plot_tables::x#4 ← phi( init_plot_tables::@1/(byte) init_plot_tables::x#2 )
  (byte) init_plot_tables::bits#2 ← (number) $80
  to:init_plot_tables::@2
init_plot_tables::@4: scope:[init_plot_tables]  from init_plot_tables::@2
  (byte*) init_plot_tables::yoffs#0 ← ((byte*)) (number) 0
  (byte) init_plot_tables::y#0 ← (byte) 0
  to:init_plot_tables::@5
init_plot_tables::@5: scope:[init_plot_tables]  from init_plot_tables::@4 init_plot_tables::@6
  (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@4/(byte*) init_plot_tables::yoffs#0 init_plot_tables::@6/(byte*) init_plot_tables::yoffs#4 )
  (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@4/(byte) init_plot_tables::y#0 init_plot_tables::@6/(byte) init_plot_tables::y#1 )
  (number~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (number) 7
  (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2
  (number~) init_plot_tables::$8 ← (number~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
  *((byte[$100]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (number~) init_plot_tables::$8
  (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2
  *((byte[$100]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9
  (number~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (number) 7
  (bool~) init_plot_tables::$11 ← (number~) init_plot_tables::$10 == (number) 7
  (bool~) init_plot_tables::$12 ← ! (bool~) init_plot_tables::$11
  if((bool~) init_plot_tables::$12) goto init_plot_tables::@6
  to:init_plot_tables::@7
init_plot_tables::@6: scope:[init_plot_tables]  from init_plot_tables::@5 init_plot_tables::@7
  (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@5/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@7/(byte*) init_plot_tables::yoffs#1 )
  (byte) init_plot_tables::y#3 ← phi( init_plot_tables::@5/(byte) init_plot_tables::y#2 init_plot_tables::@7/(byte) init_plot_tables::y#4 )
  (byte) init_plot_tables::y#1 ← (byte) init_plot_tables::y#3 + rangenext(0,$ff)
  (bool~) init_plot_tables::$14 ← (byte) init_plot_tables::y#1 != rangelast(0,$ff)
  if((bool~) init_plot_tables::$14) goto init_plot_tables::@5
  to:init_plot_tables::@return
init_plot_tables::@7: scope:[init_plot_tables]  from init_plot_tables::@5
  (byte) init_plot_tables::y#4 ← phi( init_plot_tables::@5/(byte) init_plot_tables::y#2 )
  (byte*) init_plot_tables::yoffs#3 ← phi( init_plot_tables::@5/(byte*) init_plot_tables::yoffs#2 )
  (byte*~) init_plot_tables::$13 ← (byte*) init_plot_tables::yoffs#3 + (number) $28*(number) 8
  (byte*) init_plot_tables::yoffs#1 ← (byte*~) init_plot_tables::$13
  to:init_plot_tables::@6
init_plot_tables::@return: scope:[init_plot_tables]  from init_plot_tables::@6
  return 
  to:@return
init_screen: scope:[init_screen]  from main
  (byte*) init_screen::b#0 ← (byte*) BITMAP#0
  to:init_screen::@1
init_screen::@1: scope:[init_screen]  from init_screen init_screen::@2
  (byte*) init_screen::b#2 ← phi( init_screen/(byte*) init_screen::b#0 init_screen::@2/(byte*) init_screen::b#1 )
  (byte*~) init_screen::$0 ← (byte*) BITMAP#0 + (number) $2000
  (bool~) init_screen::$1 ← (byte*) init_screen::b#2 != (byte*~) init_screen::$0
  if((bool~) init_screen::$1) goto init_screen::@2
  to:init_screen::@3
init_screen::@2: scope:[init_screen]  from init_screen::@1
  (byte*) init_screen::b#3 ← phi( init_screen::@1/(byte*) init_screen::b#2 )
  *((byte*) init_screen::b#3) ← (number) 0
  (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#3
  to:init_screen::@1
init_screen::@3: scope:[init_screen]  from init_screen::@1
  (byte*) init_screen::c#0 ← (byte*) SCREEN#0
  to:init_screen::@7
init_screen::@7: scope:[init_screen]  from init_screen::@3 init_screen::@8
  (byte*) init_screen::c#2 ← phi( init_screen::@3/(byte*) init_screen::c#0 init_screen::@8/(byte*) init_screen::c#1 )
  (byte*~) init_screen::$2 ← (byte*) SCREEN#0 + (number) $400
  (bool~) init_screen::$3 ← (byte*) init_screen::c#2 != (byte*~) init_screen::$2
  if((bool~) init_screen::$3) goto init_screen::@8
  to:init_screen::@return
init_screen::@8: scope:[init_screen]  from init_screen::@7
  (byte*) init_screen::c#3 ← phi( init_screen::@7/(byte*) init_screen::c#2 )
  *((byte*) init_screen::c#3) ← (number) $14
  (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#3
  to:init_screen::@7
init_screen::@return: scope:[init_screen]  from init_screen::@7
  return 
  to:@return
@5: scope:[]  from @2
  call main 
  to:@6
@6: scope:[]  from @5
  to:@end
@end: scope:[]  from @6

SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @5
(label) @6
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BMM
(byte) BMM#0
(byte*) D011
(byte*) D011#0
(byte*) D018
(byte*) D018#0
(byte) DEN
(byte) DEN#0
(byte*) FGCOL
(byte*) FGCOL#0
(byte*) RASTER
(byte*) RASTER#0
(byte) RSEL
(byte) RSEL#0
(byte*) SCREEN
(byte*) SCREEN#0
(void()) init_plot_tables()
(number~) init_plot_tables::$0
(byte~) init_plot_tables::$1
(number~) init_plot_tables::$10
(bool~) init_plot_tables::$11
(bool~) init_plot_tables::$12
(byte*~) init_plot_tables::$13
(bool~) init_plot_tables::$14
(number~) init_plot_tables::$2
(bool~) init_plot_tables::$3
(bool~) init_plot_tables::$4
(bool~) init_plot_tables::$5
(number~) init_plot_tables::$6
(byte~) init_plot_tables::$7
(number~) init_plot_tables::$8
(byte~) init_plot_tables::$9
(label) init_plot_tables::@1
(label) init_plot_tables::@2
(label) init_plot_tables::@3
(label) init_plot_tables::@4
(label) init_plot_tables::@5
(label) init_plot_tables::@6
(label) init_plot_tables::@7
(label) init_plot_tables::@return
(byte) init_plot_tables::bits
(byte) init_plot_tables::bits#0
(byte) init_plot_tables::bits#1
(byte) init_plot_tables::bits#2
(byte) init_plot_tables::bits#3
(byte) init_plot_tables::bits#4
(byte) init_plot_tables::x
(byte) init_plot_tables::x#0
(byte) init_plot_tables::x#1
(byte) init_plot_tables::x#2
(byte) init_plot_tables::x#3
(byte) init_plot_tables::x#4
(byte) init_plot_tables::y
(byte) init_plot_tables::y#0
(byte) init_plot_tables::y#1
(byte) init_plot_tables::y#2
(byte) init_plot_tables::y#3
(byte) init_plot_tables::y#4
(byte*) init_plot_tables::yoffs
(byte*) init_plot_tables::yoffs#0
(byte*) init_plot_tables::yoffs#1
(byte*) init_plot_tables::yoffs#2
(byte*) init_plot_tables::yoffs#3
(byte*) init_plot_tables::yoffs#4
(void()) init_screen()
(byte*~) init_screen::$0
(bool~) init_screen::$1
(byte*~) init_screen::$2
(bool~) init_screen::$3
(label) init_screen::@1
(label) init_screen::@2
(label) init_screen::@3
(label) init_screen::@7
(label) init_screen::@8
(label) init_screen::@return
(byte*) init_screen::b
(byte*) init_screen::b#0
(byte*) init_screen::b#1
(byte*) init_screen::b#2
(byte*) init_screen::b#3
(byte*) init_screen::c
(byte*) init_screen::c#0
(byte*) init_screen::c#1
(byte*) init_screen::c#2
(byte*) init_screen::c#3
(void()) main()
(byte~) main::$0
(byte~) main::$1
(bool~) main::$11
(number~) main::$2
(word~) main::$3
(number~) main::$4
(word~) main::$5
(number~) main::$6
(number~) main::$7
(byte~) main::$8
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@return
(void()) plot((byte) plot::x , (byte) plot::y)
(byte*~) plot::$4
(byte~) plot::$5
(byte~) plot::$6
(byte~) plot::$7
(byte~) plot::$8
(byte~) plot::$9
(label) plot::@return
(byte*) plot::plotter
(byte*) plot::plotter#0
(byte*) plot::plotter_x
(byte*) plot::plotter_x#0
(byte*) plot::plotter_x#1
(byte*) plot::plotter_x#2
(word) plot::plotter_y
(word) plot::plotter_y#0
(word) plot::plotter_y#1
(word) plot::plotter_y#2
(byte) plot::x
(byte) plot::x#0
(byte) plot::x#1
(byte) plot::y
(byte) plot::y#0
(byte) plot::y#1
(byte[$100]) plot_bit
(byte[$100]) plot_bit#0
(byte[$100]) plot_xhi
(byte[$100]) plot_xhi#0
(byte[$100]) plot_xlo
(byte[$100]) plot_xlo#0
(byte[$100]) plot_yhi
(byte[$100]) plot_yhi#0
(byte[$100]) plot_ylo
(byte[$100]) plot_ylo#0
(void()) plots()
(bool~) plots::$0
(label) plots::@1
(label) plots::@2
(label) plots::@7
(label) plots::@return
(byte) plots::i
(byte) plots::i#0
(byte) plots::i#1
(byte) plots::i#2
(byte) plots::i#3
(byte) plots::i#4
(byte) plots_cnt
(byte) plots_cnt#0
(byte[]) plots_x
(byte[]) plots_x#0
(byte[]) plots_y
(byte[]) plots_y#0

Adding number conversion cast (unumber) $20 in (byte) BMM#0 ← (number) $20
Adding number conversion cast (unumber) $10 in (byte) DEN#0 ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) RSEL#0 ← (number) 8
Adding number conversion cast (unumber) 0 in *((byte*) BGCOL#0) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) FGCOL#0) ← (number) 0
Adding number conversion cast (unumber) 3 in (number~) main::$2 ← (byte~) main::$1 | (number) 3
Adding number conversion cast (unumber) main::$2 in (number~) main::$2 ← (byte~) main::$1 | (unumber)(number) 3
Adding number conversion cast (unumber) $40 in (number~) main::$4 ← (word~) main::$3 / (number) $40
Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (word~) main::$3 / (unumber)(number) $40
Adding number conversion cast (unumber) $400 in (number~) main::$6 ← (word~) main::$5 / (number) $400
Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (word~) main::$5 / (unumber)(number) $400
Adding number conversion cast (unumber) main::$7 in (number~) main::$7 ← (unumber~) main::$4 | (unumber~) main::$6
Adding number conversion cast (unumber) $ff in (bool~) main::$11 ← *((byte*) RASTER#0) != (number) $ff
Adding number conversion cast (unumber) 8 in (byte) plots_cnt#0 ← (number) 8
Adding number conversion cast (unumber) 0 in (byte) plots::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (word) plot::plotter_y#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (byte) init_plot_tables::bits#0 ← (number) $80
Adding number conversion cast (unumber) $f8 in (number~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (number) $f8
Adding number conversion cast (unumber) init_plot_tables::$0 in (number~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (unumber)(number) $f8
Adding number conversion cast (unumber) 2 in (number~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 / (number) 2
Adding number conversion cast (unumber) init_plot_tables::$2 in (number~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 / (unumber)(number) 2
Adding number conversion cast (unumber) 0 in (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) init_plot_tables::bits#2 ← (number) $80
Adding number conversion cast (unumber) 7 in (number~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (number) 7
Adding number conversion cast (unumber) init_plot_tables::$6 in (number~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) init_plot_tables::$8 in (number~) init_plot_tables::$8 ← (unumber~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
Adding number conversion cast (unumber) 7 in (number~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (number) 7
Adding number conversion cast (unumber) init_plot_tables::$10 in (number~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) 7 in (bool~) init_plot_tables::$11 ← (unumber~) init_plot_tables::$10 == (number) 7
Adding number conversion cast (unumber) $28*8 in (byte*~) init_plot_tables::$13 ← (byte*) init_plot_tables::yoffs#3 + (number) $28*(number) 8
Adding number conversion cast (unumber) $2000 in (byte*~) init_screen::$0 ← (byte*) BITMAP#0 + (number) $2000
Adding number conversion cast (unumber) 0 in *((byte*) init_screen::b#3) ← (number) 0
Adding number conversion cast (unumber) $400 in (byte*~) init_screen::$2 ← (byte*) SCREEN#0 + (number) $400
Adding number conversion cast (unumber) $14 in *((byte*) init_screen::c#3) ← (number) $14
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) plots_x#0 ← (byte[]){ (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28, (byte)(number) $a, (byte)(number) $28 }
Added casts to value list in (byte[]) plots_y#0 ← (byte[]){ (byte)(number) $a, (byte)(number) $28, (byte)(number) $3c, (byte)(number) $50, (byte)(number) $6e, (byte)(number) $50, (byte)(number) $3c, (byte)(number) $28 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte*) D011#0 ← (byte*)(number) $d011
Inlining cast (byte) BMM#0 ← (unumber)(number) $20
Inlining cast (byte) DEN#0 ← (unumber)(number) $10
Inlining cast (byte) RSEL#0 ← (unumber)(number) 8
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) D018#0 ← (byte*)(number) $d018
Inlining cast (byte*) BGCOL#0 ← (byte*)(number) $d020
Inlining cast (byte*) FGCOL#0 ← (byte*)(number) $d021
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
Inlining cast *((byte*) BGCOL#0) ← (unumber)(number) 0
Inlining cast *((byte*) FGCOL#0) ← (unumber)(number) 0
Inlining cast (word~) main::$3 ← (word)(byte*) SCREEN#0
Inlining cast (word~) main::$5 ← (word)(byte*) BITMAP#0
Inlining cast (byte~) main::$8 ← (byte)(unumber~) main::$7
Inlining cast (byte) plots_cnt#0 ← (unumber)(number) 8
Inlining cast (byte) plots::i#0 ← (unumber)(number) 0
Inlining cast (byte*) plot::plotter_x#0 ← (byte*)(number) 0
Inlining cast (word) plot::plotter_y#0 ← (unumber)(number) 0
Inlining cast (byte) init_plot_tables::bits#0 ← (unumber)(number) $80
Inlining cast (byte) init_plot_tables::bits#2 ← (unumber)(number) $80
Inlining cast (byte*) init_plot_tables::yoffs#0 ← (byte*)(number) 0
Inlining cast *((byte*) init_screen::b#3) ← (unumber)(number) 0
Inlining cast *((byte*) init_screen::c#3) ← (unumber)(number) $14
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53265
Simplifying constant integer cast $20
Simplifying constant integer cast $10
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 53281
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 8192
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 3
Simplifying constant integer cast $40
Simplifying constant integer cast $400
Simplifying constant integer cast $ff
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $a
Simplifying constant integer cast $28
Simplifying constant integer cast $3c
Simplifying constant integer cast $50
Simplifying constant integer cast $6e
Simplifying constant integer cast $50
Simplifying constant integer cast $3c
Simplifying constant integer cast $28
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast $f8
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast $2000
Simplifying constant integer cast 0
Simplifying constant integer cast $400
Simplifying constant integer cast $14
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) $40
Finalized unsigned number type (word) $400
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $f8
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (word) $2000
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $400
Finalized unsigned number type (byte) $14
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) main::$2 ← (byte~) main::$1 | (byte) 3
Inferred type updated to word in (unumber~) main::$4 ← (word~) main::$3 / (byte) $40
Inferred type updated to word in (unumber~) main::$6 ← (word~) main::$5 / (word) $400
Inferred type updated to word in (unumber~) main::$7 ← (word~) main::$4 | (word~) main::$6
Inferred type updated to byte in (unumber~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) $f8
Inferred type updated to byte in (unumber~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 / (byte) 2
Inferred type updated to byte in (unumber~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte) 7
Inferred type updated to byte in (unumber~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
Inferred type updated to byte in (unumber~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7
Inversing boolean not [78] (bool~) init_plot_tables::$4 ← (byte) init_plot_tables::bits#1 != (byte) 0 from [77] (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (byte) 0
Inversing boolean not [97] (bool~) init_plot_tables::$12 ← (byte~) init_plot_tables::$10 != (byte) 7 from [96] (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$10 == (byte) 7
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte) plots::i#2 = (byte) plots::i#3 (byte) plots::i#4 
Alias (byte*) plot::plotter#0 = (byte*~) plot::$4 
Alias (byte) init_plot_tables::bits#1 = (byte~) init_plot_tables::$2 
Alias (byte) init_plot_tables::x#2 = (byte) init_plot_tables::x#4 
Alias (byte*) init_plot_tables::yoffs#2 = (byte*) init_plot_tables::yoffs#3 
Alias (byte) init_plot_tables::y#2 = (byte) init_plot_tables::y#4 
Alias (byte*) init_plot_tables::yoffs#1 = (byte*~) init_plot_tables::$13 
Alias (byte*) init_screen::b#2 = (byte*) init_screen::b#3 
Alias (byte*) init_screen::c#2 = (byte*) init_screen::c#3 
Successful SSA optimization Pass2AliasElimination
Alias (byte) init_plot_tables::x#2 = (byte) init_plot_tables::x#3 
Alias (byte) init_plot_tables::y#2 = (byte) init_plot_tables::y#3 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) plot::x#1 (byte) plot::x#0
Identical Phi Values (byte) plot::y#1 (byte) plot::y#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [95] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) main::$11 [26] if(*((byte*) RASTER#0)!=(byte) $ff) goto main::@2
Simple Condition (bool~) plots::$0 [38] if((byte) plots::i#2<(byte) plots_cnt#0) goto plots::@2
Simple Condition (bool~) init_plot_tables::$4 [79] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@2
Simple Condition (bool~) init_plot_tables::$5 [83] if((byte) init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1
Simple Condition (bool~) init_plot_tables::$12 [98] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@6
Simple Condition (bool~) init_plot_tables::$14 [102] if((byte) init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5
Simple Condition (bool~) init_screen::$1 [111] if((byte*) init_screen::b#2!=(byte*~) init_screen::$0) goto init_screen::@2
Simple Condition (bool~) init_screen::$3 [119] if((byte*) init_screen::c#2!=(byte*~) init_screen::$2) goto init_screen::@8
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [46] (byte[$100]) plot_xlo#0 ← { fill( $100, 0) }
Constant right-side identified [47] (byte[$100]) plot_xhi#0 ← { fill( $100, 0) }
Constant right-side identified [48] (byte[$100]) plot_ylo#0 ← { fill( $100, 0) }
Constant right-side identified [49] (byte[$100]) plot_yhi#0 ← { fill( $100, 0) }
Constant right-side identified [50] (byte[$100]) plot_bit#0 ← { fill( $100, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Identified constant from value list (byte[]) { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 }
Identified constant from value list (byte[]) { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte*) D011#0 = (byte*) 53265
Constant (const byte) BMM#0 = $20
Constant (const byte) DEN#0 = $10
Constant (const byte) RSEL#0 = 8
Constant (const byte*) RASTER#0 = (byte*) 53266
Constant (const byte*) D018#0 = (byte*) 53272
Constant (const byte*) BGCOL#0 = (byte*) 53280
Constant (const byte*) FGCOL#0 = (byte*) 53281
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte*) BITMAP#0 = (byte*) 8192
Constant (const byte[]) plots_x#0 = { $3c, $50, $6e, $50, $3c, $28, $a, $28 }
Constant (const byte[]) plots_y#0 = { $a, $28, $3c, $50, $6e, $50, $3c, $28 }
Constant (const byte) plots_cnt#0 = 8
Constant (const byte) plots::i#0 = 0
Constant (const byte[$100]) plot_xlo#0 = { fill( $100, 0) }
Constant (const byte[$100]) plot_xhi#0 = { fill( $100, 0) }
Constant (const byte[$100]) plot_ylo#0 = { fill( $100, 0) }
Constant (const byte[$100]) plot_yhi#0 = { fill( $100, 0) }
Constant (const byte[$100]) plot_bit#0 = { fill( $100, 0) }
Constant (const byte*) plot::plotter_x#0 = (byte*) 0
Constant (const word) plot::plotter_y#0 = 0
Constant (const byte) init_plot_tables::bits#0 = $80
Constant (const byte) init_plot_tables::x#0 = 0
Constant (const byte) init_plot_tables::bits#2 = $80
Constant (const byte*) init_plot_tables::yoffs#0 = (byte*) 0
Constant (const byte) init_plot_tables::y#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_screen::b#0 = BITMAP#0
Constant (const byte*) init_screen::c#0 = SCREEN#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (word)SCREEN#0 in [16] (word~) main::$3 ← (word)(const byte*) SCREEN#0
Constant value identified (word)BITMAP#0 in [18] (word~) main::$5 ← (word)(const byte*) BITMAP#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [30] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [81] init_plot_tables::x#1 ← ++ init_plot_tables::x#2 to ++
Resolved ranged comparison value [83] if(init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1 to (number) 0
Resolved ranged next value [100] init_plot_tables::y#1 ← ++ init_plot_tables::y#2 to ++
Resolved ranged comparison value [102] if(init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5 to (number) 0
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Successful SSA optimization Pass2LoopHeadConstantIdentification
Adding number conversion cast (unumber) 0 in if((byte) init_plot_tables::x#1!=(number) 0) goto init_plot_tables::@1
Adding number conversion cast (unumber) 0 in if((byte) init_plot_tables::y#1!=(number) 0) goto init_plot_tables::@5
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) plots::i#1 = (byte) plots::i#2 
Alias (byte) plots::i#5 = (byte) plots::i#6 
Alias (byte~) init_plot_tables::$10 = (byte~) init_plot_tables::$6 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) plots::i#7 (const byte) plots::i#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [2] (byte~) main::$0 ← (const byte) BMM#0 | (const byte) DEN#0
Constant right-side identified [44] (byte~) init_plot_tables::$1 ← > (const byte*) BITMAP#0
Constant right-side identified [67] (byte*~) init_screen::$0 ← (const byte*) BITMAP#0 + (word) $2000
Constant right-side identified [72] (byte*~) init_screen::$2 ← (const byte*) SCREEN#0 + (word) $400
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$0 = BMM#0|DEN#0
Constant (const word) main::$3 = (word)SCREEN#0
Constant (const word) main::$5 = (word)BITMAP#0
Constant (const byte) init_plot_tables::$1 = >BITMAP#0
Constant (const byte*) init_screen::$0 = BITMAP#0+$2000
Constant (const byte*) init_screen::$2 = SCREEN#0+$400
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [79] if((const byte) plots::i#0<(const byte) plots_cnt#0) goto plots::@2
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization Pass2LoopHeadConstantIdentification
Successful SSA optimization Pass2LoopHeadConstantIdentification
Alias (byte*) init_screen::b#1 = (byte*) init_screen::b#2 
Alias (byte*) init_screen::c#1 = (byte*) init_screen::c#2 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) init_screen::b#5 (const byte*) init_screen::b#0
Identical Phi Values (byte*) init_screen::c#5 (const byte*) init_screen::c#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [2] (byte~) main::$1 ← (const byte) main::$0 | (const byte) RSEL#0
Constant right-side identified [5] (word~) main::$4 ← (const word) main::$3 / (byte) $40
Constant right-side identified [6] (word~) main::$6 ← (const word) main::$5 / (word) $400
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$1 = main::$0|RSEL#0
Constant (const word) main::$4 = main::$3/$40
Constant (const word) main::$6 = main::$5/$400
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [73] if((const byte*) init_screen::b#0!=(const byte*) init_screen::$0) goto init_screen::@2
if() condition always true - replacing block destination [75] if((const byte*) init_screen::c#0!=(const byte*) init_screen::$2) goto init_screen::@8
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [2] (byte~) main::$2 ← (const byte) main::$1 | (byte) 3
Constant right-side identified [4] (word~) main::$7 ← (const word) main::$4 | (const word) main::$6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$2 = main::$1|3
Constant (const word) main::$7 = main::$4|main::$6
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)main::$7 in [5] (byte~) main::$8 ← (byte)(const word) main::$7
Successful SSA optimization Pass2ConstantValues
Constant (const byte) main::$8 = (byte)main::$7
Successful SSA optimization Pass2ConstantIdentification
Rewriting division to use shift [34] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 / (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte) plots::i#0
Inlining constant with var siblings (const byte*) plot::plotter_x#0
Inlining constant with var siblings (const word) plot::plotter_y#0
Inlining constant with var siblings (const byte) init_plot_tables::bits#0
Inlining constant with var siblings (const byte) init_plot_tables::x#0
Inlining constant with var siblings (const byte) init_plot_tables::bits#2
Inlining constant with var siblings (const byte*) init_plot_tables::yoffs#0
Inlining constant with var siblings (const byte) init_plot_tables::y#0
Inlining constant with var siblings (const byte*) init_screen::b#0
Inlining constant with var siblings (const byte*) init_screen::c#0
Constant inlined plots::i#0 = (byte) 0
Constant inlined init_plot_tables::bits#2 = (byte) $80
Constant inlined init_plot_tables::bits#0 = (byte) $80
Constant inlined plot::plotter_y#0 = (byte) 0
Constant inlined plot::plotter_x#0 = (byte*) 0
Constant inlined init_screen::$2 = (const byte*) SCREEN#0+(word) $400
Constant inlined main::$1 = (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0
Constant inlined init_plot_tables::$1 = >(const byte*) BITMAP#0
Constant inlined main::$2 = (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3
Constant inlined main::$0 = (const byte) BMM#0|(const byte) DEN#0
Constant inlined main::$5 = (word)(const byte*) BITMAP#0
Constant inlined init_plot_tables::y#0 = (byte) 0
Constant inlined main::$6 = (word)(const byte*) BITMAP#0/(word) $400
Constant inlined init_plot_tables::yoffs#0 = (byte*) 0
Constant inlined main::$3 = (word)(const byte*) SCREEN#0
Constant inlined main::$4 = (word)(const byte*) SCREEN#0/(byte) $40
Constant inlined init_plot_tables::x#0 = (byte) 0
Constant inlined init_screen::c#0 = (const byte*) SCREEN#0
Constant inlined init_screen::b#0 = (const byte*) BITMAP#0
Constant inlined main::$7 = (word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400
Constant inlined init_screen::$0 = (const byte*) BITMAP#0+(word) $2000
Constant inlined main::$8 = (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting plots::@8(between plots::@1 and plots::@2)
Added new block during phi lifting init_plot_tables::@9(between init_plot_tables::@2 and init_plot_tables::@1)
Added new block during phi lifting init_plot_tables::@10(between init_plot_tables::@1 and init_plot_tables::@2)
Added new block during phi lifting init_plot_tables::@11(between init_plot_tables::@6 and init_plot_tables::@5)
Added new block during phi lifting init_plot_tables::@12(between init_plot_tables::@5 and init_plot_tables::@6)
Added new block during phi lifting init_screen::@13(between init_screen::@1 and init_screen::@2)
Added new block during phi lifting init_screen::@14(between init_screen::@7 and init_screen::@8)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of plots
Adding NOP phi() at start of plots::@1_1
Adding NOP phi() at start of init_plot_tables
Adding NOP phi() at start of init_plot_tables::@3
Adding NOP phi() at start of init_plot_tables::@4
Adding NOP phi() at start of init_screen
Adding NOP phi() at start of init_screen::@1_1
Adding NOP phi() at start of init_screen::@3
Adding NOP phi() at start of init_screen::@7_1
CALL GRAPH
Calls in [] to main:4 
Calls in [main] to init_screen:11 init_plot_tables:13 plots:17 
Calls in [plots] to plot:24 

Created 9 initial phi equivalence classes
Coalesced [28] plots::i#8 ← plots::i#1
Coalesced [63] init_plot_tables::yoffs#7 ← init_plot_tables::yoffs#1
Coalesced [68] init_plot_tables::y#5 ← init_plot_tables::y#1
Coalesced [69] init_plot_tables::yoffs#5 ← init_plot_tables::yoffs#4
Coalesced (already) [70] init_plot_tables::yoffs#6 ← init_plot_tables::yoffs#2
Coalesced [71] init_plot_tables::x#5 ← init_plot_tables::x#1
Coalesced [72] init_plot_tables::bits#5 ← init_plot_tables::bits#4
Coalesced [73] init_plot_tables::bits#6 ← init_plot_tables::bits#1
Coalesced [87] init_screen::c#6 ← init_screen::c#1
Coalesced [88] init_screen::b#6 ← init_screen::b#1
Coalesced down to 7 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @6
Culled Empty Block (label) main::@6
Culled Empty Block (label) plots::@1_1
Culled Empty Block (label) plots::@8
Culled Empty Block (label) init_plot_tables::@3
Culled Empty Block (label) init_plot_tables::@4
Culled Empty Block (label) init_plot_tables::@11
Culled Empty Block (label) init_plot_tables::@12
Culled Empty Block (label) init_plot_tables::@9
Culled Empty Block (label) init_screen::@1_1
Culled Empty Block (label) init_screen::@3
Culled Empty Block (label) init_screen::@7_1
Culled Empty Block (label) init_screen::@14
Culled Empty Block (label) init_screen::@13
Renumbering block @5 to @1
Renumbering block main::@2 to main::@1
Renumbering block main::@3 to main::@2
Renumbering block main::@5 to main::@3
Renumbering block main::@7 to main::@4
Renumbering block plots::@7 to plots::@3
Renumbering block init_plot_tables::@5 to init_plot_tables::@3
Renumbering block init_plot_tables::@6 to init_plot_tables::@4
Renumbering block init_plot_tables::@7 to init_plot_tables::@5
Renumbering block init_plot_tables::@10 to init_plot_tables::@6
Renumbering block init_screen::@7 to init_screen::@3
Renumbering block init_screen::@8 to init_screen::@4
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 main::@3
Adding NOP phi() at start of plots
Adding NOP phi() at start of init_plot_tables
Adding NOP phi() at start of init_plot_tables::@6
Adding NOP phi() at start of init_screen

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
  [4] *((const byte*) BGCOL#0) ← (byte) 0
  [5] *((const byte*) FGCOL#0) ← (byte) 0
  [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3
  [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400
  [8] call init_screen 
  to:main::@3
main::@3: scope:[main]  from main
  [9] phi()
  [10] call init_plot_tables 
  to:main::@1
main::@1: scope:[main]  from main::@1 main::@3 main::@4
  [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
  [13] call plots 
  to:main::@4
main::@4: scope:[main]  from main::@2
  [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0)
  to:main::@1
plots: scope:[plots]  from main::@2
  [15] phi()
  to:plots::@2
plots::@2: scope:[plots]  from plots plots::@1
  [16] (byte) plots::i#5 ← phi( plots::@1/(byte) plots::i#1 plots/(byte) 0 )
  [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#5)
  [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#5)
  [19] call plot 
  to:plots::@3
plots::@3: scope:[plots]  from plots::@2
  [20] (byte) plots::i#1 ← ++ (byte) plots::i#5
  to:plots::@1
plots::@1: scope:[plots]  from plots::@3
  [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@2
  to:plots::@return
plots::@return: scope:[plots]  from plots::@1
  [22] return 
  to:@return
plot: scope:[plot]  from plots::@2
  [23] (byte~) plot::$6 ← *((const byte[$100]) plot_xhi#0 + (byte) plot::x#0)
  [24] (byte*) plot::plotter_x#1 ← (byte*) 0 hi= (byte~) plot::$6
  [25] (byte~) plot::$7 ← *((const byte[$100]) plot_xlo#0 + (byte) plot::x#0)
  [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7
  [27] (byte~) plot::$8 ← *((const byte[$100]) plot_yhi#0 + (byte) plot::y#0)
  [28] (word) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$8
  [29] (byte~) plot::$9 ← *((const byte[$100]) plot_ylo#0 + (byte) plot::y#0)
  [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9
  [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2
  [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[$100]) plot_bit#0 + (byte) plot::x#0)
  [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5
  to:plot::@return
plot::@return: scope:[plot]  from plot
  [34] return 
  to:@return
init_plot_tables: scope:[init_plot_tables]  from main::@3
  [35] phi()
  to:init_plot_tables::@1
init_plot_tables::@1: scope:[init_plot_tables]  from init_plot_tables init_plot_tables::@2
  [36] (byte) init_plot_tables::bits#3 ← phi( init_plot_tables/(byte) $80 init_plot_tables::@2/(byte) init_plot_tables::bits#4 )
  [36] (byte) init_plot_tables::x#2 ← phi( init_plot_tables/(byte) 0 init_plot_tables::@2/(byte) init_plot_tables::x#1 )
  [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) $f8
  [38] *((const byte[$100]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0
  [39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0
  [40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3
  [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte) 1
  [42] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@6
  to:init_plot_tables::@2
init_plot_tables::@6: scope:[init_plot_tables]  from init_plot_tables::@1
  [43] phi()
  to:init_plot_tables::@2
init_plot_tables::@2: scope:[init_plot_tables]  from init_plot_tables::@1 init_plot_tables::@6
  [44] (byte) init_plot_tables::bits#4 ← phi( init_plot_tables::@6/(byte) init_plot_tables::bits#1 init_plot_tables::@1/(byte) $80 )
  [45] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2
  [46] if((byte) init_plot_tables::x#1!=(byte) 0) goto init_plot_tables::@1
  to:init_plot_tables::@3
init_plot_tables::@3: scope:[init_plot_tables]  from init_plot_tables::@2 init_plot_tables::@4
  [47] (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@2/(byte*) 0 init_plot_tables::@4/(byte*) init_plot_tables::yoffs#4 )
  [47] (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@2/(byte) 0 init_plot_tables::@4/(byte) init_plot_tables::y#1 )
  [48] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7
  [49] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2
  [50] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$10 | (byte~) init_plot_tables::$7
  [51] *((const byte[$100]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8
  [52] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2
  [53] *((const byte[$100]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9
  [54] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@4
  to:init_plot_tables::@5
init_plot_tables::@5: scope:[init_plot_tables]  from init_plot_tables::@3
  [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8
  to:init_plot_tables::@4
init_plot_tables::@4: scope:[init_plot_tables]  from init_plot_tables::@3 init_plot_tables::@5
  [56] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@5/(byte*) init_plot_tables::yoffs#1 )
  [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2
  [58] if((byte) init_plot_tables::y#1!=(byte) 0) goto init_plot_tables::@3
  to:init_plot_tables::@return
init_plot_tables::@return: scope:[init_plot_tables]  from init_plot_tables::@4
  [59] return 
  to:@return
init_screen: scope:[init_screen]  from main
  [60] phi()
  to:init_screen::@2
init_screen::@2: scope:[init_screen]  from init_screen init_screen::@1
  [61] (byte*) init_screen::b#4 ← phi( init_screen::@1/(byte*) init_screen::b#1 init_screen/(const byte*) BITMAP#0 )
  [62] *((byte*) init_screen::b#4) ← (byte) 0
  [63] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#4
  to:init_screen::@1
init_screen::@1: scope:[init_screen]  from init_screen::@2
  [64] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) $2000) goto init_screen::@2
  to:init_screen::@4
init_screen::@4: scope:[init_screen]  from init_screen::@1 init_screen::@3
  [65] (byte*) init_screen::c#4 ← phi( init_screen::@3/(byte*) init_screen::c#1 init_screen::@1/(const byte*) SCREEN#0 )
  [66] *((byte*) init_screen::c#4) ← (byte) $14
  [67] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#4
  to:init_screen::@3
init_screen::@3: scope:[init_screen]  from init_screen::@4
  [68] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4
  to:init_screen::@return
init_screen::@return: scope:[init_screen]  from init_screen::@3
  [69] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte*) BITMAP
(byte) BMM
(byte*) D011
(byte*) D018
(byte) DEN
(byte*) FGCOL
(byte*) RASTER
(byte) RSEL
(byte*) SCREEN
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 22.0
(byte~) init_plot_tables::$10 5.5
(byte~) init_plot_tables::$7 22.0
(byte~) init_plot_tables::$8 22.0
(byte~) init_plot_tables::$9 22.0
(byte) init_plot_tables::bits
(byte) init_plot_tables::bits#1 11.0
(byte) init_plot_tables::bits#3 6.6000000000000005
(byte) init_plot_tables::bits#4 7.333333333333333
(byte) init_plot_tables::x
(byte) init_plot_tables::x#1 16.5
(byte) init_plot_tables::x#2 7.333333333333334
(byte) init_plot_tables::y
(byte) init_plot_tables::y#1 16.5
(byte) init_plot_tables::y#2 5.5
(byte*) init_plot_tables::yoffs
(byte*) init_plot_tables::yoffs#1 22.0
(byte*) init_plot_tables::yoffs#2 6.875
(byte*) init_plot_tables::yoffs#4 11.0
(void()) init_screen()
(byte*) init_screen::b
(byte*) init_screen::b#1 16.5
(byte*) init_screen::b#4 16.5
(byte*) init_screen::c
(byte*) init_screen::c#1 16.5
(byte*) init_screen::c#4 16.5
(void()) main()
(void()) plot((byte) plot::x , (byte) plot::y)
(byte~) plot::$5 4.0
(byte~) plot::$6 4.0
(byte~) plot::$7 4.0
(byte~) plot::$8 4.0
(byte~) plot::$9 4.0
(byte*) plot::plotter
(byte*) plot::plotter#0 3.0
(byte*) plot::plotter_x
(byte*) plot::plotter_x#1 2.0
(byte*) plot::plotter_x#2 0.8
(word) plot::plotter_y
(word) plot::plotter_y#1 2.0
(word) plot::plotter_y#2 4.0
(byte) plot::x
(byte) plot::x#0 9.727272727272727
(byte) plot::y
(byte) plot::y#0 15.000000000000002
(byte[$100]) plot_bit
(byte[$100]) plot_xhi
(byte[$100]) plot_xlo
(byte[$100]) plot_yhi
(byte[$100]) plot_ylo
(void()) plots()
(byte) plots::i
(byte) plots::i#1 151.5
(byte) plots::i#5 101.0
(byte) plots_cnt
(byte[]) plots_x
(byte[]) plots_y

Initial phi equivalence classes
[ plots::i#5 plots::i#1 ]
[ init_plot_tables::x#2 init_plot_tables::x#1 ]
[ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ]
[ init_plot_tables::y#2 init_plot_tables::y#1 ]
[ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ]
[ init_screen::b#4 init_screen::b#1 ]
[ init_screen::c#4 init_screen::c#1 ]
Added variable plot::x#0 to zero page equivalence class [ plot::x#0 ]
Added variable plot::y#0 to zero page equivalence class [ plot::y#0 ]
Added variable plot::$6 to zero page equivalence class [ plot::$6 ]
Added variable plot::plotter_x#1 to zero page equivalence class [ plot::plotter_x#1 ]
Added variable plot::$7 to zero page equivalence class [ plot::$7 ]
Added variable plot::plotter_x#2 to zero page equivalence class [ plot::plotter_x#2 ]
Added variable plot::$8 to zero page equivalence class [ plot::$8 ]
Added variable plot::plotter_y#1 to zero page equivalence class [ plot::plotter_y#1 ]
Added variable plot::$9 to zero page equivalence class [ plot::$9 ]
Added variable plot::plotter_y#2 to zero page equivalence class [ plot::plotter_y#2 ]
Added variable plot::plotter#0 to zero page equivalence class [ plot::plotter#0 ]
Added variable plot::$5 to zero page equivalence class [ plot::$5 ]
Added variable init_plot_tables::$0 to zero page equivalence class [ init_plot_tables::$0 ]
Added variable init_plot_tables::$10 to zero page equivalence class [ init_plot_tables::$10 ]
Added variable init_plot_tables::$7 to zero page equivalence class [ init_plot_tables::$7 ]
Added variable init_plot_tables::$8 to zero page equivalence class [ init_plot_tables::$8 ]
Added variable init_plot_tables::$9 to zero page equivalence class [ init_plot_tables::$9 ]
Complete equivalence classes
[ plots::i#5 plots::i#1 ]
[ init_plot_tables::x#2 init_plot_tables::x#1 ]
[ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ]
[ init_plot_tables::y#2 init_plot_tables::y#1 ]
[ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ]
[ init_screen::b#4 init_screen::b#1 ]
[ init_screen::c#4 init_screen::c#1 ]
[ plot::x#0 ]
[ plot::y#0 ]
[ plot::$6 ]
[ plot::plotter_x#1 ]
[ plot::$7 ]
[ plot::plotter_x#2 ]
[ plot::$8 ]
[ plot::plotter_y#1 ]
[ plot::$9 ]
[ plot::plotter_y#2 ]
[ plot::plotter#0 ]
[ plot::$5 ]
[ init_plot_tables::$0 ]
[ init_plot_tables::$10 ]
[ init_plot_tables::$7 ]
[ init_plot_tables::$8 ]
[ init_plot_tables::$9 ]
Allocated zp ZP_BYTE:2 [ plots::i#5 plots::i#1 ]
Allocated zp ZP_BYTE:3 [ init_plot_tables::x#2 init_plot_tables::x#1 ]
Allocated zp ZP_BYTE:4 [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ]
Allocated zp ZP_BYTE:5 [ init_plot_tables::y#2 init_plot_tables::y#1 ]
Allocated zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ]
Allocated zp ZP_WORD:8 [ init_screen::b#4 init_screen::b#1 ]
Allocated zp ZP_WORD:10 [ init_screen::c#4 init_screen::c#1 ]
Allocated zp ZP_BYTE:12 [ plot::x#0 ]
Allocated zp ZP_BYTE:13 [ plot::y#0 ]
Allocated zp ZP_BYTE:14 [ plot::$6 ]
Allocated zp ZP_WORD:15 [ plot::plotter_x#1 ]
Allocated zp ZP_BYTE:17 [ plot::$7 ]
Allocated zp ZP_WORD:18 [ plot::plotter_x#2 ]
Allocated zp ZP_BYTE:20 [ plot::$8 ]
Allocated zp ZP_WORD:21 [ plot::plotter_y#1 ]
Allocated zp ZP_BYTE:23 [ plot::$9 ]
Allocated zp ZP_WORD:24 [ plot::plotter_y#2 ]
Allocated zp ZP_WORD:26 [ plot::plotter#0 ]
Allocated zp ZP_BYTE:28 [ plot::$5 ]
Allocated zp ZP_BYTE:29 [ init_plot_tables::$0 ]
Allocated zp ZP_BYTE:30 [ init_plot_tables::$10 ]
Allocated zp ZP_BYTE:31 [ init_plot_tables::$7 ]
Allocated zp ZP_BYTE:32 [ init_plot_tables::$8 ]
Allocated zp ZP_BYTE:33 [ init_plot_tables::$9 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label D011 = $d011
  .const BMM = $20
  .const DEN = $10
  .const RSEL = 8
  .label RASTER = $d012
  .label D018 = $d018
  .label BGCOL = $d020
  .label FGCOL = $d021
  .label SCREEN = $400
  .label BITMAP = $2000
  .const plots_cnt = 8
  // @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: {
    // [4] *((const byte*) BGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BGCOL
    // [5] *((const byte*) FGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta FGCOL
    // [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #BMM|DEN|RSEL|3
    sta D011
    // [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400 -- _deref_pbuc1=vbuc2 
    lda #SCREEN/$40|BITMAP/$400
    sta D018
    // [8] call init_screen 
    // [60] phi from main to init_screen [phi:main->init_screen]
  init_screen_from_main:
    jsr init_screen
    // [9] phi from main to main::@3 [phi:main->main::@3]
  b3_from_main:
    jmp b3
    // main::@3
  b3:
    // [10] call init_plot_tables 
    // [35] phi from main::@3 to init_plot_tables [phi:main::@3->init_plot_tables]
  init_plot_tables_from_b3:
    jsr init_plot_tables
    jmp b1
    // main::@1
  b1:
    // [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne b1
    jmp b2
    // main::@2
  b2:
    // [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
    // [13] call plots 
    // [15] phi from main::@2 to plots [phi:main::@2->plots]
  plots_from_b2:
    jsr plots
    jmp b4
    // main::@4
  b4:
    // [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
    jmp b1
}
  // plots
plots: {
    .label i = 2
    // [16] phi from plots to plots::@2 [phi:plots->plots::@2]
  b2_from_plots:
    // [16] phi (byte) plots::i#5 = (byte) 0 [phi:plots->plots::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp b2
    // [16] phi from plots::@1 to plots::@2 [phi:plots::@1->plots::@2]
  b2_from_b1:
    // [16] phi (byte) plots::i#5 = (byte) plots::i#1 [phi:plots::@1->plots::@2#0] -- register_copy 
    jmp b2
    // plots::@2
  b2:
    // [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#5) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z i
    lda plots_x,y
    sta.z plot.x
    // [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#5) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z i
    lda plots_y,y
    sta.z plot.y
    // [19] call plot 
    jsr plot
    jmp b3
    // plots::@3
  b3:
    // [20] (byte) plots::i#1 ← ++ (byte) plots::i#5 -- vbuz1=_inc_vbuz1 
    inc.z i
    jmp b1
    // plots::@1
  b1:
    // [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #plots_cnt
    bcc b2_from_b1
    jmp breturn
    // plots::@return
  breturn:
    // [22] return 
    rts
}
  // plot
// plot(byte zeropage($c) x, byte zeropage($d) y)
plot: {
    .label _5 = $1c
    .label _6 = $e
    .label _7 = $11
    .label _8 = $14
    .label _9 = $17
    .label x = $c
    .label y = $d
    .label plotter_x = $f
    .label plotter_x_2 = $12
    .label plotter_y = $15
    .label plotter_y_2 = $18
    .label plotter = $1a
    // [23] (byte~) plot::$6 ← *((const byte[$100]) plot_xhi#0 + (byte) plot::x#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z x
    lda plot_xhi,y
    sta.z _6
    // [24] (byte*) plot::plotter_x#1 ← (byte*) 0 hi= (byte~) plot::$6 -- pbuz1=pbuc1_sethi_vbuz2 
    lda.z _6
    sta.z plotter_x+1
    lda #<0
    sta.z plotter_x
    // [25] (byte~) plot::$7 ← *((const byte[$100]) plot_xlo#0 + (byte) plot::x#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z x
    lda plot_xlo,y
    sta.z _7
    // [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 -- pbuz1=pbuz2_setlo_vbuz3 
    lda.z _7
    sta.z plotter_x_2
    lda.z plotter_x+1
    sta.z plotter_x_2+1
    // [27] (byte~) plot::$8 ← *((const byte[$100]) plot_yhi#0 + (byte) plot::y#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z y
    lda plot_yhi,y
    sta.z _8
    // [28] (word) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$8 -- vwuz1=vbuc1_sethi_vbuz2 
    lda.z _8
    sta.z plotter_y+1
    lda #<0
    sta.z plotter_y
    // [29] (byte~) plot::$9 ← *((const byte[$100]) plot_ylo#0 + (byte) plot::y#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z y
    lda plot_ylo,y
    sta.z _9
    // [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 -- vwuz1=vwuz2_setlo_vbuz3 
    lda.z _9
    sta.z plotter_y_2
    lda.z plotter_y+1
    sta.z plotter_y_2+1
    // [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 -- pbuz1=pbuz2_plus_vwuz3 
    lda.z plotter_x_2
    clc
    adc.z plotter_y_2
    sta.z plotter
    lda.z plotter_x_2+1
    adc.z plotter_y_2+1
    sta.z plotter+1
    // [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[$100]) plot_bit#0 + (byte) plot::x#0) -- vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuz3 
    ldy #0
    lda (plotter),y
    ldy.z x
    ora plot_bit,y
    sta.z _5
    // [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 -- _deref_pbuz1=vbuz2 
    lda.z _5
    ldy #0
    sta (plotter),y
    jmp breturn
    // plot::@return
  breturn:
    // [34] return 
    rts
}
  // init_plot_tables
init_plot_tables: {
    .label _0 = $1d
    .label _7 = $1f
    .label _8 = $20
    .label _9 = $21
    .label _10 = $1e
    .label bits = 4
    .label x = 3
    .label y = 5
    .label yoffs = 6
    // [36] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1]
  b1_from_init_plot_tables:
    // [36] phi (byte) init_plot_tables::bits#3 = (byte) $80 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuz1=vbuc1 
    lda #$80
    sta.z bits
    // [36] phi (byte) init_plot_tables::x#2 = (byte) 0 [phi:init_plot_tables->init_plot_tables::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z x
    jmp b1
    // [36] phi from init_plot_tables::@2 to init_plot_tables::@1 [phi:init_plot_tables::@2->init_plot_tables::@1]
  b1_from_b2:
    // [36] phi (byte) init_plot_tables::bits#3 = (byte) init_plot_tables::bits#4 [phi:init_plot_tables::@2->init_plot_tables::@1#0] -- register_copy 
    // [36] phi (byte) init_plot_tables::x#2 = (byte) init_plot_tables::x#1 [phi:init_plot_tables::@2->init_plot_tables::@1#1] -- register_copy 
    jmp b1
    // init_plot_tables::@1
  b1:
    // [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) $f8 -- vbuz1=vbuz2_band_vbuc1 
    lda #$f8
    and.z x
    sta.z _0
    // [38] *((const byte[$100]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z _0
    ldy.z x
    sta plot_xlo,y
    // [39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #>BITMAP
    ldy.z x
    sta plot_xhi,y
    // [40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z bits
    ldy.z x
    sta plot_bit,y
    // [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 
    lsr.z bits
    // [42] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@6 -- vbuz1_neq_0_then_la1 
    lda.z bits
    cmp #0
    bne b6_from_b1
    // [44] phi from init_plot_tables::@1 to init_plot_tables::@2 [phi:init_plot_tables::@1->init_plot_tables::@2]
  b2_from_b1:
    // [44] phi (byte) init_plot_tables::bits#4 = (byte) $80 [phi:init_plot_tables::@1->init_plot_tables::@2#0] -- vbuz1=vbuc1 
    lda #$80
    sta.z bits
    jmp b2
    // [43] phi from init_plot_tables::@1 to init_plot_tables::@6 [phi:init_plot_tables::@1->init_plot_tables::@6]
  b6_from_b1:
    jmp b6
    // init_plot_tables::@6
  b6:
    // [44] phi from init_plot_tables::@6 to init_plot_tables::@2 [phi:init_plot_tables::@6->init_plot_tables::@2]
  b2_from_b6:
    // [44] phi (byte) init_plot_tables::bits#4 = (byte) init_plot_tables::bits#1 [phi:init_plot_tables::@6->init_plot_tables::@2#0] -- register_copy 
    jmp b2
    // init_plot_tables::@2
  b2:
    // [45] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 -- vbuz1=_inc_vbuz1 
    inc.z x
    // [46] if((byte) init_plot_tables::x#1!=(byte) 0) goto init_plot_tables::@1 -- vbuz1_neq_0_then_la1 
    lda.z x
    cmp #0
    bne b1_from_b2
    // [47] phi from init_plot_tables::@2 to init_plot_tables::@3 [phi:init_plot_tables::@2->init_plot_tables::@3]
  b3_from_b2:
    // [47] phi (byte*) init_plot_tables::yoffs#2 = (byte*) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#0] -- pbuz1=pbuc1 
    lda #<0
    sta.z yoffs
    lda #>0
    sta.z yoffs+1
    // [47] phi (byte) init_plot_tables::y#2 = (byte) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta.z y
    jmp b3
    // [47] phi from init_plot_tables::@4 to init_plot_tables::@3 [phi:init_plot_tables::@4->init_plot_tables::@3]
  b3_from_b4:
    // [47] phi (byte*) init_plot_tables::yoffs#2 = (byte*) init_plot_tables::yoffs#4 [phi:init_plot_tables::@4->init_plot_tables::@3#0] -- register_copy 
    // [47] phi (byte) init_plot_tables::y#2 = (byte) init_plot_tables::y#1 [phi:init_plot_tables::@4->init_plot_tables::@3#1] -- register_copy 
    jmp b3
    // init_plot_tables::@3
  b3:
    // [48] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and.z y
    sta.z _10
    // [49] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 -- vbuz1=_lo_pbuz2 
    lda.z yoffs
    sta.z _7
    // [50] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$10 | (byte~) init_plot_tables::$7 -- vbuz1=vbuz2_bor_vbuz3 
    lda.z _10
    ora.z _7
    sta.z _8
    // [51] *((const byte[$100]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z _8
    ldy.z y
    sta plot_ylo,y
    // [52] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 -- vbuz1=_hi_pbuz2 
    lda.z yoffs+1
    sta.z _9
    // [53] *((const byte[$100]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z _9
    ldy.z y
    sta plot_yhi,y
    // [54] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp.z _10
    bne b4_from_b3
    jmp b5
    // init_plot_tables::@5
  b5:
    // [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z yoffs
    adc #<$28*8
    sta.z yoffs
    lda.z yoffs+1
    adc #>$28*8
    sta.z yoffs+1
    // [56] phi from init_plot_tables::@3 init_plot_tables::@5 to init_plot_tables::@4 [phi:init_plot_tables::@3/init_plot_tables::@5->init_plot_tables::@4]
  b4_from_b3:
  b4_from_b5:
    // [56] phi (byte*) init_plot_tables::yoffs#4 = (byte*) init_plot_tables::yoffs#2 [phi:init_plot_tables::@3/init_plot_tables::@5->init_plot_tables::@4#0] -- register_copy 
    jmp b4
    // init_plot_tables::@4
  b4:
    // [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 -- vbuz1=_inc_vbuz1 
    inc.z y
    // [58] if((byte) init_plot_tables::y#1!=(byte) 0) goto init_plot_tables::@3 -- vbuz1_neq_0_then_la1 
    lda.z y
    cmp #0
    bne b3_from_b4
    jmp breturn
    // init_plot_tables::@return
  breturn:
    // [59] return 
    rts
}
  // init_screen
init_screen: {
    .label b = 8
    .label c = $a
    // [61] phi from init_screen to init_screen::@2 [phi:init_screen->init_screen::@2]
  b2_from_init_screen:
    // [61] phi (byte*) init_screen::b#4 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@2#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta.z b
    lda #>BITMAP
    sta.z b+1
    jmp b2
    // [61] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2]
  b2_from_b1:
    // [61] phi (byte*) init_screen::b#4 = (byte*) init_screen::b#1 [phi:init_screen::@1->init_screen::@2#0] -- register_copy 
    jmp b2
    // init_screen::@2
  b2:
    // [62] *((byte*) init_screen::b#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (b),y
    // [63] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#4 -- pbuz1=_inc_pbuz1 
    inc.z b
    bne !+
    inc.z b+1
  !:
    jmp b1
    // init_screen::@1
  b1:
    // [64] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) $2000) goto init_screen::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z b+1
    cmp #>BITMAP+$2000
    bne b2_from_b1
    lda.z b
    cmp #<BITMAP+$2000
    bne b2_from_b1
    // [65] phi from init_screen::@1 to init_screen::@4 [phi:init_screen::@1->init_screen::@4]
  b4_from_b1:
    // [65] phi (byte*) init_screen::c#4 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@4#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z c
    lda #>SCREEN
    sta.z c+1
    jmp b4
    // [65] phi from init_screen::@3 to init_screen::@4 [phi:init_screen::@3->init_screen::@4]
  b4_from_b3:
    // [65] phi (byte*) init_screen::c#4 = (byte*) init_screen::c#1 [phi:init_screen::@3->init_screen::@4#0] -- register_copy 
    jmp b4
    // init_screen::@4
  b4:
    // [66] *((byte*) init_screen::c#4) ← (byte) $14 -- _deref_pbuz1=vbuc1 
    lda #$14
    ldy #0
    sta (c),y
    // [67] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#4 -- pbuz1=_inc_pbuz1 
    inc.z c
    bne !+
    inc.z c+1
  !:
    jmp b3
    // init_screen::@3
  b3:
    // [68] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1 
    lda.z c+1
    cmp #>SCREEN+$400
    bne b4_from_b3
    lda.z c
    cmp #<SCREEN+$400
    bne b4_from_b3
    jmp breturn
    // init_screen::@return
  breturn:
    // [69] return 
    rts
}
  // File Data
  plots_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28
  plots_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28
  plot_xlo: .fill $100, 0
  plot_xhi: .fill $100, 0
  plot_ylo: .fill $100, 0
  plot_yhi: .fill $100, 0
  plot_bit: .fill $100, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp ZP_BYTE:31 [ init_plot_tables::$7 ] has ALU potential.
Statement [4] *((const byte*) BGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) FGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 [ plot::x#0 plot::y#0 plot::plotter_x#2 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::x#0 plot::y#0 plot::plotter_x#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ plots::i#5 plots::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ plot::x#0 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ plot::y#0 ]
Statement [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a 
Statement [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a 
Statement [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[$100]) plot_bit#0 + (byte) plot::x#0) [ plot::plotter#0 plot::$5 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::plotter#0 plot::$5 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ plots::i#5 plots::i#1 ]
Statement [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 [ ] ( main:2::plots:13::plot:19 [ plots::i#5 ] ) always clobbers reg byte y 
Statement [39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ( main:2::init_plot_tables:10 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ init_plot_tables::x#2 init_plot_tables::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ]
Statement [40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ( main:2::init_plot_tables:10 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ) always clobbers reg byte a 
Statement [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ init_plot_tables::y#2 init_plot_tables::y#1 ]
Statement [62] *((byte*) init_screen::b#4) ← (byte) 0 [ init_screen::b#4 ] ( main:2::init_screen:8 [ init_screen::b#4 ] ) always clobbers reg byte a reg byte y 
Statement [64] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) $2000) goto init_screen::@2 [ init_screen::b#1 ] ( main:2::init_screen:8 [ init_screen::b#1 ] ) always clobbers reg byte a 
Statement [66] *((byte*) init_screen::c#4) ← (byte) $14 [ init_screen::c#4 ] ( main:2::init_screen:8 [ init_screen::c#4 ] ) always clobbers reg byte a reg byte y 
Statement [68] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 [ init_screen::c#1 ] ( main:2::init_screen:8 [ init_screen::c#1 ] ) always clobbers reg byte a 
Statement [4] *((const byte*) BGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) FGCOL#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 [ plot::x#0 plot::y#0 plot::plotter_x#2 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::x#0 plot::y#0 plot::plotter_x#2 ] ) always clobbers reg byte a 
Statement [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ] ) always clobbers reg byte a 
Statement [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a 
Statement [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[$100]) plot_bit#0 + (byte) plot::x#0) [ plot::plotter#0 plot::$5 ] ( main:2::plots:13::plot:19 [ plots::i#5 plot::plotter#0 plot::$5 ] ) always clobbers reg byte a reg byte y 
Statement [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 [ ] ( main:2::plots:13::plot:19 [ plots::i#5 ] ) always clobbers reg byte y 
Statement [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) $f8 [ init_plot_tables::x#2 init_plot_tables::bits#3 init_plot_tables::$0 ] ( main:2::init_plot_tables:10 [ init_plot_tables::x#2 init_plot_tables::bits#3 init_plot_tables::$0 ] ) always clobbers reg byte a 
Statement [39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ( main:2::init_plot_tables:10 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ) always clobbers reg byte a 
Statement [40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ( main:2::init_plot_tables:10 [ init_plot_tables::x#2 init_plot_tables::bits#3 ] ) always clobbers reg byte a 
Statement [48] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$10 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$10 ] ) always clobbers reg byte a 
Statement [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ) always clobbers reg byte a 
Statement [62] *((byte*) init_screen::b#4) ← (byte) 0 [ init_screen::b#4 ] ( main:2::init_screen:8 [ init_screen::b#4 ] ) always clobbers reg byte a reg byte y 
Statement [64] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) $2000) goto init_screen::@2 [ init_screen::b#1 ] ( main:2::init_screen:8 [ init_screen::b#1 ] ) always clobbers reg byte a 
Statement [66] *((byte*) init_screen::c#4) ← (byte) $14 [ init_screen::c#4 ] ( main:2::init_screen:8 [ init_screen::c#4 ] ) always clobbers reg byte a reg byte y 
Statement [68] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 [ init_screen::c#1 ] ( main:2::init_screen:8 [ init_screen::c#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ plots::i#5 plots::i#1 ] : zp ZP_BYTE:2 , reg byte x , 
Potential registers zp ZP_BYTE:3 [ init_plot_tables::x#2 init_plot_tables::x#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ init_plot_tables::y#2 init_plot_tables::y#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] : zp ZP_WORD:6 , 
Potential registers zp ZP_WORD:8 [ init_screen::b#4 init_screen::b#1 ] : zp ZP_WORD:8 , 
Potential registers zp ZP_WORD:10 [ init_screen::c#4 init_screen::c#1 ] : zp ZP_WORD:10 , 
Potential registers zp ZP_BYTE:12 [ plot::x#0 ] : zp ZP_BYTE:12 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:13 [ plot::y#0 ] : zp ZP_BYTE:13 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:14 [ plot::$6 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:15 [ plot::plotter_x#1 ] : zp ZP_WORD:15 , 
Potential registers zp ZP_BYTE:17 [ plot::$7 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:18 [ plot::plotter_x#2 ] : zp ZP_WORD:18 , 
Potential registers zp ZP_BYTE:20 [ plot::$8 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:21 [ plot::plotter_y#1 ] : zp ZP_WORD:21 , 
Potential registers zp ZP_BYTE:23 [ plot::$9 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:24 [ plot::plotter_y#2 ] : zp ZP_WORD:24 , 
Potential registers zp ZP_WORD:26 [ plot::plotter#0 ] : zp ZP_WORD:26 , 
Potential registers zp ZP_BYTE:28 [ plot::$5 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:29 [ init_plot_tables::$0 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:30 [ init_plot_tables::$10 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:31 [ init_plot_tables::$7 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , reg byte alu , 
Potential registers zp ZP_BYTE:32 [ init_plot_tables::$8 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:33 [ init_plot_tables::$9 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [plots] 252.5: zp ZP_BYTE:2 [ plots::i#5 plots::i#1 ] 
Uplift Scope [init_plot_tables] 39.88: zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] 24.93: zp ZP_BYTE:4 [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] 23.83: zp ZP_BYTE:3 [ init_plot_tables::x#2 init_plot_tables::x#1 ] 22: zp ZP_BYTE:5 [ init_plot_tables::y#2 init_plot_tables::y#1 ] 22: zp ZP_BYTE:29 [ init_plot_tables::$0 ] 22: zp ZP_BYTE:31 [ init_plot_tables::$7 ] 22: zp ZP_BYTE:32 [ init_plot_tables::$8 ] 22: zp ZP_BYTE:33 [ init_plot_tables::$9 ] 5.5: zp ZP_BYTE:30 [ init_plot_tables::$10 ] 
Uplift Scope [init_screen] 33: zp ZP_WORD:8 [ init_screen::b#4 init_screen::b#1 ] 33: zp ZP_WORD:10 [ init_screen::c#4 init_screen::c#1 ] 
Uplift Scope [plot] 15: zp ZP_BYTE:13 [ plot::y#0 ] 9.73: zp ZP_BYTE:12 [ plot::x#0 ] 4: zp ZP_BYTE:14 [ plot::$6 ] 4: zp ZP_BYTE:17 [ plot::$7 ] 4: zp ZP_BYTE:20 [ plot::$8 ] 4: zp ZP_BYTE:23 [ plot::$9 ] 4: zp ZP_WORD:24 [ plot::plotter_y#2 ] 4: zp ZP_BYTE:28 [ plot::$5 ] 3: zp ZP_WORD:26 [ plot::plotter#0 ] 2: zp ZP_WORD:15 [ plot::plotter_x#1 ] 2: zp ZP_WORD:21 [ plot::plotter_y#1 ] 0.8: zp ZP_WORD:18 [ plot::plotter_x#2 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [plots] best 9275 combination reg byte x [ plots::i#5 plots::i#1 ] 
Uplifting [init_plot_tables] best 8755 combination zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] reg byte a [ init_plot_tables::$0 ] zp ZP_BYTE:31 [ init_plot_tables::$7 ] zp ZP_BYTE:32 [ init_plot_tables::$8 ] zp ZP_BYTE:33 [ init_plot_tables::$9 ] zp ZP_BYTE:30 [ init_plot_tables::$10 ] 
Limited combination testing to 100 combinations of 34560 possible.
Uplifting [init_screen] best 8755 combination zp ZP_WORD:8 [ init_screen::b#4 init_screen::b#1 ] zp ZP_WORD:10 [ init_screen::c#4 init_screen::c#1 ] 
Uplifting [plot] best 8743 combination zp ZP_BYTE:13 [ plot::y#0 ] zp ZP_BYTE:12 [ plot::x#0 ] reg byte a [ plot::$6 ] reg byte a [ plot::$7 ] zp ZP_BYTE:20 [ plot::$8 ] zp ZP_BYTE:23 [ plot::$9 ] zp ZP_WORD:24 [ plot::plotter_y#2 ] zp ZP_BYTE:28 [ plot::$5 ] zp ZP_WORD:26 [ plot::plotter#0 ] zp ZP_WORD:15 [ plot::plotter_x#1 ] zp ZP_WORD:21 [ plot::plotter_y#1 ] zp ZP_WORD:18 [ plot::plotter_x#2 ] 
Limited combination testing to 100 combinations of 9216 possible.
Uplifting [main] best 8743 combination 
Uplifting [] best 8743 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_plot_tables::$7 ]
Uplifting [init_plot_tables] best 8683 combination reg byte a [ init_plot_tables::$7 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_plot_tables::$8 ]
Uplifting [init_plot_tables] best 8623 combination reg byte a [ init_plot_tables::$8 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ init_plot_tables::$9 ]
Uplifting [init_plot_tables] best 8563 combination reg byte a [ init_plot_tables::$9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ plot::y#0 ]
Uplifting [plot] best 8563 combination zp ZP_BYTE:13 [ plot::y#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ plot::x#0 ]
Uplifting [plot] best 8563 combination zp ZP_BYTE:12 [ plot::x#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_plot_tables::$10 ]
Uplifting [init_plot_tables] best 8563 combination zp ZP_BYTE:30 [ init_plot_tables::$10 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ plot::$8 ]
Uplifting [plot] best 8557 combination reg byte a [ plot::$8 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ plot::$9 ]
Uplifting [plot] best 8551 combination reg byte a [ plot::$9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:28 [ plot::$5 ]
Uplifting [plot] best 8545 combination reg byte a [ plot::$5 ] 
Coalescing zero page register [ zp ZP_WORD:15 [ plot::plotter_x#1 ] ] with [ zp ZP_WORD:18 [ plot::plotter_x#2 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:21 [ plot::plotter_y#1 ] ] with [ zp ZP_WORD:24 [ plot::plotter_y#2 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:15 [ plot::plotter_x#1 plot::plotter_x#2 ] ] with [ zp ZP_WORD:26 [ plot::plotter#0 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:8 [ init_screen::b#4 init_screen::b#1 ] ] with [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] ]
Coalescing zero page register [ zp ZP_WORD:15 [ plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] ] with [ zp ZP_WORD:10 [ init_screen::c#4 init_screen::c#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:30 [ init_plot_tables::$10 ] ] with [ zp ZP_BYTE:12 [ plot::x#0 ] ]
Coalescing zero page register [ zp ZP_WORD:21 [ plot::plotter_y#1 plot::plotter_y#2 ] ] with [ zp ZP_WORD:8 [ init_screen::b#4 init_screen::b#1 init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] ]
Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:2 [ plot::y#0 ]
Allocated (was zp ZP_WORD:15) zp ZP_WORD:3 [ plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 init_screen::c#4 init_screen::c#1 ]
Allocated (was zp ZP_WORD:21) zp ZP_WORD:5 [ plot::plotter_y#1 plot::plotter_y#2 init_screen::b#4 init_screen::b#1 init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ]
Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:7 [ init_plot_tables::$10 plot::x#0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label D011 = $d011
  .const BMM = $20
  .const DEN = $10
  .const RSEL = 8
  .label RASTER = $d012
  .label D018 = $d018
  .label BGCOL = $d020
  .label FGCOL = $d021
  .label SCREEN = $400
  .label BITMAP = $2000
  .const plots_cnt = 8
  // @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: {
    // [4] *((const byte*) BGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BGCOL
    // [5] *((const byte*) FGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta FGCOL
    // [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #BMM|DEN|RSEL|3
    sta D011
    // [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400 -- _deref_pbuc1=vbuc2 
    lda #SCREEN/$40|BITMAP/$400
    sta D018
    // [8] call init_screen 
    // [60] phi from main to init_screen [phi:main->init_screen]
  init_screen_from_main:
    jsr init_screen
    // [9] phi from main to main::@3 [phi:main->main::@3]
  b3_from_main:
    jmp b3
    // main::@3
  b3:
    // [10] call init_plot_tables 
    // [35] phi from main::@3 to init_plot_tables [phi:main::@3->init_plot_tables]
  init_plot_tables_from_b3:
    jsr init_plot_tables
    jmp b1
    // main::@1
  b1:
    // [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne b1
    jmp b2
    // main::@2
  b2:
    // [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
    // [13] call plots 
    // [15] phi from main::@2 to plots [phi:main::@2->plots]
  plots_from_b2:
    jsr plots
    jmp b4
    // main::@4
  b4:
    // [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
    jmp b1
}
  // plots
plots: {
    // [16] phi from plots to plots::@2 [phi:plots->plots::@2]
  b2_from_plots:
    // [16] phi (byte) plots::i#5 = (byte) 0 [phi:plots->plots::@2#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b2
    // [16] phi from plots::@1 to plots::@2 [phi:plots::@1->plots::@2]
  b2_from_b1:
    // [16] phi (byte) plots::i#5 = (byte) plots::i#1 [phi:plots::@1->plots::@2#0] -- register_copy 
    jmp b2
    // plots::@2
  b2:
    // [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#5) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_x,x
    sta.z plot.x
    // [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#5) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_y,x
    sta.z plot.y
    // [19] call plot 
    jsr plot
    jmp b3
    // plots::@3
  b3:
    // [20] (byte) plots::i#1 ← ++ (byte) plots::i#5 -- vbuxx=_inc_vbuxx 
    inx
    jmp b1
    // plots::@1
  b1:
    // [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #plots_cnt
    bcc b2_from_b1
    jmp breturn
    // plots::@return
  breturn:
    // [22] return 
    rts
}
  // plot
// plot(byte zeropage(7) x, byte zeropage(2) y)
plot: {
    .label x = 7
    .label y = 2
    .label plotter_x = 3
    .label plotter_y = 5
    .label plotter = 3
    // [23] (byte~) plot::$6 ← *((const byte[$100]) plot_xhi#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy.z x
    lda plot_xhi,y
    // [24] (byte*) plot::plotter_x#1 ← (byte*) 0 hi= (byte~) plot::$6 -- pbuz1=pbuc1_sethi_vbuaa 
    sta.z plotter_x+1
    lda #<0
    sta.z plotter_x
    // [25] (byte~) plot::$7 ← *((const byte[$100]) plot_xlo#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy.z x
    lda plot_xlo,y
    // [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 -- pbuz1=pbuz1_setlo_vbuaa 
    sta.z plotter_x
    // [27] (byte~) plot::$8 ← *((const byte[$100]) plot_yhi#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy.z y
    lda plot_yhi,y
    // [28] (word) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$8 -- vwuz1=vbuc1_sethi_vbuaa 
    sta.z plotter_y+1
    lda #<0
    sta.z plotter_y
    // [29] (byte~) plot::$9 ← *((const byte[$100]) plot_ylo#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy.z y
    lda plot_ylo,y
    // [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 -- vwuz1=vwuz1_setlo_vbuaa 
    sta.z plotter_y
    // [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 -- pbuz1=pbuz1_plus_vwuz2 
    lda.z plotter
    clc
    adc.z plotter_y
    sta.z plotter
    lda.z plotter+1
    adc.z plotter_y+1
    sta.z plotter+1
    // [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[$100]) plot_bit#0 + (byte) plot::x#0) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 
    ldy #0
    lda (plotter),y
    ldy.z x
    ora plot_bit,y
    // [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (plotter),y
    jmp breturn
    // plot::@return
  breturn:
    // [34] return 
    rts
}
  // init_plot_tables
init_plot_tables: {
    .label _10 = 7
    .label yoffs = 5
    // [36] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1]
  b1_from_init_plot_tables:
    // [36] phi (byte) init_plot_tables::bits#3 = (byte) $80 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 
    ldy #$80
    // [36] phi (byte) init_plot_tables::x#2 = (byte) 0 [phi:init_plot_tables->init_plot_tables::@1#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
    // [36] phi from init_plot_tables::@2 to init_plot_tables::@1 [phi:init_plot_tables::@2->init_plot_tables::@1]
  b1_from_b2:
    // [36] phi (byte) init_plot_tables::bits#3 = (byte) init_plot_tables::bits#4 [phi:init_plot_tables::@2->init_plot_tables::@1#0] -- register_copy 
    // [36] phi (byte) init_plot_tables::x#2 = (byte) init_plot_tables::x#1 [phi:init_plot_tables::@2->init_plot_tables::@1#1] -- register_copy 
    jmp b1
    // init_plot_tables::@1
  b1:
    // [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) $f8 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f8
    // [38] *((const byte[$100]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_xlo,x
    // [39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #>BITMAP
    sta plot_xhi,x
    // [40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy 
    tya
    sta plot_bit,x
    // [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte) 1 -- vbuyy=vbuyy_ror_1 
    tya
    lsr
    tay
    // [42] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@6 -- vbuyy_neq_0_then_la1 
    cpy #0
    bne b6_from_b1
    // [44] phi from init_plot_tables::@1 to init_plot_tables::@2 [phi:init_plot_tables::@1->init_plot_tables::@2]
  b2_from_b1:
    // [44] phi (byte) init_plot_tables::bits#4 = (byte) $80 [phi:init_plot_tables::@1->init_plot_tables::@2#0] -- vbuyy=vbuc1 
    ldy #$80
    jmp b2
    // [43] phi from init_plot_tables::@1 to init_plot_tables::@6 [phi:init_plot_tables::@1->init_plot_tables::@6]
  b6_from_b1:
    jmp b6
    // init_plot_tables::@6
  b6:
    // [44] phi from init_plot_tables::@6 to init_plot_tables::@2 [phi:init_plot_tables::@6->init_plot_tables::@2]
  b2_from_b6:
    // [44] phi (byte) init_plot_tables::bits#4 = (byte) init_plot_tables::bits#1 [phi:init_plot_tables::@6->init_plot_tables::@2#0] -- register_copy 
    jmp b2
    // init_plot_tables::@2
  b2:
    // [45] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [46] if((byte) init_plot_tables::x#1!=(byte) 0) goto init_plot_tables::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1_from_b2
    // [47] phi from init_plot_tables::@2 to init_plot_tables::@3 [phi:init_plot_tables::@2->init_plot_tables::@3]
  b3_from_b2:
    // [47] phi (byte*) init_plot_tables::yoffs#2 = (byte*) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#0] -- pbuz1=pbuc1 
    lda #<0
    sta.z yoffs
    lda #>0
    sta.z yoffs+1
    // [47] phi (byte) init_plot_tables::y#2 = (byte) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b3
    // [47] phi from init_plot_tables::@4 to init_plot_tables::@3 [phi:init_plot_tables::@4->init_plot_tables::@3]
  b3_from_b4:
    // [47] phi (byte*) init_plot_tables::yoffs#2 = (byte*) init_plot_tables::yoffs#4 [phi:init_plot_tables::@4->init_plot_tables::@3#0] -- register_copy 
    // [47] phi (byte) init_plot_tables::y#2 = (byte) init_plot_tables::y#1 [phi:init_plot_tables::@4->init_plot_tables::@3#1] -- register_copy 
    jmp b3
    // init_plot_tables::@3
  b3:
    // [48] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 
    lda #7
    sax.z _10
    // [49] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda.z yoffs
    // [50] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$10 | (byte~) init_plot_tables::$7 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z _10
    // [51] *((const byte[$100]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_ylo,x
    // [52] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda.z yoffs+1
    // [53] *((const byte[$100]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_yhi,x
    // [54] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp.z _10
    bne b4_from_b3
    jmp b5
    // init_plot_tables::@5
  b5:
    // [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z yoffs
    adc #<$28*8
    sta.z yoffs
    lda.z yoffs+1
    adc #>$28*8
    sta.z yoffs+1
    // [56] phi from init_plot_tables::@3 init_plot_tables::@5 to init_plot_tables::@4 [phi:init_plot_tables::@3/init_plot_tables::@5->init_plot_tables::@4]
  b4_from_b3:
  b4_from_b5:
    // [56] phi (byte*) init_plot_tables::yoffs#4 = (byte*) init_plot_tables::yoffs#2 [phi:init_plot_tables::@3/init_plot_tables::@5->init_plot_tables::@4#0] -- register_copy 
    jmp b4
    // init_plot_tables::@4
  b4:
    // [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [58] if((byte) init_plot_tables::y#1!=(byte) 0) goto init_plot_tables::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3_from_b4
    jmp breturn
    // init_plot_tables::@return
  breturn:
    // [59] return 
    rts
}
  // init_screen
init_screen: {
    .label b = 5
    .label c = 3
    // [61] phi from init_screen to init_screen::@2 [phi:init_screen->init_screen::@2]
  b2_from_init_screen:
    // [61] phi (byte*) init_screen::b#4 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@2#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta.z b
    lda #>BITMAP
    sta.z b+1
    jmp b2
    // [61] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2]
  b2_from_b1:
    // [61] phi (byte*) init_screen::b#4 = (byte*) init_screen::b#1 [phi:init_screen::@1->init_screen::@2#0] -- register_copy 
    jmp b2
    // init_screen::@2
  b2:
    // [62] *((byte*) init_screen::b#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (b),y
    // [63] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#4 -- pbuz1=_inc_pbuz1 
    inc.z b
    bne !+
    inc.z b+1
  !:
    jmp b1
    // init_screen::@1
  b1:
    // [64] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) $2000) goto init_screen::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z b+1
    cmp #>BITMAP+$2000
    bne b2_from_b1
    lda.z b
    cmp #<BITMAP+$2000
    bne b2_from_b1
    // [65] phi from init_screen::@1 to init_screen::@4 [phi:init_screen::@1->init_screen::@4]
  b4_from_b1:
    // [65] phi (byte*) init_screen::c#4 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@4#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z c
    lda #>SCREEN
    sta.z c+1
    jmp b4
    // [65] phi from init_screen::@3 to init_screen::@4 [phi:init_screen::@3->init_screen::@4]
  b4_from_b3:
    // [65] phi (byte*) init_screen::c#4 = (byte*) init_screen::c#1 [phi:init_screen::@3->init_screen::@4#0] -- register_copy 
    jmp b4
    // init_screen::@4
  b4:
    // [66] *((byte*) init_screen::c#4) ← (byte) $14 -- _deref_pbuz1=vbuc1 
    lda #$14
    ldy #0
    sta (c),y
    // [67] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#4 -- pbuz1=_inc_pbuz1 
    inc.z c
    bne !+
    inc.z c+1
  !:
    jmp b3
    // init_screen::@3
  b3:
    // [68] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1 
    lda.z c+1
    cmp #>SCREEN+$400
    bne b4_from_b3
    lda.z c
    cmp #<SCREEN+$400
    bne b4_from_b3
    jmp breturn
    // init_screen::@return
  breturn:
    // [69] return 
    rts
}
  // File Data
  plots_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28
  plots_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28
  plot_xlo: .fill $100, 0
  plot_xhi: .fill $100, 0
  plot_ylo: .fill $100, 0
  plot_yhi: .fill $100, 0
  plot_bit: .fill $100, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b4
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b6
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b4
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction ldy.z x
Removing instruction ldy.z y
Removing instruction lda #>0
Replacing instruction ldx #0 with TAX
Replacing instruction ldy #0 with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b2_from_b1 with b2
Replacing label b6_from_b1 with b2
Replacing label b1_from_b2 with b1
Replacing label b4_from_b3 with b4
Replacing label b3_from_b4 with b3
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Replacing label b4_from_b3 with b4
Replacing label b4_from_b3 with b4
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b3_from_main:
Removing instruction init_plot_tables_from_b3:
Removing instruction b2_from_b1:
Removing instruction b1_from_b2:
Removing instruction b6_from_b1:
Removing instruction b6:
Removing instruction b2_from_b6:
Removing instruction b3_from_b4:
Removing instruction b4_from_b3:
Removing instruction b4_from_b5:
Removing instruction b2_from_b1:
Removing instruction b4_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction init_screen_from_main:
Removing instruction b3:
Removing instruction b2:
Removing instruction plots_from_b2:
Removing instruction b4:
Removing instruction b2_from_plots:
Removing instruction b3:
Removing instruction b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction b1_from_init_plot_tables:
Removing instruction b2_from_b1:
Removing instruction b3_from_b2:
Removing instruction b5:
Removing instruction breturn:
Removing instruction b2_from_init_screen:
Removing instruction b1:
Removing instruction b4_from_b1:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b2
Removing instruction jmp b4
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = (byte*) 53280
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(byte) BMM
(const byte) BMM#0 BMM = (byte) $20
(byte*) D011
(const byte*) D011#0 D011 = (byte*) 53265
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte) DEN
(const byte) DEN#0 DEN = (byte) $10
(byte*) FGCOL
(const byte*) FGCOL#0 FGCOL = (byte*) 53281
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte) RSEL
(const byte) RSEL#0 RSEL = (byte) 8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 reg byte a 22.0
(byte~) init_plot_tables::$10 $10 zp ZP_BYTE:7 5.5
(byte~) init_plot_tables::$7 reg byte a 22.0
(byte~) init_plot_tables::$8 reg byte a 22.0
(byte~) init_plot_tables::$9 reg byte a 22.0
(label) init_plot_tables::@1
(label) init_plot_tables::@2
(label) init_plot_tables::@3
(label) init_plot_tables::@4
(label) init_plot_tables::@5
(label) init_plot_tables::@6
(label) init_plot_tables::@return
(byte) init_plot_tables::bits
(byte) init_plot_tables::bits#1 reg byte y 11.0
(byte) init_plot_tables::bits#3 reg byte y 6.6000000000000005
(byte) init_plot_tables::bits#4 reg byte y 7.333333333333333
(byte) init_plot_tables::x
(byte) init_plot_tables::x#1 reg byte x 16.5
(byte) init_plot_tables::x#2 reg byte x 7.333333333333334
(byte) init_plot_tables::y
(byte) init_plot_tables::y#1 reg byte x 16.5
(byte) init_plot_tables::y#2 reg byte x 5.5
(byte*) init_plot_tables::yoffs
(byte*) init_plot_tables::yoffs#1 yoffs zp ZP_WORD:5 22.0
(byte*) init_plot_tables::yoffs#2 yoffs zp ZP_WORD:5 6.875
(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_WORD:5 11.0
(void()) init_screen()
(label) init_screen::@1
(label) init_screen::@2
(label) init_screen::@3
(label) init_screen::@4
(label) init_screen::@return
(byte*) init_screen::b
(byte*) init_screen::b#1 b zp ZP_WORD:5 16.5
(byte*) init_screen::b#4 b zp ZP_WORD:5 16.5
(byte*) init_screen::c
(byte*) init_screen::c#1 c zp ZP_WORD:3 16.5
(byte*) init_screen::c#4 c zp ZP_WORD:3 16.5
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(void()) plot((byte) plot::x , (byte) plot::y)
(byte~) plot::$5 reg byte a 4.0
(byte~) plot::$6 reg byte a 4.0
(byte~) plot::$7 reg byte a 4.0
(byte~) plot::$8 reg byte a 4.0
(byte~) plot::$9 reg byte a 4.0
(label) plot::@return
(byte*) plot::plotter
(byte*) plot::plotter#0 plotter zp ZP_WORD:3 3.0
(byte*) plot::plotter_x
(byte*) plot::plotter_x#1 plotter_x zp ZP_WORD:3 2.0
(byte*) plot::plotter_x#2 plotter_x zp ZP_WORD:3 0.8
(word) plot::plotter_y
(word) plot::plotter_y#1 plotter_y zp ZP_WORD:5 2.0
(word) plot::plotter_y#2 plotter_y zp ZP_WORD:5 4.0
(byte) plot::x
(byte) plot::x#0 x zp ZP_BYTE:7 9.727272727272727
(byte) plot::y
(byte) plot::y#0 y zp ZP_BYTE:2 15.000000000000002
(byte[$100]) plot_bit
(const byte[$100]) plot_bit#0 plot_bit = { fill( $100, 0) }
(byte[$100]) plot_xhi
(const byte[$100]) plot_xhi#0 plot_xhi = { fill( $100, 0) }
(byte[$100]) plot_xlo
(const byte[$100]) plot_xlo#0 plot_xlo = { fill( $100, 0) }
(byte[$100]) plot_yhi
(const byte[$100]) plot_yhi#0 plot_yhi = { fill( $100, 0) }
(byte[$100]) plot_ylo
(const byte[$100]) plot_ylo#0 plot_ylo = { fill( $100, 0) }
(void()) plots()
(label) plots::@1
(label) plots::@2
(label) plots::@3
(label) plots::@return
(byte) plots::i
(byte) plots::i#1 reg byte x 151.5
(byte) plots::i#5 reg byte x 101.0
(byte) plots_cnt
(const byte) plots_cnt#0 plots_cnt = (byte) 8
(byte[]) plots_x
(const byte[]) plots_x#0 plots_x = { (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28, (byte) $a, (byte) $28 }
(byte[]) plots_y
(const byte[]) plots_y#0 plots_y = { (byte) $a, (byte) $28, (byte) $3c, (byte) $50, (byte) $6e, (byte) $50, (byte) $3c, (byte) $28 }

reg byte x [ plots::i#5 plots::i#1 ]
reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ]
reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ]
reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ]
zp ZP_BYTE:2 [ plot::y#0 ]
reg byte a [ plot::$6 ]
zp ZP_WORD:3 [ plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 init_screen::c#4 init_screen::c#1 ]
reg byte a [ plot::$7 ]
reg byte a [ plot::$8 ]
zp ZP_WORD:5 [ plot::plotter_y#1 plot::plotter_y#2 init_screen::b#4 init_screen::b#1 init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ]
reg byte a [ plot::$9 ]
reg byte a [ plot::$5 ]
reg byte a [ init_plot_tables::$0 ]
zp ZP_BYTE:7 [ init_plot_tables::$10 plot::x#0 ]
reg byte a [ init_plot_tables::$7 ]
reg byte a [ init_plot_tables::$8 ]
reg byte a [ init_plot_tables::$9 ]


FINAL ASSEMBLER
Score: 6171

  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label D011 = $d011
  .const BMM = $20
  .const DEN = $10
  .const RSEL = 8
  .label RASTER = $d012
  .label D018 = $d018
  .label BGCOL = $d020
  .label FGCOL = $d021
  .label SCREEN = $400
  .label BITMAP = $2000
  .const plots_cnt = 8
  // @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: {
    // *BGCOL = 0
    // [4] *((const byte*) BGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BGCOL
    // *FGCOL = 0
    // [5] *((const byte*) FGCOL#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    sta FGCOL
    // *D011 = BMM|DEN|RSEL|3
    // [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #BMM|DEN|RSEL|3
    sta D011
    // *D018 = (byte)(((word)SCREEN/$40)|((word)BITMAP/$400))
    // [7] *((const byte*) D018#0) ← (byte)(word)(const byte*) SCREEN#0/(byte) $40|(word)(const byte*) BITMAP#0/(word) $400 -- _deref_pbuc1=vbuc2 
    lda #SCREEN/$40|BITMAP/$400
    sta D018
    // init_screen()
    // [8] call init_screen 
    // [60] phi from main to init_screen [phi:main->init_screen]
    jsr init_screen
    // [9] phi from main to main::@3 [phi:main->main::@3]
    // main::@3
    // init_plot_tables()
    // [10] call init_plot_tables 
    // [35] phi from main::@3 to init_plot_tables [phi:main::@3->init_plot_tables]
    jsr init_plot_tables
    // main::@1
  b1:
    // while (*RASTER!=$ff)
    // [11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne b1
    // main::@2
    // (*BGCOL)++;
    // [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
    // plots()
    // [13] call plots 
    // [15] phi from main::@2 to plots [phi:main::@2->plots]
    jsr plots
    // main::@4
    // (*BGCOL)--;
    // [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
    jmp b1
}
  // plots
plots: {
    // [16] phi from plots to plots::@2 [phi:plots->plots::@2]
    // [16] phi (byte) plots::i#5 = (byte) 0 [phi:plots->plots::@2#0] -- vbuxx=vbuc1 
    ldx #0
    // [16] phi from plots::@1 to plots::@2 [phi:plots::@1->plots::@2]
    // [16] phi (byte) plots::i#5 = (byte) plots::i#1 [phi:plots::@1->plots::@2#0] -- register_copy 
    // plots::@2
  b2:
    // plot(plots_x[i], plots_y[i])
    // [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#5) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_x,x
    sta.z plot.x
    // [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#5) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_y,x
    sta.z plot.y
    // [19] call plot 
    jsr plot
    // plots::@3
    // for(byte i=0; i<plots_cnt;i++)
    // [20] (byte) plots::i#1 ← ++ (byte) plots::i#5 -- vbuxx=_inc_vbuxx 
    inx
    // plots::@1
    // [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #plots_cnt
    bcc b2
    // plots::@return
    // }
    // [22] return 
    rts
}
  // plot
// plot(byte zeropage(7) x, byte zeropage(2) y)
plot: {
    .label x = 7
    .label y = 2
    .label plotter_x = 3
    .label plotter_y = 5
    .label plotter = 3
    // >plotter_x = plot_xhi[x]
    // [23] (byte~) plot::$6 ← *((const byte[$100]) plot_xhi#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy.z x
    lda plot_xhi,y
    // [24] (byte*) plot::plotter_x#1 ← (byte*) 0 hi= (byte~) plot::$6 -- pbuz1=pbuc1_sethi_vbuaa 
    sta.z plotter_x+1
    lda #<0
    sta.z plotter_x
    // <plotter_x = plot_xlo[x]
    // [25] (byte~) plot::$7 ← *((const byte[$100]) plot_xlo#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    lda plot_xlo,y
    // [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 -- pbuz1=pbuz1_setlo_vbuaa 
    sta.z plotter_x
    // >plotter_y = plot_yhi[y]
    // [27] (byte~) plot::$8 ← *((const byte[$100]) plot_yhi#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy.z y
    lda plot_yhi,y
    // [28] (word) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$8 -- vwuz1=vbuc1_sethi_vbuaa 
    sta.z plotter_y+1
    lda #<0
    sta.z plotter_y
    // <plotter_y = plot_ylo[y]
    // [29] (byte~) plot::$9 ← *((const byte[$100]) plot_ylo#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    lda plot_ylo,y
    // [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 -- vwuz1=vwuz1_setlo_vbuaa 
    sta.z plotter_y
    // plotter = plotter_x+plotter_y
    // [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 -- pbuz1=pbuz1_plus_vwuz2 
    lda.z plotter
    clc
    adc.z plotter_y
    sta.z plotter
    lda.z plotter+1
    adc.z plotter_y+1
    sta.z plotter+1
    // *plotter | plot_bit[x]
    // [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[$100]) plot_bit#0 + (byte) plot::x#0) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 
    ldy #0
    lda (plotter),y
    ldy.z x
    ora plot_bit,y
    // *plotter = *plotter | plot_bit[x]
    // [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (plotter),y
    // plot::@return
    // }
    // [34] return 
    rts
}
  // init_plot_tables
init_plot_tables: {
    .label _10 = 7
    .label yoffs = 5
    // [36] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1]
    // [36] phi (byte) init_plot_tables::bits#3 = (byte) $80 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 
    ldy #$80
    // [36] phi (byte) init_plot_tables::x#2 = (byte) 0 [phi:init_plot_tables->init_plot_tables::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [36] phi from init_plot_tables::@2 to init_plot_tables::@1 [phi:init_plot_tables::@2->init_plot_tables::@1]
    // [36] phi (byte) init_plot_tables::bits#3 = (byte) init_plot_tables::bits#4 [phi:init_plot_tables::@2->init_plot_tables::@1#0] -- register_copy 
    // [36] phi (byte) init_plot_tables::x#2 = (byte) init_plot_tables::x#1 [phi:init_plot_tables::@2->init_plot_tables::@1#1] -- register_copy 
    // init_plot_tables::@1
  b1:
    // x&$f8
    // [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) $f8 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f8
    // plot_xlo[x] = x&$f8
    // [38] *((const byte[$100]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_xlo,x
    // plot_xhi[x] = >BITMAP
    // [39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #>BITMAP
    sta plot_xhi,x
    // plot_bit[x] = bits
    // [40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy 
    tya
    sta plot_bit,x
    // bits = bits/2
    // [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte) 1 -- vbuyy=vbuyy_ror_1 
    tya
    lsr
    tay
    // if(bits==0)
    // [42] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@6 -- vbuyy_neq_0_then_la1 
    cpy #0
    bne b2
    // [44] phi from init_plot_tables::@1 to init_plot_tables::@2 [phi:init_plot_tables::@1->init_plot_tables::@2]
    // [44] phi (byte) init_plot_tables::bits#4 = (byte) $80 [phi:init_plot_tables::@1->init_plot_tables::@2#0] -- vbuyy=vbuc1 
    ldy #$80
    // [43] phi from init_plot_tables::@1 to init_plot_tables::@6 [phi:init_plot_tables::@1->init_plot_tables::@6]
    // init_plot_tables::@6
    // [44] phi from init_plot_tables::@6 to init_plot_tables::@2 [phi:init_plot_tables::@6->init_plot_tables::@2]
    // [44] phi (byte) init_plot_tables::bits#4 = (byte) init_plot_tables::bits#1 [phi:init_plot_tables::@6->init_plot_tables::@2#0] -- register_copy 
    // init_plot_tables::@2
  b2:
    // for(byte x : 0..255)
    // [45] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [46] if((byte) init_plot_tables::x#1!=(byte) 0) goto init_plot_tables::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1
    // [47] phi from init_plot_tables::@2 to init_plot_tables::@3 [phi:init_plot_tables::@2->init_plot_tables::@3]
    // [47] phi (byte*) init_plot_tables::yoffs#2 = (byte*) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#0] -- pbuz1=pbuc1 
    lda #<0
    sta.z yoffs
    sta.z yoffs+1
    // [47] phi (byte) init_plot_tables::y#2 = (byte) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#1] -- vbuxx=vbuc1 
    tax
    // [47] phi from init_plot_tables::@4 to init_plot_tables::@3 [phi:init_plot_tables::@4->init_plot_tables::@3]
    // [47] phi (byte*) init_plot_tables::yoffs#2 = (byte*) init_plot_tables::yoffs#4 [phi:init_plot_tables::@4->init_plot_tables::@3#0] -- register_copy 
    // [47] phi (byte) init_plot_tables::y#2 = (byte) init_plot_tables::y#1 [phi:init_plot_tables::@4->init_plot_tables::@3#1] -- register_copy 
    // init_plot_tables::@3
  b3:
    // y&$7
    // [48] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 
    lda #7
    sax.z _10
    // <yoffs
    // [49] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda.z yoffs
    // y&$7 | <yoffs
    // [50] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$10 | (byte~) init_plot_tables::$7 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z _10
    // plot_ylo[y] = y&$7 | <yoffs
    // [51] *((const byte[$100]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_ylo,x
    // >yoffs
    // [52] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda.z yoffs+1
    // plot_yhi[y] = >yoffs
    // [53] *((const byte[$100]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_yhi,x
    // if((y&$7)==7)
    // [54] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp.z _10
    bne b4
    // init_plot_tables::@5
    // yoffs = yoffs + 40*8
    // [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z yoffs
    adc #<$28*8
    sta.z yoffs
    lda.z yoffs+1
    adc #>$28*8
    sta.z yoffs+1
    // [56] phi from init_plot_tables::@3 init_plot_tables::@5 to init_plot_tables::@4 [phi:init_plot_tables::@3/init_plot_tables::@5->init_plot_tables::@4]
    // [56] phi (byte*) init_plot_tables::yoffs#4 = (byte*) init_plot_tables::yoffs#2 [phi:init_plot_tables::@3/init_plot_tables::@5->init_plot_tables::@4#0] -- register_copy 
    // init_plot_tables::@4
  b4:
    // for(byte y : 0..255)
    // [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [58] if((byte) init_plot_tables::y#1!=(byte) 0) goto init_plot_tables::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3
    // init_plot_tables::@return
    // }
    // [59] return 
    rts
}
  // init_screen
init_screen: {
    .label b = 5
    .label c = 3
    // [61] phi from init_screen to init_screen::@2 [phi:init_screen->init_screen::@2]
    // [61] phi (byte*) init_screen::b#4 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@2#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta.z b
    lda #>BITMAP
    sta.z b+1
    // [61] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2]
    // [61] phi (byte*) init_screen::b#4 = (byte*) init_screen::b#1 [phi:init_screen::@1->init_screen::@2#0] -- register_copy 
    // init_screen::@2
  b2:
    // *b = 0
    // [62] *((byte*) init_screen::b#4) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (b),y
    // for(byte* b = BITMAP; b!=BITMAP+$2000; b++)
    // [63] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#4 -- pbuz1=_inc_pbuz1 
    inc.z b
    bne !+
    inc.z b+1
  !:
    // init_screen::@1
    // [64] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) $2000) goto init_screen::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z b+1
    cmp #>BITMAP+$2000
    bne b2
    lda.z b
    cmp #<BITMAP+$2000
    bne b2
    // [65] phi from init_screen::@1 to init_screen::@4 [phi:init_screen::@1->init_screen::@4]
    // [65] phi (byte*) init_screen::c#4 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@4#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z c
    lda #>SCREEN
    sta.z c+1
    // [65] phi from init_screen::@3 to init_screen::@4 [phi:init_screen::@3->init_screen::@4]
    // [65] phi (byte*) init_screen::c#4 = (byte*) init_screen::c#1 [phi:init_screen::@3->init_screen::@4#0] -- register_copy 
    // init_screen::@4
  b4:
    // *c = $14
    // [66] *((byte*) init_screen::c#4) ← (byte) $14 -- _deref_pbuz1=vbuc1 
    lda #$14
    ldy #0
    sta (c),y
    // for(byte* c = SCREEN; c!=SCREEN+$400;c++)
    // [67] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#4 -- pbuz1=_inc_pbuz1 
    inc.z c
    bne !+
    inc.z c+1
  !:
    // init_screen::@3
    // [68] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) $400) goto init_screen::@4 -- pbuz1_neq_pbuc1_then_la1 
    lda.z c+1
    cmp #>SCREEN+$400
    bne b4
    lda.z c
    cmp #<SCREEN+$400
    bne b4
    // init_screen::@return
    // }
    // [69] return 
    rts
}
  // File Data
  plots_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28
  plots_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28
  plot_xlo: .fill $100, 0
  plot_xhi: .fill $100, 0
  plot_ylo: .fill $100, 0
  plot_yhi: .fill $100, 0
  plot_bit: .fill $100, 0

