Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Identified constant variable (byte*) SCREEN
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) memset::@5
Culled Empty Block (label) memset::@3
Culled Empty Block (label) @3
Culled Empty Block (label) main::@4

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@4
memset: scope:[memset]  from main
  (byte) memset::c#3 ← phi( main/(byte) memset::c#0 )
  (void*) memset::str#3 ← phi( main/(void*) memset::str#0 )
  (word) memset::num#1 ← phi( main/(word) memset::num#0 )
  (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
  (bool~) memset::$1 ← ! (bool~) memset::$0
  if((bool~) memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@4
  (void*) memset::str#1 ← phi( memset/(void*) memset::str#3 memset::@4/(void*) memset::str#4 )
  (void*) memset::return#0 ← (void*) memset::str#1
  to:memset::@return
memset::@2: scope:[memset]  from memset
  (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 )
  (word) memset::num#2 ← phi( memset/(word) memset::num#1 )
  (void*) memset::str#2 ← phi( memset/(void*) memset::str#3 )
  (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#2
  (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#2
  (byte*) memset::end#0 ← (byte*~) memset::$3
  (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2
  to:memset::@4
memset::@4: scope:[memset]  from memset::@2 memset::@4
  (void*) memset::str#4 ← phi( memset::@2/(void*) memset::str#2 memset::@4/(void*) memset::str#4 )
  (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@4/(byte*) memset::end#1 )
  (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@4/(byte*) memset::dst#1 )
  (byte) memset::c#1 ← phi( memset::@2/(byte) memset::c#2 memset::@4/(byte) memset::c#1 )
  *((byte*) memset::dst#2) ← (byte) memset::c#1
  (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  (bool~) memset::$4 ← (byte*) memset::dst#1 != (byte*) memset::end#1
  if((bool~) memset::$4) goto memset::@4
  to:memset::@1
memset::@return: scope:[memset]  from memset::@1
  (void*) memset::return#3 ← phi( memset::@1/(void*) memset::return#0 )
  (void*) memset::return#1 ← (void*) memset::return#3
  return 
  to:@return
@4: scope:[]  from @begin
  (byte*) SCREEN#0 ← ((byte*)) (number) $400
  to:@5
main: scope:[main]  from @5
  (void*) memset::str#0 ← (void*)(byte*) SCREEN#0
  (byte) memset::c#0 ← (byte) ' '
  (word) memset::num#0 ← (number) $3e8
  call memset 
  (void*) memset::return#2 ← (void*) memset::return#1
  to:main::@5
main::@5: scope:[main]  from main
  (byte*~) main::$1 ← (byte*) SCREEN#0 + (number) $28
  (byte*~) main::$2 ← (byte*~) main::$1 + (number) 1
  (byte*) main::screen#0 ← (byte*~) main::$2
  (byte) main::ch#0 ← (number) 0
  (byte) main::x#0 ← (byte) 0
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@5
  (byte) main::x#4 ← phi( main::@3/(byte) main::x#1 main::@5/(byte) main::x#0 )
  (byte*) main::screen#5 ← phi( main::@3/(byte*) main::screen#2 main::@5/(byte*) main::screen#0 )
  (byte) main::ch#3 ← phi( main::@3/(byte) main::ch#4 main::@5/(byte) main::ch#0 )
  (byte) main::y#0 ← (byte) 0
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@2
  (byte) main::x#3 ← phi( main::@1/(byte) main::x#4 main::@2/(byte) main::x#3 )
  (byte) main::y#2 ← phi( main::@1/(byte) main::y#0 main::@2/(byte) main::y#1 )
  (byte*) main::screen#3 ← phi( main::@1/(byte*) main::screen#5 main::@2/(byte*) main::screen#1 )
  (byte) main::ch#2 ← phi( main::@1/(byte) main::ch#3 main::@2/(byte) main::ch#1 )
  *((byte*) main::screen#3) ← (byte) main::ch#2
  (byte*) main::screen#1 ← ++ (byte*) main::screen#3
  (byte) main::ch#1 ← ++ (byte) main::ch#2
  (byte) main::y#1 ← (byte) main::y#2 + rangenext(0,$f)
  (bool~) main::$3 ← (byte) main::y#1 != rangelast(0,$f)
  if((bool~) main::$3) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2
  (byte) main::ch#4 ← phi( main::@2/(byte) main::ch#1 )
  (byte) main::x#2 ← phi( main::@2/(byte) main::x#3 )
  (byte*) main::screen#4 ← phi( main::@2/(byte*) main::screen#1 )
  (byte*) main::screen#2 ← (byte*) main::screen#4 + (number) $28-(number) $10
  (byte) main::x#1 ← (byte) main::x#2 + rangenext(0,$f)
  (bool~) main::$4 ← (byte) main::x#1 != rangelast(0,$f)
  if((bool~) main::$4) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@3
  return 
  to:@return
@5: scope:[]  from @4
  call main 
  to:@6
@6: scope:[]  from @5
  to:@end
@end: scope:[]  from @6

SYMBOL TABLE SSA
(label) @4
(label) @5
(label) @6
(label) @begin
(label) @end
(byte*) SCREEN
(byte*) SCREEN#0
(void()) main()
(byte*~) main::$1
(byte*~) main::$2
(bool~) main::$3
(bool~) main::$4
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@return
(byte) main::ch
(byte) main::ch#0
(byte) main::ch#1
(byte) main::ch#2
(byte) main::ch#3
(byte) main::ch#4
(byte*) main::screen
(byte*) main::screen#0
(byte*) main::screen#1
(byte*) main::screen#2
(byte*) main::screen#3
(byte*) main::screen#4
(byte*) main::screen#5
(byte) main::x
(byte) main::x#0
(byte) main::x#1
(byte) main::x#2
(byte) main::x#3
(byte) main::x#4
(byte) main::y
(byte) main::y#0
(byte) main::y#1
(byte) main::y#2
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(bool~) memset::$0
(bool~) memset::$1
(byte*~) memset::$2
(byte*~) memset::$3
(bool~) memset::$4
(label) memset::@1
(label) memset::@2
(label) memset::@4
(label) memset::@return
(byte) memset::c
(byte) memset::c#0
(byte) memset::c#1
(byte) memset::c#2
(byte) memset::c#3
(byte*) memset::dst
(byte*) memset::dst#0
(byte*) memset::dst#1
(byte*) memset::dst#2
(byte*) memset::end
(byte*) memset::end#0
(byte*) memset::end#1
(word) memset::num
(word) memset::num#0
(word) memset::num#1
(word) memset::num#2
(void*) memset::return
(void*) memset::return#0
(void*) memset::return#1
(void*) memset::return#2
(void*) memset::return#3
(void*) memset::str
(void*) memset::str#0
(void*) memset::str#1
(void*) memset::str#2
(void*) memset::str#3
(void*) memset::str#4

Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8
Adding number conversion cast (unumber) $28 in (byte*~) main::$1 ← (byte*) SCREEN#0 + (number) $28
Adding number conversion cast (unumber) 1 in (byte*~) main::$2 ← (byte*~) main::$1 + (number) 1
Adding number conversion cast (unumber) 0 in (byte) main::ch#0 ← (number) 0
Adding number conversion cast (unumber) $28-$10 in (byte*) main::screen#2 ← (byte*) main::screen#4 + (number) $28-(number) $10
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400
Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (byte) main::ch#0 ← (unumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $3e8
Simplifying constant integer cast $28
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1 
Alias (void*) memset::str#2 = (void*) memset::str#3 
Alias (word) memset::num#1 = (word) memset::num#2 
Alias (byte) memset::c#2 = (byte) memset::c#3 
Alias (byte*) memset::end#0 = (byte*~) memset::$3 
Alias (byte*) main::screen#0 = (byte*~) main::$2 
Alias (byte*) main::screen#1 = (byte*) main::screen#4 
Alias (byte) main::x#2 = (byte) main::x#3 
Alias (byte) main::ch#1 = (byte) main::ch#4 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte) memset::c#1
Self Phi Eliminated (byte*) memset::end#1
Self Phi Eliminated (void*) memset::str#4
Self Phi Eliminated (byte) main::x#2
Successful SSA optimization Pass2SelfPhiElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#2 (byte) memset::c#0
Identical Phi Values (byte) memset::c#1 (byte) memset::c#2
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#4 (void*) memset::str#2
Identical Phi Values (byte) main::x#2 (byte) main::x#4
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [15] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@4
Simple Condition (bool~) main::$3 [38] if((byte) main::y#1!=rangelast(0,$f)) goto main::@2
Simple Condition (bool~) main::$4 [43] if((byte) main::x#1!=rangelast(0,$f)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) SCREEN#0 = (byte*) 1024
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const byte) main::ch#0 = 0
Constant (const byte) main::x#0 = 0
Constant (const byte) main::y#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (void*)SCREEN#0 in [20] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0
Successful SSA optimization Pass2ConstantValues
if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [36] main::y#1 ← ++ main::y#2 to ++
Resolved ranged comparison value [38] if(main::y#1!=rangelast(0,$f)) goto main::@2 to (number) $10
Resolved ranged next value [41] main::x#1 ← ++ main::x#4 to ++
Resolved ranged comparison value [43] if(main::x#1!=rangelast(0,$f)) goto main::@1 to (number) $10
Eliminating unused variable (void*) memset::return#2 and assignment [10] (void*) memset::return#2 ← (void*) memset::str#0
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) $10 in if((byte) main::y#1!=(number) $10) goto main::@2
Adding number conversion cast (unumber) $10 in if((byte) main::x#1!=(number) $10) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [10] (byte*~) main::$1 ← (const byte*) SCREEN#0 + (byte) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const void*) memset::str#0 = (void*)SCREEN#0
Constant (const byte*) main::$1 = SCREEN#0+$28
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memset::str#0 in [0] (byte*~) memset::$2 ← (byte*)(const void*) memset::str#0
Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ← (byte*)(const void*) memset::str#0
Successful SSA optimization Pass2ConstantValues
Constant right-side identified [9] (byte*) main::screen#0 ← (const byte*) main::$1 + (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) memset::$2 = (byte*)memset::str#0
Constant (const byte*) memset::dst#0 = (byte*)memset::str#0
Constant (const byte*) main::screen#0 = main::$1+1
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) memset::end#0 = memset::$2+memset::num#0
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings (const byte*) memset::dst#0
Inlining constant with var siblings (const byte) main::ch#0
Inlining constant with var siblings (const byte) main::x#0
Inlining constant with var siblings (const byte) main::y#0
Inlining constant with var siblings (const byte*) main::screen#0
Constant inlined main::screen#0 = (const byte*) SCREEN#0+(byte) $28+(byte) 1
Constant inlined memset::$2 = (byte*)(const void*) memset::str#0
Constant inlined main::$1 = (const byte*) SCREEN#0+(byte) $28
Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0
Constant inlined main::x#0 = (byte) 0
Constant inlined main::y#0 = (byte) 0
Constant inlined main::ch#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting memset::@6(between memset::@4 and memset::@4)
Added new block during phi lifting main::@6(between main::@3 and main::@1)
Added new block during phi lifting main::@7(between main::@2 and main::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @4
Adding NOP phi() at start of @5
Adding NOP phi() at start of @6
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@1
CALL GRAPH
Calls in [] to main:3 
Calls in [main] to memset:7 

Created 7 initial phi equivalence classes
Coalesced [10] main::ch#6 ← main::ch#3
Coalesced [11] main::screen#7 ← main::screen#5
Coalesced [22] main::ch#5 ← main::ch#1
Coalesced [23] main::screen#6 ← main::screen#2
Coalesced [24] main::x#5 ← main::x#1
Coalesced (already) [25] main::ch#7 ← main::ch#1
Coalesced [26] main::screen#8 ← main::screen#1
Coalesced [27] main::y#3 ← main::y#1
Coalesced [36] memset::dst#3 ← memset::dst#1
Coalesced down to 5 phi equivalence classes
Culled Empty Block (label) @4
Culled Empty Block (label) @6
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@7
Culled Empty Block (label) memset::@2
Culled Empty Block (label) memset::@1
Culled Empty Block (label) memset::@6
Renumbering block @5 to @1
Renumbering block memset::@4 to memset::@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 memset

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 memset 
  to:main::@1
main::@1: scope:[main]  from main main::@3
  [6] (byte) main::x#4 ← phi( main::@3/(byte) main::x#1 main/(byte) 0 )
  [6] (byte*) main::screen#5 ← phi( main::@3/(byte*) main::screen#2 main/(const byte*) SCREEN#0+(byte) $28+(byte) 1 )
  [6] (byte) main::ch#3 ← phi( main::@3/(byte) main::ch#1 main/(byte) 0 )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@2
  [7] (byte) main::y#2 ← phi( main::@1/(byte) 0 main::@2/(byte) main::y#1 )
  [7] (byte*) main::screen#3 ← phi( main::@1/(byte*) main::screen#5 main::@2/(byte*) main::screen#1 )
  [7] (byte) main::ch#2 ← phi( main::@1/(byte) main::ch#3 main::@2/(byte) main::ch#1 )
  [8] *((byte*) main::screen#3) ← (byte) main::ch#2
  [9] (byte*) main::screen#1 ← ++ (byte*) main::screen#3
  [10] (byte) main::ch#1 ← ++ (byte) main::ch#2
  [11] (byte) main::y#1 ← ++ (byte) main::y#2
  [12] if((byte) main::y#1!=(byte) $10) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2
  [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10
  [14] (byte) main::x#1 ← ++ (byte) main::x#4
  [15] if((byte) main::x#1!=(byte) $10) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@3
  [16] return 
  to:@return
memset: scope:[memset]  from main
  [17] phi()
  to:memset::@1
memset::@1: scope:[memset]  from memset memset::@1
  [18] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@1/(byte*) memset::dst#1 )
  [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0
  [20] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1
  to:memset::@return
memset::@return: scope:[memset]  from memset::@1
  [22] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) SCREEN
(void()) main()
(byte) main::ch
(byte) main::ch#1 35.5
(byte) main::ch#2 104.66666666666666
(byte) main::ch#3 22.0
(byte*) main::screen
(byte*) main::screen#1 53.25
(byte*) main::screen#2 7.333333333333333
(byte*) main::screen#3 157.0
(byte*) main::screen#5 22.0
(byte) main::x
(byte) main::x#1 16.5
(byte) main::x#4 2.75
(byte) main::y
(byte) main::y#1 151.5
(byte) main::y#2 50.5
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte*) memset::dst
(byte*) memset::dst#1 16.5
(byte*) memset::dst#2 16.5
(byte*) memset::end
(word) memset::num
(void*) memset::return
(void*) memset::str

Initial phi equivalence classes
[ main::x#4 main::x#1 ]
[ main::ch#2 main::ch#3 main::ch#1 ]
[ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ]
[ main::y#2 main::y#1 ]
[ memset::dst#2 memset::dst#1 ]
Complete equivalence classes
[ main::x#4 main::x#1 ]
[ main::ch#2 main::ch#3 main::ch#1 ]
[ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ]
[ main::y#2 main::y#1 ]
[ memset::dst#2 memset::dst#1 ]
Allocated zp ZP_BYTE:2 [ main::x#4 main::x#1 ]
Allocated zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ]
Allocated zp ZP_WORD:4 [ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ]
Allocated zp ZP_BYTE:6 [ main::y#2 main::y#1 ]
Allocated zp ZP_WORD:7 [ memset::dst#2 memset::dst#1 ]

INITIAL ASM
  // File Comments
// Show default font on screen
  // Basic 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: {
    .label screen = 4
    .label ch = 3
    .label y = 6
    .label x = 2
    // [5] call memset 
    // [17] phi from main to memset [phi:main->memset]
  memset_from_main:
    jsr memset
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [6] phi (byte) main::x#4 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta x
    // [6] phi (byte*) main::screen#5 = (const byte*) SCREEN#0+(byte) $28+(byte) 1 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<SCREEN+$28+1
    sta screen
    lda #>SCREEN+$28+1
    sta screen+1
    // [6] phi (byte) main::ch#3 = (byte) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta ch
    jmp b1
    // [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  b1_from_b3:
    // [6] phi (byte) main::x#4 = (byte) main::x#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [6] phi (byte*) main::screen#5 = (byte*) main::screen#2 [phi:main::@3->main::@1#1] -- register_copy 
    // [6] phi (byte) main::ch#3 = (byte) main::ch#1 [phi:main::@3->main::@1#2] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    // [7] phi (byte) main::y#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta y
    // [7] phi (byte*) main::screen#3 = (byte*) main::screen#5 [phi:main::@1->main::@2#1] -- register_copy 
    // [7] phi (byte) main::ch#2 = (byte) main::ch#3 [phi:main::@1->main::@2#2] -- register_copy 
    jmp b2
    // [7] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  b2_from_b2:
    // [7] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@2->main::@2#0] -- register_copy 
    // [7] phi (byte*) main::screen#3 = (byte*) main::screen#1 [phi:main::@2->main::@2#1] -- register_copy 
    // [7] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@2->main::@2#2] -- register_copy 
    jmp b2
    // main::@2
  b2:
    // [8] *((byte*) main::screen#3) ← (byte) main::ch#2 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (screen),y
    // [9] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
    // [10] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
    // [11] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuz1=_inc_vbuz1 
    inc y
    // [12] if((byte) main::y#1!=(byte) $10) goto main::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp y
    bne b2_from_b2
    jmp b3
    // main::@3
  b3:
    // [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28-$10
    clc
    adc screen
    sta screen
    bcc !+
    inc screen+1
  !:
    // [14] (byte) main::x#1 ← ++ (byte) main::x#4 -- vbuz1=_inc_vbuz1 
    inc x
    // [15] if((byte) main::x#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp x
    bne b1_from_b3
    jmp breturn
    // main::@return
  breturn:
    // [16] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = SCREEN
    .label end = str+num
    .label dst = 7
    // [18] phi from memset to memset::@1 [phi:memset->memset::@1]
  b1_from_memset:
    // [18] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta dst
    lda #>str
    sta dst+1
    jmp b1
    // [18] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1]
  b1_from_b1:
    // [18] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy 
    jmp b1
    // memset::@1
  b1:
    // [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [20] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda dst+1
    cmp #>end
    bne b1_from_b1
    lda dst
    cmp #<end
    bne b1_from_b1
    jmp breturn
    // memset::@return
  breturn:
    // [22] return 
    rts
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [8] *((byte*) main::screen#3) ← (byte) main::ch#2 [ main::x#4 main::ch#2 main::screen#3 main::y#2 ] ( main:2 [ main::x#4 main::ch#2 main::screen#3 main::y#2 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::x#4 main::x#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ main::y#2 main::y#1 ]
Statement [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10 [ main::x#4 main::ch#1 main::screen#2 ] ( main:2 [ main::x#4 main::ch#1 main::screen#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::x#4 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ]
Statement [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::memset:5 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:2::memset:5 [ memset::dst#1 ] ) always clobbers reg byte a 
Statement [8] *((byte*) main::screen#3) ← (byte) main::ch#2 [ main::x#4 main::ch#2 main::screen#3 main::y#2 ] ( main:2 [ main::x#4 main::ch#2 main::screen#3 main::y#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ main::y#2 main::y#1 ]
Statement [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10 [ main::x#4 main::ch#1 main::screen#2 ] ( main:2 [ main::x#4 main::ch#1 main::screen#2 ] ) always clobbers reg byte a 
Statement [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::memset:5 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:2::memset:5 [ memset::dst#1 ] ) always clobbers reg byte a 
Statement [8] *((byte*) main::screen#3) ← (byte) main::ch#2 [ main::x#4 main::ch#2 main::screen#3 main::y#2 ] ( main:2 [ main::x#4 main::ch#2 main::screen#3 main::y#2 ] ) always clobbers reg byte a reg byte y 
Statement [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10 [ main::x#4 main::ch#1 main::screen#2 ] ( main:2 [ main::x#4 main::ch#1 main::screen#2 ] ) always clobbers reg byte a 
Statement [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::memset:5 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
Statement [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:2::memset:5 [ memset::dst#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::x#4 main::x#1 ] : zp ZP_BYTE:2 , reg byte x , 
Potential registers zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ] : zp ZP_BYTE:3 , reg byte x , 
Potential registers zp ZP_WORD:4 [ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE:6 [ main::y#2 main::y#1 ] : zp ZP_BYTE:6 , reg byte x , 
Potential registers zp ZP_WORD:7 [ memset::dst#2 memset::dst#1 ] : zp ZP_WORD:7 , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 239.58: zp ZP_WORD:4 [ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ] 202: zp ZP_BYTE:6 [ main::y#2 main::y#1 ] 162.17: zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ] 19.25: zp ZP_BYTE:2 [ main::x#4 main::x#1 ] 
Uplift Scope [memset] 33: zp ZP_WORD:7 [ memset::dst#2 memset::dst#1 ] 
Uplift Scope [] 

Uplifting [main] best 5785 combination zp ZP_WORD:4 [ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ] reg byte x [ main::y#2 main::y#1 ] zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ] zp ZP_BYTE:2 [ main::x#4 main::x#1 ] 
Uplifting [memset] best 5785 combination zp ZP_WORD:7 [ memset::dst#2 memset::dst#1 ] 
Uplifting [] best 5785 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ]
Uplifting [main] best 5785 combination zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::x#4 main::x#1 ]
Uplifting [main] best 5785 combination zp ZP_BYTE:2 [ main::x#4 main::x#1 ] 
Allocated (was zp ZP_WORD:7) zp ZP_WORD:6 [ memset::dst#2 memset::dst#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Show default font on screen
  // Basic 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: {
    .label screen = 4
    .label ch = 3
    .label x = 2
    // [5] call memset 
    // [17] phi from main to memset [phi:main->memset]
  memset_from_main:
    jsr memset
    // [6] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [6] phi (byte) main::x#4 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta x
    // [6] phi (byte*) main::screen#5 = (const byte*) SCREEN#0+(byte) $28+(byte) 1 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<SCREEN+$28+1
    sta screen
    lda #>SCREEN+$28+1
    sta screen+1
    // [6] phi (byte) main::ch#3 = (byte) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta ch
    jmp b1
    // [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  b1_from_b3:
    // [6] phi (byte) main::x#4 = (byte) main::x#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [6] phi (byte*) main::screen#5 = (byte*) main::screen#2 [phi:main::@3->main::@1#1] -- register_copy 
    // [6] phi (byte) main::ch#3 = (byte) main::ch#1 [phi:main::@3->main::@1#2] -- register_copy 
    jmp b1
    // main::@1
  b1:
    // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    // [7] phi (byte) main::y#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuxx=vbuc1 
    ldx #0
    // [7] phi (byte*) main::screen#3 = (byte*) main::screen#5 [phi:main::@1->main::@2#1] -- register_copy 
    // [7] phi (byte) main::ch#2 = (byte) main::ch#3 [phi:main::@1->main::@2#2] -- register_copy 
    jmp b2
    // [7] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
  b2_from_b2:
    // [7] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@2->main::@2#0] -- register_copy 
    // [7] phi (byte*) main::screen#3 = (byte*) main::screen#1 [phi:main::@2->main::@2#1] -- register_copy 
    // [7] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@2->main::@2#2] -- register_copy 
    jmp b2
    // main::@2
  b2:
    // [8] *((byte*) main::screen#3) ← (byte) main::ch#2 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (screen),y
    // [9] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
    // [10] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
    // [11] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [12] if((byte) main::y#1!=(byte) $10) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$10
    bne b2_from_b2
    jmp b3
    // main::@3
  b3:
    // [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28-$10
    clc
    adc screen
    sta screen
    bcc !+
    inc screen+1
  !:
    // [14] (byte) main::x#1 ← ++ (byte) main::x#4 -- vbuz1=_inc_vbuz1 
    inc x
    // [15] if((byte) main::x#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp x
    bne b1_from_b3
    jmp breturn
    // main::@return
  breturn:
    // [16] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = SCREEN
    .label end = str+num
    .label dst = 6
    // [18] phi from memset to memset::@1 [phi:memset->memset::@1]
  b1_from_memset:
    // [18] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta dst
    lda #>str
    sta dst+1
    jmp b1
    // [18] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1]
  b1_from_b1:
    // [18] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy 
    jmp b1
    // memset::@1
  b1:
    // [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [20] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda dst+1
    cmp #>end
    bne b1_from_b1
    lda dst
    cmp #<end
    bne b1_from_b1
    jmp breturn
    // memset::@return
  breturn:
    // [22] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction memset_from_main:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b1_from_memset:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(byte) main::ch
(byte) main::ch#1 ch zp ZP_BYTE:3 35.5
(byte) main::ch#2 ch zp ZP_BYTE:3 104.66666666666666
(byte) main::ch#3 ch zp ZP_BYTE:3 22.0
(byte*) main::screen
(byte*) main::screen#1 screen zp ZP_WORD:4 53.25
(byte*) main::screen#2 screen zp ZP_WORD:4 7.333333333333333
(byte*) main::screen#3 screen zp ZP_WORD:4 157.0
(byte*) main::screen#5 screen zp ZP_WORD:4 22.0
(byte) main::x
(byte) main::x#1 x zp ZP_BYTE:2 16.5
(byte) main::x#4 x zp ZP_BYTE:2 2.75
(byte) main::y
(byte) main::y#1 reg byte x 151.5
(byte) main::y#2 reg byte x 50.5
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@return
(byte) memset::c
(const byte) memset::c#0 c = (byte) ' '
(byte*) memset::dst
(byte*) memset::dst#1 dst zp ZP_WORD:6 16.5
(byte*) memset::dst#2 dst zp ZP_WORD:6 16.5
(byte*) memset::end
(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0
(word) memset::num
(const word) memset::num#0 num = (word) $3e8
(void*) memset::return
(void*) memset::str
(const void*) memset::str#0 str = (void*)(const byte*) SCREEN#0

zp ZP_BYTE:2 [ main::x#4 main::x#1 ]
zp ZP_BYTE:3 [ main::ch#2 main::ch#3 main::ch#1 ]
zp ZP_WORD:4 [ main::screen#3 main::screen#5 main::screen#2 main::screen#1 ]
reg byte x [ main::y#2 main::y#1 ]
zp ZP_WORD:6 [ memset::dst#2 memset::dst#1 ]


FINAL ASSEMBLER
Score: 4693

  // File Comments
// Show default font on screen
  // Basic 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: {
    .label screen = 4
    .label ch = 3
    .label x = 2
    // memset(SCREEN, ' ', 1000)
    // [5] call memset 
    // [17] phi from main to memset [phi:main->memset]
    jsr memset
    // [6] phi from main to main::@1 [phi:main->main::@1]
    // [6] phi (byte) main::x#4 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta x
    // [6] phi (byte*) main::screen#5 = (const byte*) SCREEN#0+(byte) $28+(byte) 1 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<SCREEN+$28+1
    sta screen
    lda #>SCREEN+$28+1
    sta screen+1
    // [6] phi (byte) main::ch#3 = (byte) 0 [phi:main->main::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta ch
    // [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [6] phi (byte) main::x#4 = (byte) main::x#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [6] phi (byte*) main::screen#5 = (byte*) main::screen#2 [phi:main::@3->main::@1#1] -- register_copy 
    // [6] phi (byte) main::ch#3 = (byte) main::ch#1 [phi:main::@3->main::@1#2] -- register_copy 
    // main::@1
  b1:
    // [7] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // [7] phi (byte) main::y#2 = (byte) 0 [phi:main::@1->main::@2#0] -- vbuxx=vbuc1 
    ldx #0
    // [7] phi (byte*) main::screen#3 = (byte*) main::screen#5 [phi:main::@1->main::@2#1] -- register_copy 
    // [7] phi (byte) main::ch#2 = (byte) main::ch#3 [phi:main::@1->main::@2#2] -- register_copy 
    // [7] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
    // [7] phi (byte) main::y#2 = (byte) main::y#1 [phi:main::@2->main::@2#0] -- register_copy 
    // [7] phi (byte*) main::screen#3 = (byte*) main::screen#1 [phi:main::@2->main::@2#1] -- register_copy 
    // [7] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@2->main::@2#2] -- register_copy 
    // main::@2
  b2:
    // *screen++ = ch++
    // [8] *((byte*) main::screen#3) ← (byte) main::ch#2 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (screen),y
    // *screen++ = ch++;
    // [9] (byte*) main::screen#1 ← ++ (byte*) main::screen#3 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
    // [10] (byte) main::ch#1 ← ++ (byte) main::ch#2 -- vbuz1=_inc_vbuz1 
    inc ch
    // for( byte y: 0..15)
    // [11] (byte) main::y#1 ← ++ (byte) main::y#2 -- vbuxx=_inc_vbuxx 
    inx
    // [12] if((byte) main::y#1!=(byte) $10) goto main::@2 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$10
    bne b2
    // main::@3
    // screen += (40-16)
    // [13] (byte*) main::screen#2 ← (byte*) main::screen#1 + (byte)(number) $28-(number) $10 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28-$10
    clc
    adc screen
    sta screen
    bcc !+
    inc screen+1
  !:
    // for( byte x: 0..15)
    // [14] (byte) main::x#1 ← ++ (byte) main::x#4 -- vbuz1=_inc_vbuz1 
    inc x
    // [15] if((byte) main::x#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp x
    bne b1
    // main::@return
    // }
    // [16] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = SCREEN
    .label end = str+num
    .label dst = 6
    // [18] phi from memset to memset::@1 [phi:memset->memset::@1]
    // [18] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta dst
    lda #>str
    sta dst+1
    // [18] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1]
    // [18] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy 
    // memset::@1
  b1:
    // *dst = c
    // [19] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [20] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc dst
    bne !+
    inc dst+1
  !:
    // [21] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda dst+1
    cmp #>end
    bne b1
    lda dst
    cmp #<end
    bne b1
    // memset::@return
    // }
    // [22] return 
    rts
}
  // File Data

