Inlined call call __init
Eliminating unused variable with no statement __start::__init1_$0

CONTROL FLOW GRAPH SSA

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

void test(char i , char 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
  screen2#2 = phi( main/screen2#4, main::@1/screen2#5, main::@10/screen2#6, main::@2/screen2#7, main::@3/screen2#8, main::@4/screen2#9, main::@5/screen2#10, main::@6/screen2#11, main::@7/screen2#12, main::@8/screen2#13, main::@9/screen2#14 )
  test::i#11 = phi( main/test::i#0, main::@1/test::i#1, main::@10/test::i#10, main::@2/test::i#2, main::@3/test::i#3, main::@4/test::i#4, main::@5/test::i#5, main::@6/test::i#6, main::@7/test::i#7, main::@8/test::i#8, main::@9/test::i#9 )
  test::a#11 = phi( main/test::a#0, main::@1/test::a#1, main::@10/test::a#10, main::@2/test::a#2, main::@3/test::a#3, main::@4/test::a#4, main::@5/test::a#5, main::@6/test::a#6, main::@7/test::a#7, main::@8/test::a#8, main::@9/test::a#9 )
  screen1[test::i#11] = test::a#11
  screen2#2[test::i#11] = ref[test::i#11]
  test::$0 = ref[test::i#11] == test::a#11
  if(test::$0) goto test::@1
  to:test::@2
test::@1: scope:[test]  from test
  test::i#12 = phi( test/test::i#11 )
  cols[test::i#12] = GREEN
  to:test::@return
test::@2: scope:[test]  from test
  test::i#13 = phi( test/test::i#11 )
  cols[test::i#13] = RED
  to:test::@return
test::@return: scope:[test]  from test::@1 test::@2
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  screen2#0 = screen1 + $28
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  screen2#16 = phi( __start::__init1/screen2#0 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  screen2#15 = phi( __start::@1/screen2#16 )
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  screen2#3 = phi( __start::@2/screen2#15 )
  screen2#1 = screen2#3
  return 
  to:@return

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

Adding number conversion cast (unumber) 1 in main::a#1 = main::a#11 + 1
Adding number conversion cast (unumber) 1 in main::a#2 = main::a#12 - 1
Adding number conversion cast (unumber) 6 in main::a#3 = main::a#13 * 6
Adding number conversion cast (unumber) 2 in main::a#4 = main::a#14 / 2
Adding number conversion cast (unumber) 2 in main::a#5 = main::a#15 % 2
Adding number conversion cast (unumber) 2 in main::a#6 = main::a#16 << 2
Adding number conversion cast (unumber) 1 in main::a#7 = main::a#17 >> 1
Adding number conversion cast (unumber) 6 in main::a#8 = main::a#18 ^ 6
Adding number conversion cast (unumber) 1 in main::a#9 = main::a#19 | 1
Adding number conversion cast (unumber) 1 in main::a#10 = main::a#20 & 1
Adding number conversion cast (unumber) $28 in screen2#0 = screen1 + $28
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (char *) 1024
Simplifying constant pointer cast (char *) 55296
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
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 6
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 6
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::i#0 = main::i#12 
Alias main::a#0 = main::a#11 
Alias screen2#10 = screen2#5 screen2#4 screen2#7 screen2#8 screen2#9 screen2#11 screen2#12 screen2#13 screen2#14 screen2#6 
Alias main::i#1 = main::i#13 
Alias main::a#1 = main::a#12 
Alias main::i#14 = main::i#2 
Alias main::a#13 = main::a#2 
Alias main::i#15 = main::i#3 
Alias main::a#14 = main::a#3 
Alias main::i#16 = main::i#4 
Alias main::a#15 = main::a#4 
Alias main::i#17 = main::i#5 
Alias main::a#16 = main::a#5 
Alias main::i#18 = main::i#6 
Alias main::a#17 = main::a#6 
Alias main::i#19 = main::i#7 
Alias main::a#18 = main::a#7 
Alias main::i#20 = main::i#8 
Alias main::a#19 = main::a#8 
Alias main::i#21 = main::i#9 
Alias main::a#20 = main::a#9 
Alias main::i#10 = main::i#22 
Alias test::i#11 = test::i#12 test::i#13 
Alias screen2#0 = screen2#16 screen2#15 screen2#3 screen2#1 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values screen2#10 screen2#0
Identical Phi Values screen2#2 screen2#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition test::$0 [62] if(ref[test::i#11]==test::a#11) goto test::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [66] screen2#0 = screen1 + $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#0 = 0
Constant main::a#0 = 3
Constant screen2#0 = screen1+$28
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#0 = main::i#0
Constant test::a#0 = main::a#0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused variable main::i#11 and assignment [51] main::i#11 = ++ main::i#10
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Constant right-side identified [1] main::i#1 = ++ main::i#0
Constant right-side identified [2] main::a#1 = main::a#0 + 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#1 = ++main::i#0
Constant main::a#1 = main::a#0+1
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#1 = main::i#1
Constant test::a#1 = main::a#1
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] main::i#14 = ++ main::i#1
Constant right-side identified [3] main::a#13 = main::a#1 - 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#14 = ++main::i#1
Constant main::a#13 = main::a#1-1
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#2 = main::i#14
Constant test::a#2 = main::a#13
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [3] main::i#15 = ++ main::i#14
Constant right-side identified [4] main::a#14 = main::a#13 * 6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#15 = ++main::i#14
Constant main::a#14 = main::a#13*6
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#3 = main::i#15
Constant test::a#3 = main::a#14
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [4] main::i#16 = ++ main::i#15
Constant right-side identified [5] main::a#15 = main::a#14 / 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#16 = ++main::i#15
Constant main::a#15 = main::a#14/2
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#4 = main::i#16
Constant test::a#4 = main::a#15
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [5] main::i#17 = ++ main::i#16
Constant right-side identified [6] main::a#16 = main::a#15 % 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#17 = ++main::i#16
Constant main::a#16 = main::a#15%2
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#5 = main::i#17
Constant test::a#5 = main::a#16
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [6] main::i#18 = ++ main::i#17
Constant right-side identified [7] main::a#17 = main::a#16 << 2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#18 = ++main::i#17
Constant main::a#17 = main::a#16<<2
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#6 = main::i#18
Constant test::a#6 = main::a#17
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [7] main::i#19 = ++ main::i#18
Constant right-side identified [8] main::a#18 = main::a#17 >> 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#19 = ++main::i#18
Constant main::a#18 = main::a#17>>1
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#7 = main::i#19
Constant test::a#7 = main::a#18
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [8] main::i#20 = ++ main::i#19
Constant right-side identified [9] main::a#19 = main::a#18 ^ 6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#20 = ++main::i#19
Constant main::a#19 = main::a#18^6
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#8 = main::i#20
Constant test::a#8 = main::a#19
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [9] main::i#21 = ++ main::i#20
Constant right-side identified [10] main::a#20 = main::a#19 | 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#21 = ++main::i#20
Constant main::a#20 = main::a#19|1
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#9 = main::i#21
Constant test::a#9 = main::a#20
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [10] main::i#10 = ++ main::i#21
Constant right-side identified [11] main::a#10 = main::a#20 & 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::i#10 = ++main::i#21
Constant main::a#10 = main::a#20&1
Successful SSA optimization Pass2ConstantIdentification
Constant test::i#10 = main::i#10
Constant test::a#10 = main::a#10
Successful SSA optimization Pass2ConstantIdentification
Rewriting power 2 modulo to use AND main::a#15 & 2-1
Successful SSA optimization Pass2ModuloToAndRewriting
Inlining constant with different constant siblings main::i#0
Inlining constant with different constant siblings main::a#0
Inlining constant with different constant siblings main::i#1
Inlining constant with different constant siblings main::a#1
Inlining constant with different constant siblings main::i#14
Inlining constant with different constant siblings main::a#13
Inlining constant with different constant siblings main::i#15
Inlining constant with different constant siblings main::a#14
Inlining constant with different constant siblings main::i#16
Inlining constant with different constant siblings main::a#15
Inlining constant with different constant siblings main::i#17
Inlining constant with different constant siblings main::a#16
Inlining constant with different constant siblings main::i#18
Inlining constant with different constant siblings main::a#17
Inlining constant with different constant siblings main::i#19
Inlining constant with different constant siblings main::a#18
Inlining constant with different constant siblings main::i#20
Inlining constant with different constant siblings main::a#19
Inlining constant with different constant siblings main::i#21
Inlining constant with different constant siblings main::a#20
Inlining constant with different constant siblings main::i#10
Inlining constant with different constant siblings main::a#10
Inlining constant with var siblings test::i#0
Inlining constant with var siblings test::a#0
Inlining constant with var siblings test::i#1
Inlining constant with var siblings test::a#1
Inlining constant with var siblings test::i#2
Inlining constant with var siblings test::a#2
Inlining constant with var siblings test::i#3
Inlining constant with var siblings test::a#3
Inlining constant with var siblings test::i#4
Inlining constant with var siblings test::a#4
Inlining constant with var siblings test::i#5
Inlining constant with var siblings test::a#5
Inlining constant with var siblings test::i#6
Inlining constant with var siblings test::a#6
Inlining constant with var siblings test::i#7
Inlining constant with var siblings test::a#7
Inlining constant with var siblings test::i#8
Inlining constant with var siblings test::a#8
Inlining constant with var siblings test::i#9
Inlining constant with var siblings test::a#9
Inlining constant with var siblings test::i#10
Inlining constant with var siblings test::a#10
Constant inlined test::i#1 = ++0
Constant inlined test::a#8 = 3+1-1*6/2&2-1<<2>>1^6
Constant inlined test::i#0 = 0
Constant inlined test::a#9 = 3+1-1*6/2&2-1<<2>>1^6|1
Constant inlined test::i#3 = ++++++0
Constant inlined test::i#2 = ++++0
Constant inlined test::a#4 = 3+1-1*6/2
Constant inlined main::i#21 = ++++++++++++++++++0
Constant inlined test::a#5 = 3+1-1*6/2&2-1
Constant inlined test::a#6 = 3+1-1*6/2&2-1<<2
Constant inlined test::a#7 = 3+1-1*6/2&2-1<<2>>1
Constant inlined main::i#20 = ++++++++++++++++0
Constant inlined test::i#9 = ++++++++++++++++++0
Constant inlined test::i#8 = ++++++++++++++++0
Constant inlined main::a#20 = 3+1-1*6/2&2-1<<2>>1^6|1
Constant inlined test::a#10 = 3+1-1*6/2&2-1<<2>>1^6|1&1
Constant inlined test::i#5 = ++++++++++0
Constant inlined test::i#4 = ++++++++0
Constant inlined test::i#7 = ++++++++++++++0
Constant inlined test::i#6 = ++++++++++++0
Constant inlined test::i#10 = ++++++++++++++++++++0
Constant inlined main::a#0 = 3
Constant inlined main::a#19 = 3+1-1*6/2&2-1<<2>>1^6
Constant inlined main::a#18 = 3+1-1*6/2&2-1<<2>>1
Constant inlined main::a#17 = 3+1-1*6/2&2-1<<2
Constant inlined main::a#1 = 3+1
Constant inlined main::a#16 = 3+1-1*6/2&2-1
Constant inlined main::i#0 = 0
Constant inlined main::i#1 = ++0
Constant inlined main::i#14 = ++++0
Constant inlined main::i#15 = ++++++0
Constant inlined main::i#10 = ++++++++++++++++++++0
Constant inlined main::a#10 = 3+1-1*6/2&2-1<<2>>1^6|1&1
Constant inlined main::a#15 = 3+1-1*6/2
Constant inlined main::i#18 = ++++++++++++0
Constant inlined main::a#14 = 3+1-1*6
Constant inlined main::i#19 = ++++++++++++++0
Constant inlined main::a#13 = 3+1-1
Constant inlined main::i#16 = ++++++++0
Constant inlined main::i#17 = ++++++++++0
Constant inlined test::a#0 = 3
Constant inlined test::a#1 = 3+1
Constant inlined test::a#2 = 3+1-1
Constant inlined test::a#3 = 3+1-1*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 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 [main] to test:1 test:3 test:5 test:7 test:9 test:11 test:13 test:15 test:17 test:19 test:21 

Created 2 initial phi equivalence classes
Coalesced down to 2 phi equivalence classes
Culled Empty Block label main::@11
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

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

void test(char i , char 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
  [23] test::i#11 = phi( main/0, main::@1/1, main::@10/$a, main::@2/2, main::@3/3, main::@4/4, main::@5/5, main::@6/6, main::@7/7, main::@8/8, main::@9/9 )
  [23] test::a#11 = phi( main/3, main::@1/3+1, main::@10/3+1-1*6/2&2-1<<2>>1^6|1&1, main::@2/3+1-1, main::@3/3+1-1*6, main::@4/3+1-1*6/2, main::@5/3+1-1*6/2&2-1, main::@6/3+1-1*6/2&2-1<<2, main::@7/3+1-1*6/2&2-1<<2>>1, main::@8/3+1-1*6/2&2-1<<2>>1^6, main::@9/3+1-1*6/2&2-1<<2>>1^6|1 )
  [24] screen1[test::i#11] = test::a#11
  [25] screen2#0[test::i#11] = ref[test::i#11]
  [26] if(ref[test::i#11]==test::a#11) goto test::@1
  to:test::@2
test::@2: scope:[test]  from test
  [27] cols[test::i#11] = RED
  to:test::@return
test::@return: scope:[test]  from test::@1 test::@2
  [28] return 
  to:@return
test::@1: scope:[test]  from test
  [29] cols[test::i#11] = GREEN
  to:test::@return


VARIABLE REGISTER WEIGHTS
void main()
char main::a
char main::i
char *screen2
void test(char i , char a)
char test::a
char test::a#11 // 7.333333333333333
char test::i
char test::i#11 // 16.5

Initial phi equivalence classes
[ test::a#11 ]
[ test::i#11 ]
Complete equivalence classes
[ test::a#11 ]
[ test::i#11 ]
Allocated zp[1]:2 [ test::i#11 ]
Allocated zp[1]:3 [ test::a#11 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [25] screen2#0[test::i#11] = ref[test::i#11] [ test::a#11 test::i#11 ] ( test:1 [ test::a#11 test::i#11 ] { }  test:3 [ test::a#11 test::i#11 ] { }  test:5 [ test::a#11 test::i#11 ] { }  test:7 [ test::a#11 test::i#11 ] { }  test:9 [ test::a#11 test::i#11 ] { }  test:11 [ test::a#11 test::i#11 ] { }  test:13 [ test::a#11 test::i#11 ] { }  test:15 [ test::a#11 test::i#11 ] { }  test:17 [ test::a#11 test::i#11 ] { }  test:19 [ test::a#11 test::i#11 ] { }  test:21 [ test::a#11 test::i#11 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:3 [ test::a#11 ]
Removing always clobbered register reg byte a as potential for zp[1]:2 [ test::i#11 ]
Statement [26] if(ref[test::i#11]==test::a#11) goto test::@1 [ test::i#11 ] ( test:1 [ test::i#11 ] { }  test:3 [ test::i#11 ] { }  test:5 [ test::i#11 ] { }  test:7 [ test::i#11 ] { }  test:9 [ test::i#11 ] { }  test:11 [ test::i#11 ] { }  test:13 [ test::i#11 ] { }  test:15 [ test::i#11 ] { }  test:17 [ test::i#11 ] { }  test:19 [ test::i#11 ] { }  test:21 [ test::i#11 ] { }  ) always clobbers reg byte a 
Statement [27] cols[test::i#11] = RED [ ] ( test:1 [ ] { }  test:3 [ ] { }  test:5 [ ] { }  test:7 [ ] { }  test:9 [ ] { }  test:11 [ ] { }  test:13 [ ] { }  test:15 [ ] { }  test:17 [ ] { }  test:19 [ ] { }  test:21 [ ] { }  ) always clobbers reg byte a 
Statement [29] cols[test::i#11] = GREEN [ ] ( test:1 [ ] { }  test:3 [ ] { }  test:5 [ ] { }  test:7 [ ] { }  test:9 [ ] { }  test:11 [ ] { }  test:13 [ ] { }  test:15 [ ] { }  test:17 [ ] { }  test:19 [ ] { }  test:21 [ ] { }  ) always clobbers reg byte a 
Statement [24] screen1[test::i#11] = test::a#11 [ test::a#11 test::i#11 ] ( test:1 [ test::a#11 test::i#11 ] { }  test:3 [ test::a#11 test::i#11 ] { }  test:5 [ test::a#11 test::i#11 ] { }  test:7 [ test::a#11 test::i#11 ] { }  test:9 [ test::a#11 test::i#11 ] { }  test:11 [ test::a#11 test::i#11 ] { }  test:13 [ test::a#11 test::i#11 ] { }  test:15 [ test::a#11 test::i#11 ] { }  test:17 [ test::a#11 test::i#11 ] { }  test:19 [ test::a#11 test::i#11 ] { }  test:21 [ test::a#11 test::i#11 ] { }  ) always clobbers reg byte a 
Statement [25] screen2#0[test::i#11] = ref[test::i#11] [ test::a#11 test::i#11 ] ( test:1 [ test::a#11 test::i#11 ] { }  test:3 [ test::a#11 test::i#11 ] { }  test:5 [ test::a#11 test::i#11 ] { }  test:7 [ test::a#11 test::i#11 ] { }  test:9 [ test::a#11 test::i#11 ] { }  test:11 [ test::a#11 test::i#11 ] { }  test:13 [ test::a#11 test::i#11 ] { }  test:15 [ test::a#11 test::i#11 ] { }  test:17 [ test::a#11 test::i#11 ] { }  test:19 [ test::a#11 test::i#11 ] { }  test:21 [ test::a#11 test::i#11 ] { }  ) always clobbers reg byte a 
Statement [26] if(ref[test::i#11]==test::a#11) goto test::@1 [ test::i#11 ] ( test:1 [ test::i#11 ] { }  test:3 [ test::i#11 ] { }  test:5 [ test::i#11 ] { }  test:7 [ test::i#11 ] { }  test:9 [ test::i#11 ] { }  test:11 [ test::i#11 ] { }  test:13 [ test::i#11 ] { }  test:15 [ test::i#11 ] { }  test:17 [ test::i#11 ] { }  test:19 [ test::i#11 ] { }  test:21 [ test::i#11 ] { }  ) always clobbers reg byte a 
Statement [27] cols[test::i#11] = RED [ ] ( test:1 [ ] { }  test:3 [ ] { }  test:5 [ ] { }  test:7 [ ] { }  test:9 [ ] { }  test:11 [ ] { }  test:13 [ ] { }  test:15 [ ] { }  test:17 [ ] { }  test:19 [ ] { }  test:21 [ ] { }  ) always clobbers reg byte a 
Statement [29] cols[test::i#11] = GREEN [ ] ( test:1 [ ] { }  test:3 [ ] { }  test:5 [ ] { }  test:7 [ ] { }  test:9 [ ] { }  test:11 [ ] { }  test:13 [ ] { }  test:15 [ ] { }  test:17 [ ] { }  test:19 [ ] { }  test:21 [ ] { }  ) always clobbers reg byte a 
Potential registers zp[1]:3 [ test::a#11 ] : zp[1]:3 , reg byte x , reg byte y , 
Potential registers zp[1]:2 [ test::i#11 ] : zp[1]:2 , reg byte x , reg byte y , 

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

Uplifting [test] best 238 combination reg byte x [ test::i#11 ] zp[1]:3 [ test::a#11 ] 
Uplifting [main] best 238 combination 
Uplifting [] best 238 combination 
Attempting to uplift remaining variables inzp[1]:3 [ test::a#11 ]
Uplifting [test] best 238 combination zp[1]:3 [ test::a#11 ] 
Allocated (was zp[1]:3) zp[1]:2 [ test::a#11 ]

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

ASSEMBLER OPTIMIZATIONS
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
Removing instruction __b1_from_main:
Removing instruction __b2_from___b1:
Removing instruction __b3_from___b2:
Removing instruction __b4_from___b3:
Removing instruction __b5_from___b4:
Removing instruction __b6_from___b5:
Removing instruction __b7_from___b6:
Removing instruction __b8_from___b7:
Removing instruction __b9_from___b8:
Removing instruction __b10_from___b9:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction test_from_main:
Removing instruction __b1:
Removing instruction test_from___b1:
Removing instruction __b2:
Removing instruction test_from___b2:
Removing instruction __b3:
Removing instruction test_from___b3:
Removing instruction __b4:
Removing instruction test_from___b4:
Removing instruction __b5:
Removing instruction test_from___b5:
Removing instruction __b6:
Removing instruction test_from___b6:
Removing instruction __b7:
Removing instruction test_from___b7:
Removing instruction __b8:
Removing instruction test_from___b8:
Removing instruction __b9:
Removing instruction test_from___b9:
Removing instruction __b10:
Removing instruction test_from___b10:
Removing instruction __breturn:
Removing instruction __b2:
Succesful ASM optimization Pass5UnusedLabelElimination
Replacing jump to rts with rts in jmp __breturn
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
__constant char GREEN = 5
__constant char RED = 2
__constant char *cols = (char *) 55296
void main()
char main::a
char main::i
__constant char ref[] = { 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0 }
__constant char *screen1 = (char *) 1024
char *screen2
__constant char *screen2#0 = screen1+$28 // screen2
void test(char i , char a)
char test::a
char test::a#11 // a zp[1]:2 7.333333333333333
char test::i
char test::i#11 // reg byte x 16.5

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


FINAL ASSEMBLER
Score: 202

  // File Comments
// Test compound assignment operators
  // Upstart
  // Commodore 64 PRG executable file
.file [name="assignment-compound.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  .const GREEN = 5
  .const RED = 2
  .label screen1 = $400
  .label cols = $d800
  .label screen2 = screen1+$28
.segment Code
  // main
main: {
    // test(i++, a)
    // [1] call test
  //3
    // [23] phi from main to test [phi:main->test]
    // [23] phi test::i#11 = 0 [phi:main->test#0] -- vbuxx=vbuc1 
    ldx #0
    // [23] phi test::a#11 = 3 [phi:main->test#1] -- vbuz1=vbuc1 
    lda #3
    sta.z test.a
    jsr test
    // [2] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // test(i++, a)
    // [3] call test
  //4
    // [23] phi from main::@1 to test [phi:main::@1->test]
    // [23] phi test::i#11 = 1 [phi:main::@1->test#0] -- vbuxx=vbuc1 
    ldx #1
    // [23] phi test::a#11 = 3+1 [phi:main::@1->test#1] -- vbuz1=vbuc1 
    lda #3+1
    sta.z test.a
    jsr test
    // [4] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // test(i++, a)
    // [5] call test
  //3
    // [23] phi from main::@2 to test [phi:main::@2->test]
    // [23] phi test::i#11 = 2 [phi:main::@2->test#0] -- vbuxx=vbuc1 
    ldx #2
    // [23] phi test::a#11 = 3+1-1 [phi:main::@2->test#1] -- vbuz1=vbuc1 
    lda #3+1-1
    sta.z test.a
    jsr test
    // [6] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // main::@3
    // test(i++, a)
    // [7] call test
  //18
    // [23] phi from main::@3 to test [phi:main::@3->test]
    // [23] phi test::i#11 = 3 [phi:main::@3->test#0] -- vbuxx=vbuc1 
    ldx #3
    // [23] phi test::a#11 = 3+1-1*6 [phi:main::@3->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6
    sta.z test.a
    jsr test
    // [8] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
    // main::@4
    // test(i++, a)
    // [9] call test
  //9
    // [23] phi from main::@4 to test [phi:main::@4->test]
    // [23] phi test::i#11 = 4 [phi:main::@4->test#0] -- vbuxx=vbuc1 
    ldx #4
    // [23] phi test::a#11 = 3+1-1*6/2 [phi:main::@4->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6/2
    sta.z test.a
    jsr test
    // [10] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // test(i++, a)
    // [11] call test
  //1
    // [23] phi from main::@5 to test [phi:main::@5->test]
    // [23] phi test::i#11 = 5 [phi:main::@5->test#0] -- vbuxx=vbuc1 
    ldx #5
    // [23] phi test::a#11 = 3+1-1*6/2&2-1 [phi:main::@5->test#1] -- vbuz1=vbuc1 
    lda #(3+1-1)*6/2&2-1
    sta.z test.a
    jsr test
    // [12] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // test(i++, a)
    // [13] call test
  //4
    // [23] phi from main::@6 to test [phi:main::@6->test]
    // [23] phi test::i#11 = 6 [phi:main::@6->test#0] -- vbuxx=vbuc1 
    ldx #6
    // [23] phi test::a#11 = 3+1-1*6/2&2-1<<2 [phi:main::@6->test#1] -- vbuz1=vbuc1 
    lda #((3+1-1)*6/2&2-1)<<2
    sta.z test.a
    jsr test
    // [14] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
    // main::@7
    // test(i++, a)
    // [15] call test
  //2
    // [23] phi from main::@7 to test [phi:main::@7->test]
    // [23] phi test::i#11 = 7 [phi:main::@7->test#0] -- vbuxx=vbuc1 
    ldx #7
    // [23] phi test::a#11 = 3+1-1*6/2&2-1<<2>>1 [phi:main::@7->test#1] -- vbuz1=vbuc1 
    lda #((3+1-1)*6/2&2-1)<<2>>1
    sta.z test.a
    jsr test
    // [16] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
    // main::@8
    // test(i++, a)
    // [17] call test
  //4
    // [23] phi from main::@8 to test [phi:main::@8->test]
    // [23] phi test::i#11 = 8 [phi:main::@8->test#0] -- vbuxx=vbuc1 
    ldx #8
    // [23] phi test::a#11 = 3+1-1*6/2&2-1<<2>>1^6 [phi:main::@8->test#1] -- vbuz1=vbuc1 
    lda #((3+1-1)*6/2&2-1)<<2>>1^6
    sta.z test.a
    jsr test
    // [18] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
    // main::@9
    // test(i++, a)
    // [19] call test
  //5
    // [23] phi from main::@9 to test [phi:main::@9->test]
    // [23] phi test::i#11 = 9 [phi:main::@9->test#0] -- vbuxx=vbuc1 
    ldx #9
    // [23] phi test::a#11 = 3+1-1*6/2&2-1<<2>>1^6|1 [phi:main::@9->test#1] -- vbuz1=vbuc1 
    lda #((3+1-1)*6/2&2-1)<<2>>1^6|1
    sta.z test.a
    jsr test
    // [20] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
    // main::@10
    // test(i++, a)
    // [21] call test
  //1
    // [23] phi from main::@10 to test [phi:main::@10->test]
    // [23] phi test::i#11 = $a [phi:main::@10->test#0] -- vbuxx=vbuc1 
    ldx #$a
    // [23] phi test::a#11 = 3+1-1*6/2&2-1<<2>>1^6|1&1 [phi:main::@10->test#1] -- vbuz1=vbuc1 
    lda #(((3+1-1)*6/2&2-1)<<2>>1^6|1)&1
    sta.z test.a
    jsr test
    // main::@return
    // }
    // [22] return 
    rts
}
  // test
// void test(__register(X) char i, __zp(2) char a)
test: {
    .label a = 2
    // screen1[i] = a
    // [24] screen1[test::i#11] = test::a#11 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z a
    sta screen1,x
    // screen2[i] = ref[i]
    // [25] screen2#0[test::i#11] = ref[test::i#11] -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx 
    lda ref,x
    sta screen2,x
    // if(ref[i]==a)
    // [26] if(ref[test::i#11]==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
    // [27] cols[test::i#11] = RED -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #RED
    sta cols,x
    // test::@return
    // }
    // [28] return 
    rts
    // test::@1
  __b1:
    // cols[i] = GREEN
    // [29] cols[test::i#11] = GREEN -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #GREEN
    sta cols,x
    rts
}
  // File Data
.segment Data
  ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0

