Resolved forward reference rand_seed to (word) rand_seed
Setting inferred volatile on symbol affected by address-of (word) last_time
Setting inferred volatile on symbol affected by address-of (word) rand_seed
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*) strlen::str)
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 condition (byte) sum::i
Warning! Adding boolean cast to non-boolean sub-expression (byte) print_str_lines::ch
Identified constant variable (byte*) HEAP_TOP
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
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) utoa::@13
Culled Empty Block (label) utoa::@5
Culled Empty Block (label) utoa::@14
Culled Empty Block (label) utoa::@6
Culled Empty Block (label) utoa::@15
Culled Empty Block (label) utoa::@7
Culled Empty Block (label) utoa::@16
Culled Empty Block (label) utoa::@17
Culled Empty Block (label) utoa::@22
Culled Empty Block (label) utoa::@23
Culled Empty Block (label) utoa::@25
Culled Empty Block (label) @10
Culled Empty Block (label) utoa_append::@4
Culled Empty Block (label) utoa_append::@5
Culled Empty Block (label) utoa_append::@6
Culled Empty Block (label) utoa_append::@7
Culled Empty Block (label) @11
Culled Empty Block (label) @12
Culled Empty Block (label) @14
Culled Empty Block (label) @15
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) @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) @36
Culled Empty Block (label) @37
Culled Empty Block (label) @38
Culled Empty Block (label) @39
Culled Empty Block (label) @40
Culled Empty Block (label) @41
Culled Empty Block (label) @42
Culled Empty Block (label) @44
Culled Empty Block (label) @46
Culled Empty Block (label) sum::@7
Culled Empty Block (label) sum::@8
Culled Empty Block (label) sum::@6
Culled Empty Block (label) sum::@9
Culled Empty Block (label) @47
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@6
Culled Empty Block (label) main::@7

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

(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa]  from print_word_decimal
  (byte*) utoa::buffer#21 ← phi( print_word_decimal/(byte*) utoa::buffer#5 )
  (word) utoa::value#12 ← phi( print_word_decimal/(word) utoa::value#1 )
  (byte) utoa::radix#1 ← phi( print_word_decimal/(byte) utoa::radix#0 )
  (byte) utoa::max_digits#0 ← (byte) 0
  (word*) utoa::digit_values#0 ← (word*) 0
  (bool~) utoa::$0 ← (byte) utoa::radix#1 == (const byte) DECIMAL
  if((bool~) utoa::$0) goto utoa::@1
  to:utoa::@9
utoa::@1: scope:[utoa]  from utoa
  (byte*) utoa::buffer#17 ← phi( utoa/(byte*) utoa::buffer#21 )
  (word) utoa::value#8 ← phi( utoa/(word) utoa::value#12 )
  (byte) utoa::max_digits#1 ← (number) 5
  (word*) utoa::digit_values#1 ← (const word*) RADIX_DECIMAL_VALUES
  to:utoa::@8
utoa::@9: scope:[utoa]  from utoa
  (word) utoa::value#13 ← phi( utoa/(word) utoa::value#12 )
  (byte*) utoa::buffer#16 ← phi( utoa/(byte*) utoa::buffer#21 )
  (byte) utoa::radix#2 ← phi( utoa/(byte) utoa::radix#1 )
  (bool~) utoa::$1 ← (byte) utoa::radix#2 == (const byte) HEXADECIMAL
  if((bool~) utoa::$1) goto utoa::@2
  to:utoa::@10
utoa::@2: scope:[utoa]  from utoa::@9
  (byte*) utoa::buffer#18 ← phi( utoa::@9/(byte*) utoa::buffer#16 )
  (word) utoa::value#9 ← phi( utoa::@9/(word) utoa::value#13 )
  (byte) utoa::max_digits#2 ← (number) 4
  (word*) utoa::digit_values#2 ← (const word*) RADIX_HEXADECIMAL_VALUES
  to:utoa::@8
utoa::@10: scope:[utoa]  from utoa::@9
  (word) utoa::value#14 ← phi( utoa::@9/(word) utoa::value#13 )
  (byte*) utoa::buffer#13 ← phi( utoa::@9/(byte*) utoa::buffer#16 )
  (byte) utoa::radix#3 ← phi( utoa::@9/(byte) utoa::radix#2 )
  (bool~) utoa::$2 ← (byte) utoa::radix#3 == (const byte) OCTAL
  if((bool~) utoa::$2) goto utoa::@3
  to:utoa::@11
utoa::@3: scope:[utoa]  from utoa::@10
  (byte*) utoa::buffer#19 ← phi( utoa::@10/(byte*) utoa::buffer#13 )
  (word) utoa::value#10 ← phi( utoa::@10/(word) utoa::value#14 )
  (byte) utoa::max_digits#3 ← (number) 6
  (word*) utoa::digit_values#3 ← (const word*) RADIX_OCTAL_VALUES
  to:utoa::@8
utoa::@11: scope:[utoa]  from utoa::@10
  (word) utoa::value#15 ← phi( utoa::@10/(word) utoa::value#14 )
  (byte*) utoa::buffer#10 ← phi( utoa::@10/(byte*) utoa::buffer#13 )
  (byte) utoa::radix#4 ← phi( utoa::@10/(byte) utoa::radix#3 )
  (bool~) utoa::$3 ← (byte) utoa::radix#4 == (const byte) BINARY
  if((bool~) utoa::$3) goto utoa::@4
  to:utoa::@12
utoa::@4: scope:[utoa]  from utoa::@11
  (byte*) utoa::buffer#20 ← phi( utoa::@11/(byte*) utoa::buffer#10 )
  (word) utoa::value#11 ← phi( utoa::@11/(word) utoa::value#15 )
  (byte) utoa::max_digits#4 ← (number) $10
  (word*) utoa::digit_values#4 ← (const word*) RADIX_BINARY_VALUES
  to:utoa::@8
utoa::@12: scope:[utoa]  from utoa::@11
  (byte*) utoa::buffer#6 ← phi( utoa::@11/(byte*) utoa::buffer#10 )
  *((byte*) utoa::buffer#6) ← (byte) 'e'
  (byte*) utoa::buffer#0 ← ++ (byte*) utoa::buffer#6
  *((byte*) utoa::buffer#0) ← (byte) 'r'
  (byte*) utoa::buffer#1 ← ++ (byte*) utoa::buffer#0
  *((byte*) utoa::buffer#1) ← (byte) 'r'
  (byte*) utoa::buffer#2 ← ++ (byte*) utoa::buffer#1
  *((byte*) utoa::buffer#2) ← (number) 0
  to:utoa::@return
utoa::@return: scope:[utoa]  from utoa::@12 utoa::@20
  return 
  to:@return
utoa::@8: scope:[utoa]  from utoa::@1 utoa::@2 utoa::@3 utoa::@4
  (byte*) utoa::buffer#15 ← phi( utoa::@1/(byte*) utoa::buffer#17 utoa::@2/(byte*) utoa::buffer#18 utoa::@3/(byte*) utoa::buffer#19 utoa::@4/(byte*) utoa::buffer#20 )
  (word) utoa::value#7 ← phi( utoa::@1/(word) utoa::value#8 utoa::@2/(word) utoa::value#9 utoa::@3/(word) utoa::value#10 utoa::@4/(word) utoa::value#11 )
  (word*) utoa::digit_values#8 ← phi( utoa::@1/(word*) utoa::digit_values#1 utoa::@2/(word*) utoa::digit_values#2 utoa::@3/(word*) utoa::digit_values#3 utoa::@4/(word*) utoa::digit_values#4 )
  (byte) utoa::max_digits#7 ← phi( utoa::@1/(byte) utoa::max_digits#1 utoa::@2/(byte) utoa::max_digits#2 utoa::@3/(byte) utoa::max_digits#3 utoa::@4/(byte) utoa::max_digits#4 )
  (byte) utoa::started#0 ← (byte) 0
  (byte) utoa::digit#0 ← (byte) 0
  to:utoa::@18
utoa::@18: scope:[utoa]  from utoa::@21 utoa::@8
  (byte*) utoa::buffer#11 ← phi( utoa::@21/(byte*) utoa::buffer#14 utoa::@8/(byte*) utoa::buffer#15 )
  (byte) utoa::started#3 ← phi( utoa::@21/(byte) utoa::started#4 utoa::@8/(byte) utoa::started#0 )
  (word) utoa::value#5 ← phi( utoa::@21/(word) utoa::value#6 utoa::@8/(word) utoa::value#7 )
  (word*) utoa::digit_values#6 ← phi( utoa::@21/(word*) utoa::digit_values#7 utoa::@8/(word*) utoa::digit_values#8 )
  (byte) utoa::digit#2 ← phi( utoa::@21/(byte) utoa::digit#1 utoa::@8/(byte) utoa::digit#0 )
  (byte) utoa::max_digits#5 ← phi( utoa::@21/(byte) utoa::max_digits#6 utoa::@8/(byte) utoa::max_digits#7 )
  (number~) utoa::$5 ← (byte) utoa::max_digits#5 - (number) 1
  (bool~) utoa::$6 ← (byte) utoa::digit#2 < (number~) utoa::$5
  if((bool~) utoa::$6) goto utoa::@19
  to:utoa::@20
utoa::@19: scope:[utoa]  from utoa::@18
  (byte) utoa::max_digits#8 ← phi( utoa::@18/(byte) utoa::max_digits#5 )
  (byte*) utoa::buffer#12 ← phi( utoa::@18/(byte*) utoa::buffer#11 )
  (byte) utoa::started#2 ← phi( utoa::@18/(byte) utoa::started#3 )
  (word) utoa::value#2 ← phi( utoa::@18/(word) utoa::value#5 )
  (word*) utoa::digit_values#5 ← phi( utoa::@18/(word*) utoa::digit_values#6 )
  (byte) utoa::digit#3 ← phi( utoa::@18/(byte) utoa::digit#2 )
  (byte~) utoa::$11 ← (byte) utoa::digit#3 * (const byte) SIZEOF_WORD
  (word) utoa::digit_value#0 ← *((word*) utoa::digit_values#5 + (byte~) utoa::$11)
  (bool~) utoa::$7 ← (word) utoa::value#2 >= (word) utoa::digit_value#0
  (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7
  (bool~) utoa::$9 ← ! (bool~) utoa::$8
  if((bool~) utoa::$9) goto utoa::@21
  to:utoa::@24
utoa::@20: scope:[utoa]  from utoa::@18
  (byte*) utoa::buffer#7 ← phi( utoa::@18/(byte*) utoa::buffer#11 )
  (word) utoa::value#3 ← phi( utoa::@18/(word) utoa::value#5 )
  (byte~) utoa::$4 ← ((byte)) (word) utoa::value#3
  *((byte*) utoa::buffer#7) ← *((const byte*) DIGITS + (byte~) utoa::$4)
  (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#7
  *((byte*) utoa::buffer#3) ← (number) 0
  to:utoa::@return
utoa::@21: scope:[utoa]  from utoa::@19 utoa::@26
  (byte*) utoa::buffer#14 ← phi( utoa::@19/(byte*) utoa::buffer#12 utoa::@26/(byte*) utoa::buffer#4 )
  (byte) utoa::started#4 ← phi( utoa::@19/(byte) utoa::started#2 utoa::@26/(byte) utoa::started#1 )
  (word) utoa::value#6 ← phi( utoa::@19/(word) utoa::value#2 utoa::@26/(word) utoa::value#0 )
  (word*) utoa::digit_values#7 ← phi( utoa::@19/(word*) utoa::digit_values#5 utoa::@26/(word*) utoa::digit_values#9 )
  (byte) utoa::max_digits#6 ← phi( utoa::@19/(byte) utoa::max_digits#8 utoa::@26/(byte) utoa::max_digits#9 )
  (byte) utoa::digit#4 ← phi( utoa::@19/(byte) utoa::digit#3 utoa::@26/(byte) utoa::digit#5 )
  (byte) utoa::digit#1 ← ++ (byte) utoa::digit#4
  to:utoa::@18
utoa::@24: scope:[utoa]  from utoa::@19
  (word*) utoa::digit_values#10 ← phi( utoa::@19/(word*) utoa::digit_values#5 )
  (byte) utoa::max_digits#10 ← phi( utoa::@19/(byte) utoa::max_digits#8 )
  (byte) utoa::digit#6 ← phi( utoa::@19/(byte) utoa::digit#3 )
  (word) utoa::digit_value#1 ← phi( utoa::@19/(word) utoa::digit_value#0 )
  (word) utoa::value#4 ← phi( utoa::@19/(word) utoa::value#2 )
  (byte*) utoa::buffer#8 ← phi( utoa::@19/(byte*) utoa::buffer#12 )
  (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#8
  (word) utoa_append::value#0 ← (word) utoa::value#4
  (word) utoa_append::sub#0 ← (word) utoa::digit_value#1
  call utoa_append 
  (word) utoa_append::return#0 ← (word) utoa_append::return#2
  to:utoa::@26
utoa::@26: scope:[utoa]  from utoa::@24
  (word*) utoa::digit_values#9 ← phi( utoa::@24/(word*) utoa::digit_values#10 )
  (byte) utoa::max_digits#9 ← phi( utoa::@24/(byte) utoa::max_digits#10 )
  (byte) utoa::digit#5 ← phi( utoa::@24/(byte) utoa::digit#6 )
  (byte*) utoa::buffer#9 ← phi( utoa::@24/(byte*) utoa::buffer#8 )
  (word) utoa_append::return#3 ← phi( utoa::@24/(word) utoa_append::return#0 )
  (word~) utoa::$10 ← (word) utoa_append::return#3
  (word) utoa::value#0 ← (word~) utoa::$10
  (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#9
  (byte) utoa::started#1 ← (number) 1
  to:utoa::@21

(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append]  from utoa::@24
  (byte*) utoa_append::buffer#3 ← phi( utoa::@24/(byte*) utoa_append::buffer#0 )
  (word) utoa_append::sub#3 ← phi( utoa::@24/(word) utoa_append::sub#0 )
  (word) utoa_append::value#5 ← phi( utoa::@24/(word) utoa_append::value#0 )
  (byte) utoa_append::digit#0 ← (byte) 0
  to:utoa_append::@1
utoa_append::@1: scope:[utoa_append]  from utoa_append utoa_append::@2
  (byte*) utoa_append::buffer#2 ← phi( utoa_append/(byte*) utoa_append::buffer#3 utoa_append::@2/(byte*) utoa_append::buffer#4 )
  (byte) utoa_append::digit#4 ← phi( utoa_append/(byte) utoa_append::digit#0 utoa_append::@2/(byte) utoa_append::digit#1 )
  (word) utoa_append::sub#1 ← phi( utoa_append/(word) utoa_append::sub#3 utoa_append::@2/(word) utoa_append::sub#2 )
  (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#5 utoa_append::@2/(word) utoa_append::value#1 )
  (bool~) utoa_append::$0 ← (word) utoa_append::value#2 >= (word) utoa_append::sub#1
  if((bool~) utoa_append::$0) goto utoa_append::@2
  to:utoa_append::@3
utoa_append::@2: scope:[utoa_append]  from utoa_append::@1
  (byte*) utoa_append::buffer#4 ← phi( utoa_append::@1/(byte*) utoa_append::buffer#2 )
  (word) utoa_append::sub#2 ← phi( utoa_append::@1/(word) utoa_append::sub#1 )
  (word) utoa_append::value#3 ← phi( utoa_append::@1/(word) utoa_append::value#2 )
  (byte) utoa_append::digit#2 ← phi( utoa_append::@1/(byte) utoa_append::digit#4 )
  (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
  (word) utoa_append::value#1 ← (word) utoa_append::value#3 - (word) utoa_append::sub#2
  to:utoa_append::@1
utoa_append::@3: scope:[utoa_append]  from utoa_append::@1
  (word) utoa_append::value#4 ← phi( utoa_append::@1/(word) utoa_append::value#2 )
  (byte*) utoa_append::buffer#1 ← phi( utoa_append::@1/(byte*) utoa_append::buffer#2 )
  (byte) utoa_append::digit#3 ← phi( utoa_append::@1/(byte) utoa_append::digit#4 )
  *((byte*) utoa_append::buffer#1) ← *((const byte*) DIGITS + (byte) utoa_append::digit#3)
  (word) utoa_append::return#1 ← (word) utoa_append::value#4
  to:utoa_append::@return
utoa_append::@return: scope:[utoa_append]  from utoa_append::@3
  (word) utoa_append::return#4 ← phi( utoa_append::@3/(word) utoa_append::return#1 )
  (word) utoa_append::return#2 ← (word) utoa_append::return#4
  return 
  to:@return
@13: 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:@43

(void()) print_str((byte*) print_str::str)
print_str: scope:[print_str]  from print_word_decimal::@1
  (byte*) print_char_cursor#54 ← phi( print_word_decimal::@1/(byte*) print_char_cursor#48 )
  (byte*) print_str::str#4 ← phi( print_word_decimal::@1/(byte*) print_str::str#1 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  (byte*) print_char_cursor#45 ← phi( print_str/(byte*) print_char_cursor#54 print_str::@2/(byte*) print_char_cursor#1 )
  (byte*) print_str::str#2 ← phi( print_str/(byte*) print_str::str#4 print_str::@2/(byte*) print_str::str#0 )
  (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#23 ← phi( print_str::@1/(byte*) print_char_cursor#45 )
  (byte*) print_str::str#3 ← phi( print_str::@1/(byte*) print_str::str#2 )
  *((byte*) print_char_cursor#23) ← *((byte*) print_str::str#3)
  (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#23
  (byte*) print_str::str#0 ← ++ (byte*) print_str::str#3
  to:print_str::@1
print_str::@return: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#24 ← phi( print_str::@1/(byte*) print_char_cursor#45 )
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#24
  return 
  to:@return

(void()) print_ln()
print_ln: scope:[print_ln]  from end::@2 main::@10
  (byte*) print_char_cursor#46 ← phi( end::@2/(byte*) print_char_cursor#15 main::@10/(byte*) print_char_cursor#18 )
  (byte*) print_line_cursor#18 ← phi( end::@2/(byte*) print_line_cursor#19 main::@10/(byte*) print_line_cursor#20 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#25 ← phi( print_ln/(byte*) print_char_cursor#46 print_ln::@1/(byte*) print_char_cursor#25 )
  (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#18 print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
  (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#25
  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#10 ← phi( print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#3 ← (byte*) print_line_cursor#10
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#26 ← phi( print_ln::@2/(byte*) print_char_cursor#3 )
  (byte*) print_line_cursor#11 ← phi( print_ln::@2/(byte*) print_line_cursor#10 )
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#11
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#26
  return 
  to:@return

(void()) print_word((word) print_word::w)
print_word: scope:[print_word]  from end::@1
  (byte*) print_char_cursor#47 ← phi( end::@1/(byte*) print_char_cursor#50 )
  (word) print_word::w#1 ← phi( end::@1/(word) print_word::w#0 )
  (byte~) print_word::$0 ← > (word) print_word::w#1
  (byte) print_byte::b#0 ← (byte~) print_word::$0
  call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  (word) print_word::w#2 ← phi( print_word/(word) print_word::w#1 )
  (byte*) print_char_cursor#27 ← phi( print_word/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#27
  (byte~) print_word::$2 ← < (word) print_word::w#2
  (byte) print_byte::b#1 ← (byte~) print_word::$2
  call print_byte 
  to:print_word::@2
print_word::@2: scope:[print_word]  from print_word::@1
  (byte*) print_char_cursor#28 ← phi( print_word::@1/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#28
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@2
  (byte*) print_char_cursor#29 ← phi( print_word::@2/(byte*) print_char_cursor#6 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#29
  return 
  to:@return

(void()) print_word_decimal((word) print_word_decimal::w)
print_word_decimal: scope:[print_word_decimal]  from main::@9
  (byte*) print_char_cursor#55 ← phi( main::@9/(byte*) print_char_cursor#51 )
  (word) print_word_decimal::w#1 ← phi( main::@9/(word) print_word_decimal::w#0 )
  (word) utoa::value#1 ← (word) print_word_decimal::w#1
  (byte*) utoa::buffer#5 ← (const byte*) decimal_digits
  (byte) utoa::radix#0 ← (const byte) DECIMAL
  call utoa 
  to:print_word_decimal::@1
print_word_decimal::@1: scope:[print_word_decimal]  from print_word_decimal
  (byte*) print_char_cursor#48 ← phi( print_word_decimal/(byte*) print_char_cursor#55 )
  (byte*) print_str::str#1 ← (const byte*) decimal_digits
  call print_str 
  to:print_word_decimal::@2
print_word_decimal::@2: scope:[print_word_decimal]  from print_word_decimal::@1
  (byte*) print_char_cursor#30 ← phi( print_word_decimal::@1/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#30
  to:print_word_decimal::@return
print_word_decimal::@return: scope:[print_word_decimal]  from print_word_decimal::@2
  (byte*) print_char_cursor#31 ← phi( print_word_decimal::@2/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#31
  return 
  to:@return

(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte]  from print_word print_word::@1
  (byte*) print_char_cursor#49 ← phi( print_word/(byte*) print_char_cursor#47 print_word::@1/(byte*) print_char_cursor#5 )
  (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
  (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 )
  (byte*) print_char_cursor#32 ← phi( print_byte/(byte*) print_char_cursor#14 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#32
  (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
  (byte) print_char::ch#1 ← *((const byte*) print_hextab + (number~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#33 ← phi( print_byte::@1/(byte*) print_char_cursor#14 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#33
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#34 ← phi( print_byte::@2/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#34
  return 
  to:@return

(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char]  from print_byte print_byte::@1
  (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#49 print_byte::@1/(byte*) print_char_cursor#10 )
  (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2
  (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#35
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#36 ← phi( print_char/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#36
  return 
  to:@return
@43: scope:[]  from @13
  (byte*) print_line_cursor#28 ← phi( @13/(byte*) print_line_cursor#0 )
  (byte*) print_char_cursor#60 ← phi( @13/(byte*) print_char_cursor#0 )
  (word) last_time ← (word) 0
  (word) Ticks#0 ← (word) 0
  to:@45

(void()) start()
start: scope:[start]  from end main
  asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
  (word) rand_seed ← (number) $194a
  to:start::@return
start::@return: scope:[start]  from start
  return 
  to:@return

(void()) end()
end: scope:[end]  from main::@3
  (byte*) print_line_cursor#27 ← phi( main::@3/(byte*) print_line_cursor#21 )
  (byte*) print_char_cursor#56 ← phi( main::@3/(byte*) print_char_cursor#52 )
  (word) Ticks#1 ← (word) last_time
  call start 
  to:end::@1
end::@1: scope:[end]  from end
  (byte*) print_line_cursor#23 ← phi( end/(byte*) print_line_cursor#27 )
  (byte*) print_char_cursor#50 ← phi( end/(byte*) print_char_cursor#56 )
  (word) Ticks#7 ← phi( end/(word) Ticks#1 )
  (word) last_time ← (word) last_time - (word) Ticks#7
  (word) Ticks#2 ← (word) last_time
  (word) print_word::w#0 ← (word) Ticks#2
  call print_word 
  to:end::@2
end::@2: scope:[end]  from end::@1
  (word) Ticks#15 ← phi( end::@1/(word) Ticks#2 )
  (byte*) print_line_cursor#19 ← phi( end::@1/(byte*) print_line_cursor#23 )
  (byte*) print_char_cursor#37 ← phi( end::@1/(byte*) print_char_cursor#7 )
  (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#37
  call print_ln 
  to:end::@3
end::@3: scope:[end]  from end::@2
  (word) Ticks#12 ← phi( end::@2/(word) Ticks#15 )
  (byte*) print_char_cursor#38 ← phi( end::@2/(byte*) print_char_cursor#4 )
  (byte*) print_line_cursor#12 ← phi( end::@2/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#3 ← (byte*) print_line_cursor#12
  (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#38
  to:end::@return
end::@return: scope:[end]  from end::@3
  (byte*) print_line_cursor#13 ← phi( end::@3/(byte*) print_line_cursor#3 )
  (byte*) print_char_cursor#39 ← phi( end::@3/(byte*) print_char_cursor#16 )
  (word) Ticks#8 ← phi( end::@3/(word) Ticks#12 )
  (word) Ticks#3 ← (word) Ticks#8
  (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#39
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#13
  return 
  to:@return
@45: scope:[]  from @43
  (word) Ticks#17 ← phi( @43/(word) Ticks#0 )
  (byte*) print_line_cursor#26 ← phi( @43/(byte*) print_line_cursor#28 )
  (byte*) print_char_cursor#59 ← phi( @43/(byte*) print_char_cursor#60 )
  (word) rand_seed ← (word) 0
  to:@48

(word()) sum()
sum: scope:[sum]  from main::@2
  (word) sum::s#0 ← (word) 0
  (byte*) sum::p#0 ← (byte*) 0
  (byte) sum::page#0 ← (byte) 0
  (byte) sum::i#0 ← (byte) 0
  (byte) sum::tmp#0 ← (byte) 0
  (byte*) sum::p#1 ← (const byte*) rom
  (word) sum::s#1 ← (number) 0
  (byte) sum::page#1 ← (number) 0
  to:sum::@1
sum::@1: scope:[sum]  from sum sum::@5
  (byte*) sum::p#6 ← phi( sum/(byte*) sum::p#1 sum::@5/(byte*) sum::p#2 )
  (word) sum::s#5 ← phi( sum/(word) sum::s#1 sum::@5/(word) sum::s#7 )
  (byte) sum::page#3 ← phi( sum/(byte) sum::page#1 sum::@5/(byte) sum::page#2 )
  (bool~) sum::$0 ← (byte) sum::page#3 < (number) $20
  if((bool~) sum::$0) goto sum::@2
  to:sum::@3
sum::@2: scope:[sum]  from sum::@1
  (byte) sum::page#6 ← phi( sum::@1/(byte) sum::page#3 )
  (word) sum::s#6 ← phi( sum::@1/(word) sum::s#5 )
  (byte*) sum::p#5 ← phi( sum::@1/(byte*) sum::p#6 )
  (byte) sum::i#1 ← (number) 0
  to:sum::@4
sum::@3: scope:[sum]  from sum::@1
  (word) sum::s#3 ← phi( sum::@1/(word) sum::s#5 )
  (word) sum::return#0 ← (word) sum::s#3
  to:sum::@return
sum::@4: scope:[sum]  from sum::@2 sum::@4
  (byte) sum::page#5 ← phi( sum::@2/(byte) sum::page#6 sum::@4/(byte) sum::page#5 )
  (word) sum::s#4 ← phi( sum::@2/(word) sum::s#6 sum::@4/(word) sum::s#2 )
  (byte) sum::i#3 ← phi( sum::@2/(byte) sum::i#1 sum::@4/(byte) sum::i#2 )
  (byte*) sum::p#3 ← phi( sum::@2/(byte*) sum::p#5 sum::@4/(byte*) sum::p#3 )
  (byte) sum::tmp#1 ← *((byte*) sum::p#3 + (byte) sum::i#3)
  (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1
  (byte) sum::i#2 ← ++ (byte) sum::i#3
  (bool~) sum::$1 ← (number) 0 != (byte) sum::i#2
  if((bool~) sum::$1) goto sum::@4
  to:sum::@5
sum::@5: scope:[sum]  from sum::@4
  (word) sum::s#7 ← phi( sum::@4/(word) sum::s#2 )
  (byte) sum::page#4 ← phi( sum::@4/(byte) sum::page#5 )
  (byte*) sum::p#4 ← phi( sum::@4/(byte*) sum::p#3 )
  (byte*) sum::p#2 ← (byte*) sum::p#4 + (number) $100
  (byte) sum::page#2 ← ++ (byte) sum::page#4
  to:sum::@1
sum::@return: scope:[sum]  from sum::@3
  (word) sum::return#3 ← phi( sum::@3/(word) sum::return#0 )
  (word) sum::return#1 ← (word) sum::return#3
  return 
  to:@return

(signed word()) main()
main: scope:[main]  from @48
  (byte*) print_line_cursor#31 ← phi( @48/(byte*) print_line_cursor#22 )
  (byte*) print_char_cursor#62 ← phi( @48/(byte*) print_char_cursor#53 )
  (word) Ticks#20 ← phi( @48/(word) Ticks#14 )
  (word) main::i#0 ← (word) 0
  call start 
  to:main::@8
main::@8: scope:[main]  from main
  (byte*) print_line_cursor#29 ← phi( main/(byte*) print_line_cursor#31 )
  (byte*) print_char_cursor#61 ← phi( main/(byte*) print_char_cursor#62 )
  (word) Ticks#19 ← phi( main/(word) Ticks#20 )
  (word) main::i#1 ← (number) 0
  to:main::@1
main::@1: scope:[main]  from main::@11 main::@8
  (byte*) print_line_cursor#25 ← phi( main::@11/(byte*) print_line_cursor#5 main::@8/(byte*) print_line_cursor#29 )
  (byte*) print_char_cursor#58 ← phi( main::@11/(byte*) print_char_cursor#19 main::@8/(byte*) print_char_cursor#61 )
  (word) Ticks#16 ← phi( main::@11/(word) Ticks#18 main::@8/(word) Ticks#19 )
  (word) main::i#3 ← phi( main::@11/(word) main::i#2 main::@8/(word) main::i#1 )
  (bool~) main::$2 ← (word) main::i#3 < (number) 6
  if((bool~) main::$2) goto main::@2
  to:main::@3
main::@2: scope:[main]  from main::@1
  (word) Ticks#23 ← phi( main::@1/(word) Ticks#16 )
  (word) main::i#7 ← phi( main::@1/(word) main::i#3 )
  (byte*) print_line_cursor#30 ← phi( main::@1/(byte*) print_line_cursor#25 )
  (byte*) print_char_cursor#57 ← phi( main::@1/(byte*) print_char_cursor#58 )
  call sum 
  (word) sum::return#2 ← (word) sum::return#1
  to:main::@9
main::@9: scope:[main]  from main::@2
  (word) Ticks#22 ← phi( main::@2/(word) Ticks#23 )
  (word) main::i#6 ← phi( main::@2/(word) main::i#7 )
  (byte*) print_line_cursor#24 ← phi( main::@2/(byte*) print_line_cursor#30 )
  (byte*) print_char_cursor#51 ← phi( main::@2/(byte*) print_char_cursor#57 )
  (word) sum::return#4 ← phi( main::@2/(word) sum::return#2 )
  (word~) main::$3 ← (word) sum::return#4
  (word) print_word_decimal::w#0 ← (word~) main::$3
  call print_word_decimal 
  to:main::@10
main::@10: scope:[main]  from main::@9
  (word) Ticks#21 ← phi( main::@9/(word) Ticks#22 )
  (word) main::i#5 ← phi( main::@9/(word) main::i#6 )
  (byte*) print_line_cursor#20 ← phi( main::@9/(byte*) print_line_cursor#24 )
  (byte*) print_char_cursor#40 ← phi( main::@9/(byte*) print_char_cursor#9 )
  (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#40
  call print_ln 
  to:main::@11
main::@11: scope:[main]  from main::@10
  (word) Ticks#18 ← phi( main::@10/(word) Ticks#21 )
  (word) main::i#4 ← phi( main::@10/(word) main::i#5 )
  (byte*) print_char_cursor#41 ← phi( main::@10/(byte*) print_char_cursor#4 )
  (byte*) print_line_cursor#14 ← phi( main::@10/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#14
  (byte*) print_char_cursor#19 ← (byte*) print_char_cursor#41
  (word) main::i#2 ← ++ (word) main::i#4
  to:main::@1
main::@3: scope:[main]  from main::@1
  (byte*) print_line_cursor#21 ← phi( main::@1/(byte*) print_line_cursor#25 )
  (byte*) print_char_cursor#52 ← phi( main::@1/(byte*) print_char_cursor#58 )
  (word) Ticks#13 ← phi( main::@1/(word) Ticks#16 )
  call end 
  to:main::@12
main::@12: scope:[main]  from main::@3
  (byte*) print_line_cursor#15 ← phi( main::@3/(byte*) print_line_cursor#4 )
  (byte*) print_char_cursor#42 ← phi( main::@3/(byte*) print_char_cursor#17 )
  (word) Ticks#9 ← phi( main::@3/(word) Ticks#3 )
  (word) Ticks#4 ← (word) Ticks#9
  (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#42
  (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#15
  (signed word) main::return#0 ← (number) 0
  to:main::@return
main::@return: scope:[main]  from main::@12
  (word) Ticks#10 ← phi( main::@12/(word) Ticks#4 )
  (byte*) print_line_cursor#16 ← phi( main::@12/(byte*) print_line_cursor#6 )
  (byte*) print_char_cursor#43 ← phi( main::@12/(byte*) print_char_cursor#20 )
  (signed word) main::return#3 ← phi( main::@12/(signed word) main::return#0 )
  (signed word) main::return#1 ← (signed word) main::return#3
  (byte*) print_char_cursor#21 ← (byte*) print_char_cursor#43
  (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#16
  (word) Ticks#5 ← (word) Ticks#10
  return 
  to:@return
@48: scope:[]  from @45
  (word) Ticks#14 ← phi( @45/(word) Ticks#17 )
  (byte*) print_line_cursor#22 ← phi( @45/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#53 ← phi( @45/(byte*) print_char_cursor#59 )
  call main 
  (signed word) main::return#2 ← (signed word) main::return#1
  to:@49
@49: scope:[]  from @48
  (word) Ticks#11 ← phi( @48/(word) Ticks#5 )
  (byte*) print_line_cursor#17 ← phi( @48/(byte*) print_line_cursor#7 )
  (byte*) print_char_cursor#44 ← phi( @48/(byte*) print_char_cursor#21 )
  (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#44
  (byte*) print_line_cursor#8 ← (byte*) print_line_cursor#17
  (word) Ticks#6 ← (word) Ticks#11
  to:@end
@end: scope:[]  from @49

SYMBOL TABLE SSA
(label) @13
(label) @43
(label) @45
(label) @48
(label) @49
(label) @begin
(label) @end
(const byte) BINARY = (number) 2
(const byte) DECIMAL = (number) $a
(const byte*) DIGITS[]  = (string) "0123456789abcdef"z
(const byte) HEXADECIMAL = (number) $10
(const byte) OCTAL = (number) 8
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const word*) RADIX_BINARY_VALUES[]  = { (word) $8000, (word) $4000, (word) $2000, (word) $1000, (word) $800, (word) $400, (word) $200, (word) $100, (word) $80, (word) $40, (word) $20, (word) $10, (word) 8, (word) 4, (word) 2 }
(const word*) RADIX_DECIMAL_VALUES[]  = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(const word*) RADIX_HEXADECIMAL_VALUES[]  = { (word) $1000, (word) $100, (word) $10 }
(const word*) RADIX_OCTAL_VALUES[]  = { (word) $8000, (word) $1000, (word) $200, (word) $40, (word) 8 }
(const byte) SIZEOF_WORD = (byte) 2
(word) Ticks
(word) Ticks#0
(word) Ticks#1
(word) Ticks#10
(word) Ticks#11
(word) Ticks#12
(word) Ticks#13
(word) Ticks#14
(word) Ticks#15
(word) Ticks#16
(word) Ticks#17
(word) Ticks#18
(word) Ticks#19
(word) Ticks#2
(word) Ticks#20
(word) Ticks#21
(word) Ticks#22
(word) Ticks#23
(word) Ticks#3
(word) Ticks#4
(word) Ticks#5
(word) Ticks#6
(word) Ticks#7
(word) Ticks#8
(word) Ticks#9
(const byte*) decimal_digits[(number) 6]  = { fill( 6, 0) }
(void()) end()
(label) end::@1
(label) end::@2
(label) end::@3
(label) end::@return
(word) last_time loadstore
(signed word()) main()
(bool~) main::$2
(word~) main::$3
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@2
(label) main::@3
(label) main::@8
(label) main::@9
(label) main::@return
(word) main::i
(word) main::i#0
(word) main::i#1
(word) main::i#2
(word) main::i#3
(word) main::i#4
(word) main::i#5
(word) main::i#6
(word) main::i#7
(signed word) main::return
(signed word) main::return#0
(signed word) main::return#1
(signed word) main::return#2
(signed word) main::return#3
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0
(number~) print_byte::$2
(label) print_byte::@1
(label) print_byte::@2
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0
(byte) print_byte::b#1
(byte) print_byte::b#2
(byte) print_byte::b#3
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0
(byte) print_char::ch#1
(byte) print_char::ch#2
(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#40
(byte*) print_char_cursor#41
(byte*) print_char_cursor#42
(byte*) print_char_cursor#43
(byte*) print_char_cursor#44
(byte*) print_char_cursor#45
(byte*) print_char_cursor#46
(byte*) print_char_cursor#47
(byte*) print_char_cursor#48
(byte*) print_char_cursor#49
(byte*) print_char_cursor#5
(byte*) print_char_cursor#50
(byte*) print_char_cursor#51
(byte*) print_char_cursor#52
(byte*) print_char_cursor#53
(byte*) print_char_cursor#54
(byte*) print_char_cursor#55
(byte*) print_char_cursor#56
(byte*) print_char_cursor#57
(byte*) print_char_cursor#58
(byte*) print_char_cursor#59
(byte*) print_char_cursor#6
(byte*) print_char_cursor#60
(byte*) print_char_cursor#61
(byte*) print_char_cursor#62
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(const byte*) print_hextab[]  = (string) "0123456789abcdef"z
(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#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_word((word) print_word::w)
(byte~) print_word::$0
(byte~) print_word::$2
(label) print_word::@1
(label) print_word::@2
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0
(word) print_word::w#1
(word) print_word::w#2
(void()) print_word_decimal((word) print_word_decimal::w)
(label) print_word_decimal::@1
(label) print_word_decimal::@2
(label) print_word_decimal::@return
(word) print_word_decimal::w
(word) print_word_decimal::w#0
(word) print_word_decimal::w#1
(word) rand_seed loadstore
(const byte*) rom = (byte*)(number) $e000
(void()) start()
(label) start::@return
(const word*) start::LAST_TIME = &(word) last_time
(word()) sum()
(bool~) sum::$0
(bool~) sum::$1
(label) sum::@1
(label) sum::@2
(label) sum::@3
(label) sum::@4
(label) sum::@5
(label) sum::@return
(byte) sum::i
(byte) sum::i#0
(byte) sum::i#1
(byte) sum::i#2
(byte) sum::i#3
(byte*) sum::p
(byte*) sum::p#0
(byte*) sum::p#1
(byte*) sum::p#2
(byte*) sum::p#3
(byte*) sum::p#4
(byte*) sum::p#5
(byte*) sum::p#6
(byte) sum::page
(byte) sum::page#0
(byte) sum::page#1
(byte) sum::page#2
(byte) sum::page#3
(byte) sum::page#4
(byte) sum::page#5
(byte) sum::page#6
(word) sum::return
(word) sum::return#0
(word) sum::return#1
(word) sum::return#2
(word) sum::return#3
(word) sum::return#4
(word) sum::s
(word) sum::s#0
(word) sum::s#1
(word) sum::s#2
(word) sum::s#3
(word) sum::s#4
(word) sum::s#5
(word) sum::s#6
(word) sum::s#7
(byte) sum::tmp
(byte) sum::tmp#0
(byte) sum::tmp#1
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
(bool~) utoa::$0
(bool~) utoa::$1
(word~) utoa::$10
(byte~) utoa::$11
(bool~) utoa::$2
(bool~) utoa::$3
(byte~) utoa::$4
(number~) utoa::$5
(bool~) utoa::$6
(bool~) utoa::$7
(bool~) utoa::$8
(bool~) utoa::$9
(label) utoa::@1
(label) utoa::@10
(label) utoa::@11
(label) utoa::@12
(label) utoa::@18
(label) utoa::@19
(label) utoa::@2
(label) utoa::@20
(label) utoa::@21
(label) utoa::@24
(label) utoa::@26
(label) utoa::@3
(label) utoa::@4
(label) utoa::@8
(label) utoa::@9
(label) utoa::@return
(byte*) utoa::buffer
(byte*) utoa::buffer#0
(byte*) utoa::buffer#1
(byte*) utoa::buffer#10
(byte*) utoa::buffer#11
(byte*) utoa::buffer#12
(byte*) utoa::buffer#13
(byte*) utoa::buffer#14
(byte*) utoa::buffer#15
(byte*) utoa::buffer#16
(byte*) utoa::buffer#17
(byte*) utoa::buffer#18
(byte*) utoa::buffer#19
(byte*) utoa::buffer#2
(byte*) utoa::buffer#20
(byte*) utoa::buffer#21
(byte*) utoa::buffer#3
(byte*) utoa::buffer#4
(byte*) utoa::buffer#5
(byte*) utoa::buffer#6
(byte*) utoa::buffer#7
(byte*) utoa::buffer#8
(byte*) utoa::buffer#9
(byte) utoa::digit
(byte) utoa::digit#0
(byte) utoa::digit#1
(byte) utoa::digit#2
(byte) utoa::digit#3
(byte) utoa::digit#4
(byte) utoa::digit#5
(byte) utoa::digit#6
(word) utoa::digit_value
(word) utoa::digit_value#0
(word) utoa::digit_value#1
(word*) utoa::digit_values
(word*) utoa::digit_values#0
(word*) utoa::digit_values#1
(word*) utoa::digit_values#10
(word*) utoa::digit_values#2
(word*) utoa::digit_values#3
(word*) utoa::digit_values#4
(word*) utoa::digit_values#5
(word*) utoa::digit_values#6
(word*) utoa::digit_values#7
(word*) utoa::digit_values#8
(word*) utoa::digit_values#9
(byte) utoa::max_digits
(byte) utoa::max_digits#0
(byte) utoa::max_digits#1
(byte) utoa::max_digits#10
(byte) utoa::max_digits#2
(byte) utoa::max_digits#3
(byte) utoa::max_digits#4
(byte) utoa::max_digits#5
(byte) utoa::max_digits#6
(byte) utoa::max_digits#7
(byte) utoa::max_digits#8
(byte) utoa::max_digits#9
(byte) utoa::radix
(byte) utoa::radix#0
(byte) utoa::radix#1
(byte) utoa::radix#2
(byte) utoa::radix#3
(byte) utoa::radix#4
(byte) utoa::started
(byte) utoa::started#0
(byte) utoa::started#1
(byte) utoa::started#2
(byte) utoa::started#3
(byte) utoa::started#4
(word) utoa::value
(word) utoa::value#0
(word) utoa::value#1
(word) utoa::value#10
(word) utoa::value#11
(word) utoa::value#12
(word) utoa::value#13
(word) utoa::value#14
(word) utoa::value#15
(word) utoa::value#2
(word) utoa::value#3
(word) utoa::value#4
(word) utoa::value#5
(word) utoa::value#6
(word) utoa::value#7
(word) utoa::value#8
(word) utoa::value#9
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
(bool~) utoa_append::$0
(label) utoa_append::@1
(label) utoa_append::@2
(label) utoa_append::@3
(label) utoa_append::@return
(byte*) utoa_append::buffer
(byte*) utoa_append::buffer#0
(byte*) utoa_append::buffer#1
(byte*) utoa_append::buffer#2
(byte*) utoa_append::buffer#3
(byte*) utoa_append::buffer#4
(byte) utoa_append::digit
(byte) utoa_append::digit#0
(byte) utoa_append::digit#1
(byte) utoa_append::digit#2
(byte) utoa_append::digit#3
(byte) utoa_append::digit#4
(word) utoa_append::return
(word) utoa_append::return#0
(word) utoa_append::return#1
(word) utoa_append::return#2
(word) utoa_append::return#3
(word) utoa_append::return#4
(word) utoa_append::sub
(word) utoa_append::sub#0
(word) utoa_append::sub#1
(word) utoa_append::sub#2
(word) utoa_append::sub#3
(word) utoa_append::value
(word) utoa_append::value#0
(word) utoa_append::value#1
(word) utoa_append::value#2
(word) utoa_append::value#3
(word) utoa_append::value#4
(word) utoa_append::value#5

Adding number conversion cast (unumber) 5 in (byte) utoa::max_digits#1 ← (number) 5
Adding number conversion cast (unumber) 4 in (byte) utoa::max_digits#2 ← (number) 4
Adding number conversion cast (unumber) 6 in (byte) utoa::max_digits#3 ← (number) 6
Adding number conversion cast (unumber) $10 in (byte) utoa::max_digits#4 ← (number) $10
Adding number conversion cast (unumber) 0 in *((byte*) utoa::buffer#2) ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) utoa::$5 ← (byte) utoa::max_digits#5 - (number) 1
Adding number conversion cast (unumber) utoa::$5 in (number~) utoa::$5 ← (byte) utoa::max_digits#5 - (unumber)(number) 1
Adding number conversion cast (unumber) 0 in *((byte*) utoa::buffer#3) ← (number) 0
Adding number conversion cast (unumber) 1 in (byte) utoa::started#1 ← (number) 1
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#9 + (number) $28
Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (unumber)(number) $f
Adding number conversion cast (unumber) $194a in (word) rand_seed ← (number) $194a
Adding number conversion cast (unumber) 0 in (word) sum::s#1 ← (number) 0
Adding number conversion cast (unumber) 0 in (byte) sum::page#1 ← (number) 0
Adding number conversion cast (unumber) $20 in (bool~) sum::$0 ← (byte) sum::page#3 < (number) $20
Adding number conversion cast (unumber) 0 in (byte) sum::i#1 ← (number) 0
Adding number conversion cast (unumber) 0 in (bool~) sum::$1 ← (number) 0 != (byte) sum::i#2
Adding number conversion cast (unumber) $100 in (byte*) sum::p#2 ← (byte*) sum::p#4 + (number) $100
Adding number conversion cast (unumber) 0 in (word) main::i#1 ← (number) 0
Adding number conversion cast (unumber) 6 in (bool~) main::$2 ← (word) main::i#3 < (number) 6
Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) utoa::max_digits#1 ← (unumber)(number) 5
Inlining cast (byte) utoa::max_digits#2 ← (unumber)(number) 4
Inlining cast (byte) utoa::max_digits#3 ← (unumber)(number) 6
Inlining cast (byte) utoa::max_digits#4 ← (unumber)(number) $10
Inlining cast *((byte*) utoa::buffer#2) ← (unumber)(number) 0
Inlining cast (byte~) utoa::$4 ← (byte)(word) utoa::value#3
Inlining cast *((byte*) utoa::buffer#3) ← (unumber)(number) 0
Inlining cast (byte) utoa::started#1 ← (unumber)(number) 1
Inlining cast (word) rand_seed ← (unumber)(number) $194a
Inlining cast (word) sum::s#1 ← (unumber)(number) 0
Inlining cast (byte) sum::page#1 ← (unumber)(number) 0
Inlining cast (byte) sum::i#1 ← (unumber)(number) 0
Inlining cast (word) main::i#1 ← (unumber)(number) 0
Inlining cast (signed word) main::return#0 ← (snumber)(number) 0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 57344
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast $10
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $194a
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $20
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast 0
Simplifying constant integer cast 6
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 6
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $194a
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $20
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $100
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 6
Finalized signed number type (signed byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) utoa::$5 ← (byte) utoa::max_digits#5 - (byte) 1
Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f
Alias (word) utoa::value#10 = (word) utoa::value#8 (word) utoa::value#12 (word) utoa::value#13 (word) utoa::value#9 (word) utoa::value#14 (word) utoa::value#15 (word) utoa::value#11 
Alias (byte*) utoa::buffer#10 = (byte*) utoa::buffer#17 (byte*) utoa::buffer#21 (byte*) utoa::buffer#16 (byte*) utoa::buffer#18 (byte*) utoa::buffer#13 (byte*) utoa::buffer#19 (byte*) utoa::buffer#20 (byte*) utoa::buffer#6 
Alias (byte) utoa::radix#1 = (byte) utoa::radix#2 (byte) utoa::radix#3 (byte) utoa::radix#4 
Alias (byte) utoa::digit#2 = (byte) utoa::digit#3 (byte) utoa::digit#6 (byte) utoa::digit#5 
Alias (word*) utoa::digit_values#10 = (word*) utoa::digit_values#5 (word*) utoa::digit_values#6 (word*) utoa::digit_values#9 
Alias (word) utoa::value#2 = (word) utoa::value#5 (word) utoa::value#3 (word) utoa::value#4 
Alias (byte) utoa::started#2 = (byte) utoa::started#3 
Alias (byte*) utoa::buffer#11 = (byte*) utoa::buffer#12 (byte*) utoa::buffer#7 (byte*) utoa::buffer#8 (byte*) utoa::buffer#9 
Alias (byte) utoa::max_digits#10 = (byte) utoa::max_digits#8 (byte) utoa::max_digits#5 (byte) utoa::max_digits#9 
Alias (word) utoa::digit_value#0 = (word) utoa::digit_value#1 
Alias (word) utoa_append::return#0 = (word) utoa_append::return#3 
Alias (word) utoa::value#0 = (word~) utoa::$10 
Alias (byte) utoa_append::digit#2 = (byte) utoa_append::digit#4 (byte) utoa_append::digit#3 
Alias (word) utoa_append::value#2 = (word) utoa_append::value#3 (word) utoa_append::value#4 (word) utoa_append::return#1 (word) utoa_append::return#4 (word) utoa_append::return#2 
Alias (word) utoa_append::sub#1 = (word) utoa_append::sub#2 
Alias (byte*) utoa_append::buffer#1 = (byte*) utoa_append::buffer#4 (byte*) utoa_append::buffer#2 
Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#60 (byte*) print_line_cursor#28 (byte*) print_char_cursor#59 (byte*) print_line_cursor#26 (byte*) print_char_cursor#53 (byte*) print_line_cursor#22 
Alias (byte*) print_str::str#2 = (byte*) print_str::str#3 
Alias (byte*) print_char_cursor#2 = (byte*) print_char_cursor#23 (byte*) print_char_cursor#45 (byte*) print_char_cursor#24 
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#10 (byte*) print_char_cursor#3 (byte*) print_line_cursor#11 (byte*) print_char_cursor#26 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 
Alias (byte) print_byte::b#0 = (byte~) print_word::$0 
Alias (word) print_word::w#1 = (word) print_word::w#2 
Alias (byte*) print_char_cursor#27 = (byte*) print_char_cursor#5 
Alias (byte) print_byte::b#1 = (byte~) print_word::$2 
Alias (byte*) print_char_cursor#28 = (byte*) print_char_cursor#6 (byte*) print_char_cursor#29 (byte*) print_char_cursor#7 
Alias (byte*) print_char_cursor#48 = (byte*) print_char_cursor#55 
Alias (byte*) print_char_cursor#30 = (byte*) print_char_cursor#8 (byte*) print_char_cursor#31 (byte*) print_char_cursor#9 
Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#32 
Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#33 (byte*) print_char_cursor#34 (byte*) print_char_cursor#12 
Alias (byte*) print_char_cursor#13 = (byte*) print_char_cursor#36 (byte*) print_char_cursor#14 
Alias (word) Ticks#1 = (word) Ticks#7 
Alias (byte*) print_char_cursor#50 = (byte*) print_char_cursor#56 
Alias (byte*) print_line_cursor#19 = (byte*) print_line_cursor#23 (byte*) print_line_cursor#27 
Alias (word) Ticks#12 = (word) Ticks#15 (word) Ticks#2 (word) Ticks#8 (word) Ticks#3 
Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#37 
Alias (byte*) print_line_cursor#12 = (byte*) print_line_cursor#3 (byte*) print_line_cursor#13 (byte*) print_line_cursor#4 
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#38 (byte*) print_char_cursor#39 (byte*) print_char_cursor#17 
Alias (word) Ticks#0 = (word) Ticks#17 (word) Ticks#14 
Alias (byte*) sum::p#5 = (byte*) sum::p#6 
Alias (word) sum::s#3 = (word) sum::s#6 (word) sum::s#5 (word) sum::return#0 (word) sum::return#3 (word) sum::return#1 
Alias (byte) sum::page#3 = (byte) sum::page#6 
Alias (byte*) sum::p#3 = (byte*) sum::p#4 
Alias (byte) sum::page#4 = (byte) sum::page#5 
Alias (word) sum::s#2 = (word) sum::s#7 
Alias (word) Ticks#19 = (word) Ticks#20 
Alias (byte*) print_char_cursor#61 = (byte*) print_char_cursor#62 
Alias (byte*) print_line_cursor#29 = (byte*) print_line_cursor#31 
Alias (byte*) print_char_cursor#51 = (byte*) print_char_cursor#57 (byte*) print_char_cursor#58 (byte*) print_char_cursor#52 
Alias (byte*) print_line_cursor#20 = (byte*) print_line_cursor#30 (byte*) print_line_cursor#25 (byte*) print_line_cursor#24 (byte*) print_line_cursor#21 
Alias (word) main::i#3 = (word) main::i#7 (word) main::i#6 (word) main::i#5 (word) main::i#4 
Alias (word) Ticks#13 = (word) Ticks#23 (word) Ticks#16 (word) Ticks#22 (word) Ticks#21 (word) Ticks#18 
Alias (word) sum::return#2 = (word) sum::return#4 
Alias (word) print_word_decimal::w#0 = (word~) main::$3 
Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#40 
Alias (byte*) print_line_cursor#14 = (byte*) print_line_cursor#5 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#41 
Alias (word) Ticks#10 = (word) Ticks#4 (word) Ticks#9 (word) Ticks#5 
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#42 (byte*) print_char_cursor#43 (byte*) print_char_cursor#21 
Alias (byte*) print_line_cursor#15 = (byte*) print_line_cursor#6 (byte*) print_line_cursor#16 (byte*) print_line_cursor#7 
Alias (signed word) main::return#0 = (signed word) main::return#3 (signed word) main::return#1 
Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#44 
Alias (byte*) print_line_cursor#17 = (byte*) print_line_cursor#8 
Alias (word) Ticks#11 = (word) Ticks#6 
Successful SSA optimization Pass2AliasElimination
Alias (word) utoa::value#10 = (word) utoa::value#7 
Alias (byte*) utoa::buffer#10 = (byte*) utoa::buffer#15 
Alias (byte) utoa::digit#2 = (byte) utoa::digit#4 
Alias (byte) utoa::max_digits#10 = (byte) utoa::max_digits#6 
Alias (word*) utoa::digit_values#10 = (word*) utoa::digit_values#7 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte) utoa::radix#1 (byte) utoa::radix#0
Identical Phi Values (word) utoa::value#10 (word) utoa::value#1
Identical Phi Values (byte*) utoa::buffer#10 (byte*) utoa::buffer#5
Identical Phi Values (byte) utoa::max_digits#10 (byte) utoa::max_digits#7
Identical Phi Values (word*) utoa::digit_values#10 (word*) utoa::digit_values#8
Identical Phi Values (word) utoa_append::value#5 (word) utoa_append::value#0
Identical Phi Values (word) utoa_append::sub#3 (word) utoa_append::sub#0
Identical Phi Values (byte*) utoa_append::buffer#3 (byte*) utoa_append::buffer#0
Identical Phi Values (word) utoa_append::sub#1 (word) utoa_append::sub#3
Identical Phi Values (byte*) utoa_append::buffer#1 (byte*) utoa_append::buffer#3
Identical Phi Values (byte*) print_str::str#4 (byte*) print_str::str#1
Identical Phi Values (byte*) print_char_cursor#54 (byte*) print_char_cursor#48
Identical Phi Values (byte*) print_char_cursor#25 (byte*) print_char_cursor#46
Identical Phi Values (word) print_word::w#1 (word) print_word::w#0
Identical Phi Values (byte*) print_char_cursor#47 (byte*) print_char_cursor#50
Identical Phi Values (byte*) print_char_cursor#27 (byte*) print_char_cursor#11
Identical Phi Values (byte*) print_char_cursor#28 (byte*) print_char_cursor#11
Identical Phi Values (word) print_word_decimal::w#1 (word) print_word_decimal::w#0
Identical Phi Values (byte*) print_char_cursor#48 (byte*) print_char_cursor#51
Identical Phi Values (byte*) print_char_cursor#30 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#13
Identical Phi Values (byte*) print_char_cursor#50 (byte*) print_char_cursor#51
Identical Phi Values (byte*) print_line_cursor#19 (byte*) print_line_cursor#20
Identical Phi Values (byte*) print_char_cursor#15 (byte*) print_char_cursor#28
Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#16 (byte*) print_line_cursor#1
Identical Phi Values (byte*) sum::p#3 (byte*) sum::p#5
Identical Phi Values (byte) sum::page#4 (byte) sum::page#3
Identical Phi Values (word) Ticks#19 (word) Ticks#0
Identical Phi Values (byte*) print_char_cursor#61 (byte*) print_char_cursor#0
Identical Phi Values (byte*) print_line_cursor#29 (byte*) print_char_cursor#0
Identical Phi Values (word) Ticks#13 (word) Ticks#19
Identical Phi Values (byte*) print_char_cursor#18 (byte*) print_char_cursor#30
Identical Phi Values (byte*) print_line_cursor#14 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#19 (byte*) print_line_cursor#1
Identical Phi Values (word) Ticks#10 (word) Ticks#12
Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#16
Identical Phi Values (byte*) print_line_cursor#15 (byte*) print_line_cursor#12
Identical Phi Values (byte*) print_char_cursor#22 (byte*) print_char_cursor#20
Identical Phi Values (byte*) print_line_cursor#17 (byte*) print_line_cursor#15
Identical Phi Values (word) Ticks#11 (word) Ticks#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#20
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) utoa::$0 [4] if((byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1
Simple Condition (bool~) utoa::$1 [10] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2
Simple Condition (bool~) utoa::$2 [16] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3
Simple Condition (bool~) utoa::$3 [22] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4
Simple Condition (bool~) utoa::$6 [41] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19
Simple Condition (bool~) utoa_append::$0 [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
Simple Condition (bool~) print_str::$0 [87] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [100] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#46) goto print_ln::@1
Simple Condition (bool~) sum::$0 [191] if((byte) sum::page#3<(byte) $20) goto sum::@2
Simple Condition (bool~) sum::$1 [201] if((byte) 0!=(byte) sum::i#2) goto sum::@4
Simple Condition (bool~) main::$2 [215] if((word) main::i#3<(byte) 6) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [47] (bool~) utoa::$9 ← ! (bool~) utoa::$8
Rewriting || if()-condition to two if()s [46] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7
Successful SSA optimization Pass2ConditionalAndOrRewriting
Warning! Adding boolean cast to non-boolean condition (byte) utoa::started#2
Constant (const byte) utoa::max_digits#0 = 0
Constant (const word*) utoa::digit_values#0 = (word*) 0
Constant (const byte) utoa::max_digits#1 = 5
Constant (const word*) utoa::digit_values#1 = RADIX_DECIMAL_VALUES
Constant (const byte) utoa::max_digits#2 = 4
Constant (const word*) utoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES
Constant (const byte) utoa::max_digits#3 = 6
Constant (const word*) utoa::digit_values#3 = RADIX_OCTAL_VALUES
Constant (const byte) utoa::max_digits#4 = $10
Constant (const word*) utoa::digit_values#4 = RADIX_BINARY_VALUES
Constant (const byte) utoa::started#0 = 0
Constant (const byte) utoa::digit#0 = 0
Constant (const byte) utoa::started#1 = 1
Constant (const byte) utoa_append::digit#0 = 0
Constant (const byte*) print_char_cursor#0 = (byte*) 1024
Constant (const byte*) utoa::buffer#5 = decimal_digits
Constant (const byte) utoa::radix#0 = DECIMAL
Constant (const byte*) print_str::str#1 = decimal_digits
Constant (const word) Ticks#0 = 0
Constant (const word) sum::s#0 = 0
Constant (const byte*) sum::p#0 = (byte*) 0
Constant (const byte) sum::page#0 = 0
Constant (const byte) sum::i#0 = 0
Constant (const byte) sum::tmp#0 = 0
Constant (const byte*) sum::p#1 = rom
Constant (const word) sum::s#1 = 0
Constant (const byte) sum::page#1 = 0
Constant (const byte) sum::i#1 = 0
Constant (const word) main::i#0 = 0
Constant (const word) main::i#1 = 0
Constant (const signed word) main::return#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const signed word) main::return#2 = main::return#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [4] if((const byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1
if() condition always false - eliminating [10] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2
if() condition always false - eliminating [16] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3
if() condition always false - eliminating [22] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization Pass2ConstantStringConsolidation
Eliminating unused constant (const byte) BINARY
Eliminating unused constant (const byte) OCTAL
Eliminating unused constant (const byte) HEXADECIMAL
Eliminating unused constant (const byte) utoa::max_digits#0
Eliminating unused constant (const word*) utoa::digit_values#0
Eliminating unused constant (const byte) utoa::radix#0
Eliminating unused constant (const word) sum::s#0
Eliminating unused constant (const byte*) sum::p#0
Eliminating unused constant (const byte) sum::page#0
Eliminating unused constant (const byte) sum::i#0
Eliminating unused constant (const byte) sum::tmp#0
Eliminating unused constant (const word) main::i#0
Eliminating unused constant (const signed word) main::return#2
Eliminating unused constant (const word) Ticks#0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const byte) DECIMAL
Eliminating unused constant (const signed word) main::return#0
Successful SSA optimization PassNEliminateUnusedVars
Eliminating variable (byte*) utoa::buffer#0 from unused block utoa::@12
Eliminating variable (byte*) utoa::buffer#1 from unused block utoa::@12
Eliminating variable (byte*) utoa::buffer#2 from unused block utoa::@12
Removing unused block utoa::@9
Removing PHI-reference to removed block (utoa::@2) in block utoa::@8
Removing PHI-reference to removed block (utoa::@2) in block utoa::@8
Removing unused block utoa::@2
Removing unused block utoa::@10
Removing PHI-reference to removed block (utoa::@3) in block utoa::@8
Removing PHI-reference to removed block (utoa::@3) in block utoa::@8
Removing unused block utoa::@3
Removing unused block utoa::@11
Removing PHI-reference to removed block (utoa::@4) in block utoa::@8
Removing PHI-reference to removed block (utoa::@4) in block utoa::@8
Removing unused block utoa::@4
Removing unused block utoa::@12
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 0 in (bool~) utoa::$12 ← (number) 0 != (byte) utoa::started#2
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 0
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Successful SSA optimization PassNFinalizeNumberTypeConversions
Identical Phi Values (byte) utoa::max_digits#7 (const byte) utoa::max_digits#1
Identical Phi Values (word*) utoa::digit_values#8 (const word*) utoa::digit_values#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) utoa::$12 [9] if((byte) 0!=(byte) utoa::started#2) goto utoa::@24
Simple Condition (bool~) utoa::$7 [96] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@24
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [3] (byte~) utoa::$5 ← (const byte) utoa::max_digits#1 - (byte) 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) utoa::$5 = utoa::max_digits#1-1
Successful SSA optimization Pass2ConstantIdentification
Eliminating unused constant (const byte) utoa::max_digits#2
Eliminating unused constant (const word*) utoa::digit_values#2
Eliminating unused constant (const byte) utoa::max_digits#3
Eliminating unused constant (const word*) utoa::digit_values#3
Eliminating unused constant (const byte) utoa::max_digits#4
Eliminating unused constant (const word*) utoa::digit_values#4
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant (const word*) RADIX_BINARY_VALUES
Eliminating unused constant (const word*) RADIX_OCTAL_VALUES
Eliminating unused constant (const word*) RADIX_HEXADECIMAL_VALUES
Successful SSA optimization PassNEliminateUnusedVars
Rewriting multiplication to use shift [3] (byte~) utoa::$11 ← (byte) utoa::digit#2 * (const byte) SIZEOF_WORD
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte) utoa::started#0
Inlining constant with var siblings (const byte) utoa::digit#0
Inlining constant with var siblings (const byte) utoa::started#1
Inlining constant with var siblings (const byte*) utoa::buffer#5
Inlining constant with var siblings (const byte) utoa_append::digit#0
Inlining constant with var siblings (const byte*) print_str::str#1
Inlining constant with var siblings (const byte*) sum::p#1
Inlining constant with var siblings (const word) sum::s#1
Inlining constant with var siblings (const byte) sum::page#1
Inlining constant with var siblings (const byte) sum::i#1
Inlining constant with var siblings (const word) main::i#1
Inlining constant with var siblings (const byte*) print_char_cursor#0
Constant inlined utoa_append::digit#0 = (byte) 0
Constant inlined utoa::digit_values#1 = (const word*) RADIX_DECIMAL_VALUES
Constant inlined sum::i#1 = (byte) 0
Constant inlined print_hextab = (const byte*) DIGITS
Constant inlined utoa::started#1 = (byte) 1
Constant inlined utoa::started#0 = (byte) 0
Constant inlined sum::page#1 = (byte) 0
Constant inlined print_char_cursor#0 = (byte*) 1024
Constant inlined utoa::buffer#5 = (const byte*) decimal_digits
Constant inlined utoa::digit#0 = (byte) 0
Constant inlined utoa::$5 = (const byte) utoa::max_digits#1-(byte) 1
Constant inlined print_str::str#1 = (const byte*) decimal_digits
Constant inlined sum::s#1 = (byte) 0
Constant inlined main::i#1 = (byte) 0
Constant inlined sum::p#1 = (const byte*) rom
Successful SSA optimization Pass2ConstantInlining
Eliminating unused constant (const byte) SIZEOF_WORD
Successful SSA optimization PassNEliminateUnusedVars
Added new block during phi lifting utoa::@28(between utoa::@27 and utoa::@21)
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Added new block during phi lifting sum::@10(between sum::@4 and sum::@4)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @13
Adding NOP phi() at start of @48
Adding NOP phi() at start of @49
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of print_word_decimal::@1
Adding NOP phi() at start of print_word_decimal::@2
Adding NOP phi() at start of utoa
Adding NOP phi() at start of utoa::@1
Adding NOP phi() at start of sum
Adding NOP phi() at start of sum::@3
Adding NOP phi() at start of end::@3
Adding NOP phi() at start of print_word::@2
Adding NOP phi() at start of print_byte::@2
CALL GRAPH
Calls in [] to main:5 
Calls in [main] to start:9 end:14 sum:18 print_word_decimal:21 print_ln:23 
Calls in [print_word_decimal] to utoa:37 print_str:39 
Calls in [utoa] to utoa_append:77 
Calls in [end] to start:111 print_word:115 print_ln:117 
Calls in [print_word] to print_byte:123 print_byte:127 
Calls in [print_byte] to print_char:135 print_char:140 

Created 25 initial phi equivalence classes
Coalesced [22] print_char_cursor#66 ← print_char_cursor#2
Coalesced [25] main::i#8 ← main::i#2
Not coalescing [26] print_char_cursor#71 ← print_line_cursor#1
Coalesced [27] print_line_cursor#34 ← print_line_cursor#1
Coalesced [29] print_line_cursor#32 ← print_line_cursor#20
Coalesced (already) [35] print_line_cursor#33 ← print_line_cursor#1
Coalesced [42] print_char_cursor#63 ← print_char_cursor#51
Coalesced [49] print_str::str#5 ← print_str::str#0
Coalesced [50] print_char_cursor#64 ← print_char_cursor#1
Coalesced [53] utoa::value#17 ← utoa::value#1
Coalesced [65] utoa::value#18 ← utoa::value#2
Coalesced [66] utoa::started#6 ← utoa::started#2
Coalesced [67] utoa::buffer#23 ← utoa::buffer#11
Coalesced [70] utoa::digit#7 ← utoa::digit#1
Coalesced (already) [71] utoa::value#16 ← utoa::value#6
Coalesced (already) [72] utoa::started#5 ← utoa::started#4
Coalesced (already) [73] utoa::buffer#22 ← utoa::buffer#14
Coalesced [81] utoa::value#19 ← utoa::value#0
Coalesced [82] utoa::buffer#24 ← utoa::buffer#4
Coalesced [83] utoa_append::value#6 ← utoa_append::value#0
Coalesced [90] utoa_append::value#7 ← utoa_append::value#1
Coalesced [91] utoa_append::digit#5 ← utoa_append::digit#1
Coalesced [97] sum::s#9 ← sum::s#3
Coalesced [105] sum::page#7 ← sum::page#2
Coalesced [106] sum::s#8 ← sum::s#2
Coalesced [107] sum::p#7 ← sum::p#2
Coalesced [108] sum::i#4 ← sum::i#2
Coalesced (already) [109] sum::s#10 ← sum::s#2
Coalesced [116] print_char_cursor#65 ← print_char_cursor#13
Coalesced [121] print_byte::b#4 ← print_byte::b#0
Coalesced [122] print_char_cursor#67 ← print_char_cursor#51
Coalesced [125] print_byte::b#5 ← print_byte::b#1
Coalesced (already) [126] print_char_cursor#68 ← print_char_cursor#13
Coalesced [133] print_char::ch#3 ← print_char::ch#0
Coalesced [134] print_char_cursor#69 ← print_char_cursor#49
Coalesced [138] print_char::ch#4 ← print_char::ch#1
Coalesced (already) [139] print_char_cursor#70 ← print_char_cursor#13
Coalesced down to 16 phi equivalence classes
Culled Empty Block (label) @13
Culled Empty Block (label) @49
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@12
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_ln::@3
Culled Empty Block (label) print_word_decimal::@2
Culled Empty Block (label) utoa::@1
Culled Empty Block (label) utoa::@8
Culled Empty Block (label) utoa::@28
Culled Empty Block (label) sum::@3
Culled Empty Block (label) sum::@2
Culled Empty Block (label) sum::@10
Culled Empty Block (label) end::@3
Culled Empty Block (label) print_word::@2
Culled Empty Block (label) print_byte::@2
Renumbering block @43 to @1
Renumbering block @45 to @2
Renumbering block @48 to @3
Renumbering block utoa::@18 to utoa::@1
Renumbering block utoa::@19 to utoa::@2
Renumbering block utoa::@20 to utoa::@3
Renumbering block utoa::@21 to utoa::@4
Renumbering block utoa::@24 to utoa::@5
Renumbering block utoa::@26 to utoa::@6
Renumbering block utoa::@27 to utoa::@7
Renumbering block sum::@4 to sum::@2
Renumbering block sum::@5 to sum::@3
Renumbering block main::@9 to main::@4
Renumbering block main::@10 to main::@5
Renumbering block main::@11 to main::@6
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @3
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of print_word_decimal::@1
Adding NOP phi() at start of print_str
Adding NOP phi() at start of utoa
Adding NOP phi() at start of utoa_append
Adding NOP phi() at start of sum
Adding NOP phi() at start of end::@2

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] (word) last_time ← (word) 0
  to:@2
@2: scope:[]  from @1
  [2] (word) rand_seed ← (word) 0
  to:@3
@3: scope:[]  from @2
  [3] phi()
  [4] call main 
  to:@end
@end: scope:[]  from @3
  [5] phi()

(signed word()) main()
main: scope:[main]  from @3
  [6] phi()
  [7] call start 
  to:main::@1
main::@1: scope:[main]  from main main::@6
  [8] (byte*) print_line_cursor#20 ← phi( main::@6/(byte*) print_line_cursor#1 main/(byte*) 1024 )
  [8] (byte*) print_char_cursor#51 ← phi( main::@6/(byte*) print_char_cursor#71 main/(byte*) 1024 )
  [8] (word) main::i#3 ← phi( main::@6/(word) main::i#2 main/(byte) 0 )
  [9] if((word) main::i#3<(byte) 6) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@1
  [10] phi()
  [11] call end 
  to:main::@return
main::@return: scope:[main]  from main::@3
  [12] return 
  to:@return
main::@2: scope:[main]  from main::@1
  [13] phi()
  [14] call sum 
  [15] (word) sum::return#2 ← (word) sum::s#3
  to:main::@4
main::@4: scope:[main]  from main::@2
  [16] (word) print_word_decimal::w#0 ← (word) sum::return#2
  [17] call print_word_decimal 
  to:main::@5
main::@5: scope:[main]  from main::@4
  [18] phi()
  [19] call print_ln 
  to:main::@6
main::@6: scope:[main]  from main::@5
  [20] (word) main::i#2 ← ++ (word) main::i#3
  [21] (byte*) print_char_cursor#71 ← (byte*) print_line_cursor#1
  to:main::@1

(void()) print_ln()
print_ln: scope:[print_ln]  from end::@2 main::@5
  [22] (byte*) print_char_cursor#46 ← phi( end::@2/(byte*) print_char_cursor#13 main::@5/(byte*) print_char_cursor#2 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [23] (byte*) print_line_cursor#9 ← phi( print_ln/(byte*) print_line_cursor#20 print_ln::@1/(byte*) print_line_cursor#1 )
  [24] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28
  [25] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#46) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [26] return 
  to:@return

(void()) print_word_decimal((word) print_word_decimal::w)
print_word_decimal: scope:[print_word_decimal]  from main::@4
  [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0
  [28] call utoa 
  to:print_word_decimal::@1
print_word_decimal::@1: scope:[print_word_decimal]  from print_word_decimal
  [29] phi()
  [30] call print_str 
  to:print_word_decimal::@return
print_word_decimal::@return: scope:[print_word_decimal]  from print_word_decimal::@1
  [31] return 
  to:@return

(void()) print_str((byte*) print_str::str)
print_str: scope:[print_str]  from print_word_decimal::@1
  [32] phi()
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  [33] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#51 print_str::@2/(byte*) print_char_cursor#1 )
  [33] (byte*) print_str::str#2 ← phi( print_str/(const byte*) decimal_digits print_str::@2/(byte*) print_str::str#0 )
  [34] 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
  [35] return 
  to:@return
print_str::@2: scope:[print_str]  from print_str::@1
  [36] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#2)
  [37] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2
  [38] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2
  to:print_str::@1

(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
utoa: scope:[utoa]  from print_word_decimal
  [39] phi()
  to:utoa::@1
utoa::@1: scope:[utoa]  from utoa utoa::@4
  [40] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(const byte*) decimal_digits )
  [40] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
  [40] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
  [40] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
  [41] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2
  to:utoa::@3
utoa::@3: scope:[utoa]  from utoa::@1
  [42] (byte~) utoa::$4 ← (byte)(word) utoa::value#2
  [43] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$4)
  [44] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
  [45] *((byte*) utoa::buffer#3) ← (byte) 0
  to:utoa::@return
utoa::@return: scope:[utoa]  from utoa::@3
  [46] return 
  to:@return
utoa::@2: scope:[utoa]  from utoa::@1
  [47] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1
  [48] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$11)
  [49] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
  to:utoa::@7
utoa::@7: scope:[utoa]  from utoa::@2
  [50] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
  to:utoa::@4
utoa::@4: scope:[utoa]  from utoa::@6 utoa::@7
  [51] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
  [51] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
  [51] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
  [52] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
  to:utoa::@1
utoa::@5: scope:[utoa]  from utoa::@2 utoa::@7
  [53] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
  [54] (word) utoa_append::value#0 ← (word) utoa::value#2
  [55] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
  [56] call utoa_append 
  [57] (word) utoa_append::return#0 ← (word) utoa_append::value#2
  to:utoa::@6
utoa::@6: scope:[utoa]  from utoa::@5
  [58] (word) utoa::value#0 ← (word) utoa_append::return#0
  [59] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
  to:utoa::@4

(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
utoa_append: scope:[utoa_append]  from utoa::@5
  [60] phi()
  to:utoa_append::@1
utoa_append::@1: scope:[utoa_append]  from utoa_append utoa_append::@2
  [61] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
  [61] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
  [62] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
  to:utoa_append::@3
utoa_append::@3: scope:[utoa_append]  from utoa_append::@1
  [63] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
  to:utoa_append::@return
utoa_append::@return: scope:[utoa_append]  from utoa_append::@3
  [64] return 
  to:@return
utoa_append::@2: scope:[utoa_append]  from utoa_append::@1
  [65] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
  [66] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
  to:utoa_append::@1

(word()) sum()
sum: scope:[sum]  from main::@2
  [67] phi()
  to:sum::@1
sum::@1: scope:[sum]  from sum sum::@3
  [68] (byte*) sum::p#5 ← phi( sum/(const byte*) rom sum::@3/(byte*) sum::p#2 )
  [68] (word) sum::s#3 ← phi( sum/(byte) 0 sum::@3/(word) sum::s#2 )
  [68] (byte) sum::page#3 ← phi( sum/(byte) 0 sum::@3/(byte) sum::page#2 )
  [69] if((byte) sum::page#3<(byte) $20) goto sum::@2
  to:sum::@return
sum::@return: scope:[sum]  from sum::@1
  [70] return 
  to:@return
sum::@2: scope:[sum]  from sum::@1 sum::@2
  [71] (word) sum::s#4 ← phi( sum::@1/(word) sum::s#3 sum::@2/(word) sum::s#2 )
  [71] (byte) sum::i#3 ← phi( sum::@1/(byte) 0 sum::@2/(byte) sum::i#2 )
  [72] (byte) sum::tmp#1 ← *((byte*) sum::p#5 + (byte) sum::i#3)
  [73] (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1
  [74] (byte) sum::i#2 ← ++ (byte) sum::i#3
  [75] if((byte) 0!=(byte) sum::i#2) goto sum::@2
  to:sum::@3
sum::@3: scope:[sum]  from sum::@2
  [76] (byte*) sum::p#2 ← (byte*) sum::p#5 + (word) $100
  [77] (byte) sum::page#2 ← ++ (byte) sum::page#3
  to:sum::@1

(void()) end()
end: scope:[end]  from main::@3
  [78] (word) Ticks#1 ← (word) last_time
  [79] call start 
  to:end::@1
end::@1: scope:[end]  from end
  [80] (word) last_time ← (word) last_time - (word) Ticks#1
  [81] (word) Ticks#12 ← (word) last_time
  [82] (word) print_word::w#0 ← (word) Ticks#12
  [83] call print_word 
  to:end::@2
end::@2: scope:[end]  from end::@1
  [84] phi()
  [85] call print_ln 
  to:end::@return
end::@return: scope:[end]  from end::@2
  [86] return 
  to:@return

(void()) print_word((word) print_word::w)
print_word: scope:[print_word]  from end::@1
  [87] (byte) print_byte::b#0 ← > (word) print_word::w#0
  [88] call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  [89] (byte) print_byte::b#1 ← < (word) print_word::w#0
  [90] call print_byte 
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@1
  [91] return 
  to:@return

(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte]  from print_word print_word::@1
  [92] (byte*) print_char_cursor#49 ← phi( print_word/(byte*) print_char_cursor#51 print_word::@1/(byte*) print_char_cursor#13 )
  [92] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  [93] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4
  [94] (byte) print_char::ch#0 ← *((const byte*) DIGITS + (byte~) print_byte::$0)
  [95] call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  [96] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f
  [97] (byte) print_char::ch#1 ← *((const byte*) DIGITS + (byte~) print_byte::$2)
  [98] call print_char 
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@1
  [99] return 
  to:@return

(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char]  from print_byte print_byte::@1
  [100] (byte*) print_char_cursor#35 ← phi( print_byte/(byte*) print_char_cursor#49 print_byte::@1/(byte*) print_char_cursor#13 )
  [100] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  [101] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2
  [102] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#35
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [103] return 
  to:@return

(void()) start()
start: scope:[start]  from end main
  asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
  [105] (word) rand_seed ← (word) $194a
  to:start::@return
start::@return: scope:[start]  from start
  [106] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(word) Ticks
(word) Ticks#1 2.0
(word) Ticks#12 4.0
(void()) end()
(word) last_time loadstore 0.5555555555555556
(signed word()) main()
(word) main::i
(word) main::i#2 11.0
(word) main::i#3 3.666666666666667
(signed word) main::return
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 4.0
(byte~) print_byte::$2 4.0
(byte) print_byte::b
(byte) print_byte::b#0 4.0
(byte) print_byte::b#1 4.0
(byte) print_byte::b#2 2.0
(void()) print_char((byte) print_char::ch)
(byte) print_char::ch
(byte) print_char::ch#0 4.0
(byte) print_char::ch#1 4.0
(byte) print_char::ch#2 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 101.0
(byte*) print_char_cursor#13 0.6153846153846154
(byte*) print_char_cursor#2 39.5
(byte*) print_char_cursor#35 4.0
(byte*) print_char_cursor#46 28.5
(byte*) print_char_cursor#49 2.0
(byte*) print_char_cursor#51 0.8823529411764707
(byte*) print_char_cursor#71 22.0
(byte*) print_line_cursor
(byte*) print_line_cursor#1 54.16666666666666
(byte*) print_line_cursor#20 0.7647058823529412
(byte*) print_line_cursor#9 204.0
(void()) print_ln()
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(byte*) print_str::str
(byte*) print_str::str#0 202.0
(byte*) print_str::str#2 101.0
(void()) print_word((word) print_word::w)
(word) print_word::w
(word) print_word::w#0 2.0
(void()) print_word_decimal((word) print_word_decimal::w)
(word) print_word_decimal::w
(word) print_word_decimal::w#0 13.0
(word) rand_seed loadstore 40.0
(void()) start()
(word()) sum()
(byte) sum::i
(byte) sum::i#2 1501.5
(byte) sum::i#3 1001.0
(byte*) sum::p
(byte*) sum::p#2 101.0
(byte*) sum::p#5 171.85714285714283
(byte) sum::page
(byte) sum::page#2 202.0
(byte) sum::page#3 37.875
(word) sum::return
(word) sum::return#2 22.0
(word) sum::s
(word) sum::s#2 420.59999999999997
(word) sum::s#3 53.25
(word) sum::s#4 1051.5
(byte) sum::tmp
(byte) sum::tmp#1 2002.0
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
(byte~) utoa::$11 202.0
(byte~) utoa::$4 4.0
(byte*) utoa::buffer
(byte*) utoa::buffer#11 29.142857142857146
(byte*) utoa::buffer#14 151.5
(byte*) utoa::buffer#3 4.0
(byte*) utoa::buffer#4 202.0
(byte) utoa::digit
(byte) utoa::digit#1 202.0
(byte) utoa::digit#2 28.857142857142858
(word) utoa::digit_value
(word) utoa::digit_value#0 60.599999999999994
(word*) utoa::digit_values
(byte) utoa::max_digits
(byte) utoa::radix
(byte) utoa::started
(byte) utoa::started#2 50.5
(byte) utoa::started#4 101.0
(word) utoa::value
(word) utoa::value#0 101.0
(word) utoa::value#1 2.0
(word) utoa::value#2 58.00000000000001
(word) utoa::value#6 151.5
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
(byte*) utoa_append::buffer
(byte*) utoa_append::buffer#0 12.875
(byte) utoa_append::digit
(byte) utoa_append::digit#1 1001.0
(byte) utoa_append::digit#2 1002.0
(word) utoa_append::return
(word) utoa_append::return#0 202.0
(word) utoa_append::sub
(word) utoa_append::sub#0 350.5
(word) utoa_append::value
(word) utoa_append::value#0 34.33333333333333
(word) utoa_append::value#1 2002.0
(word) utoa_append::value#2 517.6666666666667

Initial phi equivalence classes
[ main::i#3 main::i#2 ]
[ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ]
[ print_str::str#2 print_str::str#0 ]
[ utoa::digit#2 utoa::digit#1 ]
[ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ]
[ utoa::started#2 utoa::started#4 ]
[ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ]
[ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ]
[ utoa_append::digit#2 utoa_append::digit#1 ]
[ sum::page#3 sum::page#2 ]
[ sum::p#5 sum::p#2 ]
[ sum::i#3 sum::i#2 ]
[ sum::s#4 sum::s#3 sum::s#2 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ]
Added variable last_time to live range equivalence class [ last_time ]
Added variable rand_seed to live range equivalence class [ rand_seed ]
Added variable sum::return#2 to live range equivalence class [ sum::return#2 ]
Added variable print_word_decimal::w#0 to live range equivalence class [ print_word_decimal::w#0 ]
Added variable utoa::$4 to live range equivalence class [ utoa::$4 ]
Added variable utoa::buffer#3 to live range equivalence class [ utoa::buffer#3 ]
Added variable utoa::$11 to live range equivalence class [ utoa::$11 ]
Added variable utoa::digit_value#0 to live range equivalence class [ utoa::digit_value#0 ]
Added variable utoa_append::buffer#0 to live range equivalence class [ utoa_append::buffer#0 ]
Added variable utoa_append::sub#0 to live range equivalence class [ utoa_append::sub#0 ]
Added variable utoa_append::return#0 to live range equivalence class [ utoa_append::return#0 ]
Added variable sum::tmp#1 to live range equivalence class [ sum::tmp#1 ]
Added variable Ticks#1 to live range equivalence class [ Ticks#1 ]
Added variable Ticks#12 to live range equivalence class [ Ticks#12 ]
Added variable print_word::w#0 to live range equivalence class [ print_word::w#0 ]
Added variable print_byte::$0 to live range equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to live range equivalence class [ print_byte::$2 ]
Complete equivalence classes
[ main::i#3 main::i#2 ]
[ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ]
[ print_str::str#2 print_str::str#0 ]
[ utoa::digit#2 utoa::digit#1 ]
[ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ]
[ utoa::started#2 utoa::started#4 ]
[ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ]
[ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ]
[ utoa_append::digit#2 utoa_append::digit#1 ]
[ sum::page#3 sum::page#2 ]
[ sum::p#5 sum::p#2 ]
[ sum::i#3 sum::i#2 ]
[ sum::s#4 sum::s#3 sum::s#2 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ]
[ last_time ]
[ rand_seed ]
[ sum::return#2 ]
[ print_word_decimal::w#0 ]
[ utoa::$4 ]
[ utoa::buffer#3 ]
[ utoa::$11 ]
[ utoa::digit_value#0 ]
[ utoa_append::buffer#0 ]
[ utoa_append::sub#0 ]
[ utoa_append::return#0 ]
[ sum::tmp#1 ]
[ Ticks#1 ]
[ Ticks#12 ]
[ print_word::w#0 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
Allocated zp[2]:2 [ main::i#3 main::i#2 ]
Allocated zp[2]:4 [ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ]
Allocated zp[2]:6 [ print_str::str#2 print_str::str#0 ]
Allocated zp[1]:8 [ utoa::digit#2 utoa::digit#1 ]
Allocated zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ]
Allocated zp[1]:11 [ utoa::started#2 utoa::started#4 ]
Allocated zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ]
Allocated zp[2]:14 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ]
Allocated zp[1]:16 [ utoa_append::digit#2 utoa_append::digit#1 ]
Allocated zp[1]:17 [ sum::page#3 sum::page#2 ]
Allocated zp[2]:18 [ sum::p#5 sum::p#2 ]
Allocated zp[1]:20 [ sum::i#3 sum::i#2 ]
Allocated zp[2]:21 [ sum::s#4 sum::s#3 sum::s#2 ]
Allocated zp[1]:23 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp[1]:24 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp[2]:25 [ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ]
Allocated zp[2]:27 [ last_time ]
Allocated zp[2]:29 [ rand_seed ]
Allocated zp[2]:31 [ sum::return#2 ]
Allocated zp[2]:33 [ print_word_decimal::w#0 ]
Allocated zp[1]:35 [ utoa::$4 ]
Allocated zp[2]:36 [ utoa::buffer#3 ]
Allocated zp[1]:38 [ utoa::$11 ]
Allocated zp[2]:39 [ utoa::digit_value#0 ]
Allocated zp[2]:41 [ utoa_append::buffer#0 ]
Allocated zp[2]:43 [ utoa_append::sub#0 ]
Allocated zp[2]:45 [ utoa_append::return#0 ]
Allocated zp[1]:47 [ sum::tmp#1 ]
Allocated zp[2]:48 [ Ticks#1 ]
Allocated zp[2]:50 [ Ticks#12 ]
Allocated zp[2]:52 [ print_word::w#0 ]
Allocated zp[1]:54 [ print_byte::$0 ]
Allocated zp[1]:55 [ print_byte::$2 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label rom = $e000
  .label last_time = $1b
  .label rand_seed = $1d
  .label print_char_cursor = $19
  .label print_line_cursor = 4
  .label Ticks = $30
  .label Ticks_1 = $32
  // @begin
__bbegin:
  jmp __b1
  // @1
__b1:
  // [1] (word) last_time ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z last_time
  lda #>0
  sta.z last_time+1
  jmp __b2
  // @2
__b2:
  // [2] (word) rand_seed ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z rand_seed
  lda #>0
  sta.z rand_seed+1
  // [3] phi from @2 to @3 [phi:@2->@3]
__b3_from___b2:
  jmp __b3
  // @3
__b3:
  // [4] call main 
  // [6] phi from @3 to main [phi:@3->main]
main_from___b3:
  jsr main
  // [5] phi from @3 to @end [phi:@3->@end]
__bend_from___b3:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label i = 2
    // [7] call start 
    jsr start
    // [8] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [8] phi (byte*) print_line_cursor#20 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [8] phi (byte*) print_char_cursor#51 = (byte*) 1024 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [8] phi (word) main::i#3 = (byte) 0 [phi:main->main::@1#2] -- vwuz1=vbuc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    jmp __b1
    // main::@1
  __b1:
    // [9] if((word) main::i#3<(byte) 6) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    cmp #>6
    bcc __b2_from___b1
    bne !+
    lda.z i
    cmp #<6
    bcc __b2_from___b1
  !:
    // [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
  __b3_from___b1:
    jmp __b3
    // main::@3
  __b3:
    // [11] call end 
    jsr end
    jmp __breturn
    // main::@return
  __breturn:
    // [12] return 
    rts
    // [13] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [14] call sum 
    // [67] phi from main::@2 to sum [phi:main::@2->sum]
  sum_from___b2:
    jsr sum
    // [15] (word) sum::return#2 ← (word) sum::s#3 -- vwuz1=vwuz2 
    lda.z sum.s
    sta.z sum.return
    lda.z sum.s+1
    sta.z sum.return+1
    jmp __b4
    // main::@4
  __b4:
    // [16] (word) print_word_decimal::w#0 ← (word) sum::return#2 -- vwuz1=vwuz2 
    lda.z sum.return
    sta.z print_word_decimal.w
    lda.z sum.return+1
    sta.z print_word_decimal.w+1
    // [17] call print_word_decimal 
    jsr print_word_decimal
    // [18] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [19] call print_ln 
    // [22] phi from main::@5 to print_ln [phi:main::@5->print_ln]
  print_ln_from___b5:
    // [22] phi (byte*) print_char_cursor#46 = (byte*) print_char_cursor#2 [phi:main::@5->print_ln#0] -- register_copy 
    jsr print_ln
    jmp __b6
    // main::@6
  __b6:
    // [20] (word) main::i#2 ← ++ (word) main::i#3 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [21] (byte*) print_char_cursor#71 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [8] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [8] phi (byte*) print_line_cursor#20 = (byte*) print_line_cursor#1 [phi:main::@6->main::@1#0] -- register_copy 
    // [8] phi (byte*) print_char_cursor#51 = (byte*) print_char_cursor#71 [phi:main::@6->main::@1#1] -- register_copy 
    // [8] phi (word) main::i#3 = (word) main::i#2 [phi:main::@6->main::@1#2] -- register_copy 
    jmp __b1
}
  // 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#9 = (byte*) print_line_cursor#20 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [24] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (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#1<(byte*) print_char_cursor#46) 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_word_decimal
// Print a word as DECIMAL
// print_word_decimal(word zp($21) w)
print_word_decimal: {
    .label w = $21
    // [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0 -- vwuz1=vwuz2 
    lda.z w
    sta.z utoa.value
    lda.z w+1
    sta.z utoa.value+1
    // [28] call utoa 
    // [39] phi from print_word_decimal to utoa [phi:print_word_decimal->utoa]
  utoa_from_print_word_decimal:
    jsr utoa
    // [29] phi from print_word_decimal to print_word_decimal::@1 [phi:print_word_decimal->print_word_decimal::@1]
  __b1_from_print_word_decimal:
    jmp __b1
    // print_word_decimal::@1
  __b1:
    // [30] call print_str 
    // [32] phi from print_word_decimal::@1 to print_str [phi:print_word_decimal::@1->print_str]
  print_str_from___b1:
    jsr print_str
    jmp __breturn
    // print_word_decimal::@return
  __breturn:
    // [31] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zp(6) str)
print_str: {
    .label str = 6
    // [33] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
  __b1_from_print_str:
    // [33] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#51 [phi:print_str->print_str::@1#0] -- register_copy 
    // [33] phi (byte*) print_str::str#2 = (const byte*) decimal_digits [phi:print_str->print_str::@1#1] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z str
    lda #>decimal_digits
    sta.z str+1
    jmp __b1
    // print_str::@1
  __b1:
    // [34] 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:
    // [35] return 
    rts
    // print_str::@2
  __b2:
    // [36] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#2) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
    // [37] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [38] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [33] phi from print_str::@2 to print_str::@1 [phi:print_str::@2->print_str::@1]
  __b1_from___b2:
    // [33] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#1 [phi:print_str::@2->print_str::@1#0] -- register_copy 
    // [33] phi (byte*) print_str::str#2 = (byte*) print_str::str#0 [phi:print_str::@2->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // utoa
// Converts unsigned number value to a string representing it in RADIX format.
// If the leading digits are zero they are not included in the string.
// - value : The number to be converted to RADIX
// - buffer : receives the string representing the number and zero-termination.
// - radix : The radix to convert the number to (from the enum RADIX)
// utoa(word zp(9) value, byte* zp($24) buffer)
utoa: {
    .const max_digits = 5
    .label __4 = $23
    .label __11 = $26
    .label digit_value = $27
    .label buffer = $24
    .label digit = 8
    .label value = 9
    .label buffer_1 = $c
    .label started = $b
    // [40] phi from utoa to utoa::@1 [phi:utoa->utoa::@1]
  __b1_from_utoa:
    // [40] phi (byte*) utoa::buffer#11 = (const byte*) decimal_digits [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z buffer_1
    lda #>decimal_digits
    sta.z buffer_1+1
    // [40] phi (byte) utoa::started#2 = (byte) 0 [phi:utoa->utoa::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z started
    // [40] phi (word) utoa::value#2 = (word) utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy 
    // [40] phi (byte) utoa::digit#2 = (byte) 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z digit
    jmp __b1
    // utoa::@1
  __b1:
    // [41] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    jmp __b3
    // utoa::@3
  __b3:
    // [42] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 -- vbuz1=_byte_vwuz2 
    lda.z value
    sta.z __4
    // [43] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __4
    lda DIGITS,y
    ldy #0
    sta (buffer_1),y
    // [44] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz2 
    lda.z buffer_1
    clc
    adc #1
    sta.z buffer
    lda.z buffer_1+1
    adc #0
    sta.z buffer+1
    // [45] *((byte*) utoa::buffer#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (buffer),y
    jmp __breturn
    // utoa::@return
  __breturn:
    // [46] return 
    rts
    // utoa::@2
  __b2:
    // [47] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda.z digit
    asl
    sta.z __11
    // [48] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuz2 
    ldy.z __11
    lda RADIX_DECIMAL_VALUES,y
    sta.z digit_value
    lda RADIX_DECIMAL_VALUES+1,y
    sta.z digit_value+1
    // [49] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5 -- vbuc1_neq_vbuz1_then_la1 
    lda #0
    cmp.z started
    bne __b5
    jmp __b7
    // utoa::@7
  __b7:
    // [50] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5 -- vwuz1_ge_vwuz2_then_la1 
    lda.z digit_value+1
    cmp.z value+1
    bne !+
    lda.z digit_value
    cmp.z value
    beq __b5
  !:
    bcc __b5
    // [51] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4]
  __b4_from___b7:
    // [51] phi (byte*) utoa::buffer#14 = (byte*) utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy 
    // [51] phi (byte) utoa::started#4 = (byte) utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy 
    // [51] phi (word) utoa::value#6 = (word) utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy 
    jmp __b4
    // utoa::@4
  __b4:
    // [52] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [40] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1]
  __b1_from___b4:
    // [40] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy 
    // [40] phi (byte) utoa::started#2 = (byte) utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy 
    // [40] phi (word) utoa::value#2 = (word) utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy 
    // [40] phi (byte) utoa::digit#2 = (byte) utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy 
    jmp __b1
    // utoa::@5
  __b5:
    // [53] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 -- pbuz1=pbuz2 
    lda.z buffer_1
    sta.z utoa_append.buffer
    lda.z buffer_1+1
    sta.z utoa_append.buffer+1
    // [54] (word) utoa_append::value#0 ← (word) utoa::value#2 -- vwuz1=vwuz2 
    lda.z value
    sta.z utoa_append.value
    lda.z value+1
    sta.z utoa_append.value+1
    // [55] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 -- vwuz1=vwuz2 
    lda.z digit_value
    sta.z utoa_append.sub
    lda.z digit_value+1
    sta.z utoa_append.sub+1
    // [56] call utoa_append 
    // [60] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append]
  utoa_append_from___b5:
    jsr utoa_append
    // [57] (word) utoa_append::return#0 ← (word) utoa_append::value#2 -- vwuz1=vwuz2 
    lda.z utoa_append.value
    sta.z utoa_append.return
    lda.z utoa_append.value+1
    sta.z utoa_append.return+1
    jmp __b6
    // utoa::@6
  __b6:
    // [58] (word) utoa::value#0 ← (word) utoa_append::return#0 -- vwuz1=vwuz2 
    lda.z utoa_append.return
    sta.z value
    lda.z utoa_append.return+1
    sta.z value+1
    // [59] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer_1
    bne !+
    inc.z buffer_1+1
  !:
    // [51] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4]
  __b4_from___b6:
    // [51] phi (byte*) utoa::buffer#14 = (byte*) utoa::buffer#4 [phi:utoa::@6->utoa::@4#0] -- register_copy 
    // [51] phi (byte) utoa::started#4 = (byte) 1 [phi:utoa::@6->utoa::@4#1] -- vbuz1=vbuc1 
    lda #1
    sta.z started
    // [51] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@6->utoa::@4#2] -- register_copy 
    jmp __b4
}
  // utoa_append
// Used to convert a single digit of an unsigned number value to a string representation
// Counts a single digit up from '0' as long as the value is larger than sub.
// Each time the digit is increased sub is subtracted from value.
// - buffer : pointer to the char that receives the digit
// - value : The value where the digit will be derived from
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
//        (For decimal the subs used are 10000, 1000, 100, 10, 1)
// returns : the value reduced by sub * digit so that it is less than sub.
// utoa_append(byte* zp($29) buffer, word zp($e) value, word zp($2b) sub)
utoa_append: {
    .label buffer = $29
    .label value = $e
    .label sub = $2b
    .label return = $2d
    .label digit = $10
    // [61] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1]
  __b1_from_utoa_append:
    // [61] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z digit
    // [61] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy 
    jmp __b1
    // utoa_append::@1
  __b1:
    // [62] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 
    lda.z sub+1
    cmp.z value+1
    bne !+
    lda.z sub
    cmp.z value
    beq __b2
  !:
    bcc __b2
    jmp __b3
    // utoa_append::@3
  __b3:
    // [63] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 
    ldy.z digit
    lda DIGITS,y
    ldy #0
    sta (buffer),y
    jmp __breturn
    // utoa_append::@return
  __breturn:
    // [64] return 
    rts
    // utoa_append::@2
  __b2:
    // [65] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [66] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z value
    sec
    sbc.z sub
    sta.z value
    lda.z value+1
    sbc.z sub+1
    sta.z value+1
    // [61] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1]
  __b1_from___b2:
    // [61] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy 
    // [61] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy 
    jmp __b1
}
  // sum
sum: {
    .label tmp = $2f
    .label s = $15
    .label i = $14
    .label p = $12
    .label page = $11
    .label return = $1f
    // [68] phi from sum to sum::@1 [phi:sum->sum::@1]
  __b1_from_sum:
    // [68] phi (byte*) sum::p#5 = (const byte*) rom [phi:sum->sum::@1#0] -- pbuz1=pbuc1 
    lda #<rom
    sta.z p
    lda #>rom
    sta.z p+1
    // [68] phi (word) sum::s#3 = (byte) 0 [phi:sum->sum::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z s
    lda #>0
    sta.z s+1
    // [68] phi (byte) sum::page#3 = (byte) 0 [phi:sum->sum::@1#2] -- vbuz1=vbuc1 
    lda #0
    sta.z page
    jmp __b1
  /* doing it page-by-page is faster than doing just one huge loop */
    // sum::@1
  __b1:
    // [69] if((byte) sum::page#3<(byte) $20) goto sum::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z page
    cmp #$20
    bcc __b2_from___b1
    jmp __breturn
    // sum::@return
  __breturn:
    // [70] return 
    rts
    // [71] phi from sum::@1 to sum::@2 [phi:sum::@1->sum::@2]
  __b2_from___b1:
    // [71] phi (word) sum::s#4 = (word) sum::s#3 [phi:sum::@1->sum::@2#0] -- register_copy 
    // [71] phi (byte) sum::i#3 = (byte) 0 [phi:sum::@1->sum::@2#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b2
    // [71] phi from sum::@2 to sum::@2 [phi:sum::@2->sum::@2]
  __b2_from___b2:
    // [71] phi (word) sum::s#4 = (word) sum::s#2 [phi:sum::@2->sum::@2#0] -- register_copy 
    // [71] phi (byte) sum::i#3 = (byte) sum::i#2 [phi:sum::@2->sum::@2#1] -- register_copy 
    jmp __b2
    // sum::@2
  __b2:
    // [72] (byte) sum::tmp#1 ← *((byte*) sum::p#5 + (byte) sum::i#3) -- vbuz1=pbuz2_derefidx_vbuz3 
    ldy.z i
    lda (p),y
    sta.z tmp
    // [73] (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1 -- vwuz1=vwuz1_plus_vbuz2 
    lda.z tmp
    clc
    adc.z s
    sta.z s
    bcc !+
    inc.z s+1
  !:
    // [74] (byte) sum::i#2 ← ++ (byte) sum::i#3 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [75] if((byte) 0!=(byte) sum::i#2) goto sum::@2 -- vbuc1_neq_vbuz1_then_la1 
    lda #0
    cmp.z i
    bne __b2_from___b2
    jmp __b3
    // sum::@3
  __b3:
    // [76] (byte*) sum::p#2 ← (byte*) sum::p#5 + (word) $100 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z p
    adc #<$100
    sta.z p
    lda.z p+1
    adc #>$100
    sta.z p+1
    // [77] (byte) sum::page#2 ← ++ (byte) sum::page#3 -- vbuz1=_inc_vbuz1 
    inc.z page
    // [68] phi from sum::@3 to sum::@1 [phi:sum::@3->sum::@1]
  __b1_from___b3:
    // [68] phi (byte*) sum::p#5 = (byte*) sum::p#2 [phi:sum::@3->sum::@1#0] -- register_copy 
    // [68] phi (word) sum::s#3 = (word) sum::s#2 [phi:sum::@3->sum::@1#1] -- register_copy 
    // [68] phi (byte) sum::page#3 = (byte) sum::page#2 [phi:sum::@3->sum::@1#2] -- register_copy 
    jmp __b1
}
  // end
end: {
    // [78] (word) Ticks#1 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // [79] call start 
    jsr start
    jmp __b1
    // end::@1
  __b1:
    // [80] (word) last_time ← (word) last_time - (word) Ticks#1 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z last_time
    sec
    sbc.z Ticks
    sta.z last_time
    lda.z last_time+1
    sbc.z Ticks+1
    sta.z last_time+1
    // [81] (word) Ticks#12 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // [82] (word) print_word::w#0 ← (word) Ticks#12 -- vwuz1=vwuz2 
    lda.z Ticks_1
    sta.z print_word.w
    lda.z Ticks_1+1
    sta.z print_word.w+1
    // [83] call print_word 
    jsr print_word
    // [84] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
  __b2_from___b1:
    jmp __b2
    // end::@2
  __b2:
    // [85] call print_ln 
    // [22] phi from end::@2 to print_ln [phi:end::@2->print_ln]
  print_ln_from___b2:
    // [22] phi (byte*) print_char_cursor#46 = (byte*) print_char_cursor#13 [phi:end::@2->print_ln#0] -- register_copy 
    jsr print_ln
    jmp __breturn
    // end::@return
  __breturn:
    // [86] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp($34) w)
print_word: {
    .label w = $34
    // [87] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda.z w+1
    sta.z print_byte.b
    // [88] call print_byte 
    // [92] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [92] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#51 [phi:print_word->print_byte#0] -- register_copy 
    // [92] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __b1
    // print_word::@1
  __b1:
    // [89] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuz1=_lo_vwuz2 
    lda.z w
    sta.z print_byte.b
    // [90] call print_byte 
    // [92] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from___b1:
    // [92] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#13 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [92] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __breturn
    // print_word::@return
  __breturn:
    // [91] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zp($17) b)
print_byte: {
    .label __0 = $36
    .label __2 = $37
    .label b = $17
    // [93] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 
    lda.z b
    lsr
    lsr
    lsr
    lsr
    sta.z __0
    // [94] (byte) print_char::ch#0 ← *((const byte*) DIGITS + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __0
    lda DIGITS,y
    sta.z print_char.ch
    // [95] call print_char 
    // [100] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [100] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#49 [phi:print_byte->print_char#0] -- register_copy 
    // [100] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_byte::@1
  __b1:
    // [96] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and.z b
    sta.z __2
    // [97] (byte) print_char::ch#1 ← *((const byte*) DIGITS + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __2
    lda DIGITS,y
    sta.z print_char.ch
    // [98] call print_char 
    // [100] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from___b1:
    // [100] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#13 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [100] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_byte::@return
  __breturn:
    // [99] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte zp($18) ch)
print_char: {
    .label ch = $18
    // [101] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2 
    lda.z ch
    ldy #0
    sta (print_char_cursor),y
    // [102] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#35 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [103] return 
    rts
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    // [105] (word) rand_seed ← (word) $194a -- vwuz1=vwuc1 
    lda #<$194a
    sta.z rand_seed
    lda #>$194a
    sta.z rand_seed+1
    jmp __breturn
    // start::@return
  __breturn:
    // [106] return 
    rts
}
  // File Data
  // The digits used for numbers
  DIGITS: .text "0123456789abcdef"
  // Values of decimal digits
  RADIX_DECIMAL_VALUES: .word $2710, $3e8, $64, $a
  // Digits used for storing the decimal word
  decimal_digits: .fill 6, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] (word) last_time ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [2] (word) rand_seed ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [9] if((word) main::i#3<(byte) 6) goto main::@2 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 ] ( main:4 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 ] ) always clobbers reg byte a 
Statement [15] (word) sum::return#2 ← (word) sum::s#3 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::return#2 ] ( main:4 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::return#2 ] ) always clobbers reg byte a 
Statement [16] (word) print_word_decimal::w#0 ← (word) sum::return#2 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 print_word_decimal::w#0 ] ( main:4 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 print_word_decimal::w#0 ] ) always clobbers reg byte a 
Statement [21] (byte*) print_char_cursor#71 ← (byte*) print_line_cursor#1 [ last_time main::i#2 print_char_cursor#71 print_line_cursor#1 ] ( main:4 [ last_time main::i#2 print_char_cursor#71 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [24] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 [ print_line_cursor#1 print_char_cursor#46 ] ( main:4::print_ln:19 [ last_time main::i#3 print_line_cursor#1 print_char_cursor#46 ] main:4::end:11::print_ln:85 [ print_line_cursor#1 print_char_cursor#46 ] ) always clobbers reg byte a 
Statement [25] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#46) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#46 ] ( main:4::print_ln:19 [ last_time main::i#3 print_line_cursor#1 print_char_cursor#46 ] main:4::end:11::print_ln:85 [ print_line_cursor#1 print_char_cursor#46 ] ) always clobbers reg byte a 
Statement [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0 [ print_char_cursor#51 utoa::value#1 ] ( main:4::print_word_decimal:17 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::value#1 ] ) always clobbers reg byte a 
Statement [34] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 [ print_char_cursor#2 print_str::str#2 ] ( main:4::print_word_decimal:17::print_str:30 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#2 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [36] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#2) [ print_char_cursor#2 print_str::str#2 ] ( main:4::print_word_decimal:17::print_str:30 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#2 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [42] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 [ utoa::buffer#11 utoa::$4 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::buffer#11 utoa::$4 ] ) always clobbers reg byte a 
Statement [43] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$4) [ utoa::buffer#11 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::buffer#11 ] ) always clobbers reg byte a reg byte y 
Statement [44] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 [ utoa::buffer#3 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::buffer#3 ] ) always clobbers reg byte a 
Statement [45] *((byte*) utoa::buffer#3) ← (byte) 0 [ ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 ] ) always clobbers reg byte a reg byte y 
Statement [47] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:8 [ utoa::digit#2 utoa::digit#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:11 [ utoa::started#2 utoa::started#4 ]
Statement [48] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$11) [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a 
Statement [50] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a 
Statement [53] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 [ utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ) always clobbers reg byte a 
Statement [54] (word) utoa_append::value#0 ← (word) utoa::value#2 [ utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ) always clobbers reg byte a 
Statement [55] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 [ utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ) always clobbers reg byte a 
Statement [57] (word) utoa_append::return#0 ← (word) utoa_append::value#2 [ utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ) always clobbers reg byte a 
Statement [58] (word) utoa::value#0 ← (word) utoa_append::return#0 [ utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ) always clobbers reg byte a 
Statement [62] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:4::print_word_decimal:17::utoa:28::utoa_append:56 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:16 [ utoa_append::digit#2 utoa_append::digit#1 ]
Statement [63] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2) [ utoa_append::value#2 ] ( main:4::print_word_decimal:17::utoa:28::utoa_append:56 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:8 [ utoa::digit#2 utoa::digit#1 ]
Statement [66] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:4::print_word_decimal:17::utoa:28::utoa_append:56 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ) always clobbers reg byte a 
Statement [72] (byte) sum::tmp#1 ← *((byte*) sum::p#5 + (byte) sum::i#3) [ sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] ( main:4::sum:14 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:17 [ sum::page#3 sum::page#2 ]
Removing always clobbered register reg byte a as potential for zp[1]:20 [ sum::i#3 sum::i#2 ]
Statement [73] (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1 [ sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] ( main:4::sum:14 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] ) always clobbers reg byte a 
Statement [76] (byte*) sum::p#2 ← (byte*) sum::p#5 + (word) $100 [ sum::page#3 sum::s#2 sum::p#2 ] ( main:4::sum:14 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::page#3 sum::s#2 sum::p#2 ] ) always clobbers reg byte a 
Statement [78] (word) Ticks#1 ← (word) last_time [ print_char_cursor#51 print_line_cursor#20 Ticks#1 ] ( main:4::end:11 [ print_char_cursor#51 print_line_cursor#20 Ticks#1 ] ) always clobbers reg byte a 
Statement [80] (word) last_time ← (word) last_time - (word) Ticks#1 [ last_time print_char_cursor#51 print_line_cursor#20 ] ( main:4::end:11 [ last_time print_char_cursor#51 print_line_cursor#20 ] ) always clobbers reg byte a 
Statement [81] (word) Ticks#12 ← (word) last_time [ print_char_cursor#51 print_line_cursor#20 Ticks#12 ] ( main:4::end:11 [ print_char_cursor#51 print_line_cursor#20 Ticks#12 ] ) always clobbers reg byte a 
Statement [82] (word) print_word::w#0 ← (word) Ticks#12 [ print_char_cursor#51 print_line_cursor#20 print_word::w#0 ] ( main:4::end:11 [ print_char_cursor#51 print_line_cursor#20 print_word::w#0 ] ) always clobbers reg byte a 
Statement [87] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_char_cursor#51 print_word::w#0 print_byte::b#0 ] ( main:4::end:11::print_word:83 [ print_line_cursor#20 print_char_cursor#51 print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [89] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_char_cursor#13 print_byte::b#1 ] ( main:4::end:11::print_word:83 [ print_line_cursor#20 print_char_cursor#13 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [93] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#49 print_byte::$0 ] ( main:4::end:11::print_word:83::print_byte:88 [ print_line_cursor#20 print_word::w#0 print_byte::b#2 print_char_cursor#49 print_byte::$0 ] main:4::end:11::print_word:83::print_byte:90 [ print_line_cursor#20 print_byte::b#2 print_char_cursor#49 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:23 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [96] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#13 print_byte::$2 ] ( main:4::end:11::print_word:83::print_byte:88 [ print_line_cursor#20 print_word::w#0 print_char_cursor#13 print_byte::$2 ] main:4::end:11::print_word:83::print_byte:90 [ print_line_cursor#20 print_char_cursor#13 print_byte::$2 ] ) always clobbers reg byte a 
Statement [101] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2 [ print_char_cursor#35 ] ( main:4::end:11::print_word:83::print_byte:88::print_char:95 [ print_line_cursor#20 print_word::w#0 print_byte::b#2 print_char_cursor#35 ] main:4::end:11::print_word:83::print_byte:90::print_char:95 [ print_line_cursor#20 print_byte::b#2 print_char_cursor#35 ] main:4::end:11::print_word:83::print_byte:88::print_char:98 [ print_line_cursor#20 print_word::w#0 print_char_cursor#35 ] main:4::end:11::print_word:83::print_byte:90::print_char:98 [ print_line_cursor#20 print_char_cursor#35 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:23 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  } always clobbers reg byte a reg byte x reg byte y 
Statement [105] (word) rand_seed ← (word) $194a [ ] ( main:4::start:7 [ last_time ] main:4::end:11::start:79 [ print_char_cursor#51 print_line_cursor#20 Ticks#1 ] ) always clobbers reg byte a 
Statement [1] (word) last_time ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [2] (word) rand_seed ← (word) 0 [ last_time ] (  [ last_time ] ) always clobbers reg byte a 
Statement [9] if((word) main::i#3<(byte) 6) goto main::@2 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 ] ( main:4 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 ] ) always clobbers reg byte a 
Statement [15] (word) sum::return#2 ← (word) sum::s#3 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::return#2 ] ( main:4 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::return#2 ] ) always clobbers reg byte a 
Statement [16] (word) print_word_decimal::w#0 ← (word) sum::return#2 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 print_word_decimal::w#0 ] ( main:4 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 print_word_decimal::w#0 ] ) always clobbers reg byte a 
Statement [21] (byte*) print_char_cursor#71 ← (byte*) print_line_cursor#1 [ last_time main::i#2 print_char_cursor#71 print_line_cursor#1 ] ( main:4 [ last_time main::i#2 print_char_cursor#71 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [24] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (byte) $28 [ print_line_cursor#1 print_char_cursor#46 ] ( main:4::print_ln:19 [ last_time main::i#3 print_line_cursor#1 print_char_cursor#46 ] main:4::end:11::print_ln:85 [ print_line_cursor#1 print_char_cursor#46 ] ) always clobbers reg byte a 
Statement [25] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#46) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#46 ] ( main:4::print_ln:19 [ last_time main::i#3 print_line_cursor#1 print_char_cursor#46 ] main:4::end:11::print_ln:85 [ print_line_cursor#1 print_char_cursor#46 ] ) always clobbers reg byte a 
Statement [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0 [ print_char_cursor#51 utoa::value#1 ] ( main:4::print_word_decimal:17 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::value#1 ] ) always clobbers reg byte a 
Statement [34] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 [ print_char_cursor#2 print_str::str#2 ] ( main:4::print_word_decimal:17::print_str:30 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#2 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [36] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#2) [ print_char_cursor#2 print_str::str#2 ] ( main:4::print_word_decimal:17::print_str:30 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#2 print_str::str#2 ] ) always clobbers reg byte a reg byte y 
Statement [42] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 [ utoa::buffer#11 utoa::$4 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::buffer#11 utoa::$4 ] ) always clobbers reg byte a 
Statement [43] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$4) [ utoa::buffer#11 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::buffer#11 ] ) always clobbers reg byte a reg byte y 
Statement [44] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 [ utoa::buffer#3 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::buffer#3 ] ) always clobbers reg byte a 
Statement [45] *((byte*) utoa::buffer#3) ← (byte) 0 [ ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 ] ) always clobbers reg byte a reg byte y 
Statement [47] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$11 ] ) always clobbers reg byte a 
Statement [48] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$11) [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a 
Statement [50] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ) always clobbers reg byte a 
Statement [53] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11 [ utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ) always clobbers reg byte a 
Statement [54] (word) utoa_append::value#0 ← (word) utoa::value#2 [ utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ) always clobbers reg byte a 
Statement [55] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0 [ utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ) always clobbers reg byte a 
Statement [57] (word) utoa_append::return#0 ← (word) utoa_append::value#2 [ utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ) always clobbers reg byte a 
Statement [58] (word) utoa::value#0 ← (word) utoa_append::return#0 [ utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ( main:4::print_word_decimal:17::utoa:28 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa::value#0 ] ) always clobbers reg byte a 
Statement [62] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ( main:4::print_word_decimal:17::utoa:28::utoa_append:56 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] ) always clobbers reg byte a 
Statement [63] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2) [ utoa_append::value#2 ] ( main:4::print_word_decimal:17::utoa:28::utoa_append:56 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] ) always clobbers reg byte a reg byte y 
Statement [66] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:4::print_word_decimal:17::utoa:28::utoa_append:56 [ last_time main::i#3 print_line_cursor#20 print_char_cursor#51 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ) always clobbers reg byte a 
Statement [72] (byte) sum::tmp#1 ← *((byte*) sum::p#5 + (byte) sum::i#3) [ sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] ( main:4::sum:14 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] ) always clobbers reg byte a 
Statement [73] (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1 [ sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] ( main:4::sum:14 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] ) always clobbers reg byte a 
Statement [76] (byte*) sum::p#2 ← (byte*) sum::p#5 + (word) $100 [ sum::page#3 sum::s#2 sum::p#2 ] ( main:4::sum:14 [ last_time main::i#3 print_char_cursor#51 print_line_cursor#20 sum::page#3 sum::s#2 sum::p#2 ] ) always clobbers reg byte a 
Statement [78] (word) Ticks#1 ← (word) last_time [ print_char_cursor#51 print_line_cursor#20 Ticks#1 ] ( main:4::end:11 [ print_char_cursor#51 print_line_cursor#20 Ticks#1 ] ) always clobbers reg byte a 
Statement [80] (word) last_time ← (word) last_time - (word) Ticks#1 [ last_time print_char_cursor#51 print_line_cursor#20 ] ( main:4::end:11 [ last_time print_char_cursor#51 print_line_cursor#20 ] ) always clobbers reg byte a 
Statement [81] (word) Ticks#12 ← (word) last_time [ print_char_cursor#51 print_line_cursor#20 Ticks#12 ] ( main:4::end:11 [ print_char_cursor#51 print_line_cursor#20 Ticks#12 ] ) always clobbers reg byte a 
Statement [82] (word) print_word::w#0 ← (word) Ticks#12 [ print_char_cursor#51 print_line_cursor#20 print_word::w#0 ] ( main:4::end:11 [ print_char_cursor#51 print_line_cursor#20 print_word::w#0 ] ) always clobbers reg byte a 
Statement [87] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_char_cursor#51 print_word::w#0 print_byte::b#0 ] ( main:4::end:11::print_word:83 [ print_line_cursor#20 print_char_cursor#51 print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [89] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_char_cursor#13 print_byte::b#1 ] ( main:4::end:11::print_word:83 [ print_line_cursor#20 print_char_cursor#13 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [93] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#49 print_byte::$0 ] ( main:4::end:11::print_word:83::print_byte:88 [ print_line_cursor#20 print_word::w#0 print_byte::b#2 print_char_cursor#49 print_byte::$0 ] main:4::end:11::print_word:83::print_byte:90 [ print_line_cursor#20 print_byte::b#2 print_char_cursor#49 print_byte::$0 ] ) always clobbers reg byte a 
Statement [96] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#13 print_byte::$2 ] ( main:4::end:11::print_word:83::print_byte:88 [ print_line_cursor#20 print_word::w#0 print_char_cursor#13 print_byte::$2 ] main:4::end:11::print_word:83::print_byte:90 [ print_line_cursor#20 print_char_cursor#13 print_byte::$2 ] ) always clobbers reg byte a 
Statement [101] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2 [ print_char_cursor#35 ] ( main:4::end:11::print_word:83::print_byte:88::print_char:95 [ print_line_cursor#20 print_word::w#0 print_byte::b#2 print_char_cursor#35 ] main:4::end:11::print_word:83::print_byte:90::print_char:95 [ print_line_cursor#20 print_byte::b#2 print_char_cursor#35 ] main:4::end:11::print_word:83::print_byte:88::print_char:98 [ print_line_cursor#20 print_word::w#0 print_char_cursor#35 ] main:4::end:11::print_word:83::print_byte:90::print_char:98 [ print_line_cursor#20 print_char_cursor#35 ] ) always clobbers reg byte y 
Statement asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  } always clobbers reg byte a reg byte x reg byte y 
Statement [105] (word) rand_seed ← (word) $194a [ ] ( main:4::start:7 [ last_time ] main:4::end:11::start:79 [ print_char_cursor#51 print_line_cursor#20 Ticks#1 ] ) always clobbers reg byte a 
Potential registers zp[2]:2 [ main::i#3 main::i#2 ] : zp[2]:2 , 
Potential registers zp[2]:4 [ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ] : zp[2]:4 , 
Potential registers zp[2]:6 [ print_str::str#2 print_str::str#0 ] : zp[2]:6 , 
Potential registers zp[1]:8 [ utoa::digit#2 utoa::digit#1 ] : zp[1]:8 , reg byte x , 
Potential registers zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ] : zp[2]:9 , 
Potential registers zp[1]:11 [ utoa::started#2 utoa::started#4 ] : zp[1]:11 , reg byte x , reg byte y , 
Potential registers zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ] : zp[2]:12 , 
Potential registers zp[2]:14 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] : zp[2]:14 , 
Potential registers zp[1]:16 [ utoa_append::digit#2 utoa_append::digit#1 ] : zp[1]:16 , reg byte x , reg byte y , 
Potential registers zp[1]:17 [ sum::page#3 sum::page#2 ] : zp[1]:17 , reg byte x , reg byte y , 
Potential registers zp[2]:18 [ sum::p#5 sum::p#2 ] : zp[2]:18 , 
Potential registers zp[1]:20 [ sum::i#3 sum::i#2 ] : zp[1]:20 , reg byte x , reg byte y , 
Potential registers zp[2]:21 [ sum::s#4 sum::s#3 sum::s#2 ] : zp[2]:21 , 
Potential registers zp[1]:23 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp[1]:23 , reg byte x , 
Potential registers zp[1]:24 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:25 [ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ] : zp[2]:25 , 
Potential registers zp[2]:27 [ last_time ] : zp[2]:27 , 
Potential registers zp[2]:29 [ rand_seed ] : zp[2]:29 , 
Potential registers zp[2]:31 [ sum::return#2 ] : zp[2]:31 , 
Potential registers zp[2]:33 [ print_word_decimal::w#0 ] : zp[2]:33 , 
Potential registers zp[1]:35 [ utoa::$4 ] : zp[1]:35 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:36 [ utoa::buffer#3 ] : zp[2]:36 , 
Potential registers zp[1]:38 [ utoa::$11 ] : zp[1]:38 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:39 [ utoa::digit_value#0 ] : zp[2]:39 , 
Potential registers zp[2]:41 [ utoa_append::buffer#0 ] : zp[2]:41 , 
Potential registers zp[2]:43 [ utoa_append::sub#0 ] : zp[2]:43 , 
Potential registers zp[2]:45 [ utoa_append::return#0 ] : zp[2]:45 , 
Potential registers zp[1]:47 [ sum::tmp#1 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:48 [ Ticks#1 ] : zp[2]:48 , 
Potential registers zp[2]:50 [ Ticks#12 ] : zp[2]:50 , 
Potential registers zp[2]:52 [ print_word::w#0 ] : zp[2]:52 , 
Potential registers zp[1]:54 [ print_byte::$0 ] : zp[1]:54 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:55 [ print_byte::$2 ] : zp[1]:55 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [sum] 2,502.5: zp[1]:20 [ sum::i#3 sum::i#2 ] 2,002: zp[1]:47 [ sum::tmp#1 ] 1,525.35: zp[2]:21 [ sum::s#4 sum::s#3 sum::s#2 ] 272.86: zp[2]:18 [ sum::p#5 sum::p#2 ] 239.88: zp[1]:17 [ sum::page#3 sum::page#2 ] 22: zp[2]:31 [ sum::return#2 ] 
Uplift Scope [utoa_append] 2,554: zp[2]:14 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] 2,003: zp[1]:16 [ utoa_append::digit#2 utoa_append::digit#1 ] 350.5: zp[2]:43 [ utoa_append::sub#0 ] 202: zp[2]:45 [ utoa_append::return#0 ] 12.88: zp[2]:41 [ utoa_append::buffer#0 ] 
Uplift Scope [utoa] 382.64: zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ] 312.5: zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ] 230.86: zp[1]:8 [ utoa::digit#2 utoa::digit#1 ] 202: zp[1]:38 [ utoa::$11 ] 151.5: zp[1]:11 [ utoa::started#2 utoa::started#4 ] 60.6: zp[2]:39 [ utoa::digit_value#0 ] 4: zp[1]:35 [ utoa::$4 ] 4: zp[2]:36 [ utoa::buffer#3 ] 
Uplift Scope [] 258.93: zp[2]:4 [ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ] 198.5: zp[2]:25 [ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ] 40: zp[2]:29 [ rand_seed ] 4: zp[2]:50 [ Ticks#12 ] 2: zp[2]:48 [ Ticks#1 ] 0.56: zp[2]:27 [ last_time ] 
Uplift Scope [print_str] 303: zp[2]:6 [ print_str::str#2 print_str::str#0 ] 
Uplift Scope [print_byte] 10: zp[1]:23 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp[1]:54 [ print_byte::$0 ] 4: zp[1]:55 [ print_byte::$2 ] 
Uplift Scope [main] 14.67: zp[2]:2 [ main::i#3 main::i#2 ] 
Uplift Scope [print_char] 14: zp[1]:24 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [print_word_decimal] 13: zp[2]:33 [ print_word_decimal::w#0 ] 
Uplift Scope [print_word] 2: zp[2]:52 [ print_word::w#0 ] 
Uplift Scope [RADIX] 
Uplift Scope [print_ln] 
Uplift Scope [start] 
Uplift Scope [end] 

Uplifting [sum] best 134072 combination reg byte y [ sum::i#3 sum::i#2 ] reg byte a [ sum::tmp#1 ] zp[2]:21 [ sum::s#4 sum::s#3 sum::s#2 ] zp[2]:18 [ sum::p#5 sum::p#2 ] reg byte x [ sum::page#3 sum::page#2 ] zp[2]:31 [ sum::return#2 ] 
Uplifting [utoa_append] best 128069 combination zp[2]:14 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ] zp[2]:43 [ utoa_append::sub#0 ] zp[2]:45 [ utoa_append::return#0 ] zp[2]:41 [ utoa_append::buffer#0 ] 
Uplifting [utoa] best 126765 combination zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ] zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ] zp[1]:8 [ utoa::digit#2 utoa::digit#1 ] reg byte a [ utoa::$11 ] reg byte x [ utoa::started#2 utoa::started#4 ] zp[2]:39 [ utoa::digit_value#0 ] reg byte a [ utoa::$4 ] zp[2]:36 [ utoa::buffer#3 ] 
Uplifting [] best 126765 combination zp[2]:4 [ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ] zp[2]:25 [ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ] zp[2]:29 [ rand_seed ] zp[2]:50 [ Ticks#12 ] zp[2]:48 [ Ticks#1 ] zp[2]:27 [ last_time ] 
Uplifting [print_str] best 126765 combination zp[2]:6 [ print_str::str#2 print_str::str#0 ] 
Uplifting [print_byte] best 126751 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] 
Uplifting [main] best 126751 combination zp[2]:2 [ main::i#3 main::i#2 ] 
Uplifting [print_char] best 126742 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [print_word_decimal] best 126742 combination zp[2]:33 [ print_word_decimal::w#0 ] 
Uplifting [print_word] best 126742 combination zp[2]:52 [ print_word::w#0 ] 
Uplifting [RADIX] best 126742 combination 
Uplifting [print_ln] best 126742 combination 
Uplifting [start] best 126742 combination 
Uplifting [end] best 126742 combination 
Attempting to uplift remaining variables inzp[1]:8 [ utoa::digit#2 utoa::digit#1 ]
Uplifting [utoa] best 126742 combination zp[1]:8 [ utoa::digit#2 utoa::digit#1 ] 
Coalescing zero page register [ zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 ] ] with [ zp[2]:14 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] with [ zp[2]:33 [ print_word_decimal::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_word_decimal::w#0 ] ] with [ zp[2]:45 [ utoa_append::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 ] ] with [ zp[2]:36 [ utoa::buffer#3 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 ] ] with [ zp[2]:41 [ utoa_append::buffer#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:21 [ sum::s#4 sum::s#3 sum::s#2 ] ] with [ zp[2]:31 [ sum::return#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:39 [ utoa::digit_value#0 ] ] with [ zp[2]:43 [ utoa_append::sub#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:50 [ Ticks#12 ] ] with [ zp[2]:52 [ print_word::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_word_decimal::w#0 utoa_append::return#0 ] ] with [ zp[2]:21 [ sum::s#4 sum::s#3 sum::s#2 sum::return#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:9 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_word_decimal::w#0 utoa_append::return#0 sum::s#4 sum::s#3 sum::s#2 sum::return#2 ] ] with [ zp[2]:6 [ print_str::str#2 print_str::str#0 ] ]
Coalescing zero page register [ zp[2]:18 [ sum::p#5 sum::p#2 ] ] with [ zp[2]:12 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 ] ]
Coalescing zero page register [ zp[2]:48 [ Ticks#1 ] ] with [ zp[2]:2 [ main::i#3 main::i#2 ] ]
Coalescing zero page register [ zp[2]:50 [ Ticks#12 print_word::w#0 ] ] with [ zp[2]:39 [ utoa::digit_value#0 utoa_append::sub#0 ] ]
Allocated (was zp[2]:4) zp[2]:2 [ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ]
Allocated (was zp[1]:8) zp[1]:4 [ utoa::digit#2 utoa::digit#1 ]
Allocated (was zp[2]:9) zp[2]:5 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_word_decimal::w#0 utoa_append::return#0 sum::s#4 sum::s#3 sum::s#2 sum::return#2 print_str::str#2 print_str::str#0 ]
Allocated (was zp[2]:18) zp[2]:7 [ sum::p#5 sum::p#2 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 ]
Allocated (was zp[2]:25) zp[2]:9 [ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ]
Allocated (was zp[2]:27) zp[2]:11 [ last_time ]
Allocated (was zp[2]:29) zp[2]:13 [ rand_seed ]
Allocated (was zp[2]:48) zp[2]:15 [ Ticks#1 main::i#3 main::i#2 ]
Allocated (was zp[2]:50) zp[2]:17 [ Ticks#12 print_word::w#0 utoa::digit_value#0 utoa_append::sub#0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label rom = $e000
  .label last_time = $b
  .label rand_seed = $d
  .label print_char_cursor = 9
  .label print_line_cursor = 2
  .label Ticks = $f
  .label Ticks_1 = $11
  // @begin
__bbegin:
  jmp __b1
  // @1
__b1:
  // [1] (word) last_time ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z last_time
  lda #>0
  sta.z last_time+1
  jmp __b2
  // @2
__b2:
  // [2] (word) rand_seed ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z rand_seed
  lda #>0
  sta.z rand_seed+1
  // [3] phi from @2 to @3 [phi:@2->@3]
__b3_from___b2:
  jmp __b3
  // @3
__b3:
  // [4] call main 
  // [6] phi from @3 to main [phi:@3->main]
main_from___b3:
  jsr main
  // [5] phi from @3 to @end [phi:@3->@end]
__bend_from___b3:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label i = $f
    // [7] call start 
    jsr start
    // [8] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [8] phi (byte*) print_line_cursor#20 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [8] phi (byte*) print_char_cursor#51 = (byte*) 1024 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [8] phi (word) main::i#3 = (byte) 0 [phi:main->main::@1#2] -- vwuz1=vbuc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    jmp __b1
    // main::@1
  __b1:
    // [9] if((word) main::i#3<(byte) 6) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    cmp #>6
    bcc __b2_from___b1
    bne !+
    lda.z i
    cmp #<6
    bcc __b2_from___b1
  !:
    // [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
  __b3_from___b1:
    jmp __b3
    // main::@3
  __b3:
    // [11] call end 
    jsr end
    jmp __breturn
    // main::@return
  __breturn:
    // [12] return 
    rts
    // [13] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [14] call sum 
    // [67] phi from main::@2 to sum [phi:main::@2->sum]
  sum_from___b2:
    jsr sum
    // [15] (word) sum::return#2 ← (word) sum::s#3
    jmp __b4
    // main::@4
  __b4:
    // [16] (word) print_word_decimal::w#0 ← (word) sum::return#2
    // [17] call print_word_decimal 
    jsr print_word_decimal
    // [18] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [19] call print_ln 
    // [22] phi from main::@5 to print_ln [phi:main::@5->print_ln]
  print_ln_from___b5:
    // [22] phi (byte*) print_char_cursor#46 = (byte*) print_char_cursor#2 [phi:main::@5->print_ln#0] -- register_copy 
    jsr print_ln
    jmp __b6
    // main::@6
  __b6:
    // [20] (word) main::i#2 ← ++ (word) main::i#3 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [21] (byte*) print_char_cursor#71 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [8] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [8] phi (byte*) print_line_cursor#20 = (byte*) print_line_cursor#1 [phi:main::@6->main::@1#0] -- register_copy 
    // [8] phi (byte*) print_char_cursor#51 = (byte*) print_char_cursor#71 [phi:main::@6->main::@1#1] -- register_copy 
    // [8] phi (word) main::i#3 = (word) main::i#2 [phi:main::@6->main::@1#2] -- register_copy 
    jmp __b1
}
  // 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#9 = (byte*) print_line_cursor#20 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [24] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#9 + (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#1<(byte*) print_char_cursor#46) 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_word_decimal
// Print a word as DECIMAL
// print_word_decimal(word zp(5) w)
print_word_decimal: {
    .label w = 5
    // [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0
    // [28] call utoa 
    // [39] phi from print_word_decimal to utoa [phi:print_word_decimal->utoa]
  utoa_from_print_word_decimal:
    jsr utoa
    // [29] phi from print_word_decimal to print_word_decimal::@1 [phi:print_word_decimal->print_word_decimal::@1]
  __b1_from_print_word_decimal:
    jmp __b1
    // print_word_decimal::@1
  __b1:
    // [30] call print_str 
    // [32] phi from print_word_decimal::@1 to print_str [phi:print_word_decimal::@1->print_str]
  print_str_from___b1:
    jsr print_str
    jmp __breturn
    // print_word_decimal::@return
  __breturn:
    // [31] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zp(5) str)
print_str: {
    .label str = 5
    // [33] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
  __b1_from_print_str:
    // [33] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#51 [phi:print_str->print_str::@1#0] -- register_copy 
    // [33] phi (byte*) print_str::str#2 = (const byte*) decimal_digits [phi:print_str->print_str::@1#1] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z str
    lda #>decimal_digits
    sta.z str+1
    jmp __b1
    // print_str::@1
  __b1:
    // [34] 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:
    // [35] return 
    rts
    // print_str::@2
  __b2:
    // [36] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#2) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
    // [37] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [38] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [33] phi from print_str::@2 to print_str::@1 [phi:print_str::@2->print_str::@1]
  __b1_from___b2:
    // [33] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#1 [phi:print_str::@2->print_str::@1#0] -- register_copy 
    // [33] phi (byte*) print_str::str#2 = (byte*) print_str::str#0 [phi:print_str::@2->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // utoa
// Converts unsigned number value to a string representing it in RADIX format.
// If the leading digits are zero they are not included in the string.
// - value : The number to be converted to RADIX
// - buffer : receives the string representing the number and zero-termination.
// - radix : The radix to convert the number to (from the enum RADIX)
// utoa(word zp(5) value, byte* zp(7) buffer)
utoa: {
    .const max_digits = 5
    .label digit_value = $11
    .label buffer = 7
    .label digit = 4
    .label value = 5
    // [40] phi from utoa to utoa::@1 [phi:utoa->utoa::@1]
  __b1_from_utoa:
    // [40] phi (byte*) utoa::buffer#11 = (const byte*) decimal_digits [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z buffer
    lda #>decimal_digits
    sta.z buffer+1
    // [40] phi (byte) utoa::started#2 = (byte) 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [40] phi (word) utoa::value#2 = (word) utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy 
    // [40] phi (byte) utoa::digit#2 = (byte) 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z digit
    jmp __b1
    // utoa::@1
  __b1:
    // [41] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    jmp __b3
    // utoa::@3
  __b3:
    // [42] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 -- vbuaa=_byte_vwuz1 
    lda.z value
    // [43] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    ldy #0
    sta (buffer),y
    // [44] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [45] *((byte*) utoa::buffer#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (buffer),y
    jmp __breturn
    // utoa::@return
  __breturn:
    // [46] return 
    rts
    // utoa::@2
  __b2:
    // [47] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 
    lda.z digit
    asl
    // [48] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuaa 
    tay
    lda RADIX_DECIMAL_VALUES,y
    sta.z digit_value
    lda RADIX_DECIMAL_VALUES+1,y
    sta.z digit_value+1
    // [49] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5 -- vbuc1_neq_vbuxx_then_la1 
    cpx #0
    bne __b5
    jmp __b7
    // utoa::@7
  __b7:
    // [50] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5 -- vwuz1_ge_vwuz2_then_la1 
    lda.z digit_value+1
    cmp.z value+1
    bne !+
    lda.z digit_value
    cmp.z value
    beq __b5
  !:
    bcc __b5
    // [51] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4]
  __b4_from___b7:
    // [51] phi (byte*) utoa::buffer#14 = (byte*) utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy 
    // [51] phi (byte) utoa::started#4 = (byte) utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy 
    // [51] phi (word) utoa::value#6 = (word) utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy 
    jmp __b4
    // utoa::@4
  __b4:
    // [52] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [40] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1]
  __b1_from___b4:
    // [40] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy 
    // [40] phi (byte) utoa::started#2 = (byte) utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy 
    // [40] phi (word) utoa::value#2 = (word) utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy 
    // [40] phi (byte) utoa::digit#2 = (byte) utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy 
    jmp __b1
    // utoa::@5
  __b5:
    // [53] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
    // [54] (word) utoa_append::value#0 ← (word) utoa::value#2
    // [55] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
    // [56] call utoa_append 
    // [60] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append]
  utoa_append_from___b5:
    jsr utoa_append
    // [57] (word) utoa_append::return#0 ← (word) utoa_append::value#2
    jmp __b6
    // utoa::@6
  __b6:
    // [58] (word) utoa::value#0 ← (word) utoa_append::return#0
    // [59] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [51] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4]
  __b4_from___b6:
    // [51] phi (byte*) utoa::buffer#14 = (byte*) utoa::buffer#4 [phi:utoa::@6->utoa::@4#0] -- register_copy 
    // [51] phi (byte) utoa::started#4 = (byte) 1 [phi:utoa::@6->utoa::@4#1] -- vbuxx=vbuc1 
    ldx #1
    // [51] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@6->utoa::@4#2] -- register_copy 
    jmp __b4
}
  // utoa_append
// Used to convert a single digit of an unsigned number value to a string representation
// Counts a single digit up from '0' as long as the value is larger than sub.
// Each time the digit is increased sub is subtracted from value.
// - buffer : pointer to the char that receives the digit
// - value : The value where the digit will be derived from
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
//        (For decimal the subs used are 10000, 1000, 100, 10, 1)
// returns : the value reduced by sub * digit so that it is less than sub.
// utoa_append(byte* zp(7) buffer, word zp(5) value, word zp($11) sub)
utoa_append: {
    .label buffer = 7
    .label value = 5
    .label sub = $11
    .label return = 5
    // [61] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1]
  __b1_from_utoa_append:
    // [61] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [61] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy 
    jmp __b1
    // utoa_append::@1
  __b1:
    // [62] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 
    lda.z sub+1
    cmp.z value+1
    bne !+
    lda.z sub
    cmp.z value
    beq __b2
  !:
    bcc __b2
    jmp __b3
    // utoa_append::@3
  __b3:
    // [63] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    jmp __breturn
    // utoa_append::@return
  __breturn:
    // [64] return 
    rts
    // utoa_append::@2
  __b2:
    // [65] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuxx=_inc_vbuxx 
    inx
    // [66] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z value
    sec
    sbc.z sub
    sta.z value
    lda.z value+1
    sbc.z sub+1
    sta.z value+1
    // [61] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1]
  __b1_from___b2:
    // [61] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy 
    // [61] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy 
    jmp __b1
}
  // sum
sum: {
    .label s = 5
    .label p = 7
    .label return = 5
    // [68] phi from sum to sum::@1 [phi:sum->sum::@1]
  __b1_from_sum:
    // [68] phi (byte*) sum::p#5 = (const byte*) rom [phi:sum->sum::@1#0] -- pbuz1=pbuc1 
    lda #<rom
    sta.z p
    lda #>rom
    sta.z p+1
    // [68] phi (word) sum::s#3 = (byte) 0 [phi:sum->sum::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z s
    lda #>0
    sta.z s+1
    // [68] phi (byte) sum::page#3 = (byte) 0 [phi:sum->sum::@1#2] -- vbuxx=vbuc1 
    ldx #0
    jmp __b1
  /* doing it page-by-page is faster than doing just one huge loop */
    // sum::@1
  __b1:
    // [69] if((byte) sum::page#3<(byte) $20) goto sum::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$20
    bcc __b2_from___b1
    jmp __breturn
    // sum::@return
  __breturn:
    // [70] return 
    rts
    // [71] phi from sum::@1 to sum::@2 [phi:sum::@1->sum::@2]
  __b2_from___b1:
    // [71] phi (word) sum::s#4 = (word) sum::s#3 [phi:sum::@1->sum::@2#0] -- register_copy 
    // [71] phi (byte) sum::i#3 = (byte) 0 [phi:sum::@1->sum::@2#1] -- vbuyy=vbuc1 
    ldy #0
    jmp __b2
    // [71] phi from sum::@2 to sum::@2 [phi:sum::@2->sum::@2]
  __b2_from___b2:
    // [71] phi (word) sum::s#4 = (word) sum::s#2 [phi:sum::@2->sum::@2#0] -- register_copy 
    // [71] phi (byte) sum::i#3 = (byte) sum::i#2 [phi:sum::@2->sum::@2#1] -- register_copy 
    jmp __b2
    // sum::@2
  __b2:
    // [72] (byte) sum::tmp#1 ← *((byte*) sum::p#5 + (byte) sum::i#3) -- vbuaa=pbuz1_derefidx_vbuyy 
    lda (p),y
    // [73] (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1 -- vwuz1=vwuz1_plus_vbuaa 
    clc
    adc.z s
    sta.z s
    bcc !+
    inc.z s+1
  !:
    // [74] (byte) sum::i#2 ← ++ (byte) sum::i#3 -- vbuyy=_inc_vbuyy 
    iny
    // [75] if((byte) 0!=(byte) sum::i#2) goto sum::@2 -- vbuc1_neq_vbuyy_then_la1 
    cpy #0
    bne __b2_from___b2
    jmp __b3
    // sum::@3
  __b3:
    // [76] (byte*) sum::p#2 ← (byte*) sum::p#5 + (word) $100 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z p
    adc #<$100
    sta.z p
    lda.z p+1
    adc #>$100
    sta.z p+1
    // [77] (byte) sum::page#2 ← ++ (byte) sum::page#3 -- vbuxx=_inc_vbuxx 
    inx
    // [68] phi from sum::@3 to sum::@1 [phi:sum::@3->sum::@1]
  __b1_from___b3:
    // [68] phi (byte*) sum::p#5 = (byte*) sum::p#2 [phi:sum::@3->sum::@1#0] -- register_copy 
    // [68] phi (word) sum::s#3 = (word) sum::s#2 [phi:sum::@3->sum::@1#1] -- register_copy 
    // [68] phi (byte) sum::page#3 = (byte) sum::page#2 [phi:sum::@3->sum::@1#2] -- register_copy 
    jmp __b1
}
  // end
end: {
    // [78] (word) Ticks#1 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // [79] call start 
    jsr start
    jmp __b1
    // end::@1
  __b1:
    // [80] (word) last_time ← (word) last_time - (word) Ticks#1 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z last_time
    sec
    sbc.z Ticks
    sta.z last_time
    lda.z last_time+1
    sbc.z Ticks+1
    sta.z last_time+1
    // [81] (word) Ticks#12 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // [82] (word) print_word::w#0 ← (word) Ticks#12
    // [83] call print_word 
    jsr print_word
    // [84] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
  __b2_from___b1:
    jmp __b2
    // end::@2
  __b2:
    // [85] call print_ln 
    // [22] phi from end::@2 to print_ln [phi:end::@2->print_ln]
  print_ln_from___b2:
    // [22] phi (byte*) print_char_cursor#46 = (byte*) print_char_cursor#13 [phi:end::@2->print_ln#0] -- register_copy 
    jsr print_ln
    jmp __breturn
    // end::@return
  __breturn:
    // [86] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp($11) w)
print_word: {
    .label w = $11
    // [87] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda.z w+1
    tax
    // [88] call print_byte 
    // [92] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [92] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#51 [phi:print_word->print_byte#0] -- register_copy 
    // [92] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __b1
    // print_word::@1
  __b1:
    // [89] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda.z w
    tax
    // [90] call print_byte 
    // [92] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from___b1:
    // [92] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#13 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [92] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __breturn
    // print_word::@return
  __breturn:
    // [91] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // [93] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [94] (byte) print_char::ch#0 ← *((const byte*) DIGITS + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    // [95] call print_char 
    // [100] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [100] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#49 [phi:print_byte->print_char#0] -- register_copy 
    // [100] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_byte::@1
  __b1:
    // [96] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [97] (byte) print_char::ch#1 ← *((const byte*) DIGITS + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    // [98] call print_char 
    // [100] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from___b1:
    // [100] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#13 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [100] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_byte::@return
  __breturn:
    // [99] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // [101] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [102] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#35 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [103] return 
    rts
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    // [105] (word) rand_seed ← (word) $194a -- vwuz1=vwuc1 
    lda #<$194a
    sta.z rand_seed
    lda #>$194a
    sta.z rand_seed+1
    jmp __breturn
    // start::@return
  __breturn:
    // [106] return 
    rts
}
  // File Data
  // The digits used for numbers
  DIGITS: .text "0123456789abcdef"
  // Values of decimal digits
  RADIX_DECIMAL_VALUES: .word $2710, $3e8, $64, $a
  // Digits used for storing the decimal word
  decimal_digits: .fill 6, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __bend
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b2
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
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 __b1
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b7
Removing instruction jmp __b4
Removing instruction jmp __b6
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b1
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 __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda #>0
Removing instruction lda #>0
Removing instruction ldy #0
Replacing instruction lda #0 with TXA
Replacing instruction ldy #0 with TAY
Removing instruction lda #>0
Replacing instruction ldx #0 with TAX
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b2_from___b1 with __b2
Replacing label __b2_from___b1 with __b2
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Replacing label __b2_from___b2 with __b2
Removing instruction __bbegin:
Removing instruction __b3_from___b2:
Removing instruction main_from___b3:
Removing instruction __bend_from___b3:
Removing instruction __b3_from___b1:
Removing instruction __b2_from___b1:
Removing instruction sum_from___b2:
Removing instruction __b5_from___b4:
Removing instruction print_ln_from___b5:
Removing instruction __b1_from_print_ln:
Removing instruction __b1_from___b1:
Removing instruction __b1_from_print_word_decimal:
Removing instruction print_str_from___b1:
Removing instruction __b4_from___b7:
Removing instruction utoa_append_from___b5:
Removing instruction __b2_from___b2:
Removing instruction __b2_from___b1:
Removing instruction print_ln_from___b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __bend:
Removing instruction __b1_from_main:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b1_from___b6:
Removing instruction __breturn:
Removing instruction utoa_from_print_word_decimal:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __b1_from_print_str:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __b1_from_utoa:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b7:
Removing instruction __b1_from___b4:
Removing instruction __b6:
Removing instruction __b4_from___b6:
Removing instruction __b1_from_utoa_append:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __b1_from_sum:
Removing instruction __breturn:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction __b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction print_byte_from_print_word:
Removing instruction __b1:
Removing instruction print_byte_from___b1:
Removing instruction __breturn:
Removing instruction print_char_from_print_byte:
Removing instruction __b1:
Removing instruction print_char_from___b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Relabelling long label __b2_from___b1 to b1
Succesful ASM optimization Pass5RelabelLongLabels
Adding RTS to root block 
Succesful ASM optimization Pass5AddMainRts
Removing instruction jmp __b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #<0
Removing instruction lda.z digit_value+1
Succesful ASM optimization Pass5UnnecesaryLoadElimination

FINAL SYMBOL TABLE
(label) @1
(label) @2
(label) @3
(label) @begin
(label) @end
(const byte*) DIGITS[]  = (string) "0123456789abcdef"z
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const word*) RADIX_DECIMAL_VALUES[]  = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
(word) Ticks
(word) Ticks#1 Ticks zp[2]:15 2.0
(word) Ticks#12 Ticks_1 zp[2]:17 4.0
(const byte*) decimal_digits[(number) 6]  = { fill( 6, 0) }
(void()) end()
(label) end::@1
(label) end::@2
(label) end::@return
(word) last_time loadstore zp[2]:11 0.5555555555555556
(signed word()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(word) main::i
(word) main::i#2 i zp[2]:15 11.0
(word) main::i#3 i zp[2]:15 3.666666666666667
(signed word) main::return
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte x 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0 reg byte a 4.0
(byte) print_char::ch#1 reg byte a 4.0
(byte) print_char::ch#2 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp[2]:9 101.0
(byte*) print_char_cursor#13 print_char_cursor zp[2]:9 0.6153846153846154
(byte*) print_char_cursor#2 print_char_cursor zp[2]:9 39.5
(byte*) print_char_cursor#35 print_char_cursor zp[2]:9 4.0
(byte*) print_char_cursor#46 print_char_cursor zp[2]:9 28.5
(byte*) print_char_cursor#49 print_char_cursor zp[2]:9 2.0
(byte*) print_char_cursor#51 print_char_cursor zp[2]:9 0.8823529411764707
(byte*) print_char_cursor#71 print_char_cursor zp[2]:9 22.0
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp[2]:2 54.16666666666666
(byte*) print_line_cursor#20 print_line_cursor zp[2]:2 0.7647058823529412
(byte*) print_line_cursor#9 print_line_cursor zp[2]:2 204.0
(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[2]:5 202.0
(byte*) print_str::str#2 str zp[2]:5 101.0
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0 w zp[2]:17 2.0
(void()) print_word_decimal((word) print_word_decimal::w)
(label) print_word_decimal::@1
(label) print_word_decimal::@return
(word) print_word_decimal::w
(word) print_word_decimal::w#0 w zp[2]:5 13.0
(word) rand_seed loadstore zp[2]:13 40.0
(const byte*) rom = (byte*) 57344
(void()) start()
(label) start::@return
(const word*) start::LAST_TIME = &(word) last_time
(word()) sum()
(label) sum::@1
(label) sum::@2
(label) sum::@3
(label) sum::@return
(byte) sum::i
(byte) sum::i#2 reg byte y 1501.5
(byte) sum::i#3 reg byte y 1001.0
(byte*) sum::p
(byte*) sum::p#2 p zp[2]:7 101.0
(byte*) sum::p#5 p zp[2]:7 171.85714285714283
(byte) sum::page
(byte) sum::page#2 reg byte x 202.0
(byte) sum::page#3 reg byte x 37.875
(word) sum::return
(word) sum::return#2 return zp[2]:5 22.0
(word) sum::s
(word) sum::s#2 s zp[2]:5 420.59999999999997
(word) sum::s#3 s zp[2]:5 53.25
(word) sum::s#4 s zp[2]:5 1051.5
(byte) sum::tmp
(byte) sum::tmp#1 reg byte a 2002.0
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
(byte~) utoa::$11 reg byte a 202.0
(byte~) utoa::$4 reg byte a 4.0
(label) utoa::@1
(label) utoa::@2
(label) utoa::@3
(label) utoa::@4
(label) utoa::@5
(label) utoa::@6
(label) utoa::@7
(label) utoa::@return
(byte*) utoa::buffer
(byte*) utoa::buffer#11 buffer zp[2]:7 29.142857142857146
(byte*) utoa::buffer#14 buffer zp[2]:7 151.5
(byte*) utoa::buffer#3 buffer zp[2]:7 4.0
(byte*) utoa::buffer#4 buffer zp[2]:7 202.0
(byte) utoa::digit
(byte) utoa::digit#1 digit zp[1]:4 202.0
(byte) utoa::digit#2 digit zp[1]:4 28.857142857142858
(word) utoa::digit_value
(word) utoa::digit_value#0 digit_value zp[2]:17 60.599999999999994
(word*) utoa::digit_values
(byte) utoa::max_digits
(const byte) utoa::max_digits#1 max_digits = (byte) 5
(byte) utoa::radix
(byte) utoa::started
(byte) utoa::started#2 reg byte x 50.5
(byte) utoa::started#4 reg byte x 101.0
(word) utoa::value
(word) utoa::value#0 value zp[2]:5 101.0
(word) utoa::value#1 value zp[2]:5 2.0
(word) utoa::value#2 value zp[2]:5 58.00000000000001
(word) utoa::value#6 value zp[2]:5 151.5
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
(label) utoa_append::@1
(label) utoa_append::@2
(label) utoa_append::@3
(label) utoa_append::@return
(byte*) utoa_append::buffer
(byte*) utoa_append::buffer#0 buffer zp[2]:7 12.875
(byte) utoa_append::digit
(byte) utoa_append::digit#1 reg byte x 1001.0
(byte) utoa_append::digit#2 reg byte x 1002.0
(word) utoa_append::return
(word) utoa_append::return#0 return zp[2]:5 202.0
(word) utoa_append::sub
(word) utoa_append::sub#0 sub zp[2]:17 350.5
(word) utoa_append::value
(word) utoa_append::value#0 value zp[2]:5 34.33333333333333
(word) utoa_append::value#1 value zp[2]:5 2002.0
(word) utoa_append::value#2 value zp[2]:5 517.6666666666667

zp[2]:2 [ print_line_cursor#9 print_line_cursor#20 print_line_cursor#1 ]
zp[1]:4 [ utoa::digit#2 utoa::digit#1 ]
zp[2]:5 [ utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_word_decimal::w#0 utoa_append::return#0 sum::s#4 sum::s#3 sum::s#2 sum::return#2 print_str::str#2 print_str::str#0 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
reg byte x [ sum::page#3 sum::page#2 ]
zp[2]:7 [ sum::p#5 sum::p#2 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 ]
reg byte y [ sum::i#3 sum::i#2 ]
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp[2]:9 [ print_char_cursor#35 print_char_cursor#49 print_char_cursor#46 print_char_cursor#13 print_char_cursor#2 print_char_cursor#51 print_char_cursor#71 print_char_cursor#1 ]
zp[2]:11 [ last_time ]
zp[2]:13 [ rand_seed ]
reg byte a [ utoa::$4 ]
reg byte a [ utoa::$11 ]
reg byte a [ sum::tmp#1 ]
zp[2]:15 [ Ticks#1 main::i#3 main::i#2 ]
zp[2]:17 [ Ticks#12 print_word::w#0 utoa::digit_value#0 utoa_append::sub#0 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]


FINAL ASSEMBLER
Score: 101245

  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__b1)
.pc = $80d "Program"
  // Global Constants & labels
  .label rom = $e000
  .label last_time = $b
  .label rand_seed = $d
  .label print_char_cursor = 9
  .label print_line_cursor = 2
  .label Ticks = $f
  .label Ticks_1 = $11
  // @begin
  // @1
__b1:
  // last_time
  // [1] (word) last_time ← (word) 0 -- vwuz1=vwuc1 
  lda #<0
  sta.z last_time
  sta.z last_time+1
  // @2
  // rand_seed
  // [2] (word) rand_seed ← (word) 0 -- vwuz1=vwuc1 
  sta.z rand_seed
  sta.z rand_seed+1
  // [3] phi from @2 to @3 [phi:@2->@3]
  // @3
  // [4] call main 
  // [6] phi from @3 to main [phi:@3->main]
  jsr main
  rts
  // [5] phi from @3 to @end [phi:@3->@end]
  // @end
  // main
main: {
    .label i = $f
    // start()
    // [7] call start 
    jsr start
    // [8] phi from main to main::@1 [phi:main->main::@1]
    // [8] phi (byte*) print_line_cursor#20 = (byte*) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [8] phi (byte*) print_char_cursor#51 = (byte*) 1024 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [8] phi (word) main::i#3 = (byte) 0 [phi:main->main::@1#2] -- vwuz1=vbuc1 
    lda #<0
    sta.z i
    sta.z i+1
    // main::@1
  __b1:
    // for(i=0;i<6;i++)
    // [9] if((word) main::i#3<(byte) 6) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    cmp #>6
    bcc __b2
    bne !+
    lda.z i
    cmp #<6
    bcc __b2
  !:
    // [10] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
    // main::@3
    // end()
    // [11] call end 
    jsr end
    // main::@return
    // }
    // [12] return 
    rts
    // [13] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
  __b2:
    // sum()
    // [14] call sum 
    // [67] phi from main::@2 to sum [phi:main::@2->sum]
    jsr sum
    // sum()
    // [15] (word) sum::return#2 ← (word) sum::s#3
    // main::@4
    // print_word_decimal(sum())
    // [16] (word) print_word_decimal::w#0 ← (word) sum::return#2
    // [17] call print_word_decimal 
    jsr print_word_decimal
    // [18] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // print_ln()
    // [19] call print_ln 
    // [22] phi from main::@5 to print_ln [phi:main::@5->print_ln]
    // [22] phi (byte*) print_char_cursor#46 = (byte*) print_char_cursor#2 [phi:main::@5->print_ln#0] -- register_copy 
    jsr print_ln
    // main::@6
    // for(i=0;i<6;i++)
    // [20] (word) main::i#2 ← ++ (word) main::i#3 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [21] (byte*) print_char_cursor#71 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [8] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [8] phi (byte*) print_line_cursor#20 = (byte*) print_line_cursor#1 [phi:main::@6->main::@1#0] -- register_copy 
    // [8] phi (byte*) print_char_cursor#51 = (byte*) print_char_cursor#71 [phi:main::@6->main::@1#1] -- register_copy 
    // [8] phi (word) main::i#3 = (word) main::i#2 [phi:main::@6->main::@1#2] -- register_copy 
    jmp __b1
}
  // 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#9 = (byte*) print_line_cursor#20 [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#1 ← (byte*) print_line_cursor#9 + (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#1<(byte*) print_char_cursor#46) 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_word_decimal
// Print a word as DECIMAL
// print_word_decimal(word zp(5) w)
print_word_decimal: {
    .label w = 5
    // utoa(w, decimal_digits, DECIMAL)
    // [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0
    // [28] call utoa 
    // [39] phi from print_word_decimal to utoa [phi:print_word_decimal->utoa]
    jsr utoa
    // [29] phi from print_word_decimal to print_word_decimal::@1 [phi:print_word_decimal->print_word_decimal::@1]
    // print_word_decimal::@1
    // print_str(decimal_digits)
    // [30] call print_str 
    // [32] phi from print_word_decimal::@1 to print_str [phi:print_word_decimal::@1->print_str]
    jsr print_str
    // print_word_decimal::@return
    // }
    // [31] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zp(5) str)
print_str: {
    .label str = 5
    // [33] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
    // [33] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#51 [phi:print_str->print_str::@1#0] -- register_copy 
    // [33] phi (byte*) print_str::str#2 = (const byte*) decimal_digits [phi:print_str->print_str::@1#1] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z str
    lda #>decimal_digits
    sta.z str+1
    // print_str::@1
  __b1:
    // while(*str)
    // [34] 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
    // }
    // [35] return 
    rts
    // print_str::@2
  __b2:
    // *(print_char_cursor++) = *(str++)
    // [36] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#2) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    sta (print_char_cursor),y
    // *(print_char_cursor++) = *(str++);
    // [37] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [38] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [33] phi from print_str::@2 to print_str::@1 [phi:print_str::@2->print_str::@1]
    // [33] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#1 [phi:print_str::@2->print_str::@1#0] -- register_copy 
    // [33] phi (byte*) print_str::str#2 = (byte*) print_str::str#0 [phi:print_str::@2->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // utoa
// Converts unsigned number value to a string representing it in RADIX format.
// If the leading digits are zero they are not included in the string.
// - value : The number to be converted to RADIX
// - buffer : receives the string representing the number and zero-termination.
// - radix : The radix to convert the number to (from the enum RADIX)
// utoa(word zp(5) value, byte* zp(7) buffer)
utoa: {
    .const max_digits = 5
    .label digit_value = $11
    .label buffer = 7
    .label digit = 4
    .label value = 5
    // [40] phi from utoa to utoa::@1 [phi:utoa->utoa::@1]
    // [40] phi (byte*) utoa::buffer#11 = (const byte*) decimal_digits [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z buffer
    lda #>decimal_digits
    sta.z buffer+1
    // [40] phi (byte) utoa::started#2 = (byte) 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [40] phi (word) utoa::value#2 = (word) utoa::value#1 [phi:utoa->utoa::@1#2] -- register_copy 
    // [40] phi (byte) utoa::digit#2 = (byte) 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 
    txa
    sta.z digit
    // utoa::@1
  __b1:
    // for( char digit=0; digit<max_digits-1; digit++ )
    // [41] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    // utoa::@3
    // (char)value
    // [42] (byte~) utoa::$4 ← (byte)(word) utoa::value#2 -- vbuaa=_byte_vwuz1 
    lda.z value
    // *buffer++ = DIGITS[(char)value]
    // [43] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$4) -- _deref_pbuz1=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    ldy #0
    sta (buffer),y
    // *buffer++ = DIGITS[(char)value];
    // [44] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // *buffer = 0
    // [45] *((byte*) utoa::buffer#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (buffer),y
    // utoa::@return
    // }
    // [46] return 
    rts
    // utoa::@2
  __b2:
    // digit_value = digit_values[digit]
    // [47] (byte~) utoa::$11 ← (byte) utoa::digit#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 
    lda.z digit
    asl
    // [48] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$11) -- vwuz1=pwuc1_derefidx_vbuaa 
    tay
    lda RADIX_DECIMAL_VALUES,y
    sta.z digit_value
    lda RADIX_DECIMAL_VALUES+1,y
    sta.z digit_value+1
    // if (started || value >= digit_value)
    // [49] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5 -- vbuc1_neq_vbuxx_then_la1 
    cpx #0
    bne __b5
    // utoa::@7
    // [50] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5 -- vwuz1_ge_vwuz2_then_la1 
    cmp.z value+1
    bne !+
    lda.z digit_value
    cmp.z value
    beq __b5
  !:
    bcc __b5
    // [51] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4]
    // [51] phi (byte*) utoa::buffer#14 = (byte*) utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy 
    // [51] phi (byte) utoa::started#4 = (byte) utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy 
    // [51] phi (word) utoa::value#6 = (word) utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy 
    // utoa::@4
  __b4:
    // for( char digit=0; digit<max_digits-1; digit++ )
    // [52] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [40] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1]
    // [40] phi (byte*) utoa::buffer#11 = (byte*) utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy 
    // [40] phi (byte) utoa::started#2 = (byte) utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy 
    // [40] phi (word) utoa::value#2 = (word) utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy 
    // [40] phi (byte) utoa::digit#2 = (byte) utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy 
    jmp __b1
    // utoa::@5
  __b5:
    // utoa_append(buffer++, value, digit_value)
    // [53] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
    // [54] (word) utoa_append::value#0 ← (word) utoa::value#2
    // [55] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
    // [56] call utoa_append 
    // [60] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append]
    jsr utoa_append
    // utoa_append(buffer++, value, digit_value)
    // [57] (word) utoa_append::return#0 ← (word) utoa_append::value#2
    // utoa::@6
    // value = utoa_append(buffer++, value, digit_value)
    // [58] (word) utoa::value#0 ← (word) utoa_append::return#0
    // value = utoa_append(buffer++, value, digit_value);
    // [59] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [51] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4]
    // [51] phi (byte*) utoa::buffer#14 = (byte*) utoa::buffer#4 [phi:utoa::@6->utoa::@4#0] -- register_copy 
    // [51] phi (byte) utoa::started#4 = (byte) 1 [phi:utoa::@6->utoa::@4#1] -- vbuxx=vbuc1 
    ldx #1
    // [51] phi (word) utoa::value#6 = (word) utoa::value#0 [phi:utoa::@6->utoa::@4#2] -- register_copy 
    jmp __b4
}
  // utoa_append
// Used to convert a single digit of an unsigned number value to a string representation
// Counts a single digit up from '0' as long as the value is larger than sub.
// Each time the digit is increased sub is subtracted from value.
// - buffer : pointer to the char that receives the digit
// - value : The value where the digit will be derived from
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
//        (For decimal the subs used are 10000, 1000, 100, 10, 1)
// returns : the value reduced by sub * digit so that it is less than sub.
// utoa_append(byte* zp(7) buffer, word zp(5) value, word zp($11) sub)
utoa_append: {
    .label buffer = 7
    .label value = 5
    .label sub = $11
    .label return = 5
    // [61] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1]
    // [61] phi (byte) utoa_append::digit#2 = (byte) 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [61] phi (word) utoa_append::value#2 = (word) utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy 
    // utoa_append::@1
  __b1:
    // while (value >= sub)
    // [62] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -- vwuz1_ge_vwuz2_then_la1 
    lda.z sub+1
    cmp.z value+1
    bne !+
    lda.z sub
    cmp.z value
    beq __b2
  !:
    bcc __b2
    // utoa_append::@3
    // *buffer = DIGITS[digit]
    // [63] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    // utoa_append::@return
    // }
    // [64] return 
    rts
    // utoa_append::@2
  __b2:
    // digit++;
    // [65] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2 -- vbuxx=_inc_vbuxx 
    inx
    // value -= sub
    // [66] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z value
    sec
    sbc.z sub
    sta.z value
    lda.z value+1
    sbc.z sub+1
    sta.z value+1
    // [61] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1]
    // [61] phi (byte) utoa_append::digit#2 = (byte) utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy 
    // [61] phi (word) utoa_append::value#2 = (word) utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy 
    jmp __b1
}
  // sum
sum: {
    .label s = 5
    .label p = 7
    .label return = 5
    // [68] phi from sum to sum::@1 [phi:sum->sum::@1]
    // [68] phi (byte*) sum::p#5 = (const byte*) rom [phi:sum->sum::@1#0] -- pbuz1=pbuc1 
    lda #<rom
    sta.z p
    lda #>rom
    sta.z p+1
    // [68] phi (word) sum::s#3 = (byte) 0 [phi:sum->sum::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z s
    sta.z s+1
    // [68] phi (byte) sum::page#3 = (byte) 0 [phi:sum->sum::@1#2] -- vbuxx=vbuc1 
    tax
  /* doing it page-by-page is faster than doing just one huge loop */
    // sum::@1
  __b1:
    // for (page = 0; page < 0x20; page++)
    // [69] if((byte) sum::page#3<(byte) $20) goto sum::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$20
    bcc b1
    // sum::@return
    // }
    // [70] return 
    rts
    // [71] phi from sum::@1 to sum::@2 [phi:sum::@1->sum::@2]
  b1:
    // [71] phi (word) sum::s#4 = (word) sum::s#3 [phi:sum::@1->sum::@2#0] -- register_copy 
    // [71] phi (byte) sum::i#3 = (byte) 0 [phi:sum::@1->sum::@2#1] -- vbuyy=vbuc1 
    ldy #0
    // [71] phi from sum::@2 to sum::@2 [phi:sum::@2->sum::@2]
    // [71] phi (word) sum::s#4 = (word) sum::s#2 [phi:sum::@2->sum::@2#0] -- register_copy 
    // [71] phi (byte) sum::i#3 = (byte) sum::i#2 [phi:sum::@2->sum::@2#1] -- register_copy 
    // sum::@2
  __b2:
    // tmp = p[i]
    // [72] (byte) sum::tmp#1 ← *((byte*) sum::p#5 + (byte) sum::i#3) -- vbuaa=pbuz1_derefidx_vbuyy 
    lda (p),y
    // s += tmp
    // [73] (word) sum::s#2 ← (word) sum::s#4 + (byte) sum::tmp#1 -- vwuz1=vwuz1_plus_vbuaa 
    clc
    adc.z s
    sta.z s
    bcc !+
    inc.z s+1
  !:
    // i++;
    // [74] (byte) sum::i#2 ← ++ (byte) sum::i#3 -- vbuyy=_inc_vbuyy 
    iny
    // while (i)
    // [75] if((byte) 0!=(byte) sum::i#2) goto sum::@2 -- vbuc1_neq_vbuyy_then_la1 
    cpy #0
    bne __b2
    // sum::@3
    // p += 0x100
    // [76] (byte*) sum::p#2 ← (byte*) sum::p#5 + (word) $100 -- pbuz1=pbuz1_plus_vwuc1 
    clc
    lda.z p
    adc #<$100
    sta.z p
    lda.z p+1
    adc #>$100
    sta.z p+1
    // for (page = 0; page < 0x20; page++)
    // [77] (byte) sum::page#2 ← ++ (byte) sum::page#3 -- vbuxx=_inc_vbuxx 
    inx
    // [68] phi from sum::@3 to sum::@1 [phi:sum::@3->sum::@1]
    // [68] phi (byte*) sum::p#5 = (byte*) sum::p#2 [phi:sum::@3->sum::@1#0] -- register_copy 
    // [68] phi (word) sum::s#3 = (word) sum::s#2 [phi:sum::@3->sum::@1#1] -- register_copy 
    // [68] phi (byte) sum::page#3 = (byte) sum::page#2 [phi:sum::@3->sum::@1#2] -- register_copy 
    jmp __b1
}
  // end
end: {
    // Ticks = last_time
    // [78] (word) Ticks#1 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // start()
    // [79] call start 
    jsr start
    // end::@1
    // last_time -= Ticks
    // [80] (word) last_time ← (word) last_time - (word) Ticks#1 -- vwuz1=vwuz1_minus_vwuz2 
    lda.z last_time
    sec
    sbc.z Ticks
    sta.z last_time
    lda.z last_time+1
    sbc.z Ticks+1
    sta.z last_time+1
    // Ticks = last_time
    // [81] (word) Ticks#12 ← (word) last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // print_word(Ticks)
    // [82] (word) print_word::w#0 ← (word) Ticks#12
    // [83] call print_word 
    jsr print_word
    // [84] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
    // end::@2
    // print_ln()
    // [85] call print_ln 
    // [22] phi from end::@2 to print_ln [phi:end::@2->print_ln]
    // [22] phi (byte*) print_char_cursor#46 = (byte*) print_char_cursor#13 [phi:end::@2->print_ln#0] -- register_copy 
    jsr print_ln
    // end::@return
    // }
    // [86] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp($11) w)
print_word: {
    .label w = $11
    // print_byte(>w)
    // [87] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda.z w+1
    tax
    // [88] call print_byte 
    // [92] phi from print_word to print_byte [phi:print_word->print_byte]
    // [92] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#51 [phi:print_word->print_byte#0] -- register_copy 
    // [92] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@1
    // print_byte(<w)
    // [89] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda.z w
    tax
    // [90] call print_byte 
    // [92] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
    // [92] phi (byte*) print_char_cursor#49 = (byte*) print_char_cursor#13 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [92] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@return
    // }
    // [91] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // b>>4
    // [93] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [94] (byte) print_char::ch#0 ← *((const byte*) DIGITS + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    // [95] call print_char 
    // [100] phi from print_byte to print_char [phi:print_byte->print_char]
    // [100] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#49 [phi:print_byte->print_char#0] -- register_copy 
    // [100] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@1
    // b&$f
    // [96] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [97] (byte) print_char::ch#1 ← *((const byte*) DIGITS + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    // [98] call print_char 
    // [100] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
    // [100] phi (byte*) print_char_cursor#35 = (byte*) print_char_cursor#13 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [100] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@return
    // }
    // [99] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [101] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [102] (byte*) print_char_cursor#13 ← ++ (byte*) print_char_cursor#35 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [103] return 
    rts
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    // rand_seed = 6474
    // [105] (word) rand_seed ← (word) $194a -- vwuz1=vwuc1 
    lda #<$194a
    sta.z rand_seed
    lda #>$194a
    sta.z rand_seed+1
    // start::@return
    // }
    // [106] return 
    rts
}
  // File Data
  // The digits used for numbers
  DIGITS: .text "0123456789abcdef"
  // Values of decimal digits
  RADIX_DECIMAL_VALUES: .word $2710, $3e8, $64, $a
  // Digits used for storing the decimal word
  decimal_digits: .fill 6, 0

