Created struct value member variable (struct Point) main::v1_p
Created struct value member variable (struct Point) main::v1_q
Converted struct value to member variables (struct Vector) main::v1
Created struct value member variable (struct Point) main::v2_p
Created struct value member variable (struct Point) main::v2_q
Converted struct value to member variables (struct Vector) main::v2
Created struct value member variable (struct Point) main::v3_p
Created struct value member variable (struct Point) main::v3_q
Converted struct value to member variables (struct Vector) main::v3
Created struct value member variable (struct Point) main::v4_p
Created struct value member variable (struct Point) main::v4_q
Converted struct value to member variables (struct Vector) main::v4
Created struct value member variable (byte) main::v1_p_x
Created struct value member variable (byte) main::v1_p_y
Converted struct value to member variables (struct Point) main::v1_p
Created struct value member variable (byte) main::v1_q_x
Created struct value member variable (byte) main::v1_q_y
Converted struct value to member variables (struct Point) main::v1_q
Created struct value member variable (byte) main::v2_p_x
Created struct value member variable (byte) main::v2_p_y
Converted struct value to member variables (struct Point) main::v2_p
Created struct value member variable (byte) main::v2_q_x
Created struct value member variable (byte) main::v2_q_y
Converted struct value to member variables (struct Point) main::v2_q
Created struct value member variable (byte) main::v3_p_x
Created struct value member variable (byte) main::v3_p_y
Converted struct value to member variables (struct Point) main::v3_p
Created struct value member variable (byte) main::v3_q_x
Created struct value member variable (byte) main::v3_q_y
Converted struct value to member variables (struct Point) main::v3_q
Created struct value member variable (byte) main::v4_p_x
Created struct value member variable (byte) main::v4_p_y
Converted struct value to member variables (struct Point) main::v4_p
Created struct value member variable (byte) main::v4_q_x
Created struct value member variable (byte) main::v4_q_y
Converted struct value to member variables (struct Point) main::v4_q
Unwinding value copy (struct Vector) main::v1 ← { p: { x: (byte) 2, y: (byte) 3 }, q: { x: (byte) 4, y: (byte) 5 } }
Unwinding value copy (struct Vector) main::v1 ← { p: { x: (byte) 2, y: (byte) 3 }, q: { x: (byte) 4, y: (byte) 5 } }
Adding value simple copy (byte) main::v1_p_x ← (byte) 2
Adding value simple copy (byte) main::v1_p_y ← (byte) 3
Unwinding value copy (struct Vector) main::v1 ← { p: { x: (byte) 2, y: (byte) 3 }, q: { x: (byte) 4, y: (byte) 5 } }
Adding value simple copy (byte) main::v1_q_x ← (byte) 4
Adding value simple copy (byte) main::v1_q_y ← (byte) 5
Unwinding value copy (struct Vector) main::v2 ← (struct Vector) main::v1
Unwinding value copy (struct Vector) main::v2 ← (struct Vector) main::v1
Adding value simple copy (byte) main::v2_p_x ← (byte) main::v1_p_x
Adding value simple copy (byte) main::v2_p_y ← (byte) main::v1_p_y
Unwinding value copy (struct Vector) main::v2 ← (struct Vector) main::v1
Adding value simple copy (byte) main::v2_q_x ← (byte) main::v1_q_x
Adding value simple copy (byte) main::v2_q_y ← (byte) main::v1_q_y
Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v1.p, { x: (byte) 6, y: (byte) 7 } }
Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v1.p, { x: (byte) 6, y: (byte) 7 } }
Adding value simple copy (byte) main::v3_p_x ← (byte) main::v1_p_x
Adding value simple copy (byte) main::v3_p_y ← (byte) main::v1_p_y
Unwinding value copy (struct Vector) main::v3 ← (struct Vector){ (struct Vector) main::v1.p, { x: (byte) 6, y: (byte) 7 } }
Adding value simple copy (byte) main::v3_q_x ← (byte) 6
Adding value simple copy (byte) main::v3_q_y ← (byte) 7
Unwinding value copy (struct Vector) main::v4 ← (struct Vector){ (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y }, { x: (byte) 8, y: (byte) 9 } }
Unwinding value copy (struct Vector) main::v4 ← (struct Vector){ (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y }, { x: (byte) 8, y: (byte) 9 } }
Adding value simple copy (byte) main::v4_p_x ← (byte) main::v1_p_x
Adding value simple copy (byte) main::v4_p_y ← (byte) main::v1_p_y
Unwinding value copy (struct Vector) main::v4 ← (struct Vector){ (struct Point){ (struct Vector) main::v1.p.x, (struct Vector) main::v1.p.y }, { x: (byte) 8, y: (byte) 9 } }
Adding value simple copy (byte) main::v4_q_x ← (byte) 8
Adding value simple copy (byte) main::v4_q_y ← (byte) 9
Replacing struct member reference (struct Vector) main::v1.p.x with member unwinding reference (byte) main::v1_p_x
Replacing struct member reference (struct Vector) main::v1.p.y with member unwinding reference (byte) main::v1_p_y
Replacing struct member reference (struct Vector) main::v1.q.x with member unwinding reference (byte) main::v1_q_x
Replacing struct member reference (struct Vector) main::v1.q.y with member unwinding reference (byte) main::v1_q_y
Replacing struct member reference (struct Vector) main::v2.p.x with member unwinding reference (byte) main::v2_p_x
Replacing struct member reference (struct Vector) main::v2.p.y with member unwinding reference (byte) main::v2_p_y
Replacing struct member reference (struct Vector) main::v2.q.x with member unwinding reference (byte) main::v2_q_x
Replacing struct member reference (struct Vector) main::v2.q.y with member unwinding reference (byte) main::v2_q_y
Replacing struct member reference (struct Vector) main::v3.p.x with member unwinding reference (byte) main::v3_p_x
Replacing struct member reference (struct Vector) main::v3.p.y with member unwinding reference (byte) main::v3_p_y
Replacing struct member reference (struct Vector) main::v3.q.x with member unwinding reference (byte) main::v3_q_x
Replacing struct member reference (struct Vector) main::v3.q.y with member unwinding reference (byte) main::v3_q_y
Replacing struct member reference (struct Vector) main::v4.p.x with member unwinding reference (byte) main::v4_p_x
Replacing struct member reference (struct Vector) main::v4.p.y with member unwinding reference (byte) main::v4_p_y
Replacing struct member reference (struct Vector) main::v4.q.x with member unwinding reference (byte) main::v4_q_x
Replacing struct member reference (struct Vector) main::v4.q.y with member unwinding reference (byte) main::v4_q_y
Identified constant variable (byte) main::v1_p_x
Identified constant variable (byte) main::v1_p_y
Identified constant variable (byte) main::v1_q_x
Identified constant variable (byte) main::v1_q_y
Identified constant variable (byte) main::v3_q_x
Identified constant variable (byte) main::v3_q_y
Identified constant variable (byte) main::v4_q_x
Identified constant variable (byte) main::v4_q_y

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@1

(void()) main()
main: scope:[main]  from @1
  (byte) main::idx#0 ← (byte) 0
  (byte) main::v2_p_x#0 ← (const byte) main::v1_p_x
  (byte) main::v2_p_y#0 ← (const byte) main::v1_p_y
  (byte) main::v2_q_x#0 ← (const byte) main::v1_q_x
  (byte) main::v2_q_y#0 ← (const byte) main::v1_q_y
  (byte) main::v3_p_x#0 ← (const byte) main::v1_p_x
  (byte) main::v3_p_y#0 ← (const byte) main::v1_p_y
  (byte) main::v4_p_x#0 ← (const byte) main::v1_p_x
  (byte) main::v4_p_y#0 ← (const byte) main::v1_p_y
  *((const byte*) SCREEN + (byte) main::idx#0) ← (const byte) main::v1_p_x
  (byte) main::idx#1 ← ++ (byte) main::idx#0
  *((const byte*) SCREEN + (byte) main::idx#1) ← (const byte) main::v1_p_y
  (byte) main::idx#2 ← ++ (byte) main::idx#1
  *((const byte*) SCREEN + (byte) main::idx#2) ← (const byte) main::v1_q_x
  (byte) main::idx#3 ← ++ (byte) main::idx#2
  *((const byte*) SCREEN + (byte) main::idx#3) ← (const byte) main::v1_q_y
  (byte) main::idx#4 ← ++ (byte) main::idx#3
  *((const byte*) SCREEN + (byte) main::idx#4) ← (byte) main::v2_p_x#0
  (byte) main::idx#5 ← ++ (byte) main::idx#4
  *((const byte*) SCREEN + (byte) main::idx#5) ← (byte) main::v2_p_y#0
  (byte) main::idx#6 ← ++ (byte) main::idx#5
  *((const byte*) SCREEN + (byte) main::idx#6) ← (byte) main::v2_q_x#0
  (byte) main::idx#7 ← ++ (byte) main::idx#6
  *((const byte*) SCREEN + (byte) main::idx#7) ← (byte) main::v2_q_y#0
  (byte) main::idx#8 ← ++ (byte) main::idx#7
  *((const byte*) SCREEN + (byte) main::idx#8) ← (byte) main::v3_p_x#0
  (byte) main::idx#9 ← ++ (byte) main::idx#8
  *((const byte*) SCREEN + (byte) main::idx#9) ← (byte) main::v3_p_y#0
  (byte) main::idx#10 ← ++ (byte) main::idx#9
  *((const byte*) SCREEN + (byte) main::idx#10) ← (const byte) main::v3_q_x
  (byte) main::idx#11 ← ++ (byte) main::idx#10
  *((const byte*) SCREEN + (byte) main::idx#11) ← (const byte) main::v3_q_y
  (byte) main::idx#12 ← ++ (byte) main::idx#11
  *((const byte*) SCREEN + (byte) main::idx#12) ← (byte) main::v4_p_x#0
  (byte) main::idx#13 ← ++ (byte) main::idx#12
  *((const byte*) SCREEN + (byte) main::idx#13) ← (byte) main::v4_p_y#0
  (byte) main::idx#14 ← ++ (byte) main::idx#13
  *((const byte*) SCREEN + (byte) main::idx#14) ← (const byte) main::v4_q_x
  (byte) main::idx#15 ← ++ (byte) main::idx#14
  *((const byte*) SCREEN + (byte) main::idx#15) ← (const byte) main::v4_q_y
  (byte) main::idx#16 ← ++ (byte) main::idx#15
  to:main::@return
main::@return: scope:[main]  from main
  return 
  to:@return
@1: scope:[]  from @begin
  call main 
  to:@2
@2: scope:[]  from @1
  to:@end
@end: scope:[]  from @2

SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @begin
(label) @end
(byte) Point::x
(byte) Point::y
(const byte*) SCREEN = (byte*)(number) $400
(struct Point) Vector::p
(struct Point) Vector::q
(void()) main()
(label) main::@return
(byte) main::idx
(byte) main::idx#0
(byte) main::idx#1
(byte) main::idx#10
(byte) main::idx#11
(byte) main::idx#12
(byte) main::idx#13
(byte) main::idx#14
(byte) main::idx#15
(byte) main::idx#16
(byte) main::idx#2
(byte) main::idx#3
(byte) main::idx#4
(byte) main::idx#5
(byte) main::idx#6
(byte) main::idx#7
(byte) main::idx#8
(byte) main::idx#9
(struct Point) main::v1_p
(const byte) main::v1_p_x = (byte) 2
(const byte) main::v1_p_y = (byte) 3
(struct Point) main::v1_q
(const byte) main::v1_q_x = (byte) 4
(const byte) main::v1_q_y = (byte) 5
(struct Point) main::v2_p
(byte) main::v2_p_x
(byte) main::v2_p_x#0
(byte) main::v2_p_y
(byte) main::v2_p_y#0
(struct Point) main::v2_q
(byte) main::v2_q_x
(byte) main::v2_q_x#0
(byte) main::v2_q_y
(byte) main::v2_q_y#0
(struct Point) main::v3_p
(byte) main::v3_p_x
(byte) main::v3_p_x#0
(byte) main::v3_p_y
(byte) main::v3_p_y#0
(struct Point) main::v3_q
(const byte) main::v3_q_x = (byte) 6
(const byte) main::v3_q_y = (byte) 7
(struct Point) main::v4_p
(byte) main::v4_p_x
(byte) main::v4_p_x#0
(byte) main::v4_p_y
(byte) main::v4_p_y#0
(struct Point) main::v4_q
(const byte) main::v4_q_x = (byte) 8
(const byte) main::v4_q_y = (byte) 9

Simplifying constant pointer cast (byte*) 1024
Successful SSA optimization PassNCastSimplification
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::v2_p_x#0 = main::v1_p_x
Constant (const byte) main::v2_p_y#0 = main::v1_p_y
Constant (const byte) main::v2_q_x#0 = main::v1_q_x
Constant (const byte) main::v2_q_y#0 = main::v1_q_y
Constant (const byte) main::v3_p_x#0 = main::v1_p_x
Constant (const byte) main::v3_p_y#0 = main::v1_p_y
Constant (const byte) main::v4_p_x#0 = main::v1_p_x
Constant (const byte) main::v4_p_y#0 = main::v1_p_y
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero SCREEN in [9] *((const byte*) SCREEN + (const byte) main::idx#0) ← (const byte) main::v1_p_x
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) main::idx#16 and assignment [31] (byte) main::idx#16 ← ++ (byte) main::idx#15
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [1] (byte) main::idx#1 ← ++ (const byte) main::idx#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#1 = ++main::idx#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] (byte) main::idx#2 ← ++ (const byte) main::idx#1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#2 = ++main::idx#1
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [3] (byte) main::idx#3 ← ++ (const byte) main::idx#2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#3 = ++main::idx#2
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [4] (byte) main::idx#4 ← ++ (const byte) main::idx#3
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#4 = ++main::idx#3
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [5] (byte) main::idx#5 ← ++ (const byte) main::idx#4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#5 = ++main::idx#4
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [6] (byte) main::idx#6 ← ++ (const byte) main::idx#5
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#6 = ++main::idx#5
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [7] (byte) main::idx#7 ← ++ (const byte) main::idx#6
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#7 = ++main::idx#6
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [8] (byte) main::idx#8 ← ++ (const byte) main::idx#7
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#8 = ++main::idx#7
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [9] (byte) main::idx#9 ← ++ (const byte) main::idx#8
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#9 = ++main::idx#8
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [10] (byte) main::idx#10 ← ++ (const byte) main::idx#9
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#10 = ++main::idx#9
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [11] (byte) main::idx#11 ← ++ (const byte) main::idx#10
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#11 = ++main::idx#10
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [12] (byte) main::idx#12 ← ++ (const byte) main::idx#11
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#12 = ++main::idx#11
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [13] (byte) main::idx#13 ← ++ (const byte) main::idx#12
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#13 = ++main::idx#12
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [14] (byte) main::idx#14 ← ++ (const byte) main::idx#13
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#14 = ++main::idx#13
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [15] (byte) main::idx#15 ← ++ (const byte) main::idx#14
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#15 = ++main::idx#14
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with different constant siblings (const byte) main::idx#0
Inlining constant with different constant siblings (const byte) main::idx#1
Inlining constant with different constant siblings (const byte) main::idx#2
Inlining constant with different constant siblings (const byte) main::idx#3
Inlining constant with different constant siblings (const byte) main::idx#4
Inlining constant with different constant siblings (const byte) main::idx#5
Inlining constant with different constant siblings (const byte) main::idx#6
Inlining constant with different constant siblings (const byte) main::idx#7
Inlining constant with different constant siblings (const byte) main::idx#8
Inlining constant with different constant siblings (const byte) main::idx#9
Inlining constant with different constant siblings (const byte) main::idx#10
Inlining constant with different constant siblings (const byte) main::idx#11
Inlining constant with different constant siblings (const byte) main::idx#12
Inlining constant with different constant siblings (const byte) main::idx#13
Inlining constant with different constant siblings (const byte) main::idx#14
Inlining constant with different constant siblings (const byte) main::idx#15
Constant inlined main::idx#12 = ++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#13 = ++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#14 = ++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#15 = ++++++++++++++++++++++++++++++(byte) 0
Constant inlined main::v2_q_y#0 = (const byte) main::v1_q_y
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::v4_p_y#0 = (const byte) main::v1_p_y
Constant inlined main::idx#1 = ++(byte) 0
Constant inlined main::v2_q_x#0 = (const byte) main::v1_q_x
Constant inlined main::v4_p_x#0 = (const byte) main::v1_p_x
Constant inlined main::idx#2 = ++++(byte) 0
Constant inlined main::idx#3 = ++++++(byte) 0
Constant inlined main::idx#4 = ++++++++(byte) 0
Constant inlined main::idx#5 = ++++++++++(byte) 0
Constant inlined main::idx#6 = ++++++++++++(byte) 0
Constant inlined main::v3_p_y#0 = (const byte) main::v1_p_y
Constant inlined main::idx#7 = ++++++++++++++(byte) 0
Constant inlined main::idx#8 = ++++++++++++++++(byte) 0
Constant inlined main::idx#9 = ++++++++++++++++++(byte) 0
Constant inlined main::idx#10 = ++++++++++++++++++++(byte) 0
Constant inlined main::v3_p_x#0 = (const byte) main::v1_p_x
Constant inlined main::idx#11 = ++++++++++++++++++++++(byte) 0
Constant inlined main::v2_p_x#0 = (const byte) main::v1_p_x
Constant inlined main::v2_p_y#0 = (const byte) main::v1_p_y
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(SCREEN+++0)
Consolidated array index constant in *(SCREEN+++++0)
Consolidated array index constant in *(SCREEN+++++++0)
Consolidated array index constant in *(SCREEN+++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++++++++++++0)
Consolidated array index constant in *(SCREEN+++++++++++++++++++++++++++++++0)
Successful SSA optimization Pass2ConstantAdditionElimination
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
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
Successful SSA optimization Pass2ConstantSimplification
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @2
Adding NOP phi() at start of @end
CALL GRAPH
Calls in [] to main:2 

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes
Culled Empty Block (label) @2
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()

(void()) main()
main: scope:[main]  from @1
  [4] *((const byte*) SCREEN) ← (const byte) main::v1_p_x
  [5] *((const byte*) SCREEN+(byte) 1) ← (const byte) main::v1_p_y
  [6] *((const byte*) SCREEN+(byte) 2) ← (const byte) main::v1_q_x
  [7] *((const byte*) SCREEN+(byte) 3) ← (const byte) main::v1_q_y
  [8] *((const byte*) SCREEN+(byte) 4) ← (const byte) main::v1_p_x
  [9] *((const byte*) SCREEN+(byte) 5) ← (const byte) main::v1_p_y
  [10] *((const byte*) SCREEN+(byte) 6) ← (const byte) main::v1_q_x
  [11] *((const byte*) SCREEN+(byte) 7) ← (const byte) main::v1_q_y
  [12] *((const byte*) SCREEN+(byte) 8) ← (const byte) main::v1_p_x
  [13] *((const byte*) SCREEN+(byte) 9) ← (const byte) main::v1_p_y
  [14] *((const byte*) SCREEN+(byte) $a) ← (const byte) main::v3_q_x
  [15] *((const byte*) SCREEN+(byte) $b) ← (const byte) main::v3_q_y
  [16] *((const byte*) SCREEN+(byte) $c) ← (const byte) main::v1_p_x
  [17] *((const byte*) SCREEN+(byte) $d) ← (const byte) main::v1_p_y
  [18] *((const byte*) SCREEN+(byte) $e) ← (const byte) main::v4_q_x
  [19] *((const byte*) SCREEN+(byte) $f) ← (const byte) main::v4_q_y
  to:main::@return
main::@return: scope:[main]  from main
  [20] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte) Point::x
(byte) Point::y
(struct Point) Vector::p
(struct Point) Vector::q
(void()) main()
(byte) main::idx
(struct Point) main::v1_p
(struct Point) main::v1_q
(struct Point) main::v2_p
(byte) main::v2_p_x
(byte) main::v2_p_y
(struct Point) main::v2_q
(byte) main::v2_q_x
(byte) main::v2_q_y
(struct Point) main::v3_p
(byte) main::v3_p_x
(byte) main::v3_p_y
(struct Point) main::v3_q
(struct Point) main::v4_p
(byte) main::v4_p_x
(byte) main::v4_p_y
(struct Point) main::v4_q

Initial phi equivalence classes
Complete equivalence classes

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Minimal struct with Unwound behavior - struct containing struct copying
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .const v1_p_x = 2
    .const v1_p_y = 3
    .const v1_q_x = 4
    .const v1_q_y = 5
    .const v3_q_x = 6
    .const v3_q_y = 7
    .const v4_q_x = 8
    .const v4_q_y = 9
    // [4] *((const byte*) SCREEN) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN
    // [5] *((const byte*) SCREEN+(byte) 1) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+1
    // [6] *((const byte*) SCREEN+(byte) 2) ← (const byte) main::v1_q_x -- _deref_pbuc1=vbuc2 
    lda #v1_q_x
    sta SCREEN+2
    // [7] *((const byte*) SCREEN+(byte) 3) ← (const byte) main::v1_q_y -- _deref_pbuc1=vbuc2 
    lda #v1_q_y
    sta SCREEN+3
    // [8] *((const byte*) SCREEN+(byte) 4) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+4
    // [9] *((const byte*) SCREEN+(byte) 5) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+5
    // [10] *((const byte*) SCREEN+(byte) 6) ← (const byte) main::v1_q_x -- _deref_pbuc1=vbuc2 
    lda #v1_q_x
    sta SCREEN+6
    // [11] *((const byte*) SCREEN+(byte) 7) ← (const byte) main::v1_q_y -- _deref_pbuc1=vbuc2 
    lda #v1_q_y
    sta SCREEN+7
    // [12] *((const byte*) SCREEN+(byte) 8) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+8
    // [13] *((const byte*) SCREEN+(byte) 9) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+9
    // [14] *((const byte*) SCREEN+(byte) $a) ← (const byte) main::v3_q_x -- _deref_pbuc1=vbuc2 
    lda #v3_q_x
    sta SCREEN+$a
    // [15] *((const byte*) SCREEN+(byte) $b) ← (const byte) main::v3_q_y -- _deref_pbuc1=vbuc2 
    lda #v3_q_y
    sta SCREEN+$b
    // [16] *((const byte*) SCREEN+(byte) $c) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+$c
    // [17] *((const byte*) SCREEN+(byte) $d) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+$d
    // [18] *((const byte*) SCREEN+(byte) $e) ← (const byte) main::v4_q_x -- _deref_pbuc1=vbuc2 
    lda #v4_q_x
    sta SCREEN+$e
    // [19] *((const byte*) SCREEN+(byte) $f) ← (const byte) main::v4_q_y -- _deref_pbuc1=vbuc2 
    lda #v4_q_y
    sta SCREEN+$f
    jmp __breturn
    // main::@return
  __breturn:
    // [20] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) SCREEN) ← (const byte) main::v1_p_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [5] *((const byte*) SCREEN+(byte) 1) ← (const byte) main::v1_p_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [6] *((const byte*) SCREEN+(byte) 2) ← (const byte) main::v1_q_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const byte*) SCREEN+(byte) 3) ← (const byte) main::v1_q_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [8] *((const byte*) SCREEN+(byte) 4) ← (const byte) main::v1_p_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [9] *((const byte*) SCREEN+(byte) 5) ← (const byte) main::v1_p_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] *((const byte*) SCREEN+(byte) 6) ← (const byte) main::v1_q_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [11] *((const byte*) SCREEN+(byte) 7) ← (const byte) main::v1_q_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [12] *((const byte*) SCREEN+(byte) 8) ← (const byte) main::v1_p_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [13] *((const byte*) SCREEN+(byte) 9) ← (const byte) main::v1_p_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [14] *((const byte*) SCREEN+(byte) $a) ← (const byte) main::v3_q_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((const byte*) SCREEN+(byte) $b) ← (const byte) main::v3_q_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [16] *((const byte*) SCREEN+(byte) $c) ← (const byte) main::v1_p_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [17] *((const byte*) SCREEN+(byte) $d) ← (const byte) main::v1_p_y [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [18] *((const byte*) SCREEN+(byte) $e) ← (const byte) main::v4_q_x [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [19] *((const byte*) SCREEN+(byte) $f) ← (const byte) main::v4_q_y [ ] ( main:2 [ ] ) always clobbers reg byte a 

REGISTER UPLIFT SCOPES
Uplift Scope [Point] 
Uplift Scope [Vector] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [Point] best 117 combination 
Uplifting [Vector] best 117 combination 
Uplifting [main] best 117 combination 
Uplifting [] best 117 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Minimal struct with Unwound behavior - struct containing struct copying
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .const v1_p_x = 2
    .const v1_p_y = 3
    .const v1_q_x = 4
    .const v1_q_y = 5
    .const v3_q_x = 6
    .const v3_q_y = 7
    .const v4_q_x = 8
    .const v4_q_y = 9
    // [4] *((const byte*) SCREEN) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN
    // [5] *((const byte*) SCREEN+(byte) 1) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+1
    // [6] *((const byte*) SCREEN+(byte) 2) ← (const byte) main::v1_q_x -- _deref_pbuc1=vbuc2 
    lda #v1_q_x
    sta SCREEN+2
    // [7] *((const byte*) SCREEN+(byte) 3) ← (const byte) main::v1_q_y -- _deref_pbuc1=vbuc2 
    lda #v1_q_y
    sta SCREEN+3
    // [8] *((const byte*) SCREEN+(byte) 4) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+4
    // [9] *((const byte*) SCREEN+(byte) 5) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+5
    // [10] *((const byte*) SCREEN+(byte) 6) ← (const byte) main::v1_q_x -- _deref_pbuc1=vbuc2 
    lda #v1_q_x
    sta SCREEN+6
    // [11] *((const byte*) SCREEN+(byte) 7) ← (const byte) main::v1_q_y -- _deref_pbuc1=vbuc2 
    lda #v1_q_y
    sta SCREEN+7
    // [12] *((const byte*) SCREEN+(byte) 8) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+8
    // [13] *((const byte*) SCREEN+(byte) 9) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+9
    // [14] *((const byte*) SCREEN+(byte) $a) ← (const byte) main::v3_q_x -- _deref_pbuc1=vbuc2 
    lda #v3_q_x
    sta SCREEN+$a
    // [15] *((const byte*) SCREEN+(byte) $b) ← (const byte) main::v3_q_y -- _deref_pbuc1=vbuc2 
    lda #v3_q_y
    sta SCREEN+$b
    // [16] *((const byte*) SCREEN+(byte) $c) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+$c
    // [17] *((const byte*) SCREEN+(byte) $d) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+$d
    // [18] *((const byte*) SCREEN+(byte) $e) ← (const byte) main::v4_q_x -- _deref_pbuc1=vbuc2 
    lda #v4_q_x
    sta SCREEN+$e
    // [19] *((const byte*) SCREEN+(byte) $f) ← (const byte) main::v4_q_y -- _deref_pbuc1=vbuc2 
    lda #v4_q_y
    sta SCREEN+$f
    jmp __breturn
    // main::@return
  __breturn:
    // [20] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __bbegin with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction __bend_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte) Point::x
(byte) Point::y
(const byte*) SCREEN = (byte*) 1024
(struct Point) Vector::p
(struct Point) Vector::q
(void()) main()
(label) main::@return
(byte) main::idx
(struct Point) main::v1_p
(const byte) main::v1_p_x = (byte) 2
(const byte) main::v1_p_y = (byte) 3
(struct Point) main::v1_q
(const byte) main::v1_q_x = (byte) 4
(const byte) main::v1_q_y = (byte) 5
(struct Point) main::v2_p
(byte) main::v2_p_x
(byte) main::v2_p_y
(struct Point) main::v2_q
(byte) main::v2_q_x
(byte) main::v2_q_y
(struct Point) main::v3_p
(byte) main::v3_p_x
(byte) main::v3_p_y
(struct Point) main::v3_q
(const byte) main::v3_q_x = (byte) 6
(const byte) main::v3_q_y = (byte) 7
(struct Point) main::v4_p
(byte) main::v4_p_x
(byte) main::v4_p_y
(struct Point) main::v4_q
(const byte) main::v4_q_x = (byte) 8
(const byte) main::v4_q_y = (byte) 9



FINAL ASSEMBLER
Score: 102

  // File Comments
// Minimal struct with Unwound behavior - struct containing struct copying
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .const v1_p_x = 2
    .const v1_p_y = 3
    .const v1_q_x = 4
    .const v1_q_y = 5
    .const v3_q_x = 6
    .const v3_q_y = 7
    .const v4_q_x = 8
    .const v4_q_y = 9
    // SCREEN[idx++] = v1.p.x
    // [4] *((const byte*) SCREEN) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN
    // SCREEN[idx++] = v1.p.y
    // [5] *((const byte*) SCREEN+(byte) 1) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+1
    // SCREEN[idx++] = v1.q.x
    // [6] *((const byte*) SCREEN+(byte) 2) ← (const byte) main::v1_q_x -- _deref_pbuc1=vbuc2 
    lda #v1_q_x
    sta SCREEN+2
    // SCREEN[idx++] = v1.q.y
    // [7] *((const byte*) SCREEN+(byte) 3) ← (const byte) main::v1_q_y -- _deref_pbuc1=vbuc2 
    lda #v1_q_y
    sta SCREEN+3
    // SCREEN[idx++] = v2.p.x
    // [8] *((const byte*) SCREEN+(byte) 4) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+4
    // SCREEN[idx++] = v2.p.y
    // [9] *((const byte*) SCREEN+(byte) 5) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+5
    // SCREEN[idx++] = v2.q.x
    // [10] *((const byte*) SCREEN+(byte) 6) ← (const byte) main::v1_q_x -- _deref_pbuc1=vbuc2 
    lda #v1_q_x
    sta SCREEN+6
    // SCREEN[idx++] = v2.q.y
    // [11] *((const byte*) SCREEN+(byte) 7) ← (const byte) main::v1_q_y -- _deref_pbuc1=vbuc2 
    lda #v1_q_y
    sta SCREEN+7
    // SCREEN[idx++] = v3.p.x
    // [12] *((const byte*) SCREEN+(byte) 8) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+8
    // SCREEN[idx++] = v3.p.y
    // [13] *((const byte*) SCREEN+(byte) 9) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+9
    // SCREEN[idx++] = v3.q.x
    // [14] *((const byte*) SCREEN+(byte) $a) ← (const byte) main::v3_q_x -- _deref_pbuc1=vbuc2 
    lda #v3_q_x
    sta SCREEN+$a
    // SCREEN[idx++] = v3.q.y
    // [15] *((const byte*) SCREEN+(byte) $b) ← (const byte) main::v3_q_y -- _deref_pbuc1=vbuc2 
    lda #v3_q_y
    sta SCREEN+$b
    // SCREEN[idx++] = v4.p.x
    // [16] *((const byte*) SCREEN+(byte) $c) ← (const byte) main::v1_p_x -- _deref_pbuc1=vbuc2 
    lda #v1_p_x
    sta SCREEN+$c
    // SCREEN[idx++] = v4.p.y
    // [17] *((const byte*) SCREEN+(byte) $d) ← (const byte) main::v1_p_y -- _deref_pbuc1=vbuc2 
    lda #v1_p_y
    sta SCREEN+$d
    // SCREEN[idx++] = v4.q.x
    // [18] *((const byte*) SCREEN+(byte) $e) ← (const byte) main::v4_q_x -- _deref_pbuc1=vbuc2 
    lda #v4_q_x
    sta SCREEN+$e
    // SCREEN[idx++] = v4.q.y
    // [19] *((const byte*) SCREEN+(byte) $f) ← (const byte) main::v4_q_y -- _deref_pbuc1=vbuc2 
    lda #v4_q_y
    sta SCREEN+$f
    // main::@return
    // }
    // [20] return 
    rts
}
  // File Data

