PARSING src/test/java/dk/camelot64/kickc/test/kc/overlap-allocation.kc
// Allocates ZP to j/k-variables even though all of i, j, k could be allocates to x and be more efficient.
// Reason: Pass4RegisterUpliftCombinations.isAllocationOverlapping() believes i/j/k variables overlaps insode plot()
byte* SCREEN = $0400;

void main() {
    for(byte i : 0..10) {
       plot(i);
    }
   for(byte j : 0..10) {
       plot(j);
    }
   for(byte k : 0..10) {
       plot(k);
    }
}

void plot(byte x) {
    SCREEN[x] = '*';
}


STATEMENTS
  (byte*) SCREEN ← (word/signed word/dword/signed dword) 1024
proc (void()) main()
  (byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@1:
  (void~) main::$0 ← call plot (byte) main::i 
  (byte) main::i ← ++ (byte) main::i
  (boolean~) main::$1 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$1) goto main::@1
  (byte) main::j ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@2:
  (void~) main::$2 ← call plot (byte) main::j 
  (byte) main::j ← ++ (byte) main::j
  (boolean~) main::$3 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$3) goto main::@2
  (byte) main::k ← (byte/signed byte/word/signed word/dword/signed dword) 0
main::@3:
  (void~) main::$4 ← call plot (byte) main::k 
  (byte) main::k ← ++ (byte) main::k
  (boolean~) main::$5 ← (byte) main::k != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$5) goto main::@3
main::@return:
  return 
endproc // main()
proc (void()) plot((byte) plot::x)
  *((byte*) SCREEN + (byte) plot::x) ← (byte) '*'
plot::@return:
  return 
endproc // plot()
  call main 

SYMBOLS
(byte*) SCREEN
(void()) main()
(void~) main::$0
(boolean~) main::$1
(void~) main::$2
(boolean~) main::$3
(void~) main::$4
(boolean~) main::$5
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(byte) main::i
(byte) main::j
(byte) main::k
(void()) plot((byte) plot::x)
(label) plot::@return
(byte) plot::x

Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
INITIAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  (byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@1
main: scope:[main]  from
  (byte) main::i ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@1
main::@1: scope:[main]  from main main::@1
  (void~) main::$0 ← call plot (byte) main::i 
  (byte) main::i ← ++ (byte) main::i
  (boolean~) main::$1 ← (byte) main::i != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$1) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@1
  (byte) main::j ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@2
main::@2: scope:[main]  from main::@2 main::@4
  (void~) main::$2 ← call plot (byte) main::j 
  (byte) main::j ← ++ (byte) main::j
  (boolean~) main::$3 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$3) goto main::@2
  to:main::@5
main::@5: scope:[main]  from main::@2
  (byte) main::k ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@3
main::@3: scope:[main]  from main::@3 main::@5
  (void~) main::$4 ← call plot (byte) main::k 
  (byte) main::k ← ++ (byte) main::k
  (boolean~) main::$5 ← (byte) main::k != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$5) goto main::@3
  to:main::@6
main::@6: scope:[main]  from main::@3
  to:main::@return
main::@return: scope:[main]  from main::@6
  return 
  to:@return
@1: scope:[]  from @begin
  to:@2
plot: scope:[plot]  from
  *((byte*) SCREEN + (byte) plot::x) ← (byte) '*'
  to:plot::@return
plot::@return: scope:[plot]  from plot
  return 
  to:@return
@2: scope:[]  from @1
  call main 
  to:@end
@end: scope:[]  from @2

Eliminating unused variable - keeping the call (void~) main::$0
Eliminating unused variable - keeping the call (void~) main::$2
Eliminating unused variable - keeping the call (void~) main::$4
Removing empty block main::@6
Removing empty block @1
PROCEDURE MODIFY VARIABLE ANALYSIS

Completing Phi functions...
Completing Phi functions...
Completing Phi functions...
Completing Phi functions...

CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
@begin: scope:[]  from
  (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  to:@2
main: scope:[main]  from @2
  (byte*) SCREEN#5 ← phi( @2/(byte*) SCREEN#11 )
  (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@1
main::@1: scope:[main]  from main main::@7
  (byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#5 main::@7/(byte*) SCREEN#6 )
  (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@7/(byte) main::i#1 )
  (byte) plot::x#0 ← (byte) main::i#2
  call plot param-assignment
  to:main::@7
main::@7: scope:[main]  from main::@1
  (byte*) SCREEN#6 ← phi( main::@1/(byte*) SCREEN#2 )
  (byte) main::i#3 ← phi( main::@1/(byte) main::i#2 )
  (byte) main::i#1 ← ++ (byte) main::i#3
  (boolean~) main::$1 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$1) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@7
  (byte*) SCREEN#7 ← phi( main::@7/(byte*) SCREEN#6 )
  (byte) main::j#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@2
main::@2: scope:[main]  from main::@4 main::@8
  (byte*) SCREEN#3 ← phi( main::@4/(byte*) SCREEN#7 main::@8/(byte*) SCREEN#8 )
  (byte) main::j#2 ← phi( main::@4/(byte) main::j#0 main::@8/(byte) main::j#1 )
  (byte) plot::x#1 ← (byte) main::j#2
  call plot param-assignment
  to:main::@8
main::@8: scope:[main]  from main::@2
  (byte*) SCREEN#8 ← phi( main::@2/(byte*) SCREEN#3 )
  (byte) main::j#3 ← phi( main::@2/(byte) main::j#2 )
  (byte) main::j#1 ← ++ (byte) main::j#3
  (boolean~) main::$3 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$3) goto main::@2
  to:main::@5
main::@5: scope:[main]  from main::@8
  (byte*) SCREEN#9 ← phi( main::@8/(byte*) SCREEN#8 )
  (byte) main::k#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:main::@3
main::@3: scope:[main]  from main::@5 main::@9
  (byte*) SCREEN#4 ← phi( main::@5/(byte*) SCREEN#9 main::@9/(byte*) SCREEN#10 )
  (byte) main::k#2 ← phi( main::@5/(byte) main::k#0 main::@9/(byte) main::k#1 )
  (byte) plot::x#2 ← (byte) main::k#2
  call plot param-assignment
  to:main::@9
main::@9: scope:[main]  from main::@3
  (byte*) SCREEN#10 ← phi( main::@3/(byte*) SCREEN#4 )
  (byte) main::k#3 ← phi( main::@3/(byte) main::k#2 )
  (byte) main::k#1 ← ++ (byte) main::k#3
  (boolean~) main::$5 ← (byte) main::k#1 != (byte/signed byte/word/signed word/dword/signed dword) 11
  if((boolean~) main::$5) goto main::@3
  to:main::@return
main::@return: scope:[main]  from main::@9
  return 
  to:@return
plot: scope:[plot]  from main::@1 main::@2 main::@3
  (byte) plot::x#3 ← phi( main::@1/(byte) plot::x#0 main::@2/(byte) plot::x#1 main::@3/(byte) plot::x#2 )
  (byte*) SCREEN#1 ← phi( main::@1/(byte*) SCREEN#2 main::@2/(byte*) SCREEN#3 main::@3/(byte*) SCREEN#4 )
  *((byte*) SCREEN#1 + (byte) plot::x#3) ← (byte) '*'
  to:plot::@return
plot::@return: scope:[plot]  from plot
  return 
  to:@return
@2: scope:[]  from @begin
  (byte*) SCREEN#11 ← phi( @begin/(byte*) SCREEN#0 )
  call main param-assignment
  to:@3
@3: scope:[]  from @2
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(label) @2
(label) @3
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(byte*) SCREEN#1
(byte*) SCREEN#10
(byte*) SCREEN#11
(byte*) SCREEN#2
(byte*) SCREEN#3
(byte*) SCREEN#4
(byte*) SCREEN#5
(byte*) SCREEN#6
(byte*) SCREEN#7
(byte*) SCREEN#8
(byte*) SCREEN#9
(void()) main()
(boolean~) main::$1
(boolean~) main::$3
(boolean~) main::$5
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::i#3
(byte) main::j
(byte) main::j#0
(byte) main::j#1
(byte) main::j#2
(byte) main::j#3
(byte) main::k
(byte) main::k#0
(byte) main::k#1
(byte) main::k#2
(byte) main::k#3
(void()) plot((byte) plot::x)
(label) plot::@return
(byte) plot::x
(byte) plot::x#0
(byte) plot::x#1
(byte) plot::x#2
(byte) plot::x#3

OPTIMIZING CONTROL FLOW GRAPH
Culled Empty Block (label) @3
Succesful SSA optimization Pass2CullEmptyBlocks
Not aliassing across scopes: SCREEN#5 SCREEN#11
Not aliassing across scopes: plot::x#0 main::i#2
Not aliassing across scopes: plot::x#1 main::j#2
Not aliassing across scopes: plot::x#2 main::k#2
Not aliassing across scopes: SCREEN#1 SCREEN#2
Not aliassing across scopes: plot::x#3 plot::x#0
Alias (byte) main::i#2 = (byte) main::i#3 
Alias (byte*) SCREEN#2 = (byte*) SCREEN#6 (byte*) SCREEN#7 
Alias (byte) main::j#2 = (byte) main::j#3 
Alias (byte*) SCREEN#3 = (byte*) SCREEN#8 (byte*) SCREEN#9 
Alias (byte) main::k#2 = (byte) main::k#3 
Alias (byte*) SCREEN#10 = (byte*) SCREEN#4 
Alias (byte*) SCREEN#0 = (byte*) SCREEN#11 
Succesful SSA optimization Pass2AliasElimination
Not aliassing across scopes: SCREEN#5 SCREEN#0
Not aliassing across scopes: plot::x#0 main::i#2
Not aliassing across scopes: plot::x#1 main::j#2
Not aliassing across scopes: plot::x#2 main::k#2
Not aliassing across scopes: SCREEN#1 SCREEN#2
Not aliassing across scopes: plot::x#3 plot::x#0
Self Phi Eliminated (byte*) SCREEN#2
Self Phi Eliminated (byte*) SCREEN#3
Self Phi Eliminated (byte*) SCREEN#10
Succesful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) SCREEN#5 (byte*) SCREEN#0
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#5
Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#2
Redundant Phi (byte*) SCREEN#10 (byte*) SCREEN#3
Succesful SSA optimization Pass2RedundantPhiElimination
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
Succesful SSA optimization Pass2RedundantPhiElimination
Simple Condition (boolean~) main::$1 if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1
Simple Condition (boolean~) main::$3 if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2
Simple Condition (boolean~) main::$5 if((byte) main::k#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3
Succesful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = ((byte*))1024
Constant (const byte) main::i#0 = 0
Constant (const byte) main::j#0 = 0
Constant (const byte) main::k#0 = 0
Succesful SSA optimization Pass2ConstantIdentification
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@5
Succesful SSA optimization Pass2CullEmptyBlocks
Not aliassing across scopes: plot::x#0 main::i#2
Not aliassing across scopes: plot::x#1 main::j#2
Not aliassing across scopes: plot::x#2 main::k#2
Not aliassing across scopes: plot::x#3 plot::x#0
Not aliassing across scopes: plot::x#0 main::i#2
Not aliassing across scopes: plot::x#1 main::j#2
Not aliassing across scopes: plot::x#2 main::k#2
Not aliassing across scopes: plot::x#3 plot::x#0
OPTIMIZING CONTROL FLOW GRAPH
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte) main::j#0
Inlining constant with var siblings (const byte) main::j#0
Inlining constant with var siblings (const byte) main::k#0
Inlining constant with var siblings (const byte) main::k#0
Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::k#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined main::j#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Succesful SSA optimization Pass2ConstantInlining
Block Sequence Planned @begin @2 @end main main::@1 main::@7 main::@2 main::@8 main::@3 main::@9 main::@return plot plot::@return 
Added new block during phi lifting main::@10(between main::@7 and main::@1)
Added new block during phi lifting main::@11(between main::@8 and main::@2)
Added new block during phi lifting main::@12(between main::@9 and main::@3)
Block Sequence Planned @begin @2 @end main main::@1 main::@7 main::@2 main::@8 main::@3 main::@9 main::@return main::@12 main::@11 main::@10 plot plot::@return 
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to plot:8 plot:14 plot:20 

Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...
Created 4 initial phi equivalence classes
Coalesced [7] plot::x#4 ← plot::x#0
Coalesced [13] plot::x#5 ← plot::x#1
Coalesced [19] plot::x#6 ← plot::x#2
Coalesced [24] main::k#4 ← main::k#1
Coalesced [25] main::j#4 ← main::j#1
Coalesced [26] main::i#4 ← main::i#1
Coalesced down to 4 phi equivalence classes
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::@11
Culled Empty Block (label) main::@10
Block Sequence Planned @begin @2 @end main main::@1 main::@7 main::@2 main::@8 main::@3 main::@9 main::@return plot plot::@return 
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Propagating live ranges...
Propagating live ranges...
Propagating live ranges...

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi() [ ] ( )
  to:@2
@2: scope:[]  from @begin
  [1] phi() [ ] ( )
  [2] call main param-assignment [ ] ( )
  to:@end
@end: scope:[]  from @2
  [3] phi() [ ] ( )
main: scope:[main]  from @2
  [4] phi() [ ] ( main:2 [ ] )
  to:main::@1
main::@1: scope:[main]  from main main::@7
  [5] (byte) main::i#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@7/(byte) main::i#1 ) [ main::i#2 ] ( main:2 [ main::i#2 ] )
  [6] (byte) plot::x#0 ← (byte) main::i#2 [ main::i#2 plot::x#0 ] ( main:2 [ main::i#2 plot::x#0 ] )
  [7] call plot param-assignment [ main::i#2 ] ( main:2 [ main::i#2 ] )
  to:main::@7
main::@7: scope:[main]  from main::@1
  [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] )
  [9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] )
  to:main::@2
main::@2: scope:[main]  from main::@7 main::@8
  [10] (byte) main::j#2 ← phi( main::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@8/(byte) main::j#1 ) [ main::j#2 ] ( main:2 [ main::j#2 ] )
  [11] (byte) plot::x#1 ← (byte) main::j#2 [ main::j#2 plot::x#1 ] ( main:2 [ main::j#2 plot::x#1 ] )
  [12] call plot param-assignment [ main::j#2 ] ( main:2 [ main::j#2 ] )
  to:main::@8
main::@8: scope:[main]  from main::@2
  [13] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] )
  [14] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2 [ main::j#1 ] ( main:2 [ main::j#1 ] )
  to:main::@3
main::@3: scope:[main]  from main::@8 main::@9
  [15] (byte) main::k#2 ← phi( main::@8/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@9/(byte) main::k#1 ) [ main::k#2 ] ( main:2 [ main::k#2 ] )
  [16] (byte) plot::x#2 ← (byte) main::k#2 [ main::k#2 plot::x#2 ] ( main:2 [ main::k#2 plot::x#2 ] )
  [17] call plot param-assignment [ main::k#2 ] ( main:2 [ main::k#2 ] )
  to:main::@9
main::@9: scope:[main]  from main::@3
  [18] (byte) main::k#1 ← ++ (byte) main::k#2 [ main::k#1 ] ( main:2 [ main::k#1 ] )
  [19] if((byte) main::k#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 [ main::k#1 ] ( main:2 [ main::k#1 ] )
  to:main::@return
main::@return: scope:[main]  from main::@9
  [20] return  [ ] ( main:2 [ ] )
  to:@return
plot: scope:[plot]  from main::@1 main::@2 main::@3
  [21] (byte) plot::x#3 ← phi( main::@1/(byte) plot::x#0 main::@2/(byte) plot::x#1 main::@3/(byte) plot::x#2 ) [ plot::x#3 ] ( main:2::plot:7 [ main::i#2 plot::x#3 ] main:2::plot:12 [ main::j#2 plot::x#3 ] main:2::plot:17 [ main::k#2 plot::x#3 ] )
  [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] )
  to:plot::@return
plot::@return: scope:[plot]  from plot
  [23] return  [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] )
  to:@return

DOMINATORS
@begin dominated by  @begin 
@2 dominated by  @begin @2 
@end dominated by  @begin @end @2 
main dominated by  @begin main @2 
main::@1 dominated by  @begin main @2 main::@1 
main::@7 dominated by  main::@7 @begin main @2 main::@1 
main::@2 dominated by  main::@7 @begin main @2 main::@1 main::@2 
main::@8 dominated by  main::@7 @begin main::@8 main @2 main::@1 main::@2 
main::@3 dominated by  main::@7 @begin main::@8 main @2 main::@1 main::@2 main::@3 
main::@9 dominated by  main::@9 main::@7 @begin main::@8 main @2 main::@1 main::@2 main::@3 
main::@return dominated by  main::@9 main::@return main::@7 @begin main::@8 main @2 main::@1 main::@2 main::@3 
plot dominated by  @begin main @2 plot main::@1 
plot::@return dominated by  @begin main @2 plot main::@1 plot::@return 

NATURAL LOOPS
Found back edge: Loop head: main::@1 tails: main::@7 blocks: null
Found back edge: Loop head: main::@2 tails: main::@8 blocks: null
Found back edge: Loop head: main::@3 tails: main::@9 blocks: null
Populated: Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 
Populated: Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 
Populated: Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 
Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 
Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 
Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 

NATURAL LOOPS WITH DEPTH
Found 0 loops in scope []
Found 3 loops in scope [main]
  Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 
  Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 
  Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 
Found 0 loops in scope [plot]
Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1  depth: 1
Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2  depth: 1
Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3  depth: 1


VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte) main::i
(byte) main::i#1 16.5
(byte) main::i#2 11.0
(byte) main::j
(byte) main::j#1 16.5
(byte) main::j#2 11.0
(byte) main::k
(byte) main::k#1 16.5
(byte) main::k#2 11.0
(void()) plot((byte) plot::x)
(byte) plot::x
(byte) plot::x#0 22.0
(byte) plot::x#1 22.0
(byte) plot::x#2 22.0
(byte) plot::x#3 35.0

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::j#2 main::j#1 ]
[ main::k#2 main::k#1 ]
[ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::j#2 main::j#1 ]
[ main::k#2 main::k#1 ]
[ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_BYTE:3 [ main::j#2 main::j#1 ]
Allocated zp ZP_BYTE:4 [ main::k#2 main::k#1 ]
Allocated zp ZP_BYTE:5 [ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ]

INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG4 @2
b2:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
    .label i = 2
    .label j = 3
    .label k = 4
  //SEG10 [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG11 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b1
  //SEG12 [5] phi from main::@7 to main::@1 [phi:main::@7->main::@1]
  b1_from_b7:
  //SEG13 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@7->main::@1#0] -- register_copy 
    jmp b1
  //SEG14 main::@1
  b1:
  //SEG15 [6] (byte) plot::x#0 ← (byte) main::i#2 [ main::i#2 plot::x#0 ] ( main:2 [ main::i#2 plot::x#0 ] ) -- vbuz1=vbuz2 
    lda i
    sta plot.x
  //SEG16 [7] call plot param-assignment [ main::i#2 ] ( main:2 [ main::i#2 ] )
  //SEG17 [21] phi from main::@1 to plot [phi:main::@1->plot]
  plot_from_b1:
  //SEG18 [21] phi (byte) plot::x#3 = (byte) plot::x#0 [phi:main::@1->plot#0] -- register_copy 
    jsr plot
    jmp b7
  //SEG19 main::@7
  b7:
  //SEG20 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuz1=_inc_vbuz1 
    inc i
  //SEG21 [9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$b
    bne b1_from_b7
  //SEG22 [10] phi from main::@7 to main::@2 [phi:main::@7->main::@2]
  b2_from_b7:
  //SEG23 [10] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@7->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta j
    jmp b2
  //SEG24 [10] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  b2_from_b8:
  //SEG25 [10] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@8->main::@2#0] -- register_copy 
    jmp b2
  //SEG26 main::@2
  b2:
  //SEG27 [11] (byte) plot::x#1 ← (byte) main::j#2 [ main::j#2 plot::x#1 ] ( main:2 [ main::j#2 plot::x#1 ] ) -- vbuz1=vbuz2 
    lda j
    sta plot.x
  //SEG28 [12] call plot param-assignment [ main::j#2 ] ( main:2 [ main::j#2 ] )
  //SEG29 [21] phi from main::@2 to plot [phi:main::@2->plot]
  plot_from_b2:
  //SEG30 [21] phi (byte) plot::x#3 = (byte) plot::x#1 [phi:main::@2->plot#0] -- register_copy 
    jsr plot
    jmp b8
  //SEG31 main::@8
  b8:
  //SEG32 [13] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuz1=_inc_vbuz1 
    inc j
  //SEG33 [14] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuz1_neq_vbuc1_then_la1 
    lda j
    cmp #$b
    bne b2_from_b8
  //SEG34 [15] phi from main::@8 to main::@3 [phi:main::@8->main::@3]
  b3_from_b8:
  //SEG35 [15] phi (byte) main::k#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@8->main::@3#0] -- vbuz1=vbuc1 
    lda #0
    sta k
    jmp b3
  //SEG36 [15] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
  b3_from_b9:
  //SEG37 [15] phi (byte) main::k#2 = (byte) main::k#1 [phi:main::@9->main::@3#0] -- register_copy 
    jmp b3
  //SEG38 main::@3
  b3:
  //SEG39 [16] (byte) plot::x#2 ← (byte) main::k#2 [ main::k#2 plot::x#2 ] ( main:2 [ main::k#2 plot::x#2 ] ) -- vbuz1=vbuz2 
    lda k
    sta plot.x
  //SEG40 [17] call plot param-assignment [ main::k#2 ] ( main:2 [ main::k#2 ] )
  //SEG41 [21] phi from main::@3 to plot [phi:main::@3->plot]
  plot_from_b3:
  //SEG42 [21] phi (byte) plot::x#3 = (byte) plot::x#2 [phi:main::@3->plot#0] -- register_copy 
    jsr plot
    jmp b9
  //SEG43 main::@9
  b9:
  //SEG44 [18] (byte) main::k#1 ← ++ (byte) main::k#2 [ main::k#1 ] ( main:2 [ main::k#1 ] ) -- vbuz1=_inc_vbuz1 
    inc k
  //SEG45 [19] if((byte) main::k#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 [ main::k#1 ] ( main:2 [ main::k#1 ] ) -- vbuz1_neq_vbuc1_then_la1 
    lda k
    cmp #$b
    bne b3_from_b9
    jmp breturn
  //SEG46 main::@return
  breturn:
  //SEG47 [20] return  [ ] ( main:2 [ ] )
    rts
}
//SEG48 plot
plot: {
    .label x = 5
  //SEG49 [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] ) -- pbuc1_derefidx_vbuz1=vbuc2 
    ldy x
    lda #'*'
    sta SCREEN,y
    jmp breturn
  //SEG50 plot::@return
  breturn:
  //SEG51 [23] return  [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] )
    rts
}

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::j#2 main::j#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::k#2 main::k#1 ]
Statement [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:3 [ main::j#2 main::j#1 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:4 [ main::k#2 main::k#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [plot] 101: zp ZP_BYTE:5 [ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ] 
Uplift Scope [main] 27.5: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 27.5: zp ZP_BYTE:3 [ main::j#2 main::j#1 ] 27.5: zp ZP_BYTE:4 [ main::k#2 main::k#1 ] 
Uplift Scope [] 

Uplifting [plot] best 886 combination reg byte x [ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ] 
Uplifting [main] best 526 combination reg byte x [ main::i#2 main::i#1 ] reg byte x [ main::j#2 main::j#1 ] reg byte x [ main::k#2 main::k#1 ] 
Uplifting [] best 526 combination 

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
//SEG2 @begin
bbegin:
//SEG3 [1] phi from @begin to @2 [phi:@begin->@2]
b2_from_bbegin:
  jmp b2
//SEG4 @2
b2:
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @2 to main [phi:@2->main]
main_from_b2:
  jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
bend_from_b2:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
  //SEG11 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
  //SEG12 [5] phi from main::@7 to main::@1 [phi:main::@7->main::@1]
  b1_from_b7:
  //SEG13 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@7->main::@1#0] -- register_copy 
    jmp b1
  //SEG14 main::@1
  b1:
  //SEG15 [6] (byte) plot::x#0 ← (byte) main::i#2 [ main::i#2 plot::x#0 ] ( main:2 [ main::i#2 plot::x#0 ] )
    // (byte) plot::x#0 = (byte) main::i#2  // register copy reg byte x
  //SEG16 [7] call plot param-assignment [ main::i#2 ] ( main:2 [ main::i#2 ] )
  //SEG17 [21] phi from main::@1 to plot [phi:main::@1->plot]
  plot_from_b1:
  //SEG18 [21] phi (byte) plot::x#3 = (byte) plot::x#0 [phi:main::@1->plot#0] -- register_copy 
    jsr plot
    jmp b7
  //SEG19 main::@7
  b7:
  //SEG20 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG21 [9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne b1_from_b7
  //SEG22 [10] phi from main::@7 to main::@2 [phi:main::@7->main::@2]
  b2_from_b7:
  //SEG23 [10] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@7->main::@2#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b2
  //SEG24 [10] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  b2_from_b8:
  //SEG25 [10] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@8->main::@2#0] -- register_copy 
    jmp b2
  //SEG26 main::@2
  b2:
  //SEG27 [11] (byte) plot::x#1 ← (byte) main::j#2 [ main::j#2 plot::x#1 ] ( main:2 [ main::j#2 plot::x#1 ] )
    // (byte) plot::x#1 = (byte) main::j#2  // register copy reg byte x
  //SEG28 [12] call plot param-assignment [ main::j#2 ] ( main:2 [ main::j#2 ] )
  //SEG29 [21] phi from main::@2 to plot [phi:main::@2->plot]
  plot_from_b2:
  //SEG30 [21] phi (byte) plot::x#3 = (byte) plot::x#1 [phi:main::@2->plot#0] -- register_copy 
    jsr plot
    jmp b8
  //SEG31 main::@8
  b8:
  //SEG32 [13] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG33 [14] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne b2_from_b8
  //SEG34 [15] phi from main::@8 to main::@3 [phi:main::@8->main::@3]
  b3_from_b8:
  //SEG35 [15] phi (byte) main::k#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@8->main::@3#0] -- vbuxx=vbuc1 
    ldx #0
    jmp b3
  //SEG36 [15] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
  b3_from_b9:
  //SEG37 [15] phi (byte) main::k#2 = (byte) main::k#1 [phi:main::@9->main::@3#0] -- register_copy 
    jmp b3
  //SEG38 main::@3
  b3:
  //SEG39 [16] (byte) plot::x#2 ← (byte) main::k#2 [ main::k#2 plot::x#2 ] ( main:2 [ main::k#2 plot::x#2 ] )
    // (byte) plot::x#2 = (byte) main::k#2  // register copy reg byte x
  //SEG40 [17] call plot param-assignment [ main::k#2 ] ( main:2 [ main::k#2 ] )
  //SEG41 [21] phi from main::@3 to plot [phi:main::@3->plot]
  plot_from_b3:
  //SEG42 [21] phi (byte) plot::x#3 = (byte) plot::x#2 [phi:main::@3->plot#0] -- register_copy 
    jsr plot
    jmp b9
  //SEG43 main::@9
  b9:
  //SEG44 [18] (byte) main::k#1 ← ++ (byte) main::k#2 [ main::k#1 ] ( main:2 [ main::k#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG45 [19] if((byte) main::k#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 [ main::k#1 ] ( main:2 [ main::k#1 ] ) -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne b3_from_b9
    jmp breturn
  //SEG46 main::@return
  breturn:
  //SEG47 [20] return  [ ] ( main:2 [ ] )
    rts
}
//SEG48 plot
plot: {
  //SEG49 [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] ) -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta SCREEN,x
    jmp breturn
  //SEG50 plot::@return
  breturn:
  //SEG51 [23] return  [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] )
    rts
}

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b2
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b7
Removing instruction jmp b2
Removing instruction jmp b8
Removing instruction jmp b3
Removing instruction jmp b9
Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b7 with b1
Replacing label b2_from_b8 with b2
Replacing label b3_from_b9 with b3
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_b7:
Removing instruction b2_from_b8:
Removing instruction b3_from_b9:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction plot_from_b1:
Removing instruction b7:
Removing instruction b2_from_b7:
Removing instruction plot_from_b2:
Removing instruction b8:
Removing instruction b3_from_b8:
Removing instruction plot_from_b3:
Removing instruction b9:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
(label) @2
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 11.0
(byte) main::j
(byte) main::j#1 reg byte x 16.5
(byte) main::j#2 reg byte x 11.0
(byte) main::k
(byte) main::k#1 reg byte x 16.5
(byte) main::k#2 reg byte x 11.0
(void()) plot((byte) plot::x)
(label) plot::@return
(byte) plot::x
(byte) plot::x#0 reg byte x 22.0
(byte) plot::x#1 reg byte x 22.0
(byte) plot::x#2 reg byte x 22.0
(byte) plot::x#3 reg byte x 35.0

reg byte x [ main::i#2 main::i#1 ]
reg byte x [ main::j#2 main::j#1 ]
reg byte x [ main::k#2 main::k#1 ]
reg byte x [ plot::x#3 plot::x#0 plot::x#1 plot::x#2 ]


FINAL ASSEMBLER
Score: 298

//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG1 Global Constants & labels
  .label SCREEN = $400
//SEG2 @begin
//SEG3 [1] phi from @begin to @2 [phi:@begin->@2]
//SEG4 @2
//SEG5 [2] call main param-assignment [ ] ( )
//SEG6 [4] phi from @2 to main [phi:@2->main]
  jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main
main: {
  //SEG10 [5] phi from main to main::@1 [phi:main->main::@1]
  //SEG11 [5] phi (byte) main::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG12 [5] phi from main::@7 to main::@1 [phi:main::@7->main::@1]
  //SEG13 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@7->main::@1#0] -- register_copy 
  //SEG14 main::@1
  b1:
  //SEG15 [6] (byte) plot::x#0 ← (byte) main::i#2 [ main::i#2 plot::x#0 ] ( main:2 [ main::i#2 plot::x#0 ] )
    // (byte) plot::x#0 = (byte) main::i#2  // register copy reg byte x
  //SEG16 [7] call plot param-assignment [ main::i#2 ] ( main:2 [ main::i#2 ] )
  //SEG17 [21] phi from main::@1 to plot [phi:main::@1->plot]
  //SEG18 [21] phi (byte) plot::x#3 = (byte) plot::x#0 [phi:main::@1->plot#0] -- register_copy 
    jsr plot
  //SEG19 main::@7
  //SEG20 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG21 [9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 [ main::i#1 ] ( main:2 [ main::i#1 ] ) -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne b1
  //SEG22 [10] phi from main::@7 to main::@2 [phi:main::@7->main::@2]
  //SEG23 [10] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@7->main::@2#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG24 [10] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  //SEG25 [10] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@8->main::@2#0] -- register_copy 
  //SEG26 main::@2
  b2:
  //SEG27 [11] (byte) plot::x#1 ← (byte) main::j#2 [ main::j#2 plot::x#1 ] ( main:2 [ main::j#2 plot::x#1 ] )
    // (byte) plot::x#1 = (byte) main::j#2  // register copy reg byte x
  //SEG28 [12] call plot param-assignment [ main::j#2 ] ( main:2 [ main::j#2 ] )
  //SEG29 [21] phi from main::@2 to plot [phi:main::@2->plot]
  //SEG30 [21] phi (byte) plot::x#3 = (byte) plot::x#1 [phi:main::@2->plot#0] -- register_copy 
    jsr plot
  //SEG31 main::@8
  //SEG32 [13] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG33 [14] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne b2
  //SEG34 [15] phi from main::@8 to main::@3 [phi:main::@8->main::@3]
  //SEG35 [15] phi (byte) main::k#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@8->main::@3#0] -- vbuxx=vbuc1 
    ldx #0
  //SEG36 [15] phi from main::@9 to main::@3 [phi:main::@9->main::@3]
  //SEG37 [15] phi (byte) main::k#2 = (byte) main::k#1 [phi:main::@9->main::@3#0] -- register_copy 
  //SEG38 main::@3
  b3:
  //SEG39 [16] (byte) plot::x#2 ← (byte) main::k#2 [ main::k#2 plot::x#2 ] ( main:2 [ main::k#2 plot::x#2 ] )
    // (byte) plot::x#2 = (byte) main::k#2  // register copy reg byte x
  //SEG40 [17] call plot param-assignment [ main::k#2 ] ( main:2 [ main::k#2 ] )
  //SEG41 [21] phi from main::@3 to plot [phi:main::@3->plot]
  //SEG42 [21] phi (byte) plot::x#3 = (byte) plot::x#2 [phi:main::@3->plot#0] -- register_copy 
    jsr plot
  //SEG43 main::@9
  //SEG44 [18] (byte) main::k#1 ← ++ (byte) main::k#2 [ main::k#1 ] ( main:2 [ main::k#1 ] ) -- vbuxx=_inc_vbuxx 
    inx
  //SEG45 [19] if((byte) main::k#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 [ main::k#1 ] ( main:2 [ main::k#1 ] ) -- vbuxx_neq_vbuc1_then_la1 
    cpx #$b
    bne b3
  //SEG46 main::@return
  //SEG47 [20] return  [ ] ( main:2 [ ] )
    rts
}
//SEG48 plot
plot: {
  //SEG49 [22] *((const byte*) SCREEN#0 + (byte) plot::x#3) ← (byte) '*' [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] ) -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #'*'
    sta SCREEN,x
  //SEG50 plot::@return
  //SEG51 [23] return  [ ] ( main:2::plot:7 [ main::i#2 ] main:2::plot:12 [ main::j#2 ] main:2::plot:17 [ main::k#2 ] )
    rts
}

