
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) D011#0 ← ((byte*)) (word/dword/signed dword) 53265
  (byte) RST8#0 ← (byte/word/signed word/dword/signed dword) 128
  (byte) ECM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64
  (byte) BMM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 32
  (byte) DEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) RSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) 53266
  (byte*) D016#0 ← ((byte*)) (word/dword/signed dword) 53270
  (byte) MCM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) CSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) D018#0 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53280
  (byte*) FGCOL#0 ← ((byte*)) (word/dword/signed dword) 53281
  (byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) 55296
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) BITMAP#0 ← ((byte*)) (word/signed word/dword/signed dword) 8192
  to:@1
main: scope:[main]  from @5
  (byte) plots_cnt#10 ← phi( @5/(byte) plots_cnt#11 )
  (byte*) RASTER#6 ← phi( @5/(byte*) RASTER#8 )
  (byte*) D018#1 ← phi( @5/(byte*) D018#2 )
  (byte*) SCREEN#1 ← phi( @5/(byte*) SCREEN#4 )
  (byte*) D011#1 ← phi( @5/(byte*) D011#2 )
  (byte) RSEL#1 ← phi( @5/(byte) RSEL#2 )
  (byte) DEN#1 ← phi( @5/(byte) DEN#2 )
  (byte) BMM#1 ← phi( @5/(byte) BMM#2 )
  (byte*) FGCOL#1 ← phi( @5/(byte*) FGCOL#2 )
  (byte*) BGCOL#1 ← phi( @5/(byte*) BGCOL#4 )
  *((byte*) BGCOL#1) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  *((byte*) FGCOL#1) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte~) main::$0 ← (byte) BMM#1 | (byte) DEN#1
  (byte~) main::$1 ← (byte~) main::$0 | (byte) RSEL#1
  (byte/word/dword~) main::$2 ← (byte~) main::$1 | (byte/signed byte/word/signed word/dword/signed dword) 3
  *((byte*) D011#1) ← (byte/word/dword~) main::$2
  (word~) main::$3 ← ((word)) (byte*) SCREEN#1
  (word/signed dword/dword~) main::$4 ← (word~) main::$3 / (byte/signed byte/word/signed word/dword/signed dword) 64
  (word~) main::$5 ← ((word)) (byte*) BITMAP#0
  (word/signed dword/dword~) main::$6 ← (word~) main::$5 / (word/signed word/dword/signed dword) 1024
  (word/dword~) main::$7 ← (word/signed dword/dword~) main::$4 | (word/signed dword/dword~) main::$6
  (byte~) main::$8 ← ((byte)) (word/dword~) main::$7
  *((byte*) D018#1) ← (byte~) main::$8
  call init_screen 
  to:main::@5
main::@5: scope:[main]  from main
  (byte) plots_cnt#8 ← phi( main/(byte) plots_cnt#10 )
  (byte*) BGCOL#9 ← phi( main/(byte*) BGCOL#1 )
  (byte*) RASTER#4 ← phi( main/(byte*) RASTER#6 )
  call init_plot_tables 
  to:main::@6
main::@6: scope:[main]  from main::@5
  (byte) plots_cnt#7 ← phi( main::@5/(byte) plots_cnt#8 )
  (byte*) BGCOL#7 ← phi( main::@5/(byte*) BGCOL#9 )
  (byte*) RASTER#3 ← phi( main::@5/(byte*) RASTER#4 )
  to:main::@2
main::@1: scope:[main]  from main::@7
  (byte) plots_cnt#6 ← phi( main::@7/(byte) plots_cnt#9 )
  (byte*) BGCOL#6 ← phi( main::@7/(byte*) BGCOL#3 )
  (byte*) RASTER#2 ← phi( main::@7/(byte*) RASTER#5 )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@2 main::@6
  (byte) plots_cnt#5 ← phi( main::@1/(byte) plots_cnt#6 main::@2/(byte) plots_cnt#5 main::@6/(byte) plots_cnt#7 )
  (byte*) BGCOL#5 ← phi( main::@1/(byte*) BGCOL#6 main::@2/(byte*) BGCOL#5 main::@6/(byte*) BGCOL#7 )
  (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#2 main::@2/(byte*) RASTER#1 main::@6/(byte*) RASTER#3 )
  (bool~) main::$11 ← *((byte*) RASTER#1) != (byte/word/signed word/dword/signed dword) 255
  if((bool~) main::$11) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2
  (byte) plots_cnt#4 ← phi( main::@2/(byte) plots_cnt#5 )
  (byte*) RASTER#7 ← phi( main::@2/(byte*) RASTER#1 )
  (byte*) BGCOL#2 ← phi( main::@2/(byte*) BGCOL#5 )
  *((byte*) BGCOL#2) ← ++ *((byte*) BGCOL#2)
  call plots 
  to:main::@7
main::@7: scope:[main]  from main::@3
  (byte) plots_cnt#9 ← phi( main::@3/(byte) plots_cnt#4 )
  (byte*) RASTER#5 ← phi( main::@3/(byte*) RASTER#7 )
  (byte*) BGCOL#3 ← phi( main::@3/(byte*) BGCOL#2 )
  *((byte*) BGCOL#3) ← -- *((byte*) BGCOL#3)
  if(true) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@7
  return 
  to:@return
@1: scope:[]  from @begin
  (byte*) RASTER#10 ← phi( @begin/(byte*) RASTER#0 )
  (byte*) D018#4 ← phi( @begin/(byte*) D018#0 )
  (byte*) SCREEN#8 ← phi( @begin/(byte*) SCREEN#0 )
  (byte*) D011#4 ← phi( @begin/(byte*) D011#0 )
  (byte) RSEL#4 ← phi( @begin/(byte) RSEL#0 )
  (byte) DEN#4 ← phi( @begin/(byte) DEN#0 )
  (byte) BMM#4 ← phi( @begin/(byte) BMM#0 )
  (byte*) FGCOL#4 ← phi( @begin/(byte*) FGCOL#0 )
  (byte*) BGCOL#10 ← phi( @begin/(byte*) BGCOL#0 )
  (byte[]) plots_x#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 110, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 40, (byte/signed byte/word/signed word/dword/signed dword) 10, (byte/signed byte/word/signed word/dword/signed dword) 40 }
  (byte[]) plots_y#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 10, (byte/signed byte/word/signed word/dword/signed dword) 40, (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 110, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 40 }
  (byte) plots_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  to:@2
plots: scope:[plots]  from main::@3
  (byte) plots_cnt#3 ← phi( main::@3/(byte) plots_cnt#4 )
  (byte) plots::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:plots::@1
plots::@1: scope:[plots]  from plots plots::@3
  (byte) plots_cnt#2 ← phi( plots/(byte) plots_cnt#3 plots::@3/(byte) plots_cnt#1 )
  (byte) plots::i#2 ← phi( plots/(byte) plots::i#0 plots::@3/(byte) plots::i#1 )
  (byte) plot::x#0 ← *((byte[]) plots_x#0 + (byte) plots::i#2)
  (byte) plot::y#0 ← *((byte[]) plots_y#0 + (byte) plots::i#2)
  call plot 
  to:plots::@3
plots::@3: scope:[plots]  from plots::@1
  (byte) plots_cnt#1 ← phi( plots::@1/(byte) plots_cnt#2 )
  (byte) plots::i#3 ← phi( plots::@1/(byte) plots::i#2 )
  (byte) plots::i#1 ← ++ (byte) plots::i#3
  (bool~) plots::$1 ← (byte) plots::i#1 < (byte) plots_cnt#1
  if((bool~) plots::$1) goto plots::@1
  to:plots::@return
plots::@return: scope:[plots]  from plots::@3
  return 
  to:@return
@2: scope:[]  from @1
  (byte) plots_cnt#12 ← phi( @1/(byte) plots_cnt#0 )
  (byte*) RASTER#9 ← phi( @1/(byte*) RASTER#10 )
  (byte*) D018#3 ← phi( @1/(byte*) D018#4 )
  (byte*) SCREEN#7 ← phi( @1/(byte*) SCREEN#8 )
  (byte*) D011#3 ← phi( @1/(byte*) D011#4 )
  (byte) RSEL#3 ← phi( @1/(byte) RSEL#4 )
  (byte) DEN#3 ← phi( @1/(byte) DEN#4 )
  (byte) BMM#3 ← phi( @1/(byte) BMM#4 )
  (byte*) FGCOL#3 ← phi( @1/(byte*) FGCOL#4 )
  (byte*) BGCOL#8 ← phi( @1/(byte*) BGCOL#10 )
  (byte[256]) plot_xlo#0 ← { fill( 256, 0) }
  (byte[256]) plot_xhi#0 ← { fill( 256, 0) }
  (byte[256]) plot_ylo#0 ← { fill( 256, 0) }
  (byte[256]) plot_yhi#0 ← { fill( 256, 0) }
  (byte[256]) plot_bit#0 ← { fill( 256, 0) }
  to:@5
plot: scope:[plot]  from plots::@1
  (byte) plot::y#1 ← phi( plots::@1/(byte) plot::y#0 )
  (byte) plot::x#1 ← phi( plots::@1/(byte) plot::x#0 )
  (byte*) plot::plotter_x#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
  (word) plot::plotter_y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte~) plot::$6 ← *((byte[256]) 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[256]) 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[256]) 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[256]) 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[256]) 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 ← (byte/word/signed word/dword/signed dword) 128
  (byte) init_plot_tables::x#0 ← (byte/signed byte/word/signed word/dword/signed dword) 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 )
  (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248
  *((byte[256]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0
  (byte~) init_plot_tables::$1 ← > (byte*) BITMAP#0
  *((byte[256]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$1
  *((byte[256]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3
  (byte~) init_plot_tables::$2 ← (byte) init_plot_tables::bits#3 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) init_plot_tables::bits#1 ← (byte~) init_plot_tables::$2
  (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 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::@5
init_plot_tables::@2: scope:[init_plot_tables]  from init_plot_tables::@1 init_plot_tables::@5
  (byte) init_plot_tables::bits#4 ← phi( init_plot_tables::@1/(byte) init_plot_tables::bits#1 init_plot_tables::@5/(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::@5/(byte) init_plot_tables::x#4 )
  (byte) init_plot_tables::x#1 ← (byte) init_plot_tables::x#3 + rangenext(0,255)
  (bool~) init_plot_tables::$5 ← (byte) init_plot_tables::x#1 != rangelast(0,255)
  if((bool~) init_plot_tables::$5) goto init_plot_tables::@1
  to:init_plot_tables::@6
init_plot_tables::@5: 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 ← (byte/word/signed word/dword/signed dword) 128
  to:init_plot_tables::@2
init_plot_tables::@6: scope:[init_plot_tables]  from init_plot_tables::@2
  (byte*) init_plot_tables::yoffs#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) init_plot_tables::y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:init_plot_tables::@3
init_plot_tables::@3: 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#4 init_plot_tables::@6/(byte*) init_plot_tables::yoffs#0 )
  (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@4/(byte) init_plot_tables::y#1 init_plot_tables::@6/(byte) init_plot_tables::y#0 )
  (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2
  (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
  *((byte[256]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8
  (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2
  *((byte[256]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9
  (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7
  (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7
  (bool~) init_plot_tables::$12 ← ! (bool~) init_plot_tables::$11
  if((bool~) init_plot_tables::$12) goto init_plot_tables::@4
  to:init_plot_tables::@7
init_plot_tables::@4: scope:[init_plot_tables]  from init_plot_tables::@3 init_plot_tables::@7
  (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(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::@3/(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,255)
  (bool~) init_plot_tables::$15 ← (byte) init_plot_tables::y#1 != rangelast(0,255)
  if((bool~) init_plot_tables::$15) goto init_plot_tables::@3
  to:init_plot_tables::@return
init_plot_tables::@7: scope:[init_plot_tables]  from init_plot_tables::@3
  (byte) init_plot_tables::y#4 ← phi( init_plot_tables::@3/(byte) init_plot_tables::y#2 )
  (byte*) init_plot_tables::yoffs#3 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 )
  (word/signed word/dword/signed dword~) init_plot_tables::$13 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*~) init_plot_tables::$14 ← (byte*) init_plot_tables::yoffs#3 + (word/signed word/dword/signed dword~) init_plot_tables::$13
  (byte*) init_plot_tables::yoffs#1 ← (byte*~) init_plot_tables::$14
  to:init_plot_tables::@4
init_plot_tables::@return: scope:[init_plot_tables]  from init_plot_tables::@4
  return 
  to:@return
init_screen: scope:[init_screen]  from main
  (byte*) SCREEN#6 ← phi( main/(byte*) SCREEN#1 )
  (byte*) init_screen::b#0 ← (byte*) BITMAP#0
  to:init_screen::@1
init_screen::@1: scope:[init_screen]  from init_screen init_screen::@1
  (byte*) SCREEN#5 ← phi( init_screen/(byte*) SCREEN#6 init_screen::@1/(byte*) SCREEN#5 )
  (byte*) init_screen::b#2 ← phi( init_screen/(byte*) init_screen::b#0 init_screen::@1/(byte*) init_screen::b#1 )
  *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2
  (byte*~) init_screen::$0 ← (byte*) BITMAP#0 + (word/signed word/dword/signed dword) 8192
  (bool~) init_screen::$1 ← (byte*) init_screen::b#1 != (byte*~) init_screen::$0
  if((bool~) init_screen::$1) goto init_screen::@1
  to:init_screen::@3
init_screen::@3: scope:[init_screen]  from init_screen::@1
  (byte*) SCREEN#2 ← phi( init_screen::@1/(byte*) SCREEN#5 )
  (byte*) init_screen::c#0 ← (byte*) SCREEN#2
  to:init_screen::@2
init_screen::@2: scope:[init_screen]  from init_screen::@2 init_screen::@3
  (byte*) SCREEN#3 ← phi( init_screen::@2/(byte*) SCREEN#3 init_screen::@3/(byte*) SCREEN#2 )
  (byte*) init_screen::c#2 ← phi( init_screen::@2/(byte*) init_screen::c#1 init_screen::@3/(byte*) init_screen::c#0 )
  *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20
  (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2
  (byte*~) init_screen::$2 ← (byte*) SCREEN#3 + (word/signed word/dword/signed dword) 1024
  (bool~) init_screen::$3 ← (byte*) init_screen::c#1 != (byte*~) init_screen::$2
  if((bool~) init_screen::$3) goto init_screen::@2
  to:init_screen::@return
init_screen::@return: scope:[init_screen]  from init_screen::@2
  return 
  to:@return
@5: scope:[]  from @2
  (byte) plots_cnt#11 ← phi( @2/(byte) plots_cnt#12 )
  (byte*) RASTER#8 ← phi( @2/(byte*) RASTER#9 )
  (byte*) D018#2 ← phi( @2/(byte*) D018#3 )
  (byte*) SCREEN#4 ← phi( @2/(byte*) SCREEN#7 )
  (byte*) D011#2 ← phi( @2/(byte*) D011#3 )
  (byte) RSEL#2 ← phi( @2/(byte) RSEL#3 )
  (byte) DEN#2 ← phi( @2/(byte) DEN#3 )
  (byte) BMM#2 ← phi( @2/(byte) BMM#3 )
  (byte*) FGCOL#2 ← phi( @2/(byte*) FGCOL#3 )
  (byte*) BGCOL#4 ← phi( @2/(byte*) BGCOL#8 )
  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*) BGCOL#1
(byte*) BGCOL#10
(byte*) BGCOL#2
(byte*) BGCOL#3
(byte*) BGCOL#4
(byte*) BGCOL#5
(byte*) BGCOL#6
(byte*) BGCOL#7
(byte*) BGCOL#8
(byte*) BGCOL#9
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BMM
(byte) BMM#0
(byte) BMM#1
(byte) BMM#2
(byte) BMM#3
(byte) BMM#4
(byte*) COLS
(byte*) COLS#0
(byte) CSEL
(byte) CSEL#0
(byte*) D011
(byte*) D011#0
(byte*) D011#1
(byte*) D011#2
(byte*) D011#3
(byte*) D011#4
(byte*) D016
(byte*) D016#0
(byte*) D018
(byte*) D018#0
(byte*) D018#1
(byte*) D018#2
(byte*) D018#3
(byte*) D018#4
(byte) DEN
(byte) DEN#0
(byte) DEN#1
(byte) DEN#2
(byte) DEN#3
(byte) DEN#4
(byte) ECM
(byte) ECM#0
(byte*) FGCOL
(byte*) FGCOL#0
(byte*) FGCOL#1
(byte*) FGCOL#2
(byte*) FGCOL#3
(byte*) FGCOL#4
(byte) MCM
(byte) MCM#0
(byte*) RASTER
(byte*) RASTER#0
(byte*) RASTER#1
(byte*) RASTER#10
(byte*) RASTER#2
(byte*) RASTER#3
(byte*) RASTER#4
(byte*) RASTER#5
(byte*) RASTER#6
(byte*) RASTER#7
(byte*) RASTER#8
(byte*) RASTER#9
(byte) RSEL
(byte) RSEL#0
(byte) RSEL#1
(byte) RSEL#2
(byte) RSEL#3
(byte) RSEL#4
(byte) RST8
(byte) RST8#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#2
(byte*) SCREEN#3
(byte*) SCREEN#4
(byte*) SCREEN#5
(byte*) SCREEN#6
(byte*) SCREEN#7
(byte*) SCREEN#8
(void()) init_plot_tables()
(byte~) init_plot_tables::$0
(byte~) init_plot_tables::$1
(byte~) init_plot_tables::$10
(bool~) init_plot_tables::$11
(bool~) init_plot_tables::$12
(word/signed word/dword/signed dword~) init_plot_tables::$13
(byte*~) init_plot_tables::$14
(bool~) init_plot_tables::$15
(byte~) init_plot_tables::$2
(bool~) init_plot_tables::$3
(bool~) init_plot_tables::$4
(bool~) init_plot_tables::$5
(byte~) init_plot_tables::$6
(byte~) init_plot_tables::$7
(byte~) 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::@return
(byte*) init_screen::b
(byte*) init_screen::b#0
(byte*) init_screen::b#1
(byte*) init_screen::b#2
(byte*) init_screen::c
(byte*) init_screen::c#0
(byte*) init_screen::c#1
(byte*) init_screen::c#2
(void()) main()
(byte~) main::$0
(byte~) main::$1
(bool~) main::$11
(byte/word/dword~) main::$2
(word~) main::$3
(word/signed dword/dword~) main::$4
(word~) main::$5
(word/signed dword/dword~) main::$6
(word/dword~) main::$7
(byte~) main::$8
(label) main::@1
(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[256]) plot_bit
(byte[256]) plot_bit#0
(byte[256]) plot_xhi
(byte[256]) plot_xhi#0
(byte[256]) plot_xlo
(byte[256]) plot_xlo#0
(byte[256]) plot_yhi
(byte[256]) plot_yhi#0
(byte[256]) plot_ylo
(byte[256]) plot_ylo#0
(void()) plots()
(bool~) plots::$1
(label) plots::@1
(label) plots::@3
(label) plots::@return
(byte) plots::i
(byte) plots::i#0
(byte) plots::i#1
(byte) plots::i#2
(byte) plots::i#3
(byte) plots_cnt
(byte) plots_cnt#0
(byte) plots_cnt#1
(byte) plots_cnt#10
(byte) plots_cnt#11
(byte) plots_cnt#12
(byte) plots_cnt#2
(byte) plots_cnt#3
(byte) plots_cnt#4
(byte) plots_cnt#5
(byte) plots_cnt#6
(byte) plots_cnt#7
(byte) plots_cnt#8
(byte) plots_cnt#9
(byte[]) plots_x
(byte[]) plots_x#0
(byte[]) plots_y
(byte[]) plots_y#0

Culled Empty Block (label) @6
Successful SSA optimization Pass2CullEmptyBlocks
Inversing boolean not [93] (bool~) init_plot_tables::$4 ← (byte) init_plot_tables::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [92] (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [112] (bool~) init_plot_tables::$12 ← (byte~) init_plot_tables::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [111] (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) RASTER#3 = (byte*) RASTER#4 (byte*) RASTER#6 
Alias (byte*) BGCOL#1 = (byte*) BGCOL#9 (byte*) BGCOL#7 
Alias (byte) plots_cnt#10 = (byte) plots_cnt#8 (byte) plots_cnt#7 
Alias (byte*) RASTER#1 = (byte*) RASTER#2 (byte*) RASTER#5 (byte*) RASTER#7 
Alias (byte*) BGCOL#2 = (byte*) BGCOL#6 (byte*) BGCOL#3 (byte*) BGCOL#5 
Alias (byte) plots_cnt#4 = (byte) plots_cnt#6 (byte) plots_cnt#9 (byte) plots_cnt#5 
Alias (byte*) BGCOL#0 = (byte*) BGCOL#10 (byte*) BGCOL#8 (byte*) BGCOL#4 
Alias (byte*) FGCOL#0 = (byte*) FGCOL#4 (byte*) FGCOL#3 (byte*) FGCOL#2 
Alias (byte) BMM#0 = (byte) BMM#4 (byte) BMM#3 (byte) BMM#2 
Alias (byte) DEN#0 = (byte) DEN#4 (byte) DEN#3 (byte) DEN#2 
Alias (byte) RSEL#0 = (byte) RSEL#4 (byte) RSEL#3 (byte) RSEL#2 
Alias (byte*) D011#0 = (byte*) D011#4 (byte*) D011#3 (byte*) D011#2 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#8 (byte*) SCREEN#7 (byte*) SCREEN#4 
Alias (byte*) D018#0 = (byte*) D018#4 (byte*) D018#3 (byte*) D018#2 
Alias (byte*) RASTER#0 = (byte*) RASTER#10 (byte*) RASTER#9 (byte*) RASTER#8 
Alias (byte) plots::i#2 = (byte) plots::i#3 
Alias (byte) plots_cnt#1 = (byte) plots_cnt#2 
Alias (byte) plots_cnt#0 = (byte) plots_cnt#12 (byte) plots_cnt#11 
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::$14 
Alias (byte*) SCREEN#2 = (byte*) SCREEN#5 
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
Self Phi Eliminated (byte*) RASTER#1
Self Phi Eliminated (byte*) RASTER#1
Self Phi Eliminated (byte*) BGCOL#2
Self Phi Eliminated (byte*) BGCOL#2
Self Phi Eliminated (byte) plots_cnt#4
Self Phi Eliminated (byte) plots_cnt#4
Self Phi Eliminated (byte) plots_cnt#1
Self Phi Eliminated (byte*) SCREEN#2
Self Phi Eliminated (byte*) SCREEN#3
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) BGCOL#1 (byte*) BGCOL#0
Redundant Phi (byte*) FGCOL#1 (byte*) FGCOL#0
Redundant Phi (byte) BMM#1 (byte) BMM#0
Redundant Phi (byte) DEN#1 (byte) DEN#0
Redundant Phi (byte) RSEL#1 (byte) RSEL#0
Redundant Phi (byte*) D011#1 (byte*) D011#0
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
Redundant Phi (byte*) D018#1 (byte*) D018#0
Redundant Phi (byte*) RASTER#3 (byte*) RASTER#0
Redundant Phi (byte) plots_cnt#10 (byte) plots_cnt#0
Redundant Phi (byte*) RASTER#1 (byte*) RASTER#3
Redundant Phi (byte*) BGCOL#2 (byte*) BGCOL#1
Redundant Phi (byte) plots_cnt#4 (byte) plots_cnt#10
Redundant Phi (byte) plots_cnt#3 (byte) plots_cnt#4
Redundant Phi (byte) plots_cnt#1 (byte) plots_cnt#3
Redundant Phi (byte) plot::x#1 (byte) plot::x#0
Redundant Phi (byte) plot::y#1 (byte) plot::y#0
Redundant Phi (byte*) SCREEN#6 (byte*) SCREEN#1
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#6
Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#2
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) main::$11 [37] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2
Simple Condition (bool~) plots::$1 [58] if((byte) plots::i#1<(byte) plots_cnt#0) goto plots::@1
Simple Condition (bool~) init_plot_tables::$4 [94] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@2
Simple Condition (bool~) init_plot_tables::$5 [98] if((byte) init_plot_tables::x#1!=rangelast(0,255)) goto init_plot_tables::@1
Simple Condition (bool~) init_plot_tables::$12 [113] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4
Simple Condition (bool~) init_plot_tables::$15 [117] if((byte) init_plot_tables::y#1!=rangelast(0,255)) goto init_plot_tables::@3
Simple Condition (bool~) init_screen::$1 [130] if((byte*) init_screen::b#1!=(byte*~) init_screen::$0) goto init_screen::@1
Simple Condition (bool~) init_screen::$3 [138] if((byte*) init_screen::c#1!=(byte*~) init_screen::$2) goto init_screen::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) D011#0 = ((byte*))53265
Constant (const byte) RST8#0 = 128
Constant (const byte) ECM#0 = 64
Constant (const byte) BMM#0 = 32
Constant (const byte) DEN#0 = 16
Constant (const byte) RSEL#0 = 8
Constant (const byte*) RASTER#0 = ((byte*))53266
Constant (const byte*) D016#0 = ((byte*))53270
Constant (const byte) MCM#0 = 16
Constant (const byte) CSEL#0 = 8
Constant (const byte*) D018#0 = ((byte*))53272
Constant (const byte*) BGCOL#0 = ((byte*))53280
Constant (const byte*) FGCOL#0 = ((byte*))53281
Constant (const byte*) COLS#0 = ((byte*))55296
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte*) BITMAP#0 = ((byte*))8192
Constant (const byte[]) plots_x#0 = { 60, 80, 110, 80, 60, 40, 10, 40 }
Constant (const byte[]) plots_y#0 = { 10, 40, 60, 80, 110, 80, 60, 40 }
Constant (const byte) plots_cnt#0 = 8
Constant (const byte) plots::i#0 = 0
Constant (const byte[256]) plot_xlo#0 = { fill( 256, 0) }
Constant (const byte[256]) plot_xhi#0 = { fill( 256, 0) }
Constant (const byte[256]) plot_ylo#0 = { fill( 256, 0) }
Constant (const byte[256]) plot_yhi#0 = { fill( 256, 0) }
Constant (const byte[256]) plot_bit#0 = { fill( 256, 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 = 128
Constant (const byte) init_plot_tables::x#0 = 0
Constant (const byte) init_plot_tables::bits#2 = 128
Constant (const byte*) init_plot_tables::yoffs#0 = ((byte*))0
Constant (const byte) init_plot_tables::y#0 = 0
Constant (const word/signed word/dword/signed dword) init_plot_tables::$13 = 40*8
Successful SSA optimization Pass2ConstantIdentification
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::b#0 = BITMAP#0
Constant (const byte*) init_screen::$0 = BITMAP#0+8192
Constant (const byte*) init_screen::c#0 = SCREEN#0
Constant (const byte*) init_screen::$2 = SCREEN#0+1024
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$1 = main::$0|RSEL#0
Constant (const word/signed dword/dword) main::$4 = main::$3/64
Constant (const word/signed dword/dword) main::$6 = main::$5/1024
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte/word/dword) main::$2 = main::$1|3
Constant (const word/dword) main::$7 = main::$4|main::$6
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) main::$8 = ((byte))main::$7
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [10] if(true) goto main::@1
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Resolved ranged next value init_plot_tables::x#1 ← ++ init_plot_tables::x#2 to ++
Resolved ranged comparison value if(init_plot_tables::x#1!=rangelast(0,255)) goto init_plot_tables::@1 to (byte/signed byte/word/signed word/dword/signed dword) 0
Resolved ranged next value init_plot_tables::y#1 ← ++ init_plot_tables::y#2 to ++
Resolved ranged comparison value if(init_plot_tables::y#1!=rangelast(0,255)) goto init_plot_tables::@3 to (byte/signed byte/word/signed word/dword/signed dword) 0
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@1
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) init_plot_tables::@6
Culled Empty Block (label) init_screen::@3
Successful SSA optimization Pass2CullEmptyBlocks
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/signed byte/word/signed word/dword/signed dword) 0
Constant inlined init_plot_tables::bits#2 = (byte/word/signed word/dword/signed dword) 128
Constant inlined init_plot_tables::bits#0 = (byte/word/signed word/dword/signed dword) 128
Constant inlined plot::plotter_y#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined plot::plotter_x#0 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined init_screen::$2 = (const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024
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/signed byte/word/signed word/dword/signed dword) 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/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::$6 = ((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024
Constant inlined init_plot_tables::yoffs#0 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::$3 = ((word))(const byte*) SCREEN#0
Constant inlined main::$4 = ((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64
Constant inlined init_plot_tables::$13 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 8
Constant inlined init_plot_tables::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 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/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024
Constant inlined init_screen::$0 = (const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192
Constant inlined main::$8 = ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting plots::@4(between plots::@3 and plots::@1)
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::@4 and init_plot_tables::@3)
Added new block during phi lifting init_plot_tables::@12(between init_plot_tables::@3 and init_plot_tables::@4)
Added new block during phi lifting init_screen::@5(between init_screen::@1 and init_screen::@1)
Added new block during phi lifting init_screen::@6(between init_screen::@2 and init_screen::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@5
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::@5
Adding NOP phi() at start of init_screen
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to init_screen:8 init_plot_tables:10 plots:13 
Calls in [plots] to plot:19 

Created 9 initial phi equivalence classes
Coalesced [23] plots::i#4 ← plots::i#1
Coalesced [58] init_plot_tables::yoffs#7 ← init_plot_tables::yoffs#1
Coalesced [63] init_plot_tables::y#5 ← init_plot_tables::y#1
Coalesced [64] init_plot_tables::yoffs#5 ← init_plot_tables::yoffs#4
Coalesced (already) [65] init_plot_tables::yoffs#6 ← init_plot_tables::yoffs#2
Coalesced [66] init_plot_tables::x#5 ← init_plot_tables::x#1
Coalesced [67] init_plot_tables::bits#5 ← init_plot_tables::bits#4
Coalesced [68] init_plot_tables::bits#6 ← init_plot_tables::bits#1
Coalesced [79] init_screen::c#3 ← init_screen::c#1
Coalesced [80] init_screen::b#3 ← init_screen::b#1
Coalesced down to 7 phi equivalence classes
Culled Empty Block (label) plots::@4
Culled Empty Block (label) init_plot_tables::@5
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::@6
Culled Empty Block (label) init_screen::@5
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@5
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::@10
Adding NOP phi() at start of init_screen

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@5
@5: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @5
  [3] phi()
main: scope:[main]  from @5
  [4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  [5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
  [7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024
  [8] call init_screen 
  to:main::@5
main::@5: scope:[main]  from main
  [9] phi()
  [10] call init_plot_tables 
  to:main::@2
main::@2: scope:[main]  from main::@2 main::@5 main::@7
  [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2
  [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
  [13] call plots 
  to:main::@7
main::@7: scope:[main]  from main::@3
  [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0)
  to:main::@2
plots: scope:[plots]  from main::@3
  [15] phi()
  to:plots::@1
plots::@1: scope:[plots]  from plots plots::@3
  [16] (byte) plots::i#2 ← phi( plots/(byte/signed byte/word/signed word/dword/signed dword) 0 plots::@3/(byte) plots::i#1 )
  [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#2)
  [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#2)
  [19] call plot 
  to:plots::@3
plots::@3: scope:[plots]  from plots::@1
  [20] (byte) plots::i#1 ← ++ (byte) plots::i#2
  [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@1
  to:plots::@return
plots::@return: scope:[plots]  from plots::@3
  [22] return 
  to:@return
plot: scope:[plot]  from plots::@1
  [23] (byte~) plot::$6 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#0)
  [24] (byte*) plot::plotter_x#1 ← ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$6
  [25] (byte~) plot::$7 ← *((const byte[256]) 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[256]) plot_yhi#0 + (byte) plot::y#0)
  [28] (word) plot::plotter_y#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$8
  [29] (byte~) plot::$9 ← *((const byte[256]) 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[256]) 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::@5
  [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/word/signed word/dword/signed dword) 128 init_plot_tables::@2/(byte) init_plot_tables::bits#4 )
  [36] (byte) init_plot_tables::x#2 ← phi( init_plot_tables/(byte/signed byte/word/signed word/dword/signed dword) 0 init_plot_tables::@2/(byte) init_plot_tables::x#1 )
  [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248
  [38] *((const byte[256]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0
  [39] *((const byte[256]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0
  [40] *((const byte[256]) 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/signed byte/word/signed word/dword/signed dword) 1
  [42] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@10
  to:init_plot_tables::@2
init_plot_tables::@2: scope:[init_plot_tables]  from init_plot_tables::@1 init_plot_tables::@10
  [43] (byte) init_plot_tables::bits#4 ← phi( init_plot_tables::@10/(byte) init_plot_tables::bits#1 init_plot_tables::@1/(byte/word/signed word/dword/signed dword) 128 )
  [44] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2
  [45] if((byte) init_plot_tables::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 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
  [46] (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@4/(byte*) init_plot_tables::yoffs#4 init_plot_tables::@2/((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [46] (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@4/(byte) init_plot_tables::y#1 init_plot_tables::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7
  [48] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2
  [49] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
  [50] *((const byte[256]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8
  [51] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2
  [52] *((const byte[256]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9
  [53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7
  [54] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4
  to:init_plot_tables::@7
init_plot_tables::@7: scope:[init_plot_tables]  from init_plot_tables::@3
  [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 8
  to:init_plot_tables::@4
init_plot_tables::@4: scope:[init_plot_tables]  from init_plot_tables::@3 init_plot_tables::@7
  [56] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@7/(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/signed byte/word/signed word/dword/signed dword) 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_plot_tables::@10: scope:[init_plot_tables]  from init_plot_tables::@1
  [60] phi()
  to:init_plot_tables::@2
init_screen: scope:[init_screen]  from main
  [61] phi()
  to:init_screen::@1
init_screen::@1: scope:[init_screen]  from init_screen init_screen::@1
  [62] (byte*) init_screen::b#2 ← phi( init_screen/(const byte*) BITMAP#0 init_screen::@1/(byte*) init_screen::b#1 )
  [63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
  [64] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2
  [65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192) goto init_screen::@1
  to:init_screen::@2
init_screen::@2: scope:[init_screen]  from init_screen::@1 init_screen::@2
  [66] (byte*) init_screen::c#2 ← phi( init_screen::@2/(byte*) init_screen::c#1 init_screen::@1/(const byte*) SCREEN#0 )
  [67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20
  [68] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2
  [69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024) goto init_screen::@2
  to:init_screen::@return
init_screen::@return: scope:[init_screen]  from init_screen::@2
  [70] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte*) BITMAP
(byte) BMM
(byte*) COLS
(byte) CSEL
(byte*) D011
(byte*) D016
(byte*) D018
(byte) DEN
(byte) ECM
(byte*) FGCOL
(byte) MCM
(byte*) RASTER
(byte) RSEL
(byte) RST8
(byte*) SCREEN
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 22.0
(byte~) init_plot_tables::$10 22.0
(byte~) init_plot_tables::$6 11.0
(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 6.0
(byte*) init_plot_tables::yoffs
(byte*) init_plot_tables::yoffs#1 22.0
(byte*) init_plot_tables::yoffs#2 6.111111111111112
(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#2 16.5
(byte*) init_screen::c
(byte*) init_screen::c#1 16.5
(byte*) init_screen::c#2 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[256]) plot_bit
(byte[256]) plot_xhi
(byte[256]) plot_xlo
(byte[256]) plot_yhi
(byte[256]) plot_ylo
(void()) plots()
(byte) plots::i
(byte) plots::i#1 151.5
(byte) plots::i#2 101.0
(byte) plots_cnt
(byte[]) plots_x
(byte[]) plots_y

Initial phi equivalence classes
[ plots::i#2 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#2 init_screen::b#1 ]
[ init_screen::c#2 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::$6 to zero page equivalence class [ init_plot_tables::$6 ]
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 ]
Added variable init_plot_tables::$10 to zero page equivalence class [ init_plot_tables::$10 ]
Complete equivalence classes
[ plots::i#2 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#2 init_screen::b#1 ]
[ init_screen::c#2 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::$6 ]
[ init_plot_tables::$7 ]
[ init_plot_tables::$8 ]
[ init_plot_tables::$9 ]
[ init_plot_tables::$10 ]
Allocated zp ZP_BYTE:2 [ plots::i#2 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#2 init_screen::b#1 ]
Allocated zp ZP_WORD:10 [ init_screen::c#2 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::$6 ]
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 ]
Allocated zp ZP_BYTE:34 [ init_plot_tables::$10 ]

INITIAL ASM
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 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
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
  jmp b5
//SEG5 @5
b5:
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 [4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BGCOL
  //SEG11 [5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta FGCOL
  //SEG12 [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2 
    lda #BMM|DEN|RSEL|3
    sta D011
  //SEG13 [7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024 -- _deref_pbuc1=vbuc2 
    lda #SCREEN/$40|BITMAP/$400
    sta D018
  //SEG14 [8] call init_screen 
  //SEG15 [61] phi from main to init_screen [phi:main->init_screen]
  init_screen_from_main:
    jsr init_screen
  //SEG16 [9] phi from main to main::@5 [phi:main->main::@5]
  b5_from_main:
    jmp b5
  //SEG17 main::@5
  b5:
  //SEG18 [10] call init_plot_tables 
  //SEG19 [35] phi from main::@5 to init_plot_tables [phi:main::@5->init_plot_tables]
  init_plot_tables_from_b5:
    jsr init_plot_tables
    jmp b2
  //SEG20 main::@2
  b2:
  //SEG21 [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b2
    jmp b3
  //SEG22 main::@3
  b3:
  //SEG23 [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
  //SEG24 [13] call plots 
  //SEG25 [15] phi from main::@3 to plots [phi:main::@3->plots]
  plots_from_b3:
    jsr plots
    jmp b7
  //SEG26 main::@7
  b7:
  //SEG27 [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
    jmp b2
}
//SEG28 plots
plots: {
    .label i = 2
  //SEG29 [16] phi from plots to plots::@1 [phi:plots->plots::@1]
  b1_from_plots:
  //SEG30 [16] phi (byte) plots::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plots->plots::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG31 [16] phi from plots::@3 to plots::@1 [phi:plots::@3->plots::@1]
  b1_from_b3:
  //SEG32 [16] phi (byte) plots::i#2 = (byte) plots::i#1 [phi:plots::@3->plots::@1#0] -- register_copy 
    jmp b1
  //SEG33 plots::@1
  b1:
  //SEG34 [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda plots_x,y
    sta plot.x
  //SEG35 [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy i
    lda plots_y,y
    sta plot.y
  //SEG36 [19] call plot 
    jsr plot
    jmp b3
  //SEG37 plots::@3
  b3:
  //SEG38 [20] (byte) plots::i#1 ← ++ (byte) plots::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG39 [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@1 -- vbuz1_lt_vbuc1_then_la1 
    lda i
    cmp #plots_cnt
    bcc b1_from_b3
    jmp breturn
  //SEG40 plots::@return
  breturn:
  //SEG41 [22] return 
    rts
}
//SEG42 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
  //SEG43 [23] (byte~) plot::$6 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy x
    lda plot_xhi,y
    sta _6
  //SEG44 [24] (byte*) plot::plotter_x#1 ← ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$6 -- pbuz1=pbuc1_sethi_vbuz2 
    lda _6
    sta plotter_x+1
    lda #<0
    sta plotter_x
  //SEG45 [25] (byte~) plot::$7 ← *((const byte[256]) plot_xlo#0 + (byte) plot::x#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy x
    lda plot_xlo,y
    sta _7
  //SEG46 [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 -- pbuz1=pbuz2_setlo_vbuz3 
    lda _7
    sta plotter_x_2
    lda plotter_x+1
    sta plotter_x_2+1
  //SEG47 [27] (byte~) plot::$8 ← *((const byte[256]) plot_yhi#0 + (byte) plot::y#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy y
    lda plot_yhi,y
    sta _8
  //SEG48 [28] (word) plot::plotter_y#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$8 -- vwuz1=vbuc1_sethi_vbuz2 
    lda _8
    sta plotter_y+1
    lda #<0
    sta plotter_y
  //SEG49 [29] (byte~) plot::$9 ← *((const byte[256]) plot_ylo#0 + (byte) plot::y#0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy y
    lda plot_ylo,y
    sta _9
  //SEG50 [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 -- vwuz1=vwuz2_setlo_vbuz3 
    lda _9
    sta plotter_y_2
    lda plotter_y+1
    sta plotter_y_2+1
  //SEG51 [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 -- pbuz1=pbuz2_plus_vwuz3 
    lda plotter_x_2
    clc
    adc plotter_y_2
    sta plotter
    lda plotter_x_2+1
    adc plotter_y_2+1
    sta plotter+1
  //SEG52 [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[256]) plot_bit#0 + (byte) plot::x#0) -- vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuz3 
    ldy #0
    lda (plotter),y
    ldy x
    ora plot_bit,y
    sta _5
  //SEG53 [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 -- _deref_pbuz1=vbuz2 
    lda _5
    ldy #0
    sta (plotter),y
    jmp breturn
  //SEG54 plot::@return
  breturn:
  //SEG55 [34] return 
    rts
}
//SEG56 init_plot_tables
init_plot_tables: {
    .label _0 = $1d
    .label _6 = $1e
    .label _7 = $1f
    .label _8 = $20
    .label _9 = $21
    .label _10 = $22
    .label bits = 4
    .label x = 3
    .label y = 5
    .label yoffs = 6
  //SEG57 [36] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1]
  b1_from_init_plot_tables:
  //SEG58 [36] phi (byte) init_plot_tables::bits#3 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuz1=vbuc1 
    lda #$80
    sta bits
  //SEG59 [36] phi (byte) init_plot_tables::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables->init_plot_tables::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta x
    jmp b1
  //SEG60 [36] phi from init_plot_tables::@2 to init_plot_tables::@1 [phi:init_plot_tables::@2->init_plot_tables::@1]
  b1_from_b2:
  //SEG61 [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 
  //SEG62 [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
  //SEG63 init_plot_tables::@1
  b1:
  //SEG64 [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248 -- vbuz1=vbuz2_band_vbuc1 
    lda #$f8
    and x
    sta _0
  //SEG65 [38] *((const byte[256]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda _0
    ldy x
    sta plot_xlo,y
  //SEG66 [39] *((const byte[256]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy x
    lda #>BITMAP
    sta plot_xhi,y
  //SEG67 [40] *((const byte[256]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda bits
    ldy x
    sta plot_bit,y
  //SEG68 [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_ror_1 
    lsr bits
  //SEG69 [42] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@10 -- vbuz1_neq_0_then_la1 
    lda bits
    cmp #0
    bne b10_from_b1
  //SEG70 [43] phi from init_plot_tables::@1 to init_plot_tables::@2 [phi:init_plot_tables::@1->init_plot_tables::@2]
  b2_from_b1:
  //SEG71 [43] phi (byte) init_plot_tables::bits#4 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables::@1->init_plot_tables::@2#0] -- vbuz1=vbuc1 
    lda #$80
    sta bits
    jmp b2
  //SEG72 init_plot_tables::@2
  b2:
  //SEG73 [44] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 -- vbuz1=_inc_vbuz1 
    inc x
  //SEG74 [45] if((byte) init_plot_tables::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@1 -- vbuz1_neq_0_then_la1 
    lda x
    cmp #0
    bne b1_from_b2
  //SEG75 [46] phi from init_plot_tables::@2 to init_plot_tables::@3 [phi:init_plot_tables::@2->init_plot_tables::@3]
  b3_from_b2:
  //SEG76 [46] phi (byte*) init_plot_tables::yoffs#2 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#0] -- pbuz1=pbuc1 
    lda #<0
    sta yoffs
    lda #>0
    sta yoffs+1
  //SEG77 [46] phi (byte) init_plot_tables::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b3
  //SEG78 [46] phi from init_plot_tables::@4 to init_plot_tables::@3 [phi:init_plot_tables::@4->init_plot_tables::@3]
  b3_from_b4:
  //SEG79 [46] 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 
  //SEG80 [46] 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
  //SEG81 init_plot_tables::@3
  b3:
  //SEG82 [47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and y
    sta _6
  //SEG83 [48] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 -- vbuz1=_lo_pbuz2 
    lda yoffs
    sta _7
  //SEG84 [49] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7 -- vbuz1=vbuz2_bor_vbuz3 
    lda _6
    ora _7
    sta _8
  //SEG85 [50] *((const byte[256]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda _8
    ldy y
    sta plot_ylo,y
  //SEG86 [51] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 -- vbuz1=_hi_pbuz2 
    lda yoffs+1
    sta _9
  //SEG87 [52] *((const byte[256]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda _9
    ldy y
    sta plot_yhi,y
  //SEG88 [53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and y
    sta _10
  //SEG89 [54] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda _10
    cmp #7
    bne b4_from_b3
    jmp b7
  //SEG90 init_plot_tables::@7
  b7:
  //SEG91 [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda yoffs
    adc #<$28*8
    sta yoffs
    lda yoffs+1
    adc #>$28*8
    sta yoffs+1
  //SEG92 [56] phi from init_plot_tables::@3 init_plot_tables::@7 to init_plot_tables::@4 [phi:init_plot_tables::@3/init_plot_tables::@7->init_plot_tables::@4]
  b4_from_b3:
  b4_from_b7:
  //SEG93 [56] phi (byte*) init_plot_tables::yoffs#4 = (byte*) init_plot_tables::yoffs#2 [phi:init_plot_tables::@3/init_plot_tables::@7->init_plot_tables::@4#0] -- register_copy 
    jmp b4
  //SEG94 init_plot_tables::@4
  b4:
  //SEG95 [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 -- vbuz1=_inc_vbuz1 
    inc y
  //SEG96 [58] if((byte) init_plot_tables::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@3 -- vbuz1_neq_0_then_la1 
    lda y
    cmp #0
    bne b3_from_b4
    jmp breturn
  //SEG97 init_plot_tables::@return
  breturn:
  //SEG98 [59] return 
    rts
  //SEG99 [60] phi from init_plot_tables::@1 to init_plot_tables::@10 [phi:init_plot_tables::@1->init_plot_tables::@10]
  b10_from_b1:
    jmp b10
  //SEG100 init_plot_tables::@10
  b10:
  //SEG101 [43] phi from init_plot_tables::@10 to init_plot_tables::@2 [phi:init_plot_tables::@10->init_plot_tables::@2]
  b2_from_b10:
  //SEG102 [43] phi (byte) init_plot_tables::bits#4 = (byte) init_plot_tables::bits#1 [phi:init_plot_tables::@10->init_plot_tables::@2#0] -- register_copy 
    jmp b2
}
//SEG103 init_screen
init_screen: {
    .label b = 8
    .label c = $a
  //SEG104 [62] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1]
  b1_from_init_screen:
  //SEG105 [62] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta b
    lda #>BITMAP
    sta b+1
    jmp b1
  //SEG106 [62] phi from init_screen::@1 to init_screen::@1 [phi:init_screen::@1->init_screen::@1]
  b1_from_b1:
  //SEG107 [62] phi (byte*) init_screen::b#2 = (byte*) init_screen::b#1 [phi:init_screen::@1->init_screen::@1#0] -- register_copy 
    jmp b1
  //SEG108 init_screen::@1
  b1:
  //SEG109 [63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (b),y
  //SEG110 [64] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2 -- pbuz1=_inc_pbuz1 
    inc b
    bne !+
    inc b+1
  !:
  //SEG111 [65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192) goto init_screen::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda b+1
    cmp #>BITMAP+$2000
    bne b1_from_b1
    lda b
    cmp #<BITMAP+$2000
    bne b1_from_b1
  //SEG112 [66] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2]
  b2_from_b1:
  //SEG113 [66] phi (byte*) init_screen::c#2 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta c
    lda #>SCREEN
    sta c+1
    jmp b2
  //SEG114 [66] phi from init_screen::@2 to init_screen::@2 [phi:init_screen::@2->init_screen::@2]
  b2_from_b2:
  //SEG115 [66] phi (byte*) init_screen::c#2 = (byte*) init_screen::c#1 [phi:init_screen::@2->init_screen::@2#0] -- register_copy 
    jmp b2
  //SEG116 init_screen::@2
  b2:
  //SEG117 [67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20 -- _deref_pbuz1=vbuc1 
    lda #$14
    ldy #0
    sta (c),y
  //SEG118 [68] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 -- pbuz1=_inc_pbuz1 
    inc c
    bne !+
    inc c+1
  !:
  //SEG119 [69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024) goto init_screen::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda c+1
    cmp #>SCREEN+$400
    bne b2_from_b2
    lda c
    cmp #<SCREEN+$400
    bne b2_from_b2
    jmp breturn
  //SEG120 init_screen::@return
  breturn:
  //SEG121 [70] return 
    rts
}
  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/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 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/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 [ ] ( 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#2 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#2 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#2 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#2 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a 
Statement [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[256]) plot_bit#0 + (byte) plot::x#0) [ plot::plotter#0 plot::$5 ] ( main:2::plots:13::plot:19 [ plots::i#2 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#2 plots::i#1 ]
Statement [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 [ ] ( main:2::plots:13::plot:19 [ plots::i#2 ] ) always clobbers reg byte y 
Statement [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248 [ 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 
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 [39] *((const byte[256]) 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[256]) 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 [47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 ] ) 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 [53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 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 + (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 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 [63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] ) always clobbers reg byte a reg byte y 
Statement [65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192) goto init_screen::@1 [ init_screen::b#1 ] ( main:2::init_screen:8 [ init_screen::b#1 ] ) always clobbers reg byte a 
Statement [67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a reg byte y 
Statement [69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024) goto init_screen::@2 [ 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/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 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/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 [ ] ( 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#2 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#2 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#2 plot::x#0 plot::plotter#0 ] ) always clobbers reg byte a 
Statement [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[256]) plot_bit#0 + (byte) plot::x#0) [ plot::plotter#0 plot::$5 ] ( main:2::plots:13::plot:19 [ plots::i#2 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#2 ] ) always clobbers reg byte y 
Statement [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248 [ 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[256]) 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[256]) 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 [47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 ] ) always clobbers reg byte a 
Statement [53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 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 + (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 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 [63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ init_screen::b#2 ] ( main:2::init_screen:8 [ init_screen::b#2 ] ) always clobbers reg byte a reg byte y 
Statement [65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192) goto init_screen::@1 [ init_screen::b#1 ] ( main:2::init_screen:8 [ init_screen::b#1 ] ) always clobbers reg byte a 
Statement [67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20 [ init_screen::c#2 ] ( main:2::init_screen:8 [ init_screen::c#2 ] ) always clobbers reg byte a reg byte y 
Statement [69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024) goto init_screen::@2 [ 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#2 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#2 init_screen::b#1 ] : zp ZP_WORD:8 , 
Potential registers zp ZP_WORD:10 [ init_screen::c#2 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::$6 ] : 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 , 
Potential registers zp ZP_BYTE:34 [ init_plot_tables::$10 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [plots] 252.5: zp ZP_BYTE:2 [ plots::i#2 plots::i#1 ] 
Uplift Scope [init_plot_tables] 39.11: 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.5: 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 ] 22: zp ZP_BYTE:34 [ init_plot_tables::$10 ] 11: zp ZP_BYTE:30 [ init_plot_tables::$6 ] 
Uplift Scope [init_screen] 33: zp ZP_WORD:8 [ init_screen::b#2 init_screen::b#1 ] 33: zp ZP_WORD:10 [ init_screen::c#2 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 8995 combination reg byte x [ plots::i#2 plots::i#1 ] 
Uplifting [init_plot_tables] best 8485 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:34 [ init_plot_tables::$10 ] zp ZP_BYTE:30 [ init_plot_tables::$6 ] 
Limited combination testing to 100 combinations of 138240 possible.
Uplifting [init_screen] best 8485 combination zp ZP_WORD:8 [ init_screen::b#2 init_screen::b#1 ] zp ZP_WORD:10 [ init_screen::c#2 init_screen::c#1 ] 
Uplifting [plot] best 8473 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 8473 combination 
Uplifting [] best 8473 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_plot_tables::$7 ]
Uplifting [init_plot_tables] best 8413 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 8353 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 8293 combination reg byte a [ init_plot_tables::$9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_plot_tables::$10 ]
Uplifting [init_plot_tables] best 8233 combination reg byte a [ init_plot_tables::$10 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ plot::y#0 ]
Uplifting [plot] best 8233 combination zp ZP_BYTE:13 [ plot::y#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_plot_tables::$6 ]
Uplifting [init_plot_tables] best 8233 combination zp ZP_BYTE:30 [ init_plot_tables::$6 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:12 [ plot::x#0 ]
Uplifting [plot] best 8233 combination zp ZP_BYTE:12 [ plot::x#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ plot::$8 ]
Uplifting [plot] best 8227 combination reg byte a [ plot::$8 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ plot::$9 ]
Uplifting [plot] best 8221 combination reg byte a [ plot::$9 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:28 [ plot::$5 ]
Uplifting [plot] best 8215 combination reg byte a [ plot::$5 ] 
Coalescing zero page register with common assignment [ zp ZP_WORD:15 [ plot::plotter_x#1 ] ] with [ zp ZP_WORD:18 [ plot::plotter_x#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ plot::plotter_y#1 ] ] with [ zp ZP_WORD:24 [ plot::plotter_y#2 ] ] - score: 1
Coalescing zero page register with common assignment [ 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:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] ] with [ zp ZP_WORD:8 [ init_screen::b#2 init_screen::b#1 ] ]
Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 ] ] with [ zp ZP_WORD:10 [ init_screen::c#2 init_screen::c#1 ] ]
Coalescing zero page register [ zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 ] ] with [ zp ZP_WORD:15 [ plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ] ]
Coalescing zero page register [ zp ZP_BYTE:12 [ plot::x#0 ] ] with [ zp ZP_BYTE:30 [ init_plot_tables::$6 ] ]
Allocated (was zp ZP_WORD:6) zp ZP_WORD:2 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ]
Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:4 [ plot::x#0 init_plot_tables::$6 ]
Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:5 [ plot::y#0 ]
Allocated (was zp ZP_WORD:21) zp ZP_WORD:6 [ plot::plotter_y#1 plot::plotter_y#2 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 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
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
b5_from_bbegin:
  jmp b5
//SEG5 @5
b5:
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
bend_from_b5:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 [4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BGCOL
  //SEG11 [5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta FGCOL
  //SEG12 [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2 
    lda #BMM|DEN|RSEL|3
    sta D011
  //SEG13 [7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024 -- _deref_pbuc1=vbuc2 
    lda #SCREEN/$40|BITMAP/$400
    sta D018
  //SEG14 [8] call init_screen 
  //SEG15 [61] phi from main to init_screen [phi:main->init_screen]
  init_screen_from_main:
    jsr init_screen
  //SEG16 [9] phi from main to main::@5 [phi:main->main::@5]
  b5_from_main:
    jmp b5
  //SEG17 main::@5
  b5:
  //SEG18 [10] call init_plot_tables 
  //SEG19 [35] phi from main::@5 to init_plot_tables [phi:main::@5->init_plot_tables]
  init_plot_tables_from_b5:
    jsr init_plot_tables
    jmp b2
  //SEG20 main::@2
  b2:
  //SEG21 [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b2
    jmp b3
  //SEG22 main::@3
  b3:
  //SEG23 [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
  //SEG24 [13] call plots 
  //SEG25 [15] phi from main::@3 to plots [phi:main::@3->plots]
  plots_from_b3:
    jsr plots
    jmp b7
  //SEG26 main::@7
  b7:
  //SEG27 [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
    jmp b2
}
//SEG28 plots
plots: {
  //SEG29 [16] phi from plots to plots::@1 [phi:plots->plots::@1]
  b1_from_plots:
  //SEG30 [16] phi (byte) plots::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plots->plots::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG31 [16] phi from plots::@3 to plots::@1 [phi:plots::@3->plots::@1]
  b1_from_b3:
  //SEG32 [16] phi (byte) plots::i#2 = (byte) plots::i#1 [phi:plots::@3->plots::@1#0] -- register_copy 
    jmp b1
  //SEG33 plots::@1
  b1:
  //SEG34 [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#2) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_x,x
    sta plot.x
  //SEG35 [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#2) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_y,x
    sta plot.y
  //SEG36 [19] call plot 
    jsr plot
    jmp b3
  //SEG37 plots::@3
  b3:
  //SEG38 [20] (byte) plots::i#1 ← ++ (byte) plots::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG39 [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@1 -- vbuxx_lt_vbuc1_then_la1 
    cpx #plots_cnt
    bcc b1_from_b3
    jmp breturn
  //SEG40 plots::@return
  breturn:
  //SEG41 [22] return 
    rts
}
//SEG42 plot
// plot(byte zeropage(4) x, byte zeropage(5) y)
plot: {
    .label x = 4
    .label y = 5
    .label plotter_x = 2
    .label plotter_y = 6
    .label plotter = 2
  //SEG43 [23] (byte~) plot::$6 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy x
    lda plot_xhi,y
  //SEG44 [24] (byte*) plot::plotter_x#1 ← ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$6 -- pbuz1=pbuc1_sethi_vbuaa 
    sta plotter_x+1
    lda #<0
    sta plotter_x
  //SEG45 [25] (byte~) plot::$7 ← *((const byte[256]) plot_xlo#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy x
    lda plot_xlo,y
  //SEG46 [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 -- pbuz1=pbuz1_setlo_vbuaa 
    sta plotter_x
  //SEG47 [27] (byte~) plot::$8 ← *((const byte[256]) plot_yhi#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy y
    lda plot_yhi,y
  //SEG48 [28] (word) plot::plotter_y#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$8 -- vwuz1=vbuc1_sethi_vbuaa 
    sta plotter_y+1
    lda #<0
    sta plotter_y
  //SEG49 [29] (byte~) plot::$9 ← *((const byte[256]) plot_ylo#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy y
    lda plot_ylo,y
  //SEG50 [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 -- vwuz1=vwuz1_setlo_vbuaa 
    sta plotter_y
  //SEG51 [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 -- pbuz1=pbuz1_plus_vwuz2 
    lda plotter
    clc
    adc plotter_y
    sta plotter
    lda plotter+1
    adc plotter_y+1
    sta plotter+1
  //SEG52 [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[256]) plot_bit#0 + (byte) plot::x#0) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 
    ldy #0
    lda (plotter),y
    ldy x
    ora plot_bit,y
  //SEG53 [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (plotter),y
    jmp breturn
  //SEG54 plot::@return
  breturn:
  //SEG55 [34] return 
    rts
}
//SEG56 init_plot_tables
init_plot_tables: {
    .label _6 = 4
    .label yoffs = 2
  //SEG57 [36] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1]
  b1_from_init_plot_tables:
  //SEG58 [36] phi (byte) init_plot_tables::bits#3 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 
    ldy #$80
  //SEG59 [36] phi (byte) init_plot_tables::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables->init_plot_tables::@1#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG60 [36] phi from init_plot_tables::@2 to init_plot_tables::@1 [phi:init_plot_tables::@2->init_plot_tables::@1]
  b1_from_b2:
  //SEG61 [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 
  //SEG62 [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
  //SEG63 init_plot_tables::@1
  b1:
  //SEG64 [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f8
  //SEG65 [38] *((const byte[256]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_xlo,x
  //SEG66 [39] *((const byte[256]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #>BITMAP
    sta plot_xhi,x
  //SEG67 [40] *((const byte[256]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy 
    tya
    sta plot_bit,x
  //SEG68 [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuyy=vbuyy_ror_1 
    tya
    lsr
    tay
  //SEG69 [42] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@10 -- vbuyy_neq_0_then_la1 
    cpy #0
    bne b10_from_b1
  //SEG70 [43] phi from init_plot_tables::@1 to init_plot_tables::@2 [phi:init_plot_tables::@1->init_plot_tables::@2]
  b2_from_b1:
  //SEG71 [43] phi (byte) init_plot_tables::bits#4 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables::@1->init_plot_tables::@2#0] -- vbuyy=vbuc1 
    ldy #$80
    jmp b2
  //SEG72 init_plot_tables::@2
  b2:
  //SEG73 [44] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG74 [45] if((byte) init_plot_tables::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1_from_b2
  //SEG75 [46] phi from init_plot_tables::@2 to init_plot_tables::@3 [phi:init_plot_tables::@2->init_plot_tables::@3]
  b3_from_b2:
  //SEG76 [46] phi (byte*) init_plot_tables::yoffs#2 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#0] -- pbuz1=pbuc1 
    lda #<0
    sta yoffs
    lda #>0
    sta yoffs+1
  //SEG77 [46] phi (byte) init_plot_tables::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b3
  //SEG78 [46] phi from init_plot_tables::@4 to init_plot_tables::@3 [phi:init_plot_tables::@4->init_plot_tables::@3]
  b3_from_b4:
  //SEG79 [46] 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 
  //SEG80 [46] 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
  //SEG81 init_plot_tables::@3
  b3:
  //SEG82 [47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuxx_band_vbuc1 
    txa
    and #7
    sta _6
  //SEG83 [48] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda yoffs
  //SEG84 [49] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7 -- vbuaa=vbuz1_bor_vbuaa 
    ora _6
  //SEG85 [50] *((const byte[256]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_ylo,x
  //SEG86 [51] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda yoffs+1
  //SEG87 [52] *((const byte[256]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_yhi,x
  //SEG88 [53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #7
  //SEG89 [54] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4 -- vbuaa_neq_vbuc1_then_la1 
    cmp #7
    bne b4_from_b3
    jmp b7
  //SEG90 init_plot_tables::@7
  b7:
  //SEG91 [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda yoffs
    adc #<$28*8
    sta yoffs
    lda yoffs+1
    adc #>$28*8
    sta yoffs+1
  //SEG92 [56] phi from init_plot_tables::@3 init_plot_tables::@7 to init_plot_tables::@4 [phi:init_plot_tables::@3/init_plot_tables::@7->init_plot_tables::@4]
  b4_from_b3:
  b4_from_b7:
  //SEG93 [56] phi (byte*) init_plot_tables::yoffs#4 = (byte*) init_plot_tables::yoffs#2 [phi:init_plot_tables::@3/init_plot_tables::@7->init_plot_tables::@4#0] -- register_copy 
    jmp b4
  //SEG94 init_plot_tables::@4
  b4:
  //SEG95 [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG96 [58] if((byte) init_plot_tables::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3_from_b4
    jmp breturn
  //SEG97 init_plot_tables::@return
  breturn:
  //SEG98 [59] return 
    rts
  //SEG99 [60] phi from init_plot_tables::@1 to init_plot_tables::@10 [phi:init_plot_tables::@1->init_plot_tables::@10]
  b10_from_b1:
    jmp b10
  //SEG100 init_plot_tables::@10
  b10:
  //SEG101 [43] phi from init_plot_tables::@10 to init_plot_tables::@2 [phi:init_plot_tables::@10->init_plot_tables::@2]
  b2_from_b10:
  //SEG102 [43] phi (byte) init_plot_tables::bits#4 = (byte) init_plot_tables::bits#1 [phi:init_plot_tables::@10->init_plot_tables::@2#0] -- register_copy 
    jmp b2
}
//SEG103 init_screen
init_screen: {
    .label b = 2
    .label c = 2
  //SEG104 [62] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1]
  b1_from_init_screen:
  //SEG105 [62] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta b
    lda #>BITMAP
    sta b+1
    jmp b1
  //SEG106 [62] phi from init_screen::@1 to init_screen::@1 [phi:init_screen::@1->init_screen::@1]
  b1_from_b1:
  //SEG107 [62] phi (byte*) init_screen::b#2 = (byte*) init_screen::b#1 [phi:init_screen::@1->init_screen::@1#0] -- register_copy 
    jmp b1
  //SEG108 init_screen::@1
  b1:
  //SEG109 [63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (b),y
  //SEG110 [64] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2 -- pbuz1=_inc_pbuz1 
    inc b
    bne !+
    inc b+1
  !:
  //SEG111 [65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192) goto init_screen::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda b+1
    cmp #>BITMAP+$2000
    bne b1_from_b1
    lda b
    cmp #<BITMAP+$2000
    bne b1_from_b1
  //SEG112 [66] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2]
  b2_from_b1:
  //SEG113 [66] phi (byte*) init_screen::c#2 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta c
    lda #>SCREEN
    sta c+1
    jmp b2
  //SEG114 [66] phi from init_screen::@2 to init_screen::@2 [phi:init_screen::@2->init_screen::@2]
  b2_from_b2:
  //SEG115 [66] phi (byte*) init_screen::c#2 = (byte*) init_screen::c#1 [phi:init_screen::@2->init_screen::@2#0] -- register_copy 
    jmp b2
  //SEG116 init_screen::@2
  b2:
  //SEG117 [67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20 -- _deref_pbuz1=vbuc1 
    lda #$14
    ldy #0
    sta (c),y
  //SEG118 [68] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 -- pbuz1=_inc_pbuz1 
    inc c
    bne !+
    inc c+1
  !:
  //SEG119 [69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024) goto init_screen::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda c+1
    cmp #>SCREEN+$400
    bne b2_from_b2
    lda c
    cmp #<SCREEN+$400
    bne b2_from_b2
    jmp breturn
  //SEG120 init_screen::@return
  breturn:
  //SEG121 [70] return 
    rts
}
  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 b5
Removing instruction jmp bend
Removing instruction jmp b5
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b7
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b7
Removing instruction jmp b4
Removing instruction jmp breturn
Removing instruction jmp b10
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction ldy x
Removing instruction ldy y
Removing instruction lda #>0
Replacing instruction ldx #0 with TAX
Replacing instruction ldy #0 with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b3 with b1
Replacing label b10_from_b1 with b10
Replacing label b1_from_b2 with b1
Replacing label b4_from_b3 with b4
Replacing label b3_from_b4 with b3
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b2_from_b2 with b2
Replacing label b2_from_b2 with b2
Removing instruction b5_from_bbegin:
Removing instruction b5:
Removing instruction bend_from_b5:
Removing instruction b5_from_main:
Removing instruction init_plot_tables_from_b5:
Removing instruction b1_from_b3:
Removing instruction b1_from_b2:
Removing instruction b3_from_b4:
Removing instruction b4_from_b3:
Removing instruction b4_from_b7:
Removing instruction b10_from_b1:
Removing instruction b2_from_b10:
Removing instruction b1_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction init_screen_from_main:
Removing instruction b5:
Removing instruction b3:
Removing instruction plots_from_b3:
Removing instruction b7:
Removing instruction b1_from_plots:
Removing instruction b3:
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 b7:
Removing instruction breturn:
Removing instruction b1_from_init_screen:
Removing instruction b2_from_b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to b2 in bne b10
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b10:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp b2
Succesful ASM optimization Pass5UnreachableCodeElimination

FINAL SYMBOL TABLE
(label) @5
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) 53280
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = ((byte*))(word/signed word/dword/signed dword) 8192
(byte) BMM
(const byte) BMM#0 BMM = (byte/signed byte/word/signed word/dword/signed dword) 32
(byte*) COLS
(byte) CSEL
(byte*) D011
(const byte*) D011#0 D011 = ((byte*))(word/dword/signed dword) 53265
(byte*) D016
(byte*) D018
(const byte*) D018#0 D018 = ((byte*))(word/dword/signed dword) 53272
(byte) DEN
(const byte) DEN#0 DEN = (byte/signed byte/word/signed word/dword/signed dword) 16
(byte) ECM
(byte*) FGCOL
(const byte*) FGCOL#0 FGCOL = ((byte*))(word/dword/signed dword) 53281
(byte) MCM
(byte*) RASTER
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
(byte) RSEL
(const byte) RSEL#0 RSEL = (byte/signed byte/word/signed word/dword/signed dword) 8
(byte) RST8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(void()) init_plot_tables()
(byte~) init_plot_tables::$0 reg byte a 22.0
(byte~) init_plot_tables::$10 reg byte a 22.0
(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:4 11.0
(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::@10
(label) init_plot_tables::@2
(label) init_plot_tables::@3
(label) init_plot_tables::@4
(label) init_plot_tables::@7
(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 6.0
(byte*) init_plot_tables::yoffs
(byte*) init_plot_tables::yoffs#1 yoffs zp ZP_WORD:2 22.0
(byte*) init_plot_tables::yoffs#2 yoffs zp ZP_WORD:2 6.111111111111112
(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_WORD:2 11.0
(void()) init_screen()
(label) init_screen::@1
(label) init_screen::@2
(label) init_screen::@return
(byte*) init_screen::b
(byte*) init_screen::b#1 b zp ZP_WORD:2 16.5
(byte*) init_screen::b#2 b zp ZP_WORD:2 16.5
(byte*) init_screen::c
(byte*) init_screen::c#1 c zp ZP_WORD:2 16.5
(byte*) init_screen::c#2 c zp ZP_WORD:2 16.5
(void()) main()
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@7
(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:2 3.0
(byte*) plot::plotter_x
(byte*) plot::plotter_x#1 plotter_x zp ZP_WORD:2 2.0
(byte*) plot::plotter_x#2 plotter_x zp ZP_WORD:2 0.8
(word) plot::plotter_y
(word) plot::plotter_y#1 plotter_y zp ZP_WORD:6 2.0
(word) plot::plotter_y#2 plotter_y zp ZP_WORD:6 4.0
(byte) plot::x
(byte) plot::x#0 x zp ZP_BYTE:4 9.727272727272727
(byte) plot::y
(byte) plot::y#0 y zp ZP_BYTE:5 15.000000000000002
(byte[256]) plot_bit
(const byte[256]) plot_bit#0 plot_bit = { fill( 256, 0) }
(byte[256]) plot_xhi
(const byte[256]) plot_xhi#0 plot_xhi = { fill( 256, 0) }
(byte[256]) plot_xlo
(const byte[256]) plot_xlo#0 plot_xlo = { fill( 256, 0) }
(byte[256]) plot_yhi
(const byte[256]) plot_yhi#0 plot_yhi = { fill( 256, 0) }
(byte[256]) plot_ylo
(const byte[256]) plot_ylo#0 plot_ylo = { fill( 256, 0) }
(void()) plots()
(label) plots::@1
(label) plots::@3
(label) plots::@return
(byte) plots::i
(byte) plots::i#1 reg byte x 151.5
(byte) plots::i#2 reg byte x 101.0
(byte) plots_cnt
(const byte) plots_cnt#0 plots_cnt = (byte/signed byte/word/signed word/dword/signed dword) 8
(byte[]) plots_x
(const byte[]) plots_x#0 plots_x = { (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 110, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 40, (byte/signed byte/word/signed word/dword/signed dword) 10, (byte/signed byte/word/signed word/dword/signed dword) 40 }
(byte[]) plots_y
(const byte[]) plots_y#0 plots_y = { (byte/signed byte/word/signed word/dword/signed dword) 10, (byte/signed byte/word/signed word/dword/signed dword) 40, (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 110, (byte/signed byte/word/signed word/dword/signed dword) 80, (byte/signed byte/word/signed word/dword/signed dword) 60, (byte/signed byte/word/signed word/dword/signed dword) 40 }

reg byte x [ plots::i#2 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_WORD:2 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ]
zp ZP_BYTE:4 [ plot::x#0 init_plot_tables::$6 ]
zp ZP_BYTE:5 [ plot::y#0 ]
reg byte a [ plot::$6 ]
reg byte a [ plot::$7 ]
reg byte a [ plot::$8 ]
zp ZP_WORD:6 [ plot::plotter_y#1 plot::plotter_y#2 ]
reg byte a [ plot::$9 ]
reg byte a [ plot::$5 ]
reg byte a [ init_plot_tables::$0 ]
reg byte a [ init_plot_tables::$7 ]
reg byte a [ init_plot_tables::$8 ]
reg byte a [ init_plot_tables::$9 ]
reg byte a [ init_plot_tables::$10 ]


FINAL ASSEMBLER
Score: 6201

//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 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
//SEG3 @begin
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
//SEG5 @5
//SEG6 [2] call main 
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
//SEG8 @end
//SEG9 main
main: {
  //SEG10 [4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta BGCOL
  //SEG11 [5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2 
    sta FGCOL
  //SEG12 [6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 -- _deref_pbuc1=vbuc2 
    lda #BMM|DEN|RSEL|3
    sta D011
  //SEG13 [7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) 64|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) 1024 -- _deref_pbuc1=vbuc2 
    lda #SCREEN/$40|BITMAP/$400
    sta D018
  //SEG14 [8] call init_screen 
  //SEG15 [61] phi from main to init_screen [phi:main->init_screen]
    jsr init_screen
  //SEG16 [9] phi from main to main::@5 [phi:main->main::@5]
  //SEG17 main::@5
  //SEG18 [10] call init_plot_tables 
  //SEG19 [35] phi from main::@5 to init_plot_tables [phi:main::@5->init_plot_tables]
    jsr init_plot_tables
  //SEG20 main::@2
  b2:
  //SEG21 [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b2
  //SEG22 main::@3
  //SEG23 [12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
  //SEG24 [13] call plots 
  //SEG25 [15] phi from main::@3 to plots [phi:main::@3->plots]
    jsr plots
  //SEG26 main::@7
  //SEG27 [14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
    jmp b2
}
//SEG28 plots
plots: {
  //SEG29 [16] phi from plots to plots::@1 [phi:plots->plots::@1]
  //SEG30 [16] phi (byte) plots::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:plots->plots::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG31 [16] phi from plots::@3 to plots::@1 [phi:plots::@3->plots::@1]
  //SEG32 [16] phi (byte) plots::i#2 = (byte) plots::i#1 [phi:plots::@3->plots::@1#0] -- register_copy 
  //SEG33 plots::@1
  b1:
  //SEG34 [17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#2) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_x,x
    sta plot.x
  //SEG35 [18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#2) -- vbuz1=pbuc1_derefidx_vbuxx 
    lda plots_y,x
    sta plot.y
  //SEG36 [19] call plot 
    jsr plot
  //SEG37 plots::@3
  //SEG38 [20] (byte) plots::i#1 ← ++ (byte) plots::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG39 [21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@1 -- vbuxx_lt_vbuc1_then_la1 
    cpx #plots_cnt
    bcc b1
  //SEG40 plots::@return
  //SEG41 [22] return 
    rts
}
//SEG42 plot
// plot(byte zeropage(4) x, byte zeropage(5) y)
plot: {
    .label x = 4
    .label y = 5
    .label plotter_x = 2
    .label plotter_y = 6
    .label plotter = 2
  //SEG43 [23] (byte~) plot::$6 ← *((const byte[256]) plot_xhi#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy x
    lda plot_xhi,y
  //SEG44 [24] (byte*) plot::plotter_x#1 ← ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$6 -- pbuz1=pbuc1_sethi_vbuaa 
    sta plotter_x+1
    lda #<0
    sta plotter_x
  //SEG45 [25] (byte~) plot::$7 ← *((const byte[256]) plot_xlo#0 + (byte) plot::x#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    lda plot_xlo,y
  //SEG46 [26] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$7 -- pbuz1=pbuz1_setlo_vbuaa 
    sta plotter_x
  //SEG47 [27] (byte~) plot::$8 ← *((const byte[256]) plot_yhi#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    ldy y
    lda plot_yhi,y
  //SEG48 [28] (word) plot::plotter_y#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 hi= (byte~) plot::$8 -- vwuz1=vbuc1_sethi_vbuaa 
    sta plotter_y+1
    lda #<0
    sta plotter_y
  //SEG49 [29] (byte~) plot::$9 ← *((const byte[256]) plot_ylo#0 + (byte) plot::y#0) -- vbuaa=pbuc1_derefidx_vbuz1 
    lda plot_ylo,y
  //SEG50 [30] (word) plot::plotter_y#2 ← (word) plot::plotter_y#1 lo= (byte~) plot::$9 -- vwuz1=vwuz1_setlo_vbuaa 
    sta plotter_y
  //SEG51 [31] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (word) plot::plotter_y#2 -- pbuz1=pbuz1_plus_vwuz2 
    lda plotter
    clc
    adc plotter_y
    sta plotter
    lda plotter+1
    adc plotter_y+1
    sta plotter+1
  //SEG52 [32] (byte~) plot::$5 ← *((byte*) plot::plotter#0) | *((const byte[256]) plot_bit#0 + (byte) plot::x#0) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 
    ldy #0
    lda (plotter),y
    ldy x
    ora plot_bit,y
  //SEG53 [33] *((byte*) plot::plotter#0) ← (byte~) plot::$5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (plotter),y
  //SEG54 plot::@return
  //SEG55 [34] return 
    rts
}
//SEG56 init_plot_tables
init_plot_tables: {
    .label _6 = 4
    .label yoffs = 2
  //SEG57 [36] phi from init_plot_tables to init_plot_tables::@1 [phi:init_plot_tables->init_plot_tables::@1]
  //SEG58 [36] phi (byte) init_plot_tables::bits#3 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables->init_plot_tables::@1#0] -- vbuyy=vbuc1 
    ldy #$80
  //SEG59 [36] phi (byte) init_plot_tables::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables->init_plot_tables::@1#1] -- vbuxx=vbuc1 
    ldx #0
  //SEG60 [36] phi from init_plot_tables::@2 to init_plot_tables::@1 [phi:init_plot_tables::@2->init_plot_tables::@1]
  //SEG61 [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 
  //SEG62 [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 
  //SEG63 init_plot_tables::@1
  b1:
  //SEG64 [37] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte/word/signed word/dword/signed dword) 248 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f8
  //SEG65 [38] *((const byte[256]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_xlo,x
  //SEG66 [39] *((const byte[256]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #>BITMAP
    sta plot_xhi,x
  //SEG67 [40] *((const byte[256]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy 
    tya
    sta plot_bit,x
  //SEG68 [41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuyy=vbuyy_ror_1 
    tya
    lsr
    tay
  //SEG69 [42] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@10 -- vbuyy_neq_0_then_la1 
    cpy #0
    bne b2
  //SEG70 [43] phi from init_plot_tables::@1 to init_plot_tables::@2 [phi:init_plot_tables::@1->init_plot_tables::@2]
  //SEG71 [43] phi (byte) init_plot_tables::bits#4 = (byte/word/signed word/dword/signed dword) 128 [phi:init_plot_tables::@1->init_plot_tables::@2#0] -- vbuyy=vbuc1 
    ldy #$80
  //SEG72 init_plot_tables::@2
  b2:
  //SEG73 [44] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG74 [45] if((byte) init_plot_tables::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1
  //SEG75 [46] phi from init_plot_tables::@2 to init_plot_tables::@3 [phi:init_plot_tables::@2->init_plot_tables::@3]
  //SEG76 [46] phi (byte*) init_plot_tables::yoffs#2 = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#0] -- pbuz1=pbuc1 
    lda #<0
    sta yoffs
    sta yoffs+1
  //SEG77 [46] phi (byte) init_plot_tables::y#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init_plot_tables::@2->init_plot_tables::@3#1] -- vbuxx=vbuc1 
    tax
  //SEG78 [46] phi from init_plot_tables::@4 to init_plot_tables::@3 [phi:init_plot_tables::@4->init_plot_tables::@3]
  //SEG79 [46] 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 
  //SEG80 [46] 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 
  //SEG81 init_plot_tables::@3
  b3:
  //SEG82 [47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuxx_band_vbuc1 
    txa
    and #7
    sta _6
  //SEG83 [48] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda yoffs
  //SEG84 [49] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7 -- vbuaa=vbuz1_bor_vbuaa 
    ora _6
  //SEG85 [50] *((const byte[256]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_ylo,x
  //SEG86 [51] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda yoffs+1
  //SEG87 [52] *((const byte[256]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta plot_yhi,x
  //SEG88 [53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #7
  //SEG89 [54] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4 -- vbuaa_neq_vbuc1_then_la1 
    cmp #7
    bne b4
  //SEG90 init_plot_tables::@7
  //SEG91 [55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda yoffs
    adc #<$28*8
    sta yoffs
    lda yoffs+1
    adc #>$28*8
    sta yoffs+1
  //SEG92 [56] phi from init_plot_tables::@3 init_plot_tables::@7 to init_plot_tables::@4 [phi:init_plot_tables::@3/init_plot_tables::@7->init_plot_tables::@4]
  //SEG93 [56] phi (byte*) init_plot_tables::yoffs#4 = (byte*) init_plot_tables::yoffs#2 [phi:init_plot_tables::@3/init_plot_tables::@7->init_plot_tables::@4#0] -- register_copy 
  //SEG94 init_plot_tables::@4
  b4:
  //SEG95 [57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG96 [58] if((byte) init_plot_tables::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3
  //SEG97 init_plot_tables::@return
  //SEG98 [59] return 
    rts
  //SEG99 [60] phi from init_plot_tables::@1 to init_plot_tables::@10 [phi:init_plot_tables::@1->init_plot_tables::@10]
  //SEG100 init_plot_tables::@10
  //SEG101 [43] phi from init_plot_tables::@10 to init_plot_tables::@2 [phi:init_plot_tables::@10->init_plot_tables::@2]
  //SEG102 [43] phi (byte) init_plot_tables::bits#4 = (byte) init_plot_tables::bits#1 [phi:init_plot_tables::@10->init_plot_tables::@2#0] -- register_copy 
}
//SEG103 init_screen
init_screen: {
    .label b = 2
    .label c = 2
  //SEG104 [62] phi from init_screen to init_screen::@1 [phi:init_screen->init_screen::@1]
  //SEG105 [62] phi (byte*) init_screen::b#2 = (const byte*) BITMAP#0 [phi:init_screen->init_screen::@1#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta b
    lda #>BITMAP
    sta b+1
  //SEG106 [62] phi from init_screen::@1 to init_screen::@1 [phi:init_screen::@1->init_screen::@1]
  //SEG107 [62] phi (byte*) init_screen::b#2 = (byte*) init_screen::b#1 [phi:init_screen::@1->init_screen::@1#0] -- register_copy 
  //SEG108 init_screen::@1
  b1:
  //SEG109 [63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (b),y
  //SEG110 [64] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2 -- pbuz1=_inc_pbuz1 
    inc b
    bne !+
    inc b+1
  !:
  //SEG111 [65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) 8192) goto init_screen::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda b+1
    cmp #>BITMAP+$2000
    bne b1
    lda b
    cmp #<BITMAP+$2000
    bne b1
  //SEG112 [66] phi from init_screen::@1 to init_screen::@2 [phi:init_screen::@1->init_screen::@2]
  //SEG113 [66] phi (byte*) init_screen::c#2 = (const byte*) SCREEN#0 [phi:init_screen::@1->init_screen::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta c
    lda #>SCREEN
    sta c+1
  //SEG114 [66] phi from init_screen::@2 to init_screen::@2 [phi:init_screen::@2->init_screen::@2]
  //SEG115 [66] phi (byte*) init_screen::c#2 = (byte*) init_screen::c#1 [phi:init_screen::@2->init_screen::@2#0] -- register_copy 
  //SEG116 init_screen::@2
  b2:
  //SEG117 [67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) 20 -- _deref_pbuz1=vbuc1 
    lda #$14
    ldy #0
    sta (c),y
  //SEG118 [68] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 -- pbuz1=_inc_pbuz1 
    inc c
    bne !+
    inc c+1
  !:
  //SEG119 [69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1024) goto init_screen::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda c+1
    cmp #>SCREEN+$400
    bne b2
    lda c
    cmp #<SCREEN+$400
    bne b2
  //SEG120 init_screen::@return
  //SEG121 [70] return 
    rts
}
  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

