
CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  main::x#0 = 0
  to:main::@1
main::@1: scope:[main]  from main main::@4
  main::x#5 = phi( main/main::x#0, main::@4/main::x#1 )
  main::line#0 = 0
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@3
  main::x#4 = phi( main::@1/main::x#5, main::@3/main::x#2 )
  main::line#2 = phi( main::@1/main::line#0, main::@3/main::line#1 )
  main::$0 = main::line#2 != $19
  unroll if(main::$0) goto main::@3
  to:main::@4
main::@3: scope:[main]  from main::@2
  main::x#2 = phi( main::@2/main::x#4 )
  main::line#3 = phi( main::@2/main::line#2 )
  main::$1 = main::line#3 * $28
  main::$2 = main::SCREEN + main::$1
  main::$2[main::x#2] = main::x#2
  main::line#1 = ++ main::line#3
  to:main::@2
main::@4: scope:[main]  from main::@2
  main::x#3 = phi( main::@2/main::x#4 )
  main::x#1 = main::x#3 + rangenext(0,$27)
  main::$3 = main::x#1 != rangelast(0,$27)
  if(main::$3) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@4
  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
void __start()
void main()
bool main::$0
number main::$1
char *main::$2
bool main::$3
__constant char *main::SCREEN = (char *)$400
char main::line
char main::line#0
char main::line#1
char main::line#2
char main::line#3
char main::x
char main::x#0
char main::x#1
char main::x#2
char main::x#3
char main::x#4
char main::x#5

Adding number conversion cast (unumber) $19 in main::$0 = main::line#2 != $19
Adding number conversion cast (unumber) $28 in main::$1 = main::line#3 * $28
Adding number conversion cast (unumber) main::$1 in main::$1 = main::line#3 * (unumber)$28
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (char *) 1024
Simplifying constant integer cast $19
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $19
Finalized unsigned number type (char) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in main::$1 = main::line#3 * $28
Alias main::line#2 = main::line#3 
Alias main::x#2 = main::x#4 main::x#3 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values main::x#2 main::x#5
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$0 [5] unroll if(main::line#2!=$19) goto main::@3
Simple Condition main::$3 [12] if(main::x#1!=rangelast(0,$27)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::x#0 = 0
Constant main::line#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [10] main::x#1 = ++ main::x#5 to ++
Resolved ranged comparison value [12] if(main::x#1!=rangelast(0,$27)) goto main::@1 to $28
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
Adding number conversion cast (unumber) $28 in [8] if(main::x#1!=$28) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Unrolling loop Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#2 main::line#0
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [3] main::$1 = main::line#0 * $28
Constant right-side identified [6] main::line#1 = ++ main::line#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$1 = main::line#0*$28
Constant main::line#1 = ++main::line#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [2] if(main::line#0!=$19) goto main::@3
Successful SSA optimization Pass2ConstantIfs
Simplifying constant evaluating to zero main::line#0*$28 in 
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero main::SCREEN in [4] main::$2 = main::SCREEN + main::$1
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant main::$1
Successful SSA optimization PassNEliminateUnusedVars
Constant main::$2 = main::SCREEN
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_1 tails: main::@3_1 blocks: main::@3_1 main::@2_1 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#4 main::line#1
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [7] main::$4 = main::line#1 * $28
Constant right-side identified [10] main::line#5 = ++ main::line#1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$4 = main::line#1*$28
Constant main::line#5 = ++main::line#1
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [3] if(main::line#1!=$19) goto main::@3_1
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [5] main::$5 = main::SCREEN + main::$4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$5 = main::SCREEN+main::$4
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_2 tails: main::@3_2 blocks: main::@3_2 main::@2_2 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#6 main::line#5
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [8] main::$6 = main::line#5 * $28
Constant right-side identified [11] main::line#7 = ++ main::line#5
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$6 = main::line#5*$28
Constant main::line#7 = ++main::line#5
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [4] if(main::line#5!=$19) goto main::@3_2
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [6] main::$7 = main::SCREEN + main::$6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$7 = main::SCREEN+main::$6
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_3 tails: main::@3_3 blocks: main::@3_3 main::@2_3 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#8 main::line#7
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [9] main::$8 = main::line#7 * $28
Constant right-side identified [12] main::line#9 = ++ main::line#7
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$8 = main::line#7*$28
Constant main::line#9 = ++main::line#7
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [5] if(main::line#7!=$19) goto main::@3_3
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [7] main::$9 = main::SCREEN + main::$8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$9 = main::SCREEN+main::$8
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_4 tails: main::@3_4 blocks: main::@3_4 main::@2_4 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#10 main::line#9
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [10] main::$10 = main::line#9 * $28
Constant right-side identified [13] main::line#11 = ++ main::line#9
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$10 = main::line#9*$28
Constant main::line#11 = ++main::line#9
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [6] if(main::line#9!=$19) goto main::@3_4
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [8] main::$11 = main::SCREEN + main::$10
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$11 = main::SCREEN+main::$10
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_5 tails: main::@3_5 blocks: main::@3_5 main::@2_5 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#12 main::line#11
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [11] main::$12 = main::line#11 * $28
Constant right-side identified [14] main::line#13 = ++ main::line#11
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$12 = main::line#11*$28
Constant main::line#13 = ++main::line#11
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [7] if(main::line#11!=$19) goto main::@3_5
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [9] main::$13 = main::SCREEN + main::$12
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$13 = main::SCREEN+main::$12
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_6 tails: main::@3_6 blocks: main::@3_6 main::@2_6 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#14 main::line#13
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [12] main::$14 = main::line#13 * $28
Constant right-side identified [15] main::line#15 = ++ main::line#13
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$14 = main::line#13*$28
Constant main::line#15 = ++main::line#13
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [8] if(main::line#13!=$19) goto main::@3_6
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [10] main::$15 = main::SCREEN + main::$14
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$15 = main::SCREEN+main::$14
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_7 tails: main::@3_7 blocks: main::@3_7 main::@2_7 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#16 main::line#15
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [13] main::$16 = main::line#15 * $28
Constant right-side identified [16] main::line#17 = ++ main::line#15
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$16 = main::line#15*$28
Constant main::line#17 = ++main::line#15
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [9] if(main::line#15!=$19) goto main::@3_7
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [11] main::$17 = main::SCREEN + main::$16
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$17 = main::SCREEN+main::$16
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_8 tails: main::@3_8 blocks: main::@3_8 main::@2_8 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#18 main::line#17
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [14] main::$18 = main::line#17 * $28
Constant right-side identified [17] main::line#19 = ++ main::line#17
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$18 = main::line#17*$28
Constant main::line#19 = ++main::line#17
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [10] if(main::line#17!=$19) goto main::@3_8
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [12] main::$19 = main::SCREEN + main::$18
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$19 = main::SCREEN+main::$18
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_9 tails: main::@3_9 blocks: main::@3_9 main::@2_9 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#20 main::line#19
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [15] main::$20 = main::line#19 * $28
Constant right-side identified [18] main::line#21 = ++ main::line#19
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$20 = main::line#19*$28
Constant main::line#21 = ++main::line#19
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [11] if(main::line#19!=$19) goto main::@3_9
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [13] main::$21 = main::SCREEN + main::$20
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$21 = main::SCREEN+main::$20
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_10 tails: main::@3_10 blocks: main::@3_10 main::@2_10 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#22 main::line#21
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [16] main::$22 = main::line#21 * $28
Constant right-side identified [19] main::line#23 = ++ main::line#21
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$22 = main::line#21*$28
Constant main::line#23 = ++main::line#21
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [12] if(main::line#21!=$19) goto main::@3_10
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [14] main::$23 = main::SCREEN + main::$22
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$23 = main::SCREEN+main::$22
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_11 tails: main::@3_11 blocks: main::@3_11 main::@2_11 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#24 main::line#23
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [17] main::$24 = main::line#23 * $28
Constant right-side identified [20] main::line#25 = ++ main::line#23
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$24 = main::line#23*$28
Constant main::line#25 = ++main::line#23
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [13] if(main::line#23!=$19) goto main::@3_11
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [15] main::$25 = main::SCREEN + main::$24
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$25 = main::SCREEN+main::$24
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_12 tails: main::@3_12 blocks: main::@3_12 main::@2_12 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#26 main::line#25
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [18] main::$26 = main::line#25 * $28
Constant right-side identified [21] main::line#27 = ++ main::line#25
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$26 = main::line#25*$28
Constant main::line#27 = ++main::line#25
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [14] if(main::line#25!=$19) goto main::@3_12
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [16] main::$27 = main::SCREEN + main::$26
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$27 = main::SCREEN+main::$26
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_13 tails: main::@3_13 blocks: main::@3_13 main::@2_13 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#28 main::line#27
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [19] main::$28 = main::line#27 * $28
Constant right-side identified [22] main::line#29 = ++ main::line#27
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$28 = main::line#27*$28
Constant main::line#29 = ++main::line#27
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [15] if(main::line#27!=$19) goto main::@3_13
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [17] main::$29 = main::SCREEN + main::$28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$29 = main::SCREEN+main::$28
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_14 tails: main::@3_14 blocks: main::@3_14 main::@2_14 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#30 main::line#29
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [20] main::$30 = main::line#29 * $28
Constant right-side identified [23] main::line#31 = ++ main::line#29
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$30 = main::line#29*$28
Constant main::line#31 = ++main::line#29
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [16] if(main::line#29!=$19) goto main::@3_14
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [18] main::$31 = main::SCREEN + main::$30
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$31 = main::SCREEN+main::$30
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_15 tails: main::@3_15 blocks: main::@3_15 main::@2_15 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#32 main::line#31
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [21] main::$32 = main::line#31 * $28
Constant right-side identified [24] main::line#33 = ++ main::line#31
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$32 = main::line#31*$28
Constant main::line#33 = ++main::line#31
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [17] if(main::line#31!=$19) goto main::@3_15
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [19] main::$33 = main::SCREEN + main::$32
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$33 = main::SCREEN+main::$32
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_16 tails: main::@3_16 blocks: main::@3_16 main::@2_16 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#34 main::line#33
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [22] main::$34 = main::line#33 * $28
Constant right-side identified [25] main::line#35 = ++ main::line#33
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$34 = main::line#33*$28
Constant main::line#35 = ++main::line#33
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [18] if(main::line#33!=$19) goto main::@3_16
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [20] main::$35 = main::SCREEN + main::$34
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$35 = main::SCREEN+main::$34
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_17 tails: main::@3_17 blocks: main::@3_17 main::@2_17 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#36 main::line#35
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [23] main::$36 = main::line#35 * $28
Constant right-side identified [26] main::line#37 = ++ main::line#35
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$36 = main::line#35*$28
Constant main::line#37 = ++main::line#35
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [19] if(main::line#35!=$19) goto main::@3_17
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [21] main::$37 = main::SCREEN + main::$36
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$37 = main::SCREEN+main::$36
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_18 tails: main::@3_18 blocks: main::@3_18 main::@2_18 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#38 main::line#37
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [24] main::$38 = main::line#37 * $28
Constant right-side identified [27] main::line#39 = ++ main::line#37
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$38 = main::line#37*$28
Constant main::line#39 = ++main::line#37
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [20] if(main::line#37!=$19) goto main::@3_18
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [22] main::$39 = main::SCREEN + main::$38
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$39 = main::SCREEN+main::$38
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_19 tails: main::@3_19 blocks: main::@3_19 main::@2_19 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#40 main::line#39
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [25] main::$40 = main::line#39 * $28
Constant right-side identified [28] main::line#41 = ++ main::line#39
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$40 = main::line#39*$28
Constant main::line#41 = ++main::line#39
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [21] if(main::line#39!=$19) goto main::@3_19
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [23] main::$41 = main::SCREEN + main::$40
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$41 = main::SCREEN+main::$40
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_20 tails: main::@3_20 blocks: main::@3_20 main::@2_20 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#42 main::line#41
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [26] main::$42 = main::line#41 * $28
Constant right-side identified [29] main::line#43 = ++ main::line#41
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$42 = main::line#41*$28
Constant main::line#43 = ++main::line#41
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [22] if(main::line#41!=$19) goto main::@3_20
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [24] main::$43 = main::SCREEN + main::$42
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$43 = main::SCREEN+main::$42
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_21 tails: main::@3_21 blocks: main::@3_21 main::@2_21 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#44 main::line#43
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [27] main::$44 = main::line#43 * $28
Constant right-side identified [30] main::line#45 = ++ main::line#43
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$44 = main::line#43*$28
Constant main::line#45 = ++main::line#43
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [23] if(main::line#43!=$19) goto main::@3_21
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [25] main::$45 = main::SCREEN + main::$44
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$45 = main::SCREEN+main::$44
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_22 tails: main::@3_22 blocks: main::@3_22 main::@2_22 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#46 main::line#45
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [28] main::$46 = main::line#45 * $28
Constant right-side identified [31] main::line#47 = ++ main::line#45
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$46 = main::line#45*$28
Constant main::line#47 = ++main::line#45
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [24] if(main::line#45!=$19) goto main::@3_22
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [26] main::$47 = main::SCREEN + main::$46
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$47 = main::SCREEN+main::$46
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_23 tails: main::@3_23 blocks: main::@3_23 main::@2_23 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#48 main::line#47
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [29] main::$48 = main::line#47 * $28
Constant right-side identified [32] main::line#49 = ++ main::line#47
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$48 = main::line#47*$28
Constant main::line#49 = ++main::line#47
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [25] if(main::line#47!=$19) goto main::@3_23
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [27] main::$49 = main::SCREEN + main::$48
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$49 = main::SCREEN+main::$48
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_24 tails: main::@3_24 blocks: main::@3_24 main::@2_24 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#50 main::line#49
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [30] main::$50 = main::line#49 * $28
Constant right-side identified [33] main::line#51 = ++ main::line#49
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$50 = main::line#49*$28
Constant main::line#51 = ++main::line#49
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [26] if(main::line#49!=$19) goto main::@3_24
Successful SSA optimization Pass2ConstantIfs
Constant right-side identified [28] main::$51 = main::SCREEN + main::$50
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$51 = main::SCREEN+main::$50
Successful SSA optimization Pass2ConstantIdentification
Unrolling loop Loop head: main::@2_25 tails: main::@3_25 blocks: main::@3_25 main::@2_25 
Successful SSA optimization Pass2LoopUnroll
Identical Phi Values main::line#52 main::line#51
Successful SSA optimization Pass2IdenticalPhiElimination
Constant right-side identified [31] main::$52 = main::line#51 * $28
Constant right-side identified [34] main::line#53 = ++ main::line#51
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::$52 = main::line#51*$28
Constant main::line#53 = ++main::line#51
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [27] if(main::line#51!=$19) goto main::@3_25
Successful SSA optimization Pass2ConstantIfs
Eliminating variable main::$53 from unused block main::@3_25
Eliminating variable main::line#54 from unused block main::@2_26
Eliminating variable main::$54 from unused block main::@3_26
Eliminating variable main::$55 from unused block main::@3_26
Eliminating variable main::line#55 from unused block main::@3_26
Removing PHI-reference to removed block (main::@3_25) in block main::@2_26
Removing unused block main::@3_25
Removing unused block main::@2_26
Removing unused block main::@3_26
Successful SSA optimization Pass2EliminateUnusedBlocks
Eliminating unused constant main::$52
Eliminating unused constant main::line#53
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant main::line#51
Successful SSA optimization PassNEliminateUnusedVars
Inlining constant with var siblings main::x#0
Inlining constant with different constant siblings main::line#0
Inlining constant with different constant siblings main::line#1
Inlining constant with different constant siblings main::line#5
Inlining constant with different constant siblings main::line#7
Inlining constant with different constant siblings main::line#9
Inlining constant with different constant siblings main::line#11
Inlining constant with different constant siblings main::line#13
Inlining constant with different constant siblings main::line#15
Inlining constant with different constant siblings main::line#17
Inlining constant with different constant siblings main::line#19
Inlining constant with different constant siblings main::line#21
Inlining constant with different constant siblings main::line#23
Inlining constant with different constant siblings main::line#25
Inlining constant with different constant siblings main::line#27
Inlining constant with different constant siblings main::line#29
Inlining constant with different constant siblings main::line#31
Inlining constant with different constant siblings main::line#33
Inlining constant with different constant siblings main::line#35
Inlining constant with different constant siblings main::line#37
Inlining constant with different constant siblings main::line#39
Inlining constant with different constant siblings main::line#41
Inlining constant with different constant siblings main::line#43
Inlining constant with different constant siblings main::line#45
Inlining constant with different constant siblings main::line#47
Inlining constant with different constant siblings main::line#49
Constant inlined main::$50 = ++++++++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$51 = main::SCREEN+++++++++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$12 = ++++++++++0*$28
Constant inlined main::$13 = main::SCREEN+++++++++++0*$28
Constant inlined main::$14 = ++++++++++++0*$28
Constant inlined main::$15 = main::SCREEN+++++++++++++0*$28
Constant inlined main::$10 = ++++++++0*$28
Constant inlined main::$11 = main::SCREEN+++++++++0*$28
Constant inlined main::line#43 = ++++++++++++++++++++++++++++++++++++++++++0
Constant inlined main::line#45 = ++++++++++++++++++++++++++++++++++++++++++++0
Constant inlined main::$16 = ++++++++++++++0*$28
Constant inlined main::$17 = main::SCREEN+++++++++++++++0*$28
Constant inlined main::$18 = ++++++++++++++++0*$28
Constant inlined main::line#41 = ++++++++++++++++++++++++++++++++++++++++0
Constant inlined main::$19 = main::SCREEN+++++++++++++++++0*$28
Constant inlined main::line#5 = ++++0
Constant inlined main::line#0 = 0
Constant inlined main::line#47 = ++++++++++++++++++++++++++++++++++++++++++++++0
Constant inlined main::line#1 = ++0
Constant inlined main::line#49 = ++++++++++++++++++++++++++++++++++++++++++++++++0
Constant inlined main::$40 = ++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::line#9 = ++++++++0
Constant inlined main::line#7 = ++++++0
Constant inlined main::$45 = main::SCREEN+++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$46 = ++++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$47 = main::SCREEN+++++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$48 = ++++++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$41 = main::SCREEN+++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$42 = ++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$43 = main::SCREEN+++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$44 = ++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::line#11 = ++++++++++0
Constant inlined main::$49 = main::SCREEN+++++++++++++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::line#17 = ++++++++++++++++0
Constant inlined main::line#19 = ++++++++++++++++++0
Constant inlined main::line#13 = ++++++++++++0
Constant inlined main::line#15 = ++++++++++++++0
Constant inlined main::$34 = ++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$35 = main::SCREEN+++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$36 = ++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$37 = main::SCREEN+++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$30 = ++++++++++++++++++++++++++++0*$28
Constant inlined main::$31 = main::SCREEN+++++++++++++++++++++++++++++0*$28
Constant inlined main::$32 = ++++++++++++++++++++++++++++++0*$28
Constant inlined main::$33 = main::SCREEN+++++++++++++++++++++++++++++++0*$28
Constant inlined main::line#21 = ++++++++++++++++++++0
Constant inlined main::line#23 = ++++++++++++++++++++++0
Constant inlined main::$38 = ++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::$39 = main::SCREEN+++++++++++++++++++++++++++++++++++++0*$28
Constant inlined main::line#29 = ++++++++++++++++++++++++++++0
Constant inlined main::line#25 = ++++++++++++++++++++++++0
Constant inlined main::line#27 = ++++++++++++++++++++++++++0
Constant inlined main::$23 = main::SCREEN+++++++++++++++++++++0*$28
Constant inlined main::$24 = ++++++++++++++++++++++0*$28
Constant inlined main::$25 = main::SCREEN+++++++++++++++++++++++0*$28
Constant inlined main::x#0 = 0
Constant inlined main::$26 = ++++++++++++++++++++++++0*$28
Constant inlined main::$20 = ++++++++++++++++++0*$28
Constant inlined main::$21 = main::SCREEN+++++++++++++++++++0*$28
Constant inlined main::$22 = ++++++++++++++++++++0*$28
Constant inlined main::line#31 = ++++++++++++++++++++++++++++++0
Constant inlined main::line#33 = ++++++++++++++++++++++++++++++++0
Constant inlined main::$27 = main::SCREEN+++++++++++++++++++++++++0*$28
Constant inlined main::$2 = main::SCREEN
Constant inlined main::$28 = ++++++++++++++++++++++++++0*$28
Constant inlined main::$29 = main::SCREEN+++++++++++++++++++++++++++0*$28
Constant inlined main::$5 = main::SCREEN+++0*$28
Constant inlined main::$6 = ++++0*$28
Constant inlined main::line#39 = ++++++++++++++++++++++++++++++++++++++0
Constant inlined main::$4 = ++0*$28
Constant inlined main::$9 = main::SCREEN+++++++0*$28
Constant inlined main::line#35 = ++++++++++++++++++++++++++++++++++0
Constant inlined main::$7 = main::SCREEN+++++0*$28
Constant inlined main::$8 = ++++++0*$28
Constant inlined main::line#37 = ++++++++++++++++++++++++++++++++++++0
Successful SSA optimization Pass2ConstantInlining
Simplifying constant integer increment ++0
Simplifying constant integer increment ++0
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
Simplifying constant integer increment ++8
Simplifying constant integer increment ++9
Simplifying constant integer increment ++$a
Simplifying constant integer increment ++$b
Simplifying constant integer increment ++$c
Simplifying constant integer increment ++$d
Simplifying constant integer increment ++$e
Simplifying constant integer increment ++$f
Simplifying constant integer increment ++$10
Simplifying constant integer increment ++$11
Simplifying constant integer increment ++$12
Simplifying constant integer increment ++$13
Simplifying constant integer increment ++$14
Simplifying constant integer increment ++$15
Simplifying constant integer increment ++$16
Successful SSA optimization Pass2ConstantSimplification
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
Simplifying constant integer increment ++8
Simplifying constant integer increment ++9
Simplifying constant integer increment ++$a
Simplifying constant integer increment ++$b
Simplifying constant integer increment ++$c
Simplifying constant integer increment ++$d
Simplifying constant integer increment ++$e
Simplifying constant integer increment ++$f
Simplifying constant integer increment ++$10
Simplifying constant integer increment ++$11
Simplifying constant integer increment ++$12
Simplifying constant integer increment ++$13
Simplifying constant integer increment ++$14
Simplifying constant integer increment ++$15
Simplifying constant integer increment ++$16
Simplifying constant integer increment ++$17
Successful SSA optimization Pass2ConstantSimplification
Added new block during phi lifting main::@5(between main::@4 and main::@1)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@2_1
Adding NOP phi() at start of main::@2_2
Adding NOP phi() at start of main::@2_3
Adding NOP phi() at start of main::@2_4
Adding NOP phi() at start of main::@2_5
Adding NOP phi() at start of main::@2_6
Adding NOP phi() at start of main::@2_7
Adding NOP phi() at start of main::@2_8
Adding NOP phi() at start of main::@2_9
Adding NOP phi() at start of main::@2_10
Adding NOP phi() at start of main::@2_11
Adding NOP phi() at start of main::@2_12
Adding NOP phi() at start of main::@2_13
Adding NOP phi() at start of main::@2_14
Adding NOP phi() at start of main::@2_15
Adding NOP phi() at start of main::@2_16
Adding NOP phi() at start of main::@2_17
Adding NOP phi() at start of main::@2_18
Adding NOP phi() at start of main::@2_19
Adding NOP phi() at start of main::@2_20
Adding NOP phi() at start of main::@2_21
Adding NOP phi() at start of main::@2_22
Adding NOP phi() at start of main::@2_23
Adding NOP phi() at start of main::@2_24
Adding NOP phi() at start of main::@2_25
CALL GRAPH

Created 1 initial phi equivalence classes
Coalesced [56] main::x#6 = main::x#1
Coalesced down to 1 phi equivalence classes
Culled Empty Block label main::@2
Culled Empty Block label main::@2_1
Culled Empty Block label main::@2_2
Culled Empty Block label main::@2_3
Culled Empty Block label main::@2_4
Culled Empty Block label main::@2_5
Culled Empty Block label main::@2_6
Culled Empty Block label main::@2_7
Culled Empty Block label main::@2_8
Culled Empty Block label main::@2_9
Culled Empty Block label main::@2_10
Culled Empty Block label main::@2_11
Culled Empty Block label main::@2_12
Culled Empty Block label main::@2_13
Culled Empty Block label main::@2_14
Culled Empty Block label main::@2_15
Culled Empty Block label main::@2_16
Culled Empty Block label main::@2_17
Culled Empty Block label main::@2_18
Culled Empty Block label main::@2_19
Culled Empty Block label main::@2_20
Culled Empty Block label main::@2_21
Culled Empty Block label main::@2_22
Culled Empty Block label main::@2_23
Culled Empty Block label main::@2_24
Culled Empty Block label main::@2_25
Culled Empty Block label main::@5
Renumbering block main::@3 to main::@2
Renumbering block main::@4 to main::@3
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::@3
  [1] main::x#5 = phi( main/0, main::@3/main::x#1 )
  to:main::@2
main::@2: scope:[main]  from main::@1
  [2] main::SCREEN[main::x#5] = main::x#5
  to:main::@3_1
main::@3_1: scope:[main]  from main::@2
  [3] (main::SCREEN+1*$28)[main::x#5] = main::x#5
  to:main::@3_2
main::@3_2: scope:[main]  from main::@3_1
  [4] (main::SCREEN+2*$28)[main::x#5] = main::x#5
  to:main::@3_3
main::@3_3: scope:[main]  from main::@3_2
  [5] (main::SCREEN+3*$28)[main::x#5] = main::x#5
  to:main::@3_4
main::@3_4: scope:[main]  from main::@3_3
  [6] (main::SCREEN+4*$28)[main::x#5] = main::x#5
  to:main::@3_5
main::@3_5: scope:[main]  from main::@3_4
  [7] (main::SCREEN+5*$28)[main::x#5] = main::x#5
  to:main::@3_6
main::@3_6: scope:[main]  from main::@3_5
  [8] (main::SCREEN+6*$28)[main::x#5] = main::x#5
  to:main::@3_7
main::@3_7: scope:[main]  from main::@3_6
  [9] (main::SCREEN+7*$28)[main::x#5] = main::x#5
  to:main::@3_8
main::@3_8: scope:[main]  from main::@3_7
  [10] (main::SCREEN+8*$28)[main::x#5] = main::x#5
  to:main::@3_9
main::@3_9: scope:[main]  from main::@3_8
  [11] (main::SCREEN+9*$28)[main::x#5] = main::x#5
  to:main::@3_10
main::@3_10: scope:[main]  from main::@3_9
  [12] (main::SCREEN+$a*$28)[main::x#5] = main::x#5
  to:main::@3_11
main::@3_11: scope:[main]  from main::@3_10
  [13] (main::SCREEN+$b*$28)[main::x#5] = main::x#5
  to:main::@3_12
main::@3_12: scope:[main]  from main::@3_11
  [14] (main::SCREEN+$c*$28)[main::x#5] = main::x#5
  to:main::@3_13
main::@3_13: scope:[main]  from main::@3_12
  [15] (main::SCREEN+$d*$28)[main::x#5] = main::x#5
  to:main::@3_14
main::@3_14: scope:[main]  from main::@3_13
  [16] (main::SCREEN+$e*$28)[main::x#5] = main::x#5
  to:main::@3_15
main::@3_15: scope:[main]  from main::@3_14
  [17] (main::SCREEN+$f*$28)[main::x#5] = main::x#5
  to:main::@3_16
main::@3_16: scope:[main]  from main::@3_15
  [18] (main::SCREEN+$10*$28)[main::x#5] = main::x#5
  to:main::@3_17
main::@3_17: scope:[main]  from main::@3_16
  [19] (main::SCREEN+$11*$28)[main::x#5] = main::x#5
  to:main::@3_18
main::@3_18: scope:[main]  from main::@3_17
  [20] (main::SCREEN+$12*$28)[main::x#5] = main::x#5
  to:main::@3_19
main::@3_19: scope:[main]  from main::@3_18
  [21] (main::SCREEN+$13*$28)[main::x#5] = main::x#5
  to:main::@3_20
main::@3_20: scope:[main]  from main::@3_19
  [22] (main::SCREEN+$14*$28)[main::x#5] = main::x#5
  to:main::@3_21
main::@3_21: scope:[main]  from main::@3_20
  [23] (main::SCREEN+$15*$28)[main::x#5] = main::x#5
  to:main::@3_22
main::@3_22: scope:[main]  from main::@3_21
  [24] (main::SCREEN+$16*$28)[main::x#5] = main::x#5
  to:main::@3_23
main::@3_23: scope:[main]  from main::@3_22
  [25] (main::SCREEN+$17*$28)[main::x#5] = main::x#5
  to:main::@3_24
main::@3_24: scope:[main]  from main::@3_23
  [26] (main::SCREEN+$18*$28)[main::x#5] = main::x#5
  to:main::@3
main::@3: scope:[main]  from main::@3_24
  [27] main::x#1 = ++ main::x#5
  [28] if(main::x#1!=$28) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@3
  [29] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void main()
char main::line
char main::x
char main::x#1 // 16.5
char main::x#5 // 22.00000000000001

Initial phi equivalence classes
[ main::x#5 main::x#1 ]
Complete equivalence classes
[ main::x#5 main::x#1 ]
Allocated zp[1]:2 [ main::x#5 main::x#1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Potential registers zp[1]:2 [ main::x#5 main::x#1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 38.5: zp[1]:2 [ main::x#5 main::x#1 ] 
Uplift Scope [] 

Uplifting [main] best 2711 combination reg byte x [ main::x#5 main::x#1 ] 
Uplifting [] best 2711 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Fills the screen using an unrolled inner while()-loop
  // Upstart
  // Commodore 64 PRG executable file
.file [name="unroll-screenfill-while.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
.segment Code
  // main
main: {
    .label SCREEN = $400
    // [1] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [1] phi main::x#5 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    jmp __b1
    // [1] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  __b1_from___b3:
    // [1] phi main::x#5 = main::x#1 [phi:main::@3->main::@1#0] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    jmp __b2
    // main::@2
  __b2:
    // [2] main::SCREEN[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN,x
    jmp __b3_1
    // main::@3_1
  __b3_1:
    // [3] (main::SCREEN+1*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+1*$28,x
    jmp __b3_2
    // main::@3_2
  __b3_2:
    // [4] (main::SCREEN+2*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+2*$28,x
    jmp __b3_3
    // main::@3_3
  __b3_3:
    // [5] (main::SCREEN+3*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+3*$28,x
    jmp __b3_4
    // main::@3_4
  __b3_4:
    // [6] (main::SCREEN+4*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+4*$28,x
    jmp __b3_5
    // main::@3_5
  __b3_5:
    // [7] (main::SCREEN+5*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+5*$28,x
    jmp __b3_6
    // main::@3_6
  __b3_6:
    // [8] (main::SCREEN+6*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+6*$28,x
    jmp __b3_7
    // main::@3_7
  __b3_7:
    // [9] (main::SCREEN+7*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+7*$28,x
    jmp __b3_8
    // main::@3_8
  __b3_8:
    // [10] (main::SCREEN+8*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+8*$28,x
    jmp __b3_9
    // main::@3_9
  __b3_9:
    // [11] (main::SCREEN+9*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+9*$28,x
    jmp __b3_10
    // main::@3_10
  __b3_10:
    // [12] (main::SCREEN+$a*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$a*$28,x
    jmp __b3_11
    // main::@3_11
  __b3_11:
    // [13] (main::SCREEN+$b*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$b*$28,x
    jmp __b3_12
    // main::@3_12
  __b3_12:
    // [14] (main::SCREEN+$c*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$c*$28,x
    jmp __b3_13
    // main::@3_13
  __b3_13:
    // [15] (main::SCREEN+$d*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$d*$28,x
    jmp __b3_14
    // main::@3_14
  __b3_14:
    // [16] (main::SCREEN+$e*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$e*$28,x
    jmp __b3_15
    // main::@3_15
  __b3_15:
    // [17] (main::SCREEN+$f*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$f*$28,x
    jmp __b3_16
    // main::@3_16
  __b3_16:
    // [18] (main::SCREEN+$10*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$10*$28,x
    jmp __b3_17
    // main::@3_17
  __b3_17:
    // [19] (main::SCREEN+$11*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$11*$28,x
    jmp __b3_18
    // main::@3_18
  __b3_18:
    // [20] (main::SCREEN+$12*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$12*$28,x
    jmp __b3_19
    // main::@3_19
  __b3_19:
    // [21] (main::SCREEN+$13*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$13*$28,x
    jmp __b3_20
    // main::@3_20
  __b3_20:
    // [22] (main::SCREEN+$14*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$14*$28,x
    jmp __b3_21
    // main::@3_21
  __b3_21:
    // [23] (main::SCREEN+$15*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$15*$28,x
    jmp __b3_22
    // main::@3_22
  __b3_22:
    // [24] (main::SCREEN+$16*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$16*$28,x
    jmp __b3_23
    // main::@3_23
  __b3_23:
    // [25] (main::SCREEN+$17*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$17*$28,x
    jmp __b3_24
    // main::@3_24
  __b3_24:
    // [26] (main::SCREEN+$18*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$18*$28,x
    jmp __b3
    // main::@3
  __b3:
    // [27] main::x#1 = ++ main::x#5 -- vbuxx=_inc_vbuxx 
    inx
    // [28] if(main::x#1!=$28) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$28
    bne __b1_from___b3
    jmp __breturn
    // main::@return
  __breturn:
    // [29] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3_1
Removing instruction jmp __b3_2
Removing instruction jmp __b3_3
Removing instruction jmp __b3_4
Removing instruction jmp __b3_5
Removing instruction jmp __b3_6
Removing instruction jmp __b3_7
Removing instruction jmp __b3_8
Removing instruction jmp __b3_9
Removing instruction jmp __b3_10
Removing instruction jmp __b3_11
Removing instruction jmp __b3_12
Removing instruction jmp __b3_13
Removing instruction jmp __b3_14
Removing instruction jmp __b3_15
Removing instruction jmp __b3_16
Removing instruction jmp __b3_17
Removing instruction jmp __b3_18
Removing instruction jmp __b3_19
Removing instruction jmp __b3_20
Removing instruction jmp __b3_21
Removing instruction jmp __b3_22
Removing instruction jmp __b3_23
Removing instruction jmp __b3_24
Removing instruction jmp __b3
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __b1 with __b2
Replacing label __b1_from___b3 with __b2
Removing instruction __b1_from___b3:
Removing instruction __b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b1_from_main:
Removing instruction __b3_1:
Removing instruction __b3_2:
Removing instruction __b3_3:
Removing instruction __b3_4:
Removing instruction __b3_5:
Removing instruction __b3_6:
Removing instruction __b3_7:
Removing instruction __b3_8:
Removing instruction __b3_9:
Removing instruction __b3_10:
Removing instruction __b3_11:
Removing instruction __b3_12:
Removing instruction __b3_13:
Removing instruction __b3_14:
Removing instruction __b3_15:
Removing instruction __b3_16:
Removing instruction __b3_17:
Removing instruction __b3_18:
Removing instruction __b3_19:
Removing instruction __b3_20:
Removing instruction __b3_21:
Removing instruction __b3_22:
Removing instruction __b3_23:
Removing instruction __b3_24:
Removing instruction __b3:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp __b2
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
void main()
__constant char *main::SCREEN = (char *) 1024
char main::line
char main::x
char main::x#1 // reg byte x 16.5
char main::x#5 // reg byte x 22.00000000000001

reg byte x [ main::x#5 main::x#1 ]


FINAL ASSEMBLER
Score: 1841

  // File Comments
// Fills the screen using an unrolled inner while()-loop
  // Upstart
  // Commodore 64 PRG executable file
.file [name="unroll-screenfill-while.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
.segment Code
  // main
main: {
    .label SCREEN = $400
    // [1] phi from main to main::@1 [phi:main->main::@1]
    // [1] phi main::x#5 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [1] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [1] phi main::x#5 = main::x#1 [phi:main::@3->main::@1#0] -- register_copy 
    // main::@1
    // main::@2
  __b2:
    // (SCREEN+line*40)[x] = x
    // [2] main::SCREEN[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN,x
    // main::@3_1
    // [3] (main::SCREEN+1*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+1*$28,x
    // main::@3_2
    // [4] (main::SCREEN+2*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+2*$28,x
    // main::@3_3
    // [5] (main::SCREEN+3*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+3*$28,x
    // main::@3_4
    // [6] (main::SCREEN+4*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+4*$28,x
    // main::@3_5
    // [7] (main::SCREEN+5*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+5*$28,x
    // main::@3_6
    // [8] (main::SCREEN+6*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+6*$28,x
    // main::@3_7
    // [9] (main::SCREEN+7*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+7*$28,x
    // main::@3_8
    // [10] (main::SCREEN+8*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+8*$28,x
    // main::@3_9
    // [11] (main::SCREEN+9*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+9*$28,x
    // main::@3_10
    // [12] (main::SCREEN+$a*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$a*$28,x
    // main::@3_11
    // [13] (main::SCREEN+$b*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$b*$28,x
    // main::@3_12
    // [14] (main::SCREEN+$c*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$c*$28,x
    // main::@3_13
    // [15] (main::SCREEN+$d*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$d*$28,x
    // main::@3_14
    // [16] (main::SCREEN+$e*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$e*$28,x
    // main::@3_15
    // [17] (main::SCREEN+$f*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$f*$28,x
    // main::@3_16
    // [18] (main::SCREEN+$10*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$10*$28,x
    // main::@3_17
    // [19] (main::SCREEN+$11*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$11*$28,x
    // main::@3_18
    // [20] (main::SCREEN+$12*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$12*$28,x
    // main::@3_19
    // [21] (main::SCREEN+$13*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$13*$28,x
    // main::@3_20
    // [22] (main::SCREEN+$14*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$14*$28,x
    // main::@3_21
    // [23] (main::SCREEN+$15*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$15*$28,x
    // main::@3_22
    // [24] (main::SCREEN+$16*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$16*$28,x
    // main::@3_23
    // [25] (main::SCREEN+$17*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$17*$28,x
    // main::@3_24
    // [26] (main::SCREEN+$18*$28)[main::x#5] = main::x#5 -- pbuc1_derefidx_vbuxx=vbuxx 
    txa
    sta SCREEN+$18*$28,x
    // main::@3
    // for(byte x: 0..39)
    // [27] main::x#1 = ++ main::x#5 -- vbuxx=_inc_vbuxx 
    inx
    // [28] if(main::x#1!=$28) goto main::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$28
    bne __b2
    // main::@return
    // }
    // [29] return 
    rts
}
  // File Data

