Warning! Adding boolean cast to non-boolean condition *((byte*) print_person::person_initials + (byte) print_person::i)
Identified constant variable (dword) jesper_id
Identified constant variable (dword) henry_id
Culled Empty Block (label) print_person::@4
Culled Empty Block (label) print_person::@5
Culled Empty Block (label) print_person::@6

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

(void()) main()
main: scope:[main]  from @2
  (byte) idx#15 ← phi( @2/(byte) idx#17 )
  (dword) print_person::person_id#0 ← (const dword) jesper_id
  (byte*) print_person::person_initials#0 ← (const byte*) jesper_initials
  call print_person 
  to:main::@1
main::@1: scope:[main]  from main
  (byte) idx#8 ← phi( main/(byte) idx#6 )
  (byte) idx#0 ← (byte) idx#8
  (dword) print_person::person_id#1 ← (const dword) henry_id
  (byte*) print_person::person_initials#1 ← (const byte*) henry_initials
  call print_person 
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte) idx#9 ← phi( main::@1/(byte) idx#6 )
  (byte) idx#1 ← (byte) idx#9
  to:main::@return
main::@return: scope:[main]  from main::@2
  (byte) idx#10 ← phi( main::@2/(byte) idx#1 )
  (byte) idx#2 ← (byte) idx#10
  return 
  to:@return
@1: scope:[]  from @begin
  (byte) idx#3 ← (byte) 0
  to:@2

(void()) print_person((dword) print_person::person_id , (byte*) print_person::person_initials)
print_person: scope:[print_person]  from main main::@1
  (byte) idx#18 ← phi( main/(byte) idx#15 main::@1/(byte) idx#0 )
  (byte*) print_person::person_initials#4 ← phi( main/(byte*) print_person::person_initials#0 main::@1/(byte*) print_person::person_initials#1 )
  (byte) print_person::i#0 ← (byte) 0
  to:print_person::@1
print_person::@1: scope:[print_person]  from print_person print_person::@2
  (byte) idx#16 ← phi( print_person/(byte) idx#18 print_person::@2/(byte) idx#4 )
  (byte) print_person::i#2 ← phi( print_person/(byte) print_person::i#0 print_person::@2/(byte) print_person::i#1 )
  (byte*) print_person::person_initials#2 ← phi( print_person/(byte*) print_person::person_initials#4 print_person::@2/(byte*) print_person::person_initials#3 )
  (bool~) print_person::$0 ← (number) 0 != *((byte*) print_person::person_initials#2 + (byte) print_person::i#2)
  if((bool~) print_person::$0) goto print_person::@2
  to:print_person::@3
print_person::@2: scope:[print_person]  from print_person::@1
  (byte) idx#11 ← phi( print_person::@1/(byte) idx#16 )
  (byte) print_person::i#3 ← phi( print_person::@1/(byte) print_person::i#2 )
  (byte*) print_person::person_initials#3 ← phi( print_person::@1/(byte*) print_person::person_initials#2 )
  *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#3 + (byte) print_person::i#3)
  (byte) idx#4 ← ++ (byte) idx#11
  (byte) print_person::i#1 ← ++ (byte) print_person::i#3
  to:print_person::@1
print_person::@3: scope:[print_person]  from print_person::@1
  (byte) idx#12 ← phi( print_person::@1/(byte) idx#16 )
  *((const byte*) SCREEN + (byte) idx#12) ← (byte) ' '
  (byte) idx#5 ← ++ (byte) idx#12
  to:print_person::@return
print_person::@return: scope:[print_person]  from print_person::@3
  (byte) idx#13 ← phi( print_person::@3/(byte) idx#5 )
  (byte) idx#6 ← (byte) idx#13
  return 
  to:@return
@2: scope:[]  from @1
  (byte) idx#17 ← phi( @1/(byte) idx#3 )
  call main 
  to:@3
@3: scope:[]  from @2
  (byte) idx#14 ← phi( @2/(byte) idx#2 )
  (byte) idx#7 ← (byte) idx#14
  to:@end
@end: scope:[]  from @3

SYMBOL TABLE SSA
(label) @1
(label) @2
(label) @3
(label) @begin
(label) @end
(const byte*) SCREEN = (byte*)(number) $400
(const dword) henry_id = (dword) $4466d
(const byte*) henry_initials[(number) $40]  = (byte*) "hg"
(byte) idx
(byte) idx#0
(byte) idx#1
(byte) idx#10
(byte) idx#11
(byte) idx#12
(byte) idx#13
(byte) idx#14
(byte) idx#15
(byte) idx#16
(byte) idx#17
(byte) idx#18
(byte) idx#2
(byte) idx#3
(byte) idx#4
(byte) idx#5
(byte) idx#6
(byte) idx#7
(byte) idx#8
(byte) idx#9
(const dword) jesper_id = (dword) $1b244
(const byte*) jesper_initials[(number) $40]  = (byte*) "jg"
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return
(void()) print_person((dword) print_person::person_id , (byte*) print_person::person_initials)
(bool~) print_person::$0
(label) print_person::@1
(label) print_person::@2
(label) print_person::@3
(label) print_person::@return
(byte) print_person::i
(byte) print_person::i#0
(byte) print_person::i#1
(byte) print_person::i#2
(byte) print_person::i#3
(dword) print_person::person_id
(dword) print_person::person_id#0
(dword) print_person::person_id#1
(byte*) print_person::person_initials
(byte*) print_person::person_initials#0
(byte*) print_person::person_initials#1
(byte*) print_person::person_initials#2
(byte*) print_person::person_initials#3
(byte*) print_person::person_initials#4

Adding number conversion cast (unumber) 0 in (bool~) print_person::$0 ← (number) 0 != *((byte*) print_person::person_initials#2 + (byte) print_person::i#2)
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte) idx#0 = (byte) idx#8 
Alias (byte) idx#1 = (byte) idx#9 (byte) idx#10 (byte) idx#2 
Alias (byte*) print_person::person_initials#2 = (byte*) print_person::person_initials#3 
Alias (byte) print_person::i#2 = (byte) print_person::i#3 
Alias (byte) idx#11 = (byte) idx#16 (byte) idx#12 
Alias (byte) idx#13 = (byte) idx#5 (byte) idx#6 
Alias (byte) idx#17 = (byte) idx#3 
Alias (byte) idx#14 = (byte) idx#7 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) idx#15 (byte) idx#17
Identical Phi Values (byte) idx#0 (byte) idx#13
Identical Phi Values (byte) idx#1 (byte) idx#13
Identical Phi Values (byte*) print_person::person_initials#2 (byte*) print_person::person_initials#4
Identical Phi Values (byte) idx#14 (byte) idx#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) print_person::$0 [15] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const dword) print_person::person_id#0 = jesper_id
Constant (const byte*) print_person::person_initials#0 = jesper_initials
Constant (const dword) print_person::person_id#1 = henry_id
Constant (const byte*) print_person::person_initials#1 = henry_initials
Constant (const byte) idx#17 = 0
Constant (const byte) print_person::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const dword) print_person::person_id#0
Eliminating unused constant (const dword) print_person::person_id#1
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const dword) jesper_id
Eliminating unused constant (const dword) henry_id
Successful SSA optimization PassNEliminateUnusedVars
Inlining constant with var siblings (const byte*) print_person::person_initials#0
Inlining constant with var siblings (const byte*) print_person::person_initials#1
Inlining constant with var siblings (const byte) print_person::i#0
Inlining constant with var siblings (const byte) idx#17
Constant inlined idx#17 = (byte) 0
Constant inlined print_person::person_initials#1 = (const byte*) henry_initials
Constant inlined print_person::person_initials#0 = (const byte*) jesper_initials
Constant inlined print_person::i#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
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 @3
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
CALL GRAPH
Calls in [] to main:3 
Calls in [main] to print_person:7 print_person:9 

Created 4 initial phi equivalence classes
Coalesced [8] idx#19 ← idx#13
Coalesced [13] idx#20 ← idx#18
Coalesced [22] print_person::i#4 ← print_person::i#1
Coalesced [23] idx#21 ← idx#4
Coalesced down to 3 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @3
Culled Empty Block (label) main::@2
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
Adding NOP phi() at start of main::@1

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 print_person 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call print_person 
  to:main::@return
main::@return: scope:[main]  from main::@1
  [8] return 
  to:@return

(void()) print_person((dword) print_person::person_id , (byte*) print_person::person_initials)
print_person: scope:[print_person]  from main main::@1
  [9] (byte) idx#18 ← phi( main/(byte) 0 main::@1/(byte) idx#13 )
  [9] (byte*) print_person::person_initials#4 ← phi( main/(const byte*) jesper_initials main::@1/(const byte*) henry_initials )
  to:print_person::@1
print_person::@1: scope:[print_person]  from print_person print_person::@2
  [10] (byte) idx#11 ← phi( print_person/(byte) idx#18 print_person::@2/(byte) idx#4 )
  [10] (byte) print_person::i#2 ← phi( print_person/(byte) 0 print_person::@2/(byte) print_person::i#1 )
  [11] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2
  to:print_person::@3
print_person::@3: scope:[print_person]  from print_person::@1
  [12] *((const byte*) SCREEN + (byte) idx#11) ← (byte) ' '
  [13] (byte) idx#13 ← ++ (byte) idx#11
  to:print_person::@return
print_person::@return: scope:[print_person]  from print_person::@3
  [14] return 
  to:@return
print_person::@2: scope:[print_person]  from print_person::@1
  [15] *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#4 + (byte) print_person::i#2)
  [16] (byte) idx#4 ← ++ (byte) idx#11
  [17] (byte) print_person::i#1 ← ++ (byte) print_person::i#2
  to:print_person::@1


VARIABLE REGISTER WEIGHTS
(byte) idx
(byte) idx#11 9.75
(byte) idx#13 1.0
(byte) idx#18 4.0
(byte) idx#4 11.0
(void()) main()
(void()) print_person((dword) print_person::person_id , (byte*) print_person::person_initials)
(byte) print_person::i
(byte) print_person::i#1 22.0
(byte) print_person::i#2 11.0
(dword) print_person::person_id
(byte*) print_person::person_initials
(byte*) print_person::person_initials#4 3.6666666666666665

Initial phi equivalence classes
[ print_person::person_initials#4 ]
[ print_person::i#2 print_person::i#1 ]
[ idx#11 idx#18 idx#13 idx#4 ]
Complete equivalence classes
[ print_person::person_initials#4 ]
[ print_person::i#2 print_person::i#1 ]
[ idx#11 idx#18 idx#13 idx#4 ]
Allocated zp[2]:2 [ print_person::person_initials#4 ]
Allocated zp[1]:4 [ print_person::i#2 print_person::i#1 ]
Allocated zp[1]:5 [ idx#11 idx#18 idx#13 idx#4 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Example of a struct containing an array
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label SCREEN = $400
  .label idx = 5
  // @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: {
    // [5] call print_person 
    // [9] phi from main to print_person [phi:main->print_person]
  print_person_from_main:
    // [9] phi (byte) idx#18 = (byte) 0 [phi:main->print_person#0] -- vbuz1=vbuc1 
    lda #0
    sta.z idx
    // [9] phi (byte*) print_person::person_initials#4 = (const byte*) jesper_initials [phi:main->print_person#1] -- pbuz1=pbuc1 
    lda #<jesper_initials
    sta.z print_person.person_initials
    lda #>jesper_initials
    sta.z print_person.person_initials+1
    jsr print_person
    // [6] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [7] call print_person 
    // [9] phi from main::@1 to print_person [phi:main::@1->print_person]
  print_person_from___b1:
    // [9] phi (byte) idx#18 = (byte) idx#13 [phi:main::@1->print_person#0] -- register_copy 
    // [9] phi (byte*) print_person::person_initials#4 = (const byte*) henry_initials [phi:main::@1->print_person#1] -- pbuz1=pbuc1 
    lda #<henry_initials
    sta.z print_person.person_initials
    lda #>henry_initials
    sta.z print_person.person_initials+1
    jsr print_person
    jmp __breturn
    // main::@return
  __breturn:
    // [8] return 
    rts
}
  // print_person
// print_person(byte* zp(2) person_initials)
print_person: {
    .label i = 4
    .label person_initials = 2
    // [10] phi from print_person to print_person::@1 [phi:print_person->print_person::@1]
  __b1_from_print_person:
    // [10] phi (byte) idx#11 = (byte) idx#18 [phi:print_person->print_person::@1#0] -- register_copy 
    // [10] phi (byte) print_person::i#2 = (byte) 0 [phi:print_person->print_person::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b1
    // print_person::@1
  __b1:
    // [11] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 -- vbuc1_neq_pbuz1_derefidx_vbuz2_then_la1 
    ldy.z i
    lda (person_initials),y
    cmp #0
    bne __b2
    jmp __b3
    // print_person::@3
  __b3:
    // [12] *((const byte*) SCREEN + (byte) idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuz1=vbuc2 
    lda #' '
    ldy.z idx
    sta SCREEN,y
    // [13] (byte) idx#13 ← ++ (byte) idx#11 -- vbuz1=_inc_vbuz1 
    inc.z idx
    jmp __breturn
    // print_person::@return
  __breturn:
    // [14] return 
    rts
    // print_person::@2
  __b2:
    // [15] *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#4 + (byte) print_person::i#2) -- pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuz3 
    ldx.z idx
    ldy.z i
    lda (person_initials),y
    sta SCREEN,x
    // [16] (byte) idx#4 ← ++ (byte) idx#11 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // [17] (byte) print_person::i#1 ← ++ (byte) print_person::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [10] phi from print_person::@2 to print_person::@1 [phi:print_person::@2->print_person::@1]
  __b1_from___b2:
    // [10] phi (byte) idx#11 = (byte) idx#4 [phi:print_person::@2->print_person::@1#0] -- register_copy 
    // [10] phi (byte) print_person::i#2 = (byte) print_person::i#1 [phi:print_person::@2->print_person::@1#1] -- register_copy 
    jmp __b1
}
  // File Data
  jesper_initials: .text "jg"
  .byte 0
  .fill $3d, 0
  henry_initials: .text "hg"
  .byte 0
  .fill $3d, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [11] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 [ print_person::person_initials#4 print_person::i#2 idx#11 ] ( main:2::print_person:5 [ print_person::person_initials#4 print_person::i#2 idx#11 ] main:2::print_person:7 [ print_person::person_initials#4 print_person::i#2 idx#11 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ print_person::i#2 print_person::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:5 [ idx#11 idx#18 idx#13 idx#4 ]
Statement [12] *((const byte*) SCREEN + (byte) idx#11) ← (byte) ' ' [ idx#11 ] ( main:2::print_person:5 [ idx#11 ] main:2::print_person:7 [ idx#11 ] ) always clobbers reg byte a 
Statement [15] *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#4 + (byte) print_person::i#2) [ print_person::person_initials#4 print_person::i#2 idx#11 ] ( main:2::print_person:5 [ print_person::person_initials#4 print_person::i#2 idx#11 ] main:2::print_person:7 [ print_person::person_initials#4 print_person::i#2 idx#11 ] ) always clobbers reg byte a 
Statement [11] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 [ print_person::person_initials#4 print_person::i#2 idx#11 ] ( main:2::print_person:5 [ print_person::person_initials#4 print_person::i#2 idx#11 ] main:2::print_person:7 [ print_person::person_initials#4 print_person::i#2 idx#11 ] ) always clobbers reg byte a 
Statement [12] *((const byte*) SCREEN + (byte) idx#11) ← (byte) ' ' [ idx#11 ] ( main:2::print_person:5 [ idx#11 ] main:2::print_person:7 [ idx#11 ] ) always clobbers reg byte a 
Statement [15] *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#4 + (byte) print_person::i#2) [ print_person::person_initials#4 print_person::i#2 idx#11 ] ( main:2::print_person:5 [ print_person::person_initials#4 print_person::i#2 idx#11 ] main:2::print_person:7 [ print_person::person_initials#4 print_person::i#2 idx#11 ] ) always clobbers reg byte a 
Potential registers zp[2]:2 [ print_person::person_initials#4 ] : zp[2]:2 , 
Potential registers zp[1]:4 [ print_person::i#2 print_person::i#1 ] : zp[1]:4 , reg byte x , reg byte y , 
Potential registers zp[1]:5 [ idx#11 idx#18 idx#13 idx#4 ] : zp[1]:5 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [print_person] 33: zp[1]:4 [ print_person::i#2 print_person::i#1 ] 3.67: zp[2]:2 [ print_person::person_initials#4 ] 
Uplift Scope [] 25.75: zp[1]:5 [ idx#11 idx#18 idx#13 idx#4 ] 
Uplift Scope [main] 

Uplifting [print_person] best 500 combination reg byte y [ print_person::i#2 print_person::i#1 ] zp[2]:2 [ print_person::person_initials#4 ] 
Uplifting [] best 431 combination reg byte x [ idx#11 idx#18 idx#13 idx#4 ] 
Uplifting [main] best 431 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Example of a struct containing an array
  // 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 
  // [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: {
    // [5] call print_person 
    // [9] phi from main to print_person [phi:main->print_person]
  print_person_from_main:
    // [9] phi (byte) idx#18 = (byte) 0 [phi:main->print_person#0] -- vbuxx=vbuc1 
    ldx #0
    // [9] phi (byte*) print_person::person_initials#4 = (const byte*) jesper_initials [phi:main->print_person#1] -- pbuz1=pbuc1 
    lda #<jesper_initials
    sta.z print_person.person_initials
    lda #>jesper_initials
    sta.z print_person.person_initials+1
    jsr print_person
    // [6] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [7] call print_person 
    // [9] phi from main::@1 to print_person [phi:main::@1->print_person]
  print_person_from___b1:
    // [9] phi (byte) idx#18 = (byte) idx#13 [phi:main::@1->print_person#0] -- register_copy 
    // [9] phi (byte*) print_person::person_initials#4 = (const byte*) henry_initials [phi:main::@1->print_person#1] -- pbuz1=pbuc1 
    lda #<henry_initials
    sta.z print_person.person_initials
    lda #>henry_initials
    sta.z print_person.person_initials+1
    jsr print_person
    jmp __breturn
    // main::@return
  __breturn:
    // [8] return 
    rts
}
  // print_person
// print_person(byte* zp(2) person_initials)
print_person: {
    .label person_initials = 2
    // [10] phi from print_person to print_person::@1 [phi:print_person->print_person::@1]
  __b1_from_print_person:
    // [10] phi (byte) idx#11 = (byte) idx#18 [phi:print_person->print_person::@1#0] -- register_copy 
    // [10] phi (byte) print_person::i#2 = (byte) 0 [phi:print_person->print_person::@1#1] -- vbuyy=vbuc1 
    ldy #0
    jmp __b1
    // print_person::@1
  __b1:
    // [11] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 -- vbuc1_neq_pbuz1_derefidx_vbuyy_then_la1 
    lda (person_initials),y
    cmp #0
    bne __b2
    jmp __b3
    // print_person::@3
  __b3:
    // [12] *((const byte*) SCREEN + (byte) idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta SCREEN,x
    // [13] (byte) idx#13 ← ++ (byte) idx#11 -- vbuxx=_inc_vbuxx 
    inx
    jmp __breturn
    // print_person::@return
  __breturn:
    // [14] return 
    rts
    // print_person::@2
  __b2:
    // [15] *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#4 + (byte) print_person::i#2) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuyy 
    lda (person_initials),y
    sta SCREEN,x
    // [16] (byte) idx#4 ← ++ (byte) idx#11 -- vbuxx=_inc_vbuxx 
    inx
    // [17] (byte) print_person::i#1 ← ++ (byte) print_person::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [10] phi from print_person::@2 to print_person::@1 [phi:print_person::@2->print_person::@1]
  __b1_from___b2:
    // [10] phi (byte) idx#11 = (byte) idx#4 [phi:print_person::@2->print_person::@1#0] -- register_copy 
    // [10] phi (byte) print_person::i#2 = (byte) print_person::i#1 [phi:print_person::@2->print_person::@1#1] -- register_copy 
    jmp __b1
}
  // File Data
  jesper_initials: .text "jg"
  .byte 0
  .fill $3d, 0
  henry_initials: .text "hg"
  .byte 0
  .fill $3d, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label __bbegin with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Removing instruction __b1_from_main:
Removing instruction print_person_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction print_person_from_main:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b1_from_print_person:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
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*) SCREEN = (byte*) 1024
(const byte*) henry_initials[(number) $40]  = (byte*) "hg"
(byte) idx
(byte) idx#11 reg byte x 9.75
(byte) idx#13 reg byte x 1.0
(byte) idx#18 reg byte x 4.0
(byte) idx#4 reg byte x 11.0
(const byte*) jesper_initials[(number) $40]  = (byte*) "jg"
(void()) main()
(label) main::@1
(label) main::@return
(void()) print_person((dword) print_person::person_id , (byte*) print_person::person_initials)
(label) print_person::@1
(label) print_person::@2
(label) print_person::@3
(label) print_person::@return
(byte) print_person::i
(byte) print_person::i#1 reg byte y 22.0
(byte) print_person::i#2 reg byte y 11.0
(dword) print_person::person_id
(byte*) print_person::person_initials
(byte*) print_person::person_initials#4 person_initials zp[2]:2 3.6666666666666665

zp[2]:2 [ print_person::person_initials#4 ]
reg byte y [ print_person::i#2 print_person::i#1 ]
reg byte x [ idx#11 idx#18 idx#13 idx#4 ]


FINAL ASSEMBLER
Score: 350

  // File Comments
// Example of a struct containing an array
  // 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 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // print_person(jesper_id, jesper_initials)
    // [5] call print_person 
    // [9] phi from main to print_person [phi:main->print_person]
    // [9] phi (byte) idx#18 = (byte) 0 [phi:main->print_person#0] -- vbuxx=vbuc1 
    ldx #0
    // [9] phi (byte*) print_person::person_initials#4 = (const byte*) jesper_initials [phi:main->print_person#1] -- pbuz1=pbuc1 
    lda #<jesper_initials
    sta.z print_person.person_initials
    lda #>jesper_initials
    sta.z print_person.person_initials+1
    jsr print_person
    // [6] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // print_person(henry_id, henry_initials)
    // [7] call print_person 
    // [9] phi from main::@1 to print_person [phi:main::@1->print_person]
    // [9] phi (byte) idx#18 = (byte) idx#13 [phi:main::@1->print_person#0] -- register_copy 
    // [9] phi (byte*) print_person::person_initials#4 = (const byte*) henry_initials [phi:main::@1->print_person#1] -- pbuz1=pbuc1 
    lda #<henry_initials
    sta.z print_person.person_initials
    lda #>henry_initials
    sta.z print_person.person_initials+1
    jsr print_person
    // main::@return
    // }
    // [8] return 
    rts
}
  // print_person
// print_person(byte* zp(2) person_initials)
print_person: {
    .label person_initials = 2
    // [10] phi from print_person to print_person::@1 [phi:print_person->print_person::@1]
    // [10] phi (byte) idx#11 = (byte) idx#18 [phi:print_person->print_person::@1#0] -- register_copy 
    // [10] phi (byte) print_person::i#2 = (byte) 0 [phi:print_person->print_person::@1#1] -- vbuyy=vbuc1 
    ldy #0
    // print_person::@1
  __b1:
    // for(byte i=0; person_initials[i]; i++)
    // [11] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 -- vbuc1_neq_pbuz1_derefidx_vbuyy_then_la1 
    lda (person_initials),y
    cmp #0
    bne __b2
    // print_person::@3
    // SCREEN[idx++] = ' '
    // [12] *((const byte*) SCREEN + (byte) idx#11) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2 
    lda #' '
    sta SCREEN,x
    // SCREEN[idx++] = ' ';
    // [13] (byte) idx#13 ← ++ (byte) idx#11 -- vbuxx=_inc_vbuxx 
    inx
    // print_person::@return
    // }
    // [14] return 
    rts
    // print_person::@2
  __b2:
    // SCREEN[idx++] = person_initials[i]
    // [15] *((const byte*) SCREEN + (byte) idx#11) ← *((byte*) print_person::person_initials#4 + (byte) print_person::i#2) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuyy 
    lda (person_initials),y
    sta SCREEN,x
    // SCREEN[idx++] = person_initials[i];
    // [16] (byte) idx#4 ← ++ (byte) idx#11 -- vbuxx=_inc_vbuxx 
    inx
    // for(byte i=0; person_initials[i]; i++)
    // [17] (byte) print_person::i#1 ← ++ (byte) print_person::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [10] phi from print_person::@2 to print_person::@1 [phi:print_person::@2->print_person::@1]
    // [10] phi (byte) idx#11 = (byte) idx#4 [phi:print_person::@2->print_person::@1#0] -- register_copy 
    // [10] phi (byte) print_person::i#2 = (byte) print_person::i#1 [phi:print_person::@2->print_person::@1#1] -- register_copy 
    jmp __b1
}
  // File Data
  jesper_initials: .text "jg"
  .byte 0
  .fill $3d, 0
  henry_initials: .text "hg"
  .byte 0
  .fill $3d, 0

