
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) 53248
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) 53266
  (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53280
  (byte*) SCROLL#0 ← ((byte*)) (word/dword/signed dword) 53270
  (byte*) TEXT#0 ← (const string) $0
  to:@1
main: scope:[main]  from @6
  (byte*) TEXT#15 ← phi( @6/(byte*) TEXT#17 )
  (byte*) CHARGEN#13 ← phi( @6/(byte*) CHARGEN#15 )
  (byte*) PROCPORT#17 ← phi( @6/(byte*) PROCPORT#19 )
  (byte*) SCROLL#10 ← phi( @6/(byte*) SCROLL#12 )
  (byte*) current_chargen#31 ← phi( @6/(byte*) current_chargen#21 )
  (byte*) nxt#37 ← phi( @6/(byte*) nxt#26 )
  (byte) current_bit#32 ← phi( @6/(byte) current_bit#23 )
  (byte) scroll#22 ← phi( @6/(byte) scroll#15 )
  (byte*) BGCOL#7 ← phi( @6/(byte*) BGCOL#8 )
  (byte*) RASTER#5 ← phi( @6/(byte*) RASTER#7 )
  (byte*) SCREEN#1 ← phi( @6/(byte*) SCREEN#4 )
  (byte*) fillscreen::screen#0 ← (byte*) SCREEN#1
  (byte) fillscreen::fill#0 ← (byte/signed byte/word/signed word/dword/signed dword) 32
  call fillscreen 
  to:main::@7
main::@7: scope:[main]  from main
  (byte*) TEXT#14 ← phi( main/(byte*) TEXT#15 )
  (byte*) CHARGEN#12 ← phi( main/(byte*) CHARGEN#13 )
  (byte*) SCREEN#19 ← phi( main/(byte*) SCREEN#1 )
  (byte*) PROCPORT#16 ← phi( main/(byte*) PROCPORT#17 )
  (byte*) SCROLL#9 ← phi( main/(byte*) SCROLL#10 )
  (byte*) current_chargen#30 ← phi( main/(byte*) current_chargen#31 )
  (byte*) nxt#35 ← phi( main/(byte*) nxt#37 )
  (byte) current_bit#31 ← phi( main/(byte) current_bit#32 )
  (byte) scroll#21 ← phi( main/(byte) scroll#22 )
  (byte*) BGCOL#6 ← phi( main/(byte*) BGCOL#7 )
  (byte*) RASTER#4 ← phi( main/(byte*) RASTER#5 )
  to:main::@2
main::@1: scope:[main]  from main::@8
  (byte*) TEXT#13 ← phi( main::@8/(byte*) TEXT#16 )
  (byte*) CHARGEN#11 ← phi( main::@8/(byte*) CHARGEN#14 )
  (byte*) SCREEN#18 ← phi( main::@8/(byte*) SCREEN#20 )
  (byte*) PROCPORT#15 ← phi( main::@8/(byte*) PROCPORT#18 )
  (byte*) SCROLL#8 ← phi( main::@8/(byte*) SCROLL#11 )
  (byte*) current_chargen#29 ← phi( main::@8/(byte*) current_chargen#0 )
  (byte*) nxt#34 ← phi( main::@8/(byte*) nxt#0 )
  (byte) current_bit#30 ← phi( main::@8/(byte) current_bit#0 )
  (byte) scroll#20 ← phi( main::@8/(byte) scroll#0 )
  (byte*) BGCOL#5 ← phi( main::@8/(byte*) BGCOL#2 )
  (byte*) RASTER#3 ← phi( main::@8/(byte*) RASTER#6 )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@2 main::@7
  (byte*) TEXT#12 ← phi( main::@1/(byte*) TEXT#13 main::@2/(byte*) TEXT#12 main::@7/(byte*) TEXT#14 )
  (byte*) CHARGEN#10 ← phi( main::@1/(byte*) CHARGEN#11 main::@2/(byte*) CHARGEN#10 main::@7/(byte*) CHARGEN#12 )
  (byte*) SCREEN#17 ← phi( main::@1/(byte*) SCREEN#18 main::@2/(byte*) SCREEN#17 main::@7/(byte*) SCREEN#19 )
  (byte*) PROCPORT#14 ← phi( main::@1/(byte*) PROCPORT#15 main::@2/(byte*) PROCPORT#14 main::@7/(byte*) PROCPORT#16 )
  (byte*) SCROLL#7 ← phi( main::@1/(byte*) SCROLL#8 main::@2/(byte*) SCROLL#7 main::@7/(byte*) SCROLL#9 )
  (byte*) current_chargen#27 ← phi( main::@1/(byte*) current_chargen#29 main::@2/(byte*) current_chargen#27 main::@7/(byte*) current_chargen#30 )
  (byte*) nxt#31 ← phi( main::@1/(byte*) nxt#34 main::@2/(byte*) nxt#31 main::@7/(byte*) nxt#35 )
  (byte) current_bit#29 ← phi( main::@1/(byte) current_bit#30 main::@2/(byte) current_bit#29 main::@7/(byte) current_bit#31 )
  (byte) scroll#18 ← phi( main::@1/(byte) scroll#20 main::@2/(byte) scroll#18 main::@7/(byte) scroll#21 )
  (byte*) BGCOL#4 ← phi( main::@1/(byte*) BGCOL#5 main::@2/(byte*) BGCOL#4 main::@7/(byte*) BGCOL#6 )
  (byte*) RASTER#1 ← phi( main::@1/(byte*) RASTER#3 main::@2/(byte*) RASTER#1 main::@7/(byte*) RASTER#4 )
  (bool~) main::$1 ← *((byte*) RASTER#1) != (byte/word/signed word/dword/signed dword) 254
  if((bool~) main::$1) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  (byte*) TEXT#11 ← phi( main::@2/(byte*) TEXT#12 main::@3/(byte*) TEXT#11 )
  (byte*) CHARGEN#9 ← phi( main::@2/(byte*) CHARGEN#10 main::@3/(byte*) CHARGEN#9 )
  (byte*) SCREEN#16 ← phi( main::@2/(byte*) SCREEN#17 main::@3/(byte*) SCREEN#16 )
  (byte*) PROCPORT#13 ← phi( main::@2/(byte*) PROCPORT#14 main::@3/(byte*) PROCPORT#13 )
  (byte*) SCROLL#6 ← phi( main::@2/(byte*) SCROLL#7 main::@3/(byte*) SCROLL#6 )
  (byte*) current_chargen#22 ← phi( main::@2/(byte*) current_chargen#27 main::@3/(byte*) current_chargen#22 )
  (byte*) nxt#27 ← phi( main::@2/(byte*) nxt#31 main::@3/(byte*) nxt#27 )
  (byte) current_bit#24 ← phi( main::@2/(byte) current_bit#29 main::@3/(byte) current_bit#24 )
  (byte) scroll#16 ← phi( main::@2/(byte) scroll#18 main::@3/(byte) scroll#16 )
  (byte*) BGCOL#3 ← phi( main::@2/(byte*) BGCOL#4 main::@3/(byte*) BGCOL#3 )
  (byte*) RASTER#2 ← phi( main::@2/(byte*) RASTER#1 main::@3/(byte*) RASTER#2 )
  (bool~) main::$2 ← *((byte*) RASTER#2) != (byte/word/signed word/dword/signed dword) 255
  if((bool~) main::$2) goto main::@3
  to:main::@5
main::@5: scope:[main]  from main::@3
  (byte*) TEXT#10 ← phi( main::@3/(byte*) TEXT#11 )
  (byte*) CHARGEN#8 ← phi( main::@3/(byte*) CHARGEN#9 )
  (byte*) SCREEN#15 ← phi( main::@3/(byte*) SCREEN#16 )
  (byte*) PROCPORT#12 ← phi( main::@3/(byte*) PROCPORT#13 )
  (byte*) RASTER#8 ← phi( main::@3/(byte*) RASTER#2 )
  (byte*) SCROLL#4 ← phi( main::@3/(byte*) SCROLL#6 )
  (byte*) current_chargen#15 ← phi( main::@3/(byte*) current_chargen#22 )
  (byte*) nxt#21 ← phi( main::@3/(byte*) nxt#27 )
  (byte) current_bit#17 ← phi( main::@3/(byte) current_bit#24 )
  (byte) scroll#13 ← phi( main::@3/(byte) scroll#16 )
  (byte*) BGCOL#1 ← phi( main::@3/(byte*) BGCOL#3 )
  *((byte*) BGCOL#1) ← ++ *((byte*) BGCOL#1)
  call scroll_soft 
  to:main::@8
main::@8: scope:[main]  from main::@5
  (byte*) TEXT#16 ← phi( main::@5/(byte*) TEXT#10 )
  (byte*) CHARGEN#14 ← phi( main::@5/(byte*) CHARGEN#8 )
  (byte*) SCREEN#20 ← phi( main::@5/(byte*) SCREEN#15 )
  (byte*) PROCPORT#18 ← phi( main::@5/(byte*) PROCPORT#12 )
  (byte*) SCROLL#11 ← phi( main::@5/(byte*) SCROLL#4 )
  (byte*) RASTER#6 ← phi( main::@5/(byte*) RASTER#8 )
  (byte*) BGCOL#2 ← phi( main::@5/(byte*) BGCOL#1 )
  (byte*) current_chargen#8 ← phi( main::@5/(byte*) current_chargen#3 )
  (byte*) nxt#11 ← phi( main::@5/(byte*) nxt#3 )
  (byte) current_bit#9 ← phi( main::@5/(byte) current_bit#3 )
  (byte) scroll#7 ← phi( main::@5/(byte) scroll#5 )
  (byte) scroll#0 ← (byte) scroll#7
  (byte) current_bit#0 ← (byte) current_bit#9
  (byte*) nxt#0 ← (byte*) nxt#11
  (byte*) current_chargen#0 ← (byte*) current_chargen#8
  *((byte*) BGCOL#2) ← -- *((byte*) BGCOL#2)
  if(true) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@8
  (byte*) current_chargen#9 ← phi( main::@8/(byte*) current_chargen#0 )
  (byte*) nxt#12 ← phi( main::@8/(byte*) nxt#0 )
  (byte) current_bit#10 ← phi( main::@8/(byte) current_bit#0 )
  (byte) scroll#8 ← phi( main::@8/(byte) scroll#0 )
  (byte) scroll#1 ← (byte) scroll#8
  (byte) current_bit#1 ← (byte) current_bit#10
  (byte*) nxt#1 ← (byte*) nxt#12
  (byte*) current_chargen#1 ← (byte*) current_chargen#9
  return 
  to:@return
@1: scope:[]  from @begin
  (byte*) PROCPORT#22 ← phi( @begin/(byte*) PROCPORT#0 )
  (byte*) SCROLL#15 ← phi( @begin/(byte*) SCROLL#0 )
  (byte*) BGCOL#11 ← phi( @begin/(byte*) BGCOL#0 )
  (byte*) RASTER#11 ← phi( @begin/(byte*) RASTER#0 )
  (byte*) SCREEN#14 ← phi( @begin/(byte*) SCREEN#0 )
  (byte*) TEXT#5 ← phi( @begin/(byte*) TEXT#0 )
  (byte*) CHARGEN#3 ← phi( @begin/(byte*) CHARGEN#0 )
  (byte) scroll#2 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  to:@2
scroll_soft: scope:[scroll_soft]  from main::@5
  (byte*) TEXT#9 ← phi( main::@5/(byte*) TEXT#10 )
  (byte*) CHARGEN#7 ← phi( main::@5/(byte*) CHARGEN#8 )
  (byte*) SCREEN#13 ← phi( main::@5/(byte*) SCREEN#15 )
  (byte*) PROCPORT#11 ← phi( main::@5/(byte*) PROCPORT#12 )
  (byte*) current_chargen#23 ← phi( main::@5/(byte*) current_chargen#15 )
  (byte*) nxt#28 ← phi( main::@5/(byte*) nxt#21 )
  (byte) current_bit#25 ← phi( main::@5/(byte) current_bit#17 )
  (byte*) SCROLL#2 ← phi( main::@5/(byte*) SCROLL#4 )
  (byte) scroll#9 ← phi( main::@5/(byte) scroll#13 )
  (byte) scroll#3 ← -- (byte) scroll#9
  (bool~) scroll_soft::$0 ← (byte) scroll#3 == (byte/word/signed word/dword/signed dword) 255
  (bool~) scroll_soft::$1 ← ! (bool~) scroll_soft::$0
  if((bool~) scroll_soft::$1) goto scroll_soft::@1
  to:scroll_soft::@2
scroll_soft::@1: scope:[scroll_soft]  from scroll_soft scroll_soft::@3
  (byte*) current_chargen#17 ← phi( scroll_soft/(byte*) current_chargen#23 scroll_soft::@3/(byte*) current_chargen#2 )
  (byte*) nxt#23 ← phi( scroll_soft/(byte*) nxt#28 scroll_soft::@3/(byte*) nxt#2 )
  (byte) current_bit#19 ← phi( scroll_soft/(byte) current_bit#25 scroll_soft::@3/(byte) current_bit#2 )
  (byte*) SCROLL#1 ← phi( scroll_soft/(byte*) SCROLL#2 scroll_soft::@3/(byte*) SCROLL#3 )
  (byte) scroll#10 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@3/(byte) scroll#14 )
  *((byte*) SCROLL#1) ← (byte) scroll#10
  to:scroll_soft::@return
scroll_soft::@2: scope:[scroll_soft]  from scroll_soft
  (byte*) TEXT#8 ← phi( scroll_soft/(byte*) TEXT#9 )
  (byte*) CHARGEN#6 ← phi( scroll_soft/(byte*) CHARGEN#7 )
  (byte*) SCREEN#10 ← phi( scroll_soft/(byte*) SCREEN#13 )
  (byte*) PROCPORT#9 ← phi( scroll_soft/(byte*) PROCPORT#11 )
  (byte*) SCROLL#5 ← phi( scroll_soft/(byte*) SCROLL#2 )
  (byte*) current_chargen#16 ← phi( scroll_soft/(byte*) current_chargen#23 )
  (byte*) nxt#22 ← phi( scroll_soft/(byte*) nxt#28 )
  (byte) current_bit#18 ← phi( scroll_soft/(byte) current_bit#25 )
  (byte) scroll#4 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  call scroll_bit 
  to:scroll_soft::@3
scroll_soft::@3: scope:[scroll_soft]  from scroll_soft::@2
  (byte*) SCROLL#3 ← phi( scroll_soft::@2/(byte*) SCROLL#5 )
  (byte) scroll#14 ← phi( scroll_soft::@2/(byte) scroll#4 )
  (byte*) current_chargen#10 ← phi( scroll_soft::@2/(byte*) current_chargen#6 )
  (byte*) nxt#13 ← phi( scroll_soft::@2/(byte*) nxt#5 )
  (byte) current_bit#11 ← phi( scroll_soft::@2/(byte) current_bit#7 )
  (byte) current_bit#2 ← (byte) current_bit#11
  (byte*) nxt#2 ← (byte*) nxt#13
  (byte*) current_chargen#2 ← (byte*) current_chargen#10
  to:scroll_soft::@1
scroll_soft::@return: scope:[scroll_soft]  from scroll_soft::@1
  (byte*) current_chargen#11 ← phi( scroll_soft::@1/(byte*) current_chargen#17 )
  (byte*) nxt#14 ← phi( scroll_soft::@1/(byte*) nxt#23 )
  (byte) current_bit#12 ← phi( scroll_soft::@1/(byte) current_bit#19 )
  (byte) scroll#11 ← phi( scroll_soft::@1/(byte) scroll#10 )
  (byte) scroll#5 ← (byte) scroll#11
  (byte) current_bit#3 ← (byte) current_bit#12
  (byte*) nxt#3 ← (byte*) nxt#14
  (byte*) current_chargen#3 ← (byte*) current_chargen#11
  return 
  to:@return
@2: scope:[]  from @1
  (byte*) PROCPORT#21 ← phi( @1/(byte*) PROCPORT#22 )
  (byte*) SCROLL#14 ← phi( @1/(byte*) SCROLL#15 )
  (byte*) BGCOL#10 ← phi( @1/(byte*) BGCOL#11 )
  (byte*) RASTER#10 ← phi( @1/(byte*) RASTER#11 )
  (byte) scroll#19 ← phi( @1/(byte) scroll#2 )
  (byte*) SCREEN#12 ← phi( @1/(byte*) SCREEN#14 )
  (byte*) TEXT#3 ← phi( @1/(byte*) TEXT#5 )
  (byte*) CHARGEN#1 ← phi( @1/(byte*) CHARGEN#3 )
  (byte*) current_chargen#4 ← (byte*) CHARGEN#1
  (byte) current_bit#4 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  to:@3
scroll_bit: scope:[scroll_bit]  from scroll_soft::@2
  (byte*) TEXT#7 ← phi( scroll_soft::@2/(byte*) TEXT#8 )
  (byte*) current_chargen#28 ← phi( scroll_soft::@2/(byte*) current_chargen#16 )
  (byte*) CHARGEN#5 ← phi( scroll_soft::@2/(byte*) CHARGEN#6 )
  (byte*) nxt#29 ← phi( scroll_soft::@2/(byte*) nxt#22 )
  (byte*) SCREEN#7 ← phi( scroll_soft::@2/(byte*) SCREEN#10 )
  (byte*) PROCPORT#5 ← phi( scroll_soft::@2/(byte*) PROCPORT#9 )
  (byte) current_bit#13 ← phi( scroll_soft::@2/(byte) current_bit#18 )
  (byte~) scroll_bit::$0 ← (byte) current_bit#13 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) current_bit#5 ← (byte~) scroll_bit::$0
  (bool~) scroll_bit::$1 ← (byte) current_bit#5 == (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) scroll_bit::$2 ← ! (bool~) scroll_bit::$1
  if((bool~) scroll_bit::$2) goto scroll_bit::@1
  to:scroll_bit::@4
scroll_bit::@1: scope:[scroll_bit]  from scroll_bit scroll_bit::@8
  (byte*) nxt#38 ← phi( scroll_bit/(byte*) nxt#29 scroll_bit::@8/(byte*) nxt#4 )
  (byte) current_bit#26 ← phi( scroll_bit/(byte) current_bit#5 scroll_bit::@8/(byte) current_bit#6 )
  (byte*) current_chargen#24 ← phi( scroll_bit/(byte*) current_chargen#28 scroll_bit::@8/(byte*) current_chargen#5 )
  (byte*) SCREEN#5 ← phi( scroll_bit/(byte*) SCREEN#7 scroll_bit::@8/(byte*) SCREEN#8 )
  (byte*) PROCPORT#3 ← phi( scroll_bit/(byte*) PROCPORT#5 scroll_bit::@8/(byte*) PROCPORT#6 )
  call scroll_hard 
  to:scroll_bit::@7
scroll_bit::@7: scope:[scroll_bit]  from scroll_bit::@1
  (byte*) nxt#36 ← phi( scroll_bit::@1/(byte*) nxt#38 )
  (byte) current_bit#21 ← phi( scroll_bit::@1/(byte) current_bit#26 )
  (byte*) current_chargen#19 ← phi( scroll_bit::@1/(byte*) current_chargen#24 )
  (byte*) SCREEN#2 ← phi( scroll_bit::@1/(byte*) SCREEN#5 )
  (byte*) PROCPORT#1 ← phi( scroll_bit::@1/(byte*) PROCPORT#3 )
  asm { sei  }
  *((byte*) PROCPORT#1) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  (byte*~) scroll_bit::$7 ← (byte*) SCREEN#2 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte*~) scroll_bit::$8 ← (byte*~) scroll_bit::$7 + (byte/signed byte/word/signed word/dword/signed dword) 39
  (byte*) scroll_bit::sc#0 ← (byte*~) scroll_bit::$8
  (byte) scroll_bit::r#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:scroll_bit::@2
scroll_bit::@4: scope:[scroll_bit]  from scroll_bit
  (byte*) SCREEN#11 ← phi( scroll_bit/(byte*) SCREEN#7 )
  (byte*) PROCPORT#10 ← phi( scroll_bit/(byte*) PROCPORT#5 )
  (byte*) TEXT#6 ← phi( scroll_bit/(byte*) TEXT#7 )
  (byte*) CHARGEN#4 ← phi( scroll_bit/(byte*) CHARGEN#5 )
  (byte*) nxt#24 ← phi( scroll_bit/(byte*) nxt#29 )
  call next_char 
  (byte) next_char::return#0 ← (byte) next_char::return#2
  to:scroll_bit::@8
scroll_bit::@8: scope:[scroll_bit]  from scroll_bit::@4
  (byte*) SCREEN#8 ← phi( scroll_bit::@4/(byte*) SCREEN#11 )
  (byte*) PROCPORT#6 ← phi( scroll_bit::@4/(byte*) PROCPORT#10 )
  (byte*) CHARGEN#2 ← phi( scroll_bit::@4/(byte*) CHARGEN#4 )
  (byte*) nxt#15 ← phi( scroll_bit::@4/(byte*) nxt#9 )
  (byte) next_char::return#3 ← phi( scroll_bit::@4/(byte) next_char::return#0 )
  (byte~) scroll_bit::$3 ← (byte) next_char::return#3
  (byte*) nxt#4 ← (byte*) nxt#15
  (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3
  (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte*~) scroll_bit::$5 ← (byte*) CHARGEN#2 + (word~) scroll_bit::$4
  (byte*) current_chargen#5 ← (byte*~) scroll_bit::$5
  (byte) current_bit#6 ← (byte/word/signed word/dword/signed dword) 128
  to:scroll_bit::@1
scroll_bit::@2: scope:[scroll_bit]  from scroll_bit::@3 scroll_bit::@7
  (byte*) nxt#32 ← phi( scroll_bit::@3/(byte*) nxt#30 scroll_bit::@7/(byte*) nxt#36 )
  (byte*) PROCPORT#7 ← phi( scroll_bit::@3/(byte*) PROCPORT#4 scroll_bit::@7/(byte*) PROCPORT#1 )
  (byte*) scroll_bit::sc#3 ← phi( scroll_bit::@3/(byte*) scroll_bit::sc#1 scroll_bit::@7/(byte*) scroll_bit::sc#0 )
  (byte) current_bit#14 ← phi( scroll_bit::@3/(byte) current_bit#20 scroll_bit::@7/(byte) current_bit#21 )
  (byte) scroll_bit::r#2 ← phi( scroll_bit::@3/(byte) scroll_bit::r#1 scroll_bit::@7/(byte) scroll_bit::r#0 )
  (byte*) current_chargen#12 ← phi( scroll_bit::@3/(byte*) current_chargen#18 scroll_bit::@7/(byte*) current_chargen#19 )
  (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#12 + (byte) scroll_bit::r#2)
  (byte) scroll_bit::b#0 ← (byte) ' '
  (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#14
  (bool~) scroll_bit::$10 ← (byte~) scroll_bit::$9 != (byte/signed byte/word/signed word/dword/signed dword) 0
  (bool~) scroll_bit::$11 ← ! (bool~) scroll_bit::$10
  if((bool~) scroll_bit::$11) goto scroll_bit::@3
  to:scroll_bit::@5
scroll_bit::@3: scope:[scroll_bit]  from scroll_bit::@2 scroll_bit::@5
  (byte*) nxt#30 ← phi( scroll_bit::@2/(byte*) nxt#32 scroll_bit::@5/(byte*) nxt#33 )
  (byte*) PROCPORT#4 ← phi( scroll_bit::@2/(byte*) PROCPORT#7 scroll_bit::@5/(byte*) PROCPORT#8 )
  (byte) current_bit#20 ← phi( scroll_bit::@2/(byte) current_bit#14 scroll_bit::@5/(byte) current_bit#27 )
  (byte*) current_chargen#18 ← phi( scroll_bit::@2/(byte*) current_chargen#12 scroll_bit::@5/(byte*) current_chargen#25 )
  (byte) scroll_bit::r#3 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 scroll_bit::@5/(byte) scroll_bit::r#4 )
  (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 scroll_bit::@5/(byte*) scroll_bit::sc#4 )
  (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) scroll_bit::b#0 scroll_bit::@5/(byte) scroll_bit::b#1 )
  *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2
  (byte*~) scroll_bit::$13 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte*) scroll_bit::sc#1 ← (byte*~) scroll_bit::$13
  (byte) scroll_bit::r#1 ← (byte) scroll_bit::r#3 + rangenext(0,7)
  (bool~) scroll_bit::$14 ← (byte) scroll_bit::r#1 != rangelast(0,7)
  if((bool~) scroll_bit::$14) goto scroll_bit::@2
  to:scroll_bit::@6
scroll_bit::@5: scope:[scroll_bit]  from scroll_bit::@2
  (byte*) nxt#33 ← phi( scroll_bit::@2/(byte*) nxt#32 )
  (byte*) PROCPORT#8 ← phi( scroll_bit::@2/(byte*) PROCPORT#7 )
  (byte) current_bit#27 ← phi( scroll_bit::@2/(byte) current_bit#14 )
  (byte*) current_chargen#25 ← phi( scroll_bit::@2/(byte*) current_chargen#12 )
  (byte) scroll_bit::r#4 ← phi( scroll_bit::@2/(byte) scroll_bit::r#2 )
  (byte*) scroll_bit::sc#4 ← phi( scroll_bit::@2/(byte*) scroll_bit::sc#3 )
  (byte/word/signed word/dword/signed dword~) scroll_bit::$12 ← (byte/word/signed word/dword/signed dword) 128 + (byte) ' '
  (byte) scroll_bit::b#1 ← (byte/word/signed word/dword/signed dword~) scroll_bit::$12
  to:scroll_bit::@3
scroll_bit::@6: scope:[scroll_bit]  from scroll_bit::@3
  (byte*) current_chargen#20 ← phi( scroll_bit::@3/(byte*) current_chargen#18 )
  (byte*) nxt#25 ← phi( scroll_bit::@3/(byte*) nxt#30 )
  (byte) current_bit#22 ← phi( scroll_bit::@3/(byte) current_bit#20 )
  (byte*) PROCPORT#2 ← phi( scroll_bit::@3/(byte*) PROCPORT#4 )
  *((byte*) PROCPORT#2) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  to:scroll_bit::@return
scroll_bit::@return: scope:[scroll_bit]  from scroll_bit::@6
  (byte*) current_chargen#13 ← phi( scroll_bit::@6/(byte*) current_chargen#20 )
  (byte*) nxt#16 ← phi( scroll_bit::@6/(byte*) nxt#25 )
  (byte) current_bit#15 ← phi( scroll_bit::@6/(byte) current_bit#22 )
  (byte) current_bit#7 ← (byte) current_bit#15
  (byte*) nxt#5 ← (byte*) nxt#16
  (byte*) current_chargen#6 ← (byte*) current_chargen#13
  return 
  to:@return
@3: scope:[]  from @2
  (byte*) CHARGEN#16 ← phi( @2/(byte*) CHARGEN#1 )
  (byte*) PROCPORT#20 ← phi( @2/(byte*) PROCPORT#21 )
  (byte*) SCROLL#13 ← phi( @2/(byte*) SCROLL#14 )
  (byte*) BGCOL#9 ← phi( @2/(byte*) BGCOL#10 )
  (byte*) RASTER#9 ← phi( @2/(byte*) RASTER#10 )
  (byte*) current_chargen#26 ← phi( @2/(byte*) current_chargen#4 )
  (byte) current_bit#28 ← phi( @2/(byte) current_bit#4 )
  (byte) scroll#17 ← phi( @2/(byte) scroll#19 )
  (byte*) SCREEN#9 ← phi( @2/(byte*) SCREEN#12 )
  (byte*) TEXT#1 ← phi( @2/(byte*) TEXT#3 )
  (byte*) nxt#6 ← (byte*) TEXT#1
  to:@6
next_char: scope:[next_char]  from scroll_bit::@4
  (byte*) TEXT#4 ← phi( scroll_bit::@4/(byte*) TEXT#6 )
  (byte*) nxt#17 ← phi( scroll_bit::@4/(byte*) nxt#24 )
  (byte) next_char::c#0 ← *((byte*) nxt#17)
  (bool~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@'
  (bool~) next_char::$1 ← ! (bool~) next_char::$0
  if((bool~) next_char::$1) goto next_char::@1
  to:next_char::@2
next_char::@1: scope:[next_char]  from next_char next_char::@2
  (byte) next_char::c#2 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 )
  (byte*) nxt#18 ← phi( next_char/(byte*) nxt#17 next_char::@2/(byte*) nxt#8 )
  (byte*) nxt#7 ← ++ (byte*) nxt#18
  (byte) next_char::return#1 ← (byte) next_char::c#2
  to:next_char::@return
next_char::@2: scope:[next_char]  from next_char
  (byte*) TEXT#2 ← phi( next_char/(byte*) TEXT#4 )
  (byte*) nxt#8 ← (byte*) TEXT#2
  (byte) next_char::c#1 ← *((byte*) nxt#8)
  to:next_char::@1
next_char::@return: scope:[next_char]  from next_char::@1
  (byte*) nxt#19 ← phi( next_char::@1/(byte*) nxt#7 )
  (byte) next_char::return#4 ← phi( next_char::@1/(byte) next_char::return#1 )
  (byte) next_char::return#2 ← (byte) next_char::return#4
  (byte*) nxt#9 ← (byte*) nxt#19
  return 
  to:@return
scroll_hard: scope:[scroll_hard]  from scroll_bit::@1
  (byte*) SCREEN#6 ← phi( scroll_bit::@1/(byte*) SCREEN#5 )
  (byte) scroll_hard::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:scroll_hard::@1
scroll_hard::@1: scope:[scroll_hard]  from scroll_hard scroll_hard::@1
  (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte) scroll_hard::i#0 scroll_hard::@1/(byte) scroll_hard::i#1 )
  (byte*) SCREEN#3 ← phi( scroll_hard/(byte*) SCREEN#6 scroll_hard::@1/(byte*) SCREEN#3 )
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$0 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte*~) scroll_hard::$1 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$0
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte*~) scroll_hard::$3 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
  (byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$1 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$3 + (byte/signed word/word/dword/signed dword~) scroll_hard::$4)
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*~) scroll_hard::$6 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte*~) scroll_hard::$8 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
  (byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$6 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$8 + (byte/signed word/word/dword/signed dword~) scroll_hard::$9)
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte*~) scroll_hard::$11 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte*~) scroll_hard::$13 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
  (byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$11 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$13 + (byte/signed word/word/dword/signed dword~) scroll_hard::$14)
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte*~) scroll_hard::$16 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
  (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte*~) scroll_hard::$18 ← (byte*) SCREEN#3 + (byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
  (byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$16 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$18 + (byte/signed word/word/dword/signed dword~) scroll_hard::$19)
  (byte/word/signed word/dword/signed dword~) scroll_hard::$20 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte*~) scroll_hard::$21 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$20
  (byte/word/signed word/dword/signed dword~) scroll_hard::$22 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte*~) scroll_hard::$23 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$22
  (byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$21 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$23 + (byte/signed word/word/dword/signed dword~) scroll_hard::$24)
  (byte/word/signed word/dword/signed dword~) scroll_hard::$25 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
  (byte*~) scroll_hard::$26 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$25
  (byte/word/signed word/dword/signed dword~) scroll_hard::$27 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 5
  (byte*~) scroll_hard::$28 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$27
  (byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$26 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$28 + (byte/signed word/word/dword/signed dword~) scroll_hard::$29)
  (byte/word/signed word/dword/signed dword~) scroll_hard::$30 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte*~) scroll_hard::$31 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$30
  (byte/word/signed word/dword/signed dword~) scroll_hard::$32 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte*~) scroll_hard::$33 ← (byte*) SCREEN#3 + (byte/word/signed word/dword/signed dword~) scroll_hard::$32
  (byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$31 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$33 + (byte/signed word/word/dword/signed dword~) scroll_hard::$34)
  (word/signed word/dword/signed dword~) scroll_hard::$35 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte*~) scroll_hard::$36 ← (byte*) SCREEN#3 + (word/signed word/dword/signed dword~) scroll_hard::$35
  (word/signed word/dword/signed dword~) scroll_hard::$37 ← (byte/signed byte/word/signed word/dword/signed dword) 40 * (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte*~) scroll_hard::$38 ← (byte*) SCREEN#3 + (word/signed word/dword/signed dword~) scroll_hard::$37
  (byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) scroll_hard::$36 + (byte) scroll_hard::i#2) ← *((byte*~) scroll_hard::$38 + (byte/signed word/word/dword/signed dword~) scroll_hard::$39)
  (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2
  (bool~) scroll_hard::$40 ← (byte) scroll_hard::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 39
  if((bool~) scroll_hard::$40) goto scroll_hard::@1
  to:scroll_hard::@return
scroll_hard::@return: scope:[scroll_hard]  from scroll_hard::@1
  return 
  to:@return
fillscreen: scope:[fillscreen]  from main
  (byte) fillscreen::fill#2 ← phi( main/(byte) fillscreen::fill#0 )
  (byte*) fillscreen::screen#1 ← phi( main/(byte*) fillscreen::screen#0 )
  (byte*) fillscreen::cursor#0 ← (byte*) fillscreen::screen#1
  to:fillscreen::@1
fillscreen::@1: scope:[fillscreen]  from fillscreen fillscreen::@1
  (byte*) fillscreen::screen#2 ← phi( fillscreen/(byte*) fillscreen::screen#1 fillscreen::@1/(byte*) fillscreen::screen#2 )
  (byte*) fillscreen::cursor#2 ← phi( fillscreen/(byte*) fillscreen::cursor#0 fillscreen::@1/(byte*) fillscreen::cursor#1 )
  (byte) fillscreen::fill#1 ← phi( fillscreen/(byte) fillscreen::fill#2 fillscreen::@1/(byte) fillscreen::fill#1 )
  *((byte*) fillscreen::cursor#2) ← (byte) fillscreen::fill#1
  (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2
  (byte*~) fillscreen::$0 ← (byte*) fillscreen::screen#2 + (word/signed word/dword/signed dword) 1000
  (bool~) fillscreen::$1 ← (byte*) fillscreen::cursor#1 < (byte*~) fillscreen::$0
  if((bool~) fillscreen::$1) goto fillscreen::@1
  to:fillscreen::@return
fillscreen::@return: scope:[fillscreen]  from fillscreen::@1
  return 
  to:@return
@6: scope:[]  from @3
  (byte*) TEXT#17 ← phi( @3/(byte*) TEXT#1 )
  (byte*) CHARGEN#15 ← phi( @3/(byte*) CHARGEN#16 )
  (byte*) PROCPORT#19 ← phi( @3/(byte*) PROCPORT#20 )
  (byte*) SCROLL#12 ← phi( @3/(byte*) SCROLL#13 )
  (byte*) BGCOL#8 ← phi( @3/(byte*) BGCOL#9 )
  (byte*) RASTER#7 ← phi( @3/(byte*) RASTER#9 )
  (byte*) current_chargen#21 ← phi( @3/(byte*) current_chargen#26 )
  (byte*) nxt#26 ← phi( @3/(byte*) nxt#6 )
  (byte) current_bit#23 ← phi( @3/(byte) current_bit#28 )
  (byte) scroll#15 ← phi( @3/(byte) scroll#17 )
  (byte*) SCREEN#4 ← phi( @3/(byte*) SCREEN#9 )
  call main 
  to:@7
@7: scope:[]  from @6
  (byte*) current_chargen#14 ← phi( @6/(byte*) current_chargen#1 )
  (byte*) nxt#20 ← phi( @6/(byte*) nxt#1 )
  (byte) current_bit#16 ← phi( @6/(byte) current_bit#1 )
  (byte) scroll#12 ← phi( @6/(byte) scroll#1 )
  (byte) scroll#6 ← (byte) scroll#12
  (byte) current_bit#8 ← (byte) current_bit#16
  (byte*) nxt#10 ← (byte*) nxt#20
  (byte*) current_chargen#7 ← (byte*) current_chargen#14
  to:@end
@end: scope:[]  from @7

SYMBOL TABLE SSA
(const string) $0 = (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =-     @"
(label) @1
(label) @2
(label) @3
(label) @6
(label) @7
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) BGCOL#1
(byte*) BGCOL#10
(byte*) BGCOL#11
(byte*) BGCOL#2
(byte*) BGCOL#3
(byte*) BGCOL#4
(byte*) BGCOL#5
(byte*) BGCOL#6
(byte*) BGCOL#7
(byte*) BGCOL#8
(byte*) BGCOL#9
(byte*) CHARGEN
(byte*) CHARGEN#0
(byte*) CHARGEN#1
(byte*) CHARGEN#10
(byte*) CHARGEN#11
(byte*) CHARGEN#12
(byte*) CHARGEN#13
(byte*) CHARGEN#14
(byte*) CHARGEN#15
(byte*) CHARGEN#16
(byte*) CHARGEN#2
(byte*) CHARGEN#3
(byte*) CHARGEN#4
(byte*) CHARGEN#5
(byte*) CHARGEN#6
(byte*) CHARGEN#7
(byte*) CHARGEN#8
(byte*) CHARGEN#9
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte*) PROCPORT#1
(byte*) PROCPORT#10
(byte*) PROCPORT#11
(byte*) PROCPORT#12
(byte*) PROCPORT#13
(byte*) PROCPORT#14
(byte*) PROCPORT#15
(byte*) PROCPORT#16
(byte*) PROCPORT#17
(byte*) PROCPORT#18
(byte*) PROCPORT#19
(byte*) PROCPORT#2
(byte*) PROCPORT#20
(byte*) PROCPORT#21
(byte*) PROCPORT#22
(byte*) PROCPORT#3
(byte*) PROCPORT#4
(byte*) PROCPORT#5
(byte*) PROCPORT#6
(byte*) PROCPORT#7
(byte*) PROCPORT#8
(byte*) PROCPORT#9
(byte*) RASTER
(byte*) RASTER#0
(byte*) RASTER#1
(byte*) RASTER#10
(byte*) RASTER#11
(byte*) RASTER#2
(byte*) RASTER#3
(byte*) RASTER#4
(byte*) RASTER#5
(byte*) RASTER#6
(byte*) RASTER#7
(byte*) RASTER#8
(byte*) RASTER#9
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#10
(byte*) SCREEN#11
(byte*) SCREEN#12
(byte*) SCREEN#13
(byte*) SCREEN#14
(byte*) SCREEN#15
(byte*) SCREEN#16
(byte*) SCREEN#17
(byte*) SCREEN#18
(byte*) SCREEN#19
(byte*) SCREEN#2
(byte*) SCREEN#20
(byte*) SCREEN#3
(byte*) SCREEN#4
(byte*) SCREEN#5
(byte*) SCREEN#6
(byte*) SCREEN#7
(byte*) SCREEN#8
(byte*) SCREEN#9
(byte*) SCROLL
(byte*) SCROLL#0
(byte*) SCROLL#1
(byte*) SCROLL#10
(byte*) SCROLL#11
(byte*) SCROLL#12
(byte*) SCROLL#13
(byte*) SCROLL#14
(byte*) SCROLL#15
(byte*) SCROLL#2
(byte*) SCROLL#3
(byte*) SCROLL#4
(byte*) SCROLL#5
(byte*) SCROLL#6
(byte*) SCROLL#7
(byte*) SCROLL#8
(byte*) SCROLL#9
(byte*) TEXT
(byte*) TEXT#0
(byte*) TEXT#1
(byte*) TEXT#10
(byte*) TEXT#11
(byte*) TEXT#12
(byte*) TEXT#13
(byte*) TEXT#14
(byte*) TEXT#15
(byte*) TEXT#16
(byte*) TEXT#17
(byte*) TEXT#2
(byte*) TEXT#3
(byte*) TEXT#4
(byte*) TEXT#5
(byte*) TEXT#6
(byte*) TEXT#7
(byte*) TEXT#8
(byte*) TEXT#9
(byte) current_bit
(byte) current_bit#0
(byte) current_bit#1
(byte) current_bit#10
(byte) current_bit#11
(byte) current_bit#12
(byte) current_bit#13
(byte) current_bit#14
(byte) current_bit#15
(byte) current_bit#16
(byte) current_bit#17
(byte) current_bit#18
(byte) current_bit#19
(byte) current_bit#2
(byte) current_bit#20
(byte) current_bit#21
(byte) current_bit#22
(byte) current_bit#23
(byte) current_bit#24
(byte) current_bit#25
(byte) current_bit#26
(byte) current_bit#27
(byte) current_bit#28
(byte) current_bit#29
(byte) current_bit#3
(byte) current_bit#30
(byte) current_bit#31
(byte) current_bit#32
(byte) current_bit#4
(byte) current_bit#5
(byte) current_bit#6
(byte) current_bit#7
(byte) current_bit#8
(byte) current_bit#9
(byte*) current_chargen
(byte*) current_chargen#0
(byte*) current_chargen#1
(byte*) current_chargen#10
(byte*) current_chargen#11
(byte*) current_chargen#12
(byte*) current_chargen#13
(byte*) current_chargen#14
(byte*) current_chargen#15
(byte*) current_chargen#16
(byte*) current_chargen#17
(byte*) current_chargen#18
(byte*) current_chargen#19
(byte*) current_chargen#2
(byte*) current_chargen#20
(byte*) current_chargen#21
(byte*) current_chargen#22
(byte*) current_chargen#23
(byte*) current_chargen#24
(byte*) current_chargen#25
(byte*) current_chargen#26
(byte*) current_chargen#27
(byte*) current_chargen#28
(byte*) current_chargen#29
(byte*) current_chargen#3
(byte*) current_chargen#30
(byte*) current_chargen#31
(byte*) current_chargen#4
(byte*) current_chargen#5
(byte*) current_chargen#6
(byte*) current_chargen#7
(byte*) current_chargen#8
(byte*) current_chargen#9
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
(byte*~) fillscreen::$0
(bool~) fillscreen::$1
(label) fillscreen::@1
(label) fillscreen::@return
(byte*) fillscreen::cursor
(byte*) fillscreen::cursor#0
(byte*) fillscreen::cursor#1
(byte*) fillscreen::cursor#2
(byte) fillscreen::fill
(byte) fillscreen::fill#0
(byte) fillscreen::fill#1
(byte) fillscreen::fill#2
(byte*) fillscreen::screen
(byte*) fillscreen::screen#0
(byte*) fillscreen::screen#1
(byte*) fillscreen::screen#2
(void()) main()
(bool~) main::$1
(bool~) main::$2
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@7
(label) main::@8
(label) main::@return
(byte()) next_char()
(bool~) next_char::$0
(bool~) next_char::$1
(label) next_char::@1
(label) next_char::@2
(label) next_char::@return
(byte) next_char::c
(byte) next_char::c#0
(byte) next_char::c#1
(byte) next_char::c#2
(byte) next_char::return
(byte) next_char::return#0
(byte) next_char::return#1
(byte) next_char::return#2
(byte) next_char::return#3
(byte) next_char::return#4
(byte*) nxt
(byte*) nxt#0
(byte*) nxt#1
(byte*) nxt#10
(byte*) nxt#11
(byte*) nxt#12
(byte*) nxt#13
(byte*) nxt#14
(byte*) nxt#15
(byte*) nxt#16
(byte*) nxt#17
(byte*) nxt#18
(byte*) nxt#19
(byte*) nxt#2
(byte*) nxt#20
(byte*) nxt#21
(byte*) nxt#22
(byte*) nxt#23
(byte*) nxt#24
(byte*) nxt#25
(byte*) nxt#26
(byte*) nxt#27
(byte*) nxt#28
(byte*) nxt#29
(byte*) nxt#3
(byte*) nxt#30
(byte*) nxt#31
(byte*) nxt#32
(byte*) nxt#33
(byte*) nxt#34
(byte*) nxt#35
(byte*) nxt#36
(byte*) nxt#37
(byte*) nxt#38
(byte*) nxt#4
(byte*) nxt#5
(byte*) nxt#6
(byte*) nxt#7
(byte*) nxt#8
(byte*) nxt#9
(byte) scroll
(byte) scroll#0
(byte) scroll#1
(byte) scroll#10
(byte) scroll#11
(byte) scroll#12
(byte) scroll#13
(byte) scroll#14
(byte) scroll#15
(byte) scroll#16
(byte) scroll#17
(byte) scroll#18
(byte) scroll#19
(byte) scroll#2
(byte) scroll#20
(byte) scroll#21
(byte) scroll#22
(byte) scroll#3
(byte) scroll#4
(byte) scroll#5
(byte) scroll#6
(byte) scroll#7
(byte) scroll#8
(byte) scroll#9
(void()) scroll_bit()
(byte~) scroll_bit::$0
(bool~) scroll_bit::$1
(bool~) scroll_bit::$10
(bool~) scroll_bit::$11
(byte/word/signed word/dword/signed dword~) scroll_bit::$12
(byte*~) scroll_bit::$13
(bool~) scroll_bit::$14
(bool~) scroll_bit::$2
(byte~) scroll_bit::$3
(word~) scroll_bit::$4
(byte*~) scroll_bit::$5
(byte*~) scroll_bit::$7
(byte*~) scroll_bit::$8
(byte~) scroll_bit::$9
(label) scroll_bit::@1
(label) scroll_bit::@2
(label) scroll_bit::@3
(label) scroll_bit::@4
(label) scroll_bit::@5
(label) scroll_bit::@6
(label) scroll_bit::@7
(label) scroll_bit::@8
(label) scroll_bit::@return
(byte) scroll_bit::b
(byte) scroll_bit::b#0
(byte) scroll_bit::b#1
(byte) scroll_bit::b#2
(byte) scroll_bit::bits
(byte) scroll_bit::bits#0
(word) scroll_bit::c
(word) scroll_bit::c#0
(byte) scroll_bit::r
(byte) scroll_bit::r#0
(byte) scroll_bit::r#1
(byte) scroll_bit::r#2
(byte) scroll_bit::r#3
(byte) scroll_bit::r#4
(byte*) scroll_bit::sc
(byte*) scroll_bit::sc#0
(byte*) scroll_bit::sc#1
(byte*) scroll_bit::sc#2
(byte*) scroll_bit::sc#3
(byte*) scroll_bit::sc#4
(void()) scroll_hard()
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$0
(byte*~) scroll_hard::$1
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$10
(byte*~) scroll_hard::$11
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$12
(byte*~) scroll_hard::$13
(byte/signed word/word/dword/signed dword~) scroll_hard::$14
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$15
(byte*~) scroll_hard::$16
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$17
(byte*~) scroll_hard::$18
(byte/signed word/word/dword/signed dword~) scroll_hard::$19
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$2
(byte/word/signed word/dword/signed dword~) scroll_hard::$20
(byte*~) scroll_hard::$21
(byte/word/signed word/dword/signed dword~) scroll_hard::$22
(byte*~) scroll_hard::$23
(byte/signed word/word/dword/signed dword~) scroll_hard::$24
(byte/word/signed word/dword/signed dword~) scroll_hard::$25
(byte*~) scroll_hard::$26
(byte/word/signed word/dword/signed dword~) scroll_hard::$27
(byte*~) scroll_hard::$28
(byte/signed word/word/dword/signed dword~) scroll_hard::$29
(byte*~) scroll_hard::$3
(byte/word/signed word/dword/signed dword~) scroll_hard::$30
(byte*~) scroll_hard::$31
(byte/word/signed word/dword/signed dword~) scroll_hard::$32
(byte*~) scroll_hard::$33
(byte/signed word/word/dword/signed dword~) scroll_hard::$34
(word/signed word/dword/signed dword~) scroll_hard::$35
(byte*~) scroll_hard::$36
(word/signed word/dword/signed dword~) scroll_hard::$37
(byte*~) scroll_hard::$38
(byte/signed word/word/dword/signed dword~) scroll_hard::$39
(byte/signed word/word/dword/signed dword~) scroll_hard::$4
(bool~) scroll_hard::$40
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$5
(byte*~) scroll_hard::$6
(byte/signed byte/word/signed word/dword/signed dword~) scroll_hard::$7
(byte*~) scroll_hard::$8
(byte/signed word/word/dword/signed dword~) scroll_hard::$9
(label) scroll_hard::@1
(label) scroll_hard::@return
(byte) scroll_hard::i
(byte) scroll_hard::i#0
(byte) scroll_hard::i#1
(byte) scroll_hard::i#2
(void()) scroll_soft()
(bool~) scroll_soft::$0
(bool~) scroll_soft::$1
(label) scroll_soft::@1
(label) scroll_soft::@2
(label) scroll_soft::@3
(label) scroll_soft::@return

Inversing boolean not [40] (bool~) scroll_soft::$1 ← (byte) scroll#3 != (byte/word/signed word/dword/signed dword) 255 from [39] (bool~) scroll_soft::$0 ← (byte) scroll#3 == (byte/word/signed word/dword/signed dword) 255
Inversing boolean not [64] (bool~) scroll_bit::$2 ← (byte) current_bit#5 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [63] (bool~) scroll_bit::$1 ← (byte) current_bit#5 == (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [91] (bool~) scroll_bit::$11 ← (byte~) scroll_bit::$9 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [90] (bool~) scroll_bit::$10 ← (byte~) scroll_bit::$9 != (byte/signed byte/word/signed word/dword/signed dword) 0
Inversing boolean not [116] (bool~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' from [115] (bool~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@'
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) RASTER#4 = (byte*) RASTER#5 
Alias (byte*) BGCOL#6 = (byte*) BGCOL#7 
Alias (byte) scroll#21 = (byte) scroll#22 
Alias (byte) current_bit#31 = (byte) current_bit#32 
Alias (byte*) nxt#35 = (byte*) nxt#37 
Alias (byte*) current_chargen#30 = (byte*) current_chargen#31 
Alias (byte*) SCROLL#10 = (byte*) SCROLL#9 
Alias (byte*) PROCPORT#16 = (byte*) PROCPORT#17 
Alias (byte*) SCREEN#1 = (byte*) SCREEN#19 
Alias (byte*) CHARGEN#12 = (byte*) CHARGEN#13 
Alias (byte*) TEXT#14 = (byte*) TEXT#15 
Alias (byte*) RASTER#2 = (byte*) RASTER#3 (byte*) RASTER#6 (byte*) RASTER#8 
Alias (byte*) BGCOL#1 = (byte*) BGCOL#5 (byte*) BGCOL#2 (byte*) BGCOL#3 
Alias (byte) scroll#0 = (byte) scroll#20 (byte) scroll#7 (byte) scroll#8 (byte) scroll#1 
Alias (byte) current_bit#0 = (byte) current_bit#30 (byte) current_bit#9 (byte) current_bit#10 (byte) current_bit#1 
Alias (byte*) nxt#0 = (byte*) nxt#34 (byte*) nxt#11 (byte*) nxt#12 (byte*) nxt#1 
Alias (byte*) current_chargen#0 = (byte*) current_chargen#29 (byte*) current_chargen#8 (byte*) current_chargen#9 (byte*) current_chargen#1 
Alias (byte*) SCROLL#11 = (byte*) SCROLL#8 (byte*) SCROLL#4 (byte*) SCROLL#6 
Alias (byte*) PROCPORT#12 = (byte*) PROCPORT#15 (byte*) PROCPORT#18 (byte*) PROCPORT#13 
Alias (byte*) SCREEN#15 = (byte*) SCREEN#18 (byte*) SCREEN#20 (byte*) SCREEN#16 
Alias (byte*) CHARGEN#11 = (byte*) CHARGEN#14 (byte*) CHARGEN#8 (byte*) CHARGEN#9 
Alias (byte*) TEXT#10 = (byte*) TEXT#13 (byte*) TEXT#16 (byte*) TEXT#11 
Alias (byte) scroll#13 = (byte) scroll#16 
Alias (byte) current_bit#17 = (byte) current_bit#24 
Alias (byte*) nxt#21 = (byte*) nxt#27 
Alias (byte*) current_chargen#15 = (byte*) current_chargen#22 
Alias (byte*) CHARGEN#0 = (byte*) CHARGEN#3 (byte*) CHARGEN#1 (byte*) current_chargen#4 (byte*) current_chargen#26 (byte*) CHARGEN#16 (byte*) current_chargen#21 (byte*) CHARGEN#15 
Alias (byte*) TEXT#0 = (byte*) TEXT#5 (byte*) TEXT#3 (byte*) TEXT#1 (byte*) nxt#6 (byte*) nxt#26 (byte*) TEXT#17 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#14 (byte*) SCREEN#12 (byte*) SCREEN#9 (byte*) SCREEN#4 
Alias (byte*) RASTER#0 = (byte*) RASTER#11 (byte*) RASTER#10 (byte*) RASTER#9 (byte*) RASTER#7 
Alias (byte*) BGCOL#0 = (byte*) BGCOL#11 (byte*) BGCOL#10 (byte*) BGCOL#9 (byte*) BGCOL#8 
Alias (byte*) SCROLL#0 = (byte*) SCROLL#15 (byte*) SCROLL#14 (byte*) SCROLL#13 (byte*) SCROLL#12 
Alias (byte*) PROCPORT#0 = (byte*) PROCPORT#22 (byte*) PROCPORT#21 (byte*) PROCPORT#20 (byte*) PROCPORT#19 
Alias (byte) current_bit#18 = (byte) current_bit#25 
Alias (byte*) nxt#22 = (byte*) nxt#28 
Alias (byte*) current_chargen#16 = (byte*) current_chargen#23 
Alias (byte*) SCROLL#2 = (byte*) SCROLL#5 (byte*) SCROLL#3 
Alias (byte*) PROCPORT#11 = (byte*) PROCPORT#9 
Alias (byte*) SCREEN#10 = (byte*) SCREEN#13 
Alias (byte*) CHARGEN#6 = (byte*) CHARGEN#7 
Alias (byte*) TEXT#8 = (byte*) TEXT#9 
Alias (byte) scroll#14 = (byte) scroll#4 
Alias (byte) current_bit#11 = (byte) current_bit#2 
Alias (byte*) nxt#13 = (byte*) nxt#2 
Alias (byte*) current_chargen#10 = (byte*) current_chargen#2 
Alias (byte) scroll#10 = (byte) scroll#11 (byte) scroll#5 
Alias (byte) current_bit#12 = (byte) current_bit#19 (byte) current_bit#3 
Alias (byte*) nxt#14 = (byte*) nxt#23 (byte*) nxt#3 
Alias (byte*) current_chargen#11 = (byte*) current_chargen#17 (byte*) current_chargen#3 
Alias (byte) scroll#15 = (byte) scroll#19 (byte) scroll#2 (byte) scroll#17 
Alias (byte) current_bit#5 = (byte~) scroll_bit::$0 
Alias (byte*) PROCPORT#1 = (byte*) PROCPORT#3 
Alias (byte*) SCREEN#2 = (byte*) SCREEN#5 
Alias (byte*) current_chargen#19 = (byte*) current_chargen#24 
Alias (byte) current_bit#21 = (byte) current_bit#26 
Alias (byte*) nxt#36 = (byte*) nxt#38 
Alias (byte*) scroll_bit::sc#0 = (byte*~) scroll_bit::$8 
Alias (byte*) nxt#24 = (byte*) nxt#29 
Alias (byte*) CHARGEN#2 = (byte*) CHARGEN#4 (byte*) CHARGEN#5 
Alias (byte*) TEXT#6 = (byte*) TEXT#7 
Alias (byte*) PROCPORT#10 = (byte*) PROCPORT#5 (byte*) PROCPORT#6 
Alias (byte*) SCREEN#11 = (byte*) SCREEN#7 (byte*) SCREEN#8 
Alias (byte) next_char::return#0 = (byte) next_char::return#3 
Alias (byte*) nxt#15 = (byte*) nxt#4 
Alias (byte*) current_chargen#5 = (byte*~) scroll_bit::$5 
Alias (byte*) scroll_bit::sc#1 = (byte*~) scroll_bit::$13 
Alias (byte*) scroll_bit::sc#3 = (byte*) scroll_bit::sc#4 
Alias (byte) scroll_bit::r#2 = (byte) scroll_bit::r#4 
Alias (byte*) current_chargen#12 = (byte*) current_chargen#25 
Alias (byte) current_bit#14 = (byte) current_bit#27 
Alias (byte*) PROCPORT#7 = (byte*) PROCPORT#8 
Alias (byte*) nxt#32 = (byte*) nxt#33 
Alias (byte) scroll_bit::b#1 = (byte/word/signed word/dword/signed dword~) scroll_bit::$12 
Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#4 
Alias (byte) current_bit#15 = (byte) current_bit#22 (byte) current_bit#20 (byte) current_bit#7 
Alias (byte*) nxt#16 = (byte*) nxt#25 (byte*) nxt#30 (byte*) nxt#5 
Alias (byte*) current_chargen#13 = (byte*) current_chargen#20 (byte*) current_chargen#18 (byte*) current_chargen#6 
Alias (byte) current_bit#23 = (byte) current_bit#28 (byte) current_bit#4 
Alias (byte) next_char::return#1 = (byte) next_char::c#2 (byte) next_char::return#4 (byte) next_char::return#2 
Alias (byte*) TEXT#2 = (byte*) TEXT#4 (byte*) nxt#8 
Alias (byte*) nxt#19 = (byte*) nxt#7 (byte*) nxt#9 
Alias (byte*) fillscreen::cursor#0 = (byte*) fillscreen::screen#1 
Alias (byte) scroll#12 = (byte) scroll#6 
Alias (byte) current_bit#16 = (byte) current_bit#8 
Alias (byte*) nxt#10 = (byte*) nxt#20 
Alias (byte*) current_chargen#14 = (byte*) current_chargen#7 
Successful SSA optimization Pass2AliasElimination
Alias (byte*) SCROLL#1 = (byte*) SCROLL#2 
Alias (byte*) PROCPORT#1 = (byte*) PROCPORT#10 
Alias (byte*) SCREEN#11 = (byte*) SCREEN#2 
Alias (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#3 
Alias (byte) scroll_bit::r#2 = (byte) scroll_bit::r#3 
Alias (byte*) current_chargen#12 = (byte*) current_chargen#13 
Alias (byte) current_bit#14 = (byte) current_bit#15 
Alias (byte*) PROCPORT#2 = (byte*) PROCPORT#7 
Alias (byte*) nxt#16 = (byte*) nxt#32 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) RASTER#1
Self Phi Eliminated (byte*) BGCOL#4
Self Phi Eliminated (byte) scroll#18
Self Phi Eliminated (byte) current_bit#29
Self Phi Eliminated (byte*) nxt#31
Self Phi Eliminated (byte*) current_chargen#27
Self Phi Eliminated (byte*) SCROLL#7
Self Phi Eliminated (byte*) PROCPORT#14
Self Phi Eliminated (byte*) SCREEN#17
Self Phi Eliminated (byte*) CHARGEN#10
Self Phi Eliminated (byte*) TEXT#12
Self Phi Eliminated (byte*) RASTER#2
Self Phi Eliminated (byte*) BGCOL#1
Self Phi Eliminated (byte) scroll#13
Self Phi Eliminated (byte) current_bit#17
Self Phi Eliminated (byte*) nxt#21
Self Phi Eliminated (byte*) current_chargen#15
Self Phi Eliminated (byte*) SCROLL#11
Self Phi Eliminated (byte*) PROCPORT#12
Self Phi Eliminated (byte*) SCREEN#15
Self Phi Eliminated (byte*) CHARGEN#11
Self Phi Eliminated (byte*) TEXT#10
Self Phi Eliminated (byte*) current_chargen#12
Self Phi Eliminated (byte) current_bit#14
Self Phi Eliminated (byte*) PROCPORT#2
Self Phi Eliminated (byte*) nxt#16
Self Phi Eliminated (byte*) SCREEN#3
Self Phi Eliminated (byte) fillscreen::fill#1
Self Phi Eliminated (byte*) fillscreen::screen#2
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
Redundant Phi (byte*) RASTER#4 (byte*) RASTER#0
Redundant Phi (byte*) BGCOL#6 (byte*) BGCOL#0
Redundant Phi (byte) scroll#21 (byte) scroll#15
Redundant Phi (byte) current_bit#31 (byte) current_bit#23
Redundant Phi (byte*) nxt#35 (byte*) TEXT#0
Redundant Phi (byte*) current_chargen#30 (byte*) CHARGEN#0
Redundant Phi (byte*) SCROLL#10 (byte*) SCROLL#0
Redundant Phi (byte*) PROCPORT#16 (byte*) PROCPORT#0
Redundant Phi (byte*) CHARGEN#12 (byte*) CHARGEN#0
Redundant Phi (byte*) TEXT#14 (byte*) TEXT#0
Redundant Phi (byte*) RASTER#2 (byte*) RASTER#1
Redundant Phi (byte*) BGCOL#1 (byte*) BGCOL#4
Redundant Phi (byte) scroll#13 (byte) scroll#18
Redundant Phi (byte) current_bit#17 (byte) current_bit#29
Redundant Phi (byte*) nxt#21 (byte*) nxt#31
Redundant Phi (byte*) current_chargen#15 (byte*) current_chargen#27
Redundant Phi (byte*) SCROLL#11 (byte*) SCROLL#7
Redundant Phi (byte*) PROCPORT#12 (byte*) PROCPORT#14
Redundant Phi (byte*) SCREEN#15 (byte*) SCREEN#17
Redundant Phi (byte*) CHARGEN#11 (byte*) CHARGEN#10
Redundant Phi (byte*) TEXT#10 (byte*) TEXT#12
Redundant Phi (byte) scroll#0 (byte) scroll#10
Redundant Phi (byte) current_bit#0 (byte) current_bit#12
Redundant Phi (byte*) nxt#0 (byte*) nxt#14
Redundant Phi (byte*) current_chargen#0 (byte*) current_chargen#11
Redundant Phi (byte) scroll#9 (byte) scroll#13
Redundant Phi (byte*) SCROLL#1 (byte*) SCROLL#11
Redundant Phi (byte) current_bit#18 (byte) current_bit#17
Redundant Phi (byte*) nxt#22 (byte*) nxt#21
Redundant Phi (byte*) current_chargen#16 (byte*) current_chargen#15
Redundant Phi (byte*) PROCPORT#11 (byte*) PROCPORT#12
Redundant Phi (byte*) SCREEN#10 (byte*) SCREEN#15
Redundant Phi (byte*) CHARGEN#6 (byte*) CHARGEN#11
Redundant Phi (byte*) TEXT#8 (byte*) TEXT#10
Redundant Phi (byte) current_bit#11 (byte) current_bit#14
Redundant Phi (byte*) nxt#13 (byte*) nxt#16
Redundant Phi (byte*) current_chargen#10 (byte*) current_chargen#12
Redundant Phi (byte) current_bit#13 (byte) current_bit#18
Redundant Phi (byte*) PROCPORT#1 (byte*) PROCPORT#11
Redundant Phi (byte*) SCREEN#11 (byte*) SCREEN#10
Redundant Phi (byte*) nxt#24 (byte*) nxt#22
Redundant Phi (byte*) CHARGEN#2 (byte*) CHARGEN#6
Redundant Phi (byte*) current_chargen#28 (byte*) current_chargen#16
Redundant Phi (byte*) TEXT#6 (byte*) TEXT#8
Redundant Phi (byte*) nxt#15 (byte*) nxt#19
Redundant Phi (byte*) current_chargen#12 (byte*) current_chargen#19
Redundant Phi (byte) current_bit#14 (byte) current_bit#21
Redundant Phi (byte*) PROCPORT#2 (byte*) PROCPORT#1
Redundant Phi (byte*) nxt#16 (byte*) nxt#36
Redundant Phi (byte*) nxt#17 (byte*) nxt#24
Redundant Phi (byte*) TEXT#2 (byte*) TEXT#6
Redundant Phi (byte*) SCREEN#6 (byte*) SCREEN#11
Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#6
Redundant Phi (byte*) fillscreen::cursor#0 (byte*) fillscreen::screen#0
Redundant Phi (byte) fillscreen::fill#2 (byte) fillscreen::fill#0
Redundant Phi (byte) fillscreen::fill#1 (byte) fillscreen::fill#2
Redundant Phi (byte*) fillscreen::screen#2 (byte*) fillscreen::cursor#0
Redundant Phi (byte) scroll#12 (byte) scroll#0
Redundant Phi (byte) current_bit#16 (byte) current_bit#0
Redundant Phi (byte*) nxt#10 (byte*) nxt#0
Redundant Phi (byte*) current_chargen#14 (byte*) current_chargen#0
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) main::$1 [15] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2
Simple Condition (bool~) main::$2 [18] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3
Simple Condition (bool~) scroll_soft::$1 [41] if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1
Simple Condition (bool~) scroll_bit::$2 [65] if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1
Simple Condition (bool~) scroll_bit::$11 [92] if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3
Simple Condition (bool~) scroll_bit::$14 [99] if((byte) scroll_bit::r#1!=rangelast(0,7)) goto scroll_bit::@2
Simple Condition (bool~) next_char::$1 [117] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1
Simple Condition (bool~) scroll_hard::$40 [181] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1
Simple Condition (bool~) fillscreen::$1 [190] if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) PROCPORT#0 = ((byte*))1
Constant (const byte*) CHARGEN#0 = ((byte*))53248
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte*) RASTER#0 = ((byte*))53266
Constant (const byte*) BGCOL#0 = ((byte*))53280
Constant (const byte*) SCROLL#0 = ((byte*))53270
Constant (const byte*) TEXT#0 = $0
Constant (const byte) fillscreen::fill#0 = 32
Constant (const byte) scroll#15 = 7
Constant (const byte) scroll#14 = 7
Constant (const byte) current_bit#23 = 1
Constant (const byte) scroll_bit::r#0 = 0
Constant (const byte) current_bit#6 = 128
Constant (const byte) scroll_bit::b#0 = ' '
Constant (const byte) scroll_bit::b#1 = 128+' '
Constant (const byte) scroll_hard::i#0 = 0
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$0 = 40*0
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$2 = 40*0
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$5 = 40*1
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$7 = 40*1
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$10 = 40*2
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$12 = 40*2
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$15 = 40*3
Constant (const byte/signed byte/word/signed word/dword/signed dword) scroll_hard::$17 = 40*3
Constant (const byte/word/signed word/dword/signed dword) scroll_hard::$20 = 40*4
Constant (const byte/word/signed word/dword/signed dword) scroll_hard::$22 = 40*4
Constant (const byte/word/signed word/dword/signed dword) scroll_hard::$25 = 40*5
Constant (const byte/word/signed word/dword/signed dword) scroll_hard::$27 = 40*5
Constant (const byte/word/signed word/dword/signed dword) scroll_hard::$30 = 40*6
Constant (const byte/word/signed word/dword/signed dword) scroll_hard::$32 = 40*6
Constant (const word/signed word/dword/signed dword) scroll_hard::$35 = 40*7
Constant (const word/signed word/dword/signed dword) scroll_hard::$37 = 40*7
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) fillscreen::screen#0 = SCREEN#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) fillscreen::$0 = fillscreen::screen#0+1000
Successful SSA optimization Pass2ConstantIdentification
Consolidated constant in assignment scroll_bit::sc#0
Successful SSA optimization Pass2ConstantAdditionElimination
if() condition always true - replacing block destination [7] if(true) goto main::@1
Successful SSA optimization Pass2ConstantIfs
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Resolved ranged next value scroll_bit::r#1 ← ++ scroll_bit::r#2 to ++
Resolved ranged comparison value if(scroll_bit::r#1!=rangelast(0,7)) goto scroll_bit::@2 to (byte/signed byte/word/signed word/dword/signed dword) 8
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@1
Culled Empty Block (label) @1
Culled Empty Block (label) scroll_soft::@3
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @7
Successful SSA optimization Pass2CullEmptyBlocks
Self Phi Eliminated (byte*) RASTER#1
Self Phi Eliminated (byte*) BGCOL#4
Self Phi Eliminated (byte*) SCROLL#7
Self Phi Eliminated (byte*) PROCPORT#14
Self Phi Eliminated (byte*) SCREEN#17
Self Phi Eliminated (byte*) CHARGEN#10
Self Phi Eliminated (byte*) TEXT#12
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) RASTER#1 (const byte*) RASTER#0
Redundant Phi (byte*) BGCOL#4 (const byte*) BGCOL#0
Redundant Phi (byte*) SCROLL#7 (const byte*) SCROLL#0
Redundant Phi (byte*) PROCPORT#14 (const byte*) PROCPORT#0
Redundant Phi (byte*) SCREEN#17 (const byte*) SCREEN#0
Redundant Phi (byte*) CHARGEN#10 (const byte*) CHARGEN#0
Redundant Phi (byte*) TEXT#12 (const byte*) TEXT#0
Successful SSA optimization Pass2RedundantPhiElimination
Constant (const byte*) scroll_bit::$7 = SCREEN#0
Constant (const byte*) scroll_hard::$1 = SCREEN#0+scroll_hard::$0
Constant (const byte*) scroll_hard::$3 = SCREEN#0+scroll_hard::$2
Constant (const byte*) scroll_hard::$6 = SCREEN#0+scroll_hard::$5
Constant (const byte*) scroll_hard::$8 = SCREEN#0+scroll_hard::$7
Constant (const byte*) scroll_hard::$11 = SCREEN#0+scroll_hard::$10
Constant (const byte*) scroll_hard::$13 = SCREEN#0+scroll_hard::$12
Constant (const byte*) scroll_hard::$16 = SCREEN#0+scroll_hard::$15
Constant (const byte*) scroll_hard::$18 = SCREEN#0+scroll_hard::$17
Constant (const byte*) scroll_hard::$21 = SCREEN#0+scroll_hard::$20
Constant (const byte*) scroll_hard::$23 = SCREEN#0+scroll_hard::$22
Constant (const byte*) scroll_hard::$26 = SCREEN#0+scroll_hard::$25
Constant (const byte*) scroll_hard::$28 = SCREEN#0+scroll_hard::$27
Constant (const byte*) scroll_hard::$31 = SCREEN#0+scroll_hard::$30
Constant (const byte*) scroll_hard::$33 = SCREEN#0+scroll_hard::$32
Constant (const byte*) scroll_hard::$36 = SCREEN#0+scroll_hard::$35
Constant (const byte*) scroll_hard::$38 = SCREEN#0+scroll_hard::$37
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) scroll_bit::sc#0 = scroll_bit::$7+40+39
Successful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in assignment *(scroll_hard::$3+1 + scroll_hard::$4)
Consolidated array index constant in assignment *(scroll_hard::$8+1 + scroll_hard::$9)
Consolidated array index constant in assignment *(scroll_hard::$13+1 + scroll_hard::$14)
Consolidated array index constant in assignment *(scroll_hard::$18+1 + scroll_hard::$19)
Consolidated array index constant in assignment *(scroll_hard::$23+1 + scroll_hard::$24)
Consolidated array index constant in assignment *(scroll_hard::$28+1 + scroll_hard::$29)
Consolidated array index constant in assignment *(scroll_hard::$33+1 + scroll_hard::$34)
Consolidated array index constant in assignment *(scroll_hard::$38+1 + scroll_hard::$39)
Successful SSA optimization Pass2ConstantAdditionElimination
Inferred type updated to byte in [44] (byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [46] (byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [48] (byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [50] (byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [52] (byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [54] (byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [56] (byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i#2
Inferred type updated to byte in [58] (byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i#2
Alias (byte) scroll_hard::i#2 = (byte~) scroll_hard::$4 (byte~) scroll_hard::$9 (byte~) scroll_hard::$14 (byte~) scroll_hard::$19 (byte~) scroll_hard::$24 (byte~) scroll_hard::$29 (byte~) scroll_hard::$34 (byte~) scroll_hard::$39 
Successful SSA optimization Pass2AliasElimination
Inlining constant with var siblings (const byte) scroll_bit::r#0
Inlining constant with var siblings (const byte) scroll_bit::b#0
Inlining constant with var siblings (const byte) scroll_bit::b#1
Inlining constant with var siblings (const byte*) scroll_bit::sc#0
Inlining constant with var siblings (const byte) scroll_hard::i#0
Inlining constant with var siblings (const byte) scroll#15
Inlining constant with var siblings (const byte) scroll#14
Inlining constant with var siblings (const byte) current_bit#23
Inlining constant with var siblings (const byte) current_bit#6
Constant inlined scroll_hard::$3 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined scroll_hard::$6 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined scroll_hard::$5 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined scroll_hard::$0 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined scroll_hard::$2 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined scroll_hard::$1 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined $0 = (const byte*) TEXT#0
Constant inlined scroll_hard::$23 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined scroll_hard::$25 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5
Constant inlined scroll_hard::$26 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5
Constant inlined scroll_hard::$27 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5
Constant inlined current_bit#6 = (byte/word/signed word/dword/signed dword) 128
Constant inlined scroll_hard::$28 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5
Constant inlined scroll_bit::r#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined current_bit#23 = (byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined fillscreen::screen#0 = (const byte*) SCREEN#0
Constant inlined scroll_hard::$8 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined scroll_hard::$7 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined scroll_hard::$20 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined scroll_hard::$21 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined scroll_hard::$22 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4
Constant inlined scroll_hard::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined scroll_bit::b#0 = (byte) ' '
Constant inlined scroll_bit::$7 = (const byte*) SCREEN#0
Constant inlined fillscreen::$0 = (const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000
Constant inlined scroll_bit::b#1 = (byte/word/signed word/dword/signed dword) 128+(byte) ' '
Constant inlined scroll_hard::$12 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined scroll_hard::$35 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7
Constant inlined scroll_hard::$13 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined scroll_hard::$36 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7
Constant inlined scroll_hard::$15 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3
Constant inlined scroll_hard::$37 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7
Constant inlined scroll_hard::$16 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3
Constant inlined scroll_hard::$38 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7
Constant inlined scroll_hard::$17 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3
Constant inlined scroll_hard::$18 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3
Constant inlined scroll_bit::sc#0 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 39
Constant inlined scroll_hard::$30 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined scroll#15 = (byte/signed byte/word/signed word/dword/signed dword) 7
Constant inlined scroll_hard::$31 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined scroll_hard::$10 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined scroll_hard::$32 = (byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined scroll_hard::$11 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2
Constant inlined scroll_hard::$33 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6
Constant inlined scroll#14 = (byte/signed byte/word/signed word/dword/signed dword) 7
Successful SSA optimization Pass2ConstantInlining
Simplifying constant multiply by zero 40*0
Simplifying constant multiply by zero 40*0
Simplifying constant plus zero SCREEN#0+0
Simplifying constant plus zero SCREEN#0+0
Added new block during phi lifting scroll_soft::@4(between scroll_soft and scroll_soft::@1)
Added new block during phi lifting scroll_bit::@9(between scroll_bit and scroll_bit::@1)
Added new block during phi lifting scroll_bit::@10(between scroll_bit::@3 and scroll_bit::@2)
Added new block during phi lifting scroll_hard::@3(between scroll_hard::@1 and scroll_hard::@1)
Added new block during phi lifting next_char::@4(between next_char and next_char::@1)
Added new block during phi lifting fillscreen::@3(between fillscreen::@1 and fillscreen::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of scroll_soft::@2
Adding NOP phi() at start of scroll_bit::@4
Adding NOP phi() at start of scroll_bit::@5
Adding NOP phi() at start of scroll_hard
Adding NOP phi() at start of fillscreen
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to fillscreen:5 scroll_soft:10 
Calls in [scroll_soft] to scroll_bit:19 
Calls in [scroll_bit] to next_char:33 scroll_hard:42 

Created 18 initial phi equivalence classes
Coalesced [12] scroll#23 ← scroll#10
Coalesced [13] current_bit#33 ← current_bit#12
Coalesced [14] nxt#39 ← nxt#14
Coalesced [15] current_chargen#32 ← current_chargen#11
Coalesced [20] current_bit#35 ← current_bit#21
Coalesced [21] nxt#41 ← nxt#36
Coalesced [22] current_chargen#34 ← current_chargen#19
Coalesced [26] scroll#24 ← scroll#3
Coalesced (already) [27] current_bit#34 ← current_bit#29
Coalesced (already) [28] nxt#40 ← nxt#31
Coalesced (already) [29] current_chargen#33 ← current_chargen#27
Coalesced [39] current_chargen#36 ← current_chargen#5
Coalesced [40] nxt#43 ← nxt#19
Coalesced [58] scroll_bit::r#5 ← scroll_bit::r#1
Coalesced [59] scroll_bit::sc#5 ← scroll_bit::sc#1
Coalesced (already) [60] current_chargen#35 ← current_chargen#27
Coalesced [61] current_bit#36 ← current_bit#5
Coalesced (already) [62] nxt#42 ← nxt#31
Coalesced [76] scroll_hard::i#3 ← scroll_hard::i#1
Coalesced [80] next_char::return#6 ← next_char::c#1
Coalesced [84] nxt#44 ← nxt#31
Coalesced [85] next_char::return#5 ← next_char::c#0
Coalesced [92] fillscreen::cursor#3 ← fillscreen::cursor#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) scroll_soft::@4
Culled Empty Block (label) scroll_bit::@10
Culled Empty Block (label) scroll_bit::@9
Culled Empty Block (label) scroll_hard::@3
Culled Empty Block (label) next_char::@4
Culled Empty Block (label) fillscreen::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of scroll_soft::@2
Adding NOP phi() at start of scroll_bit::@4
Adding NOP phi() at start of scroll_bit::@5
Adding NOP phi() at start of scroll_hard
Adding NOP phi() at start of fillscreen

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@6
@6: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @6
  [3] phi()
main: scope:[main]  from @6
  [4] phi()
  [5] call fillscreen 
  to:main::@2
main::@2: scope:[main]  from main main::@2 main::@8
  [6] (byte*) current_chargen#27 ← phi( main::@8/(byte*) current_chargen#11 main/(const byte*) CHARGEN#0 )
  [6] (byte*) nxt#31 ← phi( main::@8/(byte*) nxt#14 main/(const byte*) TEXT#0 )
  [6] (byte) current_bit#29 ← phi( main::@8/(byte) current_bit#12 main/(byte/signed byte/word/signed word/dword/signed dword) 1 )
  [6] (byte) scroll#18 ← phi( main::@8/(byte) scroll#10 main/(byte/signed byte/word/signed word/dword/signed dword) 7 )
  [7] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2 main::@3
  [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3
  to:main::@5
main::@5: scope:[main]  from main::@3
  [9] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
  [10] call scroll_soft 
  to:main::@8
main::@8: scope:[main]  from main::@5
  [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0)
  to:main::@2
scroll_soft: scope:[scroll_soft]  from main::@5
  [12] (byte) scroll#3 ← -- (byte) scroll#18
  [13] if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1
  to:scroll_soft::@2
scroll_soft::@2: scope:[scroll_soft]  from scroll_soft
  [14] phi()
  [15] call scroll_bit 
  to:scroll_soft::@1
scroll_soft::@1: scope:[scroll_soft]  from scroll_soft scroll_soft::@2
  [16] (byte*) current_chargen#11 ← phi( scroll_soft/(byte*) current_chargen#27 scroll_soft::@2/(byte*) current_chargen#19 )
  [16] (byte*) nxt#14 ← phi( scroll_soft/(byte*) nxt#31 scroll_soft::@2/(byte*) nxt#36 )
  [16] (byte) current_bit#12 ← phi( scroll_soft/(byte) current_bit#29 scroll_soft::@2/(byte) current_bit#21 )
  [16] (byte) scroll#10 ← phi( scroll_soft/(byte) scroll#3 scroll_soft::@2/(byte/signed byte/word/signed word/dword/signed dword) 7 )
  [17] *((const byte*) SCROLL#0) ← (byte) scroll#10
  to:scroll_soft::@return
scroll_soft::@return: scope:[scroll_soft]  from scroll_soft::@1
  [18] return 
  to:@return
scroll_bit: scope:[scroll_bit]  from scroll_soft::@2
  [19] (byte) current_bit#5 ← (byte) current_bit#29 >> (byte/signed byte/word/signed word/dword/signed dword) 1
  [20] if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1
  to:scroll_bit::@4
scroll_bit::@4: scope:[scroll_bit]  from scroll_bit
  [21] phi()
  [22] call next_char 
  [23] (byte) next_char::return#0 ← (byte) next_char::return#1
  to:scroll_bit::@8
scroll_bit::@8: scope:[scroll_bit]  from scroll_bit::@4
  [24] (byte~) scroll_bit::$3 ← (byte) next_char::return#0
  [25] (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3
  [26] (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3
  [27] (byte*) current_chargen#5 ← (const byte*) CHARGEN#0 + (word~) scroll_bit::$4
  to:scroll_bit::@1
scroll_bit::@1: scope:[scroll_bit]  from scroll_bit scroll_bit::@8
  [28] (byte*) nxt#36 ← phi( scroll_bit/(byte*) nxt#31 scroll_bit::@8/(byte*) nxt#19 )
  [28] (byte) current_bit#21 ← phi( scroll_bit/(byte) current_bit#5 scroll_bit::@8/(byte/word/signed word/dword/signed dword) 128 )
  [28] (byte*) current_chargen#19 ← phi( scroll_bit/(byte*) current_chargen#27 scroll_bit::@8/(byte*) current_chargen#5 )
  [29] call scroll_hard 
  to:scroll_bit::@7
scroll_bit::@7: scope:[scroll_bit]  from scroll_bit::@1
  asm { sei  }
  [31] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50
  to:scroll_bit::@2
scroll_bit::@2: scope:[scroll_bit]  from scroll_bit::@3 scroll_bit::@7
  [32] (byte*) scroll_bit::sc#2 ← phi( scroll_bit::@3/(byte*) scroll_bit::sc#1 scroll_bit::@7/(const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 39 )
  [32] (byte) scroll_bit::r#2 ← phi( scroll_bit::@3/(byte) scroll_bit::r#1 scroll_bit::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [33] (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#19 + (byte) scroll_bit::r#2)
  [34] (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21
  [35] if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3
  to:scroll_bit::@5
scroll_bit::@5: scope:[scroll_bit]  from scroll_bit::@2
  [36] phi()
  to:scroll_bit::@3
scroll_bit::@3: scope:[scroll_bit]  from scroll_bit::@2 scroll_bit::@5
  [37] (byte) scroll_bit::b#2 ← phi( scroll_bit::@2/(byte) ' ' scroll_bit::@5/(byte/word/signed word/dword/signed dword) 128+(byte) ' ' )
  [38] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2
  [39] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40
  [40] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2
  [41] if((byte) scroll_bit::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto scroll_bit::@2
  to:scroll_bit::@6
scroll_bit::@6: scope:[scroll_bit]  from scroll_bit::@3
  [42] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55
  asm { cli  }
  to:scroll_bit::@return
scroll_bit::@return: scope:[scroll_bit]  from scroll_bit::@6
  [44] return 
  to:@return
scroll_hard: scope:[scroll_hard]  from scroll_bit::@1
  [45] phi()
  to:scroll_hard::@1
scroll_hard::@1: scope:[scroll_hard]  from scroll_hard scroll_hard::@1
  [46] (byte) scroll_hard::i#2 ← phi( scroll_hard/(byte/signed byte/word/signed word/dword/signed dword) 0 scroll_hard::@1/(byte) scroll_hard::i#1 )
  [47] *((const byte*) SCREEN#0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [48] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2)
  [55] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2
  [56] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1
  to:scroll_hard::@return
scroll_hard::@return: scope:[scroll_hard]  from scroll_hard::@1
  [57] return 
  to:@return
next_char: scope:[next_char]  from scroll_bit::@4
  [58] (byte) next_char::c#0 ← *((byte*) nxt#31)
  [59] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1
  to:next_char::@2
next_char::@2: scope:[next_char]  from next_char
  [60] (byte) next_char::c#1 ← *((const byte*) TEXT#0)
  to:next_char::@1
next_char::@1: scope:[next_char]  from next_char next_char::@2
  [61] (byte) next_char::return#1 ← phi( next_char/(byte) next_char::c#0 next_char::@2/(byte) next_char::c#1 )
  [61] (byte*) nxt#18 ← phi( next_char/(byte*) nxt#31 next_char::@2/(const byte*) TEXT#0 )
  [62] (byte*) nxt#19 ← ++ (byte*) nxt#18
  to:next_char::@return
next_char::@return: scope:[next_char]  from next_char::@1
  [63] return 
  to:@return
fillscreen: scope:[fillscreen]  from main
  [64] phi()
  to:fillscreen::@1
fillscreen::@1: scope:[fillscreen]  from fillscreen fillscreen::@1
  [65] (byte*) fillscreen::cursor#2 ← phi( fillscreen/(const byte*) SCREEN#0 fillscreen::@1/(byte*) fillscreen::cursor#1 )
  [66] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0
  [67] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2
  [68] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto fillscreen::@1
  to:fillscreen::@return
fillscreen::@return: scope:[fillscreen]  from fillscreen::@1
  [69] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte*) CHARGEN
(byte*) PROCPORT
(byte*) RASTER
(byte*) SCREEN
(byte*) SCROLL
(byte*) TEXT
(byte) current_bit
(byte) current_bit#12 3.0
(byte) current_bit#21 5.833333333333333
(byte) current_bit#29 2.142857142857143
(byte) current_bit#5 3.0
(byte*) current_chargen
(byte*) current_chargen#11 3.0
(byte*) current_chargen#19 5.944444444444444
(byte*) current_chargen#27 1.666666666666667
(byte*) current_chargen#5 4.0
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
(byte*) fillscreen::cursor
(byte*) fillscreen::cursor#1 16.5
(byte*) fillscreen::cursor#2 16.5
(byte) fillscreen::fill
(byte*) fillscreen::screen
(void()) main()
(byte()) next_char()
(byte) next_char::c
(byte) next_char::c#0 3.0
(byte) next_char::c#1 4.0
(byte) next_char::return
(byte) next_char::return#0 4.0
(byte) next_char::return#1 1.5
(byte*) nxt
(byte*) nxt#14 3.0
(byte*) nxt#18 4.0
(byte*) nxt#19 0.5
(byte*) nxt#31 1.5833333333333335
(byte*) nxt#36 0.3333333333333333
(byte) scroll
(byte) scroll#10 3.0
(byte) scroll#18 3.25
(byte) scroll#3 3.0
(void()) scroll_bit()
(byte~) scroll_bit::$3 4.0
(word~) scroll_bit::$4 4.0
(byte~) scroll_bit::$9 202.0
(byte) scroll_bit::b
(byte) scroll_bit::b#2 101.0
(byte) scroll_bit::bits
(byte) scroll_bit::bits#0 202.0
(word) scroll_bit::c
(word) scroll_bit::c#0 4.0
(byte) scroll_bit::r
(byte) scroll_bit::r#1 151.5
(byte) scroll_bit::r#2 37.875
(byte*) scroll_bit::sc
(byte*) scroll_bit::sc#1 67.33333333333333
(byte*) scroll_bit::sc#2 43.285714285714285
(void()) scroll_hard()
(byte) scroll_hard::i
(byte) scroll_hard::i#1 151.5
(byte) scroll_hard::i#2 202.00000000000006
(void()) scroll_soft()

Initial phi equivalence classes
[ scroll#18 scroll#10 scroll#3 ]
[ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
[ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ]
[ scroll_bit::r#2 scroll_bit::r#1 ]
[ scroll_bit::sc#2 scroll_bit::sc#1 ]
[ scroll_bit::b#2 ]
[ scroll_hard::i#2 scroll_hard::i#1 ]
[ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ]
[ next_char::return#1 next_char::c#0 next_char::c#1 ]
[ fillscreen::cursor#2 fillscreen::cursor#1 ]
Added variable next_char::return#0 to zero page equivalence class [ next_char::return#0 ]
Added variable scroll_bit::$3 to zero page equivalence class [ scroll_bit::$3 ]
Added variable scroll_bit::c#0 to zero page equivalence class [ scroll_bit::c#0 ]
Added variable scroll_bit::$4 to zero page equivalence class [ scroll_bit::$4 ]
Added variable scroll_bit::bits#0 to zero page equivalence class [ scroll_bit::bits#0 ]
Added variable scroll_bit::$9 to zero page equivalence class [ scroll_bit::$9 ]
Complete equivalence classes
[ scroll#18 scroll#10 scroll#3 ]
[ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
[ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ]
[ scroll_bit::r#2 scroll_bit::r#1 ]
[ scroll_bit::sc#2 scroll_bit::sc#1 ]
[ scroll_bit::b#2 ]
[ scroll_hard::i#2 scroll_hard::i#1 ]
[ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ]
[ next_char::return#1 next_char::c#0 next_char::c#1 ]
[ fillscreen::cursor#2 fillscreen::cursor#1 ]
[ next_char::return#0 ]
[ scroll_bit::$3 ]
[ scroll_bit::c#0 ]
[ scroll_bit::$4 ]
[ scroll_bit::bits#0 ]
[ scroll_bit::$9 ]
Allocated zp ZP_BYTE:2 [ scroll#18 scroll#10 scroll#3 ]
Allocated zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Allocated zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ]
Allocated zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ]
Allocated zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ]
Allocated zp ZP_BYTE:9 [ scroll_bit::b#2 ]
Allocated zp ZP_BYTE:10 [ scroll_hard::i#2 scroll_hard::i#1 ]
Allocated zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ]
Allocated zp ZP_BYTE:13 [ next_char::return#1 next_char::c#0 next_char::c#1 ]
Allocated zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ]
Allocated zp ZP_BYTE:16 [ next_char::return#0 ]
Allocated zp ZP_BYTE:17 [ scroll_bit::$3 ]
Allocated zp ZP_WORD:18 [ scroll_bit::c#0 ]
Allocated zp ZP_WORD:20 [ scroll_bit::$4 ]
Allocated zp ZP_BYTE:22 [ scroll_bit::bits#0 ]
Allocated zp ZP_BYTE:23 [ scroll_bit::$9 ]

INITIAL ASM
//SEG0 File Comments
// An 8x8 char letter scroller
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label PROCPORT = 1
  .label CHARGEN = $d000
  .label SCREEN = $400
  .label RASTER = $d012
  .label BGCOL = $d020
  .label SCROLL = $d016
  .label scroll = 2
  .label current_bit = 3
  .label current_chargen = 4
  .label nxt = $b
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
b6_from_bbegin:
  jmp b6
//SEG5 @6
b6:
//SEG6 [2] call main 
//SEG7 [4] phi from @6 to main [phi:@6->main]
main_from_b6:
  jsr main
//SEG8 [3] phi from @6 to @end [phi:@6->@end]
bend_from_b6:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call fillscreen 
  //SEG12 [64] phi from main to fillscreen [phi:main->fillscreen]
  fillscreen_from_main:
    jsr fillscreen
  //SEG13 [6] phi from main to main::@2 [phi:main->main::@2]
  b2_from_main:
  //SEG14 [6] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- pbuz1=pbuc1 
    lda #<CHARGEN
    sta current_chargen
    lda #>CHARGEN
    sta current_chargen+1
  //SEG15 [6] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- pbuz1=pbuc1 
    lda #<TEXT
    sta nxt
    lda #>TEXT
    sta nxt+1
  //SEG16 [6] phi (byte) current_bit#29 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main->main::@2#2] -- vbuz1=vbuc1 
    lda #1
    sta current_bit
  //SEG17 [6] phi (byte) scroll#18 = (byte/signed byte/word/signed word/dword/signed dword) 7 [phi:main->main::@2#3] -- vbuz1=vbuc1 
    lda #7
    sta scroll
    jmp b2
  // Wait for raster
  //SEG18 [6] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  b2_from_b2:
    jmp b2
  //SEG19 main::@2
  b2:
  //SEG20 [7] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$fe
    bne b2_from_b2
    jmp b3
  //SEG21 main::@3
  b3:
  //SEG22 [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b3
    jmp b5
  //SEG23 main::@5
  b5:
  //SEG24 [9] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
  //SEG25 [10] call scroll_soft 
    jsr scroll_soft
    jmp b8
  //SEG26 main::@8
  b8:
  //SEG27 [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
  //SEG28 [6] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  b2_from_b8:
  //SEG29 [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#11 [phi:main::@8->main::@2#0] -- register_copy 
  //SEG30 [6] phi (byte*) nxt#31 = (byte*) nxt#14 [phi:main::@8->main::@2#1] -- register_copy 
  //SEG31 [6] phi (byte) current_bit#29 = (byte) current_bit#12 [phi:main::@8->main::@2#2] -- register_copy 
  //SEG32 [6] phi (byte) scroll#18 = (byte) scroll#10 [phi:main::@8->main::@2#3] -- register_copy 
    jmp b2
}
//SEG33 scroll_soft
scroll_soft: {
  //SEG34 [12] (byte) scroll#3 ← -- (byte) scroll#18 -- vbuz1=_dec_vbuz1 
    dec scroll
  //SEG35 [13] if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda scroll
    cmp #$ff
    bne b1_from_scroll_soft
  //SEG36 [14] phi from scroll_soft to scroll_soft::@2 [phi:scroll_soft->scroll_soft::@2]
  b2_from_scroll_soft:
    jmp b2
  //SEG37 scroll_soft::@2
  b2:
  //SEG38 [15] call scroll_bit 
    jsr scroll_bit
  //SEG39 [16] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1]
  b1_from_b2:
  //SEG40 [16] phi (byte*) current_chargen#11 = (byte*) current_chargen#19 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy 
  //SEG41 [16] phi (byte*) nxt#14 = (byte*) nxt#36 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy 
  //SEG42 [16] phi (byte) current_bit#12 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy 
  //SEG43 [16] phi (byte) scroll#10 = (byte/signed byte/word/signed word/dword/signed dword) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- vbuz1=vbuc1 
    lda #7
    sta scroll
    jmp b1
  //SEG44 [16] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1]
  b1_from_scroll_soft:
  //SEG45 [16] phi (byte*) current_chargen#11 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy 
  //SEG46 [16] phi (byte*) nxt#14 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy 
  //SEG47 [16] phi (byte) current_bit#12 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy 
  //SEG48 [16] phi (byte) scroll#10 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy 
    jmp b1
  //SEG49 scroll_soft::@1
  b1:
  //SEG50 [17] *((const byte*) SCROLL#0) ← (byte) scroll#10 -- _deref_pbuc1=vbuz1 
    lda scroll
    sta SCROLL
    jmp breturn
  //SEG51 scroll_soft::@return
  breturn:
  //SEG52 [18] return 
    rts
}
//SEG53 scroll_bit
scroll_bit: {
    .label _3 = $11
    .label _4 = $14
    .label _9 = $17
    .label c = $12
    .label bits = $16
    .label sc = 7
    .label r = 6
    .label b = 9
  //SEG54 [19] (byte) current_bit#5 ← (byte) current_bit#29 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_ror_1 
    lsr current_bit
  //SEG55 [20] if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1 -- vbuz1_neq_0_then_la1 
    lda current_bit
    cmp #0
    bne b1_from_scroll_bit
  //SEG56 [21] phi from scroll_bit to scroll_bit::@4 [phi:scroll_bit->scroll_bit::@4]
  b4_from_scroll_bit:
    jmp b4
  //SEG57 scroll_bit::@4
  b4:
  //SEG58 [22] call next_char 
    jsr next_char
  //SEG59 [23] (byte) next_char::return#0 ← (byte) next_char::return#1 -- vbuz1=vbuz2 
    lda next_char.return_1
    sta next_char.return
    jmp b8
  //SEG60 scroll_bit::@8
  b8:
  //SEG61 [24] (byte~) scroll_bit::$3 ← (byte) next_char::return#0 -- vbuz1=vbuz2 
    lda next_char.return
    sta _3
  //SEG62 [25] (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3 -- vwuz1=_word_vbuz2 
    lda _3
    sta c
    lda #0
    sta c+1
  //SEG63 [26] (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz2_rol_3 
    lda c
    asl
    sta _4
    lda c+1
    rol
    sta _4+1
    asl _4
    rol _4+1
    asl _4
    rol _4+1
  //SEG64 [27] (byte*) current_chargen#5 ← (const byte*) CHARGEN#0 + (word~) scroll_bit::$4 -- pbuz1=pbuc1_plus_vwuz2 
    lda _4
    clc
    adc #<CHARGEN
    sta current_chargen
    lda _4+1
    adc #>CHARGEN
    sta current_chargen+1
  //SEG65 [28] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1]
  b1_from_b8:
  //SEG66 [28] phi (byte*) nxt#36 = (byte*) nxt#19 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy 
  //SEG67 [28] phi (byte) current_bit#21 = (byte/word/signed word/dword/signed dword) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- vbuz1=vbuc1 
    lda #$80
    sta current_bit
  //SEG68 [28] phi (byte*) current_chargen#19 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy 
    jmp b1
  //SEG69 [28] phi from scroll_bit to scroll_bit::@1 [phi:scroll_bit->scroll_bit::@1]
  b1_from_scroll_bit:
  //SEG70 [28] phi (byte*) nxt#36 = (byte*) nxt#31 [phi:scroll_bit->scroll_bit::@1#0] -- register_copy 
  //SEG71 [28] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit->scroll_bit::@1#1] -- register_copy 
  //SEG72 [28] phi (byte*) current_chargen#19 = (byte*) current_chargen#27 [phi:scroll_bit->scroll_bit::@1#2] -- register_copy 
    jmp b1
  //SEG73 scroll_bit::@1
  b1:
  //SEG74 [29] call scroll_hard 
  //SEG75 [45] phi from scroll_bit::@1 to scroll_hard [phi:scroll_bit::@1->scroll_hard]
  scroll_hard_from_b1:
    jsr scroll_hard
    jmp b7
  //SEG76 scroll_bit::@7
  b7:
  //SEG77 asm { sei  }
    sei
  //SEG78 [31] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG79 [32] phi from scroll_bit::@7 to scroll_bit::@2 [phi:scroll_bit::@7->scroll_bit::@2]
  b2_from_b7:
  //SEG80 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 39 [phi:scroll_bit::@7->scroll_bit::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN+$28+$27
    sta sc
    lda #>SCREEN+$28+$27
    sta sc+1
  //SEG81 [32] phi (byte) scroll_bit::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:scroll_bit::@7->scroll_bit::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta r
    jmp b2
  //SEG82 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2]
  b2_from_b3:
  //SEG83 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy 
  //SEG84 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy 
    jmp b2
  //SEG85 scroll_bit::@2
  b2:
  //SEG86 [33] (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#19 + (byte) scroll_bit::r#2) -- vbuz1=pbuz2_derefidx_vbuz3 
    ldy r
    lda (current_chargen),y
    sta bits
  //SEG87 [34] (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 -- vbuz1=vbuz2_band_vbuz3 
    lda bits
    and current_bit
    sta _9
  //SEG88 [35] if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3 -- vbuz1_eq_0_then_la1 
    lda _9
    cmp #0
    beq b3_from_b2
  //SEG89 [36] phi from scroll_bit::@2 to scroll_bit::@5 [phi:scroll_bit::@2->scroll_bit::@5]
  b5_from_b2:
    jmp b5
  //SEG90 scroll_bit::@5
  b5:
  //SEG91 [37] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3]
  b3_from_b5:
  //SEG92 [37] phi (byte) scroll_bit::b#2 = (byte/word/signed word/dword/signed dword) 128+(byte) ' ' [phi:scroll_bit::@5->scroll_bit::@3#0] -- vbuz1=vbuc1 
    lda #$80+' '
    sta b
    jmp b3
  //SEG93 [37] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3]
  b3_from_b2:
  //SEG94 [37] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- vbuz1=vbuc1 
    lda #' '
    sta b
    jmp b3
  //SEG95 scroll_bit::@3
  b3:
  //SEG96 [38] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 -- _deref_pbuz1=vbuz2 
    lda b
    ldy #0
    sta (sc),y
  //SEG97 [39] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$28
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG98 [40] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 -- vbuz1=_inc_vbuz1 
    inc r
  //SEG99 [41] if((byte) scroll_bit::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto scroll_bit::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda r
    cmp #8
    bne b2_from_b3
    jmp b6
  //SEG100 scroll_bit::@6
  b6:
  //SEG101 [42] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG102 asm { cli  }
    cli
    jmp breturn
  //SEG103 scroll_bit::@return
  breturn:
  //SEG104 [44] return 
    rts
}
//SEG105 scroll_hard
scroll_hard: {
    .label i = $a
  //SEG106 [46] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1]
  b1_from_scroll_hard:
  //SEG107 [46] phi (byte) scroll_hard::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:scroll_hard->scroll_hard::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  // Hard scroll
  //SEG108 [46] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1]
  b1_from_b1:
  //SEG109 [46] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy 
    jmp b1
  //SEG110 scroll_hard::@1
  b1:
  //SEG111 [47] *((const byte*) SCREEN#0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+1,y
    sta SCREEN,y
  //SEG112 [48] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*1+1,y
    sta SCREEN+$28*1,y
  //SEG113 [49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*2+1,y
    sta SCREEN+$28*2,y
  //SEG114 [50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*3+1,y
    sta SCREEN+$28*3,y
  //SEG115 [51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*4+1,y
    sta SCREEN+$28*4,y
  //SEG116 [52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*5+1,y
    sta SCREEN+$28*5,y
  //SEG117 [53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*6+1,y
    sta SCREEN+$28*6,y
  //SEG118 [54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy i
    lda SCREEN+$28*7+1,y
    sta SCREEN+$28*7,y
  //SEG119 [55] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG120 [56] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$27
    bne b1_from_b1
    jmp breturn
  //SEG121 scroll_hard::@return
  breturn:
  //SEG122 [57] return 
    rts
}
//SEG123 next_char
// Find the next char of the scroll text
next_char: {
    .label return = $10
    .label c = $d
    .label return_1 = $d
  //SEG124 [58] (byte) next_char::c#0 ← *((byte*) nxt#31) -- vbuz1=_deref_pbuz2 
    ldy #0
    lda (nxt),y
    sta c
  //SEG125 [59] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda c
    cmp #'@'
    bne b1_from_next_char
    jmp b2
  //SEG126 next_char::@2
  b2:
  //SEG127 [60] (byte) next_char::c#1 ← *((const byte*) TEXT#0) -- vbuz1=_deref_pbuc1 
    lda TEXT
    sta c
  //SEG128 [61] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1]
  b1_from_b2:
  //SEG129 [61] phi (byte) next_char::return#1 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy 
  //SEG130 [61] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- pbuz1=pbuc1 
    lda #<TEXT
    sta nxt
    lda #>TEXT
    sta nxt+1
    jmp b1
  //SEG131 [61] phi from next_char to next_char::@1 [phi:next_char->next_char::@1]
  b1_from_next_char:
  //SEG132 [61] phi (byte) next_char::return#1 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy 
  //SEG133 [61] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy 
    jmp b1
  //SEG134 next_char::@1
  b1:
  //SEG135 [62] (byte*) nxt#19 ← ++ (byte*) nxt#18 -- pbuz1=_inc_pbuz1 
    inc nxt
    bne !+
    inc nxt+1
  !:
    jmp breturn
  //SEG136 next_char::@return
  breturn:
  //SEG137 [63] return 
    rts
}
//SEG138 fillscreen
// Fill the screen with one char
fillscreen: {
    .const fill = $20
    .label cursor = $e
  //SEG139 [65] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1]
  b1_from_fillscreen:
  //SEG140 [65] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta cursor
    lda #>SCREEN
    sta cursor+1
    jmp b1
  //SEG141 [65] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1]
  b1_from_b1:
  //SEG142 [65] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy 
    jmp b1
  //SEG143 fillscreen::@1
  b1:
  //SEG144 [66] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 -- _deref_pbuz1=vbuc1 
    lda #fill
    ldy #0
    sta (cursor),y
  //SEG145 [67] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 -- pbuz1=_inc_pbuz1 
    inc cursor
    bne !+
    inc cursor+1
  !:
  //SEG146 [68] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto fillscreen::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda cursor+1
    cmp #>SCREEN+$3e8
    bcc b1_from_b1
    bne !+
    lda cursor
    cmp #<SCREEN+$3e8
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG147 fillscreen::@return
  breturn:
  //SEG148 [69] return 
    rts
}
  TEXT: .text "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =-     @"

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ scroll#18 scroll#10 scroll#3 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Statement [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) always clobbers reg byte a 
Statement [25] (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3 [ scroll_bit::c#0 nxt#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ scroll_bit::c#0 nxt#19 ] ) always clobbers reg byte a 
Statement [26] (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ scroll_bit::$4 nxt#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ scroll_bit::$4 nxt#19 ] ) always clobbers reg byte a 
Statement [27] (byte*) current_chargen#5 ← (const byte*) CHARGEN#0 + (word~) scroll_bit::$4 [ current_chargen#5 nxt#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_chargen#5 nxt#19 ] ) always clobbers reg byte a 
Statement [31] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ current_bit#21 nxt#36 current_chargen#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 ] ) always clobbers reg byte a 
Statement [33] (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#19 + (byte) scroll_bit::r#2) [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ]
Statement [34] (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$9 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$9 ] ) always clobbers reg byte a 
Statement [38] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ]
Statement [39] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#1 ] ) always clobbers reg byte a 
Statement [42] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ current_bit#21 nxt#36 current_chargen#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 ] ) always clobbers reg byte a 
Statement [47] *((const byte*) SCREEN#0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ scroll_hard::i#2 scroll_hard::i#1 ]
Statement [48] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [58] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:2::scroll_soft:10::scroll_bit:15::next_char:22 [ nxt#31 next_char::c#0 ] ) always clobbers reg byte a reg byte y 
Statement [66] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:2::fillscreen:5 [ fillscreen::cursor#2 ] ) always clobbers reg byte a reg byte y 
Statement [68] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:2::fillscreen:5 [ fillscreen::cursor#1 ] ) always clobbers reg byte a 
Statement [7] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) always clobbers reg byte a 
Statement [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ( main:2 [ scroll#18 current_bit#29 nxt#31 current_chargen#27 ] ) always clobbers reg byte a 
Statement [25] (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3 [ scroll_bit::c#0 nxt#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ scroll_bit::c#0 nxt#19 ] ) always clobbers reg byte a 
Statement [26] (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3 [ scroll_bit::$4 nxt#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ scroll_bit::$4 nxt#19 ] ) always clobbers reg byte a 
Statement [27] (byte*) current_chargen#5 ← (const byte*) CHARGEN#0 + (word~) scroll_bit::$4 [ current_chargen#5 nxt#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_chargen#5 nxt#19 ] ) always clobbers reg byte a 
Statement [31] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 [ current_bit#21 nxt#36 current_chargen#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 ] ) always clobbers reg byte a 
Statement [33] (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#19 + (byte) scroll_bit::r#2) [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::bits#0 ] ) always clobbers reg byte a reg byte y 
Statement [34] (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$9 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 scroll_bit::$9 ] ) always clobbers reg byte a 
Statement [38] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#2 ] ) always clobbers reg byte y 
Statement [39] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#1 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 scroll_bit::r#2 scroll_bit::sc#1 ] ) always clobbers reg byte a 
Statement [42] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 [ current_bit#21 nxt#36 current_chargen#19 ] ( main:2::scroll_soft:10::scroll_bit:15 [ current_bit#21 nxt#36 current_chargen#19 ] ) always clobbers reg byte a 
Statement [47] *((const byte*) SCREEN#0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [48] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) [ scroll_hard::i#2 ] ( main:2::scroll_soft:10::scroll_bit:15::scroll_hard:29 [ current_bit#21 nxt#36 current_chargen#19 scroll_hard::i#2 ] ) always clobbers reg byte a 
Statement [58] (byte) next_char::c#0 ← *((byte*) nxt#31) [ nxt#31 next_char::c#0 ] ( main:2::scroll_soft:10::scroll_bit:15::next_char:22 [ nxt#31 next_char::c#0 ] ) always clobbers reg byte a reg byte y 
Statement [66] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 [ fillscreen::cursor#2 ] ( main:2::fillscreen:5 [ fillscreen::cursor#2 ] ) always clobbers reg byte a reg byte y 
Statement [68] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto fillscreen::@1 [ fillscreen::cursor#1 ] ( main:2::fillscreen:5 [ fillscreen::cursor#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ scroll#18 scroll#10 scroll#3 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] : zp ZP_BYTE:3 , reg byte x , 
Potential registers zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] : zp ZP_BYTE:6 , reg byte x , 
Potential registers zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] : zp ZP_WORD:7 , 
Potential registers zp ZP_BYTE:9 [ scroll_bit::b#2 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ scroll_hard::i#2 scroll_hard::i#1 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_BYTE:13 [ next_char::return#1 next_char::c#0 next_char::c#1 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] : zp ZP_WORD:14 , 
Potential registers zp ZP_BYTE:16 [ next_char::return#0 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:17 [ scroll_bit::$3 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:18 [ scroll_bit::c#0 ] : zp ZP_WORD:18 , 
Potential registers zp ZP_WORD:20 [ scroll_bit::$4 ] : zp ZP_WORD:20 , 
Potential registers zp ZP_BYTE:22 [ scroll_bit::bits#0 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ scroll_bit::$9 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [scroll_bit] 202: zp ZP_BYTE:22 [ scroll_bit::bits#0 ] 202: zp ZP_BYTE:23 [ scroll_bit::$9 ] 189.38: zp ZP_BYTE:6 [ scroll_bit::r#2 scroll_bit::r#1 ] 110.62: zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] 101: zp ZP_BYTE:9 [ scroll_bit::b#2 ] 4: zp ZP_BYTE:17 [ scroll_bit::$3 ] 4: zp ZP_WORD:18 [ scroll_bit::c#0 ] 4: zp ZP_WORD:20 [ scroll_bit::$4 ] 
Uplift Scope [scroll_hard] 353.5: zp ZP_BYTE:10 [ scroll_hard::i#2 scroll_hard::i#1 ] 
Uplift Scope [] 14.61: zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] 13.98: zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] 9.42: zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] 9.25: zp ZP_BYTE:2 [ scroll#18 scroll#10 scroll#3 ] 
Uplift Scope [fillscreen] 33: zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] 
Uplift Scope [next_char] 8.5: zp ZP_BYTE:13 [ next_char::return#1 next_char::c#0 next_char::c#1 ] 4: zp ZP_BYTE:16 [ next_char::return#0 ] 
Uplift Scope [main] 
Uplift Scope [scroll_soft] 

Uplifting [scroll_bit] best 28238 combination reg byte a [ scroll_bit::bits#0 ] reg byte a [ scroll_bit::$9 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] zp ZP_BYTE:17 [ scroll_bit::$3 ] zp ZP_WORD:18 [ scroll_bit::c#0 ] zp ZP_WORD:20 [ scroll_bit::$4 ] 
Limited combination testing to 100 combinations of 512 possible.
Uplifting [scroll_hard] best 24938 combination reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ] 
Uplifting [] best 24626 combination zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] reg byte x [ scroll#18 scroll#10 scroll#3 ] 
Uplifting [fillscreen] best 24626 combination zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] 
Uplifting [next_char] best 24608 combination reg byte a [ next_char::return#1 next_char::c#0 next_char::c#1 ] reg byte a [ next_char::return#0 ] 
Uplifting [main] best 24608 combination 
Uplifting [scroll_soft] best 24608 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Uplifting [] best 24608 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:17 [ scroll_bit::$3 ]
Uplifting [scroll_bit] best 24602 combination reg byte a [ scroll_bit::$3 ] 
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] ] with [ zp ZP_WORD:20 [ scroll_bit::$4 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 ] ] with [ zp ZP_WORD:18 [ scroll_bit::c#0 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 scroll_bit::c#0 ] ] with [ zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ]
Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 scroll_bit::c#0 fillscreen::cursor#2 fillscreen::cursor#1 ]
Allocated (was zp ZP_WORD:7) zp ZP_WORD:5 [ scroll_bit::sc#2 scroll_bit::sc#1 ]
Allocated (was zp ZP_WORD:11) zp ZP_WORD:7 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// An 8x8 char letter scroller
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label PROCPORT = 1
  .label CHARGEN = $d000
  .label SCREEN = $400
  .label RASTER = $d012
  .label BGCOL = $d020
  .label SCROLL = $d016
  .label current_bit = 2
  .label current_chargen = 3
  .label nxt = 7
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
b6_from_bbegin:
  jmp b6
//SEG5 @6
b6:
//SEG6 [2] call main 
//SEG7 [4] phi from @6 to main [phi:@6->main]
main_from_b6:
  jsr main
//SEG8 [3] phi from @6 to @end [phi:@6->@end]
bend_from_b6:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
  //SEG11 [5] call fillscreen 
  //SEG12 [64] phi from main to fillscreen [phi:main->fillscreen]
  fillscreen_from_main:
    jsr fillscreen
  //SEG13 [6] phi from main to main::@2 [phi:main->main::@2]
  b2_from_main:
  //SEG14 [6] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- pbuz1=pbuc1 
    lda #<CHARGEN
    sta current_chargen
    lda #>CHARGEN
    sta current_chargen+1
  //SEG15 [6] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- pbuz1=pbuc1 
    lda #<TEXT
    sta nxt
    lda #>TEXT
    sta nxt+1
  //SEG16 [6] phi (byte) current_bit#29 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main->main::@2#2] -- vbuz1=vbuc1 
    lda #1
    sta current_bit
  //SEG17 [6] phi (byte) scroll#18 = (byte/signed byte/word/signed word/dword/signed dword) 7 [phi:main->main::@2#3] -- vbuxx=vbuc1 
    ldx #7
    jmp b2
  // Wait for raster
  //SEG18 [6] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  b2_from_b2:
    jmp b2
  //SEG19 main::@2
  b2:
  //SEG20 [7] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$fe
    bne b2_from_b2
    jmp b3
  //SEG21 main::@3
  b3:
  //SEG22 [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b3
    jmp b5
  //SEG23 main::@5
  b5:
  //SEG24 [9] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
  //SEG25 [10] call scroll_soft 
    jsr scroll_soft
    jmp b8
  //SEG26 main::@8
  b8:
  //SEG27 [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
  //SEG28 [6] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  b2_from_b8:
  //SEG29 [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#11 [phi:main::@8->main::@2#0] -- register_copy 
  //SEG30 [6] phi (byte*) nxt#31 = (byte*) nxt#14 [phi:main::@8->main::@2#1] -- register_copy 
  //SEG31 [6] phi (byte) current_bit#29 = (byte) current_bit#12 [phi:main::@8->main::@2#2] -- register_copy 
  //SEG32 [6] phi (byte) scroll#18 = (byte) scroll#10 [phi:main::@8->main::@2#3] -- register_copy 
    jmp b2
}
//SEG33 scroll_soft
scroll_soft: {
  //SEG34 [12] (byte) scroll#3 ← -- (byte) scroll#18 -- vbuxx=_dec_vbuxx 
    dex
  //SEG35 [13] if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$ff
    bne b1_from_scroll_soft
  //SEG36 [14] phi from scroll_soft to scroll_soft::@2 [phi:scroll_soft->scroll_soft::@2]
  b2_from_scroll_soft:
    jmp b2
  //SEG37 scroll_soft::@2
  b2:
  //SEG38 [15] call scroll_bit 
    jsr scroll_bit
  //SEG39 [16] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1]
  b1_from_b2:
  //SEG40 [16] phi (byte*) current_chargen#11 = (byte*) current_chargen#19 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy 
  //SEG41 [16] phi (byte*) nxt#14 = (byte*) nxt#36 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy 
  //SEG42 [16] phi (byte) current_bit#12 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy 
  //SEG43 [16] phi (byte) scroll#10 = (byte/signed byte/word/signed word/dword/signed dword) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- vbuxx=vbuc1 
    ldx #7
    jmp b1
  //SEG44 [16] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1]
  b1_from_scroll_soft:
  //SEG45 [16] phi (byte*) current_chargen#11 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy 
  //SEG46 [16] phi (byte*) nxt#14 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy 
  //SEG47 [16] phi (byte) current_bit#12 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy 
  //SEG48 [16] phi (byte) scroll#10 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy 
    jmp b1
  //SEG49 scroll_soft::@1
  b1:
  //SEG50 [17] *((const byte*) SCROLL#0) ← (byte) scroll#10 -- _deref_pbuc1=vbuxx 
    stx SCROLL
    jmp breturn
  //SEG51 scroll_soft::@return
  breturn:
  //SEG52 [18] return 
    rts
}
//SEG53 scroll_bit
scroll_bit: {
    .label _4 = 3
    .label c = 3
    .label sc = 5
  //SEG54 [19] (byte) current_bit#5 ← (byte) current_bit#29 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_ror_1 
    lsr current_bit
  //SEG55 [20] if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1 -- vbuz1_neq_0_then_la1 
    lda current_bit
    cmp #0
    bne b1_from_scroll_bit
  //SEG56 [21] phi from scroll_bit to scroll_bit::@4 [phi:scroll_bit->scroll_bit::@4]
  b4_from_scroll_bit:
    jmp b4
  //SEG57 scroll_bit::@4
  b4:
  //SEG58 [22] call next_char 
    jsr next_char
  //SEG59 [23] (byte) next_char::return#0 ← (byte) next_char::return#1
    jmp b8
  //SEG60 scroll_bit::@8
  b8:
  //SEG61 [24] (byte~) scroll_bit::$3 ← (byte) next_char::return#0
  //SEG62 [25] (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3 -- vwuz1=_word_vbuaa 
    sta c
    lda #0
    sta c+1
  //SEG63 [26] (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 
    asl _4
    rol _4+1
    asl _4
    rol _4+1
    asl _4
    rol _4+1
  //SEG64 [27] (byte*) current_chargen#5 ← (const byte*) CHARGEN#0 + (word~) scroll_bit::$4 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda current_chargen
    adc #<CHARGEN
    sta current_chargen
    lda current_chargen+1
    adc #>CHARGEN
    sta current_chargen+1
  //SEG65 [28] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1]
  b1_from_b8:
  //SEG66 [28] phi (byte*) nxt#36 = (byte*) nxt#19 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy 
  //SEG67 [28] phi (byte) current_bit#21 = (byte/word/signed word/dword/signed dword) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- vbuz1=vbuc1 
    lda #$80
    sta current_bit
  //SEG68 [28] phi (byte*) current_chargen#19 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy 
    jmp b1
  //SEG69 [28] phi from scroll_bit to scroll_bit::@1 [phi:scroll_bit->scroll_bit::@1]
  b1_from_scroll_bit:
  //SEG70 [28] phi (byte*) nxt#36 = (byte*) nxt#31 [phi:scroll_bit->scroll_bit::@1#0] -- register_copy 
  //SEG71 [28] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit->scroll_bit::@1#1] -- register_copy 
  //SEG72 [28] phi (byte*) current_chargen#19 = (byte*) current_chargen#27 [phi:scroll_bit->scroll_bit::@1#2] -- register_copy 
    jmp b1
  //SEG73 scroll_bit::@1
  b1:
  //SEG74 [29] call scroll_hard 
  //SEG75 [45] phi from scroll_bit::@1 to scroll_hard [phi:scroll_bit::@1->scroll_hard]
  scroll_hard_from_b1:
    jsr scroll_hard
    jmp b7
  //SEG76 scroll_bit::@7
  b7:
  //SEG77 asm { sei  }
    sei
  //SEG78 [31] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG79 [32] phi from scroll_bit::@7 to scroll_bit::@2 [phi:scroll_bit::@7->scroll_bit::@2]
  b2_from_b7:
  //SEG80 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 39 [phi:scroll_bit::@7->scroll_bit::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN+$28+$27
    sta sc
    lda #>SCREEN+$28+$27
    sta sc+1
  //SEG81 [32] phi (byte) scroll_bit::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:scroll_bit::@7->scroll_bit::@2#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b2
  //SEG82 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2]
  b2_from_b3:
  //SEG83 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy 
  //SEG84 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy 
    jmp b2
  //SEG85 scroll_bit::@2
  b2:
  //SEG86 [33] (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#19 + (byte) scroll_bit::r#2) -- vbuaa=pbuz1_derefidx_vbuxx 
    txa
    tay
    lda (current_chargen),y
  //SEG87 [34] (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 -- vbuaa=vbuaa_band_vbuz1 
    and current_bit
  //SEG88 [35] if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b3_from_b2
  //SEG89 [36] phi from scroll_bit::@2 to scroll_bit::@5 [phi:scroll_bit::@2->scroll_bit::@5]
  b5_from_b2:
    jmp b5
  //SEG90 scroll_bit::@5
  b5:
  //SEG91 [37] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3]
  b3_from_b5:
  //SEG92 [37] phi (byte) scroll_bit::b#2 = (byte/word/signed word/dword/signed dword) 128+(byte) ' ' [phi:scroll_bit::@5->scroll_bit::@3#0] -- vbuaa=vbuc1 
    lda #$80+' '
    jmp b3
  //SEG93 [37] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3]
  b3_from_b2:
  //SEG94 [37] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- vbuaa=vbuc1 
    lda #' '
    jmp b3
  //SEG95 scroll_bit::@3
  b3:
  //SEG96 [38] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
  //SEG97 [39] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$28
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG98 [40] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG99 [41] if((byte) scroll_bit::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto scroll_bit::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b2_from_b3
    jmp b6
  //SEG100 scroll_bit::@6
  b6:
  //SEG101 [42] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG102 asm { cli  }
    cli
    jmp breturn
  //SEG103 scroll_bit::@return
  breturn:
  //SEG104 [44] return 
    rts
}
//SEG105 scroll_hard
scroll_hard: {
  //SEG106 [46] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1]
  b1_from_scroll_hard:
  //SEG107 [46] phi (byte) scroll_hard::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:scroll_hard->scroll_hard::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  // Hard scroll
  //SEG108 [46] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1]
  b1_from_b1:
  //SEG109 [46] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy 
    jmp b1
  //SEG110 scroll_hard::@1
  b1:
  //SEG111 [47] *((const byte*) SCREEN#0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+1,x
    sta SCREEN,x
  //SEG112 [48] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*1+1,x
    sta SCREEN+$28*1,x
  //SEG113 [49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*2+1,x
    sta SCREEN+$28*2,x
  //SEG114 [50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*3+1,x
    sta SCREEN+$28*3,x
  //SEG115 [51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*4+1,x
    sta SCREEN+$28*4,x
  //SEG116 [52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*5+1,x
    sta SCREEN+$28*5,x
  //SEG117 [53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*6+1,x
    sta SCREEN+$28*6,x
  //SEG118 [54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*7+1,x
    sta SCREEN+$28*7,x
  //SEG119 [55] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG120 [56] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$27
    bne b1_from_b1
    jmp breturn
  //SEG121 scroll_hard::@return
  breturn:
  //SEG122 [57] return 
    rts
}
//SEG123 next_char
// Find the next char of the scroll text
next_char: {
  //SEG124 [58] (byte) next_char::c#0 ← *((byte*) nxt#31) -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (nxt),y
  //SEG125 [59] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 -- vbuaa_neq_vbuc1_then_la1 
    cmp #'@'
    bne b1_from_next_char
    jmp b2
  //SEG126 next_char::@2
  b2:
  //SEG127 [60] (byte) next_char::c#1 ← *((const byte*) TEXT#0) -- vbuaa=_deref_pbuc1 
    lda TEXT
  //SEG128 [61] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1]
  b1_from_b2:
  //SEG129 [61] phi (byte) next_char::return#1 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy 
  //SEG130 [61] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- pbuz1=pbuc1 
    lda #<TEXT
    sta nxt
    lda #>TEXT
    sta nxt+1
    jmp b1
  //SEG131 [61] phi from next_char to next_char::@1 [phi:next_char->next_char::@1]
  b1_from_next_char:
  //SEG132 [61] phi (byte) next_char::return#1 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy 
  //SEG133 [61] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy 
    jmp b1
  //SEG134 next_char::@1
  b1:
  //SEG135 [62] (byte*) nxt#19 ← ++ (byte*) nxt#18 -- pbuz1=_inc_pbuz1 
    inc nxt
    bne !+
    inc nxt+1
  !:
    jmp breturn
  //SEG136 next_char::@return
  breturn:
  //SEG137 [63] return 
    rts
}
//SEG138 fillscreen
// Fill the screen with one char
fillscreen: {
    .const fill = $20
    .label cursor = 3
  //SEG139 [65] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1]
  b1_from_fillscreen:
  //SEG140 [65] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta cursor
    lda #>SCREEN
    sta cursor+1
    jmp b1
  //SEG141 [65] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1]
  b1_from_b1:
  //SEG142 [65] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy 
    jmp b1
  //SEG143 fillscreen::@1
  b1:
  //SEG144 [66] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 -- _deref_pbuz1=vbuc1 
    lda #fill
    ldy #0
    sta (cursor),y
  //SEG145 [67] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 -- pbuz1=_inc_pbuz1 
    inc cursor
    bne !+
    inc cursor+1
  !:
  //SEG146 [68] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto fillscreen::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda cursor+1
    cmp #>SCREEN+$3e8
    bcc b1_from_b1
    bne !+
    lda cursor
    cmp #<SCREEN+$3e8
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG147 fillscreen::@return
  breturn:
  //SEG148 [69] return 
    rts
}
  TEXT: .text "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =-     @"

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b6
Removing instruction jmp bend
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b8
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b4
Removing instruction jmp b8
Removing instruction jmp b1
Removing instruction jmp b7
Removing instruction jmp b2
Removing instruction jmp b5
Removing instruction jmp b3
Removing instruction jmp b6
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b2 with b2
Replacing label b1_from_scroll_soft with b1
Replacing label b1_from_scroll_bit with b1
Replacing label b2_from_b3 with b2
Replacing label b1_from_b1 with b1
Replacing label b1_from_next_char with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b6_from_bbegin:
Removing instruction b6:
Removing instruction main_from_b6:
Removing instruction bend_from_b6:
Removing instruction b2_from_b2:
Removing instruction b2_from_scroll_soft:
Removing instruction b1_from_scroll_soft:
Removing instruction b4_from_scroll_bit:
Removing instruction b1_from_scroll_bit:
Removing instruction scroll_hard_from_b1:
Removing instruction b2_from_b3:
Removing instruction b5_from_b2:
Removing instruction b3_from_b5:
Removing instruction b1_from_b1:
Removing instruction b1_from_next_char:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction fillscreen_from_main:
Removing instruction b2_from_main:
Removing instruction b5:
Removing instruction b8:
Removing instruction b2_from_b8:
Removing instruction b2:
Removing instruction b1_from_b2:
Removing instruction breturn:
Removing instruction b4:
Removing instruction b8:
Removing instruction b1_from_b8:
Removing instruction b7:
Removing instruction b2_from_b7:
Removing instruction b5:
Removing instruction b6:
Removing instruction breturn:
Removing instruction b1_from_scroll_hard:
Removing instruction breturn:
Removing instruction b2:
Removing instruction b1_from_b2:
Removing instruction breturn:
Removing instruction b1_from_fillscreen:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Relabelling long label b3_from_b2 to b4
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @6
(label) @begin
(label) @end
(byte*) BGCOL
(const byte*) BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) 53280
(byte*) CHARGEN
(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248
(byte*) PROCPORT
(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1
(byte*) RASTER
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte*) SCROLL
(const byte*) SCROLL#0 SCROLL = ((byte*))(word/dword/signed dword) 53270
(byte*) TEXT
(const byte*) TEXT#0 TEXT = (string) "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =-     @"
(byte) current_bit
(byte) current_bit#12 current_bit zp ZP_BYTE:2 3.0
(byte) current_bit#21 current_bit zp ZP_BYTE:2 5.833333333333333
(byte) current_bit#29 current_bit zp ZP_BYTE:2 2.142857142857143
(byte) current_bit#5 current_bit zp ZP_BYTE:2 3.0
(byte*) current_chargen
(byte*) current_chargen#11 current_chargen zp ZP_WORD:3 3.0
(byte*) current_chargen#19 current_chargen zp ZP_WORD:3 5.944444444444444
(byte*) current_chargen#27 current_chargen zp ZP_WORD:3 1.666666666666667
(byte*) current_chargen#5 current_chargen zp ZP_WORD:3 4.0
(void()) fillscreen((byte*) fillscreen::screen , (byte) fillscreen::fill)
(label) fillscreen::@1
(label) fillscreen::@return
(byte*) fillscreen::cursor
(byte*) fillscreen::cursor#1 cursor zp ZP_WORD:3 16.5
(byte*) fillscreen::cursor#2 cursor zp ZP_WORD:3 16.5
(byte) fillscreen::fill
(const byte) fillscreen::fill#0 fill = (byte/signed byte/word/signed word/dword/signed dword) 32
(byte*) fillscreen::screen
(void()) main()
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@8
(byte()) next_char()
(label) next_char::@1
(label) next_char::@2
(label) next_char::@return
(byte) next_char::c
(byte) next_char::c#0 reg byte a 3.0
(byte) next_char::c#1 reg byte a 4.0
(byte) next_char::return
(byte) next_char::return#0 reg byte a 4.0
(byte) next_char::return#1 reg byte a 1.5
(byte*) nxt
(byte*) nxt#14 nxt zp ZP_WORD:7 3.0
(byte*) nxt#18 nxt zp ZP_WORD:7 4.0
(byte*) nxt#19 nxt zp ZP_WORD:7 0.5
(byte*) nxt#31 nxt zp ZP_WORD:7 1.5833333333333335
(byte*) nxt#36 nxt zp ZP_WORD:7 0.3333333333333333
(byte) scroll
(byte) scroll#10 reg byte x 3.0
(byte) scroll#18 reg byte x 3.25
(byte) scroll#3 reg byte x 3.0
(void()) scroll_bit()
(byte~) scroll_bit::$3 reg byte a 4.0
(word~) scroll_bit::$4 $4 zp ZP_WORD:3 4.0
(byte~) scroll_bit::$9 reg byte a 202.0
(label) scroll_bit::@1
(label) scroll_bit::@2
(label) scroll_bit::@3
(label) scroll_bit::@4
(label) scroll_bit::@5
(label) scroll_bit::@6
(label) scroll_bit::@7
(label) scroll_bit::@8
(label) scroll_bit::@return
(byte) scroll_bit::b
(byte) scroll_bit::b#2 reg byte a 101.0
(byte) scroll_bit::bits
(byte) scroll_bit::bits#0 reg byte a 202.0
(word) scroll_bit::c
(word) scroll_bit::c#0 c zp ZP_WORD:3 4.0
(byte) scroll_bit::r
(byte) scroll_bit::r#1 reg byte x 151.5
(byte) scroll_bit::r#2 reg byte x 37.875
(byte*) scroll_bit::sc
(byte*) scroll_bit::sc#1 sc zp ZP_WORD:5 67.33333333333333
(byte*) scroll_bit::sc#2 sc zp ZP_WORD:5 43.285714285714285
(void()) scroll_hard()
(label) scroll_hard::@1
(label) scroll_hard::@return
(byte) scroll_hard::i
(byte) scroll_hard::i#1 reg byte x 151.5
(byte) scroll_hard::i#2 reg byte x 202.00000000000006
(void()) scroll_soft()
(label) scroll_soft::@1
(label) scroll_soft::@2
(label) scroll_soft::@return

reg byte x [ scroll#18 scroll#10 scroll#3 ]
zp ZP_BYTE:2 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ]
zp ZP_WORD:3 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 scroll_bit::c#0 fillscreen::cursor#2 fillscreen::cursor#1 ]
reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ]
zp ZP_WORD:5 [ scroll_bit::sc#2 scroll_bit::sc#1 ]
reg byte a [ scroll_bit::b#2 ]
reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ]
zp ZP_WORD:7 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ]
reg byte a [ next_char::return#1 next_char::c#0 next_char::c#1 ]
reg byte a [ next_char::return#0 ]
reg byte a [ scroll_bit::$3 ]
reg byte a [ scroll_bit::bits#0 ]
reg byte a [ scroll_bit::$9 ]


FINAL ASSEMBLER
Score: 20822

//SEG0 File Comments
// An 8x8 char letter scroller
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label PROCPORT = 1
  .label CHARGEN = $d000
  .label SCREEN = $400
  .label RASTER = $d012
  .label BGCOL = $d020
  .label SCROLL = $d016
  .label current_bit = 2
  .label current_chargen = 3
  .label nxt = 7
//SEG3 @begin
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
//SEG5 @6
//SEG6 [2] call main 
//SEG7 [4] phi from @6 to main [phi:@6->main]
//SEG8 [3] phi from @6 to @end [phi:@6->@end]
//SEG9 @end
//SEG10 main
main: {
  //SEG11 [5] call fillscreen 
  //SEG12 [64] phi from main to fillscreen [phi:main->fillscreen]
    jsr fillscreen
  //SEG13 [6] phi from main to main::@2 [phi:main->main::@2]
  //SEG14 [6] phi (byte*) current_chargen#27 = (const byte*) CHARGEN#0 [phi:main->main::@2#0] -- pbuz1=pbuc1 
    lda #<CHARGEN
    sta current_chargen
    lda #>CHARGEN
    sta current_chargen+1
  //SEG15 [6] phi (byte*) nxt#31 = (const byte*) TEXT#0 [phi:main->main::@2#1] -- pbuz1=pbuc1 
    lda #<TEXT
    sta nxt
    lda #>TEXT
    sta nxt+1
  //SEG16 [6] phi (byte) current_bit#29 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main->main::@2#2] -- vbuz1=vbuc1 
    lda #1
    sta current_bit
  //SEG17 [6] phi (byte) scroll#18 = (byte/signed byte/word/signed word/dword/signed dword) 7 [phi:main->main::@2#3] -- vbuxx=vbuc1 
    ldx #7
  // Wait for raster
  //SEG18 [6] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  //SEG19 main::@2
  b2:
  //SEG20 [7] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$fe
    bne b2
  //SEG21 main::@3
  b3:
  //SEG22 [8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda RASTER
    cmp #$ff
    bne b3
  //SEG23 main::@5
  //SEG24 [9] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BGCOL
  //SEG25 [10] call scroll_soft 
    jsr scroll_soft
  //SEG26 main::@8
  //SEG27 [11] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BGCOL
  //SEG28 [6] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  //SEG29 [6] phi (byte*) current_chargen#27 = (byte*) current_chargen#11 [phi:main::@8->main::@2#0] -- register_copy 
  //SEG30 [6] phi (byte*) nxt#31 = (byte*) nxt#14 [phi:main::@8->main::@2#1] -- register_copy 
  //SEG31 [6] phi (byte) current_bit#29 = (byte) current_bit#12 [phi:main::@8->main::@2#2] -- register_copy 
  //SEG32 [6] phi (byte) scroll#18 = (byte) scroll#10 [phi:main::@8->main::@2#3] -- register_copy 
    jmp b2
}
//SEG33 scroll_soft
scroll_soft: {
  //SEG34 [12] (byte) scroll#3 ← -- (byte) scroll#18 -- vbuxx=_dec_vbuxx 
    dex
  //SEG35 [13] if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$ff
    bne b1
  //SEG36 [14] phi from scroll_soft to scroll_soft::@2 [phi:scroll_soft->scroll_soft::@2]
  //SEG37 scroll_soft::@2
  //SEG38 [15] call scroll_bit 
    jsr scroll_bit
  //SEG39 [16] phi from scroll_soft::@2 to scroll_soft::@1 [phi:scroll_soft::@2->scroll_soft::@1]
  //SEG40 [16] phi (byte*) current_chargen#11 = (byte*) current_chargen#19 [phi:scroll_soft::@2->scroll_soft::@1#0] -- register_copy 
  //SEG41 [16] phi (byte*) nxt#14 = (byte*) nxt#36 [phi:scroll_soft::@2->scroll_soft::@1#1] -- register_copy 
  //SEG42 [16] phi (byte) current_bit#12 = (byte) current_bit#21 [phi:scroll_soft::@2->scroll_soft::@1#2] -- register_copy 
  //SEG43 [16] phi (byte) scroll#10 = (byte/signed byte/word/signed word/dword/signed dword) 7 [phi:scroll_soft::@2->scroll_soft::@1#3] -- vbuxx=vbuc1 
    ldx #7
  //SEG44 [16] phi from scroll_soft to scroll_soft::@1 [phi:scroll_soft->scroll_soft::@1]
  //SEG45 [16] phi (byte*) current_chargen#11 = (byte*) current_chargen#27 [phi:scroll_soft->scroll_soft::@1#0] -- register_copy 
  //SEG46 [16] phi (byte*) nxt#14 = (byte*) nxt#31 [phi:scroll_soft->scroll_soft::@1#1] -- register_copy 
  //SEG47 [16] phi (byte) current_bit#12 = (byte) current_bit#29 [phi:scroll_soft->scroll_soft::@1#2] -- register_copy 
  //SEG48 [16] phi (byte) scroll#10 = (byte) scroll#3 [phi:scroll_soft->scroll_soft::@1#3] -- register_copy 
  //SEG49 scroll_soft::@1
  b1:
  //SEG50 [17] *((const byte*) SCROLL#0) ← (byte) scroll#10 -- _deref_pbuc1=vbuxx 
    stx SCROLL
  //SEG51 scroll_soft::@return
  //SEG52 [18] return 
    rts
}
//SEG53 scroll_bit
scroll_bit: {
    .label _4 = 3
    .label c = 3
    .label sc = 5
  //SEG54 [19] (byte) current_bit#5 ← (byte) current_bit#29 >> (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz1_ror_1 
    lsr current_bit
  //SEG55 [20] if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1 -- vbuz1_neq_0_then_la1 
    lda current_bit
    cmp #0
    bne b1
  //SEG56 [21] phi from scroll_bit to scroll_bit::@4 [phi:scroll_bit->scroll_bit::@4]
  //SEG57 scroll_bit::@4
  //SEG58 [22] call next_char 
    jsr next_char
  //SEG59 [23] (byte) next_char::return#0 ← (byte) next_char::return#1
  //SEG60 scroll_bit::@8
  //SEG61 [24] (byte~) scroll_bit::$3 ← (byte) next_char::return#0
  //SEG62 [25] (word) scroll_bit::c#0 ← ((word)) (byte~) scroll_bit::$3 -- vwuz1=_word_vbuaa 
    sta c
    lda #0
    sta c+1
  //SEG63 [26] (word~) scroll_bit::$4 ← (word) scroll_bit::c#0 << (byte/signed byte/word/signed word/dword/signed dword) 3 -- vwuz1=vwuz1_rol_3 
    asl _4
    rol _4+1
    asl _4
    rol _4+1
    asl _4
    rol _4+1
  //SEG64 [27] (byte*) current_chargen#5 ← (const byte*) CHARGEN#0 + (word~) scroll_bit::$4 -- pbuz1=pbuc1_plus_vwuz1 
    clc
    lda current_chargen
    adc #<CHARGEN
    sta current_chargen
    lda current_chargen+1
    adc #>CHARGEN
    sta current_chargen+1
  //SEG65 [28] phi from scroll_bit::@8 to scroll_bit::@1 [phi:scroll_bit::@8->scroll_bit::@1]
  //SEG66 [28] phi (byte*) nxt#36 = (byte*) nxt#19 [phi:scroll_bit::@8->scroll_bit::@1#0] -- register_copy 
  //SEG67 [28] phi (byte) current_bit#21 = (byte/word/signed word/dword/signed dword) 128 [phi:scroll_bit::@8->scroll_bit::@1#1] -- vbuz1=vbuc1 
    lda #$80
    sta current_bit
  //SEG68 [28] phi (byte*) current_chargen#19 = (byte*) current_chargen#5 [phi:scroll_bit::@8->scroll_bit::@1#2] -- register_copy 
  //SEG69 [28] phi from scroll_bit to scroll_bit::@1 [phi:scroll_bit->scroll_bit::@1]
  //SEG70 [28] phi (byte*) nxt#36 = (byte*) nxt#31 [phi:scroll_bit->scroll_bit::@1#0] -- register_copy 
  //SEG71 [28] phi (byte) current_bit#21 = (byte) current_bit#5 [phi:scroll_bit->scroll_bit::@1#1] -- register_copy 
  //SEG72 [28] phi (byte*) current_chargen#19 = (byte*) current_chargen#27 [phi:scroll_bit->scroll_bit::@1#2] -- register_copy 
  //SEG73 scroll_bit::@1
  b1:
  //SEG74 [29] call scroll_hard 
  //SEG75 [45] phi from scroll_bit::@1 to scroll_hard [phi:scroll_bit::@1->scroll_hard]
    jsr scroll_hard
  //SEG76 scroll_bit::@7
  //SEG77 asm { sei  }
    sei
  //SEG78 [31] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 50 -- _deref_pbuc1=vbuc2 
    lda #$32
    sta PROCPORT
  //SEG79 [32] phi from scroll_bit::@7 to scroll_bit::@2 [phi:scroll_bit::@7->scroll_bit::@2]
  //SEG80 [32] phi (byte*) scroll_bit::sc#2 = (const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 39 [phi:scroll_bit::@7->scroll_bit::@2#0] -- pbuz1=pbuc1 
    lda #<SCREEN+$28+$27
    sta sc
    lda #>SCREEN+$28+$27
    sta sc+1
  //SEG81 [32] phi (byte) scroll_bit::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:scroll_bit::@7->scroll_bit::@2#1] -- vbuxx=vbuc1 
    ldx #0
  //SEG82 [32] phi from scroll_bit::@3 to scroll_bit::@2 [phi:scroll_bit::@3->scroll_bit::@2]
  //SEG83 [32] phi (byte*) scroll_bit::sc#2 = (byte*) scroll_bit::sc#1 [phi:scroll_bit::@3->scroll_bit::@2#0] -- register_copy 
  //SEG84 [32] phi (byte) scroll_bit::r#2 = (byte) scroll_bit::r#1 [phi:scroll_bit::@3->scroll_bit::@2#1] -- register_copy 
  //SEG85 scroll_bit::@2
  b2:
  //SEG86 [33] (byte) scroll_bit::bits#0 ← *((byte*) current_chargen#19 + (byte) scroll_bit::r#2) -- vbuaa=pbuz1_derefidx_vbuxx 
    txa
    tay
    lda (current_chargen),y
  //SEG87 [34] (byte~) scroll_bit::$9 ← (byte) scroll_bit::bits#0 & (byte) current_bit#21 -- vbuaa=vbuaa_band_vbuz1 
    and current_bit
  //SEG88 [35] if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3 -- vbuaa_eq_0_then_la1 
    cmp #0
    beq b4
  //SEG89 [36] phi from scroll_bit::@2 to scroll_bit::@5 [phi:scroll_bit::@2->scroll_bit::@5]
  //SEG90 scroll_bit::@5
  //SEG91 [37] phi from scroll_bit::@5 to scroll_bit::@3 [phi:scroll_bit::@5->scroll_bit::@3]
  //SEG92 [37] phi (byte) scroll_bit::b#2 = (byte/word/signed word/dword/signed dword) 128+(byte) ' ' [phi:scroll_bit::@5->scroll_bit::@3#0] -- vbuaa=vbuc1 
    lda #$80+' '
    jmp b3
  //SEG93 [37] phi from scroll_bit::@2 to scroll_bit::@3 [phi:scroll_bit::@2->scroll_bit::@3]
  b4:
  //SEG94 [37] phi (byte) scroll_bit::b#2 = (byte) ' ' [phi:scroll_bit::@2->scroll_bit::@3#0] -- vbuaa=vbuc1 
    lda #' '
  //SEG95 scroll_bit::@3
  b3:
  //SEG96 [38] *((byte*) scroll_bit::sc#2) ← (byte) scroll_bit::b#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sc),y
  //SEG97 [39] (byte*) scroll_bit::sc#1 ← (byte*) scroll_bit::sc#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda sc
    clc
    adc #$28
    sta sc
    bcc !+
    inc sc+1
  !:
  //SEG98 [40] (byte) scroll_bit::r#1 ← ++ (byte) scroll_bit::r#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG99 [41] if((byte) scroll_bit::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto scroll_bit::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #8
    bne b2
  //SEG100 scroll_bit::@6
  //SEG101 [42] *((const byte*) PROCPORT#0) ← (byte/signed byte/word/signed word/dword/signed dword) 55 -- _deref_pbuc1=vbuc2 
    lda #$37
    sta PROCPORT
  //SEG102 asm { cli  }
    cli
  //SEG103 scroll_bit::@return
  //SEG104 [44] return 
    rts
}
//SEG105 scroll_hard
scroll_hard: {
  //SEG106 [46] phi from scroll_hard to scroll_hard::@1 [phi:scroll_hard->scroll_hard::@1]
  //SEG107 [46] phi (byte) scroll_hard::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:scroll_hard->scroll_hard::@1#0] -- vbuxx=vbuc1 
    ldx #0
  // Hard scroll
  //SEG108 [46] phi from scroll_hard::@1 to scroll_hard::@1 [phi:scroll_hard::@1->scroll_hard::@1]
  //SEG109 [46] phi (byte) scroll_hard::i#2 = (byte) scroll_hard::i#1 [phi:scroll_hard::@1->scroll_hard::@1#0] -- register_copy 
  //SEG110 scroll_hard::@1
  b1:
  //SEG111 [47] *((const byte*) SCREEN#0 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+1,x
    sta SCREEN,x
  //SEG112 [48] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 1+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*1+1,x
    sta SCREEN+$28*1,x
  //SEG113 [49] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 2+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*2+1,x
    sta SCREEN+$28*2,x
  //SEG114 [50] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 3+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*3+1,x
    sta SCREEN+$28*3,x
  //SEG115 [51] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 4+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*4+1,x
    sta SCREEN+$28*4,x
  //SEG116 [52] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 5+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*5+1,x
    sta SCREEN+$28*5,x
  //SEG117 [53] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 6+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*6+1,x
    sta SCREEN+$28*6,x
  //SEG118 [54] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) scroll_hard::i#2) ← *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 40*(byte/signed byte/word/signed word/dword/signed dword) 7+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) scroll_hard::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda SCREEN+$28*7+1,x
    sta SCREEN+$28*7,x
  //SEG119 [55] (byte) scroll_hard::i#1 ← ++ (byte) scroll_hard::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG120 [56] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$27
    bne b1
  //SEG121 scroll_hard::@return
  //SEG122 [57] return 
    rts
}
//SEG123 next_char
// Find the next char of the scroll text
next_char: {
  //SEG124 [58] (byte) next_char::c#0 ← *((byte*) nxt#31) -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (nxt),y
  //SEG125 [59] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 -- vbuaa_neq_vbuc1_then_la1 
    cmp #'@'
    bne b1
  //SEG126 next_char::@2
  //SEG127 [60] (byte) next_char::c#1 ← *((const byte*) TEXT#0) -- vbuaa=_deref_pbuc1 
    lda TEXT
  //SEG128 [61] phi from next_char::@2 to next_char::@1 [phi:next_char::@2->next_char::@1]
  //SEG129 [61] phi (byte) next_char::return#1 = (byte) next_char::c#1 [phi:next_char::@2->next_char::@1#0] -- register_copy 
  //SEG130 [61] phi (byte*) nxt#18 = (const byte*) TEXT#0 [phi:next_char::@2->next_char::@1#1] -- pbuz1=pbuc1 
    lda #<TEXT
    sta nxt
    lda #>TEXT
    sta nxt+1
  //SEG131 [61] phi from next_char to next_char::@1 [phi:next_char->next_char::@1]
  //SEG132 [61] phi (byte) next_char::return#1 = (byte) next_char::c#0 [phi:next_char->next_char::@1#0] -- register_copy 
  //SEG133 [61] phi (byte*) nxt#18 = (byte*) nxt#31 [phi:next_char->next_char::@1#1] -- register_copy 
  //SEG134 next_char::@1
  b1:
  //SEG135 [62] (byte*) nxt#19 ← ++ (byte*) nxt#18 -- pbuz1=_inc_pbuz1 
    inc nxt
    bne !+
    inc nxt+1
  !:
  //SEG136 next_char::@return
  //SEG137 [63] return 
    rts
}
//SEG138 fillscreen
// Fill the screen with one char
fillscreen: {
    .const fill = $20
    .label cursor = 3
  //SEG139 [65] phi from fillscreen to fillscreen::@1 [phi:fillscreen->fillscreen::@1]
  //SEG140 [65] phi (byte*) fillscreen::cursor#2 = (const byte*) SCREEN#0 [phi:fillscreen->fillscreen::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta cursor
    lda #>SCREEN
    sta cursor+1
  //SEG141 [65] phi from fillscreen::@1 to fillscreen::@1 [phi:fillscreen::@1->fillscreen::@1]
  //SEG142 [65] phi (byte*) fillscreen::cursor#2 = (byte*) fillscreen::cursor#1 [phi:fillscreen::@1->fillscreen::@1#0] -- register_copy 
  //SEG143 fillscreen::@1
  b1:
  //SEG144 [66] *((byte*) fillscreen::cursor#2) ← (const byte) fillscreen::fill#0 -- _deref_pbuz1=vbuc1 
    lda #fill
    ldy #0
    sta (cursor),y
  //SEG145 [67] (byte*) fillscreen::cursor#1 ← ++ (byte*) fillscreen::cursor#2 -- pbuz1=_inc_pbuz1 
    inc cursor
    bne !+
    inc cursor+1
  !:
  //SEG146 [68] if((byte*) fillscreen::cursor#1<(const byte*) SCREEN#0+(word/signed word/dword/signed dword) 1000) goto fillscreen::@1 -- pbuz1_lt_pbuc1_then_la1 
    lda cursor+1
    cmp #>SCREEN+$3e8
    bcc b1
    bne !+
    lda cursor
    cmp #<SCREEN+$3e8
    bcc b1
  !:
  //SEG147 fillscreen::@return
  //SEG148 [69] return 
    rts
}
  TEXT: .text "-= this is rex of camelot testing a scroller created in kickc. kickc is an optimizing c-compiler for 6502 assembler. =-     @"

