
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  main::cycles#0 = 0
  main::bytes#0 = 0
  main::uses#0 = 0
  main::clobbers#0 = 0
  main::resource#0 = 0
  main::j#0 = 0
  main::i#0 = 0
  to:main::@1
main::@1: scope:[main]  from main main::@2
  main::resource#3 = phi( main/main::resource#0, main::@2/main::resource#1 )
  main::clobbers#3 = phi( main/main::clobbers#0, main::@2/main::clobbers#1 )
  main::uses#3 = phi( main/main::uses#0, main::@2/main::uses#1 )
  main::bytes#3 = phi( main/main::bytes#0, main::@2/main::bytes#1 )
  main::j#7 = phi( main/main::j#0, main::@2/main::j#5 )
  main::cycles#3 = phi( main/main::cycles#0, main::@2/main::cycles#1 )
  main::i#2 = phi( main/main::i#0, main::@2/main::i#1 )
  main::$0 = main::i#2 < $14
  if(main::$0) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  main::i#3 = phi( main::@1/main::i#2 )
  main::resource#2 = phi( main::@1/main::resource#3 )
  main::clobbers#2 = phi( main::@1/main::clobbers#3 )
  main::uses#2 = phi( main::@1/main::uses#3 )
  main::bytes#2 = phi( main::@1/main::bytes#3 )
  main::j#6 = phi( main::@1/main::j#7 )
  main::cycles#2 = phi( main::@1/main::cycles#3 )
  SCREEN[main::j#6] = main::cycles#2
  main::j#1 = ++ main::j#6
  SCREEN[main::j#1] = main::bytes#2
  main::j#2 = ++ main::j#1
  SCREEN[main::j#2] = main::uses#2
  main::j#3 = ++ main::j#2
  SCREEN[main::j#3] = main::clobbers#2
  main::j#4 = ++ main::j#3
  SCREEN[main::j#4] = main::resource#2
  main::j#5 = ++ main::j#4
  main::cycles#1 = main::cycles#2 + 1
  main::bytes#1 = main::bytes#2 + 2
  main::uses#1 = main::uses#2 + 3
  main::clobbers#1 = main::clobbers#2 + 4
  main::resource#1 = main::resource#2 + 5
  main::i#1 = ++ main::i#3
  to:main::@1
main::@return: scope:[main]  from main::@1
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  call main
  to:__start::@1
__start::@1: scope:[__start]  from __start
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  return 
  to:@return

SYMBOL TABLE SSA
__constant char * const SCREEN = (char *)$400
void __start()
void main()
bool main::$0
char main::bytes
char main::bytes#0
char main::bytes#1
char main::bytes#2
char main::bytes#3
char main::clobbers
char main::clobbers#0
char main::clobbers#1
char main::clobbers#2
char main::clobbers#3
char main::cycles
char main::cycles#0
char main::cycles#1
char main::cycles#2
char main::cycles#3
char main::i
char main::i#0
char main::i#1
char main::i#2
char main::i#3
char main::j
char main::j#0
char main::j#1
char main::j#2
char main::j#3
char main::j#4
char main::j#5
char main::j#6
char main::j#7
char main::resource
char main::resource#0
char main::resource#1
char main::resource#2
char main::resource#3
char main::uses
char main::uses#0
char main::uses#1
char main::uses#2
char main::uses#3

Adding number conversion cast (unumber) $14 in main::$0 = main::i#2 < $14
Adding number conversion cast (unumber) 1 in main::cycles#1 = main::cycles#2 + 1
Adding number conversion cast (unumber) 2 in main::bytes#1 = main::bytes#2 + 2
Adding number conversion cast (unumber) 3 in main::uses#1 = main::uses#2 + 3
Adding number conversion cast (unumber) 4 in main::clobbers#1 = main::clobbers#2 + 4
Adding number conversion cast (unumber) 5 in main::resource#1 = main::resource#2 + 5
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (char *) 1024
Simplifying constant integer cast $14
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $14
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 3
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) 5
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias main::cycles#2 = main::cycles#3 
Alias main::j#6 = main::j#7 
Alias main::bytes#2 = main::bytes#3 
Alias main::uses#2 = main::uses#3 
Alias main::clobbers#2 = main::clobbers#3 
Alias main::resource#2 = main::resource#3 
Alias main::i#2 = main::i#3 
Successful SSA optimization Pass2AliasElimination
Simple Condition main::$0 [9] if(main::i#2<$14) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::cycles#0 = 0
Constant main::bytes#0 = 0
Constant main::uses#0 = 0
Constant main::clobbers#0 = 0
Constant main::resource#0 = 0
Constant main::j#0 = 0
Constant main::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Inlining constant with var siblings main::cycles#0
Inlining constant with var siblings main::bytes#0
Inlining constant with var siblings main::uses#0
Inlining constant with var siblings main::clobbers#0
Inlining constant with var siblings main::resource#0
Inlining constant with var siblings main::j#0
Inlining constant with var siblings main::i#0
Constant inlined main::cycles#0 = 0
Constant inlined main::bytes#0 = 0
Constant inlined main::i#0 = 0
Constant inlined main::uses#0 = 0
Constant inlined main::resource#0 = 0
Constant inlined main::clobbers#0 = 0
Constant inlined main::j#0 = 0
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of main
CALL GRAPH

Created 7 initial phi equivalence classes
Coalesced [20] main::i#4 = main::i#1
Coalesced [21] main::cycles#4 = main::cycles#1
Coalesced [22] main::j#8 = main::j#5
Coalesced [23] main::bytes#4 = main::bytes#1
Coalesced [24] main::uses#4 = main::uses#1
Coalesced [25] main::clobbers#4 = main::clobbers#1
Coalesced [26] main::resource#4 = main::resource#1
Coalesced down to 7 phi equivalence classes
Adding NOP phi() at start of main

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  to:main::@1
main::@1: scope:[main]  from main main::@2
  [1] main::resource#2 = phi( main/0, main::@2/main::resource#1 )
  [1] main::clobbers#2 = phi( main/0, main::@2/main::clobbers#1 )
  [1] main::uses#2 = phi( main/0, main::@2/main::uses#1 )
  [1] main::bytes#2 = phi( main/0, main::@2/main::bytes#1 )
  [1] main::j#6 = phi( main/0, main::@2/main::j#5 )
  [1] main::cycles#2 = phi( main/0, main::@2/main::cycles#1 )
  [1] main::i#2 = phi( main/0, main::@2/main::i#1 )
  [2] if(main::i#2<$14) goto main::@2
  to:main::@return
main::@return: scope:[main]  from main::@1
  [3] return 
  to:@return
main::@2: scope:[main]  from main::@1
  [4] SCREEN[main::j#6] = main::cycles#2
  [5] main::j#1 = ++ main::j#6
  [6] SCREEN[main::j#1] = main::bytes#2
  [7] main::j#2 = ++ main::j#1
  [8] SCREEN[main::j#2] = main::uses#2
  [9] main::j#3 = ++ main::j#2
  [10] SCREEN[main::j#3] = main::clobbers#2
  [11] main::j#4 = ++ main::j#3
  [12] SCREEN[main::j#4] = main::resource#2
  [13] main::j#5 = ++ main::j#4
  [14] main::cycles#1 = main::cycles#2 + 1
  [15] main::bytes#1 = main::bytes#2 + 2
  [16] main::uses#1 = main::uses#2 + 3
  [17] main::clobbers#1 = main::clobbers#2 + 4
  [18] main::resource#1 = main::resource#2 + 5
  [19] main::i#1 = ++ main::i#2
  to:main::@1


VARIABLE REGISTER WEIGHTS
void main()
char main::bytes
char main::bytes#1 // 4.4
char main::bytes#2 // 2.5384615384615383
char main::clobbers
char main::clobbers#1 // 7.333333333333333
char main::clobbers#2 // 2.1999999999999997
char main::cycles
char main::cycles#1 // 3.6666666666666665
char main::cycles#2 // 2.75
char main::i
char main::i#1 // 22.0
char main::i#2 // 1.9411764705882355
char main::j
char main::j#1 // 16.5
char main::j#2 // 16.5
char main::j#3 // 16.5
char main::j#4 // 16.5
char main::j#5 // 3.142857142857143
char main::j#6 // 11.0
char main::resource
char main::resource#1 // 11.0
char main::resource#2 // 2.0625
char main::uses
char main::uses#1 // 5.5
char main::uses#2 // 2.357142857142857

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ main::cycles#2 main::cycles#1 ]
[ main::j#6 main::j#5 ]
[ main::bytes#2 main::bytes#1 ]
[ main::uses#2 main::uses#1 ]
[ main::clobbers#2 main::clobbers#1 ]
[ main::resource#2 main::resource#1 ]
Added variable main::j#1 to live range equivalence class [ main::j#1 ]
Added variable main::j#2 to live range equivalence class [ main::j#2 ]
Added variable main::j#3 to live range equivalence class [ main::j#3 ]
Added variable main::j#4 to live range equivalence class [ main::j#4 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ main::cycles#2 main::cycles#1 ]
[ main::j#6 main::j#5 ]
[ main::bytes#2 main::bytes#1 ]
[ main::uses#2 main::uses#1 ]
[ main::clobbers#2 main::clobbers#1 ]
[ main::resource#2 main::resource#1 ]
[ main::j#1 ]
[ main::j#2 ]
[ main::j#3 ]
[ main::j#4 ]
Allocated zp[1]:2 [ main::i#2 main::i#1 ]
Allocated zp[1]:3 [ main::j#1 ]
Allocated zp[1]:4 [ main::j#2 ]
Allocated zp[1]:5 [ main::j#3 ]
Allocated zp[1]:6 [ main::j#4 ]
Allocated zp[1]:7 [ main::j#6 main::j#5 ]
Allocated zp[1]:8 [ main::resource#2 main::resource#1 ]
Allocated zp[1]:9 [ main::clobbers#2 main::clobbers#1 ]
Allocated zp[1]:10 [ main::uses#2 main::uses#1 ]
Allocated zp[1]:11 [ main::bytes#2 main::bytes#1 ]
Allocated zp[1]:12 [ main::cycles#2 main::cycles#1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [16] main::uses#1 = main::uses#2 + 3 [ main::i#2 main::clobbers#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 ] (  [ main::i#2 main::clobbers#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:9 [ main::clobbers#2 main::clobbers#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::resource#2 main::resource#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:12 [ main::cycles#2 main::cycles#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::j#6 main::j#5 ]
Removing always clobbered register reg byte a as potential for zp[1]:11 [ main::bytes#2 main::bytes#1 ]
Statement [17] main::clobbers#1 = main::clobbers#2 + 4 [ main::i#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 ] (  [ main::i#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:10 [ main::uses#2 main::uses#1 ]
Statement [18] main::resource#1 = main::resource#2 + 5 [ main::i#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 main::resource#1 ] (  [ main::i#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 main::resource#1 ] { }  ) always clobbers reg byte a 
Statement [4] SCREEN[main::j#6] = main::cycles#2 [ main::i#2 main::cycles#2 main::j#6 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 ] (  [ main::i#2 main::cycles#2 main::j#6 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 ] { }  ) always clobbers reg byte a 
Statement [6] SCREEN[main::j#1] = main::bytes#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#1 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#1 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::j#1 ]
Statement [8] SCREEN[main::j#2] = main::uses#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#2 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#2 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::j#2 ]
Statement [10] SCREEN[main::j#3] = main::clobbers#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#3 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#3 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::j#3 ]
Statement [12] SCREEN[main::j#4] = main::resource#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#4 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#4 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::j#4 ]
Statement [16] main::uses#1 = main::uses#2 + 3 [ main::i#2 main::clobbers#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 ] (  [ main::i#2 main::clobbers#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 ] { }  ) always clobbers reg byte a 
Statement [17] main::clobbers#1 = main::clobbers#2 + 4 [ main::i#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 ] (  [ main::i#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 ] { }  ) always clobbers reg byte a 
Statement [18] main::resource#1 = main::resource#2 + 5 [ main::i#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 main::resource#1 ] (  [ main::i#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 main::resource#1 ] { }  ) always clobbers reg byte a 
Statement [4] SCREEN[main::j#6] = main::cycles#2 [ main::i#2 main::cycles#2 main::j#6 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 ] (  [ main::i#2 main::cycles#2 main::j#6 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 ] { }  ) always clobbers reg byte a 
Statement [6] SCREEN[main::j#1] = main::bytes#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#1 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#1 ] { }  ) always clobbers reg byte a 
Statement [8] SCREEN[main::j#2] = main::uses#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#2 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#2 ] { }  ) always clobbers reg byte a 
Statement [10] SCREEN[main::j#3] = main::clobbers#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#3 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#3 ] { }  ) always clobbers reg byte a 
Statement [12] SCREEN[main::j#4] = main::resource#2 [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#4 ] (  [ main::i#2 main::cycles#2 main::bytes#2 main::uses#2 main::clobbers#2 main::resource#2 main::j#4 ] { }  ) always clobbers reg byte a 
Statement [16] main::uses#1 = main::uses#2 + 3 [ main::i#2 main::clobbers#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 ] (  [ main::i#2 main::clobbers#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 ] { }  ) always clobbers reg byte a 
Statement [17] main::clobbers#1 = main::clobbers#2 + 4 [ main::i#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 ] (  [ main::i#2 main::resource#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 ] { }  ) always clobbers reg byte a 
Statement [18] main::resource#1 = main::resource#2 + 5 [ main::i#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 main::resource#1 ] (  [ main::i#2 main::cycles#1 main::j#5 main::bytes#1 main::uses#1 main::clobbers#1 main::resource#1 ] { }  ) always clobbers reg byte a 
Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , 
Potential registers zp[1]:12 [ main::cycles#2 main::cycles#1 ] : zp[1]:12 , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ main::j#6 main::j#5 ] : zp[1]:7 , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ main::bytes#2 main::bytes#1 ] : zp[1]:11 , reg byte x , reg byte y , 
Potential registers zp[1]:10 [ main::uses#2 main::uses#1 ] : zp[1]:10 , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ main::clobbers#2 main::clobbers#1 ] : zp[1]:9 , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ main::resource#2 main::resource#1 ] : zp[1]:8 , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ main::j#1 ] : zp[1]:3 , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ main::j#2 ] : zp[1]:4 , reg byte x , reg byte y , 
Potential registers zp[1]:5 [ main::j#3 ] : zp[1]:5 , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ main::j#4 ] : zp[1]:6 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 23.94: zp[1]:2 [ main::i#2 main::i#1 ] 16.5: zp[1]:3 [ main::j#1 ] 16.5: zp[1]:4 [ main::j#2 ] 16.5: zp[1]:5 [ main::j#3 ] 16.5: zp[1]:6 [ main::j#4 ] 14.14: zp[1]:7 [ main::j#6 main::j#5 ] 13.06: zp[1]:8 [ main::resource#2 main::resource#1 ] 9.53: zp[1]:9 [ main::clobbers#2 main::clobbers#1 ] 7.86: zp[1]:10 [ main::uses#2 main::uses#1 ] 6.94: zp[1]:11 [ main::bytes#2 main::bytes#1 ] 6.42: zp[1]:12 [ main::cycles#2 main::cycles#1 ] 
Uplift Scope [] 

Uplifting [main] best 1641 combination zp[1]:2 [ main::i#2 main::i#1 ] reg byte x [ main::j#1 ] reg byte x [ main::j#2 ] reg byte x [ main::j#3 ] zp[1]:6 [ main::j#4 ] zp[1]:7 [ main::j#6 main::j#5 ] zp[1]:8 [ main::resource#2 main::resource#1 ] zp[1]:9 [ main::clobbers#2 main::clobbers#1 ] zp[1]:10 [ main::uses#2 main::uses#1 ] zp[1]:11 [ main::bytes#2 main::bytes#1 ] zp[1]:12 [ main::cycles#2 main::cycles#1 ] 
Limited combination testing to 100 combinations of 177147 possible.
Uplifting [] best 1641 combination 
Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ]
Uplifting [main] best 1641 combination zp[1]:2 [ main::i#2 main::i#1 ] 
Attempting to uplift remaining variables inzp[1]:6 [ main::j#4 ]
Uplifting [main] best 1551 combination reg byte x [ main::j#4 ] 
Attempting to uplift remaining variables inzp[1]:7 [ main::j#6 main::j#5 ]
Uplifting [main] best 1511 combination reg byte y [ main::j#6 main::j#5 ] 
Attempting to uplift remaining variables inzp[1]:8 [ main::resource#2 main::resource#1 ]
Uplifting [main] best 1511 combination zp[1]:8 [ main::resource#2 main::resource#1 ] 
Attempting to uplift remaining variables inzp[1]:9 [ main::clobbers#2 main::clobbers#1 ]
Uplifting [main] best 1511 combination zp[1]:9 [ main::clobbers#2 main::clobbers#1 ] 
Attempting to uplift remaining variables inzp[1]:10 [ main::uses#2 main::uses#1 ]
Uplifting [main] best 1511 combination zp[1]:10 [ main::uses#2 main::uses#1 ] 
Attempting to uplift remaining variables inzp[1]:11 [ main::bytes#2 main::bytes#1 ]
Uplifting [main] best 1511 combination zp[1]:11 [ main::bytes#2 main::bytes#1 ] 
Attempting to uplift remaining variables inzp[1]:12 [ main::cycles#2 main::cycles#1 ]
Uplifting [main] best 1511 combination zp[1]:12 [ main::cycles#2 main::cycles#1 ] 
Allocated (was zp[1]:8) zp[1]:3 [ main::resource#2 main::resource#1 ]
Allocated (was zp[1]:9) zp[1]:4 [ main::clobbers#2 main::clobbers#1 ]
Allocated (was zp[1]:10) zp[1]:5 [ main::uses#2 main::uses#1 ]
Allocated (was zp[1]:11) zp[1]:6 [ main::bytes#2 main::bytes#1 ]
Allocated (was zp[1]:12) zp[1]:7 [ main::cycles#2 main::cycles#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test that bytes and cycles are not keywords
  // Upstart
  // Commodore 64 PRG executable file
.file [name="old-keywords.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
  .label SCREEN = $400
.segment Code
  // main
main: {
    .label cycles = 7
    .label bytes = 6
    .label uses = 5
    .label clobbers = 4
    .label resource = 3
    .label i = 2
    // [1] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [1] phi main::resource#2 = 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z resource
    // [1] phi main::clobbers#2 = 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z clobbers
    // [1] phi main::uses#2 = 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta.z uses
    // [1] phi main::bytes#2 = 0 [phi:main->main::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z bytes
    // [1] phi main::j#6 = 0 [phi:main->main::@1#4] -- vbuyy=vbuc1 
    ldy #0
    // [1] phi main::cycles#2 = 0 [phi:main->main::@1#5] -- vbuz1=vbuc1 
    lda #0
    sta.z cycles
    // [1] phi main::i#2 = 0 [phi:main->main::@1#6] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b1
    // main::@1
  __b1:
    // [2] if(main::i#2<$14) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #$14
    bcc __b2
    jmp __breturn
    // main::@return
  __breturn:
    // [3] return 
    rts
    // main::@2
  __b2:
    // [4] SCREEN[main::j#6] = main::cycles#2 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z cycles
    sta SCREEN,y
    // [5] main::j#1 = ++ main::j#6 -- vbuxx=_inc_vbuyy 
    tya
    tax
    inx
    // [6] SCREEN[main::j#1] = main::bytes#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z bytes
    sta SCREEN,x
    // [7] main::j#2 = ++ main::j#1 -- vbuxx=_inc_vbuxx 
    inx
    // [8] SCREEN[main::j#2] = main::uses#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z uses
    sta SCREEN,x
    // [9] main::j#3 = ++ main::j#2 -- vbuxx=_inc_vbuxx 
    inx
    // [10] SCREEN[main::j#3] = main::clobbers#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z clobbers
    sta SCREEN,x
    // [11] main::j#4 = ++ main::j#3 -- vbuxx=_inc_vbuxx 
    inx
    // [12] SCREEN[main::j#4] = main::resource#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z resource
    sta SCREEN,x
    // [13] main::j#5 = ++ main::j#4 -- vbuyy=_inc_vbuxx 
    txa
    tay
    iny
    // [14] main::cycles#1 = main::cycles#2 + 1 -- vbuz1=vbuz1_plus_1 
    inc.z cycles
    // [15] main::bytes#1 = main::bytes#2 + 2 -- vbuz1=vbuz1_plus_2 
    lda.z bytes
    clc
    adc #2
    sta.z bytes
    // [16] main::uses#1 = main::uses#2 + 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z uses
    axs #-[3]
    stx.z uses
    // [17] main::clobbers#1 = main::clobbers#2 + 4 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z clobbers
    axs #-[4]
    stx.z clobbers
    // [18] main::resource#1 = main::resource#2 + 5 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z resource
    axs #-[5]
    stx.z resource
    // [19] main::i#1 = ++ main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
  __b1_from___b2:
    // [1] phi main::resource#2 = main::resource#1 [phi:main::@2->main::@1#0] -- register_copy 
    // [1] phi main::clobbers#2 = main::clobbers#1 [phi:main::@2->main::@1#1] -- register_copy 
    // [1] phi main::uses#2 = main::uses#1 [phi:main::@2->main::@1#2] -- register_copy 
    // [1] phi main::bytes#2 = main::bytes#1 [phi:main::@2->main::@1#3] -- register_copy 
    // [1] phi main::j#6 = main::j#5 [phi:main::@2->main::@1#4] -- register_copy 
    // [1] phi main::cycles#2 = main::cycles#1 [phi:main::@2->main::@1#5] -- register_copy 
    // [1] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#6] -- register_copy 
    jmp __b1
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #0
Replacing instruction ldy #0 with TAY
Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction __b1_from_main:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
__constant char * const SCREEN = (char *) 1024
void main()
char main::bytes
char main::bytes#1 // bytes zp[1]:6 4.4
char main::bytes#2 // bytes zp[1]:6 2.5384615384615383
char main::clobbers
char main::clobbers#1 // clobbers zp[1]:4 7.333333333333333
char main::clobbers#2 // clobbers zp[1]:4 2.1999999999999997
char main::cycles
char main::cycles#1 // cycles zp[1]:7 3.6666666666666665
char main::cycles#2 // cycles zp[1]:7 2.75
char main::i
char main::i#1 // i zp[1]:2 22.0
char main::i#2 // i zp[1]:2 1.9411764705882355
char main::j
char main::j#1 // reg byte x 16.5
char main::j#2 // reg byte x 16.5
char main::j#3 // reg byte x 16.5
char main::j#4 // reg byte x 16.5
char main::j#5 // reg byte y 3.142857142857143
char main::j#6 // reg byte y 11.0
char main::resource
char main::resource#1 // resource zp[1]:3 11.0
char main::resource#2 // resource zp[1]:3 2.0625
char main::uses
char main::uses#1 // uses zp[1]:5 5.5
char main::uses#2 // uses zp[1]:5 2.357142857142857

zp[1]:2 [ main::i#2 main::i#1 ]
zp[1]:7 [ main::cycles#2 main::cycles#1 ]
reg byte y [ main::j#6 main::j#5 ]
zp[1]:6 [ main::bytes#2 main::bytes#1 ]
zp[1]:5 [ main::uses#2 main::uses#1 ]
zp[1]:4 [ main::clobbers#2 main::clobbers#1 ]
zp[1]:3 [ main::resource#2 main::resource#1 ]
reg byte x [ main::j#1 ]
reg byte x [ main::j#2 ]
reg byte x [ main::j#3 ]
reg byte x [ main::j#4 ]


FINAL ASSEMBLER
Score: 1351

  // File Comments
// Test that bytes and cycles are not keywords
  // Upstart
  // Commodore 64 PRG executable file
.file [name="old-keywords.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
  .label SCREEN = $400
.segment Code
  // main
main: {
    .label cycles = 7
    .label bytes = 6
    .label uses = 5
    .label clobbers = 4
    .label resource = 3
    .label i = 2
    // [1] phi from main to main::@1 [phi:main->main::@1]
    // [1] phi main::resource#2 = 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z resource
    // [1] phi main::clobbers#2 = 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    sta.z clobbers
    // [1] phi main::uses#2 = 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    sta.z uses
    // [1] phi main::bytes#2 = 0 [phi:main->main::@1#3] -- vbuz1=vbuc1 
    sta.z bytes
    // [1] phi main::j#6 = 0 [phi:main->main::@1#4] -- vbuyy=vbuc1 
    tay
    // [1] phi main::cycles#2 = 0 [phi:main->main::@1#5] -- vbuz1=vbuc1 
    sta.z cycles
    // [1] phi main::i#2 = 0 [phi:main->main::@1#6] -- vbuz1=vbuc1 
    sta.z i
    // main::@1
  __b1:
    // for(char i=0;i<20;i++)
    // [2] if(main::i#2<$14) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z i
    cmp #$14
    bcc __b2
    // main::@return
    // }
    // [3] return 
    rts
    // main::@2
  __b2:
    // SCREEN[j++] = cycles
    // [4] SCREEN[main::j#6] = main::cycles#2 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z cycles
    sta SCREEN,y
    // SCREEN[j++] = cycles;
    // [5] main::j#1 = ++ main::j#6 -- vbuxx=_inc_vbuyy 
    tya
    tax
    inx
    // SCREEN[j++] = bytes
    // [6] SCREEN[main::j#1] = main::bytes#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z bytes
    sta SCREEN,x
    // SCREEN[j++] = bytes;
    // [7] main::j#2 = ++ main::j#1 -- vbuxx=_inc_vbuxx 
    inx
    // SCREEN[j++] = uses
    // [8] SCREEN[main::j#2] = main::uses#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z uses
    sta SCREEN,x
    // SCREEN[j++] = uses;
    // [9] main::j#3 = ++ main::j#2 -- vbuxx=_inc_vbuxx 
    inx
    // SCREEN[j++] = clobbers
    // [10] SCREEN[main::j#3] = main::clobbers#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z clobbers
    sta SCREEN,x
    // SCREEN[j++] = clobbers;
    // [11] main::j#4 = ++ main::j#3 -- vbuxx=_inc_vbuxx 
    inx
    // SCREEN[j++] = resource
    // [12] SCREEN[main::j#4] = main::resource#2 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z resource
    sta SCREEN,x
    // SCREEN[j++] = resource;
    // [13] main::j#5 = ++ main::j#4 -- vbuyy=_inc_vbuxx 
    txa
    tay
    iny
    // cycles +=1
    // [14] main::cycles#1 = main::cycles#2 + 1 -- vbuz1=vbuz1_plus_1 
    inc.z cycles
    // bytes +=2
    // [15] main::bytes#1 = main::bytes#2 + 2 -- vbuz1=vbuz1_plus_2 
    lda.z bytes
    clc
    adc #2
    sta.z bytes
    // uses +=3
    // [16] main::uses#1 = main::uses#2 + 3 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z uses
    axs #-[3]
    stx.z uses
    // clobbers +=4
    // [17] main::clobbers#1 = main::clobbers#2 + 4 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z clobbers
    axs #-[4]
    stx.z clobbers
    // resource +=5
    // [18] main::resource#1 = main::resource#2 + 5 -- vbuz1=vbuz1_plus_vbuc1 
    lax.z resource
    axs #-[5]
    stx.z resource
    // for(char i=0;i<20;i++)
    // [19] main::i#1 = ++ main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
    // [1] phi main::resource#2 = main::resource#1 [phi:main::@2->main::@1#0] -- register_copy 
    // [1] phi main::clobbers#2 = main::clobbers#1 [phi:main::@2->main::@1#1] -- register_copy 
    // [1] phi main::uses#2 = main::uses#1 [phi:main::@2->main::@1#2] -- register_copy 
    // [1] phi main::bytes#2 = main::bytes#1 [phi:main::@2->main::@1#3] -- register_copy 
    // [1] phi main::j#6 = main::j#5 [phi:main::@2->main::@1#4] -- register_copy 
    // [1] phi main::cycles#2 = main::cycles#1 [phi:main::@2->main::@1#5] -- register_copy 
    // [1] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#6] -- register_copy 
    jmp __b1
}
  // File Data

