Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_at::str)
Warning! Adding boolean cast to non-boolean sub-expression (byte) print_str_lines::ch
Identified constant variable (byte*) HEAP_TOP
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) @11
Culled Empty Block (label) @13
Culled Empty Block (label) @14
Culled Empty Block (label) print_str::@4
Culled Empty Block (label) print_str::@3
Culled Empty Block (label) print_str::@5
Culled Empty Block (label) print_str::@6
Culled Empty Block (label) @15
Culled Empty Block (label) @16
Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) @19
Culled Empty Block (label) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) @23
Culled Empty Block (label) @24
Culled Empty Block (label) @25
Culled Empty Block (label) @26
Culled Empty Block (label) @27
Culled Empty Block (label) @28
Culled Empty Block (label) @29
Culled Empty Block (label) @30
Culled Empty Block (label) @31
Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
Culled Empty Block (label) main::@4
Culled Empty Block (label) @37
Culled Empty Block (label) game_ready::@3

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@12
@12: scope:[]  from @begin
  (byte*) print_screen#0 ← ((byte*)) (number) $400
  (byte*) print_line_cursor#0 ← (byte*) print_screen#0
  (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
  to:@36
print_str_ln: scope:[print_str_ln]  from game_ready::@1 main::@3
  (byte*) print_line_cursor#29 ← phi( game_ready::@1/(byte*) print_line_cursor#27 main::@3/(byte*) print_line_cursor#25 )
  (byte*) print_char_cursor#27 ← phi( game_ready::@1/(byte*) print_char_cursor#33 main::@3/(byte*) print_char_cursor#31 )
  (byte*) print_str_ln::str#2 ← phi( game_ready::@1/(byte*) print_str_ln::str#1 main::@3/(byte*) print_str_ln::str#0 )
  (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2
  call print_str 
  to:print_str_ln::@1
print_str_ln::@1: scope:[print_str_ln]  from print_str_ln
  (byte*) print_line_cursor#22 ← phi( print_str_ln/(byte*) print_line_cursor#29 )
  (byte*) print_char_cursor#14 ← phi( print_str_ln/(byte*) print_char_cursor#5 )
  (byte*) print_char_cursor#1 ← (byte*) print_char_cursor#14
  call print_ln 
  to:print_str_ln::@2
print_str_ln::@2: scope:[print_str_ln]  from print_str_ln::@1
  (byte*) print_char_cursor#15 ← phi( print_str_ln::@1/(byte*) print_char_cursor#7 )
  (byte*) print_line_cursor#11 ← phi( print_str_ln::@1/(byte*) print_line_cursor#4 )
  (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#15
  to:print_str_ln::@return
print_str_ln::@return: scope:[print_str_ln]  from print_str_ln::@2
  (byte*) print_line_cursor#12 ← phi( print_str_ln::@2/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#16 ← phi( print_str_ln::@2/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#16
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#12
  return 
  to:@return
print_str: scope:[print_str]  from print_str_ln
  (byte*) print_char_cursor#35 ← phi( print_str_ln/(byte*) print_char_cursor#27 )
  (byte*) print_str::str#4 ← phi( print_str_ln/(byte*) print_str::str#0 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  (byte*) print_char_cursor#28 ← phi( print_str/(byte*) print_char_cursor#35 print_str::@2/(byte*) print_char_cursor#4 )
  (byte*) print_str::str#2 ← phi( print_str/(byte*) print_str::str#4 print_str::@2/(byte*) print_str::str#1 )
  (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#2)
  if((bool~) print_str::$0) goto print_str::@2
  to:print_str::@return
print_str::@2: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#17 ← phi( print_str::@1/(byte*) print_char_cursor#28 )
  (byte*) print_str::str#3 ← phi( print_str::@1/(byte*) print_str::str#2 )
  *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#3)
  (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17
  (byte*) print_str::str#1 ← ++ (byte*) print_str::str#3
  to:print_str::@1
print_str::@return: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#18 ← phi( print_str::@1/(byte*) print_char_cursor#28 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#18
  return 
  to:@return
print_ln: scope:[print_ln]  from print_str_ln::@1
  (byte*) print_char_cursor#29 ← phi( print_str_ln::@1/(byte*) print_char_cursor#1 )
  (byte*) print_line_cursor#23 ← phi( print_str_ln::@1/(byte*) print_line_cursor#22 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#19 ← phi( print_ln/(byte*) print_char_cursor#29 print_ln::@1/(byte*) print_char_cursor#19 )
  (byte*) print_line_cursor#13 ← phi( print_ln/(byte*) print_line_cursor#23 print_ln::@1/(byte*) print_line_cursor#3 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#13 + (number) $28
  (byte*) print_line_cursor#3 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#3 < (byte*) print_char_cursor#19
  if((bool~) print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  (byte*) print_line_cursor#14 ← phi( print_ln::@1/(byte*) print_line_cursor#3 )
  (byte*) print_char_cursor#6 ← (byte*) print_line_cursor#14
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#20 ← phi( print_ln::@2/(byte*) print_char_cursor#6 )
  (byte*) print_line_cursor#15 ← phi( print_ln::@2/(byte*) print_line_cursor#14 )
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#15
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#20
  return 
  to:@return
@36: scope:[]  from @12
  (byte*) print_line_cursor#33 ← phi( @12/(byte*) print_line_cursor#0 )
  (byte*) print_char_cursor#39 ← phi( @12/(byte*) print_char_cursor#0 )
  (byte) action_count#0 ← (number) 0
  (byte) READY_FRAMES#0 ← (number) 5
  to:@38
main: scope:[main]  from @38
  (byte) action_count#17 ← phi( @38/(byte) action_count#16 )
  (byte*) print_line_cursor#30 ← phi( @38/(byte*) print_line_cursor#28 )
  (byte*) print_char_cursor#36 ← phi( @38/(byte*) print_char_cursor#34 )
  (byte) main::i#0 ← (byte) 0
  to:main::@1
main::@1: scope:[main]  from main main::@2
  (byte) main::i#5 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
  (byte) action_count#13 ← phi( main/(byte) action_count#17 main::@2/(byte) action_count#14 )
  (byte*) print_line_cursor#24 ← phi( main/(byte*) print_line_cursor#30 main::@2/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#30 ← phi( main/(byte*) print_char_cursor#36 main::@2/(byte*) print_char_cursor#32 )
  call game_ready 
  (bool) game_ready::return#0 ← (bool) game_ready::return#2
  to:main::@5
main::@5: scope:[main]  from main::@1
  (byte) main::i#3 ← phi( main::@1/(byte) main::i#5 )
  (byte) action_count#7 ← phi( main::@1/(byte) action_count#5 )
  (byte*) print_line_cursor#16 ← phi( main::@1/(byte*) print_line_cursor#9 )
  (byte*) print_char_cursor#21 ← phi( main::@1/(byte*) print_char_cursor#12 )
  (bool) game_ready::return#3 ← phi( main::@1/(bool) game_ready::return#0 )
  (bool~) main::$0 ← (bool) game_ready::return#3
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#21
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#16
  (byte) action_count#1 ← (byte) action_count#7
  (bool~) main::$1 ← ! (bool~) main::$0
  if((bool~) main::$1) goto main::@2
  to:main::@3
main::@2: scope:[main]  from main::@5 main::@6
  (byte) action_count#14 ← phi( main::@5/(byte) action_count#1 main::@6/(byte) action_count#18 )
  (byte*) print_line_cursor#26 ← phi( main::@5/(byte*) print_line_cursor#5 main::@6/(byte*) print_line_cursor#6 )
  (byte*) print_char_cursor#32 ← phi( main::@5/(byte*) print_char_cursor#8 main::@6/(byte*) print_char_cursor#9 )
  (byte) main::i#2 ← phi( main::@5/(byte) main::i#3 main::@6/(byte) main::i#4 )
  (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,5)
  (bool~) main::$3 ← (byte) main::i#1 != rangelast(0,5)
  if((bool~) main::$3) goto main::@1
  to:main::@return
main::@3: scope:[main]  from main::@5
  (byte) action_count#19 ← phi( main::@5/(byte) action_count#1 )
  (byte) main::i#6 ← phi( main::@5/(byte) main::i#3 )
  (byte*) print_line_cursor#25 ← phi( main::@5/(byte*) print_line_cursor#5 )
  (byte*) print_char_cursor#31 ← phi( main::@5/(byte*) print_char_cursor#8 )
  (byte*) print_str_ln::str#0 ← (const string) main::str
  call print_str_ln 
  to:main::@6
main::@6: scope:[main]  from main::@3
  (byte) action_count#18 ← phi( main::@3/(byte) action_count#19 )
  (byte) main::i#4 ← phi( main::@3/(byte) main::i#6 )
  (byte*) print_line_cursor#17 ← phi( main::@3/(byte*) print_line_cursor#2 )
  (byte*) print_char_cursor#22 ← phi( main::@3/(byte*) print_char_cursor#3 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#22
  (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#17
  to:main::@2
main::@return: scope:[main]  from main::@2
  (byte) action_count#8 ← phi( main::@2/(byte) action_count#14 )
  (byte*) print_line_cursor#18 ← phi( main::@2/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#23 ← phi( main::@2/(byte*) print_char_cursor#32 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#23
  (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#18
  (byte) action_count#2 ← (byte) action_count#8
  return 
  to:@return
game_ready: scope:[game_ready]  from main::@1
  (byte*) print_line_cursor#31 ← phi( main::@1/(byte*) print_line_cursor#24 )
  (byte*) print_char_cursor#37 ← phi( main::@1/(byte*) print_char_cursor#30 )
  (byte) action_count#9 ← phi( main::@1/(byte) action_count#13 )
  (bool~) game_ready::$0 ← (byte) action_count#9 == (number) 0
  (bool~) game_ready::$1 ← ! (bool~) game_ready::$0
  if((bool~) game_ready::$1) goto game_ready::@1
  to:game_ready::@2
game_ready::@1: scope:[game_ready]  from game_ready game_ready::@2
  (byte) action_count#15 ← phi( game_ready/(byte) action_count#9 game_ready::@2/(byte) action_count#4 )
  (byte*) print_line_cursor#27 ← phi( game_ready/(byte*) print_line_cursor#31 game_ready::@2/(byte*) print_line_cursor#32 )
  (byte*) print_char_cursor#33 ← phi( game_ready/(byte*) print_char_cursor#37 game_ready::@2/(byte*) print_char_cursor#38 )
  (byte*) print_str_ln::str#1 ← (const string) game_ready::str
  call print_str_ln 
  to:game_ready::@4
game_ready::@4: scope:[game_ready]  from game_ready::@1
  (byte) action_count#10 ← phi( game_ready::@1/(byte) action_count#15 )
  (byte*) print_line_cursor#19 ← phi( game_ready::@1/(byte*) print_line_cursor#2 )
  (byte*) print_char_cursor#24 ← phi( game_ready::@1/(byte*) print_char_cursor#3 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#24
  (byte*) print_line_cursor#8 ← (byte*) print_line_cursor#19
  (byte) action_count#3 ← -- (byte) action_count#10
  (bool~) game_ready::$3 ← (byte) action_count#3 == (number) 0
  (bool) game_ready::return#1 ← (bool~) game_ready::$3
  to:game_ready::@return
game_ready::@2: scope:[game_ready]  from game_ready
  (byte*) print_line_cursor#32 ← phi( game_ready/(byte*) print_line_cursor#31 )
  (byte*) print_char_cursor#38 ← phi( game_ready/(byte*) print_char_cursor#37 )
  (byte) action_count#4 ← (byte) READY_FRAMES#0
  to:game_ready::@1
game_ready::@return: scope:[game_ready]  from game_ready::@4
  (byte) action_count#11 ← phi( game_ready::@4/(byte) action_count#3 )
  (byte*) print_line_cursor#20 ← phi( game_ready::@4/(byte*) print_line_cursor#8 )
  (byte*) print_char_cursor#25 ← phi( game_ready::@4/(byte*) print_char_cursor#11 )
  (bool) game_ready::return#4 ← phi( game_ready::@4/(bool) game_ready::return#1 )
  (bool) game_ready::return#2 ← (bool) game_ready::return#4
  (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#25
  (byte*) print_line_cursor#9 ← (byte*) print_line_cursor#20
  (byte) action_count#5 ← (byte) action_count#11
  return 
  to:@return
@38: scope:[]  from @36
  (byte) action_count#16 ← phi( @36/(byte) action_count#0 )
  (byte*) print_line_cursor#28 ← phi( @36/(byte*) print_line_cursor#33 )
  (byte*) print_char_cursor#34 ← phi( @36/(byte*) print_char_cursor#39 )
  call main 
  to:@39
@39: scope:[]  from @38
  (byte) action_count#12 ← phi( @38/(byte) action_count#2 )
  (byte*) print_line_cursor#21 ← phi( @38/(byte*) print_line_cursor#7 )
  (byte*) print_char_cursor#26 ← phi( @38/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#26
  (byte*) print_line_cursor#10 ← (byte*) print_line_cursor#21
  (byte) action_count#6 ← (byte) action_count#12
  to:@end
@end: scope:[]  from @39

SYMBOL TABLE SSA
(label) @12
(label) @36
(label) @38
(label) @39
(label) @begin
(label) @end
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(byte) READY_FRAMES
(byte) READY_FRAMES#0
(byte) action_count
(byte) action_count#0
(byte) action_count#1
(byte) action_count#10
(byte) action_count#11
(byte) action_count#12
(byte) action_count#13
(byte) action_count#14
(byte) action_count#15
(byte) action_count#16
(byte) action_count#17
(byte) action_count#18
(byte) action_count#19
(byte) action_count#2
(byte) action_count#3
(byte) action_count#4
(byte) action_count#5
(byte) action_count#6
(byte) action_count#7
(byte) action_count#8
(byte) action_count#9
(bool()) game_ready()
(bool~) game_ready::$0
(bool~) game_ready::$1
(bool~) game_ready::$3
(label) game_ready::@1
(label) game_ready::@2
(label) game_ready::@4
(label) game_ready::@return
(bool) game_ready::return
(bool) game_ready::return#0
(bool) game_ready::return#1
(bool) game_ready::return#2
(bool) game_ready::return#3
(bool) game_ready::return#4
(const string) game_ready::str = (string) "ready"
(void()) main()
(bool~) main::$0
(bool~) main::$1
(bool~) main::$3
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#2
(byte) main::i#3
(byte) main::i#4
(byte) main::i#5
(byte) main::i#6
(const string) main::str = (string) "ready!"
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#5
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#18
(byte*) print_line_cursor#19
(byte*) print_line_cursor#2
(byte*) print_line_cursor#20
(byte*) print_line_cursor#21
(byte*) print_line_cursor#22
(byte*) print_line_cursor#23
(byte*) print_line_cursor#24
(byte*) print_line_cursor#25
(byte*) print_line_cursor#26
(byte*) print_line_cursor#27
(byte*) print_line_cursor#28
(byte*) print_line_cursor#29
(byte*) print_line_cursor#3
(byte*) print_line_cursor#30
(byte*) print_line_cursor#31
(byte*) print_line_cursor#32
(byte*) print_line_cursor#33
(byte*) print_line_cursor#4
(byte*) print_line_cursor#5
(byte*) print_line_cursor#6
(byte*) print_line_cursor#7
(byte*) print_line_cursor#8
(byte*) print_line_cursor#9
(void()) print_ln()
(byte*~) print_ln::$0
(bool~) print_ln::$1
(label) print_ln::@1
(label) print_ln::@2
(label) print_ln::@return
(byte*) print_screen
(byte*) print_screen#0
(void()) print_str((byte*) print_str::str)
(bool~) print_str::$0
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0
(byte*) print_str::str#1
(byte*) print_str::str#2
(byte*) print_str::str#3
(byte*) print_str::str#4
(void()) print_str_ln((byte*) print_str_ln::str)
(label) print_str_ln::@1
(label) print_str_ln::@2
(label) print_str_ln::@return
(byte*) print_str_ln::str
(byte*) print_str_ln::str#0
(byte*) print_str_ln::str#1
(byte*) print_str_ln::str#2

Adding number conversion cast (unumber) 0 in (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#2)
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#13 + (number) $28
Adding number conversion cast (unumber) 0 in (byte) action_count#0 ← (number) 0
Adding number conversion cast (unumber) 5 in (byte) READY_FRAMES#0 ← (number) 5
Adding number conversion cast (unumber) 0 in (bool~) game_ready::$0 ← (byte) action_count#9 == (number) 0
Adding number conversion cast (unumber) 0 in (bool~) game_ready::$3 ← (byte) action_count#3 == (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Inlining cast (byte) action_count#0 ← (unumber)(number) 0
Inlining cast (byte) READY_FRAMES#0 ← (unumber)(number) 5
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inversing boolean not [71] (bool~) game_ready::$1 ← (byte) action_count#9 != (byte) 0 from [70] (bool~) game_ready::$0 ← (byte) action_count#9 == (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#39 (byte*) print_line_cursor#33 (byte*) print_char_cursor#34 (byte*) print_line_cursor#28 
Alias (byte*) print_line_cursor#22 = (byte*) print_line_cursor#29 
Alias (byte*) print_char_cursor#1 = (byte*) print_char_cursor#14 
Alias (byte*) print_line_cursor#1 = (byte*) print_line_cursor#11 (byte*) print_line_cursor#12 (byte*) print_line_cursor#2 
Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#2 (byte*) print_char_cursor#16 (byte*) print_char_cursor#3 
Alias (byte*) print_str::str#2 = (byte*) print_str::str#3 
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#28 (byte*) print_char_cursor#18 (byte*) print_char_cursor#5 
Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#3 (byte*~) print_ln::$0 (byte*) print_char_cursor#6 (byte*) print_line_cursor#15 (byte*) print_char_cursor#20 (byte*) print_line_cursor#4 (byte*) print_char_cursor#7 
Alias (bool) game_ready::return#0 = (bool) game_ready::return#3 
Alias (byte) main::i#3 = (byte) main::i#5 (byte) main::i#6 (byte) main::i#4 
Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#8 (byte*) print_char_cursor#31 
Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#5 (byte*) print_line_cursor#25 
Alias (byte) action_count#1 = (byte) action_count#7 (byte) action_count#19 (byte) action_count#18 
Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#9 
Alias (byte*) print_line_cursor#17 = (byte*) print_line_cursor#6 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#23 (byte*) print_char_cursor#32 
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#26 (byte*) print_line_cursor#7 
Alias (byte) action_count#14 = (byte) action_count#8 (byte) action_count#2 
Alias (byte) action_count#10 = (byte) action_count#15 
Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#24 (byte*) print_char_cursor#25 (byte*) print_char_cursor#12 
Alias (byte*) print_line_cursor#19 = (byte*) print_line_cursor#8 (byte*) print_line_cursor#20 (byte*) print_line_cursor#9 
Alias (bool) game_ready::return#1 = (bool~) game_ready::$3 (bool) game_ready::return#4 (bool) game_ready::return#2 
Alias (byte*) print_char_cursor#37 = (byte*) print_char_cursor#38 
Alias (byte*) print_line_cursor#31 = (byte*) print_line_cursor#32 
Alias (byte) action_count#11 = (byte) action_count#3 (byte) action_count#5 
Alias (byte) action_count#0 = (byte) action_count#16 
Alias (byte*) print_char_cursor#13 = (byte*) print_char_cursor#26 
Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#21 
Alias (byte) action_count#12 = (byte) action_count#6 
Successful SSA optimization Pass2AliasElimination
Alias (byte) main::i#2 = (byte) main::i#3 
Alias (byte) action_count#1 = (byte) action_count#14 
Alias (byte*) print_char_cursor#33 = (byte*) print_char_cursor#37 
Alias (byte*) print_line_cursor#27 = (byte*) print_line_cursor#31 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) print_char_cursor#1 (byte*) print_char_cursor#17
Identical Phi Values (byte*) print_line_cursor#1 (byte*) print_line_cursor#14
Identical Phi Values (byte*) print_char_cursor#15 (byte*) print_line_cursor#14
Identical Phi Values (byte*) print_str::str#4 (byte*) print_str::str#0
Identical Phi Values (byte*) print_char_cursor#35 (byte*) print_char_cursor#27
Identical Phi Values (byte*) print_line_cursor#23 (byte*) print_line_cursor#22
Identical Phi Values (byte*) print_char_cursor#29 (byte*) print_char_cursor#1
Identical Phi Values (byte*) print_char_cursor#19 (byte*) print_char_cursor#29
Identical Phi Values (byte*) print_char_cursor#36 (byte*) print_char_cursor#0
Identical Phi Values (byte*) print_line_cursor#30 (byte*) print_char_cursor#0
Identical Phi Values (byte) action_count#17 (byte) action_count#0
Identical Phi Values (byte*) print_char_cursor#21 (byte*) print_char_cursor#11
Identical Phi Values (byte*) print_line_cursor#16 (byte*) print_line_cursor#19
Identical Phi Values (byte) action_count#1 (byte) action_count#11
Identical Phi Values (byte*) print_char_cursor#22 (byte*) print_char_cursor#15
Identical Phi Values (byte*) print_line_cursor#17 (byte*) print_line_cursor#1
Identical Phi Values (byte) action_count#9 (byte) action_count#13
Identical Phi Values (byte*) print_char_cursor#33 (byte*) print_char_cursor#30
Identical Phi Values (byte*) print_line_cursor#27 (byte*) print_line_cursor#24
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#15
Identical Phi Values (byte*) print_line_cursor#19 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#13 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_line_cursor#10 (byte*) print_line_cursor#18
Identical Phi Values (byte) action_count#12 (byte) action_count#1
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_line_cursor#14
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#14
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) print_str::$0 [19] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [32] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1
Simple Condition (bool~) main::$3 [57] if((byte) main::i#1!=rangelast(0,5)) goto main::@1
Simple Condition (bool~) game_ready::$1 [72] if((byte) action_count#13!=(byte) 0) goto game_ready::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [52] (bool~) main::$1 ← ! (bool~) main::$0
Successful SSA optimization Pass2ConditionalAndOrRewriting
Constant (const byte*) print_char_cursor#0 = (byte*) 1024
Constant (const byte) action_count#0 = 0
Constant (const byte) READY_FRAMES#0 = 5
Constant (const byte) main::i#0 = 0
Constant (const byte*) print_str_ln::str#0 = main::str
Constant (const byte*) print_str_ln::str#1 = game_ready::str
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte) action_count#4 = READY_FRAMES#0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [55] main::i#1 ← ++ main::i#2 to ++
Resolved ranged comparison value [57] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6
Adding number conversion cast (unumber) 6 in if((byte) main::i#1!=(number) 6) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 6
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 6
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inlining constant with var siblings (const byte*) print_str_ln::str#0
Inlining constant with var siblings (const byte*) print_str_ln::str#1
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte*) print_char_cursor#0
Inlining constant with var siblings (const byte) action_count#0
Inlining constant with var siblings (const byte) action_count#4
Constant inlined action_count#4 = (const byte) READY_FRAMES#0
Constant inlined print_str_ln::str#1 = (const string) game_ready::str
Constant inlined main::i#0 = (byte) 0
Constant inlined print_str_ln::str#0 = (const string) main::str
Constant inlined print_char_cursor#0 = (byte*) 1024
Constant inlined action_count#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Added new block during phi lifting main::@7(between main::@2 and main::@1)
Added new block during phi lifting game_ready::@5(between game_ready and game_ready::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @12
Adding NOP phi() at start of @36
Adding NOP phi() at start of @38
Adding NOP phi() at start of @39
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of print_str_ln::@1
Adding NOP phi() at start of print_str_ln::@2
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of game_ready::@2
CALL GRAPH
Calls in [] to main:4 
Calls in [main] to game_ready:9 print_str_ln:22 
Calls in [print_str_ln] to print_str:26 print_ln:28 
Calls in [game_ready] to print_str_ln:53 

Created 11 initial phi equivalence classes
Not coalescing [16] print_char_cursor#44 ← print_line_cursor#14
Coalesced [17] print_line_cursor#38 ← print_line_cursor#14
Coalesced [18] action_count#20 ← action_count#11
Coalesced [19] main::i#7 ← main::i#1
Not coalescing [20] print_char_cursor#41 ← print_line_cursor#14
Coalesced [21] print_line_cursor#35 ← print_line_cursor#14
Coalesced [31] print_line_cursor#36 ← print_line_cursor#22
Coalesced (already) [37] print_line_cursor#37 ← print_line_cursor#14
Coalesced [38] print_str::str#5 ← print_str::str#0
Coalesced [39] print_char_cursor#42 ← print_char_cursor#27
Coalesced [46] print_str::str#6 ← print_str::str#1
Coalesced [47] print_char_cursor#43 ← print_char_cursor#4
Coalesced [51] print_char_cursor#40 ← print_char_cursor#30
Coalesced (already) [52] print_line_cursor#34 ← print_line_cursor#24
Coalesced [57] action_count#21 ← action_count#13
Coalesced down to 6 phi equivalence classes
Culled Empty Block (label) @12
Culled Empty Block (label) @36
Culled Empty Block (label) @39
Culled Empty Block (label) main::@6
Culled Empty Block (label) print_str_ln::@2
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_ln::@3
Culled Empty Block (label) game_ready::@2
Renumbering block @38 to @1
Renumbering block main::@5 to main::@4
Renumbering block main::@7 to main::@5
Renumbering block game_ready::@4 to game_ready::@2
Renumbering block game_ready::@5 to game_ready::@3
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 print_str_ln::@1
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_str
Adding NOP phi() at start of game_ready::@3

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()
  to:main::@1
main::@1: scope:[main]  from main main::@5
  [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@5/(byte) main::i#1 )
  [5] (byte) action_count#13 ← phi( main/(byte) 0 main::@5/(byte) action_count#11 )
  [5] (byte*) print_line_cursor#24 ← phi( main/(byte*) 1024 main::@5/(byte*) print_line_cursor#14 )
  [5] (byte*) print_char_cursor#30 ← phi( main/(byte*) 1024 main::@5/(byte*~) print_char_cursor#44 )
  [6] call game_ready 
  [7] (bool) game_ready::return#0 ← (bool) game_ready::return#1
  to:main::@4
main::@4: scope:[main]  from main::@1
  [8] (bool~) main::$0 ← (bool) game_ready::return#0
  [9] if((bool~) main::$0) goto main::@3
  to:main::@2
main::@3: scope:[main]  from main::@4
  [10] (byte*~) print_char_cursor#41 ← (byte*) print_line_cursor#14
  [11] call print_str_ln 
  to:main::@2
main::@2: scope:[main]  from main::@3 main::@4
  [12] (byte) main::i#1 ← ++ (byte) main::i#2
  [13] if((byte) main::i#1!=(byte) 6) goto main::@5
  to:main::@return
main::@return: scope:[main]  from main::@2
  [14] return 
  to:@return
main::@5: scope:[main]  from main::@2
  [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14
  to:main::@1
print_str_ln: scope:[print_str_ln]  from game_ready::@1 main::@3
  [16] (byte*) print_line_cursor#22 ← phi( game_ready::@1/(byte*) print_line_cursor#24 main::@3/(byte*) print_line_cursor#14 )
  [16] (byte*) print_char_cursor#27 ← phi( game_ready::@1/(byte*) print_char_cursor#30 main::@3/(byte*~) print_char_cursor#41 )
  [16] (byte*) print_str_ln::str#2 ← phi( game_ready::@1/(const string) game_ready::str main::@3/(const string) main::str )
  [17] (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2
  [18] call print_str 
  to:print_str_ln::@1
print_str_ln::@1: scope:[print_str_ln]  from print_str_ln
  [19] phi()
  [20] call print_ln 
  to:print_str_ln::@return
print_str_ln::@return: scope:[print_str_ln]  from print_str_ln::@1
  [21] return 
  to:@return
print_ln: scope:[print_ln]  from print_str_ln::@1
  [22] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [23] (byte*) print_line_cursor#13 ← phi( print_ln/(byte*) print_line_cursor#22 print_ln::@1/(byte*) print_line_cursor#14 )
  [24] (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#13 + (byte) $28
  [25] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [26] return 
  to:@return
print_str: scope:[print_str]  from print_str_ln
  [27] phi()
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  [28] (byte*) print_char_cursor#17 ← phi( print_str/(byte*) print_char_cursor#27 print_str::@2/(byte*) print_char_cursor#4 )
  [28] (byte*) print_str::str#2 ← phi( print_str/(byte*) print_str::str#0 print_str::@2/(byte*) print_str::str#1 )
  [29] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2
  to:print_str::@return
print_str::@return: scope:[print_str]  from print_str::@1
  [30] return 
  to:@return
print_str::@2: scope:[print_str]  from print_str::@1
  [31] *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#2)
  [32] (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17
  [33] (byte*) print_str::str#1 ← ++ (byte*) print_str::str#2
  to:print_str::@1
game_ready: scope:[game_ready]  from main::@1
  [34] if((byte) action_count#13!=(byte) 0) goto game_ready::@3
  to:game_ready::@1
game_ready::@3: scope:[game_ready]  from game_ready
  [35] phi()
  to:game_ready::@1
game_ready::@1: scope:[game_ready]  from game_ready game_ready::@3
  [36] (byte) action_count#10 ← phi( game_ready::@3/(byte) action_count#13 game_ready/(const byte) READY_FRAMES#0 )
  [37] call print_str_ln 
  to:game_ready::@2
game_ready::@2: scope:[game_ready]  from game_ready::@1
  [38] (byte) action_count#11 ← -- (byte) action_count#10
  [39] (bool) game_ready::return#1 ← (byte) action_count#11 == (byte) 0
  to:game_ready::@return
game_ready::@return: scope:[game_ready]  from game_ready::@2
  [40] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte) READY_FRAMES
(byte) action_count
(byte) action_count#10 2.0
(byte) action_count#11 1.25
(byte) action_count#13 5.0
(bool()) game_ready()
(bool) game_ready::return
(bool) game_ready::return#0 22.0
(bool) game_ready::return#1 4.333333333333333
(void()) main()
(bool~) main::$0 22.0
(byte) main::i
(byte) main::i#1 11.0
(byte) main::i#2 3.142857142857143
(byte*) print_char_cursor
(byte*) print_char_cursor#17 40.6
(byte*) print_char_cursor#27 5.0
(byte*) print_char_cursor#30 3.25
(byte*) print_char_cursor#4 101.0
(byte*~) print_char_cursor#41 22.0
(byte*~) print_char_cursor#44 22.0
(byte*) print_line_cursor
(byte*) print_line_cursor#13 204.0
(byte*) print_line_cursor#14 19.27777777777778
(byte*) print_line_cursor#22 3.0
(byte*) print_line_cursor#24 3.25
(void()) print_ln()
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(byte*) print_str::str
(byte*) print_str::str#0 2.0
(byte*) print_str::str#1 202.0
(byte*) print_str::str#2 101.5
(void()) print_str_ln((byte*) print_str_ln::str)
(byte*) print_str_ln::str
(byte*) print_str_ln::str#2 2.0

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ print_str_ln::str#2 ]
[ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ]
[ print_str::str#2 print_str::str#0 print_str::str#1 ]
[ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ]
[ action_count#10 action_count#13 action_count#11 ]
Added variable game_ready::return#0 to zero page equivalence class [ game_ready::return#0 ]
Added variable main::$0 to zero page equivalence class [ main::$0 ]
Added variable game_ready::return#1 to zero page equivalence class [ game_ready::return#1 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ print_str_ln::str#2 ]
[ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ]
[ print_str::str#2 print_str::str#0 print_str::str#1 ]
[ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ]
[ action_count#10 action_count#13 action_count#11 ]
[ game_ready::return#0 ]
[ main::$0 ]
[ game_ready::return#1 ]
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Allocated zp ZP_WORD:3 [ print_str_ln::str#2 ]
Allocated zp ZP_WORD:5 [ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ]
Allocated zp ZP_WORD:7 [ print_str::str#2 print_str::str#0 print_str::str#1 ]
Allocated zp ZP_WORD:9 [ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ]
Allocated zp ZP_BYTE:11 [ action_count#10 action_count#13 action_count#11 ]
Allocated zp ZP_BOOL:12 [ game_ready::return#0 ]
Allocated zp ZP_BOOL:13 [ main::$0 ]
Allocated zp ZP_BOOL:14 [ game_ready::return#1 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
// Adding a missing word-fragment for Travis Fisher
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .const READY_FRAMES = 5
  .label print_char_cursor = 9
  .label print_line_cursor = 5
  .label action_count = $b
  // @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 _0 = $d
    .label i = 2
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [5] phi (byte) action_count#13 = (byte) 0 [phi:main->main::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z action_count
    // [5] phi (byte*) print_line_cursor#24 = (byte*) 1024 [phi:main->main::@1#2] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [5] phi (byte*) print_char_cursor#30 = (byte*) 1024 [phi:main->main::@1#3] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    jmp b1
    // main::@1
  b1:
    // [6] call game_ready 
    jsr game_ready
    // [7] (bool) game_ready::return#0 ← (bool) game_ready::return#1 -- vboz1=vboz2 
    lda.z game_ready.return_1
    sta.z game_ready.return
    jmp b4
    // main::@4
  b4:
    // [8] (bool~) main::$0 ← (bool) game_ready::return#0 -- vboz1=vboz2 
    lda.z game_ready.return
    sta.z _0
    // [9] if((bool~) main::$0) goto main::@3 -- vboz1_then_la1 
    lda.z _0
    cmp #0
    bne b3
    jmp b2
    // main::@3
  b3:
    // [10] (byte*~) print_char_cursor#41 ← (byte*) print_line_cursor#14 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [11] call print_str_ln 
    // [16] phi from main::@3 to print_str_ln [phi:main::@3->print_str_ln]
  print_str_ln_from_b3:
    // [16] phi (byte*) print_line_cursor#22 = (byte*) print_line_cursor#14 [phi:main::@3->print_str_ln#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#27 = (byte*~) print_char_cursor#41 [phi:main::@3->print_str_ln#1] -- register_copy 
    // [16] phi (byte*) print_str_ln::str#2 = (const string) main::str [phi:main::@3->print_str_ln#2] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_ln.str
    lda #>str
    sta.z print_str_ln.str+1
    jsr print_str_ln
    jmp b2
    // main::@2
  b2:
    // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [13] if((byte) main::i#1!=(byte) 6) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 
    lda #6
    cmp.z i
    bne b5
    jmp breturn
    // main::@return
  breturn:
    // [14] return 
    rts
    // main::@5
  b5:
    // [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [5] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
    // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@5->main::@1#0] -- register_copy 
    // [5] phi (byte) action_count#13 = (byte) action_count#11 [phi:main::@5->main::@1#1] -- register_copy 
    // [5] phi (byte*) print_line_cursor#24 = (byte*) print_line_cursor#14 [phi:main::@5->main::@1#2] -- register_copy 
    // [5] phi (byte*) print_char_cursor#30 = (byte*~) print_char_cursor#44 [phi:main::@5->main::@1#3] -- register_copy 
    jmp b1
    str: .text "ready!"
    .byte 0
}
  // print_str_ln
// Print a zero-terminated string followed by a newline
// print_str_ln(byte* zeropage(3) str)
print_str_ln: {
    .label str = 3
    // [17] (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2 -- pbuz1=pbuz2 
    lda.z str
    sta.z print_str.str
    lda.z str+1
    sta.z print_str.str+1
    // [18] call print_str 
    // [27] phi from print_str_ln to print_str [phi:print_str_ln->print_str]
  print_str_from_print_str_ln:
    jsr print_str
    // [19] phi from print_str_ln to print_str_ln::@1 [phi:print_str_ln->print_str_ln::@1]
  b1_from_print_str_ln:
    jmp b1
    // print_str_ln::@1
  b1:
    // [20] call print_ln 
    // [22] phi from print_str_ln::@1 to print_ln [phi:print_str_ln::@1->print_ln]
  print_ln_from_b1:
    jsr print_ln
    jmp breturn
    // print_str_ln::@return
  breturn:
    // [21] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [23] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
  b1_from_print_ln:
  b1_from_b1:
    // [23] phi (byte*) print_line_cursor#13 = (byte*) print_line_cursor#22 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
    // print_ln::@1
  b1:
    // [24] (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#13 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [25] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
    // print_ln::@return
  breturn:
    // [26] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zeropage(7) str)
print_str: {
    .label str = 7
    // [28] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  b1_from_print_str:
  b1_from_b2:
    // [28] phi (byte*) print_char_cursor#17 = (byte*) print_char_cursor#27 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
    // [28] phi (byte*) print_str::str#2 = (byte*) print_str::str#0 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    jmp b1
    // print_str::@1
  b1:
    // [29] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne b2
    jmp breturn
    // print_str::@return
  breturn:
    // [30] return 
    rts
    // print_str::@2
  b2:
    // [31] *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#2) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
    // [32] (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [33] (byte*) print_str::str#1 ← ++ (byte*) print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp b1_from_b2
}
  // game_ready
game_ready: {
    .label return = $c
    .label return_1 = $e
    // [34] if((byte) action_count#13!=(byte) 0) goto game_ready::@3 -- vbuz1_neq_0_then_la1 
    lda.z action_count
    cmp #0
    bne b3_from_game_ready
    // [36] phi from game_ready to game_ready::@1 [phi:game_ready->game_ready::@1]
  b1_from_game_ready:
    // [36] phi (byte) action_count#10 = (const byte) READY_FRAMES#0 [phi:game_ready->game_ready::@1#0] -- vbuz1=vbuc1 
    lda #READY_FRAMES
    sta.z action_count
    jmp b1
    // [35] phi from game_ready to game_ready::@3 [phi:game_ready->game_ready::@3]
  b3_from_game_ready:
    jmp b3
    // game_ready::@3
  b3:
    // [36] phi from game_ready::@3 to game_ready::@1 [phi:game_ready::@3->game_ready::@1]
  b1_from_b3:
    // [36] phi (byte) action_count#10 = (byte) action_count#13 [phi:game_ready::@3->game_ready::@1#0] -- register_copy 
    jmp b1
    // game_ready::@1
  b1:
    // [37] call print_str_ln 
    // [16] phi from game_ready::@1 to print_str_ln [phi:game_ready::@1->print_str_ln]
  print_str_ln_from_b1:
    // [16] phi (byte*) print_line_cursor#22 = (byte*) print_line_cursor#24 [phi:game_ready::@1->print_str_ln#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#30 [phi:game_ready::@1->print_str_ln#1] -- register_copy 
    // [16] phi (byte*) print_str_ln::str#2 = (const string) game_ready::str [phi:game_ready::@1->print_str_ln#2] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_ln.str
    lda #>str
    sta.z print_str_ln.str+1
    jsr print_str_ln
    jmp b2
    // game_ready::@2
  b2:
    // [38] (byte) action_count#11 ← -- (byte) action_count#10 -- vbuz1=_dec_vbuz1 
    dec.z action_count
    // [39] (bool) game_ready::return#1 ← (byte) action_count#11 == (byte) 0 -- vboz1=vbuz2_eq_vbuc1 
    lda.z action_count
    eor #0
    beq !+
    lda #1
  !:
    eor #1
    sta.z return_1
    jmp breturn
    // game_ready::@return
  breturn:
    // [40] return 
    rts
    str: .text "ready"
    .byte 0
}
  // File Data

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [10] (byte*~) print_char_cursor#41 ← (byte*) print_line_cursor#14 [ main::i#2 print_line_cursor#14 action_count#11 print_char_cursor#41 ] ( main:2 [ main::i#2 print_line_cursor#14 action_count#11 print_char_cursor#41 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ action_count#10 action_count#13 action_count#11 ]
Statement [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 [ print_char_cursor#44 print_line_cursor#14 action_count#11 main::i#1 ] ( main:2 [ print_char_cursor#44 print_line_cursor#14 action_count#11 main::i#1 ] ) always clobbers reg byte a 
Statement [17] (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2 [ print_char_cursor#27 print_line_cursor#22 print_str::str#0 ] ( main:2::print_str_ln:11 [ main::i#2 action_count#11 print_char_cursor#27 print_line_cursor#22 print_str::str#0 ] main:2::game_ready:6::print_str_ln:37 [ main::i#2 action_count#10 print_char_cursor#27 print_line_cursor#22 print_str::str#0 ] ) always clobbers reg byte a 
Statement [24] (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#13 + (byte) $28 [ print_line_cursor#14 print_char_cursor#17 ] ( main:2::print_str_ln:11::print_ln:20 [ main::i#2 action_count#11 print_line_cursor#14 print_char_cursor#17 ] main:2::game_ready:6::print_str_ln:37::print_ln:20 [ main::i#2 action_count#10 print_line_cursor#14 print_char_cursor#17 ] ) always clobbers reg byte a 
Statement [25] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 [ print_line_cursor#14 print_char_cursor#17 ] ( main:2::print_str_ln:11::print_ln:20 [ main::i#2 action_count#11 print_line_cursor#14 print_char_cursor#17 ] main:2::game_ready:6::print_str_ln:37::print_ln:20 [ main::i#2 action_count#10 print_line_cursor#14 print_char_cursor#17 ] ) always clobbers reg byte a 
Statement [29] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 [ print_char_cursor#17 print_str::str#2 ] ( main:2::print_str_ln:11::print_str:18 [ main::i#2 action_count#11 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] main:2::game_ready:6::print_str_ln:37::print_str:18 [ main::i#2 action_count#10 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ action_count#10 action_count#13 action_count#11 ]
Statement [31] *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#2) [ print_char_cursor#17 print_str::str#2 ] ( main:2::print_str_ln:11::print_str:18 [ main::i#2 action_count#11 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] main:2::game_ready:6::print_str_ln:37::print_str:18 [ main::i#2 action_count#10 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [39] (bool) game_ready::return#1 ← (byte) action_count#11 == (byte) 0 [ print_line_cursor#14 action_count#11 game_ready::return#1 ] ( main:2::game_ready:6 [ main::i#2 print_line_cursor#14 action_count#11 game_ready::return#1 ] ) always clobbers reg byte a 
Statement [10] (byte*~) print_char_cursor#41 ← (byte*) print_line_cursor#14 [ main::i#2 print_line_cursor#14 action_count#11 print_char_cursor#41 ] ( main:2 [ main::i#2 print_line_cursor#14 action_count#11 print_char_cursor#41 ] ) always clobbers reg byte a 
Statement [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 [ print_char_cursor#44 print_line_cursor#14 action_count#11 main::i#1 ] ( main:2 [ print_char_cursor#44 print_line_cursor#14 action_count#11 main::i#1 ] ) always clobbers reg byte a 
Statement [17] (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2 [ print_char_cursor#27 print_line_cursor#22 print_str::str#0 ] ( main:2::print_str_ln:11 [ main::i#2 action_count#11 print_char_cursor#27 print_line_cursor#22 print_str::str#0 ] main:2::game_ready:6::print_str_ln:37 [ main::i#2 action_count#10 print_char_cursor#27 print_line_cursor#22 print_str::str#0 ] ) always clobbers reg byte a 
Statement [24] (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#13 + (byte) $28 [ print_line_cursor#14 print_char_cursor#17 ] ( main:2::print_str_ln:11::print_ln:20 [ main::i#2 action_count#11 print_line_cursor#14 print_char_cursor#17 ] main:2::game_ready:6::print_str_ln:37::print_ln:20 [ main::i#2 action_count#10 print_line_cursor#14 print_char_cursor#17 ] ) always clobbers reg byte a 
Statement [25] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 [ print_line_cursor#14 print_char_cursor#17 ] ( main:2::print_str_ln:11::print_ln:20 [ main::i#2 action_count#11 print_line_cursor#14 print_char_cursor#17 ] main:2::game_ready:6::print_str_ln:37::print_ln:20 [ main::i#2 action_count#10 print_line_cursor#14 print_char_cursor#17 ] ) always clobbers reg byte a 
Statement [29] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 [ print_char_cursor#17 print_str::str#2 ] ( main:2::print_str_ln:11::print_str:18 [ main::i#2 action_count#11 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] main:2::game_ready:6::print_str_ln:37::print_str:18 [ main::i#2 action_count#10 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [31] *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#2) [ print_char_cursor#17 print_str::str#2 ] ( main:2::print_str_ln:11::print_str:18 [ main::i#2 action_count#11 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] main:2::game_ready:6::print_str_ln:37::print_str:18 [ main::i#2 action_count#10 print_line_cursor#22 print_char_cursor#17 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [39] (bool) game_ready::return#1 ← (byte) action_count#11 == (byte) 0 [ print_line_cursor#14 action_count#11 game_ready::return#1 ] ( main:2::game_ready:6 [ main::i#2 print_line_cursor#14 action_count#11 game_ready::return#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , 
Potential registers zp ZP_WORD:3 [ print_str_ln::str#2 ] : zp ZP_WORD:3 , 
Potential registers zp ZP_WORD:5 [ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ] : zp ZP_WORD:5 , 
Potential registers zp ZP_WORD:7 [ print_str::str#2 print_str::str#0 print_str::str#1 ] : zp ZP_WORD:7 , 
Potential registers zp ZP_WORD:9 [ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ] : zp ZP_WORD:9 , 
Potential registers zp ZP_BYTE:11 [ action_count#10 action_count#13 action_count#11 ] : zp ZP_BYTE:11 , reg byte x , 
Potential registers zp ZP_BOOL:12 [ game_ready::return#0 ] : zp ZP_BOOL:12 , reg byte a , 
Potential registers zp ZP_BOOL:13 [ main::$0 ] : zp ZP_BOOL:13 , reg byte a , 
Potential registers zp ZP_BOOL:14 [ game_ready::return#1 ] : zp ZP_BOOL:14 , reg byte a , 

REGISTER UPLIFT SCOPES
Uplift Scope [] 229.53: zp ZP_WORD:5 [ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ] 193.85: zp ZP_WORD:9 [ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ] 8.25: zp ZP_BYTE:11 [ action_count#10 action_count#13 action_count#11 ] 
Uplift Scope [print_str] 305.5: zp ZP_WORD:7 [ print_str::str#2 print_str::str#0 print_str::str#1 ] 
Uplift Scope [main] 22: zp ZP_BOOL:13 [ main::$0 ] 14.14: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 
Uplift Scope [game_ready] 22: zp ZP_BOOL:12 [ game_ready::return#0 ] 4.33: zp ZP_BOOL:14 [ game_ready::return#1 ] 
Uplift Scope [print_str_ln] 2: zp ZP_WORD:3 [ print_str_ln::str#2 ] 
Uplift Scope [RADIX] 
Uplift Scope [print_ln] 

Uplifting [] best 11631 combination zp ZP_WORD:5 [ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ] zp ZP_WORD:9 [ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ] reg byte x [ action_count#10 action_count#13 action_count#11 ] 
Uplifting [print_str] best 11631 combination zp ZP_WORD:7 [ print_str::str#2 print_str::str#0 print_str::str#1 ] 
Uplifting [main] best 11571 combination reg byte a [ main::$0 ] zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 
Uplifting [game_ready] best 11478 combination reg byte a [ game_ready::return#0 ] reg byte a [ game_ready::return#1 ] 
Uplifting [print_str_ln] best 11478 combination zp ZP_WORD:3 [ print_str_ln::str#2 ] 
Uplifting [RADIX] best 11478 combination 
Uplifting [print_ln] best 11478 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Uplifting [main] best 11478 combination zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 
Coalescing zero page register [ zp ZP_WORD:3 [ print_str_ln::str#2 ] ] with [ zp ZP_WORD:7 [ print_str::str#2 print_str::str#0 print_str::str#1 ] ] - score: 1
Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Adding a missing word-fragment for Travis Fisher
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .const READY_FRAMES = 5
  .label print_char_cursor = 7
  .label print_line_cursor = 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: {
    .label i = 2
    // [5] phi from main to main::@1 [phi:main->main::@1]
  b1_from_main:
    // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [5] phi (byte) action_count#13 = (byte) 0 [phi:main->main::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [5] phi (byte*) print_line_cursor#24 = (byte*) 1024 [phi:main->main::@1#2] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [5] phi (byte*) print_char_cursor#30 = (byte*) 1024 [phi:main->main::@1#3] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    jmp b1
    // main::@1
  b1:
    // [6] call game_ready 
    jsr game_ready
    // [7] (bool) game_ready::return#0 ← (bool) game_ready::return#1
    jmp b4
    // main::@4
  b4:
    // [8] (bool~) main::$0 ← (bool) game_ready::return#0
    // [9] if((bool~) main::$0) goto main::@3 -- vboaa_then_la1 
    cmp #0
    bne b3
    jmp b2
    // main::@3
  b3:
    // [10] (byte*~) print_char_cursor#41 ← (byte*) print_line_cursor#14 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [11] call print_str_ln 
    // [16] phi from main::@3 to print_str_ln [phi:main::@3->print_str_ln]
  print_str_ln_from_b3:
    // [16] phi (byte*) print_line_cursor#22 = (byte*) print_line_cursor#14 [phi:main::@3->print_str_ln#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#27 = (byte*~) print_char_cursor#41 [phi:main::@3->print_str_ln#1] -- register_copy 
    // [16] phi (byte*) print_str_ln::str#2 = (const string) main::str [phi:main::@3->print_str_ln#2] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_ln.str
    lda #>str
    sta.z print_str_ln.str+1
    jsr print_str_ln
    jmp b2
    // main::@2
  b2:
    // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [13] if((byte) main::i#1!=(byte) 6) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 
    lda #6
    cmp.z i
    bne b5
    jmp breturn
    // main::@return
  breturn:
    // [14] return 
    rts
    // main::@5
  b5:
    // [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [5] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  b1_from_b5:
    // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@5->main::@1#0] -- register_copy 
    // [5] phi (byte) action_count#13 = (byte) action_count#11 [phi:main::@5->main::@1#1] -- register_copy 
    // [5] phi (byte*) print_line_cursor#24 = (byte*) print_line_cursor#14 [phi:main::@5->main::@1#2] -- register_copy 
    // [5] phi (byte*) print_char_cursor#30 = (byte*~) print_char_cursor#44 [phi:main::@5->main::@1#3] -- register_copy 
    jmp b1
    str: .text "ready!"
    .byte 0
}
  // print_str_ln
// Print a zero-terminated string followed by a newline
// print_str_ln(byte* zeropage(3) str)
print_str_ln: {
    .label str = 3
    // [17] (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2
    // [18] call print_str 
    // [27] phi from print_str_ln to print_str [phi:print_str_ln->print_str]
  print_str_from_print_str_ln:
    jsr print_str
    // [19] phi from print_str_ln to print_str_ln::@1 [phi:print_str_ln->print_str_ln::@1]
  b1_from_print_str_ln:
    jmp b1
    // print_str_ln::@1
  b1:
    // [20] call print_ln 
    // [22] phi from print_str_ln::@1 to print_ln [phi:print_str_ln::@1->print_ln]
  print_ln_from_b1:
    jsr print_ln
    jmp breturn
    // print_str_ln::@return
  breturn:
    // [21] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [23] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
  b1_from_print_ln:
  b1_from_b1:
    // [23] phi (byte*) print_line_cursor#13 = (byte*) print_line_cursor#22 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
    // print_ln::@1
  b1:
    // [24] (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#13 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [25] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
    // print_ln::@return
  breturn:
    // [26] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zeropage(3) str)
print_str: {
    .label str = 3
    // [28] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  b1_from_print_str:
  b1_from_b2:
    // [28] phi (byte*) print_char_cursor#17 = (byte*) print_char_cursor#27 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
    // [28] phi (byte*) print_str::str#2 = (byte*) print_str::str#0 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    jmp b1
    // print_str::@1
  b1:
    // [29] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne b2
    jmp breturn
    // print_str::@return
  breturn:
    // [30] return 
    rts
    // print_str::@2
  b2:
    // [31] *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#2) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
    // [32] (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [33] (byte*) print_str::str#1 ← ++ (byte*) print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp b1_from_b2
}
  // game_ready
game_ready: {
    // [34] if((byte) action_count#13!=(byte) 0) goto game_ready::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b3_from_game_ready
    // [36] phi from game_ready to game_ready::@1 [phi:game_ready->game_ready::@1]
  b1_from_game_ready:
    // [36] phi (byte) action_count#10 = (const byte) READY_FRAMES#0 [phi:game_ready->game_ready::@1#0] -- vbuxx=vbuc1 
    ldx #READY_FRAMES
    jmp b1
    // [35] phi from game_ready to game_ready::@3 [phi:game_ready->game_ready::@3]
  b3_from_game_ready:
    jmp b3
    // game_ready::@3
  b3:
    // [36] phi from game_ready::@3 to game_ready::@1 [phi:game_ready::@3->game_ready::@1]
  b1_from_b3:
    // [36] phi (byte) action_count#10 = (byte) action_count#13 [phi:game_ready::@3->game_ready::@1#0] -- register_copy 
    jmp b1
    // game_ready::@1
  b1:
    // [37] call print_str_ln 
    // [16] phi from game_ready::@1 to print_str_ln [phi:game_ready::@1->print_str_ln]
  print_str_ln_from_b1:
    // [16] phi (byte*) print_line_cursor#22 = (byte*) print_line_cursor#24 [phi:game_ready::@1->print_str_ln#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#30 [phi:game_ready::@1->print_str_ln#1] -- register_copy 
    // [16] phi (byte*) print_str_ln::str#2 = (const string) game_ready::str [phi:game_ready::@1->print_str_ln#2] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_ln.str
    lda #>str
    sta.z print_str_ln.str+1
    jsr print_str_ln
    jmp b2
    // game_ready::@2
  b2:
    // [38] (byte) action_count#11 ← -- (byte) action_count#10 -- vbuxx=_dec_vbuxx 
    dex
    // [39] (bool) game_ready::return#1 ← (byte) action_count#11 == (byte) 0 -- vboaa=vbuxx_eq_vbuc1 
    lda #1
    cpx #0
    beq !+
    lda #0
  !:
    jmp breturn
    // game_ready::@return
  breturn:
    // [40] return 
    rts
    str: .text "ready"
    .byte 0
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction ldx #0 with TAX
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b2 with b1
Replacing label b3_from_game_ready with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_print_str_ln:
Removing instruction print_ln_from_b1:
Removing instruction b1_from_print_ln:
Removing instruction b1_from_b1:
Removing instruction b1_from_print_str:
Removing instruction b1_from_b2:
Removing instruction b3_from_game_ready:
Removing instruction b3:
Removing instruction b1_from_b3:
Removing instruction print_str_ln_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b4:
Removing instruction print_str_ln_from_b3:
Removing instruction breturn:
Removing instruction b1_from_b5:
Removing instruction print_str_from_print_str_ln:
Removing instruction b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction b1_from_game_ready:
Removing instruction b2:
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
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(byte) READY_FRAMES
(const byte) READY_FRAMES#0 READY_FRAMES = (byte) 5
(byte) action_count
(byte) action_count#10 reg byte x 2.0
(byte) action_count#11 reg byte x 1.25
(byte) action_count#13 reg byte x 5.0
(bool()) game_ready()
(label) game_ready::@1
(label) game_ready::@2
(label) game_ready::@3
(label) game_ready::@return
(bool) game_ready::return
(bool) game_ready::return#0 reg byte a 22.0
(bool) game_ready::return#1 reg byte a 4.333333333333333
(const string) game_ready::str str = (string) "ready"
(void()) main()
(bool~) main::$0 reg byte a 22.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@return
(byte) main::i
(byte) main::i#1 i zp ZP_BYTE:2 11.0
(byte) main::i#2 i zp ZP_BYTE:2 3.142857142857143
(const string) main::str str = (string) "ready!"
(byte*) print_char_cursor
(byte*) print_char_cursor#17 print_char_cursor zp ZP_WORD:7 40.6
(byte*) print_char_cursor#27 print_char_cursor zp ZP_WORD:7 5.0
(byte*) print_char_cursor#30 print_char_cursor zp ZP_WORD:7 3.25
(byte*) print_char_cursor#4 print_char_cursor zp ZP_WORD:7 101.0
(byte*~) print_char_cursor#41 print_char_cursor zp ZP_WORD:7 22.0
(byte*~) print_char_cursor#44 print_char_cursor zp ZP_WORD:7 22.0
(byte*) print_line_cursor
(byte*) print_line_cursor#13 print_line_cursor zp ZP_WORD:5 204.0
(byte*) print_line_cursor#14 print_line_cursor zp ZP_WORD:5 19.27777777777778
(byte*) print_line_cursor#22 print_line_cursor zp ZP_WORD:5 3.0
(byte*) print_line_cursor#24 print_line_cursor zp ZP_WORD:5 3.25
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0 str zp ZP_WORD:3 2.0
(byte*) print_str::str#1 str zp ZP_WORD:3 202.0
(byte*) print_str::str#2 str zp ZP_WORD:3 101.5
(void()) print_str_ln((byte*) print_str_ln::str)
(label) print_str_ln::@1
(label) print_str_ln::@return
(byte*) print_str_ln::str
(byte*) print_str_ln::str#2 str zp ZP_WORD:3 2.0

zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
zp ZP_WORD:3 [ print_str_ln::str#2 print_str::str#2 print_str::str#0 print_str::str#1 ]
zp ZP_WORD:5 [ print_line_cursor#13 print_line_cursor#22 print_line_cursor#24 print_line_cursor#14 ]
zp ZP_WORD:7 [ print_char_cursor#17 print_char_cursor#27 print_char_cursor#30 print_char_cursor#44 print_char_cursor#41 print_char_cursor#4 ]
reg byte x [ action_count#10 action_count#13 action_count#11 ]
reg byte a [ game_ready::return#0 ]
reg byte a [ main::$0 ]
reg byte a [ game_ready::return#1 ]


FINAL ASSEMBLER
Score: 9940

  // File Comments
// Adding a missing word-fragment for Travis Fisher
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .const READY_FRAMES = 5
  .label print_char_cursor = 7
  .label print_line_cursor = 5
  // @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 i = 2
    // [5] phi from main to main::@1 [phi:main->main::@1]
    // [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [5] phi (byte) action_count#13 = (byte) 0 [phi:main->main::@1#1] -- vbuxx=vbuc1 
    tax
    // [5] phi (byte*) print_line_cursor#24 = (byte*) 1024 [phi:main->main::@1#2] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [5] phi (byte*) print_char_cursor#30 = (byte*) 1024 [phi:main->main::@1#3] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // main::@1
  b1:
    // game_ready()
    // [6] call game_ready 
    jsr game_ready
    // [7] (bool) game_ready::return#0 ← (bool) game_ready::return#1
    // main::@4
    // [8] (bool~) main::$0 ← (bool) game_ready::return#0
    // if(game_ready())
    // [9] if((bool~) main::$0) goto main::@3 -- vboaa_then_la1 
    cmp #0
    bne b3
    jmp b2
    // main::@3
  b3:
    // [10] (byte*~) print_char_cursor#41 ← (byte*) print_line_cursor#14 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // print_str_ln("ready!")
    // [11] call print_str_ln 
    // [16] phi from main::@3 to print_str_ln [phi:main::@3->print_str_ln]
    // [16] phi (byte*) print_line_cursor#22 = (byte*) print_line_cursor#14 [phi:main::@3->print_str_ln#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#27 = (byte*~) print_char_cursor#41 [phi:main::@3->print_str_ln#1] -- register_copy 
    // [16] phi (byte*) print_str_ln::str#2 = (const string) main::str [phi:main::@3->print_str_ln#2] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_ln.str
    lda #>str
    sta.z print_str_ln.str+1
    jsr print_str_ln
    // main::@2
  b2:
    // for(byte i:0..5)
    // [12] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [13] if((byte) main::i#1!=(byte) 6) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 
    lda #6
    cmp.z i
    bne b5
    // main::@return
    // }
    // [14] return 
    rts
    // main::@5
  b5:
    // [15] (byte*~) print_char_cursor#44 ← (byte*) print_line_cursor#14 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [5] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
    // [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@5->main::@1#0] -- register_copy 
    // [5] phi (byte) action_count#13 = (byte) action_count#11 [phi:main::@5->main::@1#1] -- register_copy 
    // [5] phi (byte*) print_line_cursor#24 = (byte*) print_line_cursor#14 [phi:main::@5->main::@1#2] -- register_copy 
    // [5] phi (byte*) print_char_cursor#30 = (byte*~) print_char_cursor#44 [phi:main::@5->main::@1#3] -- register_copy 
    jmp b1
    str: .text "ready!"
    .byte 0
}
  // print_str_ln
// Print a zero-terminated string followed by a newline
// print_str_ln(byte* zeropage(3) str)
print_str_ln: {
    .label str = 3
    // print_str(str)
    // [17] (byte*) print_str::str#0 ← (byte*) print_str_ln::str#2
    // [18] call print_str 
    // [27] phi from print_str_ln to print_str [phi:print_str_ln->print_str]
    jsr print_str
    // [19] phi from print_str_ln to print_str_ln::@1 [phi:print_str_ln->print_str_ln::@1]
    // print_str_ln::@1
    // print_ln()
    // [20] call print_ln 
    // [22] phi from print_str_ln::@1 to print_ln [phi:print_str_ln::@1->print_ln]
    jsr print_ln
    // print_str_ln::@return
    // }
    // [21] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [23] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
    // [23] phi (byte*) print_line_cursor#13 = (byte*) print_line_cursor#22 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  b1:
    // print_line_cursor + $28
    // [24] (byte*) print_line_cursor#14 ← (byte*) print_line_cursor#13 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // while (print_line_cursor<print_char_cursor)
    // [25] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc b1
  !:
    // print_ln::@return
    // }
    // [26] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zeropage(3) str)
print_str: {
    .label str = 3
    // [28] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
    // [28] phi (byte*) print_char_cursor#17 = (byte*) print_char_cursor#27 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
    // [28] phi (byte*) print_str::str#2 = (byte*) print_str::str#0 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    // print_str::@1
  b1:
    // while(*str)
    // [29] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne b2
    // print_str::@return
    // }
    // [30] return 
    rts
    // print_str::@2
  b2:
    // *(print_char_cursor++) = *(str++)
    // [31] *((byte*) print_char_cursor#17) ← *((byte*) print_str::str#2) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    sta (print_char_cursor),y
    // *(print_char_cursor++) = *(str++);
    // [32] (byte*) print_char_cursor#4 ← ++ (byte*) print_char_cursor#17 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [33] (byte*) print_str::str#1 ← ++ (byte*) print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp b1
}
  // game_ready
game_ready: {
    // if (action_count == 0)
    // [34] if((byte) action_count#13!=(byte) 0) goto game_ready::@3 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne b1
    // [36] phi from game_ready to game_ready::@1 [phi:game_ready->game_ready::@1]
    // [36] phi (byte) action_count#10 = (const byte) READY_FRAMES#0 [phi:game_ready->game_ready::@1#0] -- vbuxx=vbuc1 
    ldx #READY_FRAMES
    // [35] phi from game_ready to game_ready::@3 [phi:game_ready->game_ready::@3]
    // game_ready::@3
    // [36] phi from game_ready::@3 to game_ready::@1 [phi:game_ready::@3->game_ready::@1]
    // [36] phi (byte) action_count#10 = (byte) action_count#13 [phi:game_ready::@3->game_ready::@1#0] -- register_copy 
    // game_ready::@1
  b1:
    // print_str_ln("ready")
    // [37] call print_str_ln 
    // [16] phi from game_ready::@1 to print_str_ln [phi:game_ready::@1->print_str_ln]
    // [16] phi (byte*) print_line_cursor#22 = (byte*) print_line_cursor#24 [phi:game_ready::@1->print_str_ln#0] -- register_copy 
    // [16] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#30 [phi:game_ready::@1->print_str_ln#1] -- register_copy 
    // [16] phi (byte*) print_str_ln::str#2 = (const string) game_ready::str [phi:game_ready::@1->print_str_ln#2] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str_ln.str
    lda #>str
    sta.z print_str_ln.str+1
    jsr print_str_ln
    // game_ready::@2
    // action_count--;
    // [38] (byte) action_count#11 ← -- (byte) action_count#10 -- vbuxx=_dec_vbuxx 
    dex
    // action_count==0
    // [39] (bool) game_ready::return#1 ← (byte) action_count#11 == (byte) 0 -- vboaa=vbuxx_eq_vbuc1 
    lda #1
    cpx #0
    beq !+
    lda #0
  !:
    // game_ready::@return
    // }
    // [40] return 
    rts
    str: .text "ready"
    .byte 0
}
  // File Data

