Inlined call call __init

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start::@1
  screen#31 = phi( __start::@1/screen#35 )
  call print1
  to:main::@1
main::@1: scope:[main]  from main
  screen#16 = phi( main/screen#6 )
  screen#0 = screen#16
  call print2
  to:main::@2
main::@2: scope:[main]  from main::@1
  screen#17 = phi( main::@1/screen#10 )
  screen#1 = screen#17
  to:main::@return
main::@return: scope:[main]  from main::@2
  screen#18 = phi( main::@2/screen#1 )
  screen#2 = screen#18
  return 
  to:@return

void print1()
print1: scope:[print1]  from main
  screen#32 = phi( main/screen#31 )
  print::s#0 = print1::s
  call print
  to:print1::@1
print1::@1: scope:[print1]  from print1
  screen#19 = phi( print1/screen#12 )
  screen#3 = screen#19
  print::s#1 = print1::s1
  call print
  to:print1::@2
print1::@2: scope:[print1]  from print1::@1
  screen#20 = phi( print1::@1/screen#12 )
  screen#4 = screen#20
  print::s#2 = s
  call print
  to:print1::@3
print1::@3: scope:[print1]  from print1::@2
  screen#21 = phi( print1::@2/screen#12 )
  screen#5 = screen#21
  to:print1::@return
print1::@return: scope:[print1]  from print1::@3
  screen#22 = phi( print1::@3/screen#5 )
  screen#6 = screen#22
  return 
  to:@return

void print2()
print2: scope:[print2]  from main::@1
  screen#33 = phi( main::@1/screen#0 )
  print::s#3 = print2::s
  call print
  to:print2::@1
print2::@1: scope:[print2]  from print2
  screen#23 = phi( print2/screen#12 )
  screen#7 = screen#23
  print::s#4 = print2::s1
  call print
  to:print2::@2
print2::@2: scope:[print2]  from print2::@1
  screen#24 = phi( print2::@1/screen#12 )
  screen#8 = screen#24
  print::s#5 = s1
  call print
  to:print2::@3
print2::@3: scope:[print2]  from print2::@2
  screen#25 = phi( print2::@2/screen#12 )
  screen#9 = screen#25
  to:print2::@return
print2::@return: scope:[print2]  from print2::@3
  screen#26 = phi( print2::@3/screen#9 )
  screen#10 = screen#26
  return 
  to:@return

void print(char *s)
print: scope:[print]  from print1 print1::@1 print1::@2 print2 print2::@1 print2::@2
  screen#36 = phi( print1/screen#32, print1::@1/screen#3, print1::@2/screen#4, print2/screen#33, print2::@1/screen#7, print2::@2/screen#8 )
  print::s#9 = phi( print1/print::s#0, print1::@1/print::s#1, print1::@2/print::s#2, print2/print::s#3, print2::@1/print::s#4, print2::@2/print::s#5 )
  to:print::@1
print::@1: scope:[print]  from print print::@2
  screen#34 = phi( print/screen#36, print::@2/screen#11 )
  print::s#7 = phi( print/print::s#9, print::@2/print::s#6 )
  print::$0 = 0 != *print::s#7
  if(print::$0) goto print::@2
  to:print::@return
print::@2: scope:[print]  from print::@1
  screen#27 = phi( print::@1/screen#34 )
  print::s#8 = phi( print::@1/print::s#7 )
  *screen#27 = *print::s#8
  screen#11 = ++ screen#27
  print::s#6 = ++ print::s#8
  to:print::@1
print::@return: scope:[print]  from print::@1
  screen#28 = phi( print::@1/screen#34 )
  screen#12 = screen#28
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  screen#13 = (char *)$400
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  screen#35 = phi( __start::__init1/screen#13 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  screen#29 = phi( __start::@1/screen#2 )
  screen#14 = screen#29
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  screen#30 = phi( __start::@2/screen#14 )
  screen#15 = screen#30
  return 
  to:@return

SYMBOL TABLE SSA
void __start()
void main()
void print(char *s)
bool print::$0
char *print::s
char *print::s#0
char *print::s#1
char *print::s#2
char *print::s#3
char *print::s#4
char *print::s#5
char *print::s#6
char *print::s#7
char *print::s#8
char *print::s#9
void print1()
__constant char print1::s[8] = "string1"
__constant char print1::s1[8] = "string2"
void print2()
__constant char print2::s[8] = "string1"
__constant char print2::s1[8] = "string2"
__constant char *s = "string3"
__constant char *s1 = "string4"
char *screen
char *screen#0
char *screen#1
char *screen#10
char *screen#11
char *screen#12
char *screen#13
char *screen#14
char *screen#15
char *screen#16
char *screen#17
char *screen#18
char *screen#19
char *screen#2
char *screen#20
char *screen#21
char *screen#22
char *screen#23
char *screen#24
char *screen#25
char *screen#26
char *screen#27
char *screen#28
char *screen#29
char *screen#3
char *screen#30
char *screen#31
char *screen#32
char *screen#33
char *screen#34
char *screen#35
char *screen#36
char *screen#4
char *screen#5
char *screen#6
char *screen#7
char *screen#8
char *screen#9

Adding number conversion cast (unumber) 0 in print::$0 = 0 != *print::s#7
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 0
Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias screen#0 = screen#16 
Alias screen#1 = screen#17 screen#18 screen#2 
Alias screen#19 = screen#3 
Alias screen#20 = screen#4 
Alias screen#21 = screen#5 screen#22 screen#6 
Alias screen#23 = screen#7 
Alias screen#24 = screen#8 
Alias screen#10 = screen#9 screen#25 screen#26 
Alias print::s#7 = print::s#8 
Alias screen#12 = screen#27 screen#34 screen#28 
Alias screen#13 = screen#35 
Alias screen#14 = screen#29 screen#30 screen#15 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values screen#31 screen#13
Identical Phi Values screen#0 screen#21
Identical Phi Values screen#1 screen#10
Identical Phi Values screen#32 screen#31
Identical Phi Values screen#19 screen#12
Identical Phi Values screen#20 screen#12
Identical Phi Values screen#21 screen#12
Identical Phi Values screen#33 screen#0
Identical Phi Values screen#23 screen#12
Identical Phi Values screen#24 screen#12
Identical Phi Values screen#10 screen#12
Identical Phi Values screen#14 screen#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition print::$0 [31] if(0!=*print::s#7) goto print::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant print::s#0 = print1::s
Constant print::s#1 = print1::s1
Constant print::s#2 = s
Constant print::s#3 = print2::s
Constant print::s#4 = print2::s1
Constant print::s#5 = s1
Constant screen#13 = (char *) 1024
Successful SSA optimization Pass2ConstantIdentification
Consolidated constant strings into string_0
Consolidated constant strings into string_1
Successful SSA optimization Pass2ConstantStringConsolidation
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
Inlining constant with var siblings print::s#0
Inlining constant with var siblings print::s#1
Inlining constant with var siblings print::s#2
Inlining constant with var siblings print::s#3
Inlining constant with var siblings print::s#4
Inlining constant with var siblings print::s#5
Inlining constant with var siblings screen#13
Constant inlined print::s#0 = string_0
Constant inlined print1::s1 = string_1
Constant inlined print2::s1 = string_1
Constant inlined print::s#4 = string_1
Constant inlined print::s#3 = string_0
Constant inlined print::s#2 = s
Constant inlined print::s#1 = string_1
Constant inlined print2::s = string_0
Constant inlined screen#13 = (char *) 1024
Constant inlined print::s#5 = s1
Constant inlined print1::s = string_0
Successful SSA optimization Pass2ConstantInlining
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of print1
Adding NOP phi() at start of print1::@3
Adding NOP phi() at start of print2::@3
CALL GRAPH
Calls in [main] to print1:1 print2:3 
Calls in [print1] to print:7 print:9 print:11 
Calls in [print2] to print:15 print:17 print:19 

Created 4 initial phi equivalence classes
Coalesced [8] screen#37 = screen#12
Coalesced (already) [10] screen#38 = screen#12
Coalesced (already) [14] screen#39 = screen#12
Coalesced (already) [16] screen#40 = screen#12
Coalesced (already) [18] screen#41 = screen#12
Coalesced [23] print::s#10 = print::s#9
Coalesced (already) [24] screen#42 = screen#36
Coalesced [31] print::s#11 = print::s#6
Coalesced [32] screen#43 = screen#11
Coalesced down to 2 phi equivalence classes
Culled Empty Block label main::@2
Culled Empty Block label print1::@3
Culled Empty Block label print2::@3
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of print1
Adding NOP phi() at start of print1::@1
Adding NOP phi() at start of print1::@2
Adding NOP phi() at start of print2
Adding NOP phi() at start of print2::@1
Adding NOP phi() at start of print2::@2

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  [1] call print1
  to:main::@1
main::@1: scope:[main]  from main
  [2] phi()
  [3] call print2
  to:main::@return
main::@return: scope:[main]  from main::@1
  [4] return 
  to:@return

void print1()
print1: scope:[print1]  from main
  [5] phi()
  [6] call print
  to:print1::@1
print1::@1: scope:[print1]  from print1
  [7] phi()
  [8] call print
  to:print1::@2
print1::@2: scope:[print1]  from print1::@1
  [9] phi()
  [10] call print
  to:print1::@return
print1::@return: scope:[print1]  from print1::@2
  [11] return 
  to:@return

void print2()
print2: scope:[print2]  from main::@1
  [12] phi()
  [13] call print
  to:print2::@1
print2::@1: scope:[print2]  from print2
  [14] phi()
  [15] call print
  to:print2::@2
print2::@2: scope:[print2]  from print2::@1
  [16] phi()
  [17] call print
  to:print2::@return
print2::@return: scope:[print2]  from print2::@2
  [18] return 
  to:@return

void print(char *s)
print: scope:[print]  from print1 print1::@1 print1::@2 print2 print2::@1 print2::@2
  [19] screen#36 = phi( print1/(char *) 1024, print1::@1/screen#12, print1::@2/screen#12, print2/screen#12, print2::@1/screen#12, print2::@2/screen#12 )
  [19] print::s#9 = phi( print1/string_0, print1::@1/string_1, print1::@2/s, print2/string_0, print2::@1/string_1, print2::@2/s1 )
  to:print::@1
print::@1: scope:[print]  from print print::@2
  [20] screen#12 = phi( print/screen#36, print::@2/screen#11 )
  [20] print::s#7 = phi( print/print::s#9, print::@2/print::s#6 )
  [21] if(0!=*print::s#7) goto print::@2
  to:print::@return
print::@return: scope:[print]  from print::@1
  [22] return 
  to:@return
print::@2: scope:[print]  from print::@1
  [23] *screen#12 = *print::s#7
  [24] screen#11 = ++ screen#12
  [25] print::s#6 = ++ print::s#7
  to:print::@1


VARIABLE REGISTER WEIGHTS
void main()
void print(char *s)
char *print::s
char *print::s#6 // 2002.0
char *print::s#7 // 1026.25
char *print::s#9 // 101.0
void print1()
void print2()
char *screen
char *screen#11 // 1001.0
char *screen#12 // 185.8235294117647
char *screen#36 // 156.0

Initial phi equivalence classes
[ screen#36 screen#12 screen#11 ]
[ print::s#7 print::s#9 print::s#6 ]
Complete equivalence classes
[ screen#36 screen#12 screen#11 ]
[ print::s#7 print::s#9 print::s#6 ]
Allocated zp[2]:2 [ print::s#7 print::s#9 print::s#6 ]
Allocated zp[2]:4 [ screen#36 screen#12 screen#11 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [21] if(0!=*print::s#7) goto print::@2 [ screen#12 print::s#7 ] ( print1:1::print:6 [ screen#12 print::s#7 ] { }  print1:1::print:8 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print1:1::print:10 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print2:3::print:13 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print2:3::print:15 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print2:3::print:17 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  ) always clobbers reg byte a reg byte y 
Statement [23] *screen#12 = *print::s#7 [ screen#12 print::s#7 ] ( print1:1::print:6 [ screen#12 print::s#7 ] { }  print1:1::print:8 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print1:1::print:10 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print2:3::print:13 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print2:3::print:15 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  print2:3::print:17 [ screen#12 print::s#7 ] { { screen#12 = screen#36 } }  ) always clobbers reg byte a reg byte y 
Potential registers zp[2]:4 [ screen#36 screen#12 screen#11 ] : zp[2]:4 , 
Potential registers zp[2]:2 [ print::s#7 print::s#9 print::s#6 ] : zp[2]:2 , 

REGISTER UPLIFT SCOPES
Uplift Scope [print] 3,129.25: zp[2]:2 [ print::s#7 print::s#9 print::s#6 ] 
Uplift Scope [] 1,342.82: zp[2]:4 [ screen#36 screen#12 screen#11 ] 
Uplift Scope [main] 
Uplift Scope [print1] 
Uplift Scope [print2] 

Uplifting [print] best 781 combination zp[2]:2 [ print::s#7 print::s#9 print::s#6 ] 
Uplifting [] best 781 combination zp[2]:4 [ screen#36 screen#12 screen#11 ] 
Uplifting [main] best 781 combination 
Uplifting [print1] best 781 combination 
Uplifting [print2] best 781 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Tests that multiple different identical strings are consolidated to a root variable
  // Upstart
  // Commodore 64 PRG executable file
.file [name="string-const-consolidation-root.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
  .label screen = 4
.segment Code
  // main
main: {
    // [1] call print1
    // [5] phi from main to print1 [phi:main->print1]
  print1_from_main:
    jsr print1
    // [2] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    jmp __b1
    // main::@1
  __b1:
    // [3] call print2
    // [12] phi from main::@1 to print2 [phi:main::@1->print2]
  print2_from___b1:
    jsr print2
    jmp __breturn
    // main::@return
  __breturn:
    // [4] return 
    rts
}
  // print1
print1: {
    // [6] call print
    // [19] phi from print1 to print [phi:print1->print]
  print_from_print1:
    // [19] phi screen#36 = (char *) 1024 [phi:print1->print#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [19] phi print::s#9 = string_0 [phi:print1->print#1] -- pbuz1=pbuc1 
    lda #<string_0
    sta.z print.s
    lda #>string_0
    sta.z print.s+1
    jsr print
    // [7] phi from print1 to print1::@1 [phi:print1->print1::@1]
  __b1_from_print1:
    jmp __b1
    // print1::@1
  __b1:
    // [8] call print
    // [19] phi from print1::@1 to print [phi:print1::@1->print]
  print_from___b1:
    // [19] phi screen#36 = screen#12 [phi:print1::@1->print#0] -- register_copy 
    // [19] phi print::s#9 = string_1 [phi:print1::@1->print#1] -- pbuz1=pbuc1 
    lda #<string_1
    sta.z print.s
    lda #>string_1
    sta.z print.s+1
    jsr print
    // [9] phi from print1::@1 to print1::@2 [phi:print1::@1->print1::@2]
  __b2_from___b1:
    jmp __b2
    // print1::@2
  __b2:
    // [10] call print
    // [19] phi from print1::@2 to print [phi:print1::@2->print]
  print_from___b2:
    // [19] phi screen#36 = screen#12 [phi:print1::@2->print#0] -- register_copy 
    // [19] phi print::s#9 = s [phi:print1::@2->print#1] -- pbuz1=pbuc1 
    lda #<s
    sta.z print.s
    lda #>s
    sta.z print.s+1
    jsr print
    jmp __breturn
    // print1::@return
  __breturn:
    // [11] return 
    rts
}
  // print2
print2: {
    // [13] call print
    // [19] phi from print2 to print [phi:print2->print]
  print_from_print2:
    // [19] phi screen#36 = screen#12 [phi:print2->print#0] -- register_copy 
    // [19] phi print::s#9 = string_0 [phi:print2->print#1] -- pbuz1=pbuc1 
    lda #<string_0
    sta.z print.s
    lda #>string_0
    sta.z print.s+1
    jsr print
    // [14] phi from print2 to print2::@1 [phi:print2->print2::@1]
  __b1_from_print2:
    jmp __b1
    // print2::@1
  __b1:
    // [15] call print
    // [19] phi from print2::@1 to print [phi:print2::@1->print]
  print_from___b1:
    // [19] phi screen#36 = screen#12 [phi:print2::@1->print#0] -- register_copy 
    // [19] phi print::s#9 = string_1 [phi:print2::@1->print#1] -- pbuz1=pbuc1 
    lda #<string_1
    sta.z print.s
    lda #>string_1
    sta.z print.s+1
    jsr print
    // [16] phi from print2::@1 to print2::@2 [phi:print2::@1->print2::@2]
  __b2_from___b1:
    jmp __b2
    // print2::@2
  __b2:
    // [17] call print
    // [19] phi from print2::@2 to print [phi:print2::@2->print]
  print_from___b2:
    // [19] phi screen#36 = screen#12 [phi:print2::@2->print#0] -- register_copy 
    // [19] phi print::s#9 = s1 [phi:print2::@2->print#1] -- pbuz1=pbuc1 
    lda #<s1
    sta.z print.s
    lda #>s1
    sta.z print.s+1
    jsr print
    jmp __breturn
    // print2::@return
  __breturn:
    // [18] return 
    rts
}
  // print
// void print(__zp(2) char *s)
print: {
    .label s = 2
    // [20] phi from print print::@2 to print::@1 [phi:print/print::@2->print::@1]
  __b1_from_print:
  __b1_from___b2:
    // [20] phi screen#12 = screen#36 [phi:print/print::@2->print::@1#0] -- register_copy 
    // [20] phi print::s#7 = print::s#9 [phi:print/print::@2->print::@1#1] -- register_copy 
    jmp __b1
    // print::@1
  __b1:
    // [21] if(0!=*print::s#7) goto print::@2 -- 0_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (s),y
    cmp #0
    bne __b2
    jmp __breturn
    // print::@return
  __breturn:
    // [22] return 
    rts
    // print::@2
  __b2:
    // [23] *screen#12 = *print::s#7 -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (s),y
    ldy #0
    sta (screen),y
    // [24] screen#11 = ++ screen#12 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [25] print::s#6 = ++ print::s#7 -- pbuz1=_inc_pbuz1 
    inc.z s
    bne !+
    inc.z s+1
  !:
    jmp __b1_from___b2
}
  // File Data
.segment Data
  s: .text "string3"
  .byte 0
  s1: .text "string4"
  .byte 0
  string_0: .text "string1"
  .byte 0
  string_1: .text "string2"
  .byte 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b1_from___b2 with __b1
Removing instruction __b1_from_main:
Removing instruction print2_from___b1:
Removing instruction __b1_from_print1:
Removing instruction print_from___b1:
Removing instruction __b2_from___b1:
Removing instruction print_from___b2:
Removing instruction __b1_from_print2:
Removing instruction print_from___b1:
Removing instruction __b2_from___b1:
Removing instruction print_from___b2:
Removing instruction __b1_from_print:
Removing instruction __b1_from___b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction print1_from_main:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction print_from_print1:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction print_from_print2:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
void main()
void print(char *s)
char *print::s
char *print::s#6 // s zp[2]:2 2002.0
char *print::s#7 // s zp[2]:2 1026.25
char *print::s#9 // s zp[2]:2 101.0
void print1()
void print2()
__constant char *s = "string3"
__constant char *s1 = "string4"
char *screen
char *screen#11 // screen zp[2]:4 1001.0
char *screen#12 // screen zp[2]:4 185.8235294117647
char *screen#36 // screen zp[2]:4 156.0
__constant char string_0[8] = "string1"
__constant char string_1[8] = "string2"

zp[2]:4 [ screen#36 screen#12 screen#11 ]
zp[2]:2 [ print::s#7 print::s#9 print::s#6 ]


FINAL ASSEMBLER
Score: 677

  // File Comments
// Tests that multiple different identical strings are consolidated to a root variable
  // Upstart
  // Commodore 64 PRG executable file
.file [name="string-const-consolidation-root.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
  .label screen = 4
.segment Code
  // main
main: {
    // print1()
    // [1] call print1
    // [5] phi from main to print1 [phi:main->print1]
    jsr print1
    // [2] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // print2()
    // [3] call print2
    // [12] phi from main::@1 to print2 [phi:main::@1->print2]
    jsr print2
    // main::@return
    // }
    // [4] return 
    rts
}
  // print1
print1: {
    // print("string1")
    // [6] call print
    // [19] phi from print1 to print [phi:print1->print]
    // [19] phi screen#36 = (char *) 1024 [phi:print1->print#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z screen
    lda #>$400
    sta.z screen+1
    // [19] phi print::s#9 = string_0 [phi:print1->print#1] -- pbuz1=pbuc1 
    lda #<string_0
    sta.z print.s
    lda #>string_0
    sta.z print.s+1
    jsr print
    // [7] phi from print1 to print1::@1 [phi:print1->print1::@1]
    // print1::@1
    // print("string2")
    // [8] call print
    // [19] phi from print1::@1 to print [phi:print1::@1->print]
    // [19] phi screen#36 = screen#12 [phi:print1::@1->print#0] -- register_copy 
    // [19] phi print::s#9 = string_1 [phi:print1::@1->print#1] -- pbuz1=pbuc1 
    lda #<string_1
    sta.z print.s
    lda #>string_1
    sta.z print.s+1
    jsr print
    // [9] phi from print1::@1 to print1::@2 [phi:print1::@1->print1::@2]
    // print1::@2
    // print(s)
    // [10] call print
    // [19] phi from print1::@2 to print [phi:print1::@2->print]
    // [19] phi screen#36 = screen#12 [phi:print1::@2->print#0] -- register_copy 
    // [19] phi print::s#9 = s [phi:print1::@2->print#1] -- pbuz1=pbuc1 
    lda #<s
    sta.z print.s
    lda #>s
    sta.z print.s+1
    jsr print
    // print1::@return
    // }
    // [11] return 
    rts
}
  // print2
print2: {
    // print("string1")
    // [13] call print
    // [19] phi from print2 to print [phi:print2->print]
    // [19] phi screen#36 = screen#12 [phi:print2->print#0] -- register_copy 
    // [19] phi print::s#9 = string_0 [phi:print2->print#1] -- pbuz1=pbuc1 
    lda #<string_0
    sta.z print.s
    lda #>string_0
    sta.z print.s+1
    jsr print
    // [14] phi from print2 to print2::@1 [phi:print2->print2::@1]
    // print2::@1
    // print("string2")
    // [15] call print
    // [19] phi from print2::@1 to print [phi:print2::@1->print]
    // [19] phi screen#36 = screen#12 [phi:print2::@1->print#0] -- register_copy 
    // [19] phi print::s#9 = string_1 [phi:print2::@1->print#1] -- pbuz1=pbuc1 
    lda #<string_1
    sta.z print.s
    lda #>string_1
    sta.z print.s+1
    jsr print
    // [16] phi from print2::@1 to print2::@2 [phi:print2::@1->print2::@2]
    // print2::@2
    // print(s1)
    // [17] call print
    // [19] phi from print2::@2 to print [phi:print2::@2->print]
    // [19] phi screen#36 = screen#12 [phi:print2::@2->print#0] -- register_copy 
    // [19] phi print::s#9 = s1 [phi:print2::@2->print#1] -- pbuz1=pbuc1 
    lda #<s1
    sta.z print.s
    lda #>s1
    sta.z print.s+1
    jsr print
    // print2::@return
    // }
    // [18] return 
    rts
}
  // print
// void print(__zp(2) char *s)
print: {
    .label s = 2
    // [20] phi from print print::@2 to print::@1 [phi:print/print::@2->print::@1]
    // [20] phi screen#12 = screen#36 [phi:print/print::@2->print::@1#0] -- register_copy 
    // [20] phi print::s#7 = print::s#9 [phi:print/print::@2->print::@1#1] -- register_copy 
    // print::@1
  __b1:
    // while(*s)
    // [21] if(0!=*print::s#7) goto print::@2 -- 0_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (s),y
    cmp #0
    bne __b2
    // print::@return
    // }
    // [22] return 
    rts
    // print::@2
  __b2:
    // *screen++ = *s++
    // [23] *screen#12 = *print::s#7 -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (s),y
    sta (screen),y
    // *screen++ = *s++;
    // [24] screen#11 = ++ screen#12 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [25] print::s#6 = ++ print::s#7 -- pbuz1=_inc_pbuz1 
    inc.z s
    bne !+
    inc.z s+1
  !:
    jmp __b1
}
  // File Data
.segment Data
  s: .text "string3"
  .byte 0
  s1: .text "string4"
  .byte 0
  string_0: .text "string1"
  .byte 0
  string_1: .text "string2"
  .byte 0

