Inlined call call line (number) 2 (number) $40 (number) $a (byte) '*' 
Inlined call call plot (byte~) main::line1_$0 (byte) main::line1_ch 
Inlined call call line (number) 4 (number) $80 (number) $f (byte) '.' 
Inlined call call plot (byte~) main::line2_$0 (byte) main::line2_ch 
Inlined call call plot (byte~) line::$0 (byte) line::ch 
Culled Empty Block (label) main::plot1_@return
Culled Empty Block (label) main::line1_@2
Culled Empty Block (label) main::line1_@return
Culled Empty Block (label) main::plot2_@return
Culled Empty Block (label) main::line2_@2
Culled Empty Block (label) main::line2_@return
Culled Empty Block (label) main::@5
Culled Empty Block (label) @2

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@1
main: scope:[main]  from @3
  (byte*) main::sc#0 ← ((byte*)) (number) $400
  to:main::@1
main::@1: scope:[main]  from main main::@1
  (byte*) main::sc#2 ← phi( main/(byte*) main::sc#0 main::@1/(byte*) main::sc#1 )
  *((byte*) main::sc#2) ← (byte) ' '
  (byte*) main::sc#1 ← ++ (byte*) main::sc#2
  (bool~) main::$2 ← (byte*) main::sc#1 < (number) $400+(number) $3e8
  if((bool~) main::$2) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte) main::line1_xpos#0 ← (number) 2
  (byte) main::line1_xadd#0 ← (number) $40
  (byte) main::line1_ysize#0 ← (number) $a
  (byte) main::line1_ch#0 ← (byte) '*'
  to:main::line1
main::line1: scope:[main]  from main::@2
  (byte) main::line1_ysize#4 ← phi( main::@2/(byte) main::line1_ysize#0 )
  (byte) main::line1_xadd#4 ← phi( main::@2/(byte) main::line1_xadd#0 )
  (byte) main::line1_ch#3 ← phi( main::@2/(byte) main::line1_ch#0 )
  (byte) main::line1_xpos#1 ← phi( main::@2/(byte) main::line1_xpos#0 )
  (byte*) cur_line#0 ← ((byte*)) (number) $400
  (word) main::line1_pos#0 ← ((word)) { (byte) main::line1_xpos#1, (number) 0 }
  (byte) main::line1_i#0 ← (number) 0
  to:main::line1_@1
main::line1_@1: scope:[main]  from main::@4 main::line1
  (byte) main::line1_ysize#3 ← phi( main::@4/(byte) main::line1_ysize#1 main::line1/(byte) main::line1_ysize#4 )
  (byte) main::line1_i#4 ← phi( main::@4/(byte) main::line1_i#1 main::line1/(byte) main::line1_i#0 )
  (byte) main::line1_xadd#3 ← phi( main::@4/(byte) main::line1_xadd#1 main::line1/(byte) main::line1_xadd#4 )
  (byte*) cur_line#13 ← phi( main::@4/(byte*) cur_line#1 main::line1/(byte*) cur_line#0 )
  (byte) main::line1_ch#1 ← phi( main::@4/(byte) main::line1_ch#2 main::line1/(byte) main::line1_ch#3 )
  (word) main::line1_pos#2 ← phi( main::@4/(word) main::line1_pos#1 main::line1/(word) main::line1_pos#0 )
  (byte~) main::line1_$0#0 ← > (word) main::line1_pos#2
  (byte) main::plot1_xpos#0 ← (byte~) main::line1_$0#0
  (byte) main::plot1_ch#0 ← (byte) main::line1_ch#1
  to:main::plot1
main::plot1: scope:[main]  from main::line1_@1
  (byte) main::line1_ch#4 ← phi( main::line1_@1/(byte) main::line1_ch#1 )
  (byte) main::line1_ysize#2 ← phi( main::line1_@1/(byte) main::line1_ysize#3 )
  (byte) main::line1_i#3 ← phi( main::line1_@1/(byte) main::line1_i#4 )
  (byte) main::line1_xadd#2 ← phi( main::line1_@1/(byte) main::line1_xadd#3 )
  (word) main::line1_pos#4 ← phi( main::line1_@1/(word) main::line1_pos#2 )
  (byte) main::plot1_ch#1 ← phi( main::line1_@1/(byte) main::plot1_ch#0 )
  (byte) main::plot1_xpos#1 ← phi( main::line1_@1/(byte) main::plot1_xpos#0 )
  (byte*) cur_line#7 ← phi( main::line1_@1/(byte*) cur_line#13 )
  (byte*~) main::plot1_$0#0 ← (byte*) cur_line#7 + (byte) main::plot1_xpos#1
  *((byte*~) main::plot1_$0#0) ← (byte) main::plot1_ch#1
  to:main::@4
main::@4: scope:[main]  from main::plot1
  (byte) main::line1_ch#2 ← phi( main::plot1/(byte) main::line1_ch#4 )
  (byte) main::line1_ysize#1 ← phi( main::plot1/(byte) main::line1_ysize#2 )
  (byte) main::line1_i#2 ← phi( main::plot1/(byte) main::line1_i#3 )
  (byte*) cur_line#8 ← phi( main::plot1/(byte*) cur_line#7 )
  (byte) main::line1_xadd#1 ← phi( main::plot1/(byte) main::line1_xadd#2 )
  (word) main::line1_pos#3 ← phi( main::plot1/(word) main::line1_pos#4 )
  (word) main::line1_pos#1 ← (word) main::line1_pos#3 + (byte) main::line1_xadd#1
  (byte*) cur_line#1 ← (byte*) cur_line#8 + (number) $28
  (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2
  (bool~) main::line1_$2#0 ← (byte) main::line1_i#1 < (byte) main::line1_ysize#1
  if((bool~) main::line1_$2#0) goto main::line1_@1
  to:main::@3
main::@3: scope:[main]  from main::@4
  (byte) main::line2_xpos#0 ← (number) 4
  (byte) main::line2_xadd#0 ← (number) $80
  (byte) main::line2_ysize#0 ← (number) $f
  (byte) main::line2_ch#0 ← (byte) '.'
  to:main::line2
main::line2: scope:[main]  from main::@3
  (byte) main::line2_ysize#4 ← phi( main::@3/(byte) main::line2_ysize#0 )
  (byte) main::line2_xadd#4 ← phi( main::@3/(byte) main::line2_xadd#0 )
  (byte) main::line2_ch#3 ← phi( main::@3/(byte) main::line2_ch#0 )
  (byte) main::line2_xpos#1 ← phi( main::@3/(byte) main::line2_xpos#0 )
  (byte*) cur_line#2 ← ((byte*)) (number) $400
  (word) main::line2_pos#0 ← ((word)) { (byte) main::line2_xpos#1, (number) 0 }
  (byte) main::line2_i#0 ← (number) 0
  to:main::line2_@1
main::line2_@1: scope:[main]  from main::@6 main::line2
  (byte) main::line2_ysize#3 ← phi( main::@6/(byte) main::line2_ysize#1 main::line2/(byte) main::line2_ysize#4 )
  (byte) main::line2_i#4 ← phi( main::@6/(byte) main::line2_i#1 main::line2/(byte) main::line2_i#0 )
  (byte) main::line2_xadd#3 ← phi( main::@6/(byte) main::line2_xadd#1 main::line2/(byte) main::line2_xadd#4 )
  (byte*) cur_line#14 ← phi( main::@6/(byte*) cur_line#3 main::line2/(byte*) cur_line#2 )
  (byte) main::line2_ch#1 ← phi( main::@6/(byte) main::line2_ch#2 main::line2/(byte) main::line2_ch#3 )
  (word) main::line2_pos#2 ← phi( main::@6/(word) main::line2_pos#1 main::line2/(word) main::line2_pos#0 )
  (byte~) main::line2_$0#0 ← > (word) main::line2_pos#2
  (byte) main::plot2_xpos#0 ← (byte~) main::line2_$0#0
  (byte) main::plot2_ch#0 ← (byte) main::line2_ch#1
  to:main::plot2
main::plot2: scope:[main]  from main::line2_@1
  (byte) main::line2_ch#4 ← phi( main::line2_@1/(byte) main::line2_ch#1 )
  (byte) main::line2_ysize#2 ← phi( main::line2_@1/(byte) main::line2_ysize#3 )
  (byte) main::line2_i#3 ← phi( main::line2_@1/(byte) main::line2_i#4 )
  (byte) main::line2_xadd#2 ← phi( main::line2_@1/(byte) main::line2_xadd#3 )
  (word) main::line2_pos#4 ← phi( main::line2_@1/(word) main::line2_pos#2 )
  (byte) main::plot2_ch#1 ← phi( main::line2_@1/(byte) main::plot2_ch#0 )
  (byte) main::plot2_xpos#1 ← phi( main::line2_@1/(byte) main::plot2_xpos#0 )
  (byte*) cur_line#9 ← phi( main::line2_@1/(byte*) cur_line#14 )
  (byte*~) main::plot2_$0#0 ← (byte*) cur_line#9 + (byte) main::plot2_xpos#1
  *((byte*~) main::plot2_$0#0) ← (byte) main::plot2_ch#1
  to:main::@6
main::@6: scope:[main]  from main::plot2
  (byte) main::line2_ch#2 ← phi( main::plot2/(byte) main::line2_ch#4 )
  (byte) main::line2_ysize#1 ← phi( main::plot2/(byte) main::line2_ysize#2 )
  (byte) main::line2_i#2 ← phi( main::plot2/(byte) main::line2_i#3 )
  (byte*) cur_line#10 ← phi( main::plot2/(byte*) cur_line#9 )
  (byte) main::line2_xadd#1 ← phi( main::plot2/(byte) main::line2_xadd#2 )
  (word) main::line2_pos#3 ← phi( main::plot2/(word) main::line2_pos#4 )
  (word) main::line2_pos#1 ← (word) main::line2_pos#3 + (byte) main::line2_xadd#1
  (byte*) cur_line#3 ← (byte*) cur_line#10 + (number) $28
  (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2
  (bool~) main::line2_$2#0 ← (byte) main::line2_i#1 < (byte) main::line2_ysize#1
  if((bool~) main::line2_$2#0) goto main::line2_@1
  to:main::@return
main::@return: scope:[main]  from main::@6
  (byte*) cur_line#11 ← phi( main::@6/(byte*) cur_line#3 )
  (byte*) cur_line#4 ← (byte*) cur_line#11
  return 
  to:@return
@1: scope:[]  from @begin
  (byte*) cur_line#5 ← ((byte*)) (number) $400
  to:@3
@3: scope:[]  from @1
  (byte*) cur_line#15 ← phi( @1/(byte*) cur_line#5 )
  call main 
  to:@4
@4: scope:[]  from @3
  (byte*) cur_line#12 ← phi( @3/(byte*) cur_line#4 )
  (byte*) cur_line#6 ← (byte*) cur_line#12
  to:@end
@end: scope:[]  from @4

SYMBOL TABLE SSA
(label) @1
(label) @3
(label) @4
(label) @begin
(label) @end
(byte*) cur_line
(byte*) cur_line#0
(byte*) cur_line#1
(byte*) cur_line#10
(byte*) cur_line#11
(byte*) cur_line#12
(byte*) cur_line#13
(byte*) cur_line#14
(byte*) cur_line#15
(byte*) cur_line#2
(byte*) cur_line#3
(byte*) cur_line#4
(byte*) cur_line#5
(byte*) cur_line#6
(byte*) cur_line#7
(byte*) cur_line#8
(byte*) cur_line#9
(void()) main()
(bool~) main::$2
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@6
(label) main::@return
(label) main::line1
(byte~) main::line1_$0
(byte~) main::line1_$0#0
(bool~) main::line1_$2
(bool~) main::line1_$2#0
(label) main::line1_@1
(byte) main::line1_ch
(byte) main::line1_ch#0
(byte) main::line1_ch#1
(byte) main::line1_ch#2
(byte) main::line1_ch#3
(byte) main::line1_ch#4
(byte) main::line1_i
(byte) main::line1_i#0
(byte) main::line1_i#1
(byte) main::line1_i#2
(byte) main::line1_i#3
(byte) main::line1_i#4
(word) main::line1_pos
(word) main::line1_pos#0
(word) main::line1_pos#1
(word) main::line1_pos#2
(word) main::line1_pos#3
(word) main::line1_pos#4
(byte) main::line1_xadd
(byte) main::line1_xadd#0
(byte) main::line1_xadd#1
(byte) main::line1_xadd#2
(byte) main::line1_xadd#3
(byte) main::line1_xadd#4
(byte) main::line1_xpos
(byte) main::line1_xpos#0
(byte) main::line1_xpos#1
(byte) main::line1_ysize
(byte) main::line1_ysize#0
(byte) main::line1_ysize#1
(byte) main::line1_ysize#2
(byte) main::line1_ysize#3
(byte) main::line1_ysize#4
(label) main::line2
(byte~) main::line2_$0
(byte~) main::line2_$0#0
(bool~) main::line2_$2
(bool~) main::line2_$2#0
(label) main::line2_@1
(byte) main::line2_ch
(byte) main::line2_ch#0
(byte) main::line2_ch#1
(byte) main::line2_ch#2
(byte) main::line2_ch#3
(byte) main::line2_ch#4
(byte) main::line2_i
(byte) main::line2_i#0
(byte) main::line2_i#1
(byte) main::line2_i#2
(byte) main::line2_i#3
(byte) main::line2_i#4
(word) main::line2_pos
(word) main::line2_pos#0
(word) main::line2_pos#1
(word) main::line2_pos#2
(word) main::line2_pos#3
(word) main::line2_pos#4
(byte) main::line2_xadd
(byte) main::line2_xadd#0
(byte) main::line2_xadd#1
(byte) main::line2_xadd#2
(byte) main::line2_xadd#3
(byte) main::line2_xadd#4
(byte) main::line2_xpos
(byte) main::line2_xpos#0
(byte) main::line2_xpos#1
(byte) main::line2_ysize
(byte) main::line2_ysize#0
(byte) main::line2_ysize#1
(byte) main::line2_ysize#2
(byte) main::line2_ysize#3
(byte) main::line2_ysize#4
(label) main::plot1
(byte*~) main::plot1_$0
(byte*~) main::plot1_$0#0
(byte) main::plot1_ch
(byte) main::plot1_ch#0
(byte) main::plot1_ch#1
(byte) main::plot1_xpos
(byte) main::plot1_xpos#0
(byte) main::plot1_xpos#1
(label) main::plot2
(byte*~) main::plot2_$0
(byte*~) main::plot2_$0#0
(byte) main::plot2_ch
(byte) main::plot2_ch#0
(byte) main::plot2_ch#1
(byte) main::plot2_xpos
(byte) main::plot2_xpos#0
(byte) main::plot2_xpos#1
(byte*) main::sc
(byte*) main::sc#0
(byte*) main::sc#1
(byte*) main::sc#2

Fixing inline constructor with main::$3 ← (byte)main::line1_xpos#1 w= (byte)0
Fixing inline constructor with main::$4 ← (byte)main::line2_xpos#1 w= (byte)0
Successful SSA optimization Pass2FixInlineConstructorsNew
Adding number conversion cast (unumber) $400+$3e8 in (bool~) main::$2 ← (byte*) main::sc#1 < (number) $400+(number) $3e8
Adding number conversion cast (unumber) 2 in (byte) main::line1_xpos#0 ← (number) 2
Adding number conversion cast (unumber) $40 in (byte) main::line1_xadd#0 ← (number) $40
Adding number conversion cast (unumber) $a in (byte) main::line1_ysize#0 ← (number) $a
Adding number conversion cast (unumber) 0 in (byte) main::line1_i#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte*) cur_line#1 ← (byte*) cur_line#8 + (number) $28
Adding number conversion cast (unumber) 4 in (byte) main::line2_xpos#0 ← (number) 4
Adding number conversion cast (unumber) $80 in (byte) main::line2_xadd#0 ← (number) $80
Adding number conversion cast (unumber) $f in (byte) main::line2_ysize#0 ← (number) $f
Adding number conversion cast (unumber) 0 in (byte) main::line2_i#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte*) cur_line#3 ← (byte*) cur_line#10 + (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::sc#0 ← (byte*)(number) $400
Inlining cast (byte) main::line1_xpos#0 ← (unumber)(number) 2
Inlining cast (byte) main::line1_xadd#0 ← (unumber)(number) $40
Inlining cast (byte) main::line1_ysize#0 ← (unumber)(number) $a
Inlining cast (byte*) cur_line#0 ← (byte*)(number) $400
Inlining cast (byte) main::line1_i#0 ← (unumber)(number) 0
Inlining cast (byte) main::line2_xpos#0 ← (unumber)(number) 4
Inlining cast (byte) main::line2_xadd#0 ← (unumber)(number) $80
Inlining cast (byte) main::line2_ysize#0 ← (unumber)(number) $f
Inlining cast (byte*) cur_line#2 ← (byte*)(number) $400
Inlining cast (byte) main::line2_i#0 ← (unumber)(number) 0
Inlining cast (byte*) cur_line#5 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 2
Simplifying constant integer cast $40
Simplifying constant integer cast $a
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast (byte) main::line1_xpos#1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 4
Simplifying constant integer cast $80
Simplifying constant integer cast $f
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast (byte) main::line2_xpos#1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $40
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) main::line1_xpos#0 = (byte) main::line1_xpos#1 
Alias (byte) main::line1_ch#0 = (byte) main::line1_ch#3 
Alias (byte) main::line1_xadd#0 = (byte) main::line1_xadd#4 
Alias (byte) main::line1_ysize#0 = (byte) main::line1_ysize#4 
Alias (word) main::line1_pos#0 = (word~) main::$3 
Alias (byte) main::plot1_xpos#0 = (byte~) main::line1_$0#0 (byte) main::plot1_xpos#1 
Alias (byte) main::line1_ch#1 = (byte) main::plot1_ch#0 (byte) main::plot1_ch#1 (byte) main::line1_ch#4 (byte) main::line1_ch#2 
Alias (byte*) cur_line#13 = (byte*) cur_line#7 (byte*) cur_line#8 
Alias (word) main::line1_pos#2 = (word) main::line1_pos#4 (word) main::line1_pos#3 
Alias (byte) main::line1_xadd#1 = (byte) main::line1_xadd#2 (byte) main::line1_xadd#3 
Alias (byte) main::line1_i#2 = (byte) main::line1_i#3 (byte) main::line1_i#4 
Alias (byte) main::line1_ysize#1 = (byte) main::line1_ysize#2 (byte) main::line1_ysize#3 
Alias (byte) main::line2_xpos#0 = (byte) main::line2_xpos#1 
Alias (byte) main::line2_ch#0 = (byte) main::line2_ch#3 
Alias (byte) main::line2_xadd#0 = (byte) main::line2_xadd#4 
Alias (byte) main::line2_ysize#0 = (byte) main::line2_ysize#4 
Alias (word) main::line2_pos#0 = (word~) main::$4 
Alias (byte) main::plot2_xpos#0 = (byte~) main::line2_$0#0 (byte) main::plot2_xpos#1 
Alias (byte) main::line2_ch#1 = (byte) main::plot2_ch#0 (byte) main::plot2_ch#1 (byte) main::line2_ch#4 (byte) main::line2_ch#2 
Alias (byte*) cur_line#10 = (byte*) cur_line#9 (byte*) cur_line#14 
Alias (word) main::line2_pos#2 = (word) main::line2_pos#4 (word) main::line2_pos#3 
Alias (byte) main::line2_xadd#1 = (byte) main::line2_xadd#2 (byte) main::line2_xadd#3 
Alias (byte) main::line2_i#2 = (byte) main::line2_i#3 (byte) main::line2_i#4 
Alias (byte) main::line2_ysize#1 = (byte) main::line2_ysize#2 (byte) main::line2_ysize#3 
Alias (byte*) cur_line#11 = (byte*) cur_line#3 (byte*) cur_line#4 
Alias (byte*) cur_line#15 = (byte*) cur_line#5 
Alias (byte*) cur_line#12 = (byte*) cur_line#6 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) main::line1_ch#1
Self Phi Eliminated (byte) main::line1_xadd#1
Self Phi Eliminated (byte) main::line1_ysize#1
Self Phi Eliminated (byte) main::line2_ch#1
Self Phi Eliminated (byte) main::line2_xadd#1
Self Phi Eliminated (byte) main::line2_ysize#1
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (byte) main::line1_ch#1 (byte) main::line1_ch#0
Identical Phi Values (byte) main::line1_xadd#1 (byte) main::line1_xadd#0
Identical Phi Values (byte) main::line1_ysize#1 (byte) main::line1_ysize#0
Identical Phi Values (byte) main::line2_ch#1 (byte) main::line2_ch#0
Identical Phi Values (byte) main::line2_xadd#1 (byte) main::line2_xadd#0
Identical Phi Values (byte) main::line2_ysize#1 (byte) main::line2_ysize#0
Identical Phi Values (byte*) cur_line#12 (byte*) cur_line#11
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$2 [5] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1
Simple Condition (bool~) main::line1_$2#0 [27] if((byte) main::line1_i#1<(byte) main::line1_ysize#0) goto main::line1_@1
Simple Condition (bool~) main::line2_$2#0 [49] if((byte) main::line2_i#1<(byte) main::line2_ysize#0) goto main::line2_@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) main::sc#0 = (byte*) 1024
Constant (const byte) main::line1_xpos#0 = 2
Constant (const byte) main::line1_xadd#0 = $40
Constant (const byte) main::line1_ysize#0 = $a
Constant (const byte) main::line1_ch#0 = '*'
Constant (const byte*) cur_line#0 = (byte*) 1024
Constant (const byte) main::line1_i#0 = 0
Constant (const byte) main::line2_xpos#0 = 4
Constant (const byte) main::line2_xadd#0 = $80
Constant (const byte) main::line2_ysize#0 = $f
Constant (const byte) main::line2_ch#0 = '.'
Constant (const byte*) cur_line#2 = (byte*) 1024
Constant (const byte) main::line2_i#0 = 0
Constant (const byte*) cur_line#15 = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
Converting *(pointer+n) to pointer[n] [21] *((byte*~) main::plot1_$0#0) ← (const byte) main::line1_ch#0  -- *(cur_line#13 + main::plot1_xpos#0)
Converting *(pointer+n) to pointer[n] [43] *((byte*~) main::plot2_$0#0) ← (const byte) main::line2_ch#0  -- *(cur_line#10 + main::plot2_xpos#0)
Successful SSA optimization Pass2InlineDerefIdx
Eliminating unused variable (byte*~) main::plot1_$0#0 and assignment [7] (byte*~) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0
Eliminating unused variable (byte*~) main::plot2_$0#0 and assignment [16] (byte*~) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0
Eliminating unused constant (const byte*) cur_line#15
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [4] (word) main::line1_pos#0 ← (const byte) main::line1_xpos#0 w= (byte) 0
Constant right-side identified [12] (word) main::line2_pos#0 ← (const byte) main::line2_xpos#0 w= (byte) 0
Successful SSA optimization Pass2ConstantRValueConsolidation
Simplifying expression containing zero main::line1_xpos#0*$100 in [4] (word) main::line1_pos#0 ← (const byte) main::line1_xpos#0*(number) $100+(byte) 0
Simplifying expression containing zero main::line2_xpos#0*$100 in [12] (word) main::line2_pos#0 ← (const byte) main::line2_xpos#0*(number) $100+(byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Adding number conversion cast (unumber) main::line1_xpos#0*$100 in (word) main::line1_pos#0 ← (const byte) main::line1_xpos#0*(number) $100
Adding number conversion cast (unumber) $100 in (word) main::line1_pos#0 ← ((unumber)) (const byte) main::line1_xpos#0*(number) $100
Adding number conversion cast (unumber) main::line2_xpos#0*$100 in (word) main::line2_pos#0 ← (const byte) main::line2_xpos#0*(number) $100
Adding number conversion cast (unumber) $100 in (word) main::line2_pos#0 ← ((unumber)) (const byte) main::line2_xpos#0*(number) $100
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (word) main::line1_pos#0 ← (unumber)(const byte) main::line1_xpos#0*(unumber)(number) $100
Inlining cast (word) main::line2_pos#0 ← (unumber)(const byte) main::line2_xpos#0*(unumber)(number) $100
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast (const byte) main::line1_xpos#0*(unumber)(number) $100
Simplifying constant integer cast $100
Simplifying constant integer cast (const byte) main::line2_xpos#0*(unumber)(number) $100
Simplifying constant integer cast $100
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (word) $100
Finalized unsigned number type (word) $100
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant (const word) main::line1_pos#0 = main::line1_xpos#0*$100
Constant (const word) main::line2_pos#0 = main::line2_xpos#0*$100
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte*) main::sc#0
Inlining constant with var siblings (const byte) main::line1_i#0
Inlining constant with var siblings (const byte) main::line2_i#0
Inlining constant with var siblings (const word) main::line1_pos#0
Inlining constant with var siblings (const word) main::line2_pos#0
Inlining constant with var siblings (const byte*) cur_line#0
Inlining constant with var siblings (const byte*) cur_line#2
Constant inlined main::line2_i#0 = (byte) 0
Constant inlined main::line1_i#0 = (byte) 0
Constant inlined main::line2_pos#0 = (const byte) main::line2_xpos#0*(word) $100
Constant inlined cur_line#0 = (byte*) 1024
Constant inlined main::sc#0 = (byte*) 1024
Constant inlined cur_line#2 = (byte*) 1024
Constant inlined main::line1_pos#0 = (const byte) main::line1_xpos#0*(word) $100
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@7(between main::@1 and main::@1)
Added new block during phi lifting main::@8(between main::@4 and main::line1_@1)
Added new block during phi lifting main::@9(between main::@6 and main::line2_@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @3
Adding NOP phi() at start of @4
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::line1
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::line2
CALL GRAPH
Calls in [] to main:3 

Created 7 initial phi equivalence classes
Coalesced [30] main::line2_pos#5 ← main::line2_pos#1
Coalesced [31] cur_line#17 ← cur_line#11
Coalesced [32] main::line2_i#5 ← main::line2_i#1
Coalesced [33] main::line1_pos#5 ← main::line1_pos#1
Coalesced [34] cur_line#16 ← cur_line#1
Coalesced [35] main::line1_i#5 ← main::line1_i#1
Coalesced [36] main::sc#3 ← main::sc#1
Coalesced down to 7 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @4
Culled Empty Block (label) main::@2
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@7
Renumbering block @3 to @1
Renumbering block main::@4 to main::@2
Renumbering block main::@6 to main::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::line1
Adding NOP phi() at start of main::line2

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [5] (byte*) main::sc#2 ← phi( main/(byte*) 1024 main::@1/(byte*) main::sc#1 )
  [6] *((byte*) main::sc#2) ← (byte) ' '
  [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2
  [8] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1
  to:main::line1
main::line1: scope:[main]  from main::@1
  [9] phi()
  to:main::line1_@1
main::line1_@1: scope:[main]  from main::@2 main::line1
  [10] (byte) main::line1_i#2 ← phi( main::@2/(byte) main::line1_i#1 main::line1/(byte) 0 )
  [10] (byte*) cur_line#13 ← phi( main::@2/(byte*) cur_line#1 main::line1/(byte*) 1024 )
  [10] (word) main::line1_pos#2 ← phi( main::@2/(word) main::line1_pos#1 main::line1/(const byte) main::line1_xpos#0*(word) $100 )
  [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2
  to:main::plot1
main::plot1: scope:[main]  from main::line1_@1
  [12] *((byte*) cur_line#13 + (byte) main::plot1_xpos#0) ← (const byte) main::line1_ch#0
  to:main::@2
main::@2: scope:[main]  from main::plot1
  [13] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0
  [14] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte) $28
  [15] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2
  [16] if((byte) main::line1_i#1<(const byte) main::line1_ysize#0) goto main::line1_@1
  to:main::line2
main::line2: scope:[main]  from main::@2
  [17] phi()
  to:main::line2_@1
main::line2_@1: scope:[main]  from main::@3 main::line2
  [18] (byte) main::line2_i#2 ← phi( main::@3/(byte) main::line2_i#1 main::line2/(byte) 0 )
  [18] (byte*) cur_line#10 ← phi( main::@3/(byte*) cur_line#11 main::line2/(byte*) 1024 )
  [18] (word) main::line2_pos#2 ← phi( main::@3/(word) main::line2_pos#1 main::line2/(const byte) main::line2_xpos#0*(word) $100 )
  [19] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2
  to:main::plot2
main::plot2: scope:[main]  from main::line2_@1
  [20] *((byte*) cur_line#10 + (byte) main::plot2_xpos#0) ← (const byte) main::line2_ch#0
  to:main::@3
main::@3: scope:[main]  from main::plot2
  [21] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0
  [22] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte) $28
  [23] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2
  [24] if((byte) main::line2_i#1<(const byte) main::line2_ysize#0) goto main::line2_@1
  to:main::@return
main::@return: scope:[main]  from main::@3
  [25] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) cur_line
(byte*) cur_line#1 7.333333333333333
(byte*) cur_line#10 8.25
(byte*) cur_line#11 7.333333333333333
(byte*) cur_line#13 8.25
(void()) main()
(byte~) main::line1_$0
(bool~) main::line1_$2
(byte) main::line1_ch
(byte) main::line1_i
(byte) main::line1_i#1 16.5
(byte) main::line1_i#2 4.4
(word) main::line1_pos
(word) main::line1_pos#1 5.5
(word) main::line1_pos#2 11.0
(byte) main::line1_xadd
(byte) main::line1_xpos
(byte) main::line1_ysize
(byte~) main::line2_$0
(bool~) main::line2_$2
(byte) main::line2_ch
(byte) main::line2_i
(byte) main::line2_i#1 16.5
(byte) main::line2_i#2 4.4
(word) main::line2_pos
(word) main::line2_pos#1 5.5
(word) main::line2_pos#2 11.0
(byte) main::line2_xadd
(byte) main::line2_xpos
(byte) main::line2_ysize
(byte*~) main::plot1_$0
(byte) main::plot1_ch
(byte) main::plot1_xpos
(byte) main::plot1_xpos#0 22.0
(byte*~) main::plot2_$0
(byte) main::plot2_ch
(byte) main::plot2_xpos
(byte) main::plot2_xpos#0 22.0
(byte*) main::sc
(byte*) main::sc#1 16.5
(byte*) main::sc#2 16.5

Initial phi equivalence classes
[ main::sc#2 main::sc#1 ]
[ main::line1_pos#2 main::line1_pos#1 ]
[ cur_line#13 cur_line#1 ]
[ main::line1_i#2 main::line1_i#1 ]
[ main::line2_pos#2 main::line2_pos#1 ]
[ cur_line#10 cur_line#11 ]
[ main::line2_i#2 main::line2_i#1 ]
Added variable main::plot1_xpos#0 to zero page equivalence class [ main::plot1_xpos#0 ]
Added variable main::plot2_xpos#0 to zero page equivalence class [ main::plot2_xpos#0 ]
Complete equivalence classes
[ main::sc#2 main::sc#1 ]
[ main::line1_pos#2 main::line1_pos#1 ]
[ cur_line#13 cur_line#1 ]
[ main::line1_i#2 main::line1_i#1 ]
[ main::line2_pos#2 main::line2_pos#1 ]
[ cur_line#10 cur_line#11 ]
[ main::line2_i#2 main::line2_i#1 ]
[ main::plot1_xpos#0 ]
[ main::plot2_xpos#0 ]
Allocated zp ZP_WORD:2 [ main::sc#2 main::sc#1 ]
Allocated zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ]
Allocated zp ZP_WORD:6 [ cur_line#13 cur_line#1 ]
Allocated zp ZP_BYTE:8 [ main::line1_i#2 main::line1_i#1 ]
Allocated zp ZP_WORD:9 [ main::line2_pos#2 main::line2_pos#1 ]
Allocated zp ZP_WORD:11 [ cur_line#10 cur_line#11 ]
Allocated zp ZP_BYTE:13 [ main::line2_i#2 main::line2_i#1 ]
Allocated zp ZP_BYTE:14 [ main::plot1_xpos#0 ]
Allocated zp ZP_BYTE:15 [ main::plot2_xpos#0 ]

INITIAL ASM
  // File Comments
// Inline functions in two levels
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label cur_line = 6
  .label cur_line_10 = $b
  .label cur_line_11 = $b
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .const line1_xpos = 2
    .const line1_xadd = $40
    .const line1_ysize = $a
    .const line1_ch = '*'
    .const line2_xpos = 4
    .const line2_xadd = $80
    .const line2_ysize = $f
    .const line2_ch = '.'
    .label sc = 2
    .label plot1_xpos = $e
    .label line1_pos = 4
    .label line1_i = 8
    .label plot2_xpos = $f
    .label line2_pos = 9
    .label line2_i = $d
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte*) main::sc#2 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    jmp b1
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [8] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1 -- pbuz1_lt_vwuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bcc b1_from_b1
    bne !+
    lda sc
    cmp #<$400+$3e8
    bcc b1_from_b1
  !:
    // [9] phi from main::@1 to main::line1 [phi:main::@1->main::line1]
  line1_from_b1:
    jmp line1
    // main::line1
  line1:
    // [10] phi from main::line1 to main::line1_@1 [phi:main::line1->main::line1_@1]
  line1_b1_from_line1:
    // [10] phi (byte) main::line1_i#2 = (byte) 0 [phi:main::line1->main::line1_@1#0] -- vbuz1=vbuc1 
    lda #0
    sta line1_i
    // [10] phi (byte*) cur_line#13 = (byte*) 1024 [phi:main::line1->main::line1_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
    // [10] phi (word) main::line1_pos#2 = (const byte) main::line1_xpos#0*(word) $100 [phi:main::line1->main::line1_@1#2] -- vwuz1=vwuc1 
    lda #<line1_xpos*$100
    sta line1_pos
    lda #>line1_xpos*$100
    sta line1_pos+1
    jmp line1_b1
    // [10] phi from main::@2 to main::line1_@1 [phi:main::@2->main::line1_@1]
  line1_b1_from_b2:
    // [10] phi (byte) main::line1_i#2 = (byte) main::line1_i#1 [phi:main::@2->main::line1_@1#0] -- register_copy 
    // [10] phi (byte*) cur_line#13 = (byte*) cur_line#1 [phi:main::@2->main::line1_@1#1] -- register_copy 
    // [10] phi (word) main::line1_pos#2 = (word) main::line1_pos#1 [phi:main::@2->main::line1_@1#2] -- register_copy 
    jmp line1_b1
    // main::line1_@1
  line1_b1:
    // [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 -- vbuz1=_hi_vwuz2 
    lda line1_pos+1
    sta plot1_xpos
    jmp plot1
    // main::plot1
  plot1:
    // [12] *((byte*) cur_line#13 + (byte) main::plot1_xpos#0) ← (const byte) main::line1_ch#0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #line1_ch
    ldy plot1_xpos
    sta (cur_line),y
    jmp b2
    // main::@2
  b2:
    // [13] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    lda #line1_xadd
    clc
    adc line1_pos
    sta line1_pos
    bcc !+
    inc line1_pos+1
  !:
    // [14] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc cur_line
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
    // [15] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2 -- vbuz1=_inc_vbuz1 
    inc line1_i
    // [16] if((byte) main::line1_i#1<(const byte) main::line1_ysize#0) goto main::line1_@1 -- vbuz1_lt_vbuc1_then_la1 
    lda line1_i
    cmp #line1_ysize
    bcc line1_b1_from_b2
    // [17] phi from main::@2 to main::line2 [phi:main::@2->main::line2]
  line2_from_b2:
    jmp line2
    // main::line2
  line2:
    // [18] phi from main::line2 to main::line2_@1 [phi:main::line2->main::line2_@1]
  line2_b1_from_line2:
    // [18] phi (byte) main::line2_i#2 = (byte) 0 [phi:main::line2->main::line2_@1#0] -- vbuz1=vbuc1 
    lda #0
    sta line2_i
    // [18] phi (byte*) cur_line#10 = (byte*) 1024 [phi:main::line2->main::line2_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line_10
    lda #>$400
    sta cur_line_10+1
    // [18] phi (word) main::line2_pos#2 = (const byte) main::line2_xpos#0*(word) $100 [phi:main::line2->main::line2_@1#2] -- vwuz1=vwuc1 
    lda #<line2_xpos*$100
    sta line2_pos
    lda #>line2_xpos*$100
    sta line2_pos+1
    jmp line2_b1
    // [18] phi from main::@3 to main::line2_@1 [phi:main::@3->main::line2_@1]
  line2_b1_from_b3:
    // [18] phi (byte) main::line2_i#2 = (byte) main::line2_i#1 [phi:main::@3->main::line2_@1#0] -- register_copy 
    // [18] phi (byte*) cur_line#10 = (byte*) cur_line#11 [phi:main::@3->main::line2_@1#1] -- register_copy 
    // [18] phi (word) main::line2_pos#2 = (word) main::line2_pos#1 [phi:main::@3->main::line2_@1#2] -- register_copy 
    jmp line2_b1
    // main::line2_@1
  line2_b1:
    // [19] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 -- vbuz1=_hi_vwuz2 
    lda line2_pos+1
    sta plot2_xpos
    jmp plot2
    // main::plot2
  plot2:
    // [20] *((byte*) cur_line#10 + (byte) main::plot2_xpos#0) ← (const byte) main::line2_ch#0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #line2_ch
    ldy plot2_xpos
    sta (cur_line_10),y
    jmp b3
    // main::@3
  b3:
    // [21] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    lda #line2_xadd
    clc
    adc line2_pos
    sta line2_pos
    bcc !+
    inc line2_pos+1
  !:
    // [22] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc cur_line_11
    sta cur_line_11
    bcc !+
    inc cur_line_11+1
  !:
    // [23] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2 -- vbuz1=_inc_vbuz1 
    inc line2_i
    // [24] if((byte) main::line2_i#1<(const byte) main::line2_ysize#0) goto main::line2_@1 -- vbuz1_lt_vbuc1_then_la1 
    lda line2_i
    cmp #line2_ysize
    bcc line2_b1_from_b3
    jmp breturn
    // main::@return
  breturn:
    // [25] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y 
Statement [8] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1 [ main::sc#1 ] ( main:2 [ main::sc#1 ] ) always clobbers reg byte a 
Statement [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_xpos#0 ] ( main:2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_xpos#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ main::line1_i#2 main::line1_i#1 ]
Statement [12] *((byte*) cur_line#13 + (byte) main::plot1_xpos#0) ← (const byte) main::line1_ch#0 [ main::line1_pos#2 cur_line#13 main::line1_i#2 ] ( main:2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 ] ) always clobbers reg byte a 
Statement [13] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 [ cur_line#13 main::line1_i#2 main::line1_pos#1 ] ( main:2 [ cur_line#13 main::line1_i#2 main::line1_pos#1 ] ) always clobbers reg byte a 
Statement [14] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte) $28 [ main::line1_i#2 main::line1_pos#1 cur_line#1 ] ( main:2 [ main::line1_i#2 main::line1_pos#1 cur_line#1 ] ) always clobbers reg byte a 
Statement [19] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_xpos#0 ] ( main:2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_xpos#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ main::line2_i#2 main::line2_i#1 ]
Statement [20] *((byte*) cur_line#10 + (byte) main::plot2_xpos#0) ← (const byte) main::line2_ch#0 [ main::line2_pos#2 cur_line#10 main::line2_i#2 ] ( main:2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 ] ) always clobbers reg byte a 
Statement [21] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 [ cur_line#10 main::line2_i#2 main::line2_pos#1 ] ( main:2 [ cur_line#10 main::line2_i#2 main::line2_pos#1 ] ) always clobbers reg byte a 
Statement [22] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte) $28 [ main::line2_i#2 main::line2_pos#1 cur_line#11 ] ( main:2 [ main::line2_i#2 main::line2_pos#1 cur_line#11 ] ) always clobbers reg byte a 
Statement [6] *((byte*) main::sc#2) ← (byte) ' ' [ main::sc#2 ] ( main:2 [ main::sc#2 ] ) always clobbers reg byte a reg byte y 
Statement [8] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1 [ main::sc#1 ] ( main:2 [ main::sc#1 ] ) always clobbers reg byte a 
Statement [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_xpos#0 ] ( main:2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_xpos#0 ] ) always clobbers reg byte a 
Statement [12] *((byte*) cur_line#13 + (byte) main::plot1_xpos#0) ← (const byte) main::line1_ch#0 [ main::line1_pos#2 cur_line#13 main::line1_i#2 ] ( main:2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 ] ) always clobbers reg byte a 
Statement [13] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 [ cur_line#13 main::line1_i#2 main::line1_pos#1 ] ( main:2 [ cur_line#13 main::line1_i#2 main::line1_pos#1 ] ) always clobbers reg byte a 
Statement [14] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte) $28 [ main::line1_i#2 main::line1_pos#1 cur_line#1 ] ( main:2 [ main::line1_i#2 main::line1_pos#1 cur_line#1 ] ) always clobbers reg byte a 
Statement [19] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_xpos#0 ] ( main:2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_xpos#0 ] ) always clobbers reg byte a 
Statement [20] *((byte*) cur_line#10 + (byte) main::plot2_xpos#0) ← (const byte) main::line2_ch#0 [ main::line2_pos#2 cur_line#10 main::line2_i#2 ] ( main:2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 ] ) always clobbers reg byte a 
Statement [21] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 [ cur_line#10 main::line2_i#2 main::line2_pos#1 ] ( main:2 [ cur_line#10 main::line2_i#2 main::line2_pos#1 ] ) always clobbers reg byte a 
Statement [22] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte) $28 [ main::line2_i#2 main::line2_pos#1 cur_line#11 ] ( main:2 [ main::line2_i#2 main::line2_pos#1 cur_line#11 ] ) always clobbers reg byte a 
Potential registers zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] : zp ZP_WORD:2 , 
Potential registers zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_WORD:6 [ cur_line#13 cur_line#1 ] : zp ZP_WORD:6 , 
Potential registers zp ZP_BYTE:8 [ main::line1_i#2 main::line1_i#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:9 [ main::line2_pos#2 main::line2_pos#1 ] : zp ZP_WORD:9 , 
Potential registers zp ZP_WORD:11 [ cur_line#10 cur_line#11 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_BYTE:13 [ main::line2_i#2 main::line2_i#1 ] : zp ZP_BYTE:13 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:14 [ main::plot1_xpos#0 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:15 [ main::plot2_xpos#0 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 33: zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] 22: zp ZP_BYTE:14 [ main::plot1_xpos#0 ] 22: zp ZP_BYTE:15 [ main::plot2_xpos#0 ] 20.9: zp ZP_BYTE:8 [ main::line1_i#2 main::line1_i#1 ] 20.9: zp ZP_BYTE:13 [ main::line2_i#2 main::line2_i#1 ] 16.5: zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ] 16.5: zp ZP_WORD:9 [ main::line2_pos#2 main::line2_pos#1 ] 
Uplift Scope [] 15.58: zp ZP_WORD:6 [ cur_line#13 cur_line#1 ] 15.58: zp ZP_WORD:11 [ cur_line#10 cur_line#11 ] 

Uplifting [main] best 2384 combination zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] reg byte a [ main::plot1_xpos#0 ] reg byte a [ main::plot2_xpos#0 ] reg byte x [ main::line1_i#2 main::line1_i#1 ] reg byte x [ main::line2_i#2 main::line2_i#1 ] zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ] zp ZP_WORD:9 [ main::line2_pos#2 main::line2_pos#1 ] 
Limited combination testing to 100 combinations of 144 possible.
Uplifting [] best 2384 combination zp ZP_WORD:6 [ cur_line#13 cur_line#1 ] zp ZP_WORD:11 [ cur_line#10 cur_line#11 ] 
Allocated (was zp ZP_WORD:9) zp ZP_WORD:8 [ main::line2_pos#2 main::line2_pos#1 ]
Allocated (was zp ZP_WORD:11) zp ZP_WORD:10 [ cur_line#10 cur_line#11 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Inline functions in two levels
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label cur_line = 6
  .label cur_line_10 = $a
  .label cur_line_11 = $a
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    .const line1_xpos = 2
    .const line1_xadd = $40
    .const line1_ysize = $a
    .const line1_ch = '*'
    .const line2_xpos = 4
    .const line2_xadd = $80
    .const line2_ysize = $f
    .const line2_ch = '.'
    .label sc = 2
    .label line1_pos = 4
    .label line2_pos = 8
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte*) main::sc#2 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    jmp b1
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [8] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1 -- pbuz1_lt_vwuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bcc b1_from_b1
    bne !+
    lda sc
    cmp #<$400+$3e8
    bcc b1_from_b1
  !:
    // [9] phi from main::@1 to main::line1 [phi:main::@1->main::line1]
  line1_from_b1:
    jmp line1
    // main::line1
  line1:
    // [10] phi from main::line1 to main::line1_@1 [phi:main::line1->main::line1_@1]
  line1_b1_from_line1:
    // [10] phi (byte) main::line1_i#2 = (byte) 0 [phi:main::line1->main::line1_@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [10] phi (byte*) cur_line#13 = (byte*) 1024 [phi:main::line1->main::line1_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
    // [10] phi (word) main::line1_pos#2 = (const byte) main::line1_xpos#0*(word) $100 [phi:main::line1->main::line1_@1#2] -- vwuz1=vwuc1 
    lda #<line1_xpos*$100
    sta line1_pos
    lda #>line1_xpos*$100
    sta line1_pos+1
    jmp line1_b1
    // [10] phi from main::@2 to main::line1_@1 [phi:main::@2->main::line1_@1]
  line1_b1_from_b2:
    // [10] phi (byte) main::line1_i#2 = (byte) main::line1_i#1 [phi:main::@2->main::line1_@1#0] -- register_copy 
    // [10] phi (byte*) cur_line#13 = (byte*) cur_line#1 [phi:main::@2->main::line1_@1#1] -- register_copy 
    // [10] phi (word) main::line1_pos#2 = (word) main::line1_pos#1 [phi:main::@2->main::line1_@1#2] -- register_copy 
    jmp line1_b1
    // main::line1_@1
  line1_b1:
    // [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 -- vbuaa=_hi_vwuz1 
    lda line1_pos+1
    jmp plot1
    // main::plot1
  plot1:
    // [12] *((byte*) cur_line#13 + (byte) main::plot1_xpos#0) ← (const byte) main::line1_ch#0 -- pbuz1_derefidx_vbuaa=vbuc1 
    tay
    lda #line1_ch
    sta (cur_line),y
    jmp b2
    // main::@2
  b2:
    // [13] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    lda #line1_xadd
    clc
    adc line1_pos
    sta line1_pos
    bcc !+
    inc line1_pos+1
  !:
    // [14] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc cur_line
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
    // [15] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [16] if((byte) main::line1_i#1<(const byte) main::line1_ysize#0) goto main::line1_@1 -- vbuxx_lt_vbuc1_then_la1 
    cpx #line1_ysize
    bcc line1_b1_from_b2
    // [17] phi from main::@2 to main::line2 [phi:main::@2->main::line2]
  line2_from_b2:
    jmp line2
    // main::line2
  line2:
    // [18] phi from main::line2 to main::line2_@1 [phi:main::line2->main::line2_@1]
  line2_b1_from_line2:
    // [18] phi (byte) main::line2_i#2 = (byte) 0 [phi:main::line2->main::line2_@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [18] phi (byte*) cur_line#10 = (byte*) 1024 [phi:main::line2->main::line2_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line_10
    lda #>$400
    sta cur_line_10+1
    // [18] phi (word) main::line2_pos#2 = (const byte) main::line2_xpos#0*(word) $100 [phi:main::line2->main::line2_@1#2] -- vwuz1=vwuc1 
    lda #<line2_xpos*$100
    sta line2_pos
    lda #>line2_xpos*$100
    sta line2_pos+1
    jmp line2_b1
    // [18] phi from main::@3 to main::line2_@1 [phi:main::@3->main::line2_@1]
  line2_b1_from_b3:
    // [18] phi (byte) main::line2_i#2 = (byte) main::line2_i#1 [phi:main::@3->main::line2_@1#0] -- register_copy 
    // [18] phi (byte*) cur_line#10 = (byte*) cur_line#11 [phi:main::@3->main::line2_@1#1] -- register_copy 
    // [18] phi (word) main::line2_pos#2 = (word) main::line2_pos#1 [phi:main::@3->main::line2_@1#2] -- register_copy 
    jmp line2_b1
    // main::line2_@1
  line2_b1:
    // [19] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 -- vbuaa=_hi_vwuz1 
    lda line2_pos+1
    jmp plot2
    // main::plot2
  plot2:
    // [20] *((byte*) cur_line#10 + (byte) main::plot2_xpos#0) ← (const byte) main::line2_ch#0 -- pbuz1_derefidx_vbuaa=vbuc1 
    tay
    lda #line2_ch
    sta (cur_line_10),y
    jmp b3
    // main::@3
  b3:
    // [21] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    lda #line2_xadd
    clc
    adc line2_pos
    sta line2_pos
    bcc !+
    inc line2_pos+1
  !:
    // [22] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc cur_line_11
    sta cur_line_11
    bcc !+
    inc cur_line_11+1
  !:
    // [23] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [24] if((byte) main::line2_i#1<(const byte) main::line2_ysize#0) goto main::line2_@1 -- vbuxx_lt_vbuc1_then_la1 
    cpx #line2_ysize
    bcc line2_b1_from_b3
    jmp breturn
    // main::@return
  breturn:
    // [25] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp line1
Removing instruction jmp line1_b1
Removing instruction jmp plot1
Removing instruction jmp b2
Removing instruction jmp line2
Removing instruction jmp line2_b1
Removing instruction jmp plot2
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label line1_b1_from_b2 with line1_b1
Replacing label line2_b1_from_b3 with line2_b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Removing instruction line1_from_b1:
Removing instruction line1_b1_from_line1:
Removing instruction line1_b1_from_b2:
Removing instruction line2_from_b2:
Removing instruction line2_b1_from_line2:
Removing instruction line2_b1_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction line1:
Removing instruction plot1:
Removing instruction b2:
Removing instruction line2:
Removing instruction plot2:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp line1_b1
Removing instruction jmp line2_b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) cur_line
(byte*) cur_line#1 cur_line zp ZP_WORD:6 7.333333333333333
(byte*) cur_line#10 cur_line#10 zp ZP_WORD:10 8.25
(byte*) cur_line#11 cur_line#11 zp ZP_WORD:10 7.333333333333333
(byte*) cur_line#13 cur_line zp ZP_WORD:6 8.25
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(label) main::line1
(byte~) main::line1_$0
(bool~) main::line1_$2
(label) main::line1_@1
(byte) main::line1_ch
(const byte) main::line1_ch#0 line1_ch = (byte) '*'
(byte) main::line1_i
(byte) main::line1_i#1 reg byte x 16.5
(byte) main::line1_i#2 reg byte x 4.4
(word) main::line1_pos
(word) main::line1_pos#1 line1_pos zp ZP_WORD:4 5.5
(word) main::line1_pos#2 line1_pos zp ZP_WORD:4 11.0
(byte) main::line1_xadd
(const byte) main::line1_xadd#0 line1_xadd = (byte) $40
(byte) main::line1_xpos
(const byte) main::line1_xpos#0 line1_xpos = (byte) 2
(byte) main::line1_ysize
(const byte) main::line1_ysize#0 line1_ysize = (byte) $a
(label) main::line2
(byte~) main::line2_$0
(bool~) main::line2_$2
(label) main::line2_@1
(byte) main::line2_ch
(const byte) main::line2_ch#0 line2_ch = (byte) '.'
(byte) main::line2_i
(byte) main::line2_i#1 reg byte x 16.5
(byte) main::line2_i#2 reg byte x 4.4
(word) main::line2_pos
(word) main::line2_pos#1 line2_pos zp ZP_WORD:8 5.5
(word) main::line2_pos#2 line2_pos zp ZP_WORD:8 11.0
(byte) main::line2_xadd
(const byte) main::line2_xadd#0 line2_xadd = (byte) $80
(byte) main::line2_xpos
(const byte) main::line2_xpos#0 line2_xpos = (byte) 4
(byte) main::line2_ysize
(const byte) main::line2_ysize#0 line2_ysize = (byte) $f
(label) main::plot1
(byte*~) main::plot1_$0
(byte) main::plot1_ch
(byte) main::plot1_xpos
(byte) main::plot1_xpos#0 reg byte a 22.0
(label) main::plot2
(byte*~) main::plot2_$0
(byte) main::plot2_ch
(byte) main::plot2_xpos
(byte) main::plot2_xpos#0 reg byte a 22.0
(byte*) main::sc
(byte*) main::sc#1 sc zp ZP_WORD:2 16.5
(byte*) main::sc#2 sc zp ZP_WORD:2 16.5

zp ZP_WORD:2 [ main::sc#2 main::sc#1 ]
zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ]
zp ZP_WORD:6 [ cur_line#13 cur_line#1 ]
reg byte x [ main::line1_i#2 main::line1_i#1 ]
zp ZP_WORD:8 [ main::line2_pos#2 main::line2_pos#1 ]
zp ZP_WORD:10 [ cur_line#10 cur_line#11 ]
reg byte x [ main::line2_i#2 main::line2_i#1 ]
reg byte a [ main::plot1_xpos#0 ]
reg byte a [ main::plot2_xpos#0 ]


FINAL ASSEMBLER
Score: 2036

  // File Comments
// Inline functions in two levels
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label cur_line = 6
  .label cur_line_10 = $a
  .label cur_line_11 = $a
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .const line1_xpos = 2
    .const line1_xadd = $40
    .const line1_ysize = $a
    .const line1_ch = '*'
    .const line2_xpos = 4
    .const line2_xadd = $80
    .const line2_ysize = $f
    .const line2_ch = '.'
    .label sc = 2
    .label line1_pos = 4
    .label line2_pos = 8
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte*) main::sc#2 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    // [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
    // [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    // main::@1
  b1:
    // *sc = ' '
    // [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
    // for(byte* sc = $400;sc<$400+1000;sc++)
    // [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
    // [8] if((byte*) main::sc#1<(word)(number) $400+(number) $3e8) goto main::@1 -- pbuz1_lt_vwuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bcc b1
    bne !+
    lda sc
    cmp #<$400+$3e8
    bcc b1
  !:
    // [9] phi from main::@1 to main::line1 [phi:main::@1->main::line1]
    // main::line1
    // [10] phi from main::line1 to main::line1_@1 [phi:main::line1->main::line1_@1]
    // [10] phi (byte) main::line1_i#2 = (byte) 0 [phi:main::line1->main::line1_@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [10] phi (byte*) cur_line#13 = (byte*) 1024 [phi:main::line1->main::line1_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
    // [10] phi (word) main::line1_pos#2 = (const byte) main::line1_xpos#0*(word) $100 [phi:main::line1->main::line1_@1#2] -- vwuz1=vwuc1 
    lda #<line1_xpos*$100
    sta line1_pos
    lda #>line1_xpos*$100
    sta line1_pos+1
    // [10] phi from main::@2 to main::line1_@1 [phi:main::@2->main::line1_@1]
    // [10] phi (byte) main::line1_i#2 = (byte) main::line1_i#1 [phi:main::@2->main::line1_@1#0] -- register_copy 
    // [10] phi (byte*) cur_line#13 = (byte*) cur_line#1 [phi:main::@2->main::line1_@1#1] -- register_copy 
    // [10] phi (word) main::line1_pos#2 = (word) main::line1_pos#1 [phi:main::@2->main::line1_@1#2] -- register_copy 
    // main::line1_@1
  line1_b1:
    // plot(>pos, ch)
    // [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 -- vbuaa=_hi_vwuz1 
    lda line1_pos+1
    // main::plot1
    // *(cur_line+xpos) = ch
    // [12] *((byte*) cur_line#13 + (byte) main::plot1_xpos#0) ← (const byte) main::line1_ch#0 -- pbuz1_derefidx_vbuaa=vbuc1 
    tay
    lda #line1_ch
    sta (cur_line),y
    // main::@2
    // pos += xadd
    // [13] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    lda #line1_xadd
    clc
    adc line1_pos
    sta line1_pos
    bcc !+
    inc line1_pos+1
  !:
    // cur_line += 40
    // [14] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc cur_line
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
    // for( byte i=0;i<ysize; i++)
    // [15] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [16] if((byte) main::line1_i#1<(const byte) main::line1_ysize#0) goto main::line1_@1 -- vbuxx_lt_vbuc1_then_la1 
    cpx #line1_ysize
    bcc line1_b1
    // [17] phi from main::@2 to main::line2 [phi:main::@2->main::line2]
    // main::line2
    // [18] phi from main::line2 to main::line2_@1 [phi:main::line2->main::line2_@1]
    // [18] phi (byte) main::line2_i#2 = (byte) 0 [phi:main::line2->main::line2_@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [18] phi (byte*) cur_line#10 = (byte*) 1024 [phi:main::line2->main::line2_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line_10
    lda #>$400
    sta cur_line_10+1
    // [18] phi (word) main::line2_pos#2 = (const byte) main::line2_xpos#0*(word) $100 [phi:main::line2->main::line2_@1#2] -- vwuz1=vwuc1 
    lda #<line2_xpos*$100
    sta line2_pos
    lda #>line2_xpos*$100
    sta line2_pos+1
    // [18] phi from main::@3 to main::line2_@1 [phi:main::@3->main::line2_@1]
    // [18] phi (byte) main::line2_i#2 = (byte) main::line2_i#1 [phi:main::@3->main::line2_@1#0] -- register_copy 
    // [18] phi (byte*) cur_line#10 = (byte*) cur_line#11 [phi:main::@3->main::line2_@1#1] -- register_copy 
    // [18] phi (word) main::line2_pos#2 = (word) main::line2_pos#1 [phi:main::@3->main::line2_@1#2] -- register_copy 
    // main::line2_@1
  line2_b1:
    // plot(>pos, ch)
    // [19] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 -- vbuaa=_hi_vwuz1 
    lda line2_pos+1
    // main::plot2
    // *(cur_line+xpos) = ch
    // [20] *((byte*) cur_line#10 + (byte) main::plot2_xpos#0) ← (const byte) main::line2_ch#0 -- pbuz1_derefidx_vbuaa=vbuc1 
    tay
    lda #line2_ch
    sta (cur_line_10),y
    // main::@3
    // pos += xadd
    // [21] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    lda #line2_xadd
    clc
    adc line2_pos
    sta line2_pos
    bcc !+
    inc line2_pos+1
  !:
    // cur_line += 40
    // [22] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc cur_line_11
    sta cur_line_11
    bcc !+
    inc cur_line_11+1
  !:
    // for( byte i=0;i<ysize; i++)
    // [23] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [24] if((byte) main::line2_i#1<(const byte) main::line2_ysize#0) goto main::line2_@1 -- vbuxx_lt_vbuc1_then_la1 
    cpx #line2_ysize
    bcc line2_b1
    // main::@return
    // }
    // [25] return 
    rts
}
  // File Data

