Created struct value member variable (byte~) main::$0_x
Created struct value member variable (byte~) main::$0_y
Converted struct value to member variables (struct Point~) main::$0
Created struct value member variable (byte~) main::$1_x
Created struct value member variable (byte~) main::$1_y
Converted struct value to member variables (struct Point~) main::$1
Created struct value member variable (byte) getPoint::return_x
Created struct value member variable (byte) getPoint::return_y
Converted struct value to member variables (struct Point) getPoint::return
Created struct value member variable (byte) getPoint::p_x
Created struct value member variable (byte) getPoint::p_y
Converted struct value to member variables (struct Point) getPoint::p
Converted procedure call LValue to member unwinding { (byte~) main::$0_x, (byte~) main::$0_y } ← call getPoint (number) 2 (number) 3 
Unwinding value copy (struct Point) main::point1 ← (struct Point~) main::$0
Adding value simple copy *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x
Adding value simple copy *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$0_y
Converted procedure call LValue to member unwinding { (byte~) main::$1_x, (byte~) main::$1_y } ← call getPoint (number) 4 (number) 5 
Unwinding value copy (struct Point) main::point2 ← (struct Point~) main::$1
Adding value simple copy *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$1_x
Adding value simple copy *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y
Unwinding value copy (struct Point) getPoint::p ← (struct Point){ (byte) getPoint::x, (byte) getPoint::y }
Adding value simple copy (byte) getPoint::p_x ← (byte) getPoint::x
Adding value simple copy (byte) getPoint::p_y ← (byte) getPoint::y
Unwinding value copy (struct Point) getPoint::return ← (struct Point) getPoint::p
Adding value simple copy (byte) getPoint::return_x ← (byte) getPoint::p_x
Adding value simple copy (byte) getPoint::return_y ← (byte) getPoint::p_y
Unwinding value copy (struct Point) getPoint::return ← (struct Point) getPoint::return
Adding value simple copy (byte) getPoint::return_x ← (byte) getPoint::return_x
Adding value simple copy (byte) getPoint::return_y ← (byte) getPoint::return_y
Converted procedure struct return value to member unwinding return { (byte) getPoint::return_x, (byte) getPoint::return_y }
Replacing struct member reference (struct Point) main::point1.x with member unwinding reference *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X)
Replacing struct member reference (struct Point) main::point1.y with member unwinding reference *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)
Replacing struct member reference (struct Point) main::point2.x with member unwinding reference *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X)
Replacing struct member reference (struct Point) main::point2.y with member unwinding reference *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)
Culled Empty Block (label) @1
Culled Empty Block (label) getPoint::@1
Unwinding list assignment { (byte~) main::$0_x, (byte~) main::$0_y } ← { (byte) getPoint::return_x, (byte) getPoint::return_y }
Unwinding list assignment { (byte~) main::$1_x, (byte~) main::$1_y } ← { (byte) getPoint::return_x, (byte) getPoint::return_y }
Unwinding list assignment { (byte) getPoint::return_x#0, (byte) getPoint::return_y#0 } ← { (byte) getPoint::return_x#3, (byte) getPoint::return_y#3 }
Unwinding list assignment { (byte) getPoint::return_x#1, (byte) getPoint::return_y#1 } ← { (byte) getPoint::return_x#3, (byte) getPoint::return_y#3 }

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

(void()) main()
main: scope:[main]  from @2
  (byte) getPoint::x#0 ← (number) 2
  (byte) getPoint::y#0 ← (number) 3
  call getPoint 
  (byte) getPoint::return_x#0 ← (byte) getPoint::return_x#3
  (byte) getPoint::return_y#0 ← (byte) getPoint::return_y#3
  to:main::@1
main::@1: scope:[main]  from main
  (byte) getPoint::return_y#4 ← phi( main/(byte) getPoint::return_y#0 )
  (byte) getPoint::return_x#4 ← phi( main/(byte) getPoint::return_x#0 )
  (byte~) main::$0_x ← (byte) getPoint::return_x#4
  (byte~) main::$0_y ← (byte) getPoint::return_y#4
  *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x
  *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$0_y
  (struct Point) main::point1 ← struct-unwound {*((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)}
  *((const byte*) SCREEN + (number) 0) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X)
  *((const byte*) SCREEN + (number) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)
  (byte) getPoint::x#1 ← (number) 4
  (byte) getPoint::y#1 ← (number) 5
  call getPoint 
  (byte) getPoint::return_x#1 ← (byte) getPoint::return_x#3
  (byte) getPoint::return_y#1 ← (byte) getPoint::return_y#3
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte) getPoint::return_y#5 ← phi( main::@1/(byte) getPoint::return_y#1 )
  (byte) getPoint::return_x#5 ← phi( main::@1/(byte) getPoint::return_x#1 )
  (byte~) main::$1_x ← (byte) getPoint::return_x#5
  (byte~) main::$1_y ← (byte) getPoint::return_y#5
  *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$1_x
  *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y
  (struct Point) main::point2 ← struct-unwound {*((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)}
  *((const byte*) SCREEN + (number) 2) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X)
  *((const byte*) SCREEN + (number) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)
  to:main::@return
main::@return: scope:[main]  from main::@2
  return 
  to:@return

(struct Point()) getPoint((byte) getPoint::x , (byte) getPoint::y)
getPoint: scope:[getPoint]  from main main::@1
  (byte) getPoint::y#2 ← phi( main/(byte) getPoint::y#0 main::@1/(byte) getPoint::y#1 )
  (byte) getPoint::x#2 ← phi( main/(byte) getPoint::x#0 main::@1/(byte) getPoint::x#1 )
  (byte) getPoint::p_x#0 ← (byte) getPoint::x#2
  (byte) getPoint::p_y#0 ← (byte) getPoint::y#2
  (byte) getPoint::return_x#2 ← (byte) getPoint::p_x#0
  (byte) getPoint::return_y#2 ← (byte) getPoint::p_y#0
  (struct Point) getPoint::return#0 ← struct-unwound {(byte) getPoint::return_x#2, (byte) getPoint::return_y#2}
  to:getPoint::@return
getPoint::@return: scope:[getPoint]  from getPoint
  (byte) getPoint::return_y#6 ← phi( getPoint/(byte) getPoint::return_y#2 )
  (byte) getPoint::return_x#6 ← phi( getPoint/(byte) getPoint::return_x#2 )
  (byte) getPoint::return_x#3 ← (byte) getPoint::return_x#6
  (byte) getPoint::return_y#3 ← (byte) getPoint::return_y#6
  (struct Point) getPoint::return#1 ← struct-unwound {(byte) getPoint::return_x#3, (byte) getPoint::return_y#3}
  return 
  to:@return
@2: scope:[]  from @begin
  call main 
  to:@3
@3: scope:[]  from @2
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(label) @2
(label) @3
(label) @begin
(label) @end
(const byte) OFFSET_STRUCT_POINT_X = (byte) 0
(const byte) OFFSET_STRUCT_POINT_Y = (byte) 1
(byte) Point::x
(byte) Point::y
(const byte*) SCREEN = (byte*)(number) $400
(struct Point()) getPoint((byte) getPoint::x , (byte) getPoint::y)
(label) getPoint::@return
(byte) getPoint::p_x
(byte) getPoint::p_x#0
(byte) getPoint::p_y
(byte) getPoint::p_y#0
(struct Point) getPoint::return
(struct Point) getPoint::return#0
(struct Point) getPoint::return#1
(byte) getPoint::return_x
(byte) getPoint::return_x#0
(byte) getPoint::return_x#1
(byte) getPoint::return_x#2
(byte) getPoint::return_x#3
(byte) getPoint::return_x#4
(byte) getPoint::return_x#5
(byte) getPoint::return_x#6
(byte) getPoint::return_y
(byte) getPoint::return_y#0
(byte) getPoint::return_y#1
(byte) getPoint::return_y#2
(byte) getPoint::return_y#3
(byte) getPoint::return_y#4
(byte) getPoint::return_y#5
(byte) getPoint::return_y#6
(byte) getPoint::x
(byte) getPoint::x#0
(byte) getPoint::x#1
(byte) getPoint::x#2
(byte) getPoint::y
(byte) getPoint::y#0
(byte) getPoint::y#1
(byte) getPoint::y#2
(void()) main()
(struct Point~) main::$0
(byte~) main::$0_x
(byte~) main::$0_y
(struct Point~) main::$1
(byte~) main::$1_x
(byte~) main::$1_y
(label) main::@1
(label) main::@2
(label) main::@return
(struct Point) main::point1 loadstore
(struct Point) main::point2 loadstore

Adding number conversion cast (unumber) 2 in (byte) getPoint::x#0 ← (number) 2
Adding number conversion cast (unumber) 3 in (byte) getPoint::y#0 ← (number) 3
Adding number conversion cast (unumber) 0 in *((const byte*) SCREEN + (number) 0) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X)
Adding number conversion cast (unumber) 1 in *((const byte*) SCREEN + (number) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)
Adding number conversion cast (unumber) 4 in (byte) getPoint::x#1 ← (number) 4
Adding number conversion cast (unumber) 5 in (byte) getPoint::y#1 ← (number) 5
Adding number conversion cast (unumber) 2 in *((const byte*) SCREEN + (number) 2) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X)
Adding number conversion cast (unumber) 3 in *((const byte*) SCREEN + (number) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) getPoint::x#0 ← (unumber)(number) 2
Inlining cast (byte) getPoint::y#0 ← (unumber)(number) 3
Inlining cast (byte) getPoint::x#1 ← (unumber)(number) 4
Inlining cast (byte) getPoint::y#1 ← (unumber)(number) 5
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 3
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 3
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) getPoint::return_x#0 = (byte) getPoint::return_x#4 
Alias (byte) getPoint::return_y#0 = (byte) getPoint::return_y#4 
Alias (byte) getPoint::return_x#1 = (byte) getPoint::return_x#5 
Alias (byte) getPoint::return_y#1 = (byte) getPoint::return_y#5 
Alias (byte) getPoint::return_x#2 = (byte) getPoint::p_x#0 (byte) getPoint::x#2 (byte) getPoint::return_x#6 (byte) getPoint::return_x#3 
Alias (byte) getPoint::return_y#2 = (byte) getPoint::p_y#0 (byte) getPoint::y#2 (byte) getPoint::return_y#6 (byte) getPoint::return_y#3 
Successful SSA optimization Pass2AliasElimination
Removing C-classic struct-unwound assignment [10] (struct Point) main::point1 ← struct-unwound {*((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)}
Removing C-classic struct-unwound assignment [23] (struct Point) main::point2 ← struct-unwound {*((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)}
Constant (const byte) getPoint::x#0 = 2
Constant (const byte) getPoint::y#0 = 3
Constant (const byte) getPoint::x#1 = 4
Constant (const byte) getPoint::y#1 = 5
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero (byte*)&main::point1 in [8] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x
Simplifying expression containing zero (byte*)&main::point1 in [11] *((const byte*) SCREEN + (byte) 0) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X)
Simplifying expression containing zero SCREEN in [11] *((const byte*) SCREEN + (byte) 0) ← *((byte*)&(struct Point) main::point1)
Simplifying expression containing zero (byte*)&main::point2 in [21] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$1_x
Simplifying expression containing zero (byte*)&main::point2 in [24] *((const byte*) SCREEN + (byte) 2) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X)
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (struct Point) getPoint::return#0 and assignment [20] (struct Point) getPoint::return#0 ← struct-unwound {(byte) getPoint::return_x#2, (byte) getPoint::return_y#2}
Eliminating unused variable (struct Point) getPoint::return#1 and assignment [21] (struct Point) getPoint::return#1 ← struct-unwound {(byte) getPoint::return_x#2, (byte) getPoint::return_y#2}
Eliminating unused constant (const byte) OFFSET_STRUCT_POINT_X
Successful SSA optimization PassNEliminateUnusedVars
Inlining constant with different constant siblings (const byte) getPoint::x#0
Inlining constant with different constant siblings (const byte) getPoint::y#0
Inlining constant with different constant siblings (const byte) getPoint::x#1
Inlining constant with different constant siblings (const byte) getPoint::y#1
Constant inlined getPoint::y#0 = (byte) 3
Constant inlined getPoint::x#1 = (byte) 4
Constant inlined getPoint::y#1 = (byte) 5
Constant inlined getPoint::x#0 = (byte) 2
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(SCREEN+1)
Consolidated array index constant in *(SCREEN+2)
Consolidated array index constant in *(SCREEN+3)
Successful SSA optimization Pass2ConstantAdditionElimination
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @2
Adding NOP phi() at start of @3
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to getPoint:6 getPoint:15 

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

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

(void()) main()
main: scope:[main]  from @1
  [4] phi()
  [5] call getPoint 
  [6] (byte) getPoint::return_x#0 ← (byte) getPoint::return_x#2
  [7] (byte) getPoint::return_y#0 ← (byte) getPoint::return_y#2
  to:main::@1
main::@1: scope:[main]  from main
  [8] (byte~) main::$0_x ← (byte) getPoint::return_x#0
  [9] (byte~) main::$0_y ← (byte) getPoint::return_y#0
  [10] *((byte*)&(struct Point) main::point1) ← (byte~) main::$0_x
  [11] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$0_y
  [12] *((const byte*) SCREEN) ← *((byte*)&(struct Point) main::point1)
  [13] *((const byte*) SCREEN+(byte) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)
  [14] call getPoint 
  [15] (byte) getPoint::return_x#1 ← (byte) getPoint::return_x#2
  [16] (byte) getPoint::return_y#1 ← (byte) getPoint::return_y#2
  to:main::@2
main::@2: scope:[main]  from main::@1
  [17] (byte~) main::$1_x ← (byte) getPoint::return_x#1
  [18] (byte~) main::$1_y ← (byte) getPoint::return_y#1
  [19] *((byte*)&(struct Point) main::point2) ← (byte~) main::$1_x
  [20] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y
  [21] *((const byte*) SCREEN+(byte) 2) ← *((byte*)&(struct Point) main::point2)
  [22] *((const byte*) SCREEN+(byte) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)
  to:main::@return
main::@return: scope:[main]  from main::@2
  [23] return 
  to:@return

(struct Point()) getPoint((byte) getPoint::x , (byte) getPoint::y)
getPoint: scope:[getPoint]  from main main::@1
  [24] (byte) getPoint::return_y#2 ← phi( main/(byte) 3 main::@1/(byte) 5 )
  [24] (byte) getPoint::return_x#2 ← phi( main/(byte) 2 main::@1/(byte) 4 )
  to:getPoint::@return
getPoint::@return: scope:[getPoint]  from getPoint
  [25] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte) Point::x
(byte) Point::y
(struct Point()) getPoint((byte) getPoint::x , (byte) getPoint::y)
(byte) getPoint::p_x
(byte) getPoint::p_y
(struct Point) getPoint::return
(byte) getPoint::return_x
(byte) getPoint::return_x#0 2.0
(byte) getPoint::return_x#1 2.0
(byte) getPoint::return_x#2 1.0
(byte) getPoint::return_y
(byte) getPoint::return_y#0 2.0
(byte) getPoint::return_y#1 2.0
(byte) getPoint::return_y#2 0.6666666666666666
(byte) getPoint::x
(byte) getPoint::y
(void()) main()
(struct Point~) main::$0
(byte~) main::$0_x 2.0
(byte~) main::$0_y 2.0
(struct Point~) main::$1
(byte~) main::$1_x 2.0
(byte~) main::$1_y 2.0
(struct Point) main::point1 loadstore
(struct Point) main::point2 loadstore

Initial phi equivalence classes
[ getPoint::return_x#2 ]
[ getPoint::return_y#2 ]
Added variable getPoint::return_x#0 to live range equivalence class [ getPoint::return_x#0 ]
Added variable getPoint::return_y#0 to live range equivalence class [ getPoint::return_y#0 ]
Added variable main::$0_x to live range equivalence class [ main::$0_x ]
Added variable main::$0_y to live range equivalence class [ main::$0_y ]
Added variable getPoint::return_x#1 to live range equivalence class [ getPoint::return_x#1 ]
Added variable getPoint::return_y#1 to live range equivalence class [ getPoint::return_y#1 ]
Added variable main::$1_x to live range equivalence class [ main::$1_x ]
Added variable main::$1_y to live range equivalence class [ main::$1_y ]
Added variable main::point1 to live range equivalence class [ main::point1 ]
Added variable main::point2 to live range equivalence class [ main::point2 ]
Complete equivalence classes
[ getPoint::return_x#2 ]
[ getPoint::return_y#2 ]
[ getPoint::return_x#0 ]
[ getPoint::return_y#0 ]
[ main::$0_x ]
[ main::$0_y ]
[ getPoint::return_x#1 ]
[ getPoint::return_y#1 ]
[ main::$1_x ]
[ main::$1_y ]
[ main::point1 ]
[ main::point2 ]
Allocated zp[1]:2 [ getPoint::return_x#2 ]
Allocated zp[1]:3 [ getPoint::return_y#2 ]
Allocated zp[1]:4 [ getPoint::return_x#0 ]
Allocated zp[1]:5 [ getPoint::return_y#0 ]
Allocated zp[1]:6 [ main::$0_x ]
Allocated zp[1]:7 [ main::$0_y ]
Allocated zp[1]:8 [ getPoint::return_x#1 ]
Allocated zp[1]:9 [ getPoint::return_y#1 ]
Allocated zp[1]:10 [ main::$1_x ]
Allocated zp[1]:11 [ main::$1_y ]
Allocated zp[2]:12 [ main::point1 ]
Allocated zp[2]:14 [ main::point2 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Minimal struct with C-Standard behavior - call return value (not supported yet)
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .const OFFSET_STRUCT_POINT_Y = 1
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label point1 = $c
    .label point2 = $e
    .label __0_x = 6
    .label __0_y = 7
    .label __1_x = $a
    .label __1_y = $b
    // [5] call getPoint 
    // [24] phi from main to getPoint [phi:main->getPoint]
  getPoint_from_main:
    // [24] phi (byte) getPoint::return_y#2 = (byte) 3 [phi:main->getPoint#0] -- vbuz1=vbuc1 
    lda #3
    sta.z getPoint.return_y_2
    // [24] phi (byte) getPoint::return_x#2 = (byte) 2 [phi:main->getPoint#1] -- vbuz1=vbuc1 
    lda #2
    sta.z getPoint.return_x_2
    jsr getPoint
    // [6] (byte) getPoint::return_x#0 ← (byte) getPoint::return_x#2 -- vbuz1=vbuz2 
    lda.z getPoint.return_x_2
    sta.z getPoint.return_x
    // [7] (byte) getPoint::return_y#0 ← (byte) getPoint::return_y#2 -- vbuz1=vbuz2 
    lda.z getPoint.return_y_2
    sta.z getPoint.return_y
    jmp __b1
    // main::@1
  __b1:
    // [8] (byte~) main::$0_x ← (byte) getPoint::return_x#0 -- vbuz1=vbuz2 
    lda.z getPoint.return_x
    sta.z __0_x
    // [9] (byte~) main::$0_y ← (byte) getPoint::return_y#0 -- vbuz1=vbuz2 
    lda.z getPoint.return_y
    sta.z __0_y
    // [10] *((byte*)&(struct Point) main::point1) ← (byte~) main::$0_x -- _deref_pbuc1=vbuz1 
    lda.z __0_x
    sta.z point1
    // [11] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$0_y -- _deref_pbuc1=vbuz1 
    lda.z __0_y
    sta point1+OFFSET_STRUCT_POINT_Y
    // [12] *((const byte*) SCREEN) ← *((byte*)&(struct Point) main::point1) -- _deref_pbuc1=_deref_pbuc2 
    lda.z point1
    sta SCREEN
    // [13] *((const byte*) SCREEN+(byte) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2 
    lda point1+OFFSET_STRUCT_POINT_Y
    sta SCREEN+1
    // [14] call getPoint 
    // [24] phi from main::@1 to getPoint [phi:main::@1->getPoint]
  getPoint_from___b1:
    // [24] phi (byte) getPoint::return_y#2 = (byte) 5 [phi:main::@1->getPoint#0] -- vbuz1=vbuc1 
    lda #5
    sta.z getPoint.return_y_2
    // [24] phi (byte) getPoint::return_x#2 = (byte) 4 [phi:main::@1->getPoint#1] -- vbuz1=vbuc1 
    lda #4
    sta.z getPoint.return_x_2
    jsr getPoint
    // [15] (byte) getPoint::return_x#1 ← (byte) getPoint::return_x#2 -- vbuz1=vbuz2 
    lda.z getPoint.return_x_2
    sta.z getPoint.return_x_1
    // [16] (byte) getPoint::return_y#1 ← (byte) getPoint::return_y#2 -- vbuz1=vbuz2 
    lda.z getPoint.return_y_2
    sta.z getPoint.return_y_1
    jmp __b2
    // main::@2
  __b2:
    // [17] (byte~) main::$1_x ← (byte) getPoint::return_x#1 -- vbuz1=vbuz2 
    lda.z getPoint.return_x_1
    sta.z __1_x
    // [18] (byte~) main::$1_y ← (byte) getPoint::return_y#1 -- vbuz1=vbuz2 
    lda.z getPoint.return_y_1
    sta.z __1_y
    // [19] *((byte*)&(struct Point) main::point2) ← (byte~) main::$1_x -- _deref_pbuc1=vbuz1 
    lda.z __1_x
    sta.z point2
    // [20] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y -- _deref_pbuc1=vbuz1 
    lda.z __1_y
    sta point2+OFFSET_STRUCT_POINT_Y
    // [21] *((const byte*) SCREEN+(byte) 2) ← *((byte*)&(struct Point) main::point2) -- _deref_pbuc1=_deref_pbuc2 
    lda.z point2
    sta SCREEN+2
    // [22] *((const byte*) SCREEN+(byte) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2 
    lda point2+OFFSET_STRUCT_POINT_Y
    sta SCREEN+3
    jmp __breturn
    // main::@return
  __breturn:
    // [23] return 
    rts
}
  // getPoint
getPoint: {
    .label return_x = 4
    .label return_y = 5
    .label return_x_1 = 8
    .label return_y_1 = 9
    .label return_x_2 = 2
    .label return_y_2 = 3
    jmp __breturn
    // getPoint::@return
  __breturn:
    // [25] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [12] *((const byte*) SCREEN) ← *((byte*)&(struct Point) main::point1) [ main::point1 main::point2 ] ( main:2 [ main::point1 main::point2 ] ) always clobbers reg byte a 
Statement [13] *((const byte*) SCREEN+(byte) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) [ main::point2 ] ( main:2 [ main::point2 ] ) always clobbers reg byte a 
Statement [21] *((const byte*) SCREEN+(byte) 2) ← *((byte*)&(struct Point) main::point2) [ main::point2 ] ( main:2 [ main::point2 ] ) always clobbers reg byte a 
Statement [22] *((const byte*) SCREEN+(byte) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) [ ] ( main:2 [ ] ) always clobbers reg byte a 
Potential registers zp[1]:2 [ getPoint::return_x#2 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ getPoint::return_y#2 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ getPoint::return_x#0 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:5 [ getPoint::return_y#0 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ main::$0_x ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ main::$0_y ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ getPoint::return_x#1 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ getPoint::return_y#1 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:10 [ main::$1_x ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ main::$1_y ] : zp[1]:11 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:12 [ main::point1 ] : zp[2]:12 , 
Potential registers zp[2]:14 [ main::point2 ] : zp[2]:14 , 

REGISTER UPLIFT SCOPES
Uplift Scope [getPoint] 2: zp[1]:4 [ getPoint::return_x#0 ] 2: zp[1]:5 [ getPoint::return_y#0 ] 2: zp[1]:8 [ getPoint::return_x#1 ] 2: zp[1]:9 [ getPoint::return_y#1 ] 1: zp[1]:2 [ getPoint::return_x#2 ] 0.67: zp[1]:3 [ getPoint::return_y#2 ] 
Uplift Scope [main] 2: zp[1]:6 [ main::$0_x ] 2: zp[1]:7 [ main::$0_y ] 2: zp[1]:10 [ main::$1_x ] 2: zp[1]:11 [ main::$1_y ] 0: zp[2]:12 [ main::point1 ] 0: zp[2]:14 [ main::point2 ] 
Uplift Scope [Point] 
Uplift Scope [] 

Uplifting [getPoint] best 181 combination reg byte x [ getPoint::return_x#0 ] reg byte a [ getPoint::return_y#0 ] reg byte x [ getPoint::return_x#1 ] zp[1]:9 [ getPoint::return_y#1 ] zp[1]:2 [ getPoint::return_x#2 ] zp[1]:3 [ getPoint::return_y#2 ] 
Limited combination testing to 100 combinations of 4096 possible.
Uplifting [main] best 163 combination reg byte x [ main::$0_x ] reg byte a [ main::$0_y ] reg byte x [ main::$1_x ] zp[1]:11 [ main::$1_y ] zp[2]:12 [ main::point1 ] zp[2]:14 [ main::point2 ] 
Limited combination testing to 100 combinations of 256 possible.
Uplifting [Point] best 163 combination 
Uplifting [] best 163 combination 
Attempting to uplift remaining variables inzp[1]:9 [ getPoint::return_y#1 ]
Uplifting [getPoint] best 157 combination reg byte a [ getPoint::return_y#1 ] 
Attempting to uplift remaining variables inzp[1]:11 [ main::$1_y ]
Uplifting [main] best 151 combination reg byte a [ main::$1_y ] 
Attempting to uplift remaining variables inzp[1]:2 [ getPoint::return_x#2 ]
Uplifting [getPoint] best 139 combination reg byte x [ getPoint::return_x#2 ] 
Attempting to uplift remaining variables inzp[1]:3 [ getPoint::return_y#2 ]
Uplifting [getPoint] best 127 combination reg byte a [ getPoint::return_y#2 ] 
Allocated (was zp[2]:12) zp[2]:2 [ main::point1 ]
Allocated (was zp[2]:14) zp[2]:4 [ main::point2 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Minimal struct with C-Standard behavior - call return value (not supported yet)
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .const OFFSET_STRUCT_POINT_Y = 1
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label point1 = 2
    .label point2 = 4
    // [5] call getPoint 
    // [24] phi from main to getPoint [phi:main->getPoint]
  getPoint_from_main:
    // [24] phi (byte) getPoint::return_y#2 = (byte) 3 [phi:main->getPoint#0] -- vbuaa=vbuc1 
    lda #3
    // [24] phi (byte) getPoint::return_x#2 = (byte) 2 [phi:main->getPoint#1] -- vbuxx=vbuc1 
    ldx #2
    jsr getPoint
    // [6] (byte) getPoint::return_x#0 ← (byte) getPoint::return_x#2
    // [7] (byte) getPoint::return_y#0 ← (byte) getPoint::return_y#2
    jmp __b1
    // main::@1
  __b1:
    // [8] (byte~) main::$0_x ← (byte) getPoint::return_x#0
    // [9] (byte~) main::$0_y ← (byte) getPoint::return_y#0
    // [10] *((byte*)&(struct Point) main::point1) ← (byte~) main::$0_x -- _deref_pbuc1=vbuxx 
    stx.z point1
    // [11] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$0_y -- _deref_pbuc1=vbuaa 
    sta point1+OFFSET_STRUCT_POINT_Y
    // [12] *((const byte*) SCREEN) ← *((byte*)&(struct Point) main::point1) -- _deref_pbuc1=_deref_pbuc2 
    lda.z point1
    sta SCREEN
    // [13] *((const byte*) SCREEN+(byte) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2 
    lda point1+OFFSET_STRUCT_POINT_Y
    sta SCREEN+1
    // [14] call getPoint 
    // [24] phi from main::@1 to getPoint [phi:main::@1->getPoint]
  getPoint_from___b1:
    // [24] phi (byte) getPoint::return_y#2 = (byte) 5 [phi:main::@1->getPoint#0] -- vbuaa=vbuc1 
    lda #5
    // [24] phi (byte) getPoint::return_x#2 = (byte) 4 [phi:main::@1->getPoint#1] -- vbuxx=vbuc1 
    ldx #4
    jsr getPoint
    // [15] (byte) getPoint::return_x#1 ← (byte) getPoint::return_x#2
    // [16] (byte) getPoint::return_y#1 ← (byte) getPoint::return_y#2
    jmp __b2
    // main::@2
  __b2:
    // [17] (byte~) main::$1_x ← (byte) getPoint::return_x#1
    // [18] (byte~) main::$1_y ← (byte) getPoint::return_y#1
    // [19] *((byte*)&(struct Point) main::point2) ← (byte~) main::$1_x -- _deref_pbuc1=vbuxx 
    stx.z point2
    // [20] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y -- _deref_pbuc1=vbuaa 
    sta point2+OFFSET_STRUCT_POINT_Y
    // [21] *((const byte*) SCREEN+(byte) 2) ← *((byte*)&(struct Point) main::point2) -- _deref_pbuc1=_deref_pbuc2 
    lda.z point2
    sta SCREEN+2
    // [22] *((const byte*) SCREEN+(byte) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2 
    lda point2+OFFSET_STRUCT_POINT_Y
    sta SCREEN+3
    jmp __breturn
    // main::@return
  __breturn:
    // [23] return 
    rts
}
  // getPoint
getPoint: {
    jmp __breturn
    // getPoint::@return
  __breturn:
    // [25] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction lda.z point1 with TXA
Replacing instruction lda.z point2 with TXA
Replacing label __bbegin with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction getPoint_from_main:
Removing instruction __b1:
Removing instruction getPoint_from___b1:
Removing instruction __b2:
Removing instruction __breturn:
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
(const byte) OFFSET_STRUCT_POINT_Y = (byte) 1
(byte) Point::x
(byte) Point::y
(const byte*) SCREEN = (byte*) 1024
(struct Point()) getPoint((byte) getPoint::x , (byte) getPoint::y)
(label) getPoint::@return
(byte) getPoint::p_x
(byte) getPoint::p_y
(struct Point) getPoint::return
(byte) getPoint::return_x
(byte) getPoint::return_x#0 reg byte x 2.0
(byte) getPoint::return_x#1 reg byte x 2.0
(byte) getPoint::return_x#2 reg byte x 1.0
(byte) getPoint::return_y
(byte) getPoint::return_y#0 reg byte a 2.0
(byte) getPoint::return_y#1 reg byte a 2.0
(byte) getPoint::return_y#2 reg byte a 0.6666666666666666
(byte) getPoint::x
(byte) getPoint::y
(void()) main()
(struct Point~) main::$0
(byte~) main::$0_x reg byte x 2.0
(byte~) main::$0_y reg byte a 2.0
(struct Point~) main::$1
(byte~) main::$1_x reg byte x 2.0
(byte~) main::$1_y reg byte a 2.0
(label) main::@1
(label) main::@2
(label) main::@return
(struct Point) main::point1 loadstore zp[2]:2
(struct Point) main::point2 loadstore zp[2]:4

reg byte x [ getPoint::return_x#2 ]
reg byte a [ getPoint::return_y#2 ]
reg byte x [ getPoint::return_x#0 ]
reg byte a [ getPoint::return_y#0 ]
reg byte x [ main::$0_x ]
reg byte a [ main::$0_y ]
reg byte x [ getPoint::return_x#1 ]
reg byte a [ getPoint::return_y#1 ]
reg byte x [ main::$1_x ]
reg byte a [ main::$1_y ]
zp[2]:2 [ main::point1 ]
zp[2]:4 [ main::point2 ]


FINAL ASSEMBLER
Score: 74

  // File Comments
// Minimal struct with C-Standard behavior - call return value (not supported yet)
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .const OFFSET_STRUCT_POINT_Y = 1
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .label point1 = 2
    .label point2 = 4
    // getPoint(2, 3)
    // [5] call getPoint 
    // [24] phi from main to getPoint [phi:main->getPoint]
    // [24] phi (byte) getPoint::return_y#2 = (byte) 3 [phi:main->getPoint#0] -- vbuaa=vbuc1 
    lda #3
    // [24] phi (byte) getPoint::return_x#2 = (byte) 2 [phi:main->getPoint#1] -- vbuxx=vbuc1 
    ldx #2
    jsr getPoint
    // getPoint(2, 3)
    // [6] (byte) getPoint::return_x#0 ← (byte) getPoint::return_x#2
    // [7] (byte) getPoint::return_y#0 ← (byte) getPoint::return_y#2
    // main::@1
    // [8] (byte~) main::$0_x ← (byte) getPoint::return_x#0
    // [9] (byte~) main::$0_y ← (byte) getPoint::return_y#0
    // point1 = getPoint(2, 3)
    // [10] *((byte*)&(struct Point) main::point1) ← (byte~) main::$0_x -- _deref_pbuc1=vbuxx 
    stx.z point1
    // [11] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$0_y -- _deref_pbuc1=vbuaa 
    sta point1+OFFSET_STRUCT_POINT_Y
    // SCREEN[0] = point1.x
    // [12] *((const byte*) SCREEN) ← *((byte*)&(struct Point) main::point1) -- _deref_pbuc1=_deref_pbuc2 
    txa
    sta SCREEN
    // SCREEN[1] = point1.y
    // [13] *((const byte*) SCREEN+(byte) 1) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2 
    lda point1+OFFSET_STRUCT_POINT_Y
    sta SCREEN+1
    // getPoint(4, 5)
    // [14] call getPoint 
    // [24] phi from main::@1 to getPoint [phi:main::@1->getPoint]
    // [24] phi (byte) getPoint::return_y#2 = (byte) 5 [phi:main::@1->getPoint#0] -- vbuaa=vbuc1 
    lda #5
    // [24] phi (byte) getPoint::return_x#2 = (byte) 4 [phi:main::@1->getPoint#1] -- vbuxx=vbuc1 
    ldx #4
    jsr getPoint
    // getPoint(4, 5)
    // [15] (byte) getPoint::return_x#1 ← (byte) getPoint::return_x#2
    // [16] (byte) getPoint::return_y#1 ← (byte) getPoint::return_y#2
    // main::@2
    // [17] (byte~) main::$1_x ← (byte) getPoint::return_x#1
    // [18] (byte~) main::$1_y ← (byte) getPoint::return_y#1
    // point2 = getPoint(4, 5)
    // [19] *((byte*)&(struct Point) main::point2) ← (byte~) main::$1_x -- _deref_pbuc1=vbuxx 
    stx.z point2
    // [20] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) ← (byte~) main::$1_y -- _deref_pbuc1=vbuaa 
    sta point2+OFFSET_STRUCT_POINT_Y
    // SCREEN[2] = point2.x
    // [21] *((const byte*) SCREEN+(byte) 2) ← *((byte*)&(struct Point) main::point2) -- _deref_pbuc1=_deref_pbuc2 
    txa
    sta SCREEN+2
    // SCREEN[3] = point2.y
    // [22] *((const byte*) SCREEN+(byte) 3) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y) -- _deref_pbuc1=_deref_pbuc2 
    lda point2+OFFSET_STRUCT_POINT_Y
    sta SCREEN+3
    // main::@return
    // }
    // [23] return 
    rts
}
  // getPoint
getPoint: {
    // getPoint::@return
    // [25] return 
    rts
}
  // File Data

