Identified constant variable (byte*) rvalue::screen2
Identified constant variable (byte) lvaluevar::b
Identified constant variable (byte*) rvaluevar::screen2
Culled Empty Block (label) @1
Culled Empty Block (label) lvalue::@4
Culled Empty Block (label) lvalue::@3
Culled Empty Block (label) lvalue::@5
Culled Empty Block (label) lvalue::@6
Culled Empty Block (label) @2
Culled Empty Block (label) rvalue::@4
Culled Empty Block (label) rvalue::@5
Culled Empty Block (label) rvalue::@6
Culled Empty Block (label) @3
Culled Empty Block (label) lvaluevar::@4
Culled Empty Block (label) lvaluevar::@3
Culled Empty Block (label) lvaluevar::@5
Culled Empty Block (label) lvaluevar::@6
Culled Empty Block (label) @4
Culled Empty Block (label) rvaluevar::@4
Culled Empty Block (label) rvaluevar::@5
Culled Empty Block (label) rvaluevar::@6

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@5
main: scope:[main]  from @5
  call lvalue 
  to:main::@1
main::@1: scope:[main]  from main
  call rvalue 
  to:main::@2
main::@2: scope:[main]  from main::@1
  call rvaluevar 
  to:main::@3
main::@3: scope:[main]  from main::@2
  call lvaluevar 
  to:main::@4
main::@4: scope:[main]  from main::@3
  to:main::@return
main::@return: scope:[main]  from main::@4
  return 
  to:@return
lvalue: scope:[lvalue]  from main
  (byte[$400]) lvalue::SCREEN#0 ← ((byte[$400])) (number) $400
  *((byte[$400]) lvalue::SCREEN#0) ← (number) 1
  *((byte[$400]) lvalue::SCREEN#0 + (number) 1) ← (number) 2
  (byte) lvalue::i#0 ← (number) 2
  to:lvalue::@1
lvalue::@1: scope:[lvalue]  from lvalue lvalue::@2
  (byte) lvalue::i#2 ← phi( lvalue/(byte) lvalue::i#0 lvalue::@2/(byte) lvalue::i#1 )
  (bool~) lvalue::$0 ← (byte) lvalue::i#2 < (number) $a
  if((bool~) lvalue::$0) goto lvalue::@2
  to:lvalue::@return
lvalue::@2: scope:[lvalue]  from lvalue::@1
  (byte) lvalue::i#3 ← phi( lvalue::@1/(byte) lvalue::i#2 )
  *((byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#3) ← (number) 3
  (byte) lvalue::i#1 ← ++ (byte) lvalue::i#3
  to:lvalue::@1
lvalue::@return: scope:[lvalue]  from lvalue::@1
  return 
  to:@return
rvalue: scope:[rvalue]  from main::@1
  (byte[$400]) rvalue::SCREEN#0 ← ((byte[$400])) (number) $400
  (byte) rvalue::b#0 ← *((byte[$400]) rvalue::SCREEN#0)
  (byte) rvalue::b#1 ← *((byte[$400]) rvalue::SCREEN#0 + (number) 1)
  (byte) rvalue::i#0 ← (number) 2
  to:rvalue::@1
rvalue::@1: scope:[rvalue]  from rvalue rvalue::@2
  (byte) rvalue::b#4 ← phi( rvalue/(byte) rvalue::b#1 rvalue::@2/(byte) rvalue::b#2 )
  (byte) rvalue::i#2 ← phi( rvalue/(byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 )
  (bool~) rvalue::$0 ← (byte) rvalue::i#2 < (number) $a
  if((bool~) rvalue::$0) goto rvalue::@2
  to:rvalue::@3
rvalue::@2: scope:[rvalue]  from rvalue::@1
  (byte) rvalue::i#3 ← phi( rvalue::@1/(byte) rvalue::i#2 )
  (byte) rvalue::b#2 ← *((byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#3)
  (byte) rvalue::i#1 ← ++ (byte) rvalue::i#3
  to:rvalue::@1
rvalue::@3: scope:[rvalue]  from rvalue::@1
  (byte) rvalue::b#3 ← phi( rvalue::@1/(byte) rvalue::b#4 )
  (byte*) rvalue::screen2#0 ← ((byte*)) (number) $400
  *((byte*) rvalue::screen2#0) ← (byte) rvalue::b#3
  to:rvalue::@return
rvalue::@return: scope:[rvalue]  from rvalue::@3
  return 
  to:@return
lvaluevar: scope:[lvaluevar]  from main::@3
  (byte*) lvaluevar::screen#0 ← ((byte*)) (number) $400
  (byte) lvaluevar::b#0 ← (number) 4
  (byte) lvaluevar::i#0 ← (number) 2
  to:lvaluevar::@1
lvaluevar::@1: scope:[lvaluevar]  from lvaluevar lvaluevar::@2
  (byte*) lvaluevar::screen#3 ← phi( lvaluevar/(byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 )
  (byte) lvaluevar::i#2 ← phi( lvaluevar/(byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 )
  (bool~) lvaluevar::$0 ← (byte) lvaluevar::i#2 < (number) $a
  if((bool~) lvaluevar::$0) goto lvaluevar::@2
  to:lvaluevar::@return
lvaluevar::@2: scope:[lvaluevar]  from lvaluevar::@1
  (byte) lvaluevar::i#3 ← phi( lvaluevar::@1/(byte) lvaluevar::i#2 )
  (byte*) lvaluevar::screen#2 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#3 )
  *((byte*) lvaluevar::screen#2) ← (byte) lvaluevar::b#0
  (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2
  (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#3
  to:lvaluevar::@1
lvaluevar::@return: scope:[lvaluevar]  from lvaluevar::@1
  return 
  to:@return
rvaluevar: scope:[rvaluevar]  from main::@2
  (byte*) rvaluevar::screen#0 ← ((byte*)) (number) $400
  (byte) rvaluevar::b#0 ← (byte) 0
  (byte) rvaluevar::i#0 ← (number) 2
  to:rvaluevar::@1
rvaluevar::@1: scope:[rvaluevar]  from rvaluevar rvaluevar::@2
  (byte) rvaluevar::b#3 ← phi( rvaluevar/(byte) rvaluevar::b#0 rvaluevar::@2/(byte) rvaluevar::b#1 )
  (byte*) rvaluevar::screen#3 ← phi( rvaluevar/(byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 )
  (byte) rvaluevar::i#2 ← phi( rvaluevar/(byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 )
  (bool~) rvaluevar::$0 ← (byte) rvaluevar::i#2 < (number) $a
  if((bool~) rvaluevar::$0) goto rvaluevar::@2
  to:rvaluevar::@3
rvaluevar::@2: scope:[rvaluevar]  from rvaluevar::@1
  (byte) rvaluevar::i#3 ← phi( rvaluevar::@1/(byte) rvaluevar::i#2 )
  (byte*) rvaluevar::screen#2 ← phi( rvaluevar::@1/(byte*) rvaluevar::screen#3 )
  (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#2)
  (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2
  (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#3
  to:rvaluevar::@1
rvaluevar::@3: scope:[rvaluevar]  from rvaluevar::@1
  (byte) rvaluevar::b#2 ← phi( rvaluevar::@1/(byte) rvaluevar::b#3 )
  (byte*) rvaluevar::screen2#0 ← ((byte*)) (number) $400
  *((byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#2
  to:rvaluevar::@return
rvaluevar::@return: scope:[rvaluevar]  from rvaluevar::@3
  return 
  to:@return
@5: scope:[]  from @begin
  call main 
  to:@6
@6: scope:[]  from @5
  to:@end
@end: scope:[]  from @6

SYMBOL TABLE SSA
(label) @5
(label) @6
(label) @begin
(label) @end
(void()) lvalue()
(bool~) lvalue::$0
(label) lvalue::@1
(label) lvalue::@2
(label) lvalue::@return
(byte[$400]) lvalue::SCREEN
(byte[$400]) lvalue::SCREEN#0
(byte) lvalue::i
(byte) lvalue::i#0
(byte) lvalue::i#1
(byte) lvalue::i#2
(byte) lvalue::i#3
(void()) lvaluevar()
(bool~) lvaluevar::$0
(label) lvaluevar::@1
(label) lvaluevar::@2
(label) lvaluevar::@return
(byte) lvaluevar::b
(byte) lvaluevar::b#0
(byte) lvaluevar::i
(byte) lvaluevar::i#0
(byte) lvaluevar::i#1
(byte) lvaluevar::i#2
(byte) lvaluevar::i#3
(byte*) lvaluevar::screen
(byte*) lvaluevar::screen#0
(byte*) lvaluevar::screen#1
(byte*) lvaluevar::screen#2
(byte*) lvaluevar::screen#3
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@return
(void()) rvalue()
(bool~) rvalue::$0
(label) rvalue::@1
(label) rvalue::@2
(label) rvalue::@3
(label) rvalue::@return
(byte[$400]) rvalue::SCREEN
(byte[$400]) rvalue::SCREEN#0
(byte) rvalue::b
(byte) rvalue::b#0
(byte) rvalue::b#1
(byte) rvalue::b#2
(byte) rvalue::b#3
(byte) rvalue::b#4
(byte) rvalue::i
(byte) rvalue::i#0
(byte) rvalue::i#1
(byte) rvalue::i#2
(byte) rvalue::i#3
(byte*) rvalue::screen2
(byte*) rvalue::screen2#0
(void()) rvaluevar()
(bool~) rvaluevar::$0
(label) rvaluevar::@1
(label) rvaluevar::@2
(label) rvaluevar::@3
(label) rvaluevar::@return
(byte) rvaluevar::b
(byte) rvaluevar::b#0
(byte) rvaluevar::b#1
(byte) rvaluevar::b#2
(byte) rvaluevar::b#3
(byte) rvaluevar::i
(byte) rvaluevar::i#0
(byte) rvaluevar::i#1
(byte) rvaluevar::i#2
(byte) rvaluevar::i#3
(byte*) rvaluevar::screen
(byte*) rvaluevar::screen#0
(byte*) rvaluevar::screen#1
(byte*) rvaluevar::screen#2
(byte*) rvaluevar::screen#3
(byte*) rvaluevar::screen2
(byte*) rvaluevar::screen2#0

Adding number conversion cast (unumber) 1 in *((byte[$400]) lvalue::SCREEN#0) ← (number) 1
Adding number conversion cast (unumber) 2 in *((byte[$400]) lvalue::SCREEN#0 + (number) 1) ← (number) 2
Adding number conversion cast (unumber) 1 in *((byte[$400]) lvalue::SCREEN#0 + (number) 1) ← ((unumber)) (number) 2
Adding number conversion cast (unumber) 2 in (byte) lvalue::i#0 ← (number) 2
Adding number conversion cast (unumber) $a in (bool~) lvalue::$0 ← (byte) lvalue::i#2 < (number) $a
Adding number conversion cast (unumber) 3 in *((byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#3) ← (number) 3
Adding number conversion cast (unumber) 1 in (byte) rvalue::b#1 ← *((byte[$400]) rvalue::SCREEN#0 + (number) 1)
Adding number conversion cast (unumber) 2 in (byte) rvalue::i#0 ← (number) 2
Adding number conversion cast (unumber) $a in (bool~) rvalue::$0 ← (byte) rvalue::i#2 < (number) $a
Adding number conversion cast (unumber) 4 in (byte) lvaluevar::b#0 ← (number) 4
Adding number conversion cast (unumber) 2 in (byte) lvaluevar::i#0 ← (number) 2
Adding number conversion cast (unumber) $a in (bool~) lvaluevar::$0 ← (byte) lvaluevar::i#2 < (number) $a
Adding number conversion cast (unumber) 2 in (byte) rvaluevar::i#0 ← (number) 2
Adding number conversion cast (unumber) $a in (bool~) rvaluevar::$0 ← (byte) rvaluevar::i#2 < (number) $a
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte[$400]) lvalue::SCREEN#0 ← (byte[$400])(number) $400
Inlining cast *((byte[$400]) lvalue::SCREEN#0) ← (unumber)(number) 1
Inlining cast *((byte[$400]) lvalue::SCREEN#0 + (unumber)(number) 1) ← (unumber)(number) 2
Inlining cast (byte) lvalue::i#0 ← (unumber)(number) 2
Inlining cast *((byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#3) ← (unumber)(number) 3
Inlining cast (byte[$400]) rvalue::SCREEN#0 ← (byte[$400])(number) $400
Inlining cast (byte) rvalue::i#0 ← (unumber)(number) 2
Inlining cast (byte*) rvalue::screen2#0 ← (byte*)(number) $400
Inlining cast (byte*) lvaluevar::screen#0 ← (byte*)(number) $400
Inlining cast (byte) lvaluevar::b#0 ← (unumber)(number) 4
Inlining cast (byte) lvaluevar::i#0 ← (unumber)(number) 2
Inlining cast (byte*) rvaluevar::screen#0 ← (byte*)(number) $400
Inlining cast (byte) rvaluevar::i#0 ← (unumber)(number) 2
Inlining cast (byte*) rvaluevar::screen2#0 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast $a
Simplifying constant integer cast 3
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast $a
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 4
Simplifying constant integer cast 2
Simplifying constant integer cast $a
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 2
Simplifying constant integer cast $a
Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) $a
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) lvalue::i#2 = (byte) lvalue::i#3 
Alias (byte) rvalue::i#2 = (byte) rvalue::i#3 
Alias (byte) rvalue::b#3 = (byte) rvalue::b#4 
Alias (byte*) lvaluevar::screen#2 = (byte*) lvaluevar::screen#3 
Alias (byte) lvaluevar::i#2 = (byte) lvaluevar::i#3 
Alias (byte*) rvaluevar::screen#2 = (byte*) rvaluevar::screen#3 
Alias (byte) rvaluevar::i#2 = (byte) rvaluevar::i#3 
Alias (byte) rvaluevar::b#2 = (byte) rvaluevar::b#3 
Successful SSA optimization Pass2AliasElimination
Simple Condition (bool~) lvalue::$0 [11] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2
Simple Condition (bool~) rvalue::$0 [22] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2
Simple Condition (bool~) lvaluevar::$0 [35] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2
Simple Condition (bool~) rvaluevar::$0 [46] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte[$400]) lvalue::SCREEN#0 = (byte*) 1024
Constant (const byte) lvalue::i#0 = 2
Constant (const byte[$400]) rvalue::SCREEN#0 = (byte*) 1024
Constant (const byte) rvalue::i#0 = 2
Constant (const byte*) rvalue::screen2#0 = (byte*) 1024
Constant (const byte*) lvaluevar::screen#0 = (byte*) 1024
Constant (const byte) lvaluevar::b#0 = 4
Constant (const byte) lvaluevar::i#0 = 2
Constant (const byte*) rvaluevar::screen#0 = (byte*) 1024
Constant (const byte) rvaluevar::b#0 = 0
Constant (const byte) rvaluevar::i#0 = 2
Constant (const byte*) rvaluevar::screen2#0 = (byte*) 1024
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused variable (byte) rvalue::b#0 and assignment [12] (byte) rvalue::b#0 ← *((const byte[$400]) rvalue::SCREEN#0)
Successful SSA optimization PassNEliminateUnusedVars
Successful SSA optimization Pass2LoopHeadConstantIdentification
Successful SSA optimization Pass2LoopHeadConstantIdentification
Successful SSA optimization Pass2LoopHeadConstantIdentification
Successful SSA optimization Pass2LoopHeadConstantIdentification
Alias (byte) lvalue::i#1 = (byte) lvalue::i#2 
Alias (byte) rvalue::i#1 = (byte) rvalue::i#2 
Alias (byte) rvalue::b#2 = (byte) rvalue::b#3 
Alias (byte) lvaluevar::i#1 = (byte) lvaluevar::i#2 
Alias (byte*) lvaluevar::screen#1 = (byte*) lvaluevar::screen#2 
Alias (byte) rvaluevar::i#1 = (byte) rvaluevar::i#2 
Alias (byte*) rvaluevar::screen#1 = (byte*) rvaluevar::screen#2 
Alias (byte) rvaluevar::b#1 = (byte) rvaluevar::b#2 
Alias (byte) rvalue::b#1 = (byte) rvalue::b#6 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) lvalue::i#5 (const byte) lvalue::i#0
Identical Phi Values (byte) rvalue::i#5 (const byte) rvalue::i#0
Identical Phi Values (byte) lvaluevar::i#5 (const byte) lvaluevar::i#0
Identical Phi Values (byte*) lvaluevar::screen#5 (const byte*) lvaluevar::screen#0
Identical Phi Values (byte) rvaluevar::i#5 (const byte) rvaluevar::i#0
Identical Phi Values (byte*) rvaluevar::screen#5 (const byte*) rvaluevar::screen#0
Identical Phi Values (byte) rvaluevar::b#5 (const byte) rvaluevar::b#0
Successful SSA optimization Pass2IdenticalPhiElimination
if() condition always true - replacing block destination [42] if((const byte) lvalue::i#0<(byte) $a) goto lvalue::@2
Removing PHI-reference to removed block (rvalue::@1_1) in block rvalue::@3
if() condition always true - replacing block destination [44] if((const byte) rvalue::i#0<(byte) $a) goto rvalue::@2
if() condition always true - replacing block destination [46] if((const byte) lvaluevar::i#0<(byte) $a) goto lvaluevar::@2
Removing PHI-reference to removed block (rvaluevar::@1_1) in block rvaluevar::@3
if() condition always true - replacing block destination [48] if((const byte) rvaluevar::i#0<(byte) $a) goto rvaluevar::@2
Successful SSA optimization Pass2ConstantIfs
Eliminating unused variable (byte) rvalue::b#1 and assignment [12] (byte) rvalue::b#1 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) 1)
Eliminating unused constant (const byte) rvaluevar::b#0
Successful SSA optimization PassNEliminateUnusedVars
Alias (byte) rvalue::b#2 = (byte) rvalue::b#5 
Alias (byte) rvaluevar::b#1 = (byte) rvaluevar::b#4 
Successful SSA optimization Pass2AliasElimination
Inlining constant with var siblings (const byte) lvalue::i#0
Inlining constant with var siblings (const byte) rvalue::i#0
Inlining constant with var siblings (const byte*) lvaluevar::screen#0
Inlining constant with var siblings (const byte) lvaluevar::i#0
Inlining constant with var siblings (const byte*) rvaluevar::screen#0
Inlining constant with var siblings (const byte) rvaluevar::i#0
Constant inlined lvalue::i#0 = (byte) 2
Constant inlined rvaluevar::screen#0 = (byte*) 1024
Constant inlined rvalue::i#0 = (byte) 2
Constant inlined lvaluevar::i#0 = (byte) 2
Constant inlined lvaluevar::screen#0 = (byte*) 1024
Constant inlined rvaluevar::i#0 = (byte) 2
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(lvalue::SCREEN#0+1)
Successful SSA optimization Pass2ConstantAdditionElimination
Added new block during phi lifting lvalue::@7(between lvalue::@1 and lvalue::@2)
Added new block during phi lifting rvalue::@7(between rvalue::@1 and rvalue::@2)
Added new block during phi lifting lvaluevar::@7(between lvaluevar::@1 and lvaluevar::@2)
Added new block during phi lifting rvaluevar::@7(between rvaluevar::@1 and rvaluevar::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of lvaluevar
Adding NOP phi() at start of lvaluevar::@1_1
Adding NOP phi() at start of rvaluevar
Adding NOP phi() at start of rvaluevar::@1_1
Adding NOP phi() at start of rvalue
Adding NOP phi() at start of rvalue::@1_1
Adding NOP phi() at start of lvalue::@1_1
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to lvalue:6 rvalue:8 rvaluevar:10 lvaluevar:12 

Created 6 initial phi equivalence classes
Coalesced [23] lvaluevar::i#6 ← lvaluevar::i#1
Coalesced [24] lvaluevar::screen#6 ← lvaluevar::screen#1
Coalesced [34] rvaluevar::i#6 ← rvaluevar::i#1
Coalesced [35] rvaluevar::screen#6 ← rvaluevar::screen#1
Coalesced [44] rvalue::i#6 ← rvalue::i#1
Coalesced [53] lvalue::i#6 ← lvalue::i#1
Coalesced down to 6 phi equivalence classes
Culled Empty Block (label) @6
Culled Empty Block (label) main::@4
Culled Empty Block (label) lvaluevar::@1_1
Culled Empty Block (label) lvaluevar::@7
Culled Empty Block (label) rvaluevar::@1_1
Culled Empty Block (label) rvaluevar::@7
Culled Empty Block (label) rvalue::@1_1
Culled Empty Block (label) rvalue::@7
Culled Empty Block (label) lvalue::@1_1
Culled Empty Block (label) lvalue::@7
Renumbering block @5 to @1
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of lvaluevar
Adding NOP phi() at start of rvaluevar
Adding NOP phi() at start of rvalue

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()
main: scope:[main]  from @1
  [4] phi()
  [5] call lvalue 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call rvalue 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [8] phi()
  [9] call rvaluevar 
  to:main::@3
main::@3: scope:[main]  from main::@2
  [10] phi()
  [11] call lvaluevar 
  to:main::@return
main::@return: scope:[main]  from main::@3
  [12] return 
  to:@return
lvaluevar: scope:[lvaluevar]  from main::@3
  [13] phi()
  to:lvaluevar::@2
lvaluevar::@2: scope:[lvaluevar]  from lvaluevar lvaluevar::@1
  [14] (byte*) lvaluevar::screen#4 ← phi( lvaluevar::@1/(byte*) lvaluevar::screen#1 lvaluevar/(byte*) 1024 )
  [14] (byte) lvaluevar::i#4 ← phi( lvaluevar::@1/(byte) lvaluevar::i#1 lvaluevar/(byte) 2 )
  [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0
  [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4
  [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4
  to:lvaluevar::@1
lvaluevar::@1: scope:[lvaluevar]  from lvaluevar::@2
  [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2
  to:lvaluevar::@return
lvaluevar::@return: scope:[lvaluevar]  from lvaluevar::@1
  [19] return 
  to:@return
rvaluevar: scope:[rvaluevar]  from main::@2
  [20] phi()
  to:rvaluevar::@2
rvaluevar::@2: scope:[rvaluevar]  from rvaluevar rvaluevar::@1
  [21] (byte*) rvaluevar::screen#4 ← phi( rvaluevar::@1/(byte*) rvaluevar::screen#1 rvaluevar/(byte*) 1024 )
  [21] (byte) rvaluevar::i#4 ← phi( rvaluevar::@1/(byte) rvaluevar::i#1 rvaluevar/(byte) 2 )
  [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4)
  [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4
  [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4
  to:rvaluevar::@1
rvaluevar::@1: scope:[rvaluevar]  from rvaluevar::@2
  [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2
  to:rvaluevar::@3
rvaluevar::@3: scope:[rvaluevar]  from rvaluevar::@1
  [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1
  to:rvaluevar::@return
rvaluevar::@return: scope:[rvaluevar]  from rvaluevar::@3
  [27] return 
  to:@return
rvalue: scope:[rvalue]  from main::@1
  [28] phi()
  to:rvalue::@2
rvalue::@2: scope:[rvalue]  from rvalue rvalue::@1
  [29] (byte) rvalue::i#4 ← phi( rvalue::@1/(byte) rvalue::i#1 rvalue/(byte) 2 )
  [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4)
  [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4
  to:rvalue::@1
rvalue::@1: scope:[rvalue]  from rvalue::@2
  [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2
  to:rvalue::@3
rvalue::@3: scope:[rvalue]  from rvalue::@1
  [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2
  to:rvalue::@return
rvalue::@return: scope:[rvalue]  from rvalue::@3
  [34] return 
  to:@return
lvalue: scope:[lvalue]  from main
  [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1
  [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2
  to:lvalue::@2
lvalue::@2: scope:[lvalue]  from lvalue lvalue::@1
  [37] (byte) lvalue::i#4 ← phi( lvalue::@1/(byte) lvalue::i#1 lvalue/(byte) 2 )
  [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3
  [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4
  to:lvalue::@1
lvalue::@1: scope:[lvalue]  from lvalue::@2
  [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2
  to:lvalue::@return
lvalue::@return: scope:[lvalue]  from lvalue::@1
  [41] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) lvalue()
(byte[$400]) lvalue::SCREEN
(byte) lvalue::i
(byte) lvalue::i#1 16.5
(byte) lvalue::i#4 16.5
(void()) lvaluevar()
(byte) lvaluevar::b
(byte) lvaluevar::i
(byte) lvaluevar::i#1 16.5
(byte) lvaluevar::i#4 7.333333333333333
(byte*) lvaluevar::screen
(byte*) lvaluevar::screen#1 7.333333333333333
(byte*) lvaluevar::screen#4 16.5
(void()) main()
(void()) rvalue()
(byte[$400]) rvalue::SCREEN
(byte) rvalue::b
(byte) rvalue::b#2 4.333333333333333
(byte) rvalue::i
(byte) rvalue::i#1 16.5
(byte) rvalue::i#4 16.5
(byte*) rvalue::screen2
(void()) rvaluevar()
(byte) rvaluevar::b
(byte) rvaluevar::b#1 3.25
(byte) rvaluevar::i
(byte) rvaluevar::i#1 16.5
(byte) rvaluevar::i#4 7.333333333333333
(byte*) rvaluevar::screen
(byte*) rvaluevar::screen#1 7.333333333333333
(byte*) rvaluevar::screen#4 16.5
(byte*) rvaluevar::screen2

Initial phi equivalence classes
[ lvaluevar::i#4 lvaluevar::i#1 ]
[ lvaluevar::screen#4 lvaluevar::screen#1 ]
[ rvaluevar::i#4 rvaluevar::i#1 ]
[ rvaluevar::screen#4 rvaluevar::screen#1 ]
[ rvalue::i#4 rvalue::i#1 ]
[ lvalue::i#4 lvalue::i#1 ]
Added variable rvaluevar::b#1 to zero page equivalence class [ rvaluevar::b#1 ]
Added variable rvalue::b#2 to zero page equivalence class [ rvalue::b#2 ]
Complete equivalence classes
[ lvaluevar::i#4 lvaluevar::i#1 ]
[ lvaluevar::screen#4 lvaluevar::screen#1 ]
[ rvaluevar::i#4 rvaluevar::i#1 ]
[ rvaluevar::screen#4 rvaluevar::screen#1 ]
[ rvalue::i#4 rvalue::i#1 ]
[ lvalue::i#4 lvalue::i#1 ]
[ rvaluevar::b#1 ]
[ rvalue::b#2 ]
Allocated zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ]
Allocated zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ]
Allocated zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ]
Allocated zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ]
Allocated zp ZP_BYTE:8 [ rvalue::i#4 rvalue::i#1 ]
Allocated zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ]
Allocated zp ZP_BYTE:10 [ rvaluevar::b#1 ]
Allocated zp ZP_BYTE:11 [ rvalue::b#2 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
// Test all types of pointers
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // [5] call lvalue 
    jsr lvalue
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
    // main::@1
  b1:
    // [7] call rvalue 
    // [28] phi from main::@1 to rvalue [phi:main::@1->rvalue]
  rvalue_from_b1:
    jsr rvalue
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [9] call rvaluevar 
    // [20] phi from main::@2 to rvaluevar [phi:main::@2->rvaluevar]
  rvaluevar_from_b2:
    jsr rvaluevar
    // [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
    jmp b3
    // main::@3
  b3:
    // [11] call lvaluevar 
    // [13] phi from main::@3 to lvaluevar [phi:main::@3->lvaluevar]
  lvaluevar_from_b3:
    jsr lvaluevar
    jmp breturn
    // main::@return
  breturn:
    // [12] return 
    rts
}
  // lvaluevar
lvaluevar: {
    // LValue Variable pointer dereference
    .const b = 4
    .label screen = 3
    .label i = 2
    // [14] phi from lvaluevar to lvaluevar::@2 [phi:lvaluevar->lvaluevar::@2]
  b2_from_lvaluevar:
    // [14] phi (byte*) lvaluevar::screen#4 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@2#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [14] phi (byte) lvaluevar::i#4 = (byte) 2 [phi:lvaluevar->lvaluevar::@2#1] -- vbuz1=vbuc1 
    lda #2
    sta.z i
    jmp b2
    // [14] phi from lvaluevar::@1 to lvaluevar::@2 [phi:lvaluevar::@1->lvaluevar::@2]
  b2_from_b1:
    // [14] phi (byte*) lvaluevar::screen#4 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@1->lvaluevar::@2#0] -- register_copy 
    // [14] phi (byte) lvaluevar::i#4 = (byte) lvaluevar::i#1 [phi:lvaluevar::@1->lvaluevar::@2#1] -- register_copy 
    jmp b2
    // lvaluevar::@2
  b2:
    // [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 
    lda #b
    ldy #0
    sta (screen),y
    // [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 -- vbuz1=_inc_vbuz1 
    inc.z i
    jmp b1
    // lvaluevar::@1
  b1:
    // [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #$a
    bcc b2_from_b1
    jmp breturn
    // lvaluevar::@return
  breturn:
    // [19] return 
    rts
}
  // rvaluevar
rvaluevar: {
    .label screen2 = $400
    .label b = $a
    .label screen = 6
    .label i = 5
    // [21] phi from rvaluevar to rvaluevar::@2 [phi:rvaluevar->rvaluevar::@2]
  b2_from_rvaluevar:
    // [21] phi (byte*) rvaluevar::screen#4 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@2#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [21] phi (byte) rvaluevar::i#4 = (byte) 2 [phi:rvaluevar->rvaluevar::@2#1] -- vbuz1=vbuc1 
    lda #2
    sta.z i
    jmp b2
    // [21] phi from rvaluevar::@1 to rvaluevar::@2 [phi:rvaluevar::@1->rvaluevar::@2]
  b2_from_b1:
    // [21] phi (byte*) rvaluevar::screen#4 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@1->rvaluevar::@2#0] -- register_copy 
    // [21] phi (byte) rvaluevar::i#4 = (byte) rvaluevar::i#1 [phi:rvaluevar::@1->rvaluevar::@2#1] -- register_copy 
    jmp b2
    // rvaluevar::@2
  b2:
    // [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) -- vbuz1=_deref_pbuz2 
    ldy #0
    lda (screen),y
    sta.z b
    // [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 -- vbuz1=_inc_vbuz1 
    inc.z i
    jmp b1
    // rvaluevar::@1
  b1:
    // [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #$a
    bcc b2_from_b1
    jmp b3
    // rvaluevar::@3
  b3:
    // [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 -- _deref_pbuc1=vbuz1 
    lda.z b
    sta screen2
    jmp breturn
    // rvaluevar::@return
  breturn:
    // [27] return 
    rts
}
  // rvalue
rvalue: {
    // A constant pointer
    .label SCREEN = $400
    .label screen2 = $400
    .label b = $b
    .label i = 8
    // [29] phi from rvalue to rvalue::@2 [phi:rvalue->rvalue::@2]
  b2_from_rvalue:
    // [29] phi (byte) rvalue::i#4 = (byte) 2 [phi:rvalue->rvalue::@2#0] -- vbuz1=vbuc1 
    lda #2
    sta.z i
    jmp b2
    // [29] phi from rvalue::@1 to rvalue::@2 [phi:rvalue::@1->rvalue::@2]
  b2_from_b1:
    // [29] phi (byte) rvalue::i#4 = (byte) rvalue::i#1 [phi:rvalue::@1->rvalue::@2#0] -- register_copy 
    jmp b2
    // rvalue::@2
  b2:
    // [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z i
    lda SCREEN,y
    sta.z b
    // [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 -- vbuz1=_inc_vbuz1 
    inc.z i
    jmp b1
    // rvalue::@1
  b1:
    // [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #$a
    bcc b2_from_b1
    jmp b3
    // rvalue::@3
  b3:
    // [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 -- _deref_pbuc1=vbuz1 
    lda.z b
    sta screen2
    jmp breturn
    // rvalue::@return
  breturn:
    // [34] return 
    rts
}
  // lvalue
lvalue: {
    // A constant pointer
    .label SCREEN = $400
    .label i = 9
    // [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    // LValue constant pointer dereference
    lda #1
    sta SCREEN
    // [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 -- _deref_pbuc1=vbuc2 
    // LValue constant array constant indexing
    lda #2
    sta SCREEN+1
    // [37] phi from lvalue to lvalue::@2 [phi:lvalue->lvalue::@2]
  b2_from_lvalue:
    // [37] phi (byte) lvalue::i#4 = (byte) 2 [phi:lvalue->lvalue::@2#0] -- vbuz1=vbuc1 
    lda #2
    sta.z i
    jmp b2
    // [37] phi from lvalue::@1 to lvalue::@2 [phi:lvalue::@1->lvalue::@2]
  b2_from_b1:
    // [37] phi (byte) lvalue::i#4 = (byte) lvalue::i#1 [phi:lvalue::@1->lvalue::@2#0] -- register_copy 
    jmp b2
    // lvalue::@2
  b2:
    // [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #3
    ldy.z i
    sta SCREEN,y
    // [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 -- vbuz1=_inc_vbuz1 
    inc.z i
    jmp b1
    // lvalue::@1
  b1:
    // [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #$a
    bcc b2_from_b1
    jmp breturn
    // lvalue::@return
  breturn:
    // [41] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#4 lvaluevar::screen#4 ] ( main:2::lvaluevar:11 [ lvaluevar::i#4 lvaluevar::screen#4 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ]
Statement [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ( main:2::rvaluevar:9 [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ]
Statement [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a 
Statement [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a 
Statement [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 [ lvalue::i#4 ] ( main:2::lvalue:5 [ lvalue::i#4 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ]
Statement [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#4 lvaluevar::screen#4 ] ( main:2::lvaluevar:11 [ lvaluevar::i#4 lvaluevar::screen#4 ] ) always clobbers reg byte a reg byte y 
Statement [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ( main:2::rvaluevar:9 [ rvaluevar::i#4 rvaluevar::screen#4 rvaluevar::b#1 ] ) always clobbers reg byte a reg byte y 
Statement [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a 
Statement [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] ( main:2::lvalue:5 [ ] ) always clobbers reg byte a 
Statement [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 [ lvalue::i#4 ] ( main:2::lvalue:5 [ lvalue::i#4 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] : zp ZP_BYTE:2 , reg byte x , 
Potential registers zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] : zp ZP_WORD:3 , 
Potential registers zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] : zp ZP_BYTE:5 , reg byte x , 
Potential registers zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] : zp ZP_WORD:6 , 
Potential registers zp ZP_BYTE:8 [ rvalue::i#4 rvalue::i#1 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ rvaluevar::b#1 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:11 [ rvalue::b#2 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [rvaluevar] 23.83: zp ZP_BYTE:5 [ rvaluevar::i#4 rvaluevar::i#1 ] 23.83: zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] 3.25: zp ZP_BYTE:10 [ rvaluevar::b#1 ] 
Uplift Scope [lvaluevar] 23.83: zp ZP_BYTE:2 [ lvaluevar::i#4 lvaluevar::i#1 ] 23.83: zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] 
Uplift Scope [rvalue] 33: zp ZP_BYTE:8 [ rvalue::i#4 rvalue::i#1 ] 4.33: zp ZP_BYTE:11 [ rvalue::b#2 ] 
Uplift Scope [lvalue] 33: zp ZP_BYTE:9 [ lvalue::i#4 lvalue::i#1 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [rvaluevar] best 2027 combination reg byte x [ rvaluevar::i#4 rvaluevar::i#1 ] zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] reg byte a [ rvaluevar::b#1 ] 
Uplifting [lvaluevar] best 1937 combination reg byte x [ lvaluevar::i#4 lvaluevar::i#1 ] zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] 
Uplifting [rvalue] best 1784 combination reg byte x [ rvalue::i#4 rvalue::i#1 ] reg byte a [ rvalue::b#2 ] 
Uplifting [lvalue] best 1664 combination reg byte x [ lvalue::i#4 lvalue::i#1 ] 
Uplifting [main] best 1664 combination 
Uplifting [] best 1664 combination 
Coalescing zero page register [ zp ZP_WORD:6 [ rvaluevar::screen#4 rvaluevar::screen#1 ] ] with [ zp ZP_WORD:3 [ lvaluevar::screen#4 lvaluevar::screen#1 ] ]
Allocated (was zp ZP_WORD:6) zp ZP_WORD:2 [ rvaluevar::screen#4 rvaluevar::screen#1 lvaluevar::screen#4 lvaluevar::screen#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test all types of pointers
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from_b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // [5] call lvalue 
    jsr lvalue
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
    // main::@1
  b1:
    // [7] call rvalue 
    // [28] phi from main::@1 to rvalue [phi:main::@1->rvalue]
  rvalue_from_b1:
    jsr rvalue
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [9] call rvaluevar 
    // [20] phi from main::@2 to rvaluevar [phi:main::@2->rvaluevar]
  rvaluevar_from_b2:
    jsr rvaluevar
    // [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  b3_from_b2:
    jmp b3
    // main::@3
  b3:
    // [11] call lvaluevar 
    // [13] phi from main::@3 to lvaluevar [phi:main::@3->lvaluevar]
  lvaluevar_from_b3:
    jsr lvaluevar
    jmp breturn
    // main::@return
  breturn:
    // [12] return 
    rts
}
  // lvaluevar
lvaluevar: {
    // LValue Variable pointer dereference
    .const b = 4
    .label screen = 2
    // [14] phi from lvaluevar to lvaluevar::@2 [phi:lvaluevar->lvaluevar::@2]
  b2_from_lvaluevar:
    // [14] phi (byte*) lvaluevar::screen#4 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@2#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [14] phi (byte) lvaluevar::i#4 = (byte) 2 [phi:lvaluevar->lvaluevar::@2#1] -- vbuxx=vbuc1 
    ldx #2
    jmp b2
    // [14] phi from lvaluevar::@1 to lvaluevar::@2 [phi:lvaluevar::@1->lvaluevar::@2]
  b2_from_b1:
    // [14] phi (byte*) lvaluevar::screen#4 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@1->lvaluevar::@2#0] -- register_copy 
    // [14] phi (byte) lvaluevar::i#4 = (byte) lvaluevar::i#1 [phi:lvaluevar::@1->lvaluevar::@2#1] -- register_copy 
    jmp b2
    // lvaluevar::@2
  b2:
    // [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 
    lda #b
    ldy #0
    sta (screen),y
    // [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 -- vbuxx=_inc_vbuxx 
    inx
    jmp b1
    // lvaluevar::@1
  b1:
    // [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2_from_b1
    jmp breturn
    // lvaluevar::@return
  breturn:
    // [19] return 
    rts
}
  // rvaluevar
rvaluevar: {
    .label screen2 = $400
    .label screen = 2
    // [21] phi from rvaluevar to rvaluevar::@2 [phi:rvaluevar->rvaluevar::@2]
  b2_from_rvaluevar:
    // [21] phi (byte*) rvaluevar::screen#4 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@2#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [21] phi (byte) rvaluevar::i#4 = (byte) 2 [phi:rvaluevar->rvaluevar::@2#1] -- vbuxx=vbuc1 
    ldx #2
    jmp b2
    // [21] phi from rvaluevar::@1 to rvaluevar::@2 [phi:rvaluevar::@1->rvaluevar::@2]
  b2_from_b1:
    // [21] phi (byte*) rvaluevar::screen#4 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@1->rvaluevar::@2#0] -- register_copy 
    // [21] phi (byte) rvaluevar::i#4 = (byte) rvaluevar::i#1 [phi:rvaluevar::@1->rvaluevar::@2#1] -- register_copy 
    jmp b2
    // rvaluevar::@2
  b2:
    // [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (screen),y
    // [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 -- vbuxx=_inc_vbuxx 
    inx
    jmp b1
    // rvaluevar::@1
  b1:
    // [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2_from_b1
    jmp b3
    // rvaluevar::@3
  b3:
    // [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 -- _deref_pbuc1=vbuaa 
    sta screen2
    jmp breturn
    // rvaluevar::@return
  breturn:
    // [27] return 
    rts
}
  // rvalue
rvalue: {
    // A constant pointer
    .label SCREEN = $400
    .label screen2 = $400
    // [29] phi from rvalue to rvalue::@2 [phi:rvalue->rvalue::@2]
  b2_from_rvalue:
    // [29] phi (byte) rvalue::i#4 = (byte) 2 [phi:rvalue->rvalue::@2#0] -- vbuxx=vbuc1 
    ldx #2
    jmp b2
    // [29] phi from rvalue::@1 to rvalue::@2 [phi:rvalue::@1->rvalue::@2]
  b2_from_b1:
    // [29] phi (byte) rvalue::i#4 = (byte) rvalue::i#1 [phi:rvalue::@1->rvalue::@2#0] -- register_copy 
    jmp b2
    // rvalue::@2
  b2:
    // [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda SCREEN,x
    // [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 -- vbuxx=_inc_vbuxx 
    inx
    jmp b1
    // rvalue::@1
  b1:
    // [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2_from_b1
    jmp b3
    // rvalue::@3
  b3:
    // [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 -- _deref_pbuc1=vbuaa 
    sta screen2
    jmp breturn
    // rvalue::@return
  breturn:
    // [34] return 
    rts
}
  // lvalue
lvalue: {
    // A constant pointer
    .label SCREEN = $400
    // [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    // LValue constant pointer dereference
    lda #1
    sta SCREEN
    // [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 -- _deref_pbuc1=vbuc2 
    // LValue constant array constant indexing
    lda #2
    sta SCREEN+1
    // [37] phi from lvalue to lvalue::@2 [phi:lvalue->lvalue::@2]
  b2_from_lvalue:
    // [37] phi (byte) lvalue::i#4 = (byte) 2 [phi:lvalue->lvalue::@2#0] -- vbuxx=vbuc1 
    ldx #2
    jmp b2
    // [37] phi from lvalue::@1 to lvalue::@2 [phi:lvalue::@1->lvalue::@2]
  b2_from_b1:
    // [37] phi (byte) lvalue::i#4 = (byte) lvalue::i#1 [phi:lvalue::@1->lvalue::@2#0] -- register_copy 
    jmp b2
    // lvalue::@2
  b2:
    // [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #3
    sta SCREEN,x
    // [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 -- vbuxx=_inc_vbuxx 
    inx
    jmp b1
    // lvalue::@1
  b1:
    // [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2_from_b1
    jmp breturn
    // lvalue::@return
  breturn:
    // [41] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_main:
Removing instruction rvalue_from_b1:
Removing instruction b2_from_b1:
Removing instruction rvaluevar_from_b2:
Removing instruction b3_from_b2:
Removing instruction lvaluevar_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b1:
Removing instruction b2_from_b1:
Removing instruction b2_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1:
Removing instruction b2:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b2_from_lvaluevar:
Removing instruction b1:
Removing instruction breturn:
Removing instruction b2_from_rvaluevar:
Removing instruction b1:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b2_from_rvalue:
Removing instruction b1:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b2_from_lvalue:
Removing instruction b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b2
Removing instruction jmp b2
Removing instruction jmp b2
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction ldx #2 with TAX
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(void()) lvalue()
(label) lvalue::@1
(label) lvalue::@2
(label) lvalue::@return
(byte[$400]) lvalue::SCREEN
(const byte[$400]) lvalue::SCREEN#0 SCREEN = (byte*) 1024
(byte) lvalue::i
(byte) lvalue::i#1 reg byte x 16.5
(byte) lvalue::i#4 reg byte x 16.5
(void()) lvaluevar()
(label) lvaluevar::@1
(label) lvaluevar::@2
(label) lvaluevar::@return
(byte) lvaluevar::b
(const byte) lvaluevar::b#0 b = (byte) 4
(byte) lvaluevar::i
(byte) lvaluevar::i#1 reg byte x 16.5
(byte) lvaluevar::i#4 reg byte x 7.333333333333333
(byte*) lvaluevar::screen
(byte*) lvaluevar::screen#1 screen zp ZP_WORD:2 7.333333333333333
(byte*) lvaluevar::screen#4 screen zp ZP_WORD:2 16.5
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(void()) rvalue()
(label) rvalue::@1
(label) rvalue::@2
(label) rvalue::@3
(label) rvalue::@return
(byte[$400]) rvalue::SCREEN
(const byte[$400]) rvalue::SCREEN#0 SCREEN = (byte*) 1024
(byte) rvalue::b
(byte) rvalue::b#2 reg byte a 4.333333333333333
(byte) rvalue::i
(byte) rvalue::i#1 reg byte x 16.5
(byte) rvalue::i#4 reg byte x 16.5
(byte*) rvalue::screen2
(const byte*) rvalue::screen2#0 screen2 = (byte*) 1024
(void()) rvaluevar()
(label) rvaluevar::@1
(label) rvaluevar::@2
(label) rvaluevar::@3
(label) rvaluevar::@return
(byte) rvaluevar::b
(byte) rvaluevar::b#1 reg byte a 3.25
(byte) rvaluevar::i
(byte) rvaluevar::i#1 reg byte x 16.5
(byte) rvaluevar::i#4 reg byte x 7.333333333333333
(byte*) rvaluevar::screen
(byte*) rvaluevar::screen#1 screen zp ZP_WORD:2 7.333333333333333
(byte*) rvaluevar::screen#4 screen zp ZP_WORD:2 16.5
(byte*) rvaluevar::screen2
(const byte*) rvaluevar::screen2#0 screen2 = (byte*) 1024

reg byte x [ lvaluevar::i#4 lvaluevar::i#1 ]
reg byte x [ rvaluevar::i#4 rvaluevar::i#1 ]
zp ZP_WORD:2 [ rvaluevar::screen#4 rvaluevar::screen#1 lvaluevar::screen#4 lvaluevar::screen#1 ]
reg byte x [ rvalue::i#4 rvalue::i#1 ]
reg byte x [ lvalue::i#4 lvalue::i#1 ]
reg byte a [ rvaluevar::b#1 ]
reg byte a [ rvalue::b#2 ]


FINAL ASSEMBLER
Score: 1154

  // File Comments
// Test all types of pointers
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // lvalue()
    // [5] call lvalue 
    jsr lvalue
    // [6] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // rvalue()
    // [7] call rvalue 
    // [28] phi from main::@1 to rvalue [phi:main::@1->rvalue]
    jsr rvalue
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // rvaluevar()
    // [9] call rvaluevar 
    // [20] phi from main::@2 to rvaluevar [phi:main::@2->rvaluevar]
    jsr rvaluevar
    // [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // main::@3
    // lvaluevar()
    // [11] call lvaluevar 
    // [13] phi from main::@3 to lvaluevar [phi:main::@3->lvaluevar]
    jsr lvaluevar
    // main::@return
    // }
    // [12] return 
    rts
}
  // lvaluevar
lvaluevar: {
    // LValue Variable pointer dereference
    .const b = 4
    .label screen = 2
    // [14] phi from lvaluevar to lvaluevar::@2 [phi:lvaluevar->lvaluevar::@2]
    // [14] phi (byte*) lvaluevar::screen#4 = (byte*) 1024 [phi:lvaluevar->lvaluevar::@2#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [14] phi (byte) lvaluevar::i#4 = (byte) 2 [phi:lvaluevar->lvaluevar::@2#1] -- vbuxx=vbuc1 
    ldx #2
    // [14] phi from lvaluevar::@1 to lvaluevar::@2 [phi:lvaluevar::@1->lvaluevar::@2]
    // [14] phi (byte*) lvaluevar::screen#4 = (byte*) lvaluevar::screen#1 [phi:lvaluevar::@1->lvaluevar::@2#0] -- register_copy 
    // [14] phi (byte) lvaluevar::i#4 = (byte) lvaluevar::i#1 [phi:lvaluevar::@1->lvaluevar::@2#1] -- register_copy 
    // lvaluevar::@2
  b2:
    // *screen = b
    // [15] *((byte*) lvaluevar::screen#4) ← (const byte) lvaluevar::b#0 -- _deref_pbuz1=vbuc1 
    lda #b
    ldy #0
    sta (screen),y
    // screen++;
    // [16] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // i++;
    // [17] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#4 -- vbuxx=_inc_vbuxx 
    inx
    // lvaluevar::@1
    // while(i<10)
    // [18] if((byte) lvaluevar::i#1<(byte) $a) goto lvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2
    // lvaluevar::@return
    // }
    // [19] return 
    rts
}
  // rvaluevar
rvaluevar: {
    .label screen2 = $400
    .label screen = 2
    // [21] phi from rvaluevar to rvaluevar::@2 [phi:rvaluevar->rvaluevar::@2]
    // [21] phi (byte*) rvaluevar::screen#4 = (byte*) 1024 [phi:rvaluevar->rvaluevar::@2#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [21] phi (byte) rvaluevar::i#4 = (byte) 2 [phi:rvaluevar->rvaluevar::@2#1] -- vbuxx=vbuc1 
    ldx #2
    // [21] phi from rvaluevar::@1 to rvaluevar::@2 [phi:rvaluevar::@1->rvaluevar::@2]
    // [21] phi (byte*) rvaluevar::screen#4 = (byte*) rvaluevar::screen#1 [phi:rvaluevar::@1->rvaluevar::@2#0] -- register_copy 
    // [21] phi (byte) rvaluevar::i#4 = (byte) rvaluevar::i#1 [phi:rvaluevar::@1->rvaluevar::@2#1] -- register_copy 
    // rvaluevar::@2
  b2:
    // b = *screen
    // [22] (byte) rvaluevar::b#1 ← *((byte*) rvaluevar::screen#4) -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (screen),y
    // screen++;
    // [23] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#4 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // i++;
    // [24] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#4 -- vbuxx=_inc_vbuxx 
    inx
    // rvaluevar::@1
    // while(i<10)
    // [25] if((byte) rvaluevar::i#1<(byte) $a) goto rvaluevar::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2
    // rvaluevar::@3
    // *screen2 = b
    // [26] *((const byte*) rvaluevar::screen2#0) ← (byte) rvaluevar::b#1 -- _deref_pbuc1=vbuaa 
    sta screen2
    // rvaluevar::@return
    // }
    // [27] return 
    rts
}
  // rvalue
rvalue: {
    // A constant pointer
    .label SCREEN = $400
    .label screen2 = $400
    // [29] phi from rvalue to rvalue::@2 [phi:rvalue->rvalue::@2]
    // [29] phi (byte) rvalue::i#4 = (byte) 2 [phi:rvalue->rvalue::@2#0] -- vbuxx=vbuc1 
    ldx #2
    // [29] phi from rvalue::@1 to rvalue::@2 [phi:rvalue::@1->rvalue::@2]
    // [29] phi (byte) rvalue::i#4 = (byte) rvalue::i#1 [phi:rvalue::@1->rvalue::@2#0] -- register_copy 
    // rvalue::@2
  b2:
    // b = SCREEN[i++]
    // [30] (byte) rvalue::b#2 ← *((const byte[$400]) rvalue::SCREEN#0 + (byte) rvalue::i#4) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda SCREEN,x
    // b = SCREEN[i++];
    // [31] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#4 -- vbuxx=_inc_vbuxx 
    inx
    // rvalue::@1
    // while(i<10)
    // [32] if((byte) rvalue::i#1<(byte) $a) goto rvalue::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2
    // rvalue::@3
    // *screen2 = b
    // [33] *((const byte*) rvalue::screen2#0) ← (byte) rvalue::b#2 -- _deref_pbuc1=vbuaa 
    sta screen2
    // rvalue::@return
    // }
    // [34] return 
    rts
}
  // lvalue
lvalue: {
    // A constant pointer
    .label SCREEN = $400
    // *SCREEN = 1
    // [35] *((const byte[$400]) lvalue::SCREEN#0) ← (byte) 1 -- _deref_pbuc1=vbuc2 
    // LValue constant pointer dereference
    lda #1
    sta SCREEN
    // SCREEN[1] = 2
    // [36] *((const byte[$400]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 -- _deref_pbuc1=vbuc2 
    // LValue constant array constant indexing
    lda #2
    sta SCREEN+1
    // [37] phi from lvalue to lvalue::@2 [phi:lvalue->lvalue::@2]
    // [37] phi (byte) lvalue::i#4 = (byte) 2 [phi:lvalue->lvalue::@2#0] -- vbuxx=vbuc1 
    tax
    // [37] phi from lvalue::@1 to lvalue::@2 [phi:lvalue::@1->lvalue::@2]
    // [37] phi (byte) lvalue::i#4 = (byte) lvalue::i#1 [phi:lvalue::@1->lvalue::@2#0] -- register_copy 
    // lvalue::@2
  b2:
    // SCREEN[i++] = 3
    // [38] *((const byte[$400]) lvalue::SCREEN#0 + (byte) lvalue::i#4) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #3
    sta SCREEN,x
    // SCREEN[i++] = 3;
    // [39] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#4 -- vbuxx=_inc_vbuxx 
    inx
    // lvalue::@1
    // while(i<10)
    // [40] if((byte) lvalue::i#1<(byte) $a) goto lvalue::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$a
    bcc b2
    // lvalue::@return
    // }
    // [41] return 
    rts
}
  // File Data

