Warning! Adding boolean cast to non-boolean condition *((byte*) print2::msg + (byte) print2::i)
Identified constant variable (byte*) screen
Identified constant variable (byte*) main::hello
Culled Empty Block (label) @1
Culled Empty Block (label) print2::@4
Culled Empty Block (label) print2::@3
Culled Empty Block (label) print2::@5
Culled Empty Block (label) print2::@6

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) screen#0 ← ((byte*)) (number) $400
  to:@2
main: scope:[main]  from @2
  (byte*) main::hello#0 ← (const string) main::$3
  (byte*) print2::at#0 ← (byte*) screen#0
  (byte*) print2::msg#0 ← (byte*) main::hello#0
  call print2 
  to:main::@1
main::@1: scope:[main]  from main
  (byte*~) main::$1 ← (byte*) screen#0 + (number) $50
  (byte*) print2::at#1 ← (byte*~) main::$1
  (byte*) print2::msg#1 ← (byte*) main::hello#0
  call print2 
  to:main::@2
main::@2: scope:[main]  from main::@1
  to:main::@return
main::@return: scope:[main]  from main::@2
  return 
  to:@return
print2: scope:[print2]  from main main::@1
  (byte*) print2::at#4 ← phi( main/(byte*) print2::at#0 main::@1/(byte*) print2::at#1 )
  (byte*) print2::msg#4 ← phi( main/(byte*) print2::msg#0 main::@1/(byte*) print2::msg#1 )
  (byte) print2::j#0 ← (number) 0
  (byte) print2::i#0 ← (number) 0
  to:print2::@1
print2::@1: scope:[print2]  from print2 print2::@2
  (byte) print2::j#3 ← phi( print2/(byte) print2::j#0 print2::@2/(byte) print2::j#1 )
  (byte*) print2::at#3 ← phi( print2/(byte*) print2::at#4 print2::@2/(byte*) print2::at#2 )
  (byte) print2::i#2 ← phi( print2/(byte) print2::i#0 print2::@2/(byte) print2::i#1 )
  (byte*) print2::msg#2 ← phi( print2/(byte*) print2::msg#4 print2::@2/(byte*) print2::msg#3 )
  (bool~) print2::$0 ← (number) 0 != *((byte*) print2::msg#2 + (byte) print2::i#2)
  if((bool~) print2::$0) goto print2::@2
  to:print2::@return
print2::@2: scope:[print2]  from print2::@1
  (byte) print2::j#2 ← phi( print2::@1/(byte) print2::j#3 )
  (byte*) print2::at#2 ← phi( print2::@1/(byte*) print2::at#3 )
  (byte) print2::i#3 ← phi( print2::@1/(byte) print2::i#2 )
  (byte*) print2::msg#3 ← phi( print2::@1/(byte*) print2::msg#2 )
  *((byte*) print2::at#2 + (byte) print2::j#2) ← *((byte*) print2::msg#3 + (byte) print2::i#3)
  (byte) print2::j#1 ← (byte) print2::j#2 + (number) 2
  (byte) print2::i#1 ← ++ (byte) print2::i#3
  to:print2::@1
print2::@return: scope:[print2]  from print2::@1
  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
(void()) main()
(byte*~) main::$1
(const string) main::$3 = (string) "hello world!"
(label) main::@1
(label) main::@2
(label) main::@return
(byte*) main::hello
(byte*) main::hello#0
(void()) print2((byte*) print2::at , (byte*) print2::msg)
(bool~) print2::$0
(label) print2::@1
(label) print2::@2
(label) print2::@return
(byte*) print2::at
(byte*) print2::at#0
(byte*) print2::at#1
(byte*) print2::at#2
(byte*) print2::at#3
(byte*) print2::at#4
(byte) print2::i
(byte) print2::i#0
(byte) print2::i#1
(byte) print2::i#2
(byte) print2::i#3
(byte) print2::j
(byte) print2::j#0
(byte) print2::j#1
(byte) print2::j#2
(byte) print2::j#3
(byte*) print2::msg
(byte*) print2::msg#0
(byte*) print2::msg#1
(byte*) print2::msg#2
(byte*) print2::msg#3
(byte*) print2::msg#4
(byte*) screen
(byte*) screen#0

Adding number conversion cast (unumber) $50 in (byte*~) main::$1 ← (byte*) screen#0 + (number) $50
Adding number conversion cast (unumber) 0 in (byte) print2::j#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) print2::i#0 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print2::$0 ← (number) 0 != *((byte*) print2::msg#2 + (byte) print2::i#2)
Adding number conversion cast (unumber) 2 in (byte) print2::j#1 ← (byte) print2::j#2 + (number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) screen#0 ← (byte*)(number) $400
Inlining cast (byte) print2::j#0 ← (unumber)(number) 0
Inlining cast (byte) print2::i#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $50
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $50
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) print2::at#1 = (byte*~) main::$1 
Alias (byte*) print2::msg#2 = (byte*) print2::msg#3 
Alias (byte) print2::i#2 = (byte) print2::i#3 
Alias (byte*) print2::at#2 = (byte*) print2::at#3 
Alias (byte) print2::j#2 = (byte) print2::j#3 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) print2::msg#2 (byte*) print2::msg#4
Identical Phi Values (byte*) print2::at#2 (byte*) print2::at#4
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) print2::$0 [15] if((byte) 0!=*((byte*) print2::msg#4 + (byte) print2::i#2)) goto print2::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) screen#0 = (byte*) 1024
Constant (const byte*) main::hello#0 = main::$3
Constant (const byte) print2::j#0 = 0
Constant (const byte) print2::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) print2::at#0 = screen#0
Constant (const byte*) print2::msg#0 = main::hello#0
Constant (const byte*) print2::msg#1 = main::hello#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [1] (byte*) print2::at#1 ← (const byte*) screen#0 + (byte) $50
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) print2::at#1 = screen#0+$50
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte) print2::j#0
Inlining constant with var siblings (const byte) print2::i#0
Inlining constant with var siblings (const byte*) print2::at#0
Inlining constant with var siblings (const byte*) print2::msg#0
Inlining constant with var siblings (const byte*) print2::msg#1
Inlining constant with var siblings (const byte*) print2::at#1
Constant inlined print2::msg#1 = (const byte*) main::hello#0
Constant inlined print2::j#0 = (byte) 0
Constant inlined print2::msg#0 = (const byte*) main::hello#0
Constant inlined print2::i#0 = (byte) 0
Constant inlined print2::at#1 = (const byte*) screen#0+(byte) $50
Constant inlined main::$3 = (const byte*) main::hello#0
Constant inlined print2::at#0 = (const byte*) screen#0
Successful SSA optimization Pass2ConstantInlining
Identical Phi Values (byte*) print2::msg#4 (const byte*) main::hello#0
Successful SSA optimization Pass2IdenticalPhiElimination
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
Adding NOP phi() at start of main::@1
Adding NOP phi() at start of main::@2
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to print2:6 print2:8 

Created 3 initial phi equivalence classes
Coalesced [18] print2::i#4 ← print2::i#1
Coalesced [19] print2::j#4 ← print2::j#1
Coalesced down to 3 phi equivalence classes
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()
main: scope:[main]  from @1
  [4] phi()
  [5] call print2 
  to:main::@1
main::@1: scope:[main]  from main
  [6] phi()
  [7] call print2 
  to:main::@return
main::@return: scope:[main]  from main::@1
  [8] return 
  to:@return
print2: scope:[print2]  from main main::@1
  [9] (byte*) print2::at#4 ← phi( main/(const byte*) screen#0 main::@1/(const byte*) screen#0+(byte) $50 )
  to:print2::@1
print2::@1: scope:[print2]  from print2 print2::@2
  [10] (byte) print2::j#2 ← phi( print2/(byte) 0 print2::@2/(byte) print2::j#1 )
  [10] (byte) print2::i#2 ← phi( print2/(byte) 0 print2::@2/(byte) print2::i#1 )
  [11] if((byte) 0!=*((const byte*) main::hello#0 + (byte) print2::i#2)) goto print2::@2
  to:print2::@return
print2::@return: scope:[print2]  from print2::@1
  [12] return 
  to:@return
print2::@2: scope:[print2]  from print2::@1
  [13] *((byte*) print2::at#4 + (byte) print2::j#2) ← *((const byte*) main::hello#0 + (byte) print2::i#2)
  [14] (byte) print2::j#1 ← (byte) print2::j#2 + (byte) 2
  [15] (byte) print2::i#1 ← ++ (byte) print2::i#2
  to:print2::@1


VARIABLE REGISTER WEIGHTS
(void()) main()
(byte*) main::hello
(void()) print2((byte*) print2::at , (byte*) print2::msg)
(byte*) print2::at
(byte*) print2::at#4 1.8333333333333333
(byte) print2::i
(byte) print2::i#1 22.0
(byte) print2::i#2 11.0
(byte) print2::j
(byte) print2::j#1 11.0
(byte) print2::j#2 11.0
(byte*) print2::msg
(byte*) screen

Initial phi equivalence classes
[ print2::at#4 ]
[ print2::i#2 print2::i#1 ]
[ print2::j#2 print2::j#1 ]
Complete equivalence classes
[ print2::at#4 ]
[ print2::i#2 print2::i#1 ]
[ print2::j#2 print2::j#1 ]
Allocated zp ZP_WORD:2 [ print2::at#4 ]
Allocated zp ZP_BYTE:4 [ print2::i#2 print2::i#1 ]
Allocated zp ZP_BYTE:5 [ print2::j#2 print2::j#1 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
  // 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 print2 
    // [9] phi from main to print2 [phi:main->print2]
  print2_from_main:
    // [9] phi (byte*) print2::at#4 = (const byte*) screen#0 [phi:main->print2#0] -- pbuz1=pbuc1 
    lda #<screen
    sta.z print2.at
    lda #>screen
    sta.z print2.at+1
    jsr print2
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
    // main::@1
  b1:
    // [7] call print2 
    // [9] phi from main::@1 to print2 [phi:main::@1->print2]
  print2_from_b1:
    // [9] phi (byte*) print2::at#4 = (const byte*) screen#0+(byte) $50 [phi:main::@1->print2#0] -- pbuz1=pbuc1 
    lda #<screen+$50
    sta.z print2.at
    lda #>screen+$50
    sta.z print2.at+1
    jsr print2
    jmp breturn
    // main::@return
  breturn:
    // [8] return 
    rts
    hello: .text "hello world!"
    .byte 0
}
  // print2
// print2(byte* zeropage(2) at)
print2: {
    .label j = 5
    .label i = 4
    .label at = 2
    // [10] phi from print2 to print2::@1 [phi:print2->print2::@1]
  b1_from_print2:
    // [10] phi (byte) print2::j#2 = (byte) 0 [phi:print2->print2::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z j
    // [10] phi (byte) print2::i#2 = (byte) 0 [phi:print2->print2::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp b1
    // print2::@1
  b1:
    // [11] if((byte) 0!=*((const byte*) main::hello#0 + (byte) print2::i#2)) goto print2::@2 -- vbuc1_neq_pbuc2_derefidx_vbuz1_then_la1 
    lda #0
    ldy.z i
    cmp main.hello,y
    bne b2
    jmp breturn
    // print2::@return
  breturn:
    // [12] return 
    rts
    // print2::@2
  b2:
    // [13] *((byte*) print2::at#4 + (byte) print2::j#2) ← *((const byte*) main::hello#0 + (byte) print2::i#2) -- pbuz1_derefidx_vbuz2=pbuc1_derefidx_vbuz3 
    ldy.z i
    lda main.hello,y
    ldy.z j
    sta (at),y
    // [14] (byte) print2::j#1 ← (byte) print2::j#2 + (byte) 2 -- vbuz1=vbuz1_plus_2 
    lda.z j
    clc
    adc #2
    sta.z j
    // [15] (byte) print2::i#1 ← ++ (byte) print2::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [10] phi from print2::@2 to print2::@1 [phi:print2::@2->print2::@1]
  b1_from_b2:
    // [10] phi (byte) print2::j#2 = (byte) print2::j#1 [phi:print2::@2->print2::@1#0] -- register_copy 
    // [10] phi (byte) print2::i#2 = (byte) print2::i#1 [phi:print2::@2->print2::@1#1] -- register_copy 
    jmp b1
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [11] if((byte) 0!=*((const byte*) main::hello#0 + (byte) print2::i#2)) goto print2::@2 [ print2::at#4 print2::i#2 print2::j#2 ] ( main:2::print2:5 [ print2::at#4 print2::i#2 print2::j#2 ] main:2::print2:7 [ print2::at#4 print2::i#2 print2::j#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ print2::i#2 print2::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ print2::j#2 print2::j#1 ]
Statement [13] *((byte*) print2::at#4 + (byte) print2::j#2) ← *((const byte*) main::hello#0 + (byte) print2::i#2) [ print2::at#4 print2::i#2 print2::j#2 ] ( main:2::print2:5 [ print2::at#4 print2::i#2 print2::j#2 ] main:2::print2:7 [ print2::at#4 print2::i#2 print2::j#2 ] ) always clobbers reg byte a 
Statement [11] if((byte) 0!=*((const byte*) main::hello#0 + (byte) print2::i#2)) goto print2::@2 [ print2::at#4 print2::i#2 print2::j#2 ] ( main:2::print2:5 [ print2::at#4 print2::i#2 print2::j#2 ] main:2::print2:7 [ print2::at#4 print2::i#2 print2::j#2 ] ) always clobbers reg byte a 
Statement [13] *((byte*) print2::at#4 + (byte) print2::j#2) ← *((const byte*) main::hello#0 + (byte) print2::i#2) [ print2::at#4 print2::i#2 print2::j#2 ] ( main:2::print2:5 [ print2::at#4 print2::i#2 print2::j#2 ] main:2::print2:7 [ print2::at#4 print2::i#2 print2::j#2 ] ) always clobbers reg byte a 
Potential registers zp ZP_WORD:2 [ print2::at#4 ] : zp ZP_WORD:2 , 
Potential registers zp ZP_BYTE:4 [ print2::i#2 print2::i#1 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:5 [ print2::j#2 print2::j#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [print2] 33: zp ZP_BYTE:4 [ print2::i#2 print2::i#1 ] 22: zp ZP_BYTE:5 [ print2::j#2 print2::j#1 ] 1.83: zp ZP_WORD:2 [ print2::at#4 ] 
Uplift Scope [main] 
Uplift Scope [] 

Uplifting [print2] best 607 combination reg byte x [ print2::i#2 print2::i#1 ] zp ZP_BYTE:5 [ print2::j#2 print2::j#1 ] zp ZP_WORD:2 [ print2::at#4 ] 
Uplifting [main] best 607 combination 
Uplifting [] best 607 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:5 [ print2::j#2 print2::j#1 ]
Uplifting [print2] best 607 combination zp ZP_BYTE:5 [ print2::j#2 print2::j#1 ] 
Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:4 [ print2::j#2 print2::j#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // 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 print2 
    // [9] phi from main to print2 [phi:main->print2]
  print2_from_main:
    // [9] phi (byte*) print2::at#4 = (const byte*) screen#0 [phi:main->print2#0] -- pbuz1=pbuc1 
    lda #<screen
    sta.z print2.at
    lda #>screen
    sta.z print2.at+1
    jsr print2
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    jmp b1
    // main::@1
  b1:
    // [7] call print2 
    // [9] phi from main::@1 to print2 [phi:main::@1->print2]
  print2_from_b1:
    // [9] phi (byte*) print2::at#4 = (const byte*) screen#0+(byte) $50 [phi:main::@1->print2#0] -- pbuz1=pbuc1 
    lda #<screen+$50
    sta.z print2.at
    lda #>screen+$50
    sta.z print2.at+1
    jsr print2
    jmp breturn
    // main::@return
  breturn:
    // [8] return 
    rts
    hello: .text "hello world!"
    .byte 0
}
  // print2
// print2(byte* zeropage(2) at)
print2: {
    .label j = 4
    .label at = 2
    // [10] phi from print2 to print2::@1 [phi:print2->print2::@1]
  b1_from_print2:
    // [10] phi (byte) print2::j#2 = (byte) 0 [phi:print2->print2::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z j
    // [10] phi (byte) print2::i#2 = (byte) 0 [phi:print2->print2::@1#1] -- vbuxx=vbuc1 
    ldx #0
    jmp b1
    // print2::@1
  b1:
    // [11] if((byte) 0!=*((const byte*) main::hello#0 + (byte) print2::i#2)) goto print2::@2 -- vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1 
    txa
    tay
    lda #0
    cmp main.hello,y
    bne b2
    jmp breturn
    // print2::@return
  breturn:
    // [12] return 
    rts
    // print2::@2
  b2:
    // [13] *((byte*) print2::at#4 + (byte) print2::j#2) ← *((const byte*) main::hello#0 + (byte) print2::i#2) -- pbuz1_derefidx_vbuz2=pbuc1_derefidx_vbuxx 
    lda main.hello,x
    ldy.z j
    sta (at),y
    // [14] (byte) print2::j#1 ← (byte) print2::j#2 + (byte) 2 -- vbuz1=vbuz1_plus_2 
    lda.z j
    clc
    adc #2
    sta.z j
    // [15] (byte) print2::i#1 ← ++ (byte) print2::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [10] phi from print2::@2 to print2::@1 [phi:print2::@2->print2::@1]
  b1_from_b2:
    // [10] phi (byte) print2::j#2 = (byte) print2::j#1 [phi:print2::@2->print2::@1#0] -- register_copy 
    // [10] phi (byte) print2::i#2 = (byte) print2::i#1 [phi:print2::@2->print2::@1#1] -- register_copy 
    jmp b1
}
  // File Data

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 breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction ldx #0 with TAX
Replacing instruction lda.z j with TYA
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_main:
Removing instruction print2_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction print2_from_main:
Removing instruction b1:
Removing instruction breturn:
Removing instruction b1_from_print2:
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 bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(void()) main()
(label) main::@1
(label) main::@return
(byte*) main::hello
(const byte*) main::hello#0 hello = (string) "hello world!"
(void()) print2((byte*) print2::at , (byte*) print2::msg)
(label) print2::@1
(label) print2::@2
(label) print2::@return
(byte*) print2::at
(byte*) print2::at#4 at zp ZP_WORD:2 1.8333333333333333
(byte) print2::i
(byte) print2::i#1 reg byte x 22.0
(byte) print2::i#2 reg byte x 11.0
(byte) print2::j
(byte) print2::j#1 j zp ZP_BYTE:4 11.0
(byte) print2::j#2 j zp ZP_BYTE:4 11.0
(byte*) print2::msg
(byte*) screen
(const byte*) screen#0 screen = (byte*) 1024

zp ZP_WORD:2 [ print2::at#4 ]
reg byte x [ print2::i#2 print2::i#1 ]
zp ZP_BYTE:4 [ print2::j#2 print2::j#1 ]


FINAL ASSEMBLER
Score: 519

  // File Comments
  // 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: {
    // print2(screen, hello)
    // [5] call print2 
    // [9] phi from main to print2 [phi:main->print2]
    // [9] phi (byte*) print2::at#4 = (const byte*) screen#0 [phi:main->print2#0] -- pbuz1=pbuc1 
    lda #<screen
    sta.z print2.at
    lda #>screen
    sta.z print2.at+1
    jsr print2
    // [6] phi from main to main::@1 [phi:main->main::@1]
    // main::@1
    // print2(screen+80, hello)
    // [7] call print2 
    // [9] phi from main::@1 to print2 [phi:main::@1->print2]
    // [9] phi (byte*) print2::at#4 = (const byte*) screen#0+(byte) $50 [phi:main::@1->print2#0] -- pbuz1=pbuc1 
    lda #<screen+$50
    sta.z print2.at
    lda #>screen+$50
    sta.z print2.at+1
    jsr print2
    // main::@return
    // }
    // [8] return 
    rts
    hello: .text "hello world!"
    .byte 0
}
  // print2
// print2(byte* zeropage(2) at)
print2: {
    .label j = 4
    .label at = 2
    // [10] phi from print2 to print2::@1 [phi:print2->print2::@1]
    // [10] phi (byte) print2::j#2 = (byte) 0 [phi:print2->print2::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z j
    // [10] phi (byte) print2::i#2 = (byte) 0 [phi:print2->print2::@1#1] -- vbuxx=vbuc1 
    tax
    // print2::@1
  b1:
    // for(byte i=0; msg[i]; i++)
    // [11] if((byte) 0!=*((const byte*) main::hello#0 + (byte) print2::i#2)) goto print2::@2 -- vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1 
    txa
    tay
    lda #0
    cmp main.hello,y
    bne b2
    // print2::@return
    // }
    // [12] return 
    rts
    // print2::@2
  b2:
    // at[j] = msg[i]
    // [13] *((byte*) print2::at#4 + (byte) print2::j#2) ← *((const byte*) main::hello#0 + (byte) print2::i#2) -- pbuz1_derefidx_vbuz2=pbuc1_derefidx_vbuxx 
    lda main.hello,x
    ldy.z j
    sta (at),y
    // j += 2
    // [14] (byte) print2::j#1 ← (byte) print2::j#2 + (byte) 2 -- vbuz1=vbuz1_plus_2 
    tya
    clc
    adc #2
    sta.z j
    // for(byte i=0; msg[i]; i++)
    // [15] (byte) print2::i#1 ← ++ (byte) print2::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [10] phi from print2::@2 to print2::@1 [phi:print2::@2->print2::@1]
    // [10] phi (byte) print2::j#2 = (byte) print2::j#1 [phi:print2::@2->print2::@1#0] -- register_copy 
    // [10] phi (byte) print2::i#2 = (byte) print2::i#1 [phi:print2::@2->print2::@1#1] -- register_copy 
    jmp b1
}
  // File Data

