Identified constant variable (byte*) screen1
Identified constant variable (byte*) cols
Identified constant variable (byte) GREEN
Identified constant variable (byte) RED
Culled Empty Block (label) @1
Culled Empty Block (label) test::@2
Culled Empty Block (label) test::@4

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*~) $0 ← (const byte*) screen1 + (number) $28
  (byte*) screen2#0 ← (byte*~) $0
  to:@2

(void()) main()
main: scope:[main]  from @2
  (byte*) screen2#2 ← phi( @2/(byte*) screen2#13 )
  (byte) main::i#0 ← (byte) 0
  (byte) main::a#0 ← (byte) 3
  (byte) test::i#0 ← (byte) main::i#0
  (byte) test::a#0 ← (byte) main::a#0
  call test 
  to:main::@1
main::@1: scope:[main]  from main
  (byte*) screen2#3 ← phi( main/(byte*) screen2#2 )
  (byte) main::a#11 ← phi( main/(byte) main::a#0 )
  (byte) main::i#12 ← phi( main/(byte) main::i#0 )
  (byte) main::i#1 ← ++ (byte) main::i#12
  (byte) main::a#1 ← (byte) main::a#11 + (number) 1
  (byte) test::i#1 ← (byte) main::i#1
  (byte) test::a#1 ← (byte) main::a#1
  call test 
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte*) screen2#5 ← phi( main::@1/(byte*) screen2#3 )
  (byte) main::a#12 ← phi( main::@1/(byte) main::a#1 )
  (byte) main::i#13 ← phi( main::@1/(byte) main::i#1 )
  (byte) main::i#2 ← ++ (byte) main::i#13
  (byte) main::a#2 ← (byte) main::a#12 - (number) 1
  (byte) test::i#2 ← (byte) main::i#2
  (byte) test::a#2 ← (byte) main::a#2
  call test 
  to:main::@3
main::@3: scope:[main]  from main::@2
  (byte*) screen2#6 ← phi( main::@2/(byte*) screen2#5 )
  (byte) main::a#13 ← phi( main::@2/(byte) main::a#2 )
  (byte) main::i#14 ← phi( main::@2/(byte) main::i#2 )
  (byte) main::i#3 ← ++ (byte) main::i#14
  (byte) main::a#3 ← (byte) main::a#13 * (number) 6
  (byte) test::i#3 ← (byte) main::i#3
  (byte) test::a#3 ← (byte) main::a#3
  call test 
  to:main::@4
main::@4: scope:[main]  from main::@3
  (byte*) screen2#7 ← phi( main::@3/(byte*) screen2#6 )
  (byte) main::a#14 ← phi( main::@3/(byte) main::a#3 )
  (byte) main::i#15 ← phi( main::@3/(byte) main::i#3 )
  (byte) main::i#4 ← ++ (byte) main::i#15
  (byte) main::a#4 ← (byte) main::a#14 / (number) 2
  (byte) test::i#4 ← (byte) main::i#4
  (byte) test::a#4 ← (byte) main::a#4
  call test 
  to:main::@5
main::@5: scope:[main]  from main::@4
  (byte*) screen2#8 ← phi( main::@4/(byte*) screen2#7 )
  (byte) main::a#15 ← phi( main::@4/(byte) main::a#4 )
  (byte) main::i#16 ← phi( main::@4/(byte) main::i#4 )
  (byte) main::i#5 ← ++ (byte) main::i#16
  (byte) main::a#5 ← (byte) main::a#15 % (number) 2
  (byte) test::i#5 ← (byte) main::i#5
  (byte) test::a#5 ← (byte) main::a#5
  call test 
  to:main::@6
main::@6: scope:[main]  from main::@5
  (byte*) screen2#9 ← phi( main::@5/(byte*) screen2#8 )
  (byte) main::a#16 ← phi( main::@5/(byte) main::a#5 )
  (byte) main::i#17 ← phi( main::@5/(byte) main::i#5 )
  (byte) main::i#6 ← ++ (byte) main::i#17
  (byte) main::a#6 ← (byte) main::a#16 << (number) 2
  (byte) test::i#6 ← (byte) main::i#6
  (byte) test::a#6 ← (byte) main::a#6
  call test 
  to:main::@7
main::@7: scope:[main]  from main::@6
  (byte*) screen2#10 ← phi( main::@6/(byte*) screen2#9 )
  (byte) main::a#17 ← phi( main::@6/(byte) main::a#6 )
  (byte) main::i#18 ← phi( main::@6/(byte) main::i#6 )
  (byte) main::i#7 ← ++ (byte) main::i#18
  (byte) main::a#7 ← (byte) main::a#17 >> (number) 1
  (byte) test::i#7 ← (byte) main::i#7
  (byte) test::a#7 ← (byte) main::a#7
  call test 
  to:main::@8
main::@8: scope:[main]  from main::@7
  (byte*) screen2#11 ← phi( main::@7/(byte*) screen2#10 )
  (byte) main::a#18 ← phi( main::@7/(byte) main::a#7 )
  (byte) main::i#19 ← phi( main::@7/(byte) main::i#7 )
  (byte) main::i#8 ← ++ (byte) main::i#19
  (byte) main::a#8 ← (byte) main::a#18 ^ (number) 6
  (byte) test::i#8 ← (byte) main::i#8
  (byte) test::a#8 ← (byte) main::a#8
  call test 
  to:main::@9
main::@9: scope:[main]  from main::@8
  (byte*) screen2#12 ← phi( main::@8/(byte*) screen2#11 )
  (byte) main::a#19 ← phi( main::@8/(byte) main::a#8 )
  (byte) main::i#20 ← phi( main::@8/(byte) main::i#8 )
  (byte) main::i#9 ← ++ (byte) main::i#20
  (byte) main::a#9 ← (byte) main::a#19 | (number) 1
  (byte) test::i#9 ← (byte) main::i#9
  (byte) test::a#9 ← (byte) main::a#9
  call test 
  to:main::@10
main::@10: scope:[main]  from main::@9
  (byte*) screen2#4 ← phi( main::@9/(byte*) screen2#12 )
  (byte) main::a#20 ← phi( main::@9/(byte) main::a#9 )
  (byte) main::i#21 ← phi( main::@9/(byte) main::i#9 )
  (byte) main::i#10 ← ++ (byte) main::i#21
  (byte) main::a#10 ← (byte) main::a#20 & (number) 1
  (byte) test::i#10 ← (byte) main::i#10
  (byte) test::a#10 ← (byte) main::a#10
  call test 
  to:main::@11
main::@11: scope:[main]  from main::@10
  (byte) main::i#22 ← phi( main::@10/(byte) main::i#10 )
  (byte) main::i#11 ← ++ (byte) main::i#22
  to:main::@return
main::@return: scope:[main]  from main::@11
  return 
  to:@return

(void()) test((byte) test::i , (byte) test::a)
test: scope:[test]  from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
  (byte*) screen2#1 ← phi( main/(byte*) screen2#2 main::@1/(byte*) screen2#3 main::@10/(byte*) screen2#4 main::@2/(byte*) screen2#5 main::@3/(byte*) screen2#6 main::@4/(byte*) screen2#7 main::@5/(byte*) screen2#8 main::@6/(byte*) screen2#9 main::@7/(byte*) screen2#10 main::@8/(byte*) screen2#11 main::@9/(byte*) screen2#12 )
  (byte) test::i#11 ← phi( main/(byte) test::i#0 main::@1/(byte) test::i#1 main::@10/(byte) test::i#10 main::@2/(byte) test::i#2 main::@3/(byte) test::i#3 main::@4/(byte) test::i#4 main::@5/(byte) test::i#5 main::@6/(byte) test::i#6 main::@7/(byte) test::i#7 main::@8/(byte) test::i#8 main::@9/(byte) test::i#9 )
  (byte) test::a#11 ← phi( main/(byte) test::a#0 main::@1/(byte) test::a#1 main::@10/(byte) test::a#10 main::@2/(byte) test::a#2 main::@3/(byte) test::a#3 main::@4/(byte) test::a#4 main::@5/(byte) test::a#5 main::@6/(byte) test::a#6 main::@7/(byte) test::a#7 main::@8/(byte) test::a#8 main::@9/(byte) test::a#9 )
  *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11
  *((byte*) screen2#1 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11)
  (bool~) test::$0 ← *((const byte*) ref + (byte) test::i#11) == (byte) test::a#11
  if((bool~) test::$0) goto test::@1
  to:test::@3
test::@1: scope:[test]  from test
  (byte) test::i#12 ← phi( test/(byte) test::i#11 )
  *((const byte*) cols + (byte) test::i#12) ← (const byte) GREEN
  to:test::@return
test::@3: scope:[test]  from test
  (byte) test::i#13 ← phi( test/(byte) test::i#11 )
  *((const byte*) cols + (byte) test::i#13) ← (const byte) RED
  to:test::@return
test::@return: scope:[test]  from test::@1 test::@3
  return 
  to:@return
@2: scope:[]  from @begin
  (byte*) screen2#13 ← phi( @begin/(byte*) screen2#0 )
  call main 
  to:@3
@3: scope:[]  from @2
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(byte*~) $0
(label) @2
(label) @3
(label) @begin
(label) @end
(const byte) GREEN = (byte) 5
(const byte) RED = (byte) 2
(const byte*) cols = (byte*)(number) $d800
(void()) main()
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::a
(byte) main::a#0
(byte) main::a#1
(byte) main::a#10
(byte) main::a#11
(byte) main::a#12
(byte) main::a#13
(byte) main::a#14
(byte) main::a#15
(byte) main::a#16
(byte) main::a#17
(byte) main::a#18
(byte) main::a#19
(byte) main::a#2
(byte) main::a#20
(byte) main::a#3
(byte) main::a#4
(byte) main::a#5
(byte) main::a#6
(byte) main::a#7
(byte) main::a#8
(byte) main::a#9
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#10
(byte) main::i#11
(byte) main::i#12
(byte) main::i#13
(byte) main::i#14
(byte) main::i#15
(byte) main::i#16
(byte) main::i#17
(byte) main::i#18
(byte) main::i#19
(byte) main::i#2
(byte) main::i#20
(byte) main::i#21
(byte) main::i#22
(byte) main::i#3
(byte) main::i#4
(byte) main::i#5
(byte) main::i#6
(byte) main::i#7
(byte) main::i#8
(byte) main::i#9
(const byte*) ref[]  = { (byte) 3, (byte) 4, (byte) 3, (byte) $12, (byte) 9, (byte) 1, (byte) 4, (byte) 2, (byte) 4, (byte) 5, (byte) 1, (byte) 0 }
(const byte*) screen1 = (byte*)(number) $400
(byte*) screen2
(byte*) screen2#0
(byte*) screen2#1
(byte*) screen2#10
(byte*) screen2#11
(byte*) screen2#12
(byte*) screen2#13
(byte*) screen2#2
(byte*) screen2#3
(byte*) screen2#4
(byte*) screen2#5
(byte*) screen2#6
(byte*) screen2#7
(byte*) screen2#8
(byte*) screen2#9
(void()) test((byte) test::i , (byte) test::a)
(bool~) test::$0
(label) test::@1
(label) test::@3
(label) test::@return
(byte) test::a
(byte) test::a#0
(byte) test::a#1
(byte) test::a#10
(byte) test::a#11
(byte) test::a#2
(byte) test::a#3
(byte) test::a#4
(byte) test::a#5
(byte) test::a#6
(byte) test::a#7
(byte) test::a#8
(byte) test::a#9
(byte) test::i
(byte) test::i#0
(byte) test::i#1
(byte) test::i#10
(byte) test::i#11
(byte) test::i#12
(byte) test::i#13
(byte) test::i#2
(byte) test::i#3
(byte) test::i#4
(byte) test::i#5
(byte) test::i#6
(byte) test::i#7
(byte) test::i#8
(byte) test::i#9

Adding number conversion cast (unumber) $28 in (byte*~) $0 ← (const byte*) screen1 + (number) $28
Adding number conversion cast (unumber) 1 in (byte) main::a#1 ← (byte) main::a#11 + (number) 1
Adding number conversion cast (unumber) 1 in (byte) main::a#2 ← (byte) main::a#12 - (number) 1
Adding number conversion cast (unumber) 6 in (byte) main::a#3 ← (byte) main::a#13 * (number) 6
Adding number conversion cast (unumber) 2 in (byte) main::a#4 ← (byte) main::a#14 / (number) 2
Adding number conversion cast (unumber) 2 in (byte) main::a#5 ← (byte) main::a#15 % (number) 2
Adding number conversion cast (unumber) 2 in (byte) main::a#6 ← (byte) main::a#16 << (number) 2
Adding number conversion cast (unumber) 1 in (byte) main::a#7 ← (byte) main::a#17 >> (number) 1
Adding number conversion cast (unumber) 6 in (byte) main::a#8 ← (byte) main::a#18 ^ (number) 6
Adding number conversion cast (unumber) 1 in (byte) main::a#9 ← (byte) main::a#19 | (number) 1
Adding number conversion cast (unumber) 1 in (byte) main::a#10 ← (byte) main::a#20 & (number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) screen2#0 = (byte*~) $0 (byte*) screen2#13 
Alias (byte) main::i#0 = (byte) main::i#12 
Alias (byte) main::a#0 = (byte) main::a#11 
Alias (byte*) screen2#10 = (byte*) screen2#3 (byte*) screen2#2 (byte*) screen2#5 (byte*) screen2#6 (byte*) screen2#7 (byte*) screen2#8 (byte*) screen2#9 (byte*) screen2#11 (byte*) screen2#12 (byte*) screen2#4 
Alias (byte) main::i#1 = (byte) main::i#13 
Alias (byte) main::a#1 = (byte) main::a#12 
Alias (byte) main::i#14 = (byte) main::i#2 
Alias (byte) main::a#13 = (byte) main::a#2 
Alias (byte) main::i#15 = (byte) main::i#3 
Alias (byte) main::a#14 = (byte) main::a#3 
Alias (byte) main::i#16 = (byte) main::i#4 
Alias (byte) main::a#15 = (byte) main::a#4 
Alias (byte) main::i#17 = (byte) main::i#5 
Alias (byte) main::a#16 = (byte) main::a#5 
Alias (byte) main::i#18 = (byte) main::i#6 
Alias (byte) main::a#17 = (byte) main::a#6 
Alias (byte) main::i#19 = (byte) main::i#7 
Alias (byte) main::a#18 = (byte) main::a#7 
Alias (byte) main::i#20 = (byte) main::i#8 
Alias (byte) main::a#19 = (byte) main::a#8 
Alias (byte) main::i#21 = (byte) main::i#9 
Alias (byte) main::a#20 = (byte) main::a#9 
Alias (byte) main::i#10 = (byte) main::i#22 
Alias (byte) test::i#11 = (byte) test::i#12 (byte) test::i#13 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) screen2#10 (byte*) screen2#0
Identical Phi Values (byte*) screen2#1 (byte*) screen2#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) test::$0 [75] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [0] (byte*) screen2#0 ← (const byte*) screen1 + (byte) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) screen2#0 = screen1+$28
Constant (const byte) main::i#0 = 0
Constant (const byte) main::a#0 = 3
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#0 = main::i#0
Constant (const byte) test::a#0 = main::a#0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused variable (byte) main::i#11 and assignment [51] (byte) main::i#11 ← ++ (byte) main::i#10
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [1] (byte) main::i#1 ← ++ (const byte) main::i#0
Constant right-side identified [2] (byte) main::a#1 ← (const byte) main::a#0 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#1 = ++main::i#0
Constant (const byte) main::a#1 = main::a#0+1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#1 = main::i#1
Constant (const byte) test::a#1 = main::a#1
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] (byte) main::i#14 ← ++ (const byte) main::i#1
Constant right-side identified [3] (byte) main::a#13 ← (const byte) main::a#1 - (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#14 = ++main::i#1
Constant (const byte) main::a#13 = main::a#1-1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#2 = main::i#14
Constant (const byte) test::a#2 = main::a#13
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [3] (byte) main::i#15 ← ++ (const byte) main::i#14
Constant right-side identified [4] (byte) main::a#14 ← (const byte) main::a#13 * (byte) 6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#15 = ++main::i#14
Constant (const byte) main::a#14 = main::a#13*6
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#3 = main::i#15
Constant (const byte) test::a#3 = main::a#14
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [4] (byte) main::i#16 ← ++ (const byte) main::i#15
Constant right-side identified [5] (byte) main::a#15 ← (const byte) main::a#14 / (byte) 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#16 = ++main::i#15
Constant (const byte) main::a#15 = main::a#14/2
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#4 = main::i#16
Constant (const byte) test::a#4 = main::a#15
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [5] (byte) main::i#17 ← ++ (const byte) main::i#16
Constant right-side identified [6] (byte) main::a#16 ← (const byte) main::a#15 % (byte) 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#17 = ++main::i#16
Constant (const byte) main::a#16 = main::a#15%2
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#5 = main::i#17
Constant (const byte) test::a#5 = main::a#16
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [6] (byte) main::i#18 ← ++ (const byte) main::i#17
Constant right-side identified [7] (byte) main::a#17 ← (const byte) main::a#16 << (byte) 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#18 = ++main::i#17
Constant (const byte) main::a#17 = main::a#16<<2
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#6 = main::i#18
Constant (const byte) test::a#6 = main::a#17
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [7] (byte) main::i#19 ← ++ (const byte) main::i#18
Constant right-side identified [8] (byte) main::a#18 ← (const byte) main::a#17 >> (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#19 = ++main::i#18
Constant (const byte) main::a#18 = main::a#17>>1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#7 = main::i#19
Constant (const byte) test::a#7 = main::a#18
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [8] (byte) main::i#20 ← ++ (const byte) main::i#19
Constant right-side identified [9] (byte) main::a#19 ← (const byte) main::a#18 ^ (byte) 6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#20 = ++main::i#19
Constant (const byte) main::a#19 = main::a#18^6
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#8 = main::i#20
Constant (const byte) test::a#8 = main::a#19
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [9] (byte) main::i#21 ← ++ (const byte) main::i#20
Constant right-side identified [10] (byte) main::a#20 ← (const byte) main::a#19 | (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#21 = ++main::i#20
Constant (const byte) main::a#20 = main::a#19|1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#9 = main::i#21
Constant (const byte) test::a#9 = main::a#20
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [10] (byte) main::i#10 ← ++ (const byte) main::i#21
Constant right-side identified [11] (byte) main::a#10 ← (const byte) main::a#20 & (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::i#10 = ++main::i#21
Constant (const byte) main::a#10 = main::a#20&1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) test::i#10 = main::i#10
Constant (const byte) test::a#10 = main::a#10
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with different constant siblings (const byte) main::i#0
Inlining constant with different constant siblings (const byte) main::a#0
Inlining constant with different constant siblings (const byte) main::i#1
Inlining constant with different constant siblings (const byte) main::a#1
Inlining constant with different constant siblings (const byte) main::i#14
Inlining constant with different constant siblings (const byte) main::a#13
Inlining constant with different constant siblings (const byte) main::i#15
Inlining constant with different constant siblings (const byte) main::a#14
Inlining constant with different constant siblings (const byte) main::i#16
Inlining constant with different constant siblings (const byte) main::a#15
Inlining constant with different constant siblings (const byte) main::i#17
Inlining constant with different constant siblings (const byte) main::a#16
Inlining constant with different constant siblings (const byte) main::i#18
Inlining constant with different constant siblings (const byte) main::a#17
Inlining constant with different constant siblings (const byte) main::i#19
Inlining constant with different constant siblings (const byte) main::a#18
Inlining constant with different constant siblings (const byte) main::i#20
Inlining constant with different constant siblings (const byte) main::a#19
Inlining constant with different constant siblings (const byte) main::i#21
Inlining constant with different constant siblings (const byte) main::a#20
Inlining constant with different constant siblings (const byte) main::i#10
Inlining constant with different constant siblings (const byte) main::a#10
Inlining constant with var siblings (const byte) test::i#0
Inlining constant with var siblings (const byte) test::a#0
Inlining constant with var siblings (const byte) test::i#1
Inlining constant with var siblings (const byte) test::a#1
Inlining constant with var siblings (const byte) test::i#2
Inlining constant with var siblings (const byte) test::a#2
Inlining constant with var siblings (const byte) test::i#3
Inlining constant with var siblings (const byte) test::a#3
Inlining constant with var siblings (const byte) test::i#4
Inlining constant with var siblings (const byte) test::a#4
Inlining constant with var siblings (const byte) test::i#5
Inlining constant with var siblings (const byte) test::a#5
Inlining constant with var siblings (const byte) test::i#6
Inlining constant with var siblings (const byte) test::a#6
Inlining constant with var siblings (const byte) test::i#7
Inlining constant with var siblings (const byte) test::a#7
Inlining constant with var siblings (const byte) test::i#8
Inlining constant with var siblings (const byte) test::a#8
Inlining constant with var siblings (const byte) test::i#9
Inlining constant with var siblings (const byte) test::a#9
Inlining constant with var siblings (const byte) test::i#10
Inlining constant with var siblings (const byte) test::a#10
Constant inlined test::i#1 = ++(byte) 0
Constant inlined test::a#8 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6
Constant inlined test::i#0 = (byte) 0
Constant inlined test::a#9 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1
Constant inlined test::i#3 = ++++++(byte) 0
Constant inlined test::i#2 = ++++(byte) 0
Constant inlined test::a#4 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2
Constant inlined main::i#21 = ++++++++++++++++++(byte) 0
Constant inlined test::a#5 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2
Constant inlined test::a#6 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2
Constant inlined test::a#7 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1
Constant inlined main::i#20 = ++++++++++++++++(byte) 0
Constant inlined test::i#9 = ++++++++++++++++++(byte) 0
Constant inlined test::i#8 = ++++++++++++++++(byte) 0
Constant inlined main::a#20 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1
Constant inlined test::a#10 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1
Constant inlined test::i#5 = ++++++++++(byte) 0
Constant inlined test::i#4 = ++++++++(byte) 0
Constant inlined test::i#7 = ++++++++++++++(byte) 0
Constant inlined test::i#6 = ++++++++++++(byte) 0
Constant inlined test::i#10 = ++++++++++++++++++++(byte) 0
Constant inlined main::a#0 = (byte) 3
Constant inlined main::a#19 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6
Constant inlined main::a#18 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1
Constant inlined main::a#17 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2
Constant inlined main::a#1 = (byte) 3+(byte) 1
Constant inlined main::a#16 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2
Constant inlined main::i#0 = (byte) 0
Constant inlined main::i#1 = ++(byte) 0
Constant inlined main::i#14 = ++++(byte) 0
Constant inlined main::i#15 = ++++++(byte) 0
Constant inlined main::i#10 = ++++++++++++++++++++(byte) 0
Constant inlined main::a#10 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1
Constant inlined main::a#15 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2
Constant inlined main::i#18 = ++++++++++++(byte) 0
Constant inlined main::a#14 = (byte) 3+(byte) 1-(byte) 1*(byte) 6
Constant inlined main::i#19 = ++++++++++++++(byte) 0
Constant inlined main::a#13 = (byte) 3+(byte) 1-(byte) 1
Constant inlined main::i#16 = ++++++++(byte) 0
Constant inlined main::i#17 = ++++++++++(byte) 0
Constant inlined test::a#0 = (byte) 3
Constant inlined test::a#1 = (byte) 3+(byte) 1
Constant inlined test::a#2 = (byte) 3+(byte) 1-(byte) 1
Constant inlined test::a#3 = (byte) 3+(byte) 1-(byte) 1*(byte) 6
Successful SSA optimization Pass2ConstantInlining
Simplifying constant integer increment ++0
Simplifying constant integer increment ++0
Simplifying constant integer increment ++1
Simplifying constant integer increment ++1
Simplifying constant integer increment ++2
Simplifying constant integer increment ++3
Simplifying constant integer increment ++4
Simplifying constant integer increment ++5
Simplifying constant integer increment ++6
Simplifying constant integer increment ++7
Successful SSA optimization Pass2ConstantSimplification
Simplifying constant integer increment ++8
Simplifying constant integer increment ++2
Simplifying constant integer increment ++3
Simplifying constant integer increment ++4
Simplifying constant integer increment ++5
Simplifying constant integer increment ++6
Simplifying constant integer increment ++7
Simplifying constant integer increment ++8
Successful SSA optimization Pass2ConstantSimplification
Simplifying constant integer increment ++9
Successful SSA optimization Pass2ConstantSimplification
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
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::@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 main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of main::@11
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to test:6 test:8 test:10 test:12 test:14 test:16 test:18 test:20 test:22 test:24 test:26 

Created 2 initial phi equivalence classes
Coalesced down to 2 phi equivalence classes
Culled Empty Block (label) @3
Culled Empty Block (label) main::@11
Renumbering block @2 to @1
Renumbering block test::@3 to test::@2
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 main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10

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()

(void()) main()
main: scope:[main]  from @1
  [4] phi()
  [5] call test 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call test 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [8] phi()
  [9] call test 
  to:main::@3
main::@3: scope:[main]  from main::@2
  [10] phi()
  [11] call test 
  to:main::@4
main::@4: scope:[main]  from main::@3
  [12] phi()
  [13] call test 
  to:main::@5
main::@5: scope:[main]  from main::@4
  [14] phi()
  [15] call test 
  to:main::@6
main::@6: scope:[main]  from main::@5
  [16] phi()
  [17] call test 
  to:main::@7
main::@7: scope:[main]  from main::@6
  [18] phi()
  [19] call test 
  to:main::@8
main::@8: scope:[main]  from main::@7
  [20] phi()
  [21] call test 
  to:main::@9
main::@9: scope:[main]  from main::@8
  [22] phi()
  [23] call test 
  to:main::@10
main::@10: scope:[main]  from main::@9
  [24] phi()
  [25] call test 
  to:main::@return
main::@return: scope:[main]  from main::@10
  [26] return 
  to:@return

(void()) test((byte) test::i , (byte) test::a)
test: scope:[test]  from main main::@1 main::@10 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
  [27] (byte) test::i#11 ← phi( main/(byte) 0 main::@1/(byte) 1 main::@10/(byte) $a main::@2/(byte) 2 main::@3/(byte) 3 main::@4/(byte) 4 main::@5/(byte) 5 main::@6/(byte) 6 main::@7/(byte) 7 main::@8/(byte) 8 main::@9/(byte) 9 )
  [27] (byte) test::a#11 ← phi( main/(byte) 3 main::@1/(byte) 3+(byte) 1 main::@10/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 main::@2/(byte) 3+(byte) 1-(byte) 1 main::@3/(byte) 3+(byte) 1-(byte) 1*(byte) 6 main::@4/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 main::@5/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 main::@6/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 main::@7/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 main::@8/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 main::@9/(byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 )
  [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11
  [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11)
  [30] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1
  to:test::@2
test::@2: scope:[test]  from test
  [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED
  to:test::@return
test::@return: scope:[test]  from test::@1 test::@2
  [32] return 
  to:@return
test::@1: scope:[test]  from test
  [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN
  to:test::@return


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte) main::a
(byte) main::i
(byte*) screen2
(void()) test((byte) test::i , (byte) test::a)
(byte) test::a
(byte) test::a#11 1.3333333333333333
(byte) test::i
(byte) test::i#11 3.0

Initial phi equivalence classes
[ test::a#11 ]
[ test::i#11 ]
Complete equivalence classes
[ test::a#11 ]
[ test::i#11 ]
Allocated zp[1]:2 [ test::a#11 ]
Allocated zp[1]:3 [ test::i#11 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Test compound assignment operators
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label screen1 = $400
  .label cols = $d800
  .const GREEN = 5
  .const RED = 2
  .label screen2 = screen1+$28
  // @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 test 
    // [27] phi from main to test [phi:main->test]
  test_from_main:
    // [27] phi (byte) test::i#11 = (byte) 0 [phi:main->test#0] -- vbuz1=vbuc1 
    lda #0
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3 [phi:main->test#1] -- vbuz1=vbuc1 
    lda #3
    sta.z test.a
    jsr test
    // [6] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [7] call test 
    // [27] phi from main::@1 to test [phi:main::@1->test]
  test_from___b1:
    // [27] phi (byte) test::i#11 = (byte) 1 [phi:main::@1->test#0] -- vbuz1=vbuc1 
    lda #1
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1 [phi:main::@1->test#1] -- vbuz1=vbuc1 
    lda #3+1
    sta.z test.a
    jsr test
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [9] call test 
    // [27] phi from main::@2 to test [phi:main::@2->test]
  test_from___b2:
    // [27] phi (byte) test::i#11 = (byte) 2 [phi:main::@2->test#0] -- vbuz1=vbuc1 
    lda #2
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1 [phi:main::@2->test#1] -- vbuz1=vbuc1 
    lda #3+1-1
    sta.z test.a
    jsr test
    // [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    jmp __b3
    // main::@3
  __b3:
    // [11] call test 
    // [27] phi from main::@3 to test [phi:main::@3->test]
  test_from___b3:
    // [27] phi (byte) test::i#11 = (byte) 3 [phi:main::@3->test#0] -- vbuz1=vbuc1 
    lda #3
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6 [phi:main::@3->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6
    sta.z test.a
    jsr test
    // [12] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  __b4_from___b3:
    jmp __b4
    // main::@4
  __b4:
    // [13] call test 
    // [27] phi from main::@4 to test [phi:main::@4->test]
  test_from___b4:
    // [27] phi (byte) test::i#11 = (byte) 4 [phi:main::@4->test#0] -- vbuz1=vbuc1 
    lda #4
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 [phi:main::@4->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6/2
    sta.z test.a
    jsr test
    // [14] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [15] call test 
    // [27] phi from main::@5 to test [phi:main::@5->test]
  test_from___b5:
    // [27] phi (byte) test::i#11 = (byte) 5 [phi:main::@5->test#0] -- vbuz1=vbuc1 
    lda #5
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 [phi:main::@5->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)
    sta.z test.a
    jsr test
    // [16] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [17] call test 
    // [27] phi from main::@6 to test [phi:main::@6->test]
  test_from___b6:
    // [27] phi (byte) test::i#11 = (byte) 6 [phi:main::@6->test#0] -- vbuz1=vbuc1 
    lda #6
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 [phi:main::@6->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2
    sta.z test.a
    jsr test
    // [18] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  __b7_from___b6:
    jmp __b7
    // main::@7
  __b7:
    // [19] call test 
    // [27] phi from main::@7 to test [phi:main::@7->test]
  test_from___b7:
    // [27] phi (byte) test::i#11 = (byte) 7 [phi:main::@7->test#0] -- vbuz1=vbuc1 
    lda #7
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 [phi:main::@7->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1
    sta.z test.a
    jsr test
    // [20] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  __b8_from___b7:
    jmp __b8
    // main::@8
  __b8:
    // [21] call test 
    // [27] phi from main::@8 to test [phi:main::@8->test]
  test_from___b8:
    // [27] phi (byte) test::i#11 = (byte) 8 [phi:main::@8->test#0] -- vbuz1=vbuc1 
    lda #8
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 [phi:main::@8->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1^6
    sta.z test.a
    jsr test
    // [22] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  __b9_from___b8:
    jmp __b9
    // main::@9
  __b9:
    // [23] call test 
    // [27] phi from main::@9 to test [phi:main::@9->test]
  test_from___b9:
    // [27] phi (byte) test::i#11 = (byte) 9 [phi:main::@9->test#0] -- vbuz1=vbuc1 
    lda #9
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 [phi:main::@9->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1^6|1
    sta.z test.a
    jsr test
    // [24] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  __b10_from___b9:
    jmp __b10
    // main::@10
  __b10:
    // [25] call test 
    // [27] phi from main::@10 to test [phi:main::@10->test]
  test_from___b10:
    // [27] phi (byte) test::i#11 = (byte) $a [phi:main::@10->test#0] -- vbuz1=vbuc1 
    lda #$a
    sta.z test.i
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 [phi:main::@10->test#1] -- vbuz1=vbuc1 
    lda #(mod((3+1-1)*6/2,2)<<2>>1^6|1)&1
    sta.z test.a
    jsr test
    jmp __breturn
    // main::@return
  __breturn:
    // [26] return 
    rts
}
  // test
// test(byte zp(3) i, byte zp(2) a)
test: {
    .label a = 2
    .label i = 3
    // [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z a
    ldy.z i
    sta screen1,y
    // [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 
    ldy.z i
    lda ref,y
    sta screen2,y
    // [30] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 -- pbuc1_derefidx_vbuz1_eq_vbuz2_then_la1 
    ldy.z i
    lda ref,y
    cmp.z a
    beq __b1
    jmp __b2
    // test::@2
  __b2:
    // [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #RED
    ldy.z i
    sta cols,y
    jmp __breturn
    // test::@return
  __breturn:
    // [32] return 
    rts
    // test::@1
  __b1:
    // [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #GREEN
    ldy.z i
    sta cols,y
    jmp __breturn
}
  // File Data
  ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11) [ test::a#11 test::i#11 ] ( main:2::test:5 [ test::a#11 test::i#11 ] main:2::test:7 [ test::a#11 test::i#11 ] main:2::test:9 [ test::a#11 test::i#11 ] main:2::test:11 [ test::a#11 test::i#11 ] main:2::test:13 [ test::a#11 test::i#11 ] main:2::test:15 [ test::a#11 test::i#11 ] main:2::test:17 [ test::a#11 test::i#11 ] main:2::test:19 [ test::a#11 test::i#11 ] main:2::test:21 [ test::a#11 test::i#11 ] main:2::test:23 [ test::a#11 test::i#11 ] main:2::test:25 [ test::a#11 test::i#11 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:2 [ test::a#11 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ test::i#11 ]
Statement [30] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 [ test::i#11 ] ( main:2::test:5 [ test::i#11 ] main:2::test:7 [ test::i#11 ] main:2::test:9 [ test::i#11 ] main:2::test:11 [ test::i#11 ] main:2::test:13 [ test::i#11 ] main:2::test:15 [ test::i#11 ] main:2::test:17 [ test::i#11 ] main:2::test:19 [ test::i#11 ] main:2::test:21 [ test::i#11 ] main:2::test:23 [ test::i#11 ] main:2::test:25 [ test::i#11 ] ) always clobbers reg byte a 
Statement [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a 
Statement [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a 
Statement [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 [ test::a#11 test::i#11 ] ( main:2::test:5 [ test::a#11 test::i#11 ] main:2::test:7 [ test::a#11 test::i#11 ] main:2::test:9 [ test::a#11 test::i#11 ] main:2::test:11 [ test::a#11 test::i#11 ] main:2::test:13 [ test::a#11 test::i#11 ] main:2::test:15 [ test::a#11 test::i#11 ] main:2::test:17 [ test::a#11 test::i#11 ] main:2::test:19 [ test::a#11 test::i#11 ] main:2::test:21 [ test::a#11 test::i#11 ] main:2::test:23 [ test::a#11 test::i#11 ] main:2::test:25 [ test::a#11 test::i#11 ] ) always clobbers reg byte a 
Statement [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11) [ test::a#11 test::i#11 ] ( main:2::test:5 [ test::a#11 test::i#11 ] main:2::test:7 [ test::a#11 test::i#11 ] main:2::test:9 [ test::a#11 test::i#11 ] main:2::test:11 [ test::a#11 test::i#11 ] main:2::test:13 [ test::a#11 test::i#11 ] main:2::test:15 [ test::a#11 test::i#11 ] main:2::test:17 [ test::a#11 test::i#11 ] main:2::test:19 [ test::a#11 test::i#11 ] main:2::test:21 [ test::a#11 test::i#11 ] main:2::test:23 [ test::a#11 test::i#11 ] main:2::test:25 [ test::a#11 test::i#11 ] ) always clobbers reg byte a 
Statement [30] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 [ test::i#11 ] ( main:2::test:5 [ test::i#11 ] main:2::test:7 [ test::i#11 ] main:2::test:9 [ test::i#11 ] main:2::test:11 [ test::i#11 ] main:2::test:13 [ test::i#11 ] main:2::test:15 [ test::i#11 ] main:2::test:17 [ test::i#11 ] main:2::test:19 [ test::i#11 ] main:2::test:21 [ test::i#11 ] main:2::test:23 [ test::i#11 ] main:2::test:25 [ test::i#11 ] ) always clobbers reg byte a 
Statement [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a 
Statement [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN [ ] ( main:2::test:5 [ ] main:2::test:7 [ ] main:2::test:9 [ ] main:2::test:11 [ ] main:2::test:13 [ ] main:2::test:15 [ ] main:2::test:17 [ ] main:2::test:19 [ ] main:2::test:21 [ ] main:2::test:23 [ ] main:2::test:25 [ ] ) always clobbers reg byte a 
Potential registers zp[1]:2 [ test::a#11 ] : zp[1]:2 , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ test::i#11 ] : zp[1]:3 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [test] 3: zp[1]:3 [ test::i#11 ] 1.33: zp[1]:2 [ test::a#11 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [test] best 250 combination reg byte x [ test::i#11 ] zp[1]:2 [ test::a#11 ] 
Uplifting [main] best 250 combination 
Uplifting [] best 250 combination 
Attempting to uplift remaining variables inzp[1]:2 [ test::a#11 ]
Uplifting [test] best 250 combination zp[1]:2 [ test::a#11 ] 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test compound assignment operators
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label screen1 = $400
  .label cols = $d800
  .const GREEN = 5
  .const RED = 2
  .label screen2 = screen1+$28
  // @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 test 
    // [27] phi from main to test [phi:main->test]
  test_from_main:
    // [27] phi (byte) test::i#11 = (byte) 0 [phi:main->test#0] -- vbuxx=vbuc1 
    ldx #0
    // [27] phi (byte) test::a#11 = (byte) 3 [phi:main->test#1] -- vbuz1=vbuc1 
    lda #3
    sta.z test.a
    jsr test
    // [6] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [7] call test 
    // [27] phi from main::@1 to test [phi:main::@1->test]
  test_from___b1:
    // [27] phi (byte) test::i#11 = (byte) 1 [phi:main::@1->test#0] -- vbuxx=vbuc1 
    ldx #1
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1 [phi:main::@1->test#1] -- vbuz1=vbuc1 
    lda #3+1
    sta.z test.a
    jsr test
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [9] call test 
    // [27] phi from main::@2 to test [phi:main::@2->test]
  test_from___b2:
    // [27] phi (byte) test::i#11 = (byte) 2 [phi:main::@2->test#0] -- vbuxx=vbuc1 
    ldx #2
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1 [phi:main::@2->test#1] -- vbuz1=vbuc1 
    lda #3+1-1
    sta.z test.a
    jsr test
    // [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    jmp __b3
    // main::@3
  __b3:
    // [11] call test 
    // [27] phi from main::@3 to test [phi:main::@3->test]
  test_from___b3:
    // [27] phi (byte) test::i#11 = (byte) 3 [phi:main::@3->test#0] -- vbuxx=vbuc1 
    ldx #3
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6 [phi:main::@3->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6
    sta.z test.a
    jsr test
    // [12] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  __b4_from___b3:
    jmp __b4
    // main::@4
  __b4:
    // [13] call test 
    // [27] phi from main::@4 to test [phi:main::@4->test]
  test_from___b4:
    // [27] phi (byte) test::i#11 = (byte) 4 [phi:main::@4->test#0] -- vbuxx=vbuc1 
    ldx #4
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 [phi:main::@4->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6/2
    sta.z test.a
    jsr test
    // [14] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [15] call test 
    // [27] phi from main::@5 to test [phi:main::@5->test]
  test_from___b5:
    // [27] phi (byte) test::i#11 = (byte) 5 [phi:main::@5->test#0] -- vbuxx=vbuc1 
    ldx #5
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 [phi:main::@5->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)
    sta.z test.a
    jsr test
    // [16] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [17] call test 
    // [27] phi from main::@6 to test [phi:main::@6->test]
  test_from___b6:
    // [27] phi (byte) test::i#11 = (byte) 6 [phi:main::@6->test#0] -- vbuxx=vbuc1 
    ldx #6
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 [phi:main::@6->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2
    sta.z test.a
    jsr test
    // [18] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  __b7_from___b6:
    jmp __b7
    // main::@7
  __b7:
    // [19] call test 
    // [27] phi from main::@7 to test [phi:main::@7->test]
  test_from___b7:
    // [27] phi (byte) test::i#11 = (byte) 7 [phi:main::@7->test#0] -- vbuxx=vbuc1 
    ldx #7
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 [phi:main::@7->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1
    sta.z test.a
    jsr test
    // [20] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  __b8_from___b7:
    jmp __b8
    // main::@8
  __b8:
    // [21] call test 
    // [27] phi from main::@8 to test [phi:main::@8->test]
  test_from___b8:
    // [27] phi (byte) test::i#11 = (byte) 8 [phi:main::@8->test#0] -- vbuxx=vbuc1 
    ldx #8
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 [phi:main::@8->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1^6
    sta.z test.a
    jsr test
    // [22] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  __b9_from___b8:
    jmp __b9
    // main::@9
  __b9:
    // [23] call test 
    // [27] phi from main::@9 to test [phi:main::@9->test]
  test_from___b9:
    // [27] phi (byte) test::i#11 = (byte) 9 [phi:main::@9->test#0] -- vbuxx=vbuc1 
    ldx #9
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 [phi:main::@9->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1^6|1
    sta.z test.a
    jsr test
    // [24] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  __b10_from___b9:
    jmp __b10
    // main::@10
  __b10:
    // [25] call test 
    // [27] phi from main::@10 to test [phi:main::@10->test]
  test_from___b10:
    // [27] phi (byte) test::i#11 = (byte) $a [phi:main::@10->test#0] -- vbuxx=vbuc1 
    ldx #$a
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 [phi:main::@10->test#1] -- vbuz1=vbuc1 
    lda #(mod((3+1-1)*6/2,2)<<2>>1^6|1)&1
    sta.z test.a
    jsr test
    jmp __breturn
    // main::@return
  __breturn:
    // [26] return 
    rts
}
  // test
// test(byte register(X) i, byte zp(2) a)
test: {
    .label a = 2
    // [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z a
    sta screen1,x
    // [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda ref,x
    sta screen2,x
    // [30] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 -- pbuc1_derefidx_vbuxx_eq_vbuz1_then_la1 
    lda ref,x
    cmp.z a
    beq __b1
    jmp __b2
    // test::@2
  __b2:
    // [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #RED
    sta cols,x
    jmp __breturn
    // test::@return
  __breturn:
    // [32] return 
    rts
    // test::@1
  __b1:
    // [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #GREEN
    sta cols,x
    jmp __breturn
}
  // File Data
  ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0

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 __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b9
Removing instruction jmp __b10
Removing instruction jmp __breturn
Removing instruction jmp __b2
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __bbegin with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Removing instruction __b1_from_main:
Removing instruction test_from___b1:
Removing instruction __b2_from___b1:
Removing instruction test_from___b2:
Removing instruction __b3_from___b2:
Removing instruction test_from___b3:
Removing instruction __b4_from___b3:
Removing instruction test_from___b4:
Removing instruction __b5_from___b4:
Removing instruction test_from___b5:
Removing instruction __b6_from___b5:
Removing instruction test_from___b6:
Removing instruction __b7_from___b6:
Removing instruction test_from___b7:
Removing instruction __b8_from___b7:
Removing instruction test_from___b8:
Removing instruction __b9_from___b8:
Removing instruction test_from___b9:
Removing instruction __b10_from___b9:
Removing instruction test_from___b10:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction test_from_main:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b7:
Removing instruction __b8:
Removing instruction __b9:
Removing instruction __b10:
Removing instruction __breturn:
Removing instruction __b2:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Replacing jump to rts with rts in jmp __breturn
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction __b1:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte) GREEN = (byte) 5
(const byte) RED = (byte) 2
(const byte*) cols = (byte*) 55296
(void()) main()
(label) main::@1
(label) main::@10
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::a
(byte) main::i
(const byte*) ref[]  = { (byte) 3, (byte) 4, (byte) 3, (byte) $12, (byte) 9, (byte) 1, (byte) 4, (byte) 2, (byte) 4, (byte) 5, (byte) 1, (byte) 0 }
(const byte*) screen1 = (byte*) 1024
(byte*) screen2
(const byte*) screen2#0 screen2 = (const byte*) screen1+(byte) $28
(void()) test((byte) test::i , (byte) test::a)
(label) test::@1
(label) test::@2
(label) test::@return
(byte) test::a
(byte) test::a#11 a zp[1]:2 1.3333333333333333
(byte) test::i
(byte) test::i#11 reg byte x 3.0

zp[1]:2 [ test::a#11 ]
reg byte x [ test::i#11 ]


FINAL ASSEMBLER
Score: 202

  // File Comments
// Test compound assignment operators
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label screen1 = $400
  .label cols = $d800
  .const GREEN = 5
  .const RED = 2
  .label screen2 = screen1+$28
  // @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: {
    // test(i++, a)
    // [5] call test 
    // [27] phi from main to test [phi:main->test]
    // [27] phi (byte) test::i#11 = (byte) 0 [phi:main->test#0] -- vbuxx=vbuc1 
    ldx #0
    // [27] phi (byte) test::a#11 = (byte) 3 [phi:main->test#1] -- vbuz1=vbuc1 
    lda #3
    sta.z test.a
    jsr test
    // [6] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // test(i++, a)
    // [7] call test 
    // [27] phi from main::@1 to test [phi:main::@1->test]
    // [27] phi (byte) test::i#11 = (byte) 1 [phi:main::@1->test#0] -- vbuxx=vbuc1 
    ldx #1
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1 [phi:main::@1->test#1] -- vbuz1=vbuc1 
    lda #3+1
    sta.z test.a
    jsr test
    // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // test(i++, a)
    // [9] call test 
    // [27] phi from main::@2 to test [phi:main::@2->test]
    // [27] phi (byte) test::i#11 = (byte) 2 [phi:main::@2->test#0] -- vbuxx=vbuc1 
    ldx #2
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1 [phi:main::@2->test#1] -- vbuz1=vbuc1 
    lda #3+1-1
    sta.z test.a
    jsr test
    // [10] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // main::@3
    // test(i++, a)
    // [11] call test 
    // [27] phi from main::@3 to test [phi:main::@3->test]
    // [27] phi (byte) test::i#11 = (byte) 3 [phi:main::@3->test#0] -- vbuxx=vbuc1 
    ldx #3
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6 [phi:main::@3->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6
    sta.z test.a
    jsr test
    // [12] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
    // main::@4
    // test(i++, a)
    // [13] call test 
    // [27] phi from main::@4 to test [phi:main::@4->test]
    // [27] phi (byte) test::i#11 = (byte) 4 [phi:main::@4->test#0] -- vbuxx=vbuc1 
    ldx #4
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2 [phi:main::@4->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6/2
    sta.z test.a
    jsr test
    // [14] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // test(i++, a)
    // [15] call test 
    // [27] phi from main::@5 to test [phi:main::@5->test]
    // [27] phi (byte) test::i#11 = (byte) 5 [phi:main::@5->test#0] -- vbuxx=vbuc1 
    ldx #5
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2 [phi:main::@5->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)
    sta.z test.a
    jsr test
    // [16] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // test(i++, a)
    // [17] call test 
    // [27] phi from main::@6 to test [phi:main::@6->test]
    // [27] phi (byte) test::i#11 = (byte) 6 [phi:main::@6->test#0] -- vbuxx=vbuc1 
    ldx #6
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2 [phi:main::@6->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2
    sta.z test.a
    jsr test
    // [18] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
    // main::@7
    // test(i++, a)
    // [19] call test 
    // [27] phi from main::@7 to test [phi:main::@7->test]
    // [27] phi (byte) test::i#11 = (byte) 7 [phi:main::@7->test#0] -- vbuxx=vbuc1 
    ldx #7
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1 [phi:main::@7->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1
    sta.z test.a
    jsr test
    // [20] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
    // main::@8
    // test(i++, a)
    // [21] call test 
    // [27] phi from main::@8 to test [phi:main::@8->test]
    // [27] phi (byte) test::i#11 = (byte) 8 [phi:main::@8->test#0] -- vbuxx=vbuc1 
    ldx #8
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6 [phi:main::@8->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1^6
    sta.z test.a
    jsr test
    // [22] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
    // main::@9
    // test(i++, a)
    // [23] call test 
    // [27] phi from main::@9 to test [phi:main::@9->test]
    // [27] phi (byte) test::i#11 = (byte) 9 [phi:main::@9->test#0] -- vbuxx=vbuc1 
    ldx #9
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1 [phi:main::@9->test#1] -- vbuz1=vbuc1 
    lda #mod((3+1-1)*6/2,2)<<2>>1^6|1
    sta.z test.a
    jsr test
    // [24] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
    // main::@10
    // test(i++, a)
    // [25] call test 
    // [27] phi from main::@10 to test [phi:main::@10->test]
    // [27] phi (byte) test::i#11 = (byte) $a [phi:main::@10->test#0] -- vbuxx=vbuc1 
    ldx #$a
    // [27] phi (byte) test::a#11 = (byte) 3+(byte) 1-(byte) 1*(byte) 6/(byte) 2%(byte) 2<<(byte) 2>>(byte) 1^(byte) 6|(byte) 1&(byte) 1 [phi:main::@10->test#1] -- vbuz1=vbuc1 
    lda #(mod((3+1-1)*6/2,2)<<2>>1^6|1)&1
    sta.z test.a
    jsr test
    // main::@return
    // }
    // [26] return 
    rts
}
  // test
// test(byte register(X) i, byte zp(2) a)
test: {
    .label a = 2
    // screen1[i] = a
    // [28] *((const byte*) screen1 + (byte) test::i#11) ← (byte) test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z a
    sta screen1,x
    // screen2[i] = ref[i]
    // [29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte*) ref + (byte) test::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda ref,x
    sta screen2,x
    // if(ref[i]==a)
    // [30] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 -- pbuc1_derefidx_vbuxx_eq_vbuz1_then_la1 
    lda ref,x
    cmp.z a
    beq __b1
    // test::@2
    // cols[i] = RED
    // [31] *((const byte*) cols + (byte) test::i#11) ← (const byte) RED -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #RED
    sta cols,x
    // test::@return
    // }
    // [32] return 
    rts
    // test::@1
  __b1:
    // cols[i] = GREEN
    // [33] *((const byte*) cols + (byte) test::i#11) ← (const byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #GREEN
    sta cols,x
    rts
}
  // File Data
  ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0

