Inlined call call __init

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start::@1
  idx#18 = phi( __start::@1/idx#17 )
  main::i#0 = 0
  to:main::@1
main::@1: scope:[main]  from main main::@2
  idx#16 = phi( main/idx#18, main::@2/idx#0 )
  main::i#2 = phi( main/main::i#0, main::@2/main::i#1 )
  main::$2 = main::i#2 * SIZEOF_STRUCT_POINT
  print::p_x#0 = ((char *)points+OFFSET_STRUCT_POINT_X)[main::$2]
  print::p_y#0 = ((int *)points+OFFSET_STRUCT_POINT_Y)[main::$2]
  call print
  to:main::@2
main::@2: scope:[main]  from main::@1
  main::i#3 = phi( main::@1/main::i#2 )
  idx#10 = phi( main::@1/idx#6 )
  idx#0 = idx#10
  main::i#1 = main::i#3 + rangenext(0,3)
  main::$1 = main::i#1 != rangelast(0,3)
  if(main::$1) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@2
  idx#11 = phi( main::@2/idx#0 )
  idx#1 = idx#11
  return 
  to:@return

void print(char p_x , int p_y)
print: scope:[print]  from main::@1
  print::p_y#1 = phi( main::@1/print::p_y#0 )
  idx#12 = phi( main::@1/idx#16 )
  print::p_x#1 = phi( main::@1/print::p_x#0 )
  SCREEN[idx#12] = print::p_x#1
  idx#2 = ++ idx#12
  print::$0 = byte0  print::p_y#1
  SCREEN[idx#2] = print::$0
  idx#3 = ++ idx#2
  print::$1 = byte1  print::p_y#1
  SCREEN[idx#3] = print::$1
  idx#4 = ++ idx#3
  SCREEN[idx#4] = ' '
  idx#5 = ++ idx#4
  to:print::@return
print::@return: scope:[print]  from print
  idx#13 = phi( print/idx#5 )
  idx#6 = idx#13
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  idx#7 = 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  idx#17 = phi( __start::__init1/idx#7 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  idx#14 = phi( __start::@1/idx#1 )
  idx#8 = idx#14
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  idx#15 = phi( __start::@2/idx#8 )
  idx#9 = idx#15
  return 
  to:@return

SYMBOL TABLE SSA
__constant char OFFSET_STRUCT_POINT_X = 0
__constant char OFFSET_STRUCT_POINT_Y = 1
__constant char * const SCREEN = (char *)$400
__constant char SIZEOF_STRUCT_POINT = 3
void __start()
char idx
char idx#0
char idx#1
char idx#10
char idx#11
char idx#12
char idx#13
char idx#14
char idx#15
char idx#16
char idx#17
char idx#18
char idx#2
char idx#3
char idx#4
char idx#5
char idx#6
char idx#7
char idx#8
char idx#9
void main()
bool main::$1
char main::$2
char main::i
char main::i#0
char main::i#1
char main::i#2
char main::i#3
__constant struct Point points[4] = { { x: 1, y: $83f }, { x: 3, y: $107e } }
void print(char p_x , int p_y)
char print::$0
char print::$1
struct Point print::p
char print::p_x
char print::p_x#0
char print::p_x#1
int print::p_y
int print::p_y#0
int print::p_y#1

Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Alias main::i#2 = main::i#3 
Alias idx#0 = idx#10 idx#11 idx#1 
Alias idx#13 = idx#5 idx#6 
Alias idx#17 = idx#7 
Alias idx#14 = idx#8 idx#15 idx#9 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values idx#18 idx#17
Identical Phi Values idx#0 idx#13
Identical Phi Values print::p_x#1 print::p_x#0
Identical Phi Values idx#12 idx#16
Identical Phi Values print::p_y#1 print::p_y#0
Identical Phi Values idx#14 idx#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition main::$1 [10] if(main::i#1!=rangelast(0,3)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant main::i#0 = 0
Constant idx#17 = 0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [8] main::i#1 = ++ main::i#2 to ++
Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,3)) goto main::@1 to 4
Simplifying expression containing zero (char *)points in [4] print::p_x#0 = ((char *)points+OFFSET_STRUCT_POINT_X)[main::$2]
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant OFFSET_STRUCT_POINT_X
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 4 in [6] if(main::i#1!=4) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 4
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Rewriting multiplication to use shift and addition[1] main::$2 = main::i#2 * SIZEOF_STRUCT_POINT
Inlining constant with var siblings main::i#0
Inlining constant with var siblings idx#17
Constant inlined main::i#0 = 0
Constant inlined idx#17 = 0
Successful SSA optimization Pass2ConstantInlining
Alias main::$2 = main::$4 
Successful SSA optimization Pass2AliasElimination
Eliminating unused constant SIZEOF_STRUCT_POINT
Successful SSA optimization PassNEliminateUnusedVars
Finalized unsigned number type (char) 4
Successful SSA optimization PassNFinalizeNumberTypeConversions
Added new block during phi lifting main::@3(between main::@2 and main::@1)
Adding NOP phi() at start of main
CALL GRAPH
Calls in [main] to print:6 

Created 2 initial phi equivalence classes
Coalesced [10] main::i#4 = main::i#1
Coalesced [11] idx#19 = idx#13
Coalesced down to 2 phi equivalence classes
Culled Empty Block label 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::@2
  [1] idx#16 = phi( main/0, main::@2/idx#13 )
  [1] main::i#2 = phi( main/0, main::@2/main::i#1 )
  [2] main::$3 = main::i#2 << 1
  [3] main::$2 = main::$3 + main::i#2
  [4] print::p_x#0 = ((char *)points)[main::$2]
  [5] print::p_y#0 = ((int *)points+OFFSET_STRUCT_POINT_Y)[main::$2]
  [6] call print
  to:main::@2
main::@2: scope:[main]  from main::@1
  [7] main::i#1 = ++ main::i#2
  [8] if(main::i#1!=4) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@2
  [9] return 
  to:@return

void print(char p_x , int p_y)
print: scope:[print]  from main::@1
  [10] SCREEN[idx#16] = print::p_x#0
  [11] idx#2 = ++ idx#16
  [12] print::$0 = byte0  print::p_y#0
  [13] SCREEN[idx#2] = print::$0
  [14] idx#3 = ++ idx#2
  [15] print::$1 = byte1  print::p_y#0
  [16] SCREEN[idx#3] = print::$1
  [17] idx#4 = ++ idx#3
  [18] SCREEN[idx#4] = ' '
  [19] idx#13 = ++ idx#4
  to:print::@return
print::@return: scope:[print]  from print
  [20] return 
  to:@return


VARIABLE REGISTER WEIGHTS
char idx
char idx#13 // 22.4
char idx#16 // 35.5
char idx#2 // 101.0
char idx#3 // 101.0
char idx#4 // 151.5
void main()
char main::$2 // 16.5
char main::$3 // 22.0
char main::i
char main::i#1 // 16.5
char main::i#2 // 7.333333333333333
void print(char p_x , int p_y)
char print::$0 // 202.0
char print::$1 // 202.0
struct Point print::p
char print::p_x
char print::p_x#0 // 56.0
int print::p_y
int print::p_y#0 // 35.5

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ idx#16 idx#13 ]
Added variable main::$3 to live range equivalence class [ main::$3 ]
Added variable main::$2 to live range equivalence class [ main::$2 ]
Added variable print::p_x#0 to live range equivalence class [ print::p_x#0 ]
Added variable print::p_y#0 to live range equivalence class [ print::p_y#0 ]
Added variable idx#2 to live range equivalence class [ idx#2 ]
Added variable print::$0 to live range equivalence class [ print::$0 ]
Added variable idx#3 to live range equivalence class [ idx#3 ]
Added variable print::$1 to live range equivalence class [ print::$1 ]
Added variable idx#4 to live range equivalence class [ idx#4 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ idx#16 idx#13 ]
[ main::$3 ]
[ main::$2 ]
[ print::p_x#0 ]
[ print::p_y#0 ]
[ idx#2 ]
[ print::$0 ]
[ idx#3 ]
[ print::$1 ]
[ idx#4 ]
Allocated zp[1]:2 [ print::$0 ]
Allocated zp[1]:3 [ print::$1 ]
Allocated zp[1]:4 [ idx#4 ]
Allocated zp[1]:5 [ idx#2 ]
Allocated zp[1]:6 [ idx#3 ]
Allocated zp[1]:7 [ idx#16 idx#13 ]
Allocated zp[1]:8 [ print::p_x#0 ]
Allocated zp[2]:9 [ print::p_y#0 ]
Allocated zp[1]:11 [ main::i#2 main::i#1 ]
Allocated zp[1]:12 [ main::$3 ]
Allocated zp[1]:13 [ main::$2 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [2] main::$3 = main::i#2 << 1 [ main::i#2 idx#16 main::$3 ] (  [ main::i#2 idx#16 main::$3 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:11 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:7 [ idx#16 idx#13 ]
Statement [3] main::$2 = main::$3 + main::i#2 [ main::i#2 idx#16 main::$2 ] (  [ main::i#2 idx#16 main::$2 ] { }  ) always clobbers reg byte a 
Statement [5] print::p_y#0 = ((int *)points+OFFSET_STRUCT_POINT_Y)[main::$2] [ main::i#2 idx#16 print::p_x#0 print::p_y#0 ] (  [ main::i#2 idx#16 print::p_x#0 print::p_y#0 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:8 [ print::p_x#0 ]
Statement [10] SCREEN[idx#16] = print::p_x#0 [ idx#16 print::p_y#0 ] ( print:6 [ main::i#2 idx#16 print::p_y#0 ] { }  ) always clobbers reg byte a 
Statement [18] SCREEN[idx#4] = ' ' [ idx#4 ] ( print:6 [ main::i#2 idx#4 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ idx#4 ]
Statement [2] main::$3 = main::i#2 << 1 [ main::i#2 idx#16 main::$3 ] (  [ main::i#2 idx#16 main::$3 ] { }  ) always clobbers reg byte a 
Statement [3] main::$2 = main::$3 + main::i#2 [ main::i#2 idx#16 main::$2 ] (  [ main::i#2 idx#16 main::$2 ] { }  ) always clobbers reg byte a 
Statement [5] print::p_y#0 = ((int *)points+OFFSET_STRUCT_POINT_Y)[main::$2] [ main::i#2 idx#16 print::p_x#0 print::p_y#0 ] (  [ main::i#2 idx#16 print::p_x#0 print::p_y#0 ] { }  ) always clobbers reg byte a 
Statement [10] SCREEN[idx#16] = print::p_x#0 [ idx#16 print::p_y#0 ] ( print:6 [ main::i#2 idx#16 print::p_y#0 ] { }  ) always clobbers reg byte a 
Statement [18] SCREEN[idx#4] = ' ' [ idx#4 ] ( print:6 [ main::i#2 idx#4 ] { }  ) always clobbers reg byte a 
Potential registers zp[1]:11 [ main::i#2 main::i#1 ] : zp[1]:11 , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ idx#16 idx#13 ] : zp[1]:7 , reg byte x , reg byte y , 
Potential registers zp[1]:12 [ main::$3 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:13 [ main::$2 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ print::p_x#0 ] : zp[1]:8 , reg byte x , reg byte y , 
Potential registers zp[2]:9 [ print::p_y#0 ] : zp[2]:9 , 
Potential registers zp[1]:5 [ idx#2 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:2 [ print::$0 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ idx#3 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ print::$1 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ idx#4 ] : zp[1]:4 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [print] 202: zp[1]:2 [ print::$0 ] 202: zp[1]:3 [ print::$1 ] 56: zp[1]:8 [ print::p_x#0 ] 35.5: zp[2]:9 [ print::p_y#0 ] 
Uplift Scope [] 151.5: zp[1]:4 [ idx#4 ] 101: zp[1]:5 [ idx#2 ] 101: zp[1]:6 [ idx#3 ] 57.9: zp[1]:7 [ idx#16 idx#13 ] 
Uplift Scope [main] 23.83: zp[1]:11 [ main::i#2 main::i#1 ] 22: zp[1]:12 [ main::$3 ] 16.5: zp[1]:13 [ main::$2 ] 
Uplift Scope [Point] 

Uplifting [print] best 939 combination reg byte a [ print::$0 ] reg byte a [ print::$1 ] reg byte x [ print::p_x#0 ] zp[2]:9 [ print::p_y#0 ] 
Uplifting [] best 912 combination reg byte x [ idx#4 ] reg byte x [ idx#2 ] reg byte x [ idx#3 ] zp[1]:7 [ idx#16 idx#13 ] 
Limited combination testing to 100 combinations of 144 possible.
Uplifting [main] best 782 combination zp[1]:11 [ main::i#2 main::i#1 ] reg byte a [ main::$3 ] reg byte y [ main::$2 ] 
Uplifting [Point] best 782 combination 
Attempting to uplift remaining variables inzp[1]:7 [ idx#16 idx#13 ]
Uplifting [] best 782 combination zp[1]:7 [ idx#16 idx#13 ] 
Attempting to uplift remaining variables inzp[1]:11 [ main::i#2 main::i#1 ]
Uplifting [main] best 782 combination zp[1]:11 [ main::i#2 main::i#1 ] 
Allocated (was zp[1]:7) zp[1]:2 [ idx#16 idx#13 ]
Allocated (was zp[2]:9) zp[2]:3 [ print::p_y#0 ]
Allocated (was zp[1]:11) zp[1]:5 [ main::i#2 main::i#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test a struct array initialized with to few members (zero-filled for the rest)
  // Upstart
  // Commodore 64 PRG executable file
.file [name="struct-ptr-30.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  .const OFFSET_STRUCT_POINT_Y = 1
  .const SIZEOF_STRUCT_POINT = 3
  .label SCREEN = $400
  .label idx = 2
.segment Code
  // main
main: {
    .label i = 5
    // [1] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [1] phi idx#16 = 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z idx
    // [1] phi main::i#2 = 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b1
    // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
  __b1_from___b2:
    // [1] phi idx#16 = idx#13 [phi:main::@2->main::@1#0] -- register_copy 
    // [1] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#1] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [2] main::$3 = main::i#2 << 1 -- vbuaa=vbuz1_rol_1 
    lda.z i
    asl
    // [3] main::$2 = main::$3 + main::i#2 -- vbuyy=vbuaa_plus_vbuz1 
    clc
    adc.z i
    tay
    // [4] print::p_x#0 = ((char *)points)[main::$2] -- vbuxx=pbuc1_derefidx_vbuyy 
    ldx points,y
    // [5] print::p_y#0 = ((int *)points+OFFSET_STRUCT_POINT_Y)[main::$2] -- vwsz1=pwsc1_derefidx_vbuyy 
    lda points+OFFSET_STRUCT_POINT_Y,y
    sta.z print.p_y
    lda points+OFFSET_STRUCT_POINT_Y+1,y
    sta.z print.p_y+1
    // [6] call print
    jsr print
    jmp __b2
    // main::@2
  __b2:
    // [7] main::i#1 = ++ main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [8] if(main::i#1!=4) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp.z i
    bne __b1_from___b2
    jmp __breturn
    // main::@return
  __breturn:
    // [9] return 
    rts
}
  // print
// void print(__register(X) char p_x, __zp(3) int p_y)
print: {
    .label p_y = 3
    // [10] SCREEN[idx#16] = print::p_x#0 -- pbuc1_derefidx_vbuz1=vbuxx 
    ldy.z idx
    txa
    sta SCREEN,y
    // [11] idx#2 = ++ idx#16 -- vbuxx=_inc_vbuz1 
    ldx.z idx
    inx
    // [12] print::$0 = byte0  print::p_y#0 -- vbuaa=_byte0_vwsz1 
    lda.z p_y
    // [13] SCREEN[idx#2] = print::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // [14] idx#3 = ++ idx#2 -- vbuxx=_inc_vbuxx 
    inx
    // [15] print::$1 = byte1  print::p_y#0 -- vbuaa=_byte1_vwsz1 
    lda.z p_y+1
    // [16] SCREEN[idx#3] = print::$1 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // [17] idx#4 = ++ idx#3 -- vbuxx=_inc_vbuxx 
    inx
    // [18] SCREEN[idx#4] = ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta SCREEN,x
    // [19] idx#13 = ++ idx#4 -- vbuz1=_inc_vbuxx 
    inx
    stx.z idx
    jmp __breturn
    // print::@return
  __breturn:
    // [20] return 
    rts
}
  // File Data
.segment Data
  points: .byte 1
  .word $83f
  .byte 3
  .word $107e
  .fill SIZEOF_STRUCT_POINT, 0
  .fill SIZEOF_STRUCT_POINT, 0

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

FINAL SYMBOL TABLE
__constant char OFFSET_STRUCT_POINT_Y = 1
__constant char * const SCREEN = (char *) 1024
__constant char SIZEOF_STRUCT_POINT = 3
char idx
char idx#13 // idx zp[1]:2 22.4
char idx#16 // idx zp[1]:2 35.5
char idx#2 // reg byte x 101.0
char idx#3 // reg byte x 101.0
char idx#4 // reg byte x 151.5
void main()
char main::$2 // reg byte y 16.5
char main::$3 // reg byte a 22.0
char main::i
char main::i#1 // i zp[1]:5 16.5
char main::i#2 // i zp[1]:5 7.333333333333333
__constant struct Point points[4] = { { x: 1, y: $83f }, { x: 3, y: $107e } }
void print(char p_x , int p_y)
char print::$0 // reg byte a 202.0
char print::$1 // reg byte a 202.0
struct Point print::p
char print::p_x
char print::p_x#0 // reg byte x 56.0
int print::p_y
int print::p_y#0 // p_y zp[2]:3 35.5

zp[1]:5 [ main::i#2 main::i#1 ]
zp[1]:2 [ idx#16 idx#13 ]
reg byte a [ main::$3 ]
reg byte y [ main::$2 ]
reg byte x [ print::p_x#0 ]
zp[2]:3 [ print::p_y#0 ]
reg byte x [ idx#2 ]
reg byte a [ print::$0 ]
reg byte x [ idx#3 ]
reg byte a [ print::$1 ]
reg byte x [ idx#4 ]


FINAL ASSEMBLER
Score: 639

  // File Comments
// Test a struct array initialized with to few members (zero-filled for the rest)
  // Upstart
  // Commodore 64 PRG executable file
.file [name="struct-ptr-30.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  .const OFFSET_STRUCT_POINT_Y = 1
  .const SIZEOF_STRUCT_POINT = 3
  .label SCREEN = $400
  .label idx = 2
.segment Code
  // main
main: {
    .label i = 5
    // [1] phi from main to main::@1 [phi:main->main::@1]
    // [1] phi idx#16 = 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z idx
    // [1] phi main::i#2 = 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    sta.z i
    // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
    // [1] phi idx#16 = idx#13 [phi:main::@2->main::@1#0] -- register_copy 
    // [1] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#1] -- register_copy 
    // main::@1
  __b1:
    // print(points[i])
    // [2] main::$3 = main::i#2 << 1 -- vbuaa=vbuz1_rol_1 
    lda.z i
    asl
    // [3] main::$2 = main::$3 + main::i#2 -- vbuyy=vbuaa_plus_vbuz1 
    clc
    adc.z i
    tay
    // [4] print::p_x#0 = ((char *)points)[main::$2] -- vbuxx=pbuc1_derefidx_vbuyy 
    ldx points,y
    // [5] print::p_y#0 = ((int *)points+OFFSET_STRUCT_POINT_Y)[main::$2] -- vwsz1=pwsc1_derefidx_vbuyy 
    lda points+OFFSET_STRUCT_POINT_Y,y
    sta.z print.p_y
    lda points+OFFSET_STRUCT_POINT_Y+1,y
    sta.z print.p_y+1
    // [6] call print
    jsr print
    // main::@2
    // for ( char i: 0..3)
    // [7] main::i#1 = ++ main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [8] if(main::i#1!=4) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #4
    cmp.z i
    bne __b1
    // main::@return
    // }
    // [9] return 
    rts
}
  // print
// void print(__register(X) char p_x, __zp(3) int p_y)
print: {
    .label p_y = 3
    // SCREEN[idx++] = p.x
    // [10] SCREEN[idx#16] = print::p_x#0 -- pbuc1_derefidx_vbuz1=vbuxx 
    ldy.z idx
    txa
    sta SCREEN,y
    // SCREEN[idx++] = p.x;
    // [11] idx#2 = ++ idx#16 -- vbuxx=_inc_vbuz1 
    ldx.z idx
    inx
    // BYTE0(p.y)
    // [12] print::$0 = byte0  print::p_y#0 -- vbuaa=_byte0_vwsz1 
    lda.z p_y
    // SCREEN[idx++] = BYTE0(p.y)
    // [13] SCREEN[idx#2] = print::$0 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // SCREEN[idx++] = BYTE0(p.y);
    // [14] idx#3 = ++ idx#2 -- vbuxx=_inc_vbuxx 
    inx
    // BYTE1(p.y)
    // [15] print::$1 = byte1  print::p_y#0 -- vbuaa=_byte1_vwsz1 
    lda.z p_y+1
    // SCREEN[idx++] = BYTE1(p.y)
    // [16] SCREEN[idx#3] = print::$1 -- pbuc1_derefidx_vbuxx=vbuaa 
    sta SCREEN,x
    // SCREEN[idx++] = BYTE1(p.y);
    // [17] idx#4 = ++ idx#3 -- vbuxx=_inc_vbuxx 
    inx
    // SCREEN[idx++] = ' '
    // [18] SCREEN[idx#4] = ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta SCREEN,x
    // SCREEN[idx++] = ' ';
    // [19] idx#13 = ++ idx#4 -- vbuz1=_inc_vbuxx 
    inx
    stx.z idx
    // print::@return
    // }
    // [20] return 
    rts
}
  // File Data
.segment Data
  points: .byte 1
  .word $83f
  .byte 3
  .word $107e
  .fill SIZEOF_STRUCT_POINT, 0
  .fill SIZEOF_STRUCT_POINT, 0

