Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean condition (number~) abs_u16::$1
Warning! Adding boolean cast to non-boolean condition (number~) sgn_u16::$1
Warning! Adding boolean cast to non-boolean sub-expression (byte) frame_cnt
Identified constant variable (byte*) BITMAP
Identified constant variable (byte*) SCREEN
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Inlined call (byte~) main::$5 ← call toD018 (byte*) SCREEN (byte*) BITMAP 
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) memset::@5
Culled Empty Block (label) memset::@3
Culled Empty Block (label) @7
Culled Empty Block (label) bitmap_init::@8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) @11
Culled Empty Block (label) @12
Culled Empty Block (label) @13
Culled Empty Block (label) main::toD0181_@1
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@10
Culled Empty Block (label) @16

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0
  (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
  (byte*) PROCPORT#0 ← ((byte*)) (number) 1
  (byte) PROCPORT_RAM_IO#0 ← (number) $35
  (byte*) RASTER#0 ← ((byte*)) (number) $d012
  (byte*) BGCOL#0 ← ((byte*)) (number) $d021
  (byte*) VIC_CONTROL#0 ← ((byte*)) (number) $d011
  (byte*) D011#0 ← ((byte*)) (number) $d011
  (byte) VIC_BMM#0 ← (number) $20
  (byte) VIC_DEN#0 ← (number) $10
  (byte) VIC_RSEL#0 ← (number) 8
  (byte*) D018#0 ← ((byte*)) (number) $d018
  (byte*) IRQ_STATUS#0 ← ((byte*)) (number) $d019
  (byte*) IRQ_ENABLE#0 ← ((byte*)) (number) $d01a
  (byte) IRQ_RASTER#0 ← (number) 1
  (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d
  (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
  (void()**) HARDWARE_IRQ#0 ← ((void()**)) (number) $fffe
  (byte) BLACK#0 ← (number) 0
  (byte) WHITE#0 ← (number) 1
  to:@8
memset: scope:[memset]  from bitmap_clear bitmap_clear::@1
  (byte) memset::c#4 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 )
  (void*) memset::str#4 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 )
  (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 )
  (bool~) memset::$0 ← (word) memset::num#2 > (number) 0
  (bool~) memset::$1 ← ! (bool~) memset::$0
  if((bool~) memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@4
  (void*) memset::str#2 ← phi( memset/(void*) memset::str#4 memset::@4/(void*) memset::str#5 )
  (void*) memset::return#0 ← (void*) memset::str#2
  to:memset::@return
memset::@2: scope:[memset]  from memset
  (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 )
  (word) memset::num#3 ← phi( memset/(word) memset::num#2 )
  (void*) memset::str#3 ← phi( memset/(void*) memset::str#4 )
  (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#3
  (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#3
  (byte*) memset::end#0 ← (byte*~) memset::$3
  (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#3
  to:memset::@4
memset::@4: scope:[memset]  from memset::@2 memset::@4
  (void*) memset::str#5 ← phi( memset::@2/(void*) memset::str#3 memset::@4/(void*) memset::str#5 )
  (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 )
  (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 )
  (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@4/(byte) memset::c#2 )
  *((byte*) memset::dst#2) ← (byte) memset::c#2
  (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1
  if((bool~) memset::$4) goto memset::@4
  to:memset::@1
memset::@return: scope:[memset]  from memset::@1
  (void*) memset::return#4 ← phi( memset::@1/(void*) memset::return#0 )
  (void*) memset::return#1 ← (void*) memset::return#4
  return 
  to:@return
@8: scope:[]  from @begin
  (byte*) bitmap_screen#0 ← (byte*) 0
  (byte*) bitmap_gfx#0 ← (byte*) 0
  (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) }
  (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) }
  (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) }
  to:@14
bitmap_init: scope:[bitmap_init]  from main
  (byte*) bitmap_init::screen#1 ← phi( main/(byte*) bitmap_init::screen#0 )
  (byte*) bitmap_init::gfx#1 ← phi( main/(byte*) bitmap_init::gfx#0 )
  (byte*) bitmap_gfx#1 ← (byte*) bitmap_init::gfx#1
  (byte*) bitmap_screen#1 ← (byte*) bitmap_init::screen#1
  (byte) bitmap_init::bits#0 ← (number) $80
  (byte) bitmap_init::x#0 ← (byte) 0
  to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init]  from bitmap_init bitmap_init::@2
  (byte*) bitmap_screen#29 ← phi( bitmap_init/(byte*) bitmap_screen#1 bitmap_init::@2/(byte*) bitmap_screen#25 )
  (byte*) bitmap_gfx#30 ← phi( bitmap_init/(byte*) bitmap_gfx#1 bitmap_init::@2/(byte*) bitmap_gfx#26 )
  (byte*) bitmap_init::gfx#4 ← phi( bitmap_init/(byte*) bitmap_init::gfx#1 bitmap_init::@2/(byte*) bitmap_init::gfx#3 )
  (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) bitmap_init::x#0 bitmap_init::@2/(byte) bitmap_init::x#1 )
  (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) bitmap_init::bits#0 bitmap_init::@2/(byte) bitmap_init::bits#4 )
  *((byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
  (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1
  (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0
  (bool~) bitmap_init::$1 ← ! (bool~) bitmap_init::$0
  if((bool~) bitmap_init::$1) goto bitmap_init::@2
  to:bitmap_init::@3
bitmap_init::@2: scope:[bitmap_init]  from bitmap_init::@1 bitmap_init::@3
  (byte*) bitmap_screen#25 ← phi( bitmap_init::@1/(byte*) bitmap_screen#29 bitmap_init::@3/(byte*) bitmap_screen#30 )
  (byte*) bitmap_gfx#26 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#30 bitmap_init::@3/(byte*) bitmap_gfx#31 )
  (byte*) bitmap_init::gfx#3 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 bitmap_init::@3/(byte*) bitmap_init::gfx#5 )
  (byte) bitmap_init::bits#4 ← phi( bitmap_init::@1/(byte) bitmap_init::bits#1 bitmap_init::@3/(byte) bitmap_init::bits#2 )
  (byte) bitmap_init::x#3 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 bitmap_init::@3/(byte) bitmap_init::x#4 )
  (byte) bitmap_init::x#1 ← (byte) bitmap_init::x#3 + rangenext(0,$ff)
  (bool~) bitmap_init::$2 ← (byte) bitmap_init::x#1 != rangelast(0,$ff)
  if((bool~) bitmap_init::$2) goto bitmap_init::@1
  to:bitmap_init::@4
bitmap_init::@3: scope:[bitmap_init]  from bitmap_init::@1
  (byte*) bitmap_screen#30 ← phi( bitmap_init::@1/(byte*) bitmap_screen#29 )
  (byte*) bitmap_gfx#31 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#30 )
  (byte*) bitmap_init::gfx#5 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 )
  (byte) bitmap_init::x#4 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 )
  (byte) bitmap_init::bits#2 ← (number) $80
  to:bitmap_init::@2
bitmap_init::@4: scope:[bitmap_init]  from bitmap_init::@2
  (byte*) bitmap_screen#20 ← phi( bitmap_init::@2/(byte*) bitmap_screen#25 )
  (byte*) bitmap_gfx#21 ← phi( bitmap_init::@2/(byte*) bitmap_gfx#26 )
  (byte*) bitmap_init::gfx#2 ← phi( bitmap_init::@2/(byte*) bitmap_init::gfx#3 )
  (byte*) bitmap_init::yoffs#0 ← (byte*) bitmap_init::gfx#2
  (byte) bitmap_init::y#0 ← (byte) 0
  to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init]  from bitmap_init::@4 bitmap_init::@6
  (byte*) bitmap_screen#15 ← phi( bitmap_init::@4/(byte*) bitmap_screen#20 bitmap_init::@6/(byte*) bitmap_screen#11 )
  (byte*) bitmap_gfx#16 ← phi( bitmap_init::@4/(byte*) bitmap_gfx#21 bitmap_init::@6/(byte*) bitmap_gfx#11 )
  (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 )
  (byte) bitmap_init::y#2 ← phi( bitmap_init::@4/(byte) bitmap_init::y#0 bitmap_init::@6/(byte) bitmap_init::y#1 )
  (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7
  (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
  (number~) bitmap_init::$5 ← (number~) bitmap_init::$3 | (byte~) bitmap_init::$4
  *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (number~) bitmap_init::$5
  (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
  *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
  (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (number) 7
  (bool~) bitmap_init::$8 ← (number~) bitmap_init::$7 == (number) 7
  (bool~) bitmap_init::$9 ← ! (bool~) bitmap_init::$8
  if((bool~) bitmap_init::$9) goto bitmap_init::@6
  to:bitmap_init::@7
bitmap_init::@6: scope:[bitmap_init]  from bitmap_init::@5 bitmap_init::@7
  (byte*) bitmap_screen#11 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 bitmap_init::@7/(byte*) bitmap_screen#16 )
  (byte*) bitmap_gfx#11 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 bitmap_init::@7/(byte*) bitmap_gfx#17 )
  (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 bitmap_init::@7/(byte*) bitmap_init::yoffs#1 )
  (byte) bitmap_init::y#3 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 bitmap_init::@7/(byte) bitmap_init::y#4 )
  (byte) bitmap_init::y#1 ← (byte) bitmap_init::y#3 + rangenext(0,$ff)
  (bool~) bitmap_init::$11 ← (byte) bitmap_init::y#1 != rangelast(0,$ff)
  if((bool~) bitmap_init::$11) goto bitmap_init::@5
  to:bitmap_init::@return
bitmap_init::@7: scope:[bitmap_init]  from bitmap_init::@5
  (byte*) bitmap_screen#16 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 )
  (byte*) bitmap_gfx#17 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 )
  (byte) bitmap_init::y#4 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 )
  (byte*) bitmap_init::yoffs#3 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 )
  (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8
  (byte*) bitmap_init::yoffs#1 ← (byte*~) bitmap_init::$10
  to:bitmap_init::@6
bitmap_init::@return: scope:[bitmap_init]  from bitmap_init::@6
  (byte*) bitmap_screen#6 ← phi( bitmap_init::@6/(byte*) bitmap_screen#11 )
  (byte*) bitmap_gfx#6 ← phi( bitmap_init::@6/(byte*) bitmap_gfx#11 )
  (byte*) bitmap_gfx#2 ← (byte*) bitmap_gfx#6
  (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6
  return 
  to:@return
bitmap_clear: scope:[bitmap_clear]  from main::@12
  (byte*) bitmap_gfx#12 ← phi( main::@12/(byte*) bitmap_gfx#3 )
  (byte*) bitmap_screen#7 ← phi( main::@12/(byte*) bitmap_screen#3 )
  (byte) bitmap_clear::bgcol#1 ← phi( main::@12/(byte) bitmap_clear::bgcol#0 )
  (byte) bitmap_clear::fgcol#1 ← phi( main::@12/(byte) bitmap_clear::fgcol#0 )
  (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10
  (number~) bitmap_clear::$1 ← (number~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1
  (byte) bitmap_clear::col#0 ← (number~) bitmap_clear::$1
  (void*) memset::str#0 ← (void*)(byte*) bitmap_screen#7
  (byte) memset::c#0 ← (byte) bitmap_clear::col#0
  (word) memset::num#0 ← (word) $3e8
  call memset 
  (void*) memset::return#2 ← (void*) memset::return#1
  to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear]  from bitmap_clear
  (byte*) bitmap_gfx#7 ← phi( bitmap_clear/(byte*) bitmap_gfx#12 )
  (void*) memset::str#1 ← (void*)(byte*) bitmap_gfx#7
  (byte) memset::c#1 ← (number) 0
  (word) memset::num#1 ← (word) $1f40
  call memset 
  (void*) memset::return#3 ← (void*) memset::return#1
  to:bitmap_clear::@2
bitmap_clear::@2: scope:[bitmap_clear]  from bitmap_clear::@1
  to:bitmap_clear::@return
bitmap_clear::@return: scope:[bitmap_clear]  from bitmap_clear::@2
  return 
  to:@return
bitmap_plot: scope:[bitmap_plot]  from main::@2
  (word) bitmap_plot::x#1 ← phi( main::@2/(word) bitmap_plot::x#0 )
  (byte) bitmap_plot::y#1 ← phi( main::@2/(byte) bitmap_plot::y#0 )
  (byte*~) bitmap_plot::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#1), *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#1) }
  (byte*) bitmap_plot::plotter#0 ← (byte*~) bitmap_plot::$0
  (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (number) $fff8
  (byte*) bitmap_plot::plotter#1 ← (byte*) bitmap_plot::plotter#0 + (number~) bitmap_plot::$1
  (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#1
  *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
  to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot]  from bitmap_plot
  return 
  to:@return
@14: scope:[]  from @8
  (byte*) bitmap_screen#24 ← phi( @8/(byte*) bitmap_screen#0 )
  (byte*) bitmap_gfx#25 ← phi( @8/(byte*) bitmap_gfx#0 )
  (byte*) BITMAP#0 ← ((byte*)) (number) $2000
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) }
  to:@15
main: scope:[main]  from @17
  (byte) frame_cnt#21 ← phi( @17/(byte) frame_cnt#9 )
  (byte*) bitmap_screen#12 ← phi( @17/(byte*) bitmap_screen#14 )
  (byte*) bitmap_gfx#13 ← phi( @17/(byte*) bitmap_gfx#15 )
  (byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0
  (byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0
  call bitmap_init 
  to:main::@12
main::@12: scope:[main]  from main
  (byte) frame_cnt#20 ← phi( main/(byte) frame_cnt#21 )
  (byte*) bitmap_screen#8 ← phi( main/(byte*) bitmap_screen#2 )
  (byte*) bitmap_gfx#8 ← phi( main/(byte*) bitmap_gfx#2 )
  (byte*) bitmap_gfx#3 ← (byte*) bitmap_gfx#8
  (byte*) bitmap_screen#3 ← (byte*) bitmap_screen#8
  (byte) bitmap_clear::bgcol#0 ← (byte) BLACK#0
  (byte) bitmap_clear::fgcol#0 ← (byte) WHITE#0
  call bitmap_clear 
  to:main::@13
main::@13: scope:[main]  from main::@12
  (byte) frame_cnt#19 ← phi( main::@12/(byte) frame_cnt#20 )
  (byte*) bitmap_screen#33 ← phi( main::@12/(byte*) bitmap_screen#3 )
  (byte*) bitmap_gfx#34 ← phi( main::@12/(byte*) bitmap_gfx#3 )
  (byte~) main::$2 ← (byte) VIC_BMM#0 | (byte) VIC_DEN#0
  (byte~) main::$3 ← (byte~) main::$2 | (byte) VIC_RSEL#0
  (number~) main::$4 ← (byte~) main::$3 | (number) 3
  *((byte*) D011#0) ← (number~) main::$4
  (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0
  (byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0
  to:main::toD0181
main::toD0181: scope:[main]  from main::@13
  (byte) frame_cnt#18 ← phi( main::@13/(byte) frame_cnt#19 )
  (byte*) bitmap_screen#31 ← phi( main::@13/(byte*) bitmap_screen#33 )
  (byte*) bitmap_gfx#32 ← phi( main::@13/(byte*) bitmap_gfx#34 )
  (byte*) main::toD0181_gfx#1 ← phi( main::@13/(byte*) main::toD0181_gfx#0 )
  (byte*) main::toD0181_screen#1 ← phi( main::@13/(byte*) main::toD0181_screen#0 )
  (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1
  (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff
  (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4
  (number~) main::toD0181_$3#0 ← > (number~) main::toD0181_$2#0
  (word~) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1
  (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0
  (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4
  (number~) main::toD0181_$7#0 ← (number~) main::toD0181_$6#0 & (number) $f
  (number~) main::toD0181_$8#0 ← (number~) main::toD0181_$3#0 | (number~) main::toD0181_$7#0
  (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0
  to:main::toD0181_@return
main::toD0181_@return: scope:[main]  from main::toD0181
  (byte) frame_cnt#17 ← phi( main::toD0181/(byte) frame_cnt#18 )
  (byte*) bitmap_screen#26 ← phi( main::toD0181/(byte*) bitmap_screen#31 )
  (byte*) bitmap_gfx#27 ← phi( main::toD0181/(byte*) bitmap_gfx#32 )
  (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 )
  (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2
  to:main::@11
main::@11: scope:[main]  from main::toD0181_@return
  (byte) frame_cnt#16 ← phi( main::toD0181_@return/(byte) frame_cnt#17 )
  (byte*) bitmap_screen#21 ← phi( main::toD0181_@return/(byte*) bitmap_screen#26 )
  (byte*) bitmap_gfx#22 ← phi( main::toD0181_@return/(byte*) bitmap_gfx#27 )
  (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 )
  (byte~) main::$5 ← (byte) main::toD0181_return#3
  *((byte*) D018#0) ← (byte~) main::$5
  call init_irq 
  to:main::@14
main::@14: scope:[main]  from main::@11
  (byte) frame_cnt#15 ← phi( main::@11/(byte) frame_cnt#16 )
  (byte*) bitmap_screen#17 ← phi( main::@11/(byte*) bitmap_screen#21 )
  (byte*) bitmap_gfx#18 ← phi( main::@11/(byte*) bitmap_gfx#22 )
  (word) main::x#0 ← (number) 0
  (byte) main::y#0 ← (number) 0
  (word) main::vx#0 ← (number) 1
  (byte) main::vy#0 ← (number) 1
  to:main::@1
main::@1: scope:[main]  from main::@14 main::@5
  (byte) frame_cnt#14 ← phi( main::@14/(byte) frame_cnt#15 main::@5/(byte) frame_cnt#3 )
  (byte) main::vy#6 ← phi( main::@14/(byte) main::vy#0 main::@5/(byte) main::vy#8 )
  (word) main::vx#5 ← phi( main::@14/(word) main::vx#0 main::@5/(word) main::vx#6 )
  (byte*) bitmap_screen#13 ← phi( main::@14/(byte*) bitmap_screen#17 main::@5/(byte*) bitmap_screen#18 )
  (byte*) bitmap_gfx#14 ← phi( main::@14/(byte*) bitmap_gfx#18 main::@5/(byte*) bitmap_gfx#19 )
  (byte) main::y#5 ← phi( main::@14/(byte) main::y#0 main::@5/(byte) main::y#7 )
  (word) main::x#4 ← phi( main::@14/(word) main::x#0 main::@5/(word) main::x#5 )
  if(true) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  (byte*) bitmap_screen#32 ← phi( main::@1/(byte*) bitmap_screen#13 )
  (byte*) bitmap_gfx#33 ← phi( main::@1/(byte*) bitmap_gfx#14 )
  (byte) frame_cnt#13 ← phi( main::@1/(byte) frame_cnt#14 )
  (byte) main::vy#4 ← phi( main::@1/(byte) main::vy#6 )
  (word) main::vx#4 ← phi( main::@1/(word) main::vx#5 )
  (byte) main::y#2 ← phi( main::@1/(byte) main::y#5 )
  (word) main::x#2 ← phi( main::@1/(word) main::x#4 )
  (word) bitmap_plot::x#0 ← (word) main::x#2
  (byte) bitmap_plot::y#0 ← (byte) main::y#2
  call bitmap_plot 
  to:main::@15
main::@15: scope:[main]  from main::@2
  (byte*) bitmap_screen#27 ← phi( main::@2/(byte*) bitmap_screen#32 )
  (byte*) bitmap_gfx#28 ← phi( main::@2/(byte*) bitmap_gfx#33 )
  (byte) frame_cnt#11 ← phi( main::@2/(byte) frame_cnt#13 )
  (byte) main::vy#2 ← phi( main::@2/(byte) main::vy#4 )
  (byte) main::y#3 ← phi( main::@2/(byte) main::y#2 )
  (word) main::vx#2 ← phi( main::@2/(word) main::vx#4 )
  (word) main::x#3 ← phi( main::@2/(word) main::x#2 )
  (word) main::x#1 ← (word) main::x#3 + (word) main::vx#2
  (byte) main::y#1 ← (byte) main::y#3 + (byte) main::vy#2
  (bool~) main::$8 ← (word) main::x#1 == (number) $13f
  (bool~) main::$9 ← (word) main::x#1 == (number) 0
  (bool~) main::$10 ← (bool~) main::$8 || (bool~) main::$9
  (bool~) main::$11 ← ! (bool~) main::$10
  if((bool~) main::$11) goto main::@4
  to:main::@8
main::@4: scope:[main]  from main::@15 main::@8
  (word) main::vx#7 ← phi( main::@15/(word) main::vx#2 main::@8/(word) main::vx#1 )
  (byte*) bitmap_screen#22 ← phi( main::@15/(byte*) bitmap_screen#27 main::@8/(byte*) bitmap_screen#28 )
  (byte*) bitmap_gfx#23 ← phi( main::@15/(byte*) bitmap_gfx#28 main::@8/(byte*) bitmap_gfx#29 )
  (word) main::x#6 ← phi( main::@15/(word) main::x#1 main::@8/(word) main::x#8 )
  (byte) main::vy#5 ← phi( main::@15/(byte) main::vy#2 main::@8/(byte) main::vy#7 )
  (byte) frame_cnt#7 ← phi( main::@15/(byte) frame_cnt#11 main::@8/(byte) frame_cnt#12 )
  (byte) main::y#4 ← phi( main::@15/(byte) main::y#1 main::@8/(byte) main::y#6 )
  (bool~) main::$13 ← (byte) main::y#4 == (number) $c7
  (bool~) main::$14 ← (byte) main::y#4 == (number) 0
  (bool~) main::$15 ← (bool~) main::$13 || (bool~) main::$14
  (bool~) main::$16 ← ! (bool~) main::$15
  if((bool~) main::$16) goto main::@5
  to:main::@9
main::@8: scope:[main]  from main::@15
  (byte*) bitmap_screen#28 ← phi( main::@15/(byte*) bitmap_screen#27 )
  (byte*) bitmap_gfx#29 ← phi( main::@15/(byte*) bitmap_gfx#28 )
  (word) main::x#8 ← phi( main::@15/(word) main::x#1 )
  (byte) main::vy#7 ← phi( main::@15/(byte) main::vy#2 )
  (byte) frame_cnt#12 ← phi( main::@15/(byte) frame_cnt#11 )
  (byte) main::y#6 ← phi( main::@15/(byte) main::y#1 )
  (word) main::vx#3 ← phi( main::@15/(word) main::vx#2 )
  (word~) main::$12 ← - (word) main::vx#3
  (word) main::vx#1 ← (word~) main::$12
  to:main::@4
main::@5: scope:[main]  from main::@4 main::@9
  (byte) main::vy#8 ← phi( main::@4/(byte) main::vy#5 main::@9/(byte) main::vy#1 )
  (word) main::vx#6 ← phi( main::@4/(word) main::vx#7 main::@9/(word) main::vx#8 )
  (byte*) bitmap_screen#18 ← phi( main::@4/(byte*) bitmap_screen#22 main::@9/(byte*) bitmap_screen#23 )
  (byte*) bitmap_gfx#19 ← phi( main::@4/(byte*) bitmap_gfx#23 main::@9/(byte*) bitmap_gfx#24 )
  (byte) main::y#7 ← phi( main::@4/(byte) main::y#4 main::@9/(byte) main::y#8 )
  (word) main::x#5 ← phi( main::@4/(word) main::x#6 main::@9/(word) main::x#7 )
  (byte) frame_cnt#3 ← phi( main::@4/(byte) frame_cnt#7 main::@9/(byte) frame_cnt#8 )
  *((byte[$100]) plots_per_frame#0 + (byte) frame_cnt#3) ← ++ *((byte[$100]) plots_per_frame#0 + (byte) frame_cnt#3)
  to:main::@1
main::@9: scope:[main]  from main::@4
  (word) main::vx#8 ← phi( main::@4/(word) main::vx#7 )
  (byte*) bitmap_screen#23 ← phi( main::@4/(byte*) bitmap_screen#22 )
  (byte*) bitmap_gfx#24 ← phi( main::@4/(byte*) bitmap_gfx#23 )
  (byte) main::y#8 ← phi( main::@4/(byte) main::y#4 )
  (word) main::x#7 ← phi( main::@4/(word) main::x#6 )
  (byte) frame_cnt#8 ← phi( main::@4/(byte) frame_cnt#7 )
  (byte) main::vy#3 ← phi( main::@4/(byte) main::vy#5 )
  (byte~) main::$17 ← - (byte) main::vy#3
  (byte) main::vy#1 ← (byte~) main::$17
  to:main::@5
main::@return: scope:[main]  from main::@1
  (byte*) bitmap_screen#9 ← phi( main::@1/(byte*) bitmap_screen#13 )
  (byte*) bitmap_gfx#9 ← phi( main::@1/(byte*) bitmap_gfx#14 )
  (byte*) bitmap_gfx#4 ← (byte*) bitmap_gfx#9
  (byte*) bitmap_screen#4 ← (byte*) bitmap_screen#9
  return 
  to:@return
@15: scope:[]  from @14
  (byte*) bitmap_screen#19 ← phi( @14/(byte*) bitmap_screen#24 )
  (byte*) bitmap_gfx#20 ← phi( @14/(byte*) bitmap_gfx#25 )
  (byte) frame_cnt#0 ← (number) 1
  to:@17
init_irq: scope:[init_irq]  from main::@11
  asm { sei  }
  *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0
  *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0
  *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0
  *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80
  *((byte*) RASTER#0) ← (number) 0
  *((byte*) IRQ_ENABLE#0) ← (byte) IRQ_RASTER#0
  (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq()
  *((void()**) HARDWARE_IRQ#0) ← (void()*~) init_irq::$0
  asm { cli  }
  to:init_irq::@return
init_irq::@return: scope:[init_irq]  from init_irq
  return 
  to:@return
irq: scope:[irq]  from
  (byte) frame_cnt#4 ← phi( @17/(byte) frame_cnt#9 )
  *((byte*) BGCOL#0) ← (byte) WHITE#0
  (bool~) irq::$1 ← (number) 0 != (byte) frame_cnt#4
  (bool~) irq::$0 ← ! (bool~) irq::$1
  if((bool~) irq::$0) goto irq::@1
  to:irq::@2
irq::@1: scope:[irq]  from irq irq::@2
  (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#4 irq::@2/(byte) frame_cnt#1 )
  *((byte*) BGCOL#0) ← (byte) BLACK#0
  *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0
  to:irq::@return
irq::@2: scope:[irq]  from irq
  (byte) frame_cnt#5 ← phi( irq/(byte) frame_cnt#4 )
  (byte) frame_cnt#1 ← ++ (byte) frame_cnt#5
  to:irq::@1
irq::@return: scope:[irq]  from irq::@1
  (byte) frame_cnt#6 ← phi( irq::@1/(byte) frame_cnt#10 )
  (byte) frame_cnt#2 ← (byte) frame_cnt#6
  return 
  to:@return
@17: scope:[]  from @15
  (byte*) bitmap_screen#14 ← phi( @15/(byte*) bitmap_screen#19 )
  (byte*) bitmap_gfx#15 ← phi( @15/(byte*) bitmap_gfx#20 )
  (byte) frame_cnt#9 ← phi( @15/(byte) frame_cnt#0 )
  call main 
  to:@18
@18: scope:[]  from @17
  (byte*) bitmap_screen#10 ← phi( @17/(byte*) bitmap_screen#4 )
  (byte*) bitmap_gfx#10 ← phi( @17/(byte*) bitmap_gfx#4 )
  (byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#10
  (byte*) bitmap_screen#5 ← (byte*) bitmap_screen#10
  to:@end
@end: scope:[]  from @18

SYMBOL TABLE SSA
(label) @14
(label) @15
(label) @17
(label) @18
(label) @8
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) BITMAP
(byte*) BITMAP#0
(byte) BLACK
(byte) BLACK#0
(byte*) CIA1_INTERRUPT
(byte*) CIA1_INTERRUPT#0
(byte) CIA_INTERRUPT_CLEAR
(byte) CIA_INTERRUPT_CLEAR#0
(byte*) D011
(byte*) D011#0
(byte*) D018
(byte*) D018#0
(void()**) HARDWARE_IRQ
(void()**) HARDWARE_IRQ#0
(byte*) IRQ_ENABLE
(byte*) IRQ_ENABLE#0
(byte) IRQ_RASTER
(byte) IRQ_RASTER#0
(byte*) IRQ_STATUS
(byte*) IRQ_STATUS#0
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte*) PROCPORT_DDR
(byte*) PROCPORT_DDR#0
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_DDR_MEMORY_MASK#0
(byte) PROCPORT_RAM_IO
(byte) PROCPORT_RAM_IO#0
(byte*) RASTER
(byte*) RASTER#0
(byte*) SCREEN
(byte*) SCREEN#0
(byte) VIC_BMM
(byte) VIC_BMM#0
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL#0
(byte) VIC_DEN
(byte) VIC_DEN#0
(byte) VIC_RSEL
(byte) VIC_RSEL#0
(byte) WHITE
(byte) WHITE#0
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(number~) bitmap_clear::$0
(number~) bitmap_clear::$1
(label) bitmap_clear::@1
(label) bitmap_clear::@2
(label) bitmap_clear::@return
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::bgcol#0
(byte) bitmap_clear::bgcol#1
(byte) bitmap_clear::col
(byte) bitmap_clear::col#0
(byte) bitmap_clear::fgcol
(byte) bitmap_clear::fgcol#0
(byte) bitmap_clear::fgcol#1
(byte*) bitmap_gfx
(byte*) bitmap_gfx#0
(byte*) bitmap_gfx#1
(byte*) bitmap_gfx#10
(byte*) bitmap_gfx#11
(byte*) bitmap_gfx#12
(byte*) bitmap_gfx#13
(byte*) bitmap_gfx#14
(byte*) bitmap_gfx#15
(byte*) bitmap_gfx#16
(byte*) bitmap_gfx#17
(byte*) bitmap_gfx#18
(byte*) bitmap_gfx#19
(byte*) bitmap_gfx#2
(byte*) bitmap_gfx#20
(byte*) bitmap_gfx#21
(byte*) bitmap_gfx#22
(byte*) bitmap_gfx#23
(byte*) bitmap_gfx#24
(byte*) bitmap_gfx#25
(byte*) bitmap_gfx#26
(byte*) bitmap_gfx#27
(byte*) bitmap_gfx#28
(byte*) bitmap_gfx#29
(byte*) bitmap_gfx#3
(byte*) bitmap_gfx#30
(byte*) bitmap_gfx#31
(byte*) bitmap_gfx#32
(byte*) bitmap_gfx#33
(byte*) bitmap_gfx#34
(byte*) bitmap_gfx#4
(byte*) bitmap_gfx#5
(byte*) bitmap_gfx#6
(byte*) bitmap_gfx#7
(byte*) bitmap_gfx#8
(byte*) bitmap_gfx#9
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(bool~) bitmap_init::$0
(bool~) bitmap_init::$1
(byte*~) bitmap_init::$10
(bool~) bitmap_init::$11
(bool~) bitmap_init::$2
(number~) bitmap_init::$3
(byte~) bitmap_init::$4
(number~) bitmap_init::$5
(byte~) bitmap_init::$6
(number~) bitmap_init::$7
(bool~) bitmap_init::$8
(bool~) bitmap_init::$9
(label) bitmap_init::@1
(label) bitmap_init::@2
(label) bitmap_init::@3
(label) bitmap_init::@4
(label) bitmap_init::@5
(label) bitmap_init::@6
(label) bitmap_init::@7
(label) bitmap_init::@return
(byte) bitmap_init::bits
(byte) bitmap_init::bits#0
(byte) bitmap_init::bits#1
(byte) bitmap_init::bits#2
(byte) bitmap_init::bits#3
(byte) bitmap_init::bits#4
(byte*) bitmap_init::gfx
(byte*) bitmap_init::gfx#0
(byte*) bitmap_init::gfx#1
(byte*) bitmap_init::gfx#2
(byte*) bitmap_init::gfx#3
(byte*) bitmap_init::gfx#4
(byte*) bitmap_init::gfx#5
(byte*) bitmap_init::screen
(byte*) bitmap_init::screen#0
(byte*) bitmap_init::screen#1
(byte) bitmap_init::x
(byte) bitmap_init::x#0
(byte) bitmap_init::x#1
(byte) bitmap_init::x#2
(byte) bitmap_init::x#3
(byte) bitmap_init::x#4
(byte) bitmap_init::y
(byte) bitmap_init::y#0
(byte) bitmap_init::y#1
(byte) bitmap_init::y#2
(byte) bitmap_init::y#3
(byte) bitmap_init::y#4
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#0
(byte*) bitmap_init::yoffs#1
(byte*) bitmap_init::yoffs#2
(byte*) bitmap_init::yoffs#3
(byte*) bitmap_init::yoffs#4
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(byte*~) bitmap_plot::$0
(number~) bitmap_plot::$1
(byte~) bitmap_plot::$2
(label) bitmap_plot::@return
(byte*) bitmap_plot::plotter
(byte*) bitmap_plot::plotter#0
(byte*) bitmap_plot::plotter#1
(word) bitmap_plot::x
(word) bitmap_plot::x#0
(word) bitmap_plot::x#1
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0
(byte) bitmap_plot::y#1
(byte[$100]) bitmap_plot_bit
(byte[$100]) bitmap_plot_bit#0
(byte[$100]) bitmap_plot_yhi
(byte[$100]) bitmap_plot_yhi#0
(byte[$100]) bitmap_plot_ylo
(byte[$100]) bitmap_plot_ylo#0
(byte*) bitmap_screen
(byte*) bitmap_screen#0
(byte*) bitmap_screen#1
(byte*) bitmap_screen#10
(byte*) bitmap_screen#11
(byte*) bitmap_screen#12
(byte*) bitmap_screen#13
(byte*) bitmap_screen#14
(byte*) bitmap_screen#15
(byte*) bitmap_screen#16
(byte*) bitmap_screen#17
(byte*) bitmap_screen#18
(byte*) bitmap_screen#19
(byte*) bitmap_screen#2
(byte*) bitmap_screen#20
(byte*) bitmap_screen#21
(byte*) bitmap_screen#22
(byte*) bitmap_screen#23
(byte*) bitmap_screen#24
(byte*) bitmap_screen#25
(byte*) bitmap_screen#26
(byte*) bitmap_screen#27
(byte*) bitmap_screen#28
(byte*) bitmap_screen#29
(byte*) bitmap_screen#3
(byte*) bitmap_screen#30
(byte*) bitmap_screen#31
(byte*) bitmap_screen#32
(byte*) bitmap_screen#33
(byte*) bitmap_screen#4
(byte*) bitmap_screen#5
(byte*) bitmap_screen#6
(byte*) bitmap_screen#7
(byte*) bitmap_screen#8
(byte*) bitmap_screen#9
(byte) frame_cnt
(byte) frame_cnt#0
(byte) frame_cnt#1
(byte) frame_cnt#10
(byte) frame_cnt#11
(byte) frame_cnt#12
(byte) frame_cnt#13
(byte) frame_cnt#14
(byte) frame_cnt#15
(byte) frame_cnt#16
(byte) frame_cnt#17
(byte) frame_cnt#18
(byte) frame_cnt#19
(byte) frame_cnt#2
(byte) frame_cnt#20
(byte) frame_cnt#21
(byte) frame_cnt#3
(byte) frame_cnt#4
(byte) frame_cnt#5
(byte) frame_cnt#6
(byte) frame_cnt#7
(byte) frame_cnt#8
(byte) frame_cnt#9
(void()) init_irq()
(void()*~) init_irq::$0
(label) init_irq::@return
interrupt(HARDWARE_CLOBBER)(void()) irq()
(bool~) irq::$0
(bool~) irq::$1
(label) irq::@1
(label) irq::@2
(label) irq::@return
(void()) main()
(bool~) main::$10
(bool~) main::$11
(word~) main::$12
(bool~) main::$13
(bool~) main::$14
(bool~) main::$15
(bool~) main::$16
(byte~) main::$17
(byte~) main::$2
(byte~) main::$3
(number~) main::$4
(byte~) main::$5
(bool~) main::$8
(bool~) main::$9
(label) main::@1
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@2
(label) main::@4
(label) main::@5
(label) main::@8
(label) main::@9
(label) main::@return
(label) main::toD0181
(word~) main::toD0181_$0
(word~) main::toD0181_$0#0
(number~) main::toD0181_$1
(number~) main::toD0181_$1#0
(number~) main::toD0181_$2
(number~) main::toD0181_$2#0
(number~) main::toD0181_$3
(number~) main::toD0181_$3#0
(word~) main::toD0181_$4
(word~) main::toD0181_$4#0
(byte~) main::toD0181_$5
(byte~) main::toD0181_$5#0
(number~) main::toD0181_$6
(number~) main::toD0181_$6#0
(number~) main::toD0181_$7
(number~) main::toD0181_$7#0
(number~) main::toD0181_$8
(number~) main::toD0181_$8#0
(label) main::toD0181_@return
(byte*) main::toD0181_gfx
(byte*) main::toD0181_gfx#0
(byte*) main::toD0181_gfx#1
(byte) main::toD0181_return
(byte) main::toD0181_return#0
(byte) main::toD0181_return#1
(byte) main::toD0181_return#2
(byte) main::toD0181_return#3
(byte*) main::toD0181_screen
(byte*) main::toD0181_screen#0
(byte*) main::toD0181_screen#1
(word) main::vx
(word) main::vx#0
(word) main::vx#1
(word) main::vx#2
(word) main::vx#3
(word) main::vx#4
(word) main::vx#5
(word) main::vx#6
(word) main::vx#7
(word) main::vx#8
(byte) main::vy
(byte) main::vy#0
(byte) main::vy#1
(byte) main::vy#2
(byte) main::vy#3
(byte) main::vy#4
(byte) main::vy#5
(byte) main::vy#6
(byte) main::vy#7
(byte) main::vy#8
(word) main::x
(word) main::x#0
(word) main::x#1
(word) main::x#2
(word) main::x#3
(word) main::x#4
(word) main::x#5
(word) main::x#6
(word) main::x#7
(word) main::x#8
(byte) main::y
(byte) main::y#0
(byte) main::y#1
(byte) main::y#2
(byte) main::y#3
(byte) main::y#4
(byte) main::y#5
(byte) main::y#6
(byte) main::y#7
(byte) main::y#8
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(bool~) memset::$0
(bool~) memset::$1
(byte*~) memset::$2
(byte*~) memset::$3
(bool~) memset::$4
(label) memset::@1
(label) memset::@2
(label) memset::@4
(label) memset::@return
(byte) memset::c
(byte) memset::c#0
(byte) memset::c#1
(byte) memset::c#2
(byte) memset::c#3
(byte) memset::c#4
(byte*) memset::dst
(byte*) memset::dst#0
(byte*) memset::dst#1
(byte*) memset::dst#2
(byte*) memset::end
(byte*) memset::end#0
(byte*) memset::end#1
(word) memset::num
(word) memset::num#0
(word) memset::num#1
(word) memset::num#2
(word) memset::num#3
(void*) memset::return
(void*) memset::return#0
(void*) memset::return#1
(void*) memset::return#2
(void*) memset::return#3
(void*) memset::return#4
(void*) memset::str
(void*) memset::str#0
(void*) memset::str#1
(void*) memset::str#2
(void*) memset::str#3
(void*) memset::str#4
(void*) memset::str#5
(byte[$100]) plots_per_frame
(byte[$100]) plots_per_frame#0

Fixing inline constructor with bitmap_plot::$3 ← (byte)*(bitmap_plot_yhi#0 + bitmap_plot::y#1) w= (byte)*(bitmap_plot_ylo#0 + bitmap_plot::y#1)
Successful SSA optimization Pass2FixInlineConstructorsNew
Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7
Adding number conversion cast (unumber) $35 in (byte) PROCPORT_RAM_IO#0 ← (number) $35
Adding number conversion cast (unumber) $20 in (byte) VIC_BMM#0 ← (number) $20
Adding number conversion cast (unumber) $10 in (byte) VIC_DEN#0 ← (number) $10
Adding number conversion cast (unumber) 8 in (byte) VIC_RSEL#0 ← (number) 8
Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1
Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f
Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1
Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#2 > (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80
Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1
Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0
Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#2 ← (number) $80
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$3 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) bitmap_init::$5 in (number~) bitmap_init::$5 ← (unumber~) bitmap_init::$3 | (byte~) bitmap_init::$4
Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (number) 7
Adding number conversion cast (unumber) bitmap_init::$7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (unumber)(number) 7
Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$8 ← (unumber~) bitmap_init::$7 == (number) 7
Adding number conversion cast (unumber) $28*8 in (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8
Adding number conversion cast (unumber) $10 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10
Adding number conversion cast (unumber) bitmap_clear::$0 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (unumber)(number) $10
Adding number conversion cast (unumber) bitmap_clear::$1 in (number~) bitmap_clear::$1 ← (unumber~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1
Adding number conversion cast (unumber) 0 in (byte) memset::c#1 ← (number) 0
Adding number conversion cast (unumber) $fff8 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (number) $fff8
Adding number conversion cast (unumber) bitmap_plot::$1 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (unumber)(number) $fff8
Adding number conversion cast (unumber) 3 in (number~) main::$4 ← (byte~) main::$3 | (number) 3
Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (byte~) main::$3 | (unumber)(number) 3
Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff
Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4
Adding number conversion cast (unumber) main::toD0181_$2#0 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (unumber)(number) 4
Adding number conversion cast (unumber) main::toD0181_$3#0 in (number~) main::toD0181_$3#0 ← > (unumber~) main::toD0181_$2#0
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4
Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (unumber)(number) 4
Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f
Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0
Adding number conversion cast (unumber) 0 in (word) main::x#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) main::y#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (word) main::vx#0 ← (number) 1
Adding number conversion cast (unumber) 1 in (byte) main::vy#0 ← (number) 1
Adding number conversion cast (unumber) $13f in (bool~) main::$8 ← (word) main::x#1 == (number) $13f
Adding number conversion cast (unumber) 0 in (bool~) main::$9 ← (word) main::x#1 == (number) 0
Adding number conversion cast (unumber) $c7 in (bool~) main::$13 ← (byte) main::y#4 == (number) $c7
Adding number conversion cast (unumber) 0 in (bool~) main::$14 ← (byte) main::y#4 == (number) 0
Adding number conversion cast (unumber) 1 in (byte) frame_cnt#0 ← (number) 1
Adding number conversion cast (unumber) $80 in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80
Adding number conversion cast (unumber) 0 in *((byte*) RASTER#0) ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) irq::$1 ← (number) 0 != (byte) frame_cnt#4
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0
Inlining cast (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (unumber)(number) 7
Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1
Inlining cast (byte) PROCPORT_RAM_IO#0 ← (unumber)(number) $35
Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012
Inlining cast (byte*) BGCOL#0 ← (byte*)(number) $d021
Inlining cast (byte*) VIC_CONTROL#0 ← (byte*)(number) $d011
Inlining cast (byte*) D011#0 ← (byte*)(number) $d011
Inlining cast (byte) VIC_BMM#0 ← (unumber)(number) $20
Inlining cast (byte) VIC_DEN#0 ← (unumber)(number) $10
Inlining cast (byte) VIC_RSEL#0 ← (unumber)(number) 8
Inlining cast (byte*) D018#0 ← (byte*)(number) $d018
Inlining cast (byte*) IRQ_STATUS#0 ← (byte*)(number) $d019
Inlining cast (byte*) IRQ_ENABLE#0 ← (byte*)(number) $d01a
Inlining cast (byte) IRQ_RASTER#0 ← (unumber)(number) 1
Inlining cast (byte*) CIA1_INTERRUPT#0 ← (byte*)(number) $dc0d
Inlining cast (byte) CIA_INTERRUPT_CLEAR#0 ← (unumber)(number) $7f
Inlining cast (void()**) HARDWARE_IRQ#0 ← (void()**)(number) $fffe
Inlining cast (byte) BLACK#0 ← (unumber)(number) 0
Inlining cast (byte) WHITE#0 ← (unumber)(number) 1
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#3
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3
Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80
Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80
Inlining cast (byte) memset::c#1 ← (unumber)(number) 0
Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1
Inlining cast (word) main::x#0 ← (unumber)(number) 0
Inlining cast (byte) main::y#0 ← (unumber)(number) 0
Inlining cast (word) main::vx#0 ← (unumber)(number) 1
Inlining cast (byte) main::vy#0 ← (unumber)(number) 1
Inlining cast (byte) frame_cnt#0 ← (unumber)(number) 1
Inlining cast *((byte*) RASTER#0) ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 0
Simplifying constant integer cast 7
Simplifying constant pointer cast (byte*) 1
Simplifying constant integer cast $35
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53281
Simplifying constant pointer cast (byte*) 53265
Simplifying constant pointer cast (byte*) 53265
Simplifying constant integer cast $20
Simplifying constant integer cast $10
Simplifying constant integer cast 8
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 53273
Simplifying constant pointer cast (byte*) 53274
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 56333
Simplifying constant integer cast $7f
Simplifying constant pointer cast (void()**) 65534
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#1)
Simplifying constant integer cast *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#1)
Simplifying constant integer cast $fff8
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 3
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $13f
Simplifying constant integer cast 0
Simplifying constant integer cast $c7
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $80
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $35
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $7f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) 7
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $fff8
Finalized unsigned number type (byte) 3
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $13f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $c7
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (byte) 7
Inferred type updated to byte in (unumber~) bitmap_init::$5 ← (byte~) bitmap_init::$3 | (byte~) bitmap_init::$4
Inferred type updated to byte in (unumber~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Inferred type updated to byte in (unumber~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (byte) $10
Inferred type updated to byte in (unumber~) bitmap_clear::$1 ← (byte~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1
Inferred type updated to word in (unumber~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (word) $fff8
Inferred type updated to byte in (unumber~) main::$4 ← (byte~) main::$3 | (byte) 3
Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff
Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0
Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0
Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3
Successful SSA optimization PassNAddTypeConversionAssignment
Inversing boolean not [22] (bool~) memset::$1 ← (word) memset::num#2 <= (byte) 0 from [21] (bool~) memset::$0 ← (word) memset::num#2 > (byte) 0
Inversing boolean not [53] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [52] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0
Inversing boolean not [73] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [72] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7
Inversing boolean not [202] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [201] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::return#4 (void*) memset::return#1 
Alias (void*) memset::str#3 = (void*) memset::str#4 
Alias (word) memset::num#2 = (word) memset::num#3 
Alias (byte) memset::c#3 = (byte) memset::c#4 
Alias (byte*) memset::end#0 = (byte*~) memset::$3 
Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 
Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 
Alias (byte*) bitmap_gfx#30 = (byte*) bitmap_gfx#31 
Alias (byte*) bitmap_screen#29 = (byte*) bitmap_screen#30 
Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#3 (byte*) bitmap_init::yoffs#0 
Alias (byte*) bitmap_gfx#21 = (byte*) bitmap_gfx#26 
Alias (byte*) bitmap_screen#20 = (byte*) bitmap_screen#25 
Alias (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#3 
Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#4 
Alias (byte*) bitmap_gfx#16 = (byte*) bitmap_gfx#17 
Alias (byte*) bitmap_screen#15 = (byte*) bitmap_screen#16 
Alias (byte*) bitmap_init::yoffs#1 = (byte*~) bitmap_init::$10 
Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#6 (byte*) bitmap_gfx#2 
Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#6 (byte*) bitmap_screen#2 
Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$1 
Alias (byte*) bitmap_gfx#12 = (byte*) bitmap_gfx#7 
Alias (byte*) bitmap_plot::plotter#0 = (byte*~) bitmap_plot::$0 
Alias (byte*) bitmap_gfx#0 = (byte*) bitmap_gfx#25 (byte*) bitmap_gfx#20 (byte*) bitmap_gfx#15 
Alias (byte*) bitmap_screen#0 = (byte*) bitmap_screen#24 (byte*) bitmap_screen#19 (byte*) bitmap_screen#14 
Alias (byte) frame_cnt#15 = (byte) frame_cnt#20 (byte) frame_cnt#21 (byte) frame_cnt#19 (byte) frame_cnt#18 (byte) frame_cnt#17 (byte) frame_cnt#16 
Alias (byte*) bitmap_gfx#18 = (byte*) bitmap_gfx#3 (byte*) bitmap_gfx#8 (byte*) bitmap_gfx#34 (byte*) bitmap_gfx#32 (byte*) bitmap_gfx#27 (byte*) bitmap_gfx#22 
Alias (byte*) bitmap_screen#17 = (byte*) bitmap_screen#3 (byte*) bitmap_screen#8 (byte*) bitmap_screen#33 (byte*) bitmap_screen#31 (byte*) bitmap_screen#26 (byte*) bitmap_screen#21 
Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 
Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 
Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$5 
Alias (word) main::x#2 = (word) main::x#4 (word) main::x#3 
Alias (byte) main::y#2 = (byte) main::y#5 (byte) main::y#3 
Alias (word) main::vx#2 = (word) main::vx#4 (word) main::vx#5 (word) main::vx#3 
Alias (byte) main::vy#2 = (byte) main::vy#4 (byte) main::vy#6 (byte) main::vy#7 
Alias (byte) frame_cnt#11 = (byte) frame_cnt#13 (byte) frame_cnt#14 (byte) frame_cnt#12 
Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#33 (byte*) bitmap_gfx#28 (byte*) bitmap_gfx#29 (byte*) bitmap_gfx#9 (byte*) bitmap_gfx#4 
Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#32 (byte*) bitmap_screen#27 (byte*) bitmap_screen#28 (byte*) bitmap_screen#9 (byte*) bitmap_screen#4 
Alias (byte) main::y#1 = (byte) main::y#6 
Alias (word) main::x#1 = (word) main::x#8 
Alias (word) main::vx#1 = (word~) main::$12 
Alias (byte) main::vy#3 = (byte) main::vy#5 
Alias (byte) frame_cnt#7 = (byte) frame_cnt#8 
Alias (word) main::x#6 = (word) main::x#7 
Alias (byte) main::y#4 = (byte) main::y#8 
Alias (byte*) bitmap_gfx#23 = (byte*) bitmap_gfx#24 
Alias (byte*) bitmap_screen#22 = (byte*) bitmap_screen#23 
Alias (word) main::vx#7 = (word) main::vx#8 
Alias (byte) main::vy#1 = (byte~) main::$17 
Alias (byte) frame_cnt#4 = (byte) frame_cnt#5 
Alias (byte) frame_cnt#10 = (byte) frame_cnt#6 (byte) frame_cnt#2 
Alias (byte) frame_cnt#0 = (byte) frame_cnt#9 
Alias (byte*) bitmap_gfx#10 = (byte*) bitmap_gfx#5 
Alias (byte*) bitmap_screen#10 = (byte*) bitmap_screen#5 
Successful SSA optimization Pass2AliasElimination
Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#3 
Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#4 
Alias (byte*) bitmap_gfx#21 = (byte*) bitmap_gfx#30 
Alias (byte*) bitmap_screen#20 = (byte*) bitmap_screen#29 
Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#3 
Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#16 
Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#15 
Alias (byte) main::y#1 = (byte) main::y#4 (byte) main::y#7 
Alias (byte) frame_cnt#11 = (byte) frame_cnt#7 (byte) frame_cnt#3 
Alias (byte) main::vy#2 = (byte) main::vy#3 
Alias (word) main::x#1 = (word) main::x#6 (word) main::x#5 
Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#23 (byte*) bitmap_gfx#19 
Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#22 (byte*) bitmap_screen#18 
Alias (word) main::vx#6 = (word) main::vx#7 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#2
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#5
Self Phi Eliminated (byte*) bitmap_init::gfx#2
Self Phi Eliminated (byte*) bitmap_gfx#21
Self Phi Eliminated (byte*) bitmap_screen#20
Self Phi Eliminated (byte*) bitmap_gfx#11
Self Phi Eliminated (byte*) bitmap_screen#11
Self Phi Eliminated (byte*) bitmap_gfx#14
Self Phi Eliminated (byte*) bitmap_screen#13
Self Phi Eliminated (byte) frame_cnt#11
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) memset::c#2 (byte) memset::c#3
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#5 (void*) memset::str#3
Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0
Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0
Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1
Identical Phi Values (byte*) bitmap_gfx#21 (byte*) bitmap_gfx#1
Identical Phi Values (byte*) bitmap_screen#20 (byte*) bitmap_screen#1
Identical Phi Values (byte*) bitmap_gfx#11 (byte*) bitmap_gfx#21
Identical Phi Values (byte*) bitmap_screen#11 (byte*) bitmap_screen#20
Identical Phi Values (byte) bitmap_clear::fgcol#1 (byte) bitmap_clear::fgcol#0
Identical Phi Values (byte) bitmap_clear::bgcol#1 (byte) bitmap_clear::bgcol#0
Identical Phi Values (byte*) bitmap_screen#7 (byte*) bitmap_screen#17
Identical Phi Values (byte*) bitmap_gfx#12 (byte*) bitmap_gfx#18
Identical Phi Values (byte) bitmap_plot::y#1 (byte) bitmap_plot::y#0
Identical Phi Values (word) bitmap_plot::x#1 (word) bitmap_plot::x#0
Identical Phi Values (byte*) bitmap_gfx#13 (byte*) bitmap_gfx#0
Identical Phi Values (byte*) bitmap_screen#12 (byte*) bitmap_screen#0
Identical Phi Values (byte) frame_cnt#15 (byte) frame_cnt#0
Identical Phi Values (byte*) bitmap_gfx#18 (byte*) bitmap_gfx#11
Identical Phi Values (byte*) bitmap_screen#17 (byte*) bitmap_screen#11
Identical Phi Values (byte*) bitmap_gfx#14 (byte*) bitmap_gfx#18
Identical Phi Values (byte*) bitmap_screen#13 (byte*) bitmap_screen#17
Identical Phi Values (byte) frame_cnt#11 (byte) frame_cnt#15
Identical Phi Values (byte) frame_cnt#4 (byte) frame_cnt#0
Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14
Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#3
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [71] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) memset::$1 [23] if((word) memset::num#2<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [35] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4
Simple Condition (bool~) bitmap_init::$1 [54] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2
Simple Condition (bool~) bitmap_init::$2 [58] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1
Simple Condition (bool~) bitmap_init::$9 [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6
Simple Condition (bool~) bitmap_init::$11 [78] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5
Simple Condition (bool~) irq::$0 [203] if((byte) 0==(byte) frame_cnt#0) goto irq::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [166] (bool~) main::$11 ← ! (bool~) main::$10
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [165] (bool~) main::$10 ← (bool~) main::$8 || (bool~) main::$9
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting ! if()-condition to reversed if() [172] (bool~) main::$16 ← ! (bool~) main::$15
Successful SSA optimization Pass2ConditionalAndOrRewriting
Rewriting || if()-condition to two if()s [171] (bool~) main::$15 ← (bool~) main::$13 || (bool~) main::$14
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant right-side identified [41] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) }
Constant right-side identified [42] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) }
Constant right-side identified [43] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) }
Constant right-side identified [114] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) }
Constant right-side identified [195] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq()
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0
Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7
Constant (const byte*) PROCPORT#0 = (byte*) 1
Constant (const byte) PROCPORT_RAM_IO#0 = $35
Constant (const byte*) RASTER#0 = (byte*) 53266
Constant (const byte*) BGCOL#0 = (byte*) 53281
Constant (const byte*) VIC_CONTROL#0 = (byte*) 53265
Constant (const byte*) D011#0 = (byte*) 53265
Constant (const byte) VIC_BMM#0 = $20
Constant (const byte) VIC_DEN#0 = $10
Constant (const byte) VIC_RSEL#0 = 8
Constant (const byte*) D018#0 = (byte*) 53272
Constant (const byte*) IRQ_STATUS#0 = (byte*) 53273
Constant (const byte*) IRQ_ENABLE#0 = (byte*) 53274
Constant (const byte) IRQ_RASTER#0 = 1
Constant (const byte*) CIA1_INTERRUPT#0 = (byte*) 56333
Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f
Constant (const void()**) HARDWARE_IRQ#0 = (void()**) 65534
Constant (const byte) BLACK#0 = 0
Constant (const byte) WHITE#0 = 1
Constant (const byte*) bitmap_screen#0 = (byte*) 0
Constant (const byte*) bitmap_gfx#0 = (byte*) 0
Constant (const byte[$100]) bitmap_plot_ylo#0 = { fill( $100, 0) }
Constant (const byte[$100]) bitmap_plot_yhi#0 = { fill( $100, 0) }
Constant (const byte[$100]) bitmap_plot_bit#0 = { fill( $100, 0) }
Constant (const byte) bitmap_init::bits#0 = $80
Constant (const byte) bitmap_init::x#0 = 0
Constant (const byte) bitmap_init::bits#2 = $80
Constant (const byte) bitmap_init::y#0 = 0
Constant (const word) memset::num#0 = $3e8
Constant (const byte) memset::c#1 = 0
Constant (const word) memset::num#1 = $1f40
Constant (const byte*) BITMAP#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte[$100]) plots_per_frame#0 = { fill( $100, 0) }
Constant (const word) main::x#0 = 0
Constant (const byte) main::y#0 = 0
Constant (const word) main::vx#0 = 1
Constant (const byte) main::vy#0 = 1
Constant (const void()*) init_irq::$0 = &irq
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0
Constant (const byte*) bitmap_init::screen#0 = SCREEN#0
Constant (const byte) bitmap_clear::bgcol#0 = BLACK#0
Constant (const byte) bitmap_clear::fgcol#0 = WHITE#0
Constant (const byte*) main::toD0181_screen#0 = SCREEN#0
Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0
Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (void*)bitmap_screen#1 in [90] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1
Constant value identified (void*)bitmap_gfx#1 in [96] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1
Constant value identified (word)main::toD0181_screen#0 in [133] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0
Constant value identified (word)main::toD0181_gfx#0 in [137] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [155] if(true) goto main::@2
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [56] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++
Resolved ranged comparison value [58] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0
Resolved ranged next value [76] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++
Resolved ranged comparison value [78] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0
Simplifying expression containing zero bitmap_clear::$0 in [88] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (void*) memset::return#2 and assignment [36] (void*) memset::return#2 ← (void*) memset::str#3
Eliminating unused variable (void*) memset::return#3 and assignment [39] (void*) memset::return#3 ← (void*) memset::str#3
Eliminating unused constant (const byte) bitmap_clear::bgcol#0
Eliminating unused constant (const byte*) bitmap_screen#0
Eliminating unused constant (const byte*) bitmap_gfx#0
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1
Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 
Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) main::$8 [71] if((word) main::x#1==(word) $13f) goto main::@8
Simple Condition (bool~) main::$13 [75] if((byte) main::y#1==(byte) $c7) goto main::@9
Simple Condition (bool~) main::$9 [99] if((word) main::x#1==(byte) 0) goto main::@8
Simple Condition (bool~) main::$14 [100] if((byte) main::y#1==(byte) 0) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [99] if((word) main::x#1!=(byte) 0) goto main::@4
Negating conditional jump and destination [100] if((byte) main::y#1!=(byte) 0) goto main::@5
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant right-side identified [31] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10
Constant right-side identified [48] (byte~) main::$2 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10
Constant (const void*) memset::str#0 = (void*)bitmap_screen#1
Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1
Constant (const byte) main::$2 = VIC_BMM#0|VIC_DEN#0
Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) memset::c#0 = bitmap_clear::col#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [42] (byte~) main::$3 ← (const byte) main::$2 | (const byte) VIC_RSEL#0
Constant right-side identified [45] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [48] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$3 = main::$2|VIC_RSEL#0
Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff
Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [42] (byte~) main::$4 ← (const byte) main::$3 | (byte) 3
Constant right-side identified [44] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4
Constant right-side identified [46] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::$4 = main::$3|3
Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4
Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [43] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0
Constant right-side identified [44] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0
Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [43] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0
Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [2] (byte*~) memset::$2 ← (byte*)(void*) memset::str#3 keeping memset::str#3
Inlining Noop Cast [4] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#3 keeping memset::str#3
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [34] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::plotter#0
Successful SSA optimization Pass2NopCastInlining
Inlining constant with var siblings (const word) memset::num#0
Inlining constant with var siblings (const byte) memset::c#1
Inlining constant with var siblings (const word) memset::num#1
Inlining constant with var siblings (const void*) memset::str#0
Inlining constant with var siblings (const void*) memset::str#1
Inlining constant with var siblings (const byte) memset::c#0
Inlining constant with var siblings (const byte) bitmap_init::bits#0
Inlining constant with var siblings (const byte) bitmap_init::x#0
Inlining constant with var siblings (const byte) bitmap_init::bits#2
Inlining constant with var siblings (const byte) bitmap_init::y#0
Inlining constant with var siblings (const word) main::x#0
Inlining constant with var siblings (const byte) main::y#0
Inlining constant with var siblings (const word) main::vx#0
Inlining constant with var siblings (const byte) main::vy#0
Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0
Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0
Constant inlined memset::num#1 = (word) $1f40
Constant inlined memset::num#0 = (word) $3e8
Constant inlined bitmap_init::bits#0 = (byte) $80
Constant inlined bitmap_init::bits#2 = (byte) $80
Constant inlined init_irq::$0 = &interrupt(HARDWARE_CLOBBER)(void()) irq()
Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0
Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0
Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0
Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0
Constant inlined main::x#0 = (byte) 0
Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE#0
Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined main::y#0 = (byte) 0
Constant inlined main::toD0181_$6#0 = >(word)(const byte*) BITMAP#0/(byte) 4
Constant inlined main::toD0181_$7#0 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0
Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::vy#0 = (byte) 1
Constant inlined main::$2 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0
Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::vx#0 = (byte) 1
Constant inlined main::toD0181_$4#0 = (word)(const byte*) BITMAP#0
Constant inlined main::toD0181_$5#0 = >(word)(const byte*) BITMAP#0
Constant inlined bitmap_init::y#0 = (byte) 0
Constant inlined main::$3 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0
Constant inlined memset::c#0 = (const byte) bitmap_clear::col#0
Constant inlined main::$4 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3
Constant inlined bitmap_init::x#0 = (byte) 0
Constant inlined memset::c#1 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting memset::@6(between memset::@4 and memset::@4)
Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1)
Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2)
Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5)
Added new block during phi lifting bitmap_init::@12(between bitmap_init::@5 and bitmap_init::@6)
Added new block during phi lifting main::@18(between main::@16 and main::@4)
Added new block during phi lifting main::@19(between main::@17 and main::@5)
Added new block during phi lifting irq::@3(between irq and irq::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @8
Adding NOP phi() at start of @14
Adding NOP phi() at start of @17
Adding NOP phi() at start of @18
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@14
Adding NOP phi() at start of bitmap_clear
Adding NOP phi() at start of bitmap_clear::@1
Adding NOP phi() at start of bitmap_clear::@2
Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of bitmap_init
Adding NOP phi() at start of bitmap_init::@3
Adding NOP phi() at start of bitmap_init::@4
CALL GRAPH
Calls in [] to main:5 
Calls in [main] to bitmap_init:9 bitmap_clear:11 init_irq:16 bitmap_plot:21 
Calls in [bitmap_clear] to memset:58 memset:60 

Created 17 initial phi equivalence classes
Coalesced [27] main::vx#11 ← main::vx#1
Coalesced [32] main::vy#11 ← main::vy#1
Coalesced [35] main::x#9 ← main::x#1
Coalesced [36] main::y#9 ← main::y#1
Coalesced [37] main::vx#9 ← main::vx#6
Coalesced [38] main::vy#9 ← main::vy#8
Coalesced (already) [39] main::vy#10 ← main::vy#2
Coalesced (already) [40] main::vx#10 ← main::vx#2
Coalesced [73] memset::dst#4 ← memset::dst#1
Coalesced [93] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1
Coalesced [98] bitmap_init::y#5 ← bitmap_init::y#1
Coalesced [99] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4
Coalesced (already) [100] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2
Coalesced [101] bitmap_init::bits#5 ← bitmap_init::bits#4
Coalesced [102] bitmap_init::x#5 ← bitmap_init::x#1
Coalesced [103] bitmap_init::bits#6 ← bitmap_init::bits#1
Coalesced [107] frame_cnt#23 ← frame_cnt#1
Coalesced [112] frame_cnt#22 ← frame_cnt#0
Coalesced down to 13 phi equivalence classes
Culled Empty Block (label) @8
Culled Empty Block (label) @14
Culled Empty Block (label) @18
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@14
Culled Empty Block (label) main::@19
Culled Empty Block (label) main::@18
Culled Empty Block (label) bitmap_clear::@2
Culled Empty Block (label) memset::@1
Culled Empty Block (label) memset::@6
Culled Empty Block (label) bitmap_init::@3
Culled Empty Block (label) bitmap_init::@4
Culled Empty Block (label) bitmap_init::@11
Culled Empty Block (label) bitmap_init::@12
Culled Empty Block (label) bitmap_init::@9
Culled Empty Block (label) irq::@3
Renumbering block @15 to @1
Renumbering block @17 to @2
Renumbering block memset::@2 to memset::@1
Renumbering block memset::@4 to memset::@2
Renumbering block bitmap_init::@5 to bitmap_init::@3
Renumbering block bitmap_init::@6 to bitmap_init::@4
Renumbering block bitmap_init::@7 to bitmap_init::@5
Renumbering block bitmap_init::@10 to bitmap_init::@6
Renumbering block main::@4 to main::@3
Renumbering block main::@5 to main::@4
Renumbering block main::@8 to main::@5
Renumbering block main::@9 to main::@6
Renumbering block main::@11 to main::@7
Renumbering block main::@12 to main::@8
Renumbering block main::@13 to main::@9
Renumbering block main::@15 to main::@10
Renumbering block main::@16 to main::@11
Renumbering block main::@17 to main::@12
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of bitmap_clear
Adding NOP phi() at start of bitmap_clear::@1
Adding NOP phi() at start of bitmap_init
Adding NOP phi() at start of bitmap_init::@6

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] (byte) frame_cnt#0 ← (byte) 1
  to:@2
@2: scope:[]  from @1
  [2] phi()
  [3] call main 
  to:@end
@end: scope:[]  from @2
  [4] phi()
main: scope:[main]  from @2
  [5] phi()
  [6] call bitmap_init 
  to:main::@8
main::@8: scope:[main]  from main
  [7] phi()
  [8] call bitmap_clear 
  to:main::@9
main::@9: scope:[main]  from main::@8
  [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3
  to:main::toD0181
main::toD0181: scope:[main]  from main::@9
  [10] phi()
  to:main::@7
main::@7: scope:[main]  from main::toD0181
  [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
  [12] call init_irq 
  to:main::@1
main::@1: scope:[main]  from main::@4 main::@7
  [13] (byte) main::vy#2 ← phi( main::@7/(byte) 1 main::@4/(byte) main::vy#8 )
  [13] (word) main::vx#2 ← phi( main::@7/(byte) 1 main::@4/(word) main::vx#6 )
  [13] (byte) main::y#2 ← phi( main::@7/(byte) 0 main::@4/(byte) main::y#1 )
  [13] (word) main::x#2 ← phi( main::@7/(byte) 0 main::@4/(word) main::x#1 )
  to:main::@2
main::@2: scope:[main]  from main::@1
  [14] (word) bitmap_plot::x#0 ← (word) main::x#2
  [15] (byte) bitmap_plot::y#0 ← (byte) main::y#2
  [16] call bitmap_plot 
  to:main::@10
main::@10: scope:[main]  from main::@2
  [17] (word) main::x#1 ← (word) main::x#2 + (word) main::vx#2
  [18] (byte) main::y#1 ← (byte) main::y#2 + (byte) main::vy#2
  [19] if((word) main::x#1==(word) $13f) goto main::@5
  to:main::@11
main::@11: scope:[main]  from main::@10
  [20] if((word) main::x#1!=(byte) 0) goto main::@3
  to:main::@5
main::@5: scope:[main]  from main::@10 main::@11
  [21] (word) main::vx#1 ← - (word) main::vx#2
  to:main::@3
main::@3: scope:[main]  from main::@11 main::@5
  [22] (word) main::vx#6 ← phi( main::@11/(word) main::vx#2 main::@5/(word) main::vx#1 )
  [23] if((byte) main::y#1==(byte) $c7) goto main::@6
  to:main::@12
main::@12: scope:[main]  from main::@3
  [24] if((byte) main::y#1!=(byte) 0) goto main::@4
  to:main::@6
main::@6: scope:[main]  from main::@12 main::@3
  [25] (byte) main::vy#1 ← - (byte) main::vy#2
  to:main::@4
main::@4: scope:[main]  from main::@12 main::@6
  [26] (byte) main::vy#8 ← phi( main::@12/(byte) main::vy#2 main::@6/(byte) main::vy#1 )
  [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0)
  to:main::@1
bitmap_plot: scope:[bitmap_plot]  from main::@2
  [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0)
  [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8
  [30] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
  [31] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0
  [32] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
  to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot]  from bitmap_plot
  [33] return 
  to:@return
init_irq: scope:[init_irq]  from main::@7
  asm { sei  }
  [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
  [36] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
  [37] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
  [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80
  [39] *((const byte*) RASTER#0) ← (byte) 0
  [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
  [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq()
  asm { cli  }
  to:init_irq::@return
init_irq::@return: scope:[init_irq]  from init_irq
  [43] return 
  to:@return
bitmap_clear: scope:[bitmap_clear]  from main::@8
  [44] phi()
  [45] call memset 
  to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear]  from bitmap_clear
  [46] phi()
  [47] call memset 
  to:bitmap_clear::@return
bitmap_clear::@return: scope:[bitmap_clear]  from bitmap_clear::@1
  [48] return 
  to:@return
memset: scope:[memset]  from bitmap_clear bitmap_clear::@1
  [49] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
  [49] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 )
  [49] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
  [50] if((word) memset::num#2<=(byte) 0) goto memset::@return
  to:memset::@1
memset::@1: scope:[memset]  from memset
  [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
  [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
  to:memset::@2
memset::@2: scope:[memset]  from memset::@1 memset::@2
  [53] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 )
  [54] *((byte*) memset::dst#2) ← (byte) memset::c#3
  [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2
  to:memset::@return
memset::@return: scope:[memset]  from memset memset::@2
  [57] return 
  to:@return
bitmap_init: scope:[bitmap_init]  from main
  [58] phi()
  to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init]  from bitmap_init bitmap_init::@2
  [59] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
  [59] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
  [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
  [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
  [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
  to:bitmap_init::@2
bitmap_init::@6: scope:[bitmap_init]  from bitmap_init::@1
  [63] phi()
  to:bitmap_init::@2
bitmap_init::@2: scope:[bitmap_init]  from bitmap_init::@1 bitmap_init::@6
  [64] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
  [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
  [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
  to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init]  from bitmap_init::@2 bitmap_init::@4
  [67] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
  [67] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
  [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
  [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
  [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
  [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
  [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
  [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
  [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
  to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init]  from bitmap_init::@3
  [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
  to:bitmap_init::@4
bitmap_init::@4: scope:[bitmap_init]  from bitmap_init::@3 bitmap_init::@5
  [76] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
  [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
  [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
  to:bitmap_init::@return
bitmap_init::@return: scope:[bitmap_init]  from bitmap_init::@4
  [79] return 
  to:@return
irq: scope:[irq]  from
  [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
  [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1
  to:irq::@2
irq::@2: scope:[irq]  from irq
  [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0
  to:irq::@1
irq::@1: scope:[irq]  from irq irq::@2
  [83] (byte) frame_cnt#10 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 )
  [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
  [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
  to:irq::@return
irq::@return: scope:[irq]  from irq::@1
  [86] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte*) BITMAP
(byte) BLACK
(byte*) CIA1_INTERRUPT
(byte) CIA_INTERRUPT_CLEAR
(byte*) D011
(byte*) D018
(void()**) HARDWARE_IRQ
(byte*) IRQ_ENABLE
(byte) IRQ_RASTER
(byte*) IRQ_STATUS
(byte*) PROCPORT
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_RAM_IO
(byte*) RASTER
(byte*) SCREEN
(byte) VIC_BMM
(byte*) VIC_CONTROL
(byte) VIC_DEN
(byte) VIC_RSEL
(byte) WHITE
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
(byte) bitmap_clear::fgcol
(byte*) bitmap_gfx
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(byte~) bitmap_init::$4 22.0
(byte~) bitmap_init::$5 22.0
(byte~) bitmap_init::$6 22.0
(byte~) bitmap_init::$7 5.5
(byte) bitmap_init::bits
(byte) bitmap_init::bits#1 11.0
(byte) bitmap_init::bits#3 16.5
(byte) bitmap_init::bits#4 7.333333333333333
(byte*) bitmap_init::gfx
(byte*) bitmap_init::screen
(byte) bitmap_init::x
(byte) bitmap_init::x#1 16.5
(byte) bitmap_init::x#2 5.5
(byte) bitmap_init::y
(byte) bitmap_init::y#1 16.5
(byte) bitmap_init::y#2 5.5
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#1 22.0
(byte*) bitmap_init::yoffs#2 6.875
(byte*) bitmap_init::yoffs#4 11.0
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(word~) bitmap_plot::$1 4.0
(byte~) bitmap_plot::$2 4.0
(byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 1.0
(byte*) bitmap_plot::plotter#1 3.0
(word) bitmap_plot::x
(word) bitmap_plot::x#0 3.0
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0 15.0
(byte[$100]) bitmap_plot_bit
(byte[$100]) bitmap_plot_yhi
(byte[$100]) bitmap_plot_ylo
(byte*) bitmap_screen
(byte) frame_cnt
(byte) frame_cnt#0 1.1111111111111112
(byte) frame_cnt#1 4.0
(byte) frame_cnt#10 40.0
(void()) init_irq()
interrupt(HARDWARE_CLOBBER)(void()) irq()
(void()) main()
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(byte*) main::toD0181_screen
(word) main::vx
(word) main::vx#1 22.0
(word) main::vx#2 5.5
(word) main::vx#6 5.5
(byte) main::vy
(byte) main::vy#1 22.0
(byte) main::vy#2 3.6666666666666665
(byte) main::vy#8 16.5
(word) main::x
(word) main::x#1 4.0
(word) main::x#2 8.25
(byte) main::y
(byte) main::y#1 4.4
(byte) main::y#2 6.6000000000000005
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte) memset::c#3 1.375
(byte*) memset::dst
(byte*) memset::dst#1 16.5
(byte*) memset::dst#2 17.5
(byte*~) memset::dst#3 4.0
(byte*) memset::end
(byte*) memset::end#0 2.1666666666666665
(word) memset::num
(word) memset::num#2 2.0
(void*) memset::return
(void*) memset::str
(void*) memset::str#3
(byte[$100]) plots_per_frame

Initial phi equivalence classes
[ main::x#2 main::x#1 ]
[ main::y#2 main::y#1 ]
[ main::vx#2 main::vx#6 main::vx#1 ]
[ main::vy#2 main::vy#8 main::vy#1 ]
[ memset::num#2 ]
[ memset::str#3 ]
[ memset::c#3 ]
[ memset::dst#2 memset::dst#3 memset::dst#1 ]
[ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
[ bitmap_init::x#2 bitmap_init::x#1 ]
[ bitmap_init::y#2 bitmap_init::y#1 ]
[ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
[ frame_cnt#10 frame_cnt#0 frame_cnt#1 ]
Added variable bitmap_plot::x#0 to zero page equivalence class [ bitmap_plot::x#0 ]
Added variable bitmap_plot::y#0 to zero page equivalence class [ bitmap_plot::y#0 ]
Added variable bitmap_plot::plotter#0 to zero page equivalence class [ bitmap_plot::plotter#0 ]
Added variable bitmap_plot::$1 to zero page equivalence class [ bitmap_plot::$1 ]
Added variable bitmap_plot::plotter#1 to zero page equivalence class [ bitmap_plot::plotter#1 ]
Added variable bitmap_plot::$2 to zero page equivalence class [ bitmap_plot::$2 ]
Added variable memset::end#0 to zero page equivalence class [ memset::end#0 ]
Added variable bitmap_init::$7 to zero page equivalence class [ bitmap_init::$7 ]
Added variable bitmap_init::$4 to zero page equivalence class [ bitmap_init::$4 ]
Added variable bitmap_init::$5 to zero page equivalence class [ bitmap_init::$5 ]
Added variable bitmap_init::$6 to zero page equivalence class [ bitmap_init::$6 ]
Complete equivalence classes
[ main::x#2 main::x#1 ]
[ main::y#2 main::y#1 ]
[ main::vx#2 main::vx#6 main::vx#1 ]
[ main::vy#2 main::vy#8 main::vy#1 ]
[ memset::num#2 ]
[ memset::str#3 ]
[ memset::c#3 ]
[ memset::dst#2 memset::dst#3 memset::dst#1 ]
[ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
[ bitmap_init::x#2 bitmap_init::x#1 ]
[ bitmap_init::y#2 bitmap_init::y#1 ]
[ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
[ frame_cnt#10 frame_cnt#0 frame_cnt#1 ]
[ bitmap_plot::x#0 ]
[ bitmap_plot::y#0 ]
[ bitmap_plot::plotter#0 ]
[ bitmap_plot::$1 ]
[ bitmap_plot::plotter#1 ]
[ bitmap_plot::$2 ]
[ memset::end#0 ]
[ bitmap_init::$7 ]
[ bitmap_init::$4 ]
[ bitmap_init::$5 ]
[ bitmap_init::$6 ]
Allocated zp ZP_WORD:2 [ main::x#2 main::x#1 ]
Allocated zp ZP_BYTE:4 [ main::y#2 main::y#1 ]
Allocated zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ]
Allocated zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ]
Allocated zp ZP_WORD:8 [ memset::num#2 ]
Allocated zp ZP_WORD:10 [ memset::str#3 ]
Allocated zp ZP_BYTE:12 [ memset::c#3 ]
Allocated zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ]
Allocated zp ZP_BYTE:15 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
Allocated zp ZP_BYTE:16 [ bitmap_init::x#2 bitmap_init::x#1 ]
Allocated zp ZP_BYTE:17 [ bitmap_init::y#2 bitmap_init::y#1 ]
Allocated zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
Allocated zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ]
Allocated zp ZP_WORD:21 [ bitmap_plot::x#0 ]
Allocated zp ZP_BYTE:23 [ bitmap_plot::y#0 ]
Allocated zp ZP_WORD:24 [ bitmap_plot::plotter#0 ]
Allocated zp ZP_WORD:26 [ bitmap_plot::$1 ]
Allocated zp ZP_WORD:28 [ bitmap_plot::plotter#1 ]
Allocated zp ZP_BYTE:30 [ bitmap_plot::$2 ]
Allocated zp ZP_WORD:31 [ memset::end#0 ]
Allocated zp ZP_BYTE:33 [ bitmap_init::$7 ]
Allocated zp ZP_BYTE:34 [ bitmap_init::$4 ]
Allocated zp ZP_BYTE:35 [ bitmap_init::$5 ]
Allocated zp ZP_BYTE:36 [ bitmap_init::$6 ]

INITIAL ASM
  // File Comments
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
// Plots simple plots
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = $35
  .label RASTER = $d012
  .label BGCOL = $d021
  .label VIC_CONTROL = $d011
  .label D011 = $d011
  .const VIC_BMM = $20
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label D018 = $d018
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // The vector used when the HARDWARE serves IRQ interrupts
  .label HARDWARE_IRQ = $fffe
  // The colors of the C64
  .const BLACK = 0
  .const WHITE = 1
  .label BITMAP = $2000
  .label SCREEN = $400
  .label frame_cnt = $14
  // @begin
bbegin:
  jmp b1
  // @1
b1:
  // [1] (byte) frame_cnt#0 ← (byte) 1 -- vbuz1=vbuc1 
  // Counts frames - updated by the IRQ
  lda #1
  sta frame_cnt
  // [2] phi from @1 to @2 [phi:@1->@2]
b2_from_b1:
  jmp b2
  // @2
b2:
  // [3] call main 
  // [5] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
  // [4] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
  // @end
bend:
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
    .label x = 2
    .label y = 4
    .label vx = 5
    .label vy = 7
    // [6] call bitmap_init 
    // [58] phi from main to bitmap_init [phi:main->bitmap_init]
  bitmap_init_from_main:
    jsr bitmap_init
    // [7] phi from main to main::@8 [phi:main->main::@8]
  b8_from_main:
    jmp b8
    // main::@8
  b8:
    // [8] call bitmap_clear 
    // [44] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear]
  bitmap_clear_from_b8:
    jsr bitmap_clear
    jmp b9
    // main::@9
  b9:
    // [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
    sta D011
    // [10] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181]
  toD0181_from_b9:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp b7
    // main::@7
  b7:
    // [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [12] call init_irq 
    jsr init_irq
    // [13] phi from main::@7 to main::@1 [phi:main::@7->main::@1]
  b1_from_b7:
    // [13] phi (byte) main::vy#2 = (byte) 1 [phi:main::@7->main::@1#0] -- vbuz1=vbuc1 
    lda #1
    sta vy
    // [13] phi (word) main::vx#2 = (byte) 1 [phi:main::@7->main::@1#1] -- vwuz1=vbuc1 
    lda #<1
    sta vx
    lda #>1
    sta vx+1
    // [13] phi (byte) main::y#2 = (byte) 0 [phi:main::@7->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta y
    // [13] phi (word) main::x#2 = (byte) 0 [phi:main::@7->main::@1#3] -- vwuz1=vbuc1 
    lda #<0
    sta x
    lda #>0
    sta x+1
    jmp b1
    // main::@1
  b1:
    jmp b2
    // main::@2
  b2:
    // [14] (word) bitmap_plot::x#0 ← (word) main::x#2 -- vwuz1=vwuz2 
    lda x
    sta bitmap_plot.x
    lda x+1
    sta bitmap_plot.x+1
    // [15] (byte) bitmap_plot::y#0 ← (byte) main::y#2 -- vbuz1=vbuz2 
    lda y
    sta bitmap_plot.y
    // [16] call bitmap_plot 
    jsr bitmap_plot
    jmp b10
    // main::@10
  b10:
    // [17] (word) main::x#1 ← (word) main::x#2 + (word) main::vx#2 -- vwuz1=vwuz1_plus_vwuz2 
    lda x
    clc
    adc vx
    sta x
    lda x+1
    adc vx+1
    sta x+1
    // [18] (byte) main::y#1 ← (byte) main::y#2 + (byte) main::vy#2 -- vbuz1=vbuz1_plus_vbuz2 
    lda y
    clc
    adc vy
    sta y
    // [19] if((word) main::x#1==(word) $13f) goto main::@5 -- vwuz1_eq_vwuc1_then_la1 
    lda x
    cmp #<$13f
    bne !+
    lda x+1
    cmp #>$13f
    beq b5
  !:
    jmp b11
    // main::@11
  b11:
    // [20] if((word) main::x#1!=(byte) 0) goto main::@3 -- vwuz1_neq_0_then_la1 
    lda x
    bne b3_from_b11
    lda x+1
    bne b3_from_b11
    jmp b5
    // main::@5
  b5:
    // [21] (word) main::vx#1 ← - (word) main::vx#2 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc vx
    sta vx
    lda #0
    sbc vx+1
    sta vx+1
    // [22] phi from main::@11 main::@5 to main::@3 [phi:main::@11/main::@5->main::@3]
  b3_from_b11:
  b3_from_b5:
    // [22] phi (word) main::vx#6 = (word) main::vx#2 [phi:main::@11/main::@5->main::@3#0] -- register_copy 
    jmp b3
    // main::@3
  b3:
    // [23] if((byte) main::y#1==(byte) $c7) goto main::@6 -- vbuz1_eq_vbuc1_then_la1 
    lda #$c7
    cmp y
    beq b6
    jmp b12
    // main::@12
  b12:
    // [24] if((byte) main::y#1!=(byte) 0) goto main::@4 -- vbuz1_neq_0_then_la1 
    lda y
    cmp #0
    bne b4_from_b12
    jmp b6
    // main::@6
  b6:
    // [25] (byte) main::vy#1 ← - (byte) main::vy#2 -- vbuz1=_neg_vbuz1 
    lda vy
    eor #$ff
    clc
    adc #1
    sta vy
    // [26] phi from main::@12 main::@6 to main::@4 [phi:main::@12/main::@6->main::@4]
  b4_from_b12:
  b4_from_b6:
    // [26] phi (byte) main::vy#8 = (byte) main::vy#2 [phi:main::@12/main::@6->main::@4#0] -- register_copy 
    jmp b4
    // main::@4
  b4:
    // [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 
    ldx frame_cnt
    inc plots_per_frame,x
    // [13] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  b1_from_b4:
    // [13] phi (byte) main::vy#2 = (byte) main::vy#8 [phi:main::@4->main::@1#0] -- register_copy 
    // [13] phi (word) main::vx#2 = (word) main::vx#6 [phi:main::@4->main::@1#1] -- register_copy 
    // [13] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@4->main::@1#2] -- register_copy 
    // [13] phi (word) main::x#2 = (word) main::x#1 [phi:main::@4->main::@1#3] -- register_copy 
    jmp b1
}
  // bitmap_plot
// Plot a single dot in the bitmap
// bitmap_plot(word zeropage($15) x, byte zeropage($17) y)
bitmap_plot: {
    .label _1 = $1a
    .label _2 = $1e
    .label plotter = $18
    .label plotter_1 = $1c
    .label x = $15
    .label y = $17
    // [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 
    ldy y
    lda bitmap_plot_yhi,y
    sta plotter+1
    lda bitmap_plot_ylo,y
    sta plotter
    // [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 
    lda x
    and #<$fff8
    sta _1
    lda x+1
    and #>$fff8
    sta _1+1
    // [30] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 
    lda plotter
    clc
    adc _1
    sta plotter_1
    lda plotter+1
    adc _1+1
    sta plotter_1+1
    // [31] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 -- vbuz1=_lo_vwuz2 
    lda x
    sta _2
    // [32] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 
    ldy #0
    lda (plotter_1),y
    ldy _2
    ora bitmap_plot_bit,y
    ldy #0
    sta (plotter_1),y
    jmp breturn
    // bitmap_plot::@return
  breturn:
    // [33] return 
    rts
}
  // init_irq
// Setup the IRQ
init_irq: {
    // asm { sei  }
    sei
    // [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // [36] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [37] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
    // [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 
    // Set raster line to $100
    lda #$80
    ora VIC_CONTROL
    sta VIC_CONTROL
    // [39] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta RASTER
    // [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<irq
    sta HARDWARE_IRQ
    lda #>irq
    sta HARDWARE_IRQ+1
    // asm { cli  }
    cli
    jmp breturn
    // init_irq::@return
  breturn:
    // [43] return 
    rts
}
  // bitmap_clear
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
    .const col = WHITE*$10
    // [45] call memset 
    // [49] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
  memset_from_bitmap_clear:
    // [49] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 
    lda #col
    sta memset.c
    // [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 
    lda #<SCREEN
    sta memset.str
    lda #>SCREEN
    sta memset.str+1
    // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 
    lda #<$3e8
    sta memset.num
    lda #>$3e8
    sta memset.num+1
    jsr memset
    // [46] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1]
  b1_from_bitmap_clear:
    jmp b1
    // bitmap_clear::@1
  b1:
    // [47] call memset 
    // [49] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
  memset_from_b1:
    // [49] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 
    lda #0
    sta memset.c
    // [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 
    lda #<BITMAP
    sta memset.str
    lda #>BITMAP
    sta memset.str+1
    // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 
    lda #<$1f40
    sta memset.num
    lda #>$1f40
    sta memset.num+1
    jsr memset
    jmp breturn
    // bitmap_clear::@return
  breturn:
    // [48] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zeropage($a) str, byte zeropage($c) c, word zeropage(8) num)
memset: {
    .label end = $1f
    .label dst = $d
    .label num = 8
    .label str = $a
    .label c = $c
    // [50] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 
    lda num
    bne !+
    lda num+1
    beq breturn
  !:
    jmp b1
    // memset::@1
  b1:
    // [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 
    lda str
    clc
    adc num
    sta end
    lda str+1
    adc num+1
    sta end+1
    // [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 -- pbuz1=pbuz2 
    lda str
    sta dst
    lda str+1
    sta dst+1
    // [53] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2]
  b2_from_b1:
  b2_from_b2:
    // [53] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy 
    jmp b2
    // memset::@2
  b2:
    // [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 
    lda c
    ldy #0
    sta (dst),y
    // [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 
    lda dst+1
    cmp end+1
    bne b2_from_b2
    lda dst
    cmp end
    bne b2_from_b2
    jmp breturn
    // memset::@return
  breturn:
    // [57] return 
    rts
}
  // bitmap_init
// Initialize bitmap plotting tables
bitmap_init: {
    .label _4 = $22
    .label _5 = $23
    .label _6 = $24
    .label _7 = $21
    .label bits = $f
    .label x = $10
    .label y = $11
    .label yoffs = $12
    // [59] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1]
  b1_from_bitmap_init:
    // [59] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta x
    // [59] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 
    lda #$80
    sta bits
    jmp b1
    // [59] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1]
  b1_from_b2:
    // [59] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy 
    // [59] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy 
    jmp b1
    // bitmap_init::@1
  b1:
    // [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda bits
    ldy x
    sta bitmap_plot_bit,y
    // [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 
    lsr bits
    // [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 
    lda bits
    cmp #0
    bne b6_from_b1
    // [64] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2]
  b2_from_b1:
    // [64] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 
    lda #$80
    sta bits
    jmp b2
    // [63] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6]
  b6_from_b1:
    jmp b6
    // bitmap_init::@6
  b6:
    // [64] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2]
  b2_from_b6:
    // [64] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy 
    jmp b2
    // bitmap_init::@2
  b2:
    // [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 
    inc x
    // [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 
    lda x
    cmp #0
    bne b1_from_b2
    // [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
  b3_from_b2:
    // [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta yoffs
    lda #>BITMAP
    sta yoffs+1
    // [67] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta y
    jmp b3
    // [67] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3]
  b3_from_b4:
    // [67] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy 
    // [67] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy 
    jmp b3
    // bitmap_init::@3
  b3:
    // [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 
    lda #7
    and y
    sta _7
    // [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 
    lda yoffs
    sta _4
    // [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 
    lda _7
    ora _4
    sta _5
    // [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda _5
    ldy y
    sta bitmap_plot_ylo,y
    // [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 
    lda yoffs+1
    sta _6
    // [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda _6
    ldy y
    sta bitmap_plot_yhi,y
    // [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp _7
    bne b4_from_b3
    jmp b5
    // bitmap_init::@5
  b5:
    // [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda yoffs
    adc #<$28*8
    sta yoffs
    lda yoffs+1
    adc #>$28*8
    sta yoffs+1
    // [76] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4]
  b4_from_b3:
  b4_from_b5:
    // [76] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy 
    jmp b4
    // bitmap_init::@4
  b4:
    // [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 
    inc y
    // [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 
    lda y
    cmp #0
    bne b3_from_b4
    jmp breturn
    // bitmap_init::@return
  breturn:
    // [79] return 
    rts
}
  // irq
// Interrupt Routine counting frames
irq: {
    // entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    stx regx+1
    sty regy+1
    // [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 
    lda #WHITE
    sta BGCOL
    // [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp frame_cnt
    beq b1_from_irq
    jmp b2
    // irq::@2
  b2:
    // [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 
    inc frame_cnt
    // [83] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1]
  b1_from_irq:
  b1_from_b2:
    // [83] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy 
    jmp b1
    // irq::@1
  b1:
    // [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 
    lda #BLACK
    sta BGCOL
    // [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #IRQ_RASTER
    sta IRQ_STATUS
    jmp breturn
    // irq::@return
  breturn:
    // [86] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
  regx:
    ldx #00
  regy:
    ldy #00
    rti
}
  // File Data
  // Tables for the plotter - initialized by calling bitmap_init();
  bitmap_plot_ylo: .fill $100, 0
  bitmap_plot_yhi: .fill $100, 0
  bitmap_plot_bit: .fill $100, 0
  plots_per_frame: .fill $100, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Equivalence Class zp ZP_BYTE:34 [ bitmap_init::$4 ] has ALU potential.
Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] (  [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [14] (word) bitmap_plot::x#0 ← (word) main::x#2 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::y#2 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ]
Statement [17] (word) main::x#1 ← (word) main::x#2 + (word) main::vx#2 [ frame_cnt#0 main::y#2 main::vx#2 main::vy#2 main::x#1 ] ( main:3 [ frame_cnt#0 main::y#2 main::vx#2 main::vy#2 main::x#1 ] ) always clobbers reg byte a 
Statement [18] (byte) main::y#1 ← (byte) main::y#2 + (byte) main::vy#2 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ( main:3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ) always clobbers reg byte a 
Statement [19] if((word) main::x#1==(word) $13f) goto main::@5 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ( main:3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ) always clobbers reg byte a 
Statement [20] if((word) main::x#1!=(byte) 0) goto main::@3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ( main:3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ) always clobbers reg byte a 
Statement [21] (word) main::vx#1 ← - (word) main::vx#2 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#1 ] ( main:3 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#1 ] ) always clobbers reg byte a 
Statement [25] (byte) main::vy#1 ← - (byte) main::vy#2 [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#1 ] ( main:3 [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#1 ] ) always clobbers reg byte a 
Statement [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#8 ] ( main:3 [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#8 ] ) always clobbers reg byte x 
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:4 [ main::y#2 main::y#1 ]
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ]
Statement [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::plotter#0 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 bitmap_plot::plotter#0 ] ) always clobbers reg byte a 
Statement [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a 
Statement [30] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a 
Statement [31] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a 
Statement [32] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::y#2 main::y#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ]
Statement [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [36] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [37] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [39] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [50] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ memset::c#3 ]
Statement [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a 
Statement [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a 
Statement [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ memset::c#3 ]
Statement [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a 
Statement [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ bitmap_init::y#2 bitmap_init::y#1 ]
Statement [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] (  [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] (  [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [86] return  [ ] (  [ ] ) always clobbers reg byte a reg byte x reg byte y 
Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] (  [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [14] (word) bitmap_plot::x#0 ← (word) main::x#2 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 ] ) always clobbers reg byte a 
Statement [17] (word) main::x#1 ← (word) main::x#2 + (word) main::vx#2 [ frame_cnt#0 main::y#2 main::vx#2 main::vy#2 main::x#1 ] ( main:3 [ frame_cnt#0 main::y#2 main::vx#2 main::vy#2 main::x#1 ] ) always clobbers reg byte a 
Statement [18] (byte) main::y#1 ← (byte) main::y#2 + (byte) main::vy#2 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ( main:3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ) always clobbers reg byte a 
Statement [19] if((word) main::x#1==(word) $13f) goto main::@5 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ( main:3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ) always clobbers reg byte a 
Statement [20] if((word) main::x#1!=(byte) 0) goto main::@3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ( main:3 [ frame_cnt#0 main::vx#2 main::vy#2 main::x#1 main::y#1 ] ) always clobbers reg byte a 
Statement [21] (word) main::vx#1 ← - (word) main::vx#2 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#1 ] ( main:3 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#1 ] ) always clobbers reg byte a 
Statement [23] if((byte) main::y#1==(byte) $c7) goto main::@6 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#6 ] ( main:3 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#6 ] ) always clobbers reg byte a 
Statement [24] if((byte) main::y#1!=(byte) 0) goto main::@4 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#6 ] ( main:3 [ frame_cnt#0 main::vy#2 main::x#1 main::y#1 main::vx#6 ] ) always clobbers reg byte a 
Statement [25] (byte) main::vy#1 ← - (byte) main::vy#2 [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#1 ] ( main:3 [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#1 ] ) always clobbers reg byte a 
Statement [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#8 ] ( main:3 [ frame_cnt#0 main::x#1 main::y#1 main::vx#6 main::vy#8 ] ) always clobbers reg byte x 
Statement [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::plotter#0 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 bitmap_plot::plotter#0 ] ) always clobbers reg byte a 
Statement [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a 
Statement [30] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a 
Statement [31] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a 
Statement [32] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:16 [ frame_cnt#0 main::x#2 main::y#2 main::vx#2 main::vy#2 ] ) always clobbers reg byte a reg byte y 
Statement [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [36] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [37] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [39] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:12 [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [50] if((word) memset::num#2<=(byte) 0) goto memset::@return [ memset::num#2 memset::str#3 memset::c#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::num#2 memset::str#3 memset::c#3 ] ) always clobbers reg byte a 
Statement [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 [ memset::str#3 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::str#3 memset::c#3 memset::end#0 ] ) always clobbers reg byte a 
Statement [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a 
Statement [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:8::memset:45 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:8::memset:47 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a 
Statement [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a 
Statement [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:6 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a 
Statement [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] (  [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] (  [ frame_cnt#0 ] ) always clobbers reg byte a 
Statement [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] (  [ ] ) always clobbers reg byte a 
Statement [86] return  [ ] (  [ ] ) always clobbers reg byte a reg byte x reg byte y 
Potential registers zp ZP_WORD:2 [ main::x#2 main::x#1 ] : zp ZP_WORD:2 , 
Potential registers zp ZP_BYTE:4 [ main::y#2 main::y#1 ] : zp ZP_BYTE:4 , 
Potential registers zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] : zp ZP_WORD:5 , 
Potential registers zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] : zp ZP_BYTE:7 , 
Potential registers zp ZP_WORD:8 [ memset::num#2 ] : zp ZP_WORD:8 , 
Potential registers zp ZP_WORD:10 [ memset::str#3 ] : zp ZP_WORD:10 , 
Potential registers zp ZP_BYTE:12 [ memset::c#3 ] : zp ZP_BYTE:12 , reg byte x , 
Potential registers zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:13 , 
Potential registers zp ZP_BYTE:15 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:16 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:17 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp ZP_BYTE:17 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp ZP_WORD:18 , 
Potential registers zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] : zp ZP_BYTE:20 , 
Potential registers zp ZP_WORD:21 [ bitmap_plot::x#0 ] : zp ZP_WORD:21 , 
Potential registers zp ZP_BYTE:23 [ bitmap_plot::y#0 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] : zp ZP_WORD:24 , 
Potential registers zp ZP_WORD:26 [ bitmap_plot::$1 ] : zp ZP_WORD:26 , 
Potential registers zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] : zp ZP_WORD:28 , 
Potential registers zp ZP_BYTE:30 [ bitmap_plot::$2 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:31 [ memset::end#0 ] : zp ZP_WORD:31 , 
Potential registers zp ZP_BYTE:33 [ bitmap_init::$7 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:34 [ bitmap_init::$4 ] : zp ZP_BYTE:34 , reg byte a , reg byte x , reg byte y , reg byte alu , 
Potential registers zp ZP_BYTE:35 [ bitmap_init::$5 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:36 [ bitmap_init::$6 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:15 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:16 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:17 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:34 [ bitmap_init::$4 ] 22: zp ZP_BYTE:35 [ bitmap_init::$5 ] 22: zp ZP_BYTE:36 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:33 [ bitmap_init::$7 ] 
Uplift Scope [main] 42.17: zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] 33: zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] 12.25: zp ZP_WORD:2 [ main::x#2 main::x#1 ] 11: zp ZP_BYTE:4 [ main::y#2 main::y#1 ] 
Uplift Scope [] 45.11: zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] 
Uplift Scope [memset] 38: zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:31 [ memset::end#0 ] 2: zp ZP_WORD:8 [ memset::num#2 ] 1.38: zp ZP_BYTE:12 [ memset::c#3 ] 0: zp ZP_WORD:10 [ memset::str#3 ] 
Uplift Scope [bitmap_plot] 15: zp ZP_BYTE:23 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:26 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:30 [ bitmap_plot::$2 ] 3: zp ZP_WORD:21 [ bitmap_plot::x#0 ] 3: zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] 
Uplift Scope [bitmap_clear] 
Uplift Scope [init_irq] 
Uplift Scope [irq] 

Uplifting [bitmap_init] best 4341 combination zp ZP_WORD:18 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:35 [ bitmap_init::$5 ] zp ZP_BYTE:36 [ bitmap_init::$6 ] zp ZP_BYTE:33 [ bitmap_init::$7 ] 
Limited combination testing to 100 combinations of 15360 possible.
Uplifting [main] best 4341 combination zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ] zp ZP_WORD:2 [ main::x#2 main::x#1 ] zp ZP_BYTE:4 [ main::y#2 main::y#1 ] 
Uplifting [] best 4341 combination zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] 
Uplifting [memset] best 4325 combination zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:31 [ memset::end#0 ] zp ZP_WORD:8 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:10 [ memset::str#3 ] 
Uplifting [bitmap_plot] best 4288 combination reg byte x [ bitmap_plot::y#0 ] zp ZP_WORD:26 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:21 [ bitmap_plot::x#0 ] zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] 
Uplifting [bitmap_clear] best 4288 combination 
Uplifting [init_irq] best 4288 combination 
Uplifting [irq] best 4288 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ]
Uplifting [] best 4288 combination zp ZP_BYTE:20 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ]
Uplifting [main] best 4288 combination zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:35 [ bitmap_init::$5 ]
Uplifting [bitmap_init] best 4228 combination reg byte a [ bitmap_init::$5 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:36 [ bitmap_init::$6 ]
Uplifting [bitmap_init] best 4168 combination reg byte a [ bitmap_init::$6 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::y#2 main::y#1 ]
Uplifting [main] best 4168 combination zp ZP_BYTE:4 [ main::y#2 main::y#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:33 [ bitmap_init::$7 ]
Uplifting [bitmap_init] best 4168 combination zp ZP_BYTE:33 [ bitmap_init::$7 ] 
Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::x#2 main::x#1 ] ] with [ zp ZP_WORD:21 [ bitmap_plot::x#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:8 [ memset::num#2 ] ] with [ zp ZP_WORD:31 [ memset::end#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ memset::str#3 ] ] with [ zp ZP_WORD:13 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:24 [ bitmap_plot::plotter#0 ] ] with [ zp ZP_WORD:28 [ bitmap_plot::plotter#1 ] ] - score: 1
Allocated (was zp ZP_WORD:18) zp ZP_WORD:12 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:14 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ]
Allocated (was zp ZP_WORD:24) zp ZP_WORD:15 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 ]
Allocated (was zp ZP_WORD:26) zp ZP_WORD:17 [ bitmap_plot::$1 ]
Allocated (was zp ZP_BYTE:33) zp ZP_BYTE:19 [ bitmap_init::$7 ]
Interrupt procedure irq clobbers ACNZ
Removing interrupt register storage stx regx+1 in SEG153 entry interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage sty regy+1 in SEG153 entry interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage regx: in SEG164 [86] return  - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage ldx #00 in SEG164 [86] return  - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage regy: in SEG164 [86] return  - exit interrupt(HARDWARE_CLOBBER)
Removing interrupt register storage ldy #00 in SEG164 [86] return  - exit interrupt(HARDWARE_CLOBBER)

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
// Plots simple plots
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = $35
  .label RASTER = $d012
  .label BGCOL = $d021
  .label VIC_CONTROL = $d011
  .label D011 = $d011
  .const VIC_BMM = $20
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label D018 = $d018
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // The vector used when the HARDWARE serves IRQ interrupts
  .label HARDWARE_IRQ = $fffe
  // The colors of the C64
  .const BLACK = 0
  .const WHITE = 1
  .label BITMAP = $2000
  .label SCREEN = $400
  .label frame_cnt = $e
  // @begin
bbegin:
  jmp b1
  // @1
b1:
  // [1] (byte) frame_cnt#0 ← (byte) 1 -- vbuz1=vbuc1 
  // Counts frames - updated by the IRQ
  lda #1
  sta frame_cnt
  // [2] phi from @1 to @2 [phi:@1->@2]
b2_from_b1:
  jmp b2
  // @2
b2:
  // [3] call main 
  // [5] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
  // [4] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
  // @end
bend:
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
    .label x = 2
    .label y = 4
    .label vx = 5
    .label vy = 7
    // [6] call bitmap_init 
    // [58] phi from main to bitmap_init [phi:main->bitmap_init]
  bitmap_init_from_main:
    jsr bitmap_init
    // [7] phi from main to main::@8 [phi:main->main::@8]
  b8_from_main:
    jmp b8
    // main::@8
  b8:
    // [8] call bitmap_clear 
    // [44] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear]
  bitmap_clear_from_b8:
    jsr bitmap_clear
    jmp b9
    // main::@9
  b9:
    // [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
    sta D011
    // [10] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181]
  toD0181_from_b9:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp b7
    // main::@7
  b7:
    // [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [12] call init_irq 
    jsr init_irq
    // [13] phi from main::@7 to main::@1 [phi:main::@7->main::@1]
  b1_from_b7:
    // [13] phi (byte) main::vy#2 = (byte) 1 [phi:main::@7->main::@1#0] -- vbuz1=vbuc1 
    lda #1
    sta vy
    // [13] phi (word) main::vx#2 = (byte) 1 [phi:main::@7->main::@1#1] -- vwuz1=vbuc1 
    lda #<1
    sta vx
    lda #>1
    sta vx+1
    // [13] phi (byte) main::y#2 = (byte) 0 [phi:main::@7->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta y
    // [13] phi (word) main::x#2 = (byte) 0 [phi:main::@7->main::@1#3] -- vwuz1=vbuc1 
    lda #<0
    sta x
    lda #>0
    sta x+1
    jmp b1
    // main::@1
  b1:
    jmp b2
    // main::@2
  b2:
    // [14] (word) bitmap_plot::x#0 ← (word) main::x#2
    // [15] (byte) bitmap_plot::y#0 ← (byte) main::y#2 -- vbuxx=vbuz1 
    ldx y
    // [16] call bitmap_plot 
    jsr bitmap_plot
    jmp b10
    // main::@10
  b10:
    // [17] (word) main::x#1 ← (word) main::x#2 + (word) main::vx#2 -- vwuz1=vwuz1_plus_vwuz2 
    lda x
    clc
    adc vx
    sta x
    lda x+1
    adc vx+1
    sta x+1
    // [18] (byte) main::y#1 ← (byte) main::y#2 + (byte) main::vy#2 -- vbuz1=vbuz1_plus_vbuz2 
    lda y
    clc
    adc vy
    sta y
    // [19] if((word) main::x#1==(word) $13f) goto main::@5 -- vwuz1_eq_vwuc1_then_la1 
    lda x
    cmp #<$13f
    bne !+
    lda x+1
    cmp #>$13f
    beq b5
  !:
    jmp b11
    // main::@11
  b11:
    // [20] if((word) main::x#1!=(byte) 0) goto main::@3 -- vwuz1_neq_0_then_la1 
    lda x
    bne b3_from_b11
    lda x+1
    bne b3_from_b11
    jmp b5
    // main::@5
  b5:
    // [21] (word) main::vx#1 ← - (word) main::vx#2 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc vx
    sta vx
    lda #0
    sbc vx+1
    sta vx+1
    // [22] phi from main::@11 main::@5 to main::@3 [phi:main::@11/main::@5->main::@3]
  b3_from_b11:
  b3_from_b5:
    // [22] phi (word) main::vx#6 = (word) main::vx#2 [phi:main::@11/main::@5->main::@3#0] -- register_copy 
    jmp b3
    // main::@3
  b3:
    // [23] if((byte) main::y#1==(byte) $c7) goto main::@6 -- vbuz1_eq_vbuc1_then_la1 
    lda #$c7
    cmp y
    beq b6
    jmp b12
    // main::@12
  b12:
    // [24] if((byte) main::y#1!=(byte) 0) goto main::@4 -- vbuz1_neq_0_then_la1 
    lda y
    cmp #0
    bne b4_from_b12
    jmp b6
    // main::@6
  b6:
    // [25] (byte) main::vy#1 ← - (byte) main::vy#2 -- vbuz1=_neg_vbuz1 
    lda vy
    eor #$ff
    clc
    adc #1
    sta vy
    // [26] phi from main::@12 main::@6 to main::@4 [phi:main::@12/main::@6->main::@4]
  b4_from_b12:
  b4_from_b6:
    // [26] phi (byte) main::vy#8 = (byte) main::vy#2 [phi:main::@12/main::@6->main::@4#0] -- register_copy 
    jmp b4
    // main::@4
  b4:
    // [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 
    ldx frame_cnt
    inc plots_per_frame,x
    // [13] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  b1_from_b4:
    // [13] phi (byte) main::vy#2 = (byte) main::vy#8 [phi:main::@4->main::@1#0] -- register_copy 
    // [13] phi (word) main::vx#2 = (word) main::vx#6 [phi:main::@4->main::@1#1] -- register_copy 
    // [13] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@4->main::@1#2] -- register_copy 
    // [13] phi (word) main::x#2 = (word) main::x#1 [phi:main::@4->main::@1#3] -- register_copy 
    jmp b1
}
  // bitmap_plot
// Plot a single dot in the bitmap
// bitmap_plot(word zeropage(2) x, byte register(X) y)
bitmap_plot: {
    .label _1 = $11
    .label plotter = $f
    .label x = 2
    // [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx 
    lda bitmap_plot_yhi,x
    sta plotter+1
    lda bitmap_plot_ylo,x
    sta plotter
    // [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 
    lda x
    and #<$fff8
    sta _1
    lda x+1
    and #>$fff8
    sta _1+1
    // [30] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 
    lda plotter
    clc
    adc _1
    sta plotter
    lda plotter+1
    adc _1+1
    sta plotter+1
    // [31] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 
    lda x
    // [32] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa 
    tay
    lda bitmap_plot_bit,y
    ldy #0
    ora (plotter),y
    ldy #0
    sta (plotter),y
    jmp breturn
    // bitmap_plot::@return
  breturn:
    // [33] return 
    rts
}
  // init_irq
// Setup the IRQ
init_irq: {
    // asm { sei  }
    sei
    // [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // [36] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // [37] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
    // [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 
    // Set raster line to $100
    lda #$80
    ora VIC_CONTROL
    sta VIC_CONTROL
    // [39] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta RASTER
    // [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<irq
    sta HARDWARE_IRQ
    lda #>irq
    sta HARDWARE_IRQ+1
    // asm { cli  }
    cli
    jmp breturn
    // init_irq::@return
  breturn:
    // [43] return 
    rts
}
  // bitmap_clear
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
    .const col = WHITE*$10
    // [45] call memset 
    // [49] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
  memset_from_bitmap_clear:
    // [49] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 
    ldx #col
    // [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 
    lda #<SCREEN
    sta memset.str
    lda #>SCREEN
    sta memset.str+1
    // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 
    lda #<$3e8
    sta memset.num
    lda #>$3e8
    sta memset.num+1
    jsr memset
    // [46] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1]
  b1_from_bitmap_clear:
    jmp b1
    // bitmap_clear::@1
  b1:
    // [47] call memset 
    // [49] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
  memset_from_b1:
    // [49] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 
    ldx #0
    // [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 
    lda #<BITMAP
    sta memset.str
    lda #>BITMAP
    sta memset.str+1
    // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 
    lda #<$1f40
    sta memset.num
    lda #>$1f40
    sta memset.num+1
    jsr memset
    jmp breturn
    // bitmap_clear::@return
  breturn:
    // [48] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zeropage($a) str, byte register(X) c, word zeropage(8) num)
memset: {
    .label end = 8
    .label dst = $a
    .label num = 8
    .label str = $a
    // [50] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 
    lda num
    bne !+
    lda num+1
    beq breturn
  !:
    jmp b1
    // memset::@1
  b1:
    // [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 
    lda end
    clc
    adc str
    sta end
    lda end+1
    adc str+1
    sta end+1
    // [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
    // [53] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2]
  b2_from_b1:
  b2_from_b2:
    // [53] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy 
    jmp b2
    // memset::@2
  b2:
    // [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx 
    txa
    ldy #0
    sta (dst),y
    // [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 
    lda dst+1
    cmp end+1
    bne b2_from_b2
    lda dst
    cmp end
    bne b2_from_b2
    jmp breturn
    // memset::@return
  breturn:
    // [57] return 
    rts
}
  // bitmap_init
// Initialize bitmap plotting tables
bitmap_init: {
    .label _7 = $13
    .label yoffs = $c
    // [59] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1]
  b1_from_bitmap_init:
    // [59] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [59] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 
    lda #$80
    jmp b1
    // [59] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1]
  b1_from_b2:
    // [59] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy 
    // [59] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy 
    jmp b1
    // bitmap_init::@1
  b1:
    // [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_bit,x
    // [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 
    lsr
    // [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne b6_from_b1
    // [64] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2]
  b2_from_b1:
    // [64] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 
    lda #$80
    jmp b2
    // [63] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6]
  b6_from_b1:
    jmp b6
    // bitmap_init::@6
  b6:
    // [64] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2]
  b2_from_b6:
    // [64] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy 
    jmp b2
    // bitmap_init::@2
  b2:
    // [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1_from_b2
    // [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
  b3_from_b2:
    // [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta yoffs
    lda #>BITMAP
    sta yoffs+1
    // [67] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b3
    // [67] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3]
  b3_from_b4:
    // [67] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy 
    // [67] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy 
    jmp b3
    // bitmap_init::@3
  b3:
    // [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 
    lda #7
    sax _7
    // [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda yoffs
    // [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa 
    ora _7
    // [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_ylo,x
    // [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda yoffs+1
    // [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_yhi,x
    // [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp _7
    bne b4_from_b3
    jmp b5
    // bitmap_init::@5
  b5:
    // [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda yoffs
    adc #<$28*8
    sta yoffs
    lda yoffs+1
    adc #>$28*8
    sta yoffs+1
    // [76] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4]
  b4_from_b3:
  b4_from_b5:
    // [76] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy 
    jmp b4
    // bitmap_init::@4
  b4:
    // [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3_from_b4
    jmp breturn
    // bitmap_init::@return
  breturn:
    // [79] return 
    rts
}
  // irq
// Interrupt Routine counting frames
irq: {
    // entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    // [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 
    lda #WHITE
    sta BGCOL
    // [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp frame_cnt
    beq b1_from_irq
    jmp b2
    // irq::@2
  b2:
    // [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 
    inc frame_cnt
    // [83] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1]
  b1_from_irq:
  b1_from_b2:
    // [83] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy 
    jmp b1
    // irq::@1
  b1:
    // [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 
    lda #BLACK
    sta BGCOL
    // [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #IRQ_RASTER
    sta IRQ_STATUS
    jmp breturn
    // irq::@return
  breturn:
    // [86] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
    rti
}
  // File Data
  // Tables for the plotter - initialized by calling bitmap_init();
  bitmap_plot_ylo: .fill $100, 0
  bitmap_plot_yhi: .fill $100, 0
  bitmap_plot_bit: .fill $100, 0
  plots_per_frame: .fill $100, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp bend
Removing instruction jmp b8
Removing instruction jmp b9
Removing instruction jmp toD0181
Removing instruction jmp b7
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b10
Removing instruction jmp b11
Removing instruction jmp b5
Removing instruction jmp b3
Removing instruction jmp b12
Removing instruction jmp b6
Removing instruction jmp b4
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b6
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b4
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #<1
Removing instruction lda #0
Removing instruction lda #<0
Removing instruction lda #>0
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b3_from_b11 with b3
Replacing label b3_from_b11 with b3
Replacing label b4_from_b12 with b4
Replacing label b1 with b2
Replacing label b2_from_b2 with b2
Replacing label b2_from_b2 with b2
Replacing label b6_from_b1 with b2
Replacing label b1_from_b2 with b1
Replacing label b4_from_b3 with b4
Replacing label b3_from_b4 with b3
Replacing label b1_from_irq with b1
Removing instruction b1:
Removing instruction b2_from_b1:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b8_from_main:
Removing instruction bitmap_clear_from_b8:
Removing instruction toD0181_from_b9:
Removing instruction toD0181:
Removing instruction b1:
Removing instruction b3_from_b11:
Removing instruction b3_from_b5:
Removing instruction b4_from_b12:
Removing instruction b4_from_b6:
Removing instruction b1_from_bitmap_clear:
Removing instruction memset_from_b1:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Removing instruction b1_from_b2:
Removing instruction b6_from_b1:
Removing instruction b6:
Removing instruction b2_from_b6:
Removing instruction b3_from_b4:
Removing instruction b4_from_b3:
Removing instruction b4_from_b5:
Removing instruction b1_from_irq:
Removing instruction b1_from_b2:
Removing instruction breturn:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction bitmap_init_from_main:
Removing instruction b8:
Removing instruction b9:
Removing instruction b7:
Removing instruction b1_from_b7:
Removing instruction b10:
Removing instruction b11:
Removing instruction b12:
Removing instruction b1_from_b4:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction memset_from_bitmap_clear:
Removing instruction b1:
Removing instruction breturn:
Removing instruction b1:
Removing instruction b1_from_bitmap_init:
Removing instruction b2_from_b1:
Removing instruction b3_from_b2:
Removing instruction b5:
Removing instruction breturn:
Removing instruction b2:
Succesful ASM optimization Pass5UnusedLabelElimination
Adding RTS to root block 
Succesful ASM optimization Pass5AddMainRts
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
(label) @1
(label) @2
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = (byte*) 53281
(byte*) BITMAP
(const byte*) BITMAP#0 BITMAP = (byte*) 8192
(byte) BLACK
(const byte) BLACK#0 BLACK = (byte) 0
(byte*) CIA1_INTERRUPT
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333
(byte) CIA_INTERRUPT_CLEAR
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f
(byte*) D011
(const byte*) D011#0 D011 = (byte*) 53265
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(void()**) HARDWARE_IRQ
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534
(byte*) IRQ_ENABLE
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274
(byte) IRQ_RASTER
(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte) 1
(byte*) IRQ_STATUS
(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = (byte*) 1
(byte*) PROCPORT_DDR
(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0
(byte) PROCPORT_DDR_MEMORY_MASK
(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7
(byte) PROCPORT_RAM_IO
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte) VIC_BMM
(const byte) VIC_BMM#0 VIC_BMM = (byte) $20
(byte*) VIC_CONTROL
(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265
(byte) VIC_DEN
(const byte) VIC_DEN#0 VIC_DEN = (byte) $10
(byte) VIC_RSEL
(const byte) VIC_RSEL#0 VIC_RSEL = (byte) 8
(byte) WHITE
(const byte) WHITE#0 WHITE = (byte) 1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
(const byte) bitmap_clear::col#0 col = (const byte) WHITE#0*(byte) $10
(byte) bitmap_clear::fgcol
(byte*) bitmap_gfx
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(byte~) bitmap_init::$4 reg byte a 22.0
(byte~) bitmap_init::$5 reg byte a 22.0
(byte~) bitmap_init::$6 reg byte a 22.0
(byte~) bitmap_init::$7 $7 zp ZP_BYTE:19 5.5
(label) bitmap_init::@1
(label) bitmap_init::@2
(label) bitmap_init::@3
(label) bitmap_init::@4
(label) bitmap_init::@5
(label) bitmap_init::@6
(label) bitmap_init::@return
(byte) bitmap_init::bits
(byte) bitmap_init::bits#1 reg byte a 11.0
(byte) bitmap_init::bits#3 reg byte a 16.5
(byte) bitmap_init::bits#4 reg byte a 7.333333333333333
(byte*) bitmap_init::gfx
(byte*) bitmap_init::screen
(byte) bitmap_init::x
(byte) bitmap_init::x#1 reg byte x 16.5
(byte) bitmap_init::x#2 reg byte x 5.5
(byte) bitmap_init::y
(byte) bitmap_init::y#1 reg byte x 16.5
(byte) bitmap_init::y#2 reg byte x 5.5
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:12 22.0
(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:12 6.875
(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:12 11.0
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(word~) bitmap_plot::$1 $1 zp ZP_WORD:17 4.0
(byte~) bitmap_plot::$2 reg byte a 4.0
(label) bitmap_plot::@return
(byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 plotter zp ZP_WORD:15 1.0
(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:15 3.0
(word) bitmap_plot::x
(word) bitmap_plot::x#0 x zp ZP_WORD:2 3.0
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0 reg byte x 15.0
(byte[$100]) bitmap_plot_bit
(const byte[$100]) bitmap_plot_bit#0 bitmap_plot_bit = { fill( $100, 0) }
(byte[$100]) bitmap_plot_yhi
(const byte[$100]) bitmap_plot_yhi#0 bitmap_plot_yhi = { fill( $100, 0) }
(byte[$100]) bitmap_plot_ylo
(const byte[$100]) bitmap_plot_ylo#0 bitmap_plot_ylo = { fill( $100, 0) }
(byte*) bitmap_screen
(byte) frame_cnt
(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:14 1.1111111111111112
(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:14 4.0
(byte) frame_cnt#10 frame_cnt zp ZP_BYTE:14 40.0
(void()) init_irq()
(label) init_irq::@return
interrupt(HARDWARE_CLOBBER)(void()) irq()
(label) irq::@1
(label) irq::@2
(label) irq::@return
(void()) main()
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(word) main::vx
(word) main::vx#1 vx zp ZP_WORD:5 22.0
(word) main::vx#2 vx zp ZP_WORD:5 5.5
(word) main::vx#6 vx zp ZP_WORD:5 5.5
(byte) main::vy
(byte) main::vy#1 vy zp ZP_BYTE:7 22.0
(byte) main::vy#2 vy zp ZP_BYTE:7 3.6666666666666665
(byte) main::vy#8 vy zp ZP_BYTE:7 16.5
(word) main::x
(word) main::x#1 x zp ZP_WORD:2 4.0
(word) main::x#2 x zp ZP_WORD:2 8.25
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:4 4.4
(byte) main::y#2 y zp ZP_BYTE:4 6.6000000000000005
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@return
(byte) memset::c
(byte) memset::c#3 reg byte x 1.375
(byte*) memset::dst
(byte*) memset::dst#1 dst zp ZP_WORD:10 16.5
(byte*) memset::dst#2 dst zp ZP_WORD:10 17.5
(byte*~) memset::dst#3 dst zp ZP_WORD:10 4.0
(byte*) memset::end
(byte*) memset::end#0 end zp ZP_WORD:8 2.1666666666666665
(word) memset::num
(word) memset::num#2 num zp ZP_WORD:8 2.0
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp ZP_WORD:10
(byte[$100]) plots_per_frame
(const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) }

zp ZP_WORD:2 [ main::x#2 main::x#1 bitmap_plot::x#0 ]
zp ZP_BYTE:4 [ main::y#2 main::y#1 ]
zp ZP_WORD:5 [ main::vx#2 main::vx#6 main::vx#1 ]
zp ZP_BYTE:7 [ main::vy#2 main::vy#8 main::vy#1 ]
zp ZP_WORD:8 [ memset::num#2 memset::end#0 ]
zp ZP_WORD:10 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ]
reg byte x [ memset::c#3 ]
reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ]
reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ]
zp ZP_WORD:12 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
zp ZP_BYTE:14 [ frame_cnt#10 frame_cnt#0 frame_cnt#1 ]
reg byte x [ bitmap_plot::y#0 ]
zp ZP_WORD:15 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 ]
zp ZP_WORD:17 [ bitmap_plot::$1 ]
reg byte a [ bitmap_plot::$2 ]
zp ZP_BYTE:19 [ bitmap_init::$7 ]
reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ]


FINAL ASSEMBLER
Score: 3147

  // File Comments
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
// Plots simple plots
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // Processor port data direction register
  .label PROCPORT_DDR = 0
  // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
  .const PROCPORT_DDR_MEMORY_MASK = 7
  // Processor Port Register controlling RAM/ROM configuration and the datasette
  .label PROCPORT = 1
  // RAM in $A000, $E000 I/O in $D000
  .const PROCPORT_RAM_IO = $35
  .label RASTER = $d012
  .label BGCOL = $d021
  .label VIC_CONTROL = $d011
  .label D011 = $d011
  .const VIC_BMM = $20
  .const VIC_DEN = $10
  .const VIC_RSEL = 8
  .label D018 = $d018
  // VIC II IRQ Status Register
  .label IRQ_STATUS = $d019
  // VIC II IRQ Enable Register
  .label IRQ_ENABLE = $d01a
  // Bits for the IRQ Status/Enable Registers
  .const IRQ_RASTER = 1
  // CIA#1 Interrupt Status & Control Register
  .label CIA1_INTERRUPT = $dc0d
  // Value that disables all CIA interrupts when stored to the CIA Interrupt registers
  .const CIA_INTERRUPT_CLEAR = $7f
  // The vector used when the HARDWARE serves IRQ interrupts
  .label HARDWARE_IRQ = $fffe
  // The colors of the C64
  .const BLACK = 0
  .const WHITE = 1
  .label BITMAP = $2000
  .label SCREEN = $400
  .label frame_cnt = $e
  // @begin
bbegin:
  // @1
  // frame_cnt = 1
  // [1] (byte) frame_cnt#0 ← (byte) 1 -- vbuz1=vbuc1 
  // Counts frames - updated by the IRQ
  lda #1
  sta frame_cnt
  // [2] phi from @1 to @2 [phi:@1->@2]
  // @2
  // [3] call main 
  // [5] phi from @2 to main [phi:@2->main]
  jsr main
  rts
  // [4] phi from @2 to @end [phi:@2->@end]
  // @end
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f
    .label x = 2
    .label y = 4
    .label vx = 5
    .label vy = 7
    // bitmap_init(BITMAP, SCREEN)
    // [6] call bitmap_init 
    // [58] phi from main to bitmap_init [phi:main->bitmap_init]
    jsr bitmap_init
    // [7] phi from main to main::@8 [phi:main->main::@8]
    // main::@8
    // bitmap_clear(BLACK, WHITE)
    // [8] call bitmap_clear 
    // [44] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear]
    jsr bitmap_clear
    // main::@9
    // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3
    // [9] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 
    lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
    sta D011
    // [10] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181]
    // main::toD0181
    // main::@7
    // *D018 = toD018(SCREEN, BITMAP)
    // [11] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // init_irq()
    // [12] call init_irq 
    jsr init_irq
    // [13] phi from main::@7 to main::@1 [phi:main::@7->main::@1]
    // [13] phi (byte) main::vy#2 = (byte) 1 [phi:main::@7->main::@1#0] -- vbuz1=vbuc1 
    lda #1
    sta vy
    // [13] phi (word) main::vx#2 = (byte) 1 [phi:main::@7->main::@1#1] -- vwuz1=vbuc1 
    sta vx
    lda #>1
    sta vx+1
    // [13] phi (byte) main::y#2 = (byte) 0 [phi:main::@7->main::@1#2] -- vbuz1=vbuc1 
    sta y
    // [13] phi (word) main::x#2 = (byte) 0 [phi:main::@7->main::@1#3] -- vwuz1=vbuc1 
    sta x
    sta x+1
    // main::@1
    // main::@2
  b2:
    // bitmap_plot(x, y)
    // [14] (word) bitmap_plot::x#0 ← (word) main::x#2
    // [15] (byte) bitmap_plot::y#0 ← (byte) main::y#2 -- vbuxx=vbuz1 
    ldx y
    // [16] call bitmap_plot 
    jsr bitmap_plot
    // main::@10
    // x += vx
    // [17] (word) main::x#1 ← (word) main::x#2 + (word) main::vx#2 -- vwuz1=vwuz1_plus_vwuz2 
    lda x
    clc
    adc vx
    sta x
    lda x+1
    adc vx+1
    sta x+1
    // y += vy
    // [18] (byte) main::y#1 ← (byte) main::y#2 + (byte) main::vy#2 -- vbuz1=vbuz1_plus_vbuz2 
    lda y
    clc
    adc vy
    sta y
    // if(x==319 || x==0)
    // [19] if((word) main::x#1==(word) $13f) goto main::@5 -- vwuz1_eq_vwuc1_then_la1 
    lda x
    cmp #<$13f
    bne !+
    lda x+1
    cmp #>$13f
    beq b5
  !:
    // main::@11
    // [20] if((word) main::x#1!=(byte) 0) goto main::@3 -- vwuz1_neq_0_then_la1 
    lda x
    bne b3
    lda x+1
    bne b3
    // main::@5
  b5:
    // vx = -vx
    // [21] (word) main::vx#1 ← - (word) main::vx#2 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc vx
    sta vx
    lda #0
    sbc vx+1
    sta vx+1
    // [22] phi from main::@11 main::@5 to main::@3 [phi:main::@11/main::@5->main::@3]
    // [22] phi (word) main::vx#6 = (word) main::vx#2 [phi:main::@11/main::@5->main::@3#0] -- register_copy 
    // main::@3
  b3:
    // if(y==199 || y==0)
    // [23] if((byte) main::y#1==(byte) $c7) goto main::@6 -- vbuz1_eq_vbuc1_then_la1 
    lda #$c7
    cmp y
    beq b6
    // main::@12
    // [24] if((byte) main::y#1!=(byte) 0) goto main::@4 -- vbuz1_neq_0_then_la1 
    lda y
    cmp #0
    bne b4
    // main::@6
  b6:
    // vy = -vy
    // [25] (byte) main::vy#1 ← - (byte) main::vy#2 -- vbuz1=_neg_vbuz1 
    lda vy
    eor #$ff
    clc
    adc #1
    sta vy
    // [26] phi from main::@12 main::@6 to main::@4 [phi:main::@12/main::@6->main::@4]
    // [26] phi (byte) main::vy#8 = (byte) main::vy#2 [phi:main::@12/main::@6->main::@4#0] -- register_copy 
    // main::@4
  b4:
    // plots_per_frame[frame_cnt]++;
    // [27] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 
    ldx frame_cnt
    inc plots_per_frame,x
    // [13] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
    // [13] phi (byte) main::vy#2 = (byte) main::vy#8 [phi:main::@4->main::@1#0] -- register_copy 
    // [13] phi (word) main::vx#2 = (word) main::vx#6 [phi:main::@4->main::@1#1] -- register_copy 
    // [13] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@4->main::@1#2] -- register_copy 
    // [13] phi (word) main::x#2 = (word) main::x#1 [phi:main::@4->main::@1#3] -- register_copy 
    jmp b2
}
  // bitmap_plot
// Plot a single dot in the bitmap
// bitmap_plot(word zeropage(2) x, byte register(X) y)
bitmap_plot: {
    .label _1 = $11
    .label plotter = $f
    .label x = 2
    // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] }
    // [28] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx 
    lda bitmap_plot_yhi,x
    sta plotter+1
    lda bitmap_plot_ylo,x
    sta plotter
    // x & $fff8
    // [29] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 
    lda x
    and #<$fff8
    sta _1
    lda x+1
    and #>$fff8
    sta _1+1
    // plotter += ( x & $fff8 )
    // [30] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 
    lda plotter
    clc
    adc _1
    sta plotter
    lda plotter+1
    adc _1+1
    sta plotter+1
    // <x
    // [31] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 
    lda x
    // *plotter |= bitmap_plot_bit[<x]
    // [32] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa 
    tay
    lda bitmap_plot_bit,y
    ldy #0
    ora (plotter),y
    sta (plotter),y
    // bitmap_plot::@return
    // }
    // [33] return 
    rts
}
  // init_irq
// Setup the IRQ
init_irq: {
    // asm
    // asm { sei  }
    sei
    // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
    // [35] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 
    // Disable kernal & basic
    lda #PROCPORT_DDR_MEMORY_MASK
    sta PROCPORT_DDR
    // *PROCPORT = PROCPORT_RAM_IO
    // [36] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 
    lda #PROCPORT_RAM_IO
    sta PROCPORT
    // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR
    // [37] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 
    // Disable CIA 1 Timer IRQ
    lda #CIA_INTERRUPT_CLEAR
    sta CIA1_INTERRUPT
    // *VIC_CONTROL |=$80
    // [38] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 
    // Set raster line to $100
    lda #$80
    ora VIC_CONTROL
    sta VIC_CONTROL
    // *RASTER = $00
    // [39] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 
    lda #0
    sta RASTER
    // *IRQ_ENABLE = IRQ_RASTER
    // [40] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Enable Raster Interrupt
    lda #IRQ_RASTER
    sta IRQ_ENABLE
    // *HARDWARE_IRQ = &irq
    // [41] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 
    // Set the IRQ routine
    lda #<irq
    sta HARDWARE_IRQ
    lda #>irq
    sta HARDWARE_IRQ+1
    // asm
    // asm { cli  }
    cli
    // init_irq::@return
    // }
    // [43] return 
    rts
}
  // bitmap_clear
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
    .const col = WHITE*$10
    // memset(bitmap_screen, col, 1000uw)
    // [45] call memset 
    // [49] phi from bitmap_clear to memset [phi:bitmap_clear->memset]
    // [49] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 
    ldx #col
    // [49] phi (void*) memset::str#3 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#1] -- pvoz1=pvoc1 
    lda #<SCREEN
    sta memset.str
    lda #>SCREEN
    sta memset.str+1
    // [49] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#2] -- vwuz1=vwuc1 
    lda #<$3e8
    sta memset.num
    lda #>$3e8
    sta memset.num+1
    jsr memset
    // [46] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1]
    // bitmap_clear::@1
    // memset(bitmap_gfx, 0, 8000uw)
    // [47] call memset 
    // [49] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset]
    // [49] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 
    ldx #0
    // [49] phi (void*) memset::str#3 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#1] -- pvoz1=pvoc1 
    lda #<BITMAP
    sta memset.str
    lda #>BITMAP
    sta memset.str+1
    // [49] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#2] -- vwuz1=vwuc1 
    lda #<$1f40
    sta memset.num
    lda #>$1f40
    sta memset.num+1
    jsr memset
    // bitmap_clear::@return
    // }
    // [48] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zeropage($a) str, byte register(X) c, word zeropage(8) num)
memset: {
    .label end = 8
    .label dst = $a
    .label num = 8
    .label str = $a
    // if(num>0)
    // [50] if((word) memset::num#2<=(byte) 0) goto memset::@return -- vwuz1_le_0_then_la1 
    lda num
    bne !+
    lda num+1
    beq breturn
  !:
    // memset::@1
    // end = (char*)str + num
    // [51] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 
    lda end
    clc
    adc str
    sta end
    lda end+1
    adc str+1
    sta end+1
    // [52] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
    // [53] phi from memset::@1 memset::@2 to memset::@2 [phi:memset::@1/memset::@2->memset::@2]
    // [53] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset::@1/memset::@2->memset::@2#0] -- register_copy 
    // memset::@2
  b2:
    // *dst = c
    // [54] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx 
    txa
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [56] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuz2_then_la1 
    lda dst+1
    cmp end+1
    bne b2
    lda dst
    cmp end
    bne b2
    // memset::@return
  breturn:
    // }
    // [57] return 
    rts
}
  // bitmap_init
// Initialize bitmap plotting tables
bitmap_init: {
    .label _7 = $13
    .label yoffs = $c
    // [59] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1]
    // [59] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [59] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 
    lda #$80
    // [59] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1]
    // [59] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy 
    // [59] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy 
    // bitmap_init::@1
  b1:
    // bitmap_plot_bit[x] = bits
    // [60] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_bit,x
    // bits >>= 1
    // [61] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 
    lsr
    // if(bits==0)
    // [62] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne b2
    // [64] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2]
    // [64] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 
    lda #$80
    // [63] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6]
    // bitmap_init::@6
    // [64] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2]
    // [64] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy 
    // bitmap_init::@2
  b2:
    // for(byte x : 0..255)
    // [65] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx 
    inx
    // [66] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1
    // [67] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3]
    // [67] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 
    lda #<BITMAP
    sta yoffs
    lda #>BITMAP
    sta yoffs+1
    // [67] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 
    ldx #0
    // [67] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3]
    // [67] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy 
    // [67] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy 
    // bitmap_init::@3
  b3:
    // y&$7
    // [68] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 
    lda #7
    sax _7
    // <yoffs
    // [69] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 
    lda yoffs
    // y&$7 | <yoffs
    // [70] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa 
    ora _7
    // bitmap_plot_ylo[y] = y&$7 | <yoffs
    // [71] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_ylo,x
    // >yoffs
    // [72] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 
    lda yoffs+1
    // bitmap_plot_yhi[y] = >yoffs
    // [73] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta bitmap_plot_yhi,x
    // if((y&$7)==7)
    // [74] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 
    lda #7
    cmp _7
    bne b4
    // bitmap_init::@5
    // yoffs = yoffs + 40*8
    // [75] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda yoffs
    adc #<$28*8
    sta yoffs
    lda yoffs+1
    adc #>$28*8
    sta yoffs+1
    // [76] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4]
    // [76] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy 
    // bitmap_init::@4
  b4:
    // for(byte y : 0..255)
    // [77] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [78] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3
    // bitmap_init::@return
    // }
    // [79] return 
    rts
}
  // irq
// Interrupt Routine counting frames
irq: {
    // entry interrupt(HARDWARE_CLOBBER)
    sta rega+1
    // *BGCOL = WHITE
    // [80] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 
    lda #WHITE
    sta BGCOL
    // if(frame_cnt)
    // [81] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp frame_cnt
    beq b1
    // irq::@2
    // frame_cnt++;
    // [82] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 
    inc frame_cnt
    // [83] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1]
    // [83] phi (byte) frame_cnt#10 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy 
    // irq::@1
  b1:
    // *BGCOL = BLACK
    // [84] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 
    lda #BLACK
    sta BGCOL
    // *IRQ_STATUS = IRQ_RASTER
    // [85] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 
    // Acknowledge the IRQ
    lda #IRQ_RASTER
    sta IRQ_STATUS
    // irq::@return
    // }
    // [86] return  - exit interrupt(HARDWARE_CLOBBER)
  rega:
    lda #00
    rti
}
  // File Data
  // Tables for the plotter - initialized by calling bitmap_init();
  bitmap_plot_ylo: .fill $100, 0
  bitmap_plot_yhi: .fill $100, 0
  bitmap_plot_bit: .fill $100, 0
  plots_per_frame: .fill $100, 0

