Inlined call call line (byte/signed byte/word/signed word/dword/signed dword) 2 (byte/signed byte/word/signed word/dword/signed dword) 64 (byte/signed byte/word/signed word/dword/signed dword) 10 (byte) '*' 
Inlined call call plot (byte~) main::line1_$0 (byte) main::line1_ch 
Inlined call call line (byte/signed byte/word/signed word/dword/signed dword) 4 (byte/word/signed word/dword/signed dword) 128 (byte/signed byte/word/signed word/dword/signed dword) 15 (byte) '.' 
Inlined call call plot (byte~) main::line2_$0 (byte) main::line2_ch 
Inlined call call plot (byte~) line::$0 (byte) line::ch 

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@1
main: scope:[main]  from @3
  (byte*) main::sc#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  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
  (word/signed word/dword/signed dword~) main::$0 ← (word/signed word/dword/signed dword) 1024 + (word/signed word/dword/signed dword) 1000
  (bool~) main::$1 ← (byte*) main::sc#1 < (word/signed word/dword/signed dword~) main::$0
  if((bool~) main::$1) goto main::@1
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte) main::line1_xpos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) main::line1_xadd#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64
  (byte) main::line1_ysize#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
  (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*)) (word/signed word/dword/signed dword) 1024
  (word) main::line1_pos#0 ← { (byte) main::line1_xpos#1, (byte/signed byte/word/signed word/dword/signed dword) 0 }
  (byte) main::line1_i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 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 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (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 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) main::line2_xadd#0 ← (byte/word/signed word/dword/signed dword) 128
  (byte) main::line2_ysize#0 ← (byte/signed byte/word/signed word/dword/signed dword) 15
  (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*)) (word/signed word/dword/signed dword) 1024
  (word) main::line2_pos#0 ← { (byte) main::line2_xpos#1, (byte/signed byte/word/signed word/dword/signed dword) 0 }
  (byte) main::line2_i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 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 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (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*)) (word/signed word/dword/signed dword) 1024
  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()
(word/signed word/dword/signed dword~) main::$0
(bool~) main::$1
(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

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 (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 (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
Redundant Phi (byte) main::line1_ch#1 (byte) main::line1_ch#0
Redundant Phi (byte) main::line1_xadd#1 (byte) main::line1_xadd#0
Redundant Phi (byte) main::line1_ysize#1 (byte) main::line1_ysize#0
Redundant Phi (byte) main::line2_ch#1 (byte) main::line2_ch#0
Redundant Phi (byte) main::line2_xadd#1 (byte) main::line2_xadd#0
Redundant Phi (byte) main::line2_ysize#1 (byte) main::line2_ysize#0
Redundant Phi (byte*) cur_line#12 (byte*) cur_line#11
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) main::$1 [6] if((byte*) main::sc#1<(word/signed word/dword/signed dword~) main::$0) 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 [48] 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 word/signed word/dword/signed dword) main::$0 = 1024+1000
Constant (const byte) main::line1_xpos#0 = 2
Constant (const byte) main::line1_xadd#0 = 64
Constant (const byte) main::line1_ysize#0 = 10
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 = 128
Constant (const byte) main::line2_ysize#0 = 15
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
Fixing inline constructor with main::$4 ← main::line1_xpos#0 w= 0
Fixing inline constructor with main::$5 ← main::line2_xpos#0 w= 0
Successful SSA optimization Pass2FixInlineConstructors
Inferred type updated to word/signed word/dword/signed dword in (word~) main::$4 ← (const byte) main::line1_xpos#0 w= (byte/signed byte/word/signed word/dword/signed dword) 0
Inferred type updated to word/signed word/dword/signed dword in (word~) main::$5 ← (const byte) main::line2_xpos#0 w= (byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization PassNEliminateUnusedVars
Culled Empty Block (label) main::@2
Culled Empty Block (label) main::@3
Culled Empty Block (label) @1
Culled Empty Block (label) @4
Successful SSA optimization Pass2CullEmptyBlocks
Alias (word) main::line1_pos#0 = (word/signed word/dword/signed dword~) main::$4 
Alias (word) main::line2_pos#0 = (word/signed word/dword/signed dword~) main::$5 
Successful SSA optimization Pass2AliasElimination
Constant (const word) main::line1_pos#0 = main::line1_xpos#0*256+0
Constant (const word) main::line2_pos#0 = main::line2_xpos#0*256+0
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/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::$0 = (word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000
Constant inlined main::line1_i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::line2_pos#0 = (const byte) main::line2_xpos#0*(word/signed word/dword/signed dword) 256+(byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined cur_line#0 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined main::sc#0 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined cur_line#2 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined main::line1_pos#0 = (const byte) main::line1_xpos#0*(word/signed word/dword/signed dword) 256+(byte/signed byte/word/signed word/dword/signed dword) 0
Successful SSA optimization Pass2ConstantInlining
Simplifying constant plus zero main::line1_xpos#0*256+0
Simplifying constant plus zero main::line2_xpos#0*256+0
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 @3
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
CALL GRAPH
Calls in [] to main:2 

Created 7 initial phi equivalence classes
Coalesced [28] main::line2_pos#5 ← main::line2_pos#1
Coalesced [29] cur_line#17 ← cur_line#11
Coalesced [30] main::line2_i#5 ← main::line2_i#1
Coalesced [31] main::line1_pos#5 ← main::line1_pos#1
Coalesced [32] cur_line#16 ← cur_line#1
Coalesced [33] main::line1_i#5 ← main::line1_i#1
Coalesced [34] main::sc#3 ← main::sc#1
Coalesced down to 7 phi equivalence classes
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@7
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @3
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:@3
@3: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @3
  [3] phi()
main: scope:[main]  from @3
  [4] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@1
  [5] (byte*) main::sc#2 ← phi( main/((byte*))(word/signed word/dword/signed dword) 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/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) 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::@4 main::line1
  [10] (byte) main::line1_i#2 ← phi( main::@4/(byte) main::line1_i#1 main::line1/(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [10] (byte*) cur_line#13 ← phi( main::@4/(byte*) cur_line#1 main::line1/((byte*))(word/signed word/dword/signed dword) 1024 )
  [10] (word) main::line1_pos#2 ← phi( main::@4/(word) main::line1_pos#1 main::line1/(const byte) main::line1_xpos#0*(word/signed word/dword/signed dword) 256 )
  [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2
  to:main::plot1
main::plot1: scope:[main]  from main::line1_@1
  [12] (byte*) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0
  [13] *((byte*) main::plot1_$0#0) ← (const byte) main::line1_ch#0
  to:main::@4
main::@4: scope:[main]  from main::plot1
  [14] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0
  [15] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte/signed byte/word/signed word/dword/signed dword) 40
  [16] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2
  [17] 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::@4
  [18] phi()
  to:main::line2_@1
main::line2_@1: scope:[main]  from main::@6 main::line2
  [19] (byte) main::line2_i#2 ← phi( main::@6/(byte) main::line2_i#1 main::line2/(byte/signed byte/word/signed word/dword/signed dword) 0 )
  [19] (byte*) cur_line#10 ← phi( main::@6/(byte*) cur_line#11 main::line2/((byte*))(word/signed word/dword/signed dword) 1024 )
  [19] (word) main::line2_pos#2 ← phi( main::@6/(word) main::line2_pos#1 main::line2/(const byte) main::line2_xpos#0*(word/signed word/dword/signed dword) 256 )
  [20] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2
  to:main::plot2
main::plot2: scope:[main]  from main::line2_@1
  [21] (byte*) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0
  [22] *((byte*) main::plot2_$0#0) ← (const byte) main::line2_ch#0
  to:main::@6
main::@6: scope:[main]  from main::plot2
  [23] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0
  [24] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte/signed byte/word/signed word/dword/signed dword) 40
  [25] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2
  [26] 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::@6
  [27] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) cur_line
(byte*) cur_line#1 7.333333333333333
(byte*) cur_line#10 6.6000000000000005
(byte*) cur_line#11 7.333333333333333
(byte*) cur_line#13 6.6000000000000005
(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 3.6666666666666665
(word) main::line1_pos
(word) main::line1_pos#1 5.5
(word) main::line1_pos#2 8.25
(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 3.6666666666666665
(word) main::line2_pos
(word) main::line2_pos#1 5.5
(word) main::line2_pos#2 8.25
(byte) main::line2_xadd
(byte) main::line2_xpos
(byte) main::line2_ysize
(byte*~) main::plot1_$0
(byte*) main::plot1_$0#0 22.0
(byte) main::plot1_ch
(byte) main::plot1_xpos
(byte) main::plot1_xpos#0 22.0
(byte*~) main::plot2_$0
(byte*) main::plot2_$0#0 22.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::plot1_$0#0 to zero page equivalence class [ main::plot1_$0#0 ]
Added variable main::plot2_xpos#0 to zero page equivalence class [ main::plot2_xpos#0 ]
Added variable main::plot2_$0#0 to zero page equivalence class [ main::plot2_$0#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::plot1_$0#0 ]
[ main::plot2_xpos#0 ]
[ main::plot2_$0#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_WORD:15 [ main::plot1_$0#0 ]
Allocated zp ZP_BYTE:17 [ main::plot2_xpos#0 ]
Allocated zp ZP_WORD:18 [ main::plot2_$0#0 ]

INITIAL ASM
//SEG0 File Comments
// Inline functions in two levels
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label cur_line = 6
  .label cur_line_10 = $b
  .label cur_line_11 = $b
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
b3_from_bbegin:
  jmp b3
//SEG5 @3
b3:
//SEG6 [2] call main 
//SEG7 [4] phi from @3 to main [phi:@3->main]
main_from_b3:
  jsr main
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
bend_from_b3:
  jmp bend
//SEG9 @end
bend:
//SEG10 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 plot1__0 = $f
    .label line1_pos = 4
    .label line1_i = 8
    .label plot2_xpos = $11
    .label plot2__0 = $12
    .label line2_pos = 9
    .label line2_i = $d
  //SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG12 [5] phi (byte*) main::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    jmp b1
  //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
  //SEG14 [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
  //SEG15 main::@1
  b1:
  //SEG16 [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG17 [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG18 [8] if((byte*) main::sc#1<(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) 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
  !:
  //SEG19 [9] phi from main::@1 to main::line1 [phi:main::@1->main::line1]
  line1_from_b1:
    jmp line1
  //SEG20 main::line1
  line1:
  //SEG21 [10] phi from main::line1 to main::line1_@1 [phi:main::line1->main::line1_@1]
  line1_b1_from_line1:
  //SEG22 [10] phi (byte) main::line1_i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::line1->main::line1_@1#0] -- vbuz1=vbuc1 
    lda #0
    sta line1_i
  //SEG23 [10] phi (byte*) cur_line#13 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::line1->main::line1_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
  //SEG24 [10] phi (word) main::line1_pos#2 = (const byte) main::line1_xpos#0*(word/signed word/dword/signed dword) 256 [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
  //SEG25 [10] phi from main::@4 to main::line1_@1 [phi:main::@4->main::line1_@1]
  line1_b1_from_b4:
  //SEG26 [10] phi (byte) main::line1_i#2 = (byte) main::line1_i#1 [phi:main::@4->main::line1_@1#0] -- register_copy 
  //SEG27 [10] phi (byte*) cur_line#13 = (byte*) cur_line#1 [phi:main::@4->main::line1_@1#1] -- register_copy 
  //SEG28 [10] phi (word) main::line1_pos#2 = (word) main::line1_pos#1 [phi:main::@4->main::line1_@1#2] -- register_copy 
    jmp line1_b1
  //SEG29 main::line1_@1
  line1_b1:
  //SEG30 [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 -- vbuz1=_hi_vwuz2 
    lda line1_pos+1
    sta plot1_xpos
    jmp plot1
  //SEG31 main::plot1
  plot1:
  //SEG32 [12] (byte*) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0 -- pbuz1=pbuz2_plus_vbuz3 
    lda plot1_xpos
    clc
    adc cur_line
    sta plot1__0
    lda #0
    adc cur_line+1
    sta plot1__0+1
  //SEG33 [13] *((byte*) main::plot1_$0#0) ← (const byte) main::line1_ch#0 -- _deref_pbuz1=vbuc1 
    lda #line1_ch
    ldy #0
    sta (plot1__0),y
    jmp b4
  //SEG34 main::@4
  b4:
  //SEG35 [14] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    clc
    lda line1_pos
    adc #<line1_xadd
    sta line1_pos
    lda line1_pos+1
    adc #>line1_xadd
    sta line1_pos+1
  //SEG36 [15] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda cur_line
    clc
    adc #$28
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
  //SEG37 [16] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2 -- vbuz1=_inc_vbuz1 
    inc line1_i
  //SEG38 [17] 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_b4
  //SEG39 [18] phi from main::@4 to main::line2 [phi:main::@4->main::line2]
  line2_from_b4:
    jmp line2
  //SEG40 main::line2
  line2:
  //SEG41 [19] phi from main::line2 to main::line2_@1 [phi:main::line2->main::line2_@1]
  line2_b1_from_line2:
  //SEG42 [19] phi (byte) main::line2_i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::line2->main::line2_@1#0] -- vbuz1=vbuc1 
    lda #0
    sta line2_i
  //SEG43 [19] phi (byte*) cur_line#10 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::line2->main::line2_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line_10
    lda #>$400
    sta cur_line_10+1
  //SEG44 [19] phi (word) main::line2_pos#2 = (const byte) main::line2_xpos#0*(word/signed word/dword/signed dword) 256 [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
  //SEG45 [19] phi from main::@6 to main::line2_@1 [phi:main::@6->main::line2_@1]
  line2_b1_from_b6:
  //SEG46 [19] phi (byte) main::line2_i#2 = (byte) main::line2_i#1 [phi:main::@6->main::line2_@1#0] -- register_copy 
  //SEG47 [19] phi (byte*) cur_line#10 = (byte*) cur_line#11 [phi:main::@6->main::line2_@1#1] -- register_copy 
  //SEG48 [19] phi (word) main::line2_pos#2 = (word) main::line2_pos#1 [phi:main::@6->main::line2_@1#2] -- register_copy 
    jmp line2_b1
  //SEG49 main::line2_@1
  line2_b1:
  //SEG50 [20] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 -- vbuz1=_hi_vwuz2 
    lda line2_pos+1
    sta plot2_xpos
    jmp plot2
  //SEG51 main::plot2
  plot2:
  //SEG52 [21] (byte*) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0 -- pbuz1=pbuz2_plus_vbuz3 
    lda plot2_xpos
    clc
    adc cur_line_10
    sta plot2__0
    lda #0
    adc cur_line_10+1
    sta plot2__0+1
  //SEG53 [22] *((byte*) main::plot2_$0#0) ← (const byte) main::line2_ch#0 -- _deref_pbuz1=vbuc1 
    lda #line2_ch
    ldy #0
    sta (plot2__0),y
    jmp b6
  //SEG54 main::@6
  b6:
  //SEG55 [23] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    clc
    lda line2_pos
    adc #<line2_xadd
    sta line2_pos
    lda line2_pos+1
    adc #>line2_xadd
    sta line2_pos+1
  //SEG56 [24] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda cur_line_11
    clc
    adc #$28
    sta cur_line_11
    bcc !+
    inc cur_line_11+1
  !:
  //SEG57 [25] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2 -- vbuz1=_inc_vbuz1 
    inc line2_i
  //SEG58 [26] 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_b6
    jmp breturn
  //SEG59 main::@return
  breturn:
  //SEG60 [27] return 
    rts
}

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/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) 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*) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_$0#0 ] ( main:2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_$0#0 ] ) always clobbers reg byte a 
Statement [13] *((byte*) main::plot1_$0#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 reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:8 [ main::line1_i#2 main::line1_i#1 ]
Statement [14] (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 [15] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ 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 [20] (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 [21] (byte*) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_$0#0 ] ( main:2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_$0#0 ] ) always clobbers reg byte a 
Statement [22] *((byte*) main::plot2_$0#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 reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ main::line2_i#2 main::line2_i#1 ]
Statement [23] (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 [24] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ 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/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) 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*) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_$0#0 ] ( main:2 [ main::line1_pos#2 cur_line#13 main::line1_i#2 main::plot1_$0#0 ] ) always clobbers reg byte a 
Statement [13] *((byte*) main::plot1_$0#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 reg byte y 
Statement [14] (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 [15] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ 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 [20] (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 [21] (byte*) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_$0#0 ] ( main:2 [ main::line2_pos#2 cur_line#10 main::line2_i#2 main::plot2_$0#0 ] ) always clobbers reg byte a 
Statement [22] *((byte*) main::plot2_$0#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 reg byte y 
Statement [23] (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 [24] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ 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 , 
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 , 
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_WORD:15 [ main::plot1_$0#0 ] : zp ZP_WORD:15 , 
Potential registers zp ZP_BYTE:17 [ main::plot2_xpos#0 ] : zp ZP_BYTE:17 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:18 [ main::plot2_$0#0 ] : zp ZP_WORD:18 , 

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_WORD:15 [ main::plot1_$0#0 ] 22: zp ZP_BYTE:17 [ main::plot2_xpos#0 ] 22: zp ZP_WORD:18 [ main::plot2_$0#0 ] 20.17: zp ZP_BYTE:8 [ main::line1_i#2 main::line1_i#1 ] 20.17: zp ZP_BYTE:13 [ main::line2_i#2 main::line2_i#1 ] 13.75: zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ] 13.75: zp ZP_WORD:9 [ main::line2_pos#2 main::line2_pos#1 ] 
Uplift Scope [] 13.93: zp ZP_WORD:6 [ cur_line#13 cur_line#1 ] 13.93: zp ZP_WORD:11 [ cur_line#10 cur_line#11 ] 

Uplifting [main] best 2714 combination zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] reg byte a [ main::plot1_xpos#0 ] zp ZP_WORD:15 [ main::plot1_$0#0 ] reg byte a [ main::plot2_xpos#0 ] zp ZP_WORD:18 [ main::plot2_$0#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 ] 
Uplifting [] best 2714 combination zp ZP_WORD:6 [ cur_line#13 cur_line#1 ] zp ZP_WORD:11 [ cur_line#10 cur_line#11 ] 
Coalescing zero page register [ zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] ] with [ zp ZP_WORD:4 [ main::line1_pos#2 main::line1_pos#1 ] ]
Coalescing zero page register [ zp ZP_WORD:2 [ main::sc#2 main::sc#1 main::line1_pos#2 main::line1_pos#1 ] ] with [ zp ZP_WORD:9 [ main::line2_pos#2 main::line2_pos#1 ] ]
Coalescing zero page register [ zp ZP_WORD:6 [ cur_line#13 cur_line#1 ] ] with [ zp ZP_WORD:11 [ cur_line#10 cur_line#11 ] ]
Coalescing zero page register [ zp ZP_WORD:15 [ main::plot1_$0#0 ] ] with [ zp ZP_WORD:18 [ main::plot2_$0#0 ] ]
Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ cur_line#13 cur_line#1 cur_line#10 cur_line#11 ]
Allocated (was zp ZP_WORD:15) zp ZP_WORD:6 [ main::plot1_$0#0 main::plot2_$0#0 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
// Inline functions in two levels
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label cur_line = 4
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
b3_from_bbegin:
  jmp b3
//SEG5 @3
b3:
//SEG6 [2] call main 
//SEG7 [4] phi from @3 to main [phi:@3->main]
main_from_b3:
  jsr main
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
bend_from_b3:
  jmp bend
//SEG9 @end
bend:
//SEG10 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__0 = 6
    .label line1_pos = 2
    .label plot2__0 = 6
    .label line2_pos = 2
  //SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG12 [5] phi (byte*) main::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    jmp b1
  //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  b1_from_b1:
  //SEG14 [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
    jmp b1
  //SEG15 main::@1
  b1:
  //SEG16 [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG17 [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG18 [8] if((byte*) main::sc#1<(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) 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
  !:
  //SEG19 [9] phi from main::@1 to main::line1 [phi:main::@1->main::line1]
  line1_from_b1:
    jmp line1
  //SEG20 main::line1
  line1:
  //SEG21 [10] phi from main::line1 to main::line1_@1 [phi:main::line1->main::line1_@1]
  line1_b1_from_line1:
  //SEG22 [10] phi (byte) main::line1_i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::line1->main::line1_@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG23 [10] phi (byte*) cur_line#13 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::line1->main::line1_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
  //SEG24 [10] phi (word) main::line1_pos#2 = (const byte) main::line1_xpos#0*(word/signed word/dword/signed dword) 256 [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
  //SEG25 [10] phi from main::@4 to main::line1_@1 [phi:main::@4->main::line1_@1]
  line1_b1_from_b4:
  //SEG26 [10] phi (byte) main::line1_i#2 = (byte) main::line1_i#1 [phi:main::@4->main::line1_@1#0] -- register_copy 
  //SEG27 [10] phi (byte*) cur_line#13 = (byte*) cur_line#1 [phi:main::@4->main::line1_@1#1] -- register_copy 
  //SEG28 [10] phi (word) main::line1_pos#2 = (word) main::line1_pos#1 [phi:main::@4->main::line1_@1#2] -- register_copy 
    jmp line1_b1
  //SEG29 main::line1_@1
  line1_b1:
  //SEG30 [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 -- vbuaa=_hi_vwuz1 
    lda line1_pos+1
    jmp plot1
  //SEG31 main::plot1
  plot1:
  //SEG32 [12] (byte*) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0 -- pbuz1=pbuz2_plus_vbuaa 
    clc
    adc cur_line
    sta plot1__0
    lda #0
    adc cur_line+1
    sta plot1__0+1
  //SEG33 [13] *((byte*) main::plot1_$0#0) ← (const byte) main::line1_ch#0 -- _deref_pbuz1=vbuc1 
    lda #line1_ch
    ldy #0
    sta (plot1__0),y
    jmp b4
  //SEG34 main::@4
  b4:
  //SEG35 [14] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    clc
    lda line1_pos
    adc #<line1_xadd
    sta line1_pos
    lda line1_pos+1
    adc #>line1_xadd
    sta line1_pos+1
  //SEG36 [15] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda cur_line
    clc
    adc #$28
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
  //SEG37 [16] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG38 [17] 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_b4
  //SEG39 [18] phi from main::@4 to main::line2 [phi:main::@4->main::line2]
  line2_from_b4:
    jmp line2
  //SEG40 main::line2
  line2:
  //SEG41 [19] phi from main::line2 to main::line2_@1 [phi:main::line2->main::line2_@1]
  line2_b1_from_line2:
  //SEG42 [19] phi (byte) main::line2_i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::line2->main::line2_@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG43 [19] phi (byte*) cur_line#10 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::line2->main::line2_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
  //SEG44 [19] phi (word) main::line2_pos#2 = (const byte) main::line2_xpos#0*(word/signed word/dword/signed dword) 256 [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
  //SEG45 [19] phi from main::@6 to main::line2_@1 [phi:main::@6->main::line2_@1]
  line2_b1_from_b6:
  //SEG46 [19] phi (byte) main::line2_i#2 = (byte) main::line2_i#1 [phi:main::@6->main::line2_@1#0] -- register_copy 
  //SEG47 [19] phi (byte*) cur_line#10 = (byte*) cur_line#11 [phi:main::@6->main::line2_@1#1] -- register_copy 
  //SEG48 [19] phi (word) main::line2_pos#2 = (word) main::line2_pos#1 [phi:main::@6->main::line2_@1#2] -- register_copy 
    jmp line2_b1
  //SEG49 main::line2_@1
  line2_b1:
  //SEG50 [20] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 -- vbuaa=_hi_vwuz1 
    lda line2_pos+1
    jmp plot2
  //SEG51 main::plot2
  plot2:
  //SEG52 [21] (byte*) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0 -- pbuz1=pbuz2_plus_vbuaa 
    clc
    adc cur_line
    sta plot2__0
    lda #0
    adc cur_line+1
    sta plot2__0+1
  //SEG53 [22] *((byte*) main::plot2_$0#0) ← (const byte) main::line2_ch#0 -- _deref_pbuz1=vbuc1 
    lda #line2_ch
    ldy #0
    sta (plot2__0),y
    jmp b6
  //SEG54 main::@6
  b6:
  //SEG55 [23] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    clc
    lda line2_pos
    adc #<line2_xadd
    sta line2_pos
    lda line2_pos+1
    adc #>line2_xadd
    sta line2_pos+1
  //SEG56 [24] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda cur_line
    clc
    adc #$28
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
  //SEG57 [25] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG58 [26] 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_b6
    jmp breturn
  //SEG59 main::@return
  breturn:
  //SEG60 [27] return 
    rts
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b3
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp line1
Removing instruction jmp line1_b1
Removing instruction jmp plot1
Removing instruction jmp b4
Removing instruction jmp line2
Removing instruction jmp line2_b1
Removing instruction jmp plot2
Removing instruction jmp b6
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_b4 with line1_b1
Replacing label line2_b1_from_b6 with line2_b1
Removing instruction b3_from_bbegin:
Removing instruction b3:
Removing instruction main_from_b3:
Removing instruction bend_from_b3:
Removing instruction b1_from_b1:
Removing instruction line1_from_b1:
Removing instruction line1_b1_from_line1:
Removing instruction line1_b1_from_b4:
Removing instruction line2_from_b4:
Removing instruction line2_b1_from_line2:
Removing instruction line2_b1_from_b6:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction line1:
Removing instruction plot1:
Removing instruction b4:
Removing instruction line2:
Removing instruction plot2:
Removing instruction b6:
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) @3
(label) @begin
(label) @end
(byte*) cur_line
(byte*) cur_line#1 cur_line zp ZP_WORD:4 7.333333333333333
(byte*) cur_line#10 cur_line zp ZP_WORD:4 6.6000000000000005
(byte*) cur_line#11 cur_line zp ZP_WORD:4 7.333333333333333
(byte*) cur_line#13 cur_line zp ZP_WORD:4 6.6000000000000005
(void()) main()
(label) main::@1
(label) main::@4
(label) main::@6
(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 3.6666666666666665
(word) main::line1_pos
(word) main::line1_pos#1 line1_pos zp ZP_WORD:2 5.5
(word) main::line1_pos#2 line1_pos zp ZP_WORD:2 8.25
(byte) main::line1_xadd
(const byte) main::line1_xadd#0 line1_xadd = (byte/signed byte/word/signed word/dword/signed dword) 64
(byte) main::line1_xpos
(const byte) main::line1_xpos#0 line1_xpos = (byte/signed byte/word/signed word/dword/signed dword) 2
(byte) main::line1_ysize
(const byte) main::line1_ysize#0 line1_ysize = (byte/signed byte/word/signed word/dword/signed dword) 10
(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 3.6666666666666665
(word) main::line2_pos
(word) main::line2_pos#1 line2_pos zp ZP_WORD:2 5.5
(word) main::line2_pos#2 line2_pos zp ZP_WORD:2 8.25
(byte) main::line2_xadd
(const byte) main::line2_xadd#0 line2_xadd = (byte/word/signed word/dword/signed dword) 128
(byte) main::line2_xpos
(const byte) main::line2_xpos#0 line2_xpos = (byte/signed byte/word/signed word/dword/signed dword) 4
(byte) main::line2_ysize
(const byte) main::line2_ysize#0 line2_ysize = (byte/signed byte/word/signed word/dword/signed dword) 15
(label) main::plot1
(byte*~) main::plot1_$0
(byte*) main::plot1_$0#0 plot1_$0 zp ZP_WORD:6 22.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_$0#0 plot2_$0 zp ZP_WORD:6 22.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 main::line1_pos#2 main::line1_pos#1 main::line2_pos#2 main::line2_pos#1 ]
zp ZP_WORD:4 [ cur_line#13 cur_line#1 cur_line#10 cur_line#11 ]
reg byte x [ main::line1_i#2 main::line1_i#1 ]
reg byte x [ main::line2_i#2 main::line2_i#1 ]
reg byte a [ main::plot1_xpos#0 ]
zp ZP_WORD:6 [ main::plot1_$0#0 main::plot2_$0#0 ]
reg byte a [ main::plot2_xpos#0 ]


FINAL ASSEMBLER
Score: 2366

//SEG0 File Comments
// Inline functions in two levels
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  .label cur_line = 4
//SEG3 @begin
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
//SEG5 @3
//SEG6 [2] call main 
//SEG7 [4] phi from @3 to main [phi:@3->main]
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
//SEG9 @end
//SEG10 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__0 = 6
    .label line1_pos = 2
    .label plot2__0 = 6
    .label line2_pos = 2
  //SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
  //SEG12 [5] phi (byte*) main::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
  //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
  //SEG14 [5] phi (byte*) main::sc#2 = (byte*) main::sc#1 [phi:main::@1->main::@1#0] -- register_copy 
  //SEG15 main::@1
  b1:
  //SEG16 [6] *((byte*) main::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG17 [7] (byte*) main::sc#1 ← ++ (byte*) main::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG18 [8] if((byte*) main::sc#1<(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) goto main::@1 -- pbuz1_lt_vwuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bcc b1
    bne !+
    lda sc
    cmp #<$400+$3e8
    bcc b1
  !:
  //SEG19 [9] phi from main::@1 to main::line1 [phi:main::@1->main::line1]
  //SEG20 main::line1
  //SEG21 [10] phi from main::line1 to main::line1_@1 [phi:main::line1->main::line1_@1]
  //SEG22 [10] phi (byte) main::line1_i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::line1->main::line1_@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG23 [10] phi (byte*) cur_line#13 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::line1->main::line1_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
  //SEG24 [10] phi (word) main::line1_pos#2 = (const byte) main::line1_xpos#0*(word/signed word/dword/signed dword) 256 [phi:main::line1->main::line1_@1#2] -- vwuz1=vwuc1 
    lda #<line1_xpos*$100
    sta line1_pos
    lda #>line1_xpos*$100
    sta line1_pos+1
  //SEG25 [10] phi from main::@4 to main::line1_@1 [phi:main::@4->main::line1_@1]
  //SEG26 [10] phi (byte) main::line1_i#2 = (byte) main::line1_i#1 [phi:main::@4->main::line1_@1#0] -- register_copy 
  //SEG27 [10] phi (byte*) cur_line#13 = (byte*) cur_line#1 [phi:main::@4->main::line1_@1#1] -- register_copy 
  //SEG28 [10] phi (word) main::line1_pos#2 = (word) main::line1_pos#1 [phi:main::@4->main::line1_@1#2] -- register_copy 
  //SEG29 main::line1_@1
  line1_b1:
  //SEG30 [11] (byte) main::plot1_xpos#0 ← > (word) main::line1_pos#2 -- vbuaa=_hi_vwuz1 
    lda line1_pos+1
  //SEG31 main::plot1
  //SEG32 [12] (byte*) main::plot1_$0#0 ← (byte*) cur_line#13 + (byte) main::plot1_xpos#0 -- pbuz1=pbuz2_plus_vbuaa 
    clc
    adc cur_line
    sta plot1__0
    lda #0
    adc cur_line+1
    sta plot1__0+1
  //SEG33 [13] *((byte*) main::plot1_$0#0) ← (const byte) main::line1_ch#0 -- _deref_pbuz1=vbuc1 
    lda #line1_ch
    ldy #0
    sta (plot1__0),y
  //SEG34 main::@4
  //SEG35 [14] (word) main::line1_pos#1 ← (word) main::line1_pos#2 + (const byte) main::line1_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    clc
    lda line1_pos
    adc #<line1_xadd
    sta line1_pos
    lda line1_pos+1
    adc #>line1_xadd
    sta line1_pos+1
  //SEG36 [15] (byte*) cur_line#1 ← (byte*) cur_line#13 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda cur_line
    clc
    adc #$28
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
  //SEG37 [16] (byte) main::line1_i#1 ← ++ (byte) main::line1_i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG38 [17] 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
  //SEG39 [18] phi from main::@4 to main::line2 [phi:main::@4->main::line2]
  //SEG40 main::line2
  //SEG41 [19] phi from main::line2 to main::line2_@1 [phi:main::line2->main::line2_@1]
  //SEG42 [19] phi (byte) main::line2_i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::line2->main::line2_@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG43 [19] phi (byte*) cur_line#10 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::line2->main::line2_@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta cur_line
    lda #>$400
    sta cur_line+1
  //SEG44 [19] phi (word) main::line2_pos#2 = (const byte) main::line2_xpos#0*(word/signed word/dword/signed dword) 256 [phi:main::line2->main::line2_@1#2] -- vwuz1=vwuc1 
    lda #<line2_xpos*$100
    sta line2_pos
    lda #>line2_xpos*$100
    sta line2_pos+1
  //SEG45 [19] phi from main::@6 to main::line2_@1 [phi:main::@6->main::line2_@1]
  //SEG46 [19] phi (byte) main::line2_i#2 = (byte) main::line2_i#1 [phi:main::@6->main::line2_@1#0] -- register_copy 
  //SEG47 [19] phi (byte*) cur_line#10 = (byte*) cur_line#11 [phi:main::@6->main::line2_@1#1] -- register_copy 
  //SEG48 [19] phi (word) main::line2_pos#2 = (word) main::line2_pos#1 [phi:main::@6->main::line2_@1#2] -- register_copy 
  //SEG49 main::line2_@1
  line2_b1:
  //SEG50 [20] (byte) main::plot2_xpos#0 ← > (word) main::line2_pos#2 -- vbuaa=_hi_vwuz1 
    lda line2_pos+1
  //SEG51 main::plot2
  //SEG52 [21] (byte*) main::plot2_$0#0 ← (byte*) cur_line#10 + (byte) main::plot2_xpos#0 -- pbuz1=pbuz2_plus_vbuaa 
    clc
    adc cur_line
    sta plot2__0
    lda #0
    adc cur_line+1
    sta plot2__0+1
  //SEG53 [22] *((byte*) main::plot2_$0#0) ← (const byte) main::line2_ch#0 -- _deref_pbuz1=vbuc1 
    lda #line2_ch
    ldy #0
    sta (plot2__0),y
  //SEG54 main::@6
  //SEG55 [23] (word) main::line2_pos#1 ← (word) main::line2_pos#2 + (const byte) main::line2_xadd#0 -- vwuz1=vwuz1_plus_vbuc1 
    clc
    lda line2_pos
    adc #<line2_xadd
    sta line2_pos
    lda line2_pos+1
    adc #>line2_xadd
    sta line2_pos+1
  //SEG56 [24] (byte*) cur_line#11 ← (byte*) cur_line#10 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda cur_line
    clc
    adc #$28
    sta cur_line
    bcc !+
    inc cur_line+1
  !:
  //SEG57 [25] (byte) main::line2_i#1 ← ++ (byte) main::line2_i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG58 [26] 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
  //SEG59 main::@return
  //SEG60 [27] return 
    rts
}

