Setting inferred volatile on symbol affected by address-of last_time
Inlined call vicSelectGfxBank::$0 = call toDd00(vicSelectGfxBank::gfx)
Inlined call call __init

CONTROL FLOW GRAPH SSA

void print_str(char *str)
print_str: scope:[print_str]  from print_uint_decimal::@1
  print_char_cursor#57 = phi( print_uint_decimal::@1/print_char_cursor#51 )
  print_str::str#5 = phi( print_uint_decimal::@1/print_str::str#1 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@3
  print_char_cursor#48 = phi( print_str/print_char_cursor#57, print_str::@3/print_char_cursor#0 )
  print_str::str#2 = phi( print_str/print_str::str#5, print_str::@3/print_str::str#0 )
  print_str::$1 = 0 != *print_str::str#2
  if(print_str::$1) goto print_str::@2
  to:print_str::@return
print_str::@2: scope:[print_str]  from print_str::@1
  print_char_cursor#47 = phi( print_str::@1/print_char_cursor#48 )
  print_str::str#3 = phi( print_str::@1/print_str::str#2 )
  print_char::ch#0 = *print_str::str#3
  call print_char
  to:print_str::@3
print_str::@3: scope:[print_str]  from print_str::@2
  print_str::str#4 = phi( print_str::@2/print_str::str#3 )
  print_char_cursor#24 = phi( print_str::@2/print_char_cursor#13 )
  print_char_cursor#0 = print_char_cursor#24
  print_str::str#0 = ++ print_str::str#4
  to:print_str::@1
print_str::@return: scope:[print_str]  from print_str::@1
  print_char_cursor#25 = phi( print_str::@1/print_char_cursor#48 )
  print_char_cursor#1 = print_char_cursor#25
  return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from end::@2 main::@6
  print_char_cursor#49 = phi( end::@2/print_char_cursor#14, main::@6/print_char_cursor#17 )
  print_line_cursor#20 = phi( end::@2/print_line_cursor#21, main::@6/print_line_cursor#22 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  print_char_cursor#26 = phi( print_ln/print_char_cursor#49, print_ln::@1/print_char_cursor#26 )
  print_line_cursor#10 = phi( print_ln/print_line_cursor#20, print_ln::@1/print_line_cursor#0 )
  print_ln::$0 = print_line_cursor#10 + $28
  print_line_cursor#0 = print_ln::$0
  print_ln::$1 = print_line_cursor#0 < print_char_cursor#26
  if(print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  print_line_cursor#11 = phi( print_ln::@1/print_line_cursor#0 )
  print_char_cursor#2 = print_line_cursor#11
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  print_char_cursor#27 = phi( print_ln::@2/print_char_cursor#2 )
  print_line_cursor#12 = phi( print_ln::@2/print_line_cursor#11 )
  print_line_cursor#1 = print_line_cursor#12
  print_char_cursor#3 = print_char_cursor#27
  return 
  to:@return

void print_uint(unsigned int w)
print_uint: scope:[print_uint]  from end::@1
  print_char_cursor#50 = phi( end::@1/print_char_cursor#53 )
  print_uint::w#1 = phi( end::@1/print_uint::w#0 )
  print_uint::$0 = byte1  print_uint::w#1
  print_uchar::b#0 = print_uint::$0
  call print_uchar
  to:print_uint::@1
print_uint::@1: scope:[print_uint]  from print_uint
  print_uint::w#2 = phi( print_uint/print_uint::w#1 )
  print_char_cursor#28 = phi( print_uint/print_char_cursor#11 )
  print_char_cursor#4 = print_char_cursor#28
  print_uint::$2 = byte0  print_uint::w#2
  print_uchar::b#1 = print_uint::$2
  call print_uchar
  to:print_uint::@2
print_uint::@2: scope:[print_uint]  from print_uint::@1
  print_char_cursor#29 = phi( print_uint::@1/print_char_cursor#11 )
  print_char_cursor#5 = print_char_cursor#29
  to:print_uint::@return
print_uint::@return: scope:[print_uint]  from print_uint::@2
  print_char_cursor#30 = phi( print_uint::@2/print_char_cursor#5 )
  print_char_cursor#6 = print_char_cursor#30
  return 
  to:@return

void print_uint_decimal(unsigned int w)
print_uint_decimal: scope:[print_uint_decimal]  from main::@5
  print_char_cursor#58 = phi( main::@5/print_char_cursor#54 )
  print_uint_decimal::w#1 = phi( main::@5/print_uint_decimal::w#0 )
  utoa::value#0 = print_uint_decimal::w#1
  utoa::buffer#0 = decimal_digits
  utoa::radix#0 = DECIMAL
  call utoa
  to:print_uint_decimal::@1
print_uint_decimal::@1: scope:[print_uint_decimal]  from print_uint_decimal
  print_char_cursor#51 = phi( print_uint_decimal/print_char_cursor#58 )
  print_str::str#1 = decimal_digits
  call print_str
  to:print_uint_decimal::@2
print_uint_decimal::@2: scope:[print_uint_decimal]  from print_uint_decimal::@1
  print_char_cursor#31 = phi( print_uint_decimal::@1/print_char_cursor#1 )
  print_char_cursor#7 = print_char_cursor#31
  to:print_uint_decimal::@return
print_uint_decimal::@return: scope:[print_uint_decimal]  from print_uint_decimal::@2
  print_char_cursor#32 = phi( print_uint_decimal::@2/print_char_cursor#7 )
  print_char_cursor#8 = print_char_cursor#32
  return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from print_uint print_uint::@1
  print_char_cursor#52 = phi( print_uint/print_char_cursor#50, print_uint::@1/print_char_cursor#4 )
  print_uchar::b#2 = phi( print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
  print_uchar::$0 = print_uchar::b#2 >> 4
  print_char::ch#1 = print_hextab[print_uchar::$0]
  call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  print_uchar::b#3 = phi( print_uchar/print_uchar::b#2 )
  print_char_cursor#33 = phi( print_uchar/print_char_cursor#13 )
  print_char_cursor#9 = print_char_cursor#33
  print_uchar::$2 = print_uchar::b#3 & $f
  print_char::ch#2 = print_hextab[print_uchar::$2]
  call print_char
  to:print_uchar::@2
print_uchar::@2: scope:[print_uchar]  from print_uchar::@1
  print_char_cursor#34 = phi( print_uchar::@1/print_char_cursor#13 )
  print_char_cursor#10 = print_char_cursor#34
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@2
  print_char_cursor#35 = phi( print_uchar::@2/print_char_cursor#10 )
  print_char_cursor#11 = print_char_cursor#35
  return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_str::@2 print_uchar print_uchar::@1
  print_char_cursor#36 = phi( print_str::@2/print_char_cursor#47, print_uchar/print_char_cursor#52, print_uchar::@1/print_char_cursor#9 )
  print_char::ch#3 = phi( print_str::@2/print_char::ch#0, print_uchar/print_char::ch#1, print_uchar::@1/print_char::ch#2 )
  *print_char_cursor#36 = print_char::ch#3
  print_char_cursor#12 = ++ print_char_cursor#36
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  print_char_cursor#37 = phi( print_char/print_char_cursor#12 )
  print_char_cursor#13 = print_char_cursor#37
  return 
  to:@return

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

unsigned int utoa_append(char *buffer , unsigned int value , unsigned int sub)
utoa_append: scope:[utoa_append]  from utoa::@14
  utoa_append::buffer#3 = phi( utoa::@14/utoa_append::buffer#0 )
  utoa_append::sub#3 = phi( utoa::@14/utoa_append::sub#0 )
  utoa_append::value#5 = phi( utoa::@14/utoa_append::value#0 )
  utoa_append::digit#0 = 0
  to:utoa_append::@1
utoa_append::@1: scope:[utoa_append]  from utoa_append utoa_append::@2
  utoa_append::buffer#2 = phi( utoa_append/utoa_append::buffer#3, utoa_append::@2/utoa_append::buffer#4 )
  utoa_append::digit#4 = phi( utoa_append/utoa_append::digit#0, utoa_append::@2/utoa_append::digit#1 )
  utoa_append::sub#1 = phi( utoa_append/utoa_append::sub#3, utoa_append::@2/utoa_append::sub#2 )
  utoa_append::value#2 = phi( utoa_append/utoa_append::value#5, utoa_append::@2/utoa_append::value#1 )
  utoa_append::$0 = utoa_append::value#2 >= utoa_append::sub#1
  if(utoa_append::$0) goto utoa_append::@2
  to:utoa_append::@3
utoa_append::@2: scope:[utoa_append]  from utoa_append::@1
  utoa_append::buffer#4 = phi( utoa_append::@1/utoa_append::buffer#2 )
  utoa_append::sub#2 = phi( utoa_append::@1/utoa_append::sub#1 )
  utoa_append::value#3 = phi( utoa_append::@1/utoa_append::value#2 )
  utoa_append::digit#2 = phi( utoa_append::@1/utoa_append::digit#4 )
  utoa_append::digit#1 = ++ utoa_append::digit#2
  utoa_append::value#1 = utoa_append::value#3 - utoa_append::sub#2
  to:utoa_append::@1
utoa_append::@3: scope:[utoa_append]  from utoa_append::@1
  utoa_append::value#4 = phi( utoa_append::@1/utoa_append::value#2 )
  utoa_append::buffer#1 = phi( utoa_append::@1/utoa_append::buffer#2 )
  utoa_append::digit#3 = phi( utoa_append::@1/utoa_append::digit#4 )
  *utoa_append::buffer#1 = DIGITS[utoa_append::digit#3]
  utoa_append::return#1 = utoa_append::value#4
  to:utoa_append::@return
utoa_append::@return: scope:[utoa_append]  from utoa_append::@3
  utoa_append::return#4 = phi( utoa_append::@3/utoa_append::return#1 )
  utoa_append::return#2 = utoa_append::return#4
  return 
  to:@return

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

void end()
end: scope:[end]  from main::@3
  print_line_cursor#28 = phi( main::@3/print_line_cursor#23 )
  print_char_cursor#59 = phi( main::@3/print_char_cursor#55 )
  Ticks#0 = last_time
  call start
  to:end::@1
end::@1: scope:[end]  from end
  print_line_cursor#25 = phi( end/print_line_cursor#28 )
  print_char_cursor#53 = phi( end/print_char_cursor#59 )
  Ticks#8 = phi( end/Ticks#0 )
  last_time = last_time - Ticks#8
  Ticks#1 = last_time
  print_uint::w#0 = Ticks#1
  call print_uint
  to:end::@2
end::@2: scope:[end]  from end::@1
  Ticks#17 = phi( end::@1/Ticks#1 )
  print_line_cursor#21 = phi( end::@1/print_line_cursor#25 )
  print_char_cursor#38 = phi( end::@1/print_char_cursor#6 )
  print_char_cursor#14 = print_char_cursor#38
  call print_ln
  to:end::@3
end::@3: scope:[end]  from end::@2
  Ticks#14 = phi( end::@2/Ticks#17 )
  print_char_cursor#39 = phi( end::@2/print_char_cursor#3 )
  print_line_cursor#13 = phi( end::@2/print_line_cursor#1 )
  print_line_cursor#2 = print_line_cursor#13
  print_char_cursor#15 = print_char_cursor#39
  to:end::@return
end::@return: scope:[end]  from end::@3
  print_line_cursor#14 = phi( end::@3/print_line_cursor#2 )
  print_char_cursor#40 = phi( end::@3/print_char_cursor#15 )
  Ticks#9 = phi( end::@3/Ticks#14 )
  Ticks#2 = Ticks#9
  print_char_cursor#16 = print_char_cursor#40
  print_line_cursor#3 = print_line_cursor#14
  return 
  to:@return

unsigned int sum()
sum: scope:[sum]  from main::@2
  sum::s#0 = 0
  sum::p#0 = (char *) 0
  sum::page#0 = 0
  sum::i#0 = 0
  sum::tmp#0 = 0
  sum::p#1 = rom
  sum::s#1 = 0
  sum::page#1 = 0
  to:sum::@1
sum::@1: scope:[sum]  from sum sum::@5
  sum::p#6 = phi( sum/sum::p#1, sum::@5/sum::p#2 )
  sum::s#5 = phi( sum/sum::s#1, sum::@5/sum::s#7 )
  sum::page#3 = phi( sum/sum::page#1, sum::@5/sum::page#2 )
  sum::$0 = sum::page#3 < $20
  if(sum::$0) goto sum::@2
  to:sum::@3
sum::@2: scope:[sum]  from sum::@1
  sum::page#6 = phi( sum::@1/sum::page#3 )
  sum::s#6 = phi( sum::@1/sum::s#5 )
  sum::p#5 = phi( sum::@1/sum::p#6 )
  sum::i#1 = 0
  to:sum::@4
sum::@3: scope:[sum]  from sum::@1
  sum::s#3 = phi( sum::@1/sum::s#5 )
  sum::return#0 = sum::s#3
  to:sum::@return
sum::@4: scope:[sum]  from sum::@2 sum::@4
  sum::page#5 = phi( sum::@2/sum::page#6, sum::@4/sum::page#5 )
  sum::s#4 = phi( sum::@2/sum::s#6, sum::@4/sum::s#2 )
  sum::i#3 = phi( sum::@2/sum::i#1, sum::@4/sum::i#2 )
  sum::p#3 = phi( sum::@2/sum::p#5, sum::@4/sum::p#3 )
  sum::tmp#1 = sum::p#3[sum::i#3]
  sum::s#2 = sum::s#4 + sum::tmp#1
  sum::i#2 = ++ sum::i#3
  sum::$1 = 0 != sum::i#2
  if(sum::$1) goto sum::@4
  to:sum::@5
sum::@5: scope:[sum]  from sum::@4
  sum::s#7 = phi( sum::@4/sum::s#2 )
  sum::page#4 = phi( sum::@4/sum::page#5 )
  sum::p#4 = phi( sum::@4/sum::p#3 )
  sum::p#2 = sum::p#4 + $100
  sum::page#2 = ++ sum::page#4
  to:sum::@1
sum::@return: scope:[sum]  from sum::@3
  sum::return#3 = phi( sum::@3/sum::return#0 )
  sum::return#1 = sum::return#3
  return 
  to:@return

int main()
main: scope:[main]  from __start::@1
  print_line_cursor#31 = phi( __start::@1/print_line_cursor#24 )
  print_char_cursor#63 = phi( __start::@1/print_char_cursor#56 )
  Ticks#21 = phi( __start::@1/Ticks#16 )
  main::i#0 = 0
  call start
  to:main::@4
main::@4: scope:[main]  from main
  print_line_cursor#29 = phi( main/print_line_cursor#31 )
  print_char_cursor#62 = phi( main/print_char_cursor#63 )
  Ticks#19 = phi( main/Ticks#21 )
  main::i#1 = 0
  to:main::@1
main::@1: scope:[main]  from main::@4 main::@7
  print_line_cursor#27 = phi( main::@4/print_line_cursor#29, main::@7/print_line_cursor#4 )
  print_char_cursor#61 = phi( main::@4/print_char_cursor#62, main::@7/print_char_cursor#18 )
  Ticks#18 = phi( main::@4/Ticks#19, main::@7/Ticks#20 )
  main::i#3 = phi( main::@4/main::i#1, main::@7/main::i#2 )
  main::$2 = main::i#3 < 6
  if(main::$2) goto main::@2
  to:main::@3
main::@2: scope:[main]  from main::@1
  Ticks#24 = phi( main::@1/Ticks#18 )
  main::i#7 = phi( main::@1/main::i#3 )
  print_line_cursor#30 = phi( main::@1/print_line_cursor#27 )
  print_char_cursor#60 = phi( main::@1/print_char_cursor#61 )
  call sum
  sum::return#2 = sum::return#1
  to:main::@5
main::@5: scope:[main]  from main::@2
  Ticks#23 = phi( main::@2/Ticks#24 )
  main::i#6 = phi( main::@2/main::i#7 )
  print_line_cursor#26 = phi( main::@2/print_line_cursor#30 )
  print_char_cursor#54 = phi( main::@2/print_char_cursor#60 )
  sum::return#4 = phi( main::@2/sum::return#2 )
  main::$3 = sum::return#4
  print_uint_decimal::w#0 = main::$3
  call print_uint_decimal
  to:main::@6
main::@6: scope:[main]  from main::@5
  Ticks#22 = phi( main::@5/Ticks#23 )
  main::i#5 = phi( main::@5/main::i#6 )
  print_line_cursor#22 = phi( main::@5/print_line_cursor#26 )
  print_char_cursor#41 = phi( main::@5/print_char_cursor#8 )
  print_char_cursor#17 = print_char_cursor#41
  call print_ln
  to:main::@7
main::@7: scope:[main]  from main::@6
  Ticks#20 = phi( main::@6/Ticks#22 )
  main::i#4 = phi( main::@6/main::i#5 )
  print_char_cursor#42 = phi( main::@6/print_char_cursor#3 )
  print_line_cursor#15 = phi( main::@6/print_line_cursor#1 )
  print_line_cursor#4 = print_line_cursor#15
  print_char_cursor#18 = print_char_cursor#42
  main::i#2 = ++ main::i#4
  to:main::@1
main::@3: scope:[main]  from main::@1
  print_line_cursor#23 = phi( main::@1/print_line_cursor#27 )
  print_char_cursor#55 = phi( main::@1/print_char_cursor#61 )
  Ticks#15 = phi( main::@1/Ticks#18 )
  call end
  to:main::@8
main::@8: scope:[main]  from main::@3
  print_line_cursor#16 = phi( main::@3/print_line_cursor#3 )
  print_char_cursor#43 = phi( main::@3/print_char_cursor#16 )
  Ticks#10 = phi( main::@3/Ticks#2 )
  Ticks#3 = Ticks#10
  print_char_cursor#19 = print_char_cursor#43
  print_line_cursor#5 = print_line_cursor#16
  main::return#0 = 0
  to:main::@return
main::@return: scope:[main]  from main::@8
  Ticks#11 = phi( main::@8/Ticks#3 )
  print_line_cursor#17 = phi( main::@8/print_line_cursor#5 )
  print_char_cursor#44 = phi( main::@8/print_char_cursor#19 )
  main::return#3 = phi( main::@8/main::return#0 )
  main::return#1 = main::return#3
  print_char_cursor#20 = print_char_cursor#44
  print_line_cursor#6 = print_line_cursor#17
  Ticks#4 = Ticks#11
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  print_screen#0 = (char *)$400
  print_line_cursor#7 = print_screen#0
  print_char_cursor#21 = print_line_cursor#7
  last_time = 0
  Ticks#5 = 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  print_screen#4 = phi( __start::__init1/print_screen#0 )
  Ticks#16 = phi( __start::__init1/Ticks#5 )
  print_line_cursor#24 = phi( __start::__init1/print_line_cursor#7 )
  print_char_cursor#56 = phi( __start::__init1/print_char_cursor#21 )
  call main
  main::return#2 = main::return#1
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  print_screen#3 = phi( __start::@1/print_screen#4 )
  Ticks#12 = phi( __start::@1/Ticks#4 )
  print_line_cursor#18 = phi( __start::@1/print_line_cursor#6 )
  print_char_cursor#45 = phi( __start::@1/print_char_cursor#20 )
  print_char_cursor#22 = print_char_cursor#45
  print_line_cursor#8 = print_line_cursor#18
  Ticks#6 = Ticks#12
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  Ticks#13 = phi( __start::@2/Ticks#6 )
  print_char_cursor#46 = phi( __start::@2/print_char_cursor#22 )
  print_line_cursor#19 = phi( __start::@2/print_line_cursor#8 )
  print_screen#2 = phi( __start::@2/print_screen#3 )
  print_screen#1 = print_screen#2
  print_line_cursor#9 = print_line_cursor#19
  print_char_cursor#23 = print_char_cursor#46
  Ticks#7 = Ticks#13
  return 
  to:@return

SYMBOL TABLE SSA
__constant char BINARY = 2
__constant char DECIMAL = $a
__constant char DIGITS[] = "0123456789abcdef"z
__constant char HEXADECIMAL = $10
__constant char OCTAL = 8
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
__constant unsigned int RADIX_BINARY_VALUES[] = { $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 }
__constant unsigned int RADIX_DECIMAL_VALUES[] = { $2710, $3e8, $64, $a }
__constant unsigned int RADIX_HEXADECIMAL_VALUES[] = { $1000, $100, $10 }
__constant unsigned int RADIX_OCTAL_VALUES[] = { $8000, $1000, $200, $40, 8 }
__constant char SIZEOF_UNSIGNED_INT = 2
unsigned int Ticks
unsigned int Ticks#0
unsigned int Ticks#1
unsigned int Ticks#10
unsigned int Ticks#11
unsigned int Ticks#12
unsigned int Ticks#13
unsigned int Ticks#14
unsigned int Ticks#15
unsigned int Ticks#16
unsigned int Ticks#17
unsigned int Ticks#18
unsigned int Ticks#19
unsigned int Ticks#2
unsigned int Ticks#20
unsigned int Ticks#21
unsigned int Ticks#22
unsigned int Ticks#23
unsigned int Ticks#24
unsigned int Ticks#3
unsigned int Ticks#4
unsigned int Ticks#5
unsigned int Ticks#6
unsigned int Ticks#7
unsigned int Ticks#8
unsigned int Ticks#9
void __start()
__constant char decimal_digits[6] = { fill( 6, 0) }
void end()
__loadstore volatile unsigned int last_time
int main()
bool main::$2
unsigned int main::$3
unsigned int main::i
unsigned int main::i#0
unsigned int main::i#1
unsigned int main::i#2
unsigned int main::i#3
unsigned int main::i#4
unsigned int main::i#5
unsigned int main::i#6
unsigned int main::i#7
int main::return
int main::return#0
int main::return#1
int main::return#2
int main::return#3
void print_char(char ch)
char print_char::ch
char print_char::ch#0
char print_char::ch#1
char print_char::ch#2
char print_char::ch#3
char *print_char_cursor
char *print_char_cursor#0
char *print_char_cursor#1
char *print_char_cursor#10
char *print_char_cursor#11
char *print_char_cursor#12
char *print_char_cursor#13
char *print_char_cursor#14
char *print_char_cursor#15
char *print_char_cursor#16
char *print_char_cursor#17
char *print_char_cursor#18
char *print_char_cursor#19
char *print_char_cursor#2
char *print_char_cursor#20
char *print_char_cursor#21
char *print_char_cursor#22
char *print_char_cursor#23
char *print_char_cursor#24
char *print_char_cursor#25
char *print_char_cursor#26
char *print_char_cursor#27
char *print_char_cursor#28
char *print_char_cursor#29
char *print_char_cursor#3
char *print_char_cursor#30
char *print_char_cursor#31
char *print_char_cursor#32
char *print_char_cursor#33
char *print_char_cursor#34
char *print_char_cursor#35
char *print_char_cursor#36
char *print_char_cursor#37
char *print_char_cursor#38
char *print_char_cursor#39
char *print_char_cursor#4
char *print_char_cursor#40
char *print_char_cursor#41
char *print_char_cursor#42
char *print_char_cursor#43
char *print_char_cursor#44
char *print_char_cursor#45
char *print_char_cursor#46
char *print_char_cursor#47
char *print_char_cursor#48
char *print_char_cursor#49
char *print_char_cursor#5
char *print_char_cursor#50
char *print_char_cursor#51
char *print_char_cursor#52
char *print_char_cursor#53
char *print_char_cursor#54
char *print_char_cursor#55
char *print_char_cursor#56
char *print_char_cursor#57
char *print_char_cursor#58
char *print_char_cursor#59
char *print_char_cursor#6
char *print_char_cursor#60
char *print_char_cursor#61
char *print_char_cursor#62
char *print_char_cursor#63
char *print_char_cursor#7
char *print_char_cursor#8
char *print_char_cursor#9
__constant const char print_hextab[] = "0123456789abcdef"z
char *print_line_cursor
char *print_line_cursor#0
char *print_line_cursor#1
char *print_line_cursor#10
char *print_line_cursor#11
char *print_line_cursor#12
char *print_line_cursor#13
char *print_line_cursor#14
char *print_line_cursor#15
char *print_line_cursor#16
char *print_line_cursor#17
char *print_line_cursor#18
char *print_line_cursor#19
char *print_line_cursor#2
char *print_line_cursor#20
char *print_line_cursor#21
char *print_line_cursor#22
char *print_line_cursor#23
char *print_line_cursor#24
char *print_line_cursor#25
char *print_line_cursor#26
char *print_line_cursor#27
char *print_line_cursor#28
char *print_line_cursor#29
char *print_line_cursor#3
char *print_line_cursor#30
char *print_line_cursor#31
char *print_line_cursor#4
char *print_line_cursor#5
char *print_line_cursor#6
char *print_line_cursor#7
char *print_line_cursor#8
char *print_line_cursor#9
void print_ln()
char *print_ln::$0
bool print_ln::$1
char *print_screen
char *print_screen#0
char *print_screen#1
char *print_screen#2
char *print_screen#3
char *print_screen#4
void print_str(char *str)
bool print_str::$1
char *print_str::str
char *print_str::str#0
char *print_str::str#1
char *print_str::str#2
char *print_str::str#3
char *print_str::str#4
char *print_str::str#5
void print_uchar(char b)
char print_uchar::$0
number print_uchar::$2
char print_uchar::b
char print_uchar::b#0
char print_uchar::b#1
char print_uchar::b#2
char print_uchar::b#3
void print_uint(unsigned int w)
char print_uint::$0
char print_uint::$2
unsigned int print_uint::w
unsigned int print_uint::w#0
unsigned int print_uint::w#1
unsigned int print_uint::w#2
void print_uint_decimal(unsigned int w)
unsigned int print_uint_decimal::w
unsigned int print_uint_decimal::w#0
unsigned int print_uint_decimal::w#1
__constant char * const rom = (char *)$e000
void start()
__constant unsigned int * const start::LAST_TIME = &last_time
unsigned int sum()
bool sum::$0
bool sum::$1
char sum::i
char sum::i#0
char sum::i#1
char sum::i#2
char sum::i#3
char *sum::p
char *sum::p#0
char *sum::p#1
char *sum::p#2
char *sum::p#3
char *sum::p#4
char *sum::p#5
char *sum::p#6
char sum::page
char sum::page#0
char sum::page#1
char sum::page#2
char sum::page#3
char sum::page#4
char sum::page#5
char sum::page#6
unsigned int sum::return
unsigned int sum::return#0
unsigned int sum::return#1
unsigned int sum::return#2
unsigned int sum::return#3
unsigned int sum::return#4
unsigned int sum::s
unsigned int sum::s#0
unsigned int sum::s#1
unsigned int sum::s#2
unsigned int sum::s#3
unsigned int sum::s#4
unsigned int sum::s#5
unsigned int sum::s#6
unsigned int sum::s#7
char sum::tmp
char sum::tmp#0
char sum::tmp#1
void utoa(unsigned int value , char *buffer , char radix)
bool utoa::$0
bool utoa::$1
char utoa::$10
char utoa::$11
bool utoa::$2
bool utoa::$3
number utoa::$4
bool utoa::$5
bool utoa::$6
bool utoa::$7
bool utoa::$8
unsigned int utoa::$9
char *utoa::buffer
char *utoa::buffer#0
char *utoa::buffer#1
char *utoa::buffer#10
char *utoa::buffer#11
char *utoa::buffer#12
char *utoa::buffer#13
char *utoa::buffer#14
char *utoa::buffer#15
char *utoa::buffer#16
char *utoa::buffer#17
char *utoa::buffer#18
char *utoa::buffer#19
char *utoa::buffer#2
char *utoa::buffer#20
char *utoa::buffer#21
char *utoa::buffer#3
char *utoa::buffer#4
char *utoa::buffer#5
char *utoa::buffer#6
char *utoa::buffer#7
char *utoa::buffer#8
char *utoa::buffer#9
char utoa::digit
char utoa::digit#0
char utoa::digit#1
char utoa::digit#2
char utoa::digit#3
char utoa::digit#4
char utoa::digit#5
char utoa::digit#6
unsigned int utoa::digit_value
unsigned int utoa::digit_value#0
unsigned int utoa::digit_value#1
unsigned int *utoa::digit_values
unsigned int *utoa::digit_values#0
unsigned int *utoa::digit_values#1
unsigned int *utoa::digit_values#10
unsigned int *utoa::digit_values#2
unsigned int *utoa::digit_values#3
unsigned int *utoa::digit_values#4
unsigned int *utoa::digit_values#5
unsigned int *utoa::digit_values#6
unsigned int *utoa::digit_values#7
unsigned int *utoa::digit_values#8
unsigned int *utoa::digit_values#9
char utoa::max_digits
char utoa::max_digits#0
char utoa::max_digits#1
char utoa::max_digits#10
char utoa::max_digits#2
char utoa::max_digits#3
char utoa::max_digits#4
char utoa::max_digits#5
char utoa::max_digits#6
char utoa::max_digits#7
char utoa::max_digits#8
char utoa::max_digits#9
char utoa::radix
char utoa::radix#0
char utoa::radix#1
char utoa::radix#2
char utoa::radix#3
char utoa::radix#4
char utoa::started
char utoa::started#0
char utoa::started#1
char utoa::started#2
char utoa::started#3
char utoa::started#4
unsigned int utoa::value
unsigned int utoa::value#0
unsigned int utoa::value#1
unsigned int utoa::value#10
unsigned int utoa::value#11
unsigned int utoa::value#12
unsigned int utoa::value#13
unsigned int utoa::value#14
unsigned int utoa::value#15
unsigned int utoa::value#2
unsigned int utoa::value#3
unsigned int utoa::value#4
unsigned int utoa::value#5
unsigned int utoa::value#6
unsigned int utoa::value#7
unsigned int utoa::value#8
unsigned int utoa::value#9
unsigned int utoa_append(char *buffer , unsigned int value , unsigned int sub)
bool utoa_append::$0
char *utoa_append::buffer
char *utoa_append::buffer#0
char *utoa_append::buffer#1
char *utoa_append::buffer#2
char *utoa_append::buffer#3
char *utoa_append::buffer#4
char utoa_append::digit
char utoa_append::digit#0
char utoa_append::digit#1
char utoa_append::digit#2
char utoa_append::digit#3
char utoa_append::digit#4
unsigned int utoa_append::return
unsigned int utoa_append::return#0
unsigned int utoa_append::return#1
unsigned int utoa_append::return#2
unsigned int utoa_append::return#3
unsigned int utoa_append::return#4
unsigned int utoa_append::sub
unsigned int utoa_append::sub#0
unsigned int utoa_append::sub#1
unsigned int utoa_append::sub#2
unsigned int utoa_append::sub#3
unsigned int utoa_append::value
unsigned int utoa_append::value#0
unsigned int utoa_append::value#1
unsigned int utoa_append::value#2
unsigned int utoa_append::value#3
unsigned int utoa_append::value#4
unsigned int utoa_append::value#5

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

Created 25 initial phi equivalence classes
Coalesced [20] print_char_cursor#67 = print_char_cursor#1
Coalesced [23] main::i#8 = main::i#2
Not coalescing [24] print_char_cursor#73 = print_line_cursor#0
Coalesced [25] print_line_cursor#34 = print_line_cursor#0
Coalesced [34] print_char_cursor#66 = print_char_cursor#12
Coalesced [43] sum::s#9 = sum::s#3
Coalesced [51] sum::page#7 = sum::page#2
Coalesced [52] sum::s#8 = sum::s#2
Coalesced [53] sum::p#7 = sum::p#2
Coalesced [54] sum::i#4 = sum::i#2
Coalesced (already) [55] sum::s#10 = sum::s#2
Coalesced [63] print_line_cursor#32 = print_line_cursor#22
Coalesced (already) [69] print_line_cursor#33 = print_line_cursor#0
Coalesced [71] print_uchar::b#4 = print_uchar::b#0
Coalesced [72] print_char_cursor#68 = print_char_cursor#54
Coalesced [75] print_uchar::b#5 = print_uchar::b#1
Coalesced [76] print_char_cursor#69 = print_char_cursor#12
Coalesced [82] utoa::value#17 = utoa::value#0
Coalesced [94] utoa::value#18 = utoa::value#2
Coalesced [95] utoa::started#6 = utoa::started#2
Coalesced [96] utoa::buffer#23 = utoa::buffer#11
Coalesced [99] utoa::digit#7 = utoa::digit#1
Coalesced (already) [100] utoa::value#16 = utoa::value#6
Coalesced (already) [101] utoa::started#5 = utoa::started#4
Coalesced (already) [102] utoa::buffer#22 = utoa::buffer#14
Coalesced [110] utoa::value#19 = utoa::value#1
Coalesced [111] utoa::buffer#24 = utoa::buffer#5
Coalesced (already) [112] print_char_cursor#64 = print_char_cursor#54
Coalesced [117] print_char::ch#4 = print_char::ch#0
Coalesced [118] print_char_cursor#70 = print_char_cursor#1
Coalesced [121] print_str::str#6 = print_str::str#0
Coalesced (already) [122] print_char_cursor#65 = print_char_cursor#12
Coalesced [126] print_char::ch#5 = print_char::ch#1
Coalesced (already) [127] print_char_cursor#71 = print_char_cursor#52
Coalesced [131] print_char::ch#6 = print_char::ch#2
Coalesced (already) [132] print_char_cursor#72 = print_char_cursor#12
Coalesced [136] utoa_append::value#6 = utoa_append::value#0
Coalesced [143] utoa_append::value#7 = utoa_append::value#1
Coalesced [144] utoa_append::digit#5 = utoa_append::digit#1
Coalesced down to 16 phi equivalence classes
Culled Empty Block label __start::@2
Culled Empty Block label main::@4
Culled Empty Block label main::@8
Culled Empty Block label end::@3
Culled Empty Block label sum::@3
Culled Empty Block label sum::@2
Culled Empty Block label sum::@6
Culled Empty Block label print_uint_decimal::@2
Culled Empty Block label print_ln::@2
Culled Empty Block label print_ln::@3
Culled Empty Block label print_uint::@2
Culled Empty Block label utoa::@1
Culled Empty Block label utoa::@5
Culled Empty Block label utoa::@17
Culled Empty Block label print_uchar::@2
Renumbering block utoa::@10 to utoa::@1
Renumbering block utoa::@11 to utoa::@2
Renumbering block utoa::@12 to utoa::@3
Renumbering block utoa::@13 to utoa::@4
Renumbering block utoa::@14 to utoa::@5
Renumbering block utoa::@15 to utoa::@6
Renumbering block utoa::@16 to utoa::@7
Renumbering block sum::@4 to sum::@2
Renumbering block sum::@5 to sum::@3
Renumbering block main::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
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 end::@2
Adding NOP phi() at start of sum
Adding NOP phi() at start of print_uint_decimal::@1
Adding NOP phi() at start of utoa
Adding NOP phi() at start of print_str
Adding NOP phi() at start of utoa_append

FINAL CONTROL FLOW GRAPH

void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] last_time = 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [2] phi()
  [3] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [4] return 
  to:@return

int main()
main: scope:[main]  from __start::@1
  [5] phi()
  [6] call start
  to:main::@1
main::@1: scope:[main]  from main main::@6
  [7] print_line_cursor#22 = phi( main/print_screen#0, main::@6/print_line_cursor#0 )
  [7] print_char_cursor#54 = phi( main/print_screen#0, main::@6/print_char_cursor#73 )
  [7] main::i#3 = phi( main/0, main::@6/main::i#2 )
  [8] if(main::i#3<6) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@1
  [9] phi()
  [10] call end
  to:main::@return
main::@return: scope:[main]  from main::@3
  [11] return 
  to:@return
main::@2: scope:[main]  from main::@1
  [12] phi()
  [13] call sum
  [14] sum::return#2 = sum::s#3
  to:main::@4
main::@4: scope:[main]  from main::@2
  [15] print_uint_decimal::w#0 = sum::return#2
  [16] call print_uint_decimal
  to:main::@5
main::@5: scope:[main]  from main::@4
  [17] phi()
  [18] call print_ln
  to:main::@6
main::@6: scope:[main]  from main::@5
  [19] main::i#2 = ++ main::i#3
  [20] print_char_cursor#73 = print_line_cursor#0
  to:main::@1

void start()
start: scope:[start]  from end main
  asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
  to:start::@return
start::@return: scope:[start]  from start
  [22] return 
  to:@return

void end()
end: scope:[end]  from main::@3
  [23] Ticks#0 = last_time
  [24] call start
  to:end::@1
end::@1: scope:[end]  from end
  [25] last_time = last_time - Ticks#0
  [26] Ticks#1 = last_time
  [27] print_uint::w#0 = Ticks#1
  [28] call print_uint
  to:end::@2
end::@2: scope:[end]  from end::@1
  [29] phi()
  [30] call print_ln
  to:end::@return
end::@return: scope:[end]  from end::@2
  [31] return 
  to:@return

unsigned int sum()
sum: scope:[sum]  from main::@2
  [32] phi()
  to:sum::@1
sum::@1: scope:[sum]  from sum sum::@3
  [33] sum::p#5 = phi( sum/rom, sum::@3/sum::p#2 )
  [33] sum::s#3 = phi( sum/0, sum::@3/sum::s#2 )
  [33] sum::page#3 = phi( sum/0, sum::@3/sum::page#2 )
  [34] if(sum::page#3<$20) goto sum::@2
  to:sum::@return
sum::@return: scope:[sum]  from sum::@1
  [35] return 
  to:@return
sum::@2: scope:[sum]  from sum::@1 sum::@2
  [36] sum::s#4 = phi( sum::@1/sum::s#3, sum::@2/sum::s#2 )
  [36] sum::i#3 = phi( sum::@1/0, sum::@2/sum::i#2 )
  [37] sum::tmp#1 = sum::p#5[sum::i#3]
  [38] sum::s#2 = sum::s#4 + sum::tmp#1
  [39] sum::i#2 = ++ sum::i#3
  [40] if(0!=sum::i#2) goto sum::@2
  to:sum::@3
sum::@3: scope:[sum]  from sum::@2
  [41] sum::p#2 = sum::p#5 + $100
  [42] sum::page#2 = ++ sum::page#3
  to:sum::@1

void print_uint_decimal(unsigned int w)
print_uint_decimal: scope:[print_uint_decimal]  from main::@4
  [43] utoa::value#0 = print_uint_decimal::w#0
  [44] call utoa
  to:print_uint_decimal::@1
print_uint_decimal::@1: scope:[print_uint_decimal]  from print_uint_decimal
  [45] phi()
  [46] call print_str
  to:print_uint_decimal::@return
print_uint_decimal::@return: scope:[print_uint_decimal]  from print_uint_decimal::@1
  [47] return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from end::@2 main::@5
  [48] print_char_cursor#49 = phi( end::@2/print_char_cursor#12, main::@5/print_char_cursor#1 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [49] print_line_cursor#10 = phi( print_ln/print_line_cursor#22, print_ln::@1/print_line_cursor#0 )
  [50] print_line_cursor#0 = print_line_cursor#10 + $28
  [51] if(print_line_cursor#0<print_char_cursor#49) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [52] return 
  to:@return

void print_uint(unsigned int w)
print_uint: scope:[print_uint]  from end::@1
  [53] print_uchar::b#0 = byte1  print_uint::w#0
  [54] call print_uchar
  to:print_uint::@1
print_uint::@1: scope:[print_uint]  from print_uint
  [55] print_uchar::b#1 = byte0  print_uint::w#0
  [56] call print_uchar
  to:print_uint::@return
print_uint::@return: scope:[print_uint]  from print_uint::@1
  [57] return 
  to:@return

void utoa(unsigned int value , char *buffer , char radix)
utoa: scope:[utoa]  from print_uint_decimal
  [58] phi()
  to:utoa::@1
utoa::@1: scope:[utoa]  from utoa utoa::@4
  [59] utoa::buffer#11 = phi( utoa::@4/utoa::buffer#14, utoa/decimal_digits )
  [59] utoa::started#2 = phi( utoa::@4/utoa::started#4, utoa/0 )
  [59] utoa::value#2 = phi( utoa::@4/utoa::value#6, utoa/utoa::value#0 )
  [59] utoa::digit#2 = phi( utoa::@4/utoa::digit#1, utoa/0 )
  [60] if(utoa::digit#2<utoa::max_digits#1-1) goto utoa::@2
  to:utoa::@3
utoa::@3: scope:[utoa]  from utoa::@1
  [61] utoa::$11 = (char)utoa::value#2
  [62] *utoa::buffer#11 = DIGITS[utoa::$11]
  [63] utoa::buffer#4 = ++ utoa::buffer#11
  [64] *utoa::buffer#4 = 0
  to:utoa::@return
utoa::@return: scope:[utoa]  from utoa::@3
  [65] return 
  to:@return
utoa::@2: scope:[utoa]  from utoa::@1
  [66] utoa::$10 = utoa::digit#2 << 1
  [67] utoa::digit_value#0 = RADIX_DECIMAL_VALUES[utoa::$10]
  [68] if(0!=utoa::started#2) goto utoa::@5
  to:utoa::@7
utoa::@7: scope:[utoa]  from utoa::@2
  [69] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5
  to:utoa::@4
utoa::@4: scope:[utoa]  from utoa::@6 utoa::@7
  [70] utoa::buffer#14 = phi( utoa::@7/utoa::buffer#11, utoa::@6/utoa::buffer#5 )
  [70] utoa::started#4 = phi( utoa::@7/utoa::started#2, utoa::@6/1 )
  [70] utoa::value#6 = phi( utoa::@7/utoa::value#2, utoa::@6/utoa::value#1 )
  [71] utoa::digit#1 = ++ utoa::digit#2
  to:utoa::@1
utoa::@5: scope:[utoa]  from utoa::@2 utoa::@7
  [72] utoa_append::buffer#0 = utoa::buffer#11
  [73] utoa_append::value#0 = utoa::value#2
  [74] utoa_append::sub#0 = utoa::digit_value#0
  [75] call utoa_append
  [76] utoa_append::return#0 = utoa_append::value#2
  to:utoa::@6
utoa::@6: scope:[utoa]  from utoa::@5
  [77] utoa::value#1 = utoa_append::return#0
  [78] utoa::buffer#5 = ++ utoa::buffer#11
  to:utoa::@4

void print_str(char *str)
print_str: scope:[print_str]  from print_uint_decimal::@1
  [79] phi()
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@3
  [80] print_char_cursor#1 = phi( print_str/print_char_cursor#54, print_str::@3/print_char_cursor#12 )
  [80] print_str::str#2 = phi( print_str/decimal_digits, print_str::@3/print_str::str#0 )
  [81] if(0!=*print_str::str#2) goto print_str::@2
  to:print_str::@return
print_str::@return: scope:[print_str]  from print_str::@1
  [82] return 
  to:@return
print_str::@2: scope:[print_str]  from print_str::@1
  [83] print_char::ch#0 = *print_str::str#2
  [84] call print_char
  to:print_str::@3
print_str::@3: scope:[print_str]  from print_str::@2
  [85] print_str::str#0 = ++ print_str::str#2
  to:print_str::@1

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from print_uint print_uint::@1
  [86] print_char_cursor#52 = phi( print_uint/print_char_cursor#54, print_uint::@1/print_char_cursor#12 )
  [86] print_uchar::b#2 = phi( print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
  [87] print_uchar::$0 = print_uchar::b#2 >> 4
  [88] print_char::ch#1 = DIGITS[print_uchar::$0]
  [89] call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  [90] print_uchar::$2 = print_uchar::b#2 & $f
  [91] print_char::ch#2 = DIGITS[print_uchar::$2]
  [92] call print_char
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@1
  [93] return 
  to:@return

unsigned int utoa_append(char *buffer , unsigned int value , unsigned int sub)
utoa_append: scope:[utoa_append]  from utoa::@5
  [94] phi()
  to:utoa_append::@1
utoa_append::@1: scope:[utoa_append]  from utoa_append utoa_append::@2
  [95] utoa_append::digit#2 = phi( utoa_append/0, utoa_append::@2/utoa_append::digit#1 )
  [95] utoa_append::value#2 = phi( utoa_append/utoa_append::value#0, utoa_append::@2/utoa_append::value#1 )
  [96] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2
  to:utoa_append::@3
utoa_append::@3: scope:[utoa_append]  from utoa_append::@1
  [97] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2]
  to:utoa_append::@return
utoa_append::@return: scope:[utoa_append]  from utoa_append::@3
  [98] return 
  to:@return
utoa_append::@2: scope:[utoa_append]  from utoa_append::@1
  [99] utoa_append::digit#1 = ++ utoa_append::digit#2
  [100] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0
  to:utoa_append::@1

void print_char(char ch)
print_char: scope:[print_char]  from print_str::@2 print_uchar print_uchar::@1
  [101] print_char_cursor#36 = phi( print_str::@2/print_char_cursor#1, print_uchar/print_char_cursor#52, print_uchar::@1/print_char_cursor#12 )
  [101] print_char::ch#3 = phi( print_str::@2/print_char::ch#0, print_uchar/print_char::ch#1, print_uchar::@1/print_char::ch#2 )
  [102] *print_char_cursor#36 = print_char::ch#3
  [103] print_char_cursor#12 = ++ print_char_cursor#36
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [104] return 
  to:@return


VARIABLE REGISTER WEIGHTS
unsigned int Ticks
unsigned int Ticks#0 // 101.0
unsigned int Ticks#1 // 202.0
void __start()
void end()
__loadstore volatile unsigned int last_time // 21.368421052631582
int main()
unsigned int main::i
unsigned int main::i#2 // 101.0
unsigned int main::i#3 // 33.666666666666664
int main::return
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // 2000002.0
char print_char::ch#1 // 20002.0
char print_char::ch#2 // 20002.0
char print_char::ch#3 // 1.1020004E7
char *print_char_cursor
char *print_char_cursor#1 // 251263.0
char *print_char_cursor#12 // 734073.6666666666
char *print_char_cursor#36 // 1.05100025E7
char *print_char_cursor#49 // 25050.75
char *print_char_cursor#52 // 4001.0
char *print_char_cursor#54 // 653.1176470588235
char *print_char_cursor#73 // 202.0
char *print_line_cursor
char *print_line_cursor#0 // 50034.16666666666
char *print_line_cursor#10 // 201003.0
char *print_line_cursor#22 // 64.82352941176471
void print_ln()
char *print_screen
void print_str(char *str)
char *print_str::str
char *print_str::str#0 // 2000002.0
char *print_str::str#2 // 1000001.0
void print_uchar(char b)
char print_uchar::$0 // 20002.0
char print_uchar::$2 // 20002.0
char print_uchar::b
char print_uchar::b#0 // 2002.0
char print_uchar::b#1 // 2002.0
char print_uchar::b#2 // 5501.0
void print_uint(unsigned int w)
unsigned int print_uint::w
unsigned int print_uint::w#0 // 701.0
void print_uint_decimal(unsigned int w)
unsigned int print_uint_decimal::w
unsigned int print_uint_decimal::w#0 // 1102.0
void start()
unsigned int sum()
char sum::i
char sum::i#2 // 1500001.5
char sum::i#3 // 1000001.0
char *sum::p
char *sum::p#2 // 100001.0
char *sum::p#5 // 171428.99999999997
char sum::page
char sum::page#2 // 200002.0
char sum::page#3 // 37500.375
unsigned int sum::return
unsigned int sum::return#2 // 202.0
unsigned int sum::s
unsigned int sum::s#2 // 420000.60000000003
unsigned int sum::s#3 // 50025.75
unsigned int sum::s#4 // 1050001.5
char sum::tmp
char sum::tmp#1 // 2000002.0
void utoa(unsigned int value , char *buffer , char radix)
char utoa::$10 // 2000002.0
char utoa::$11 // 20002.0
char *utoa::buffer
char *utoa::buffer#11 // 287143.2857142857
char *utoa::buffer#14 // 1500001.5
char *utoa::buffer#4 // 20002.0
char *utoa::buffer#5 // 2000002.0
char utoa::digit
char utoa::digit#1 // 2000002.0
char utoa::digit#2 // 285714.5714285714
unsigned int utoa::digit_value
unsigned int utoa::digit_value#0 // 600000.6000000001
unsigned int *utoa::digit_values
char utoa::max_digits
char utoa::radix
char utoa::started
char utoa::started#2 // 500000.5
char utoa::started#4 // 1000001.0
unsigned int utoa::value
unsigned int utoa::value#0 // 5501.0
unsigned int utoa::value#1 // 1000001.0
unsigned int utoa::value#2 // 572857.857142857
unsigned int utoa::value#6 // 1500001.5
unsigned int utoa_append(char *buffer , unsigned int value , unsigned int sub)
char *utoa_append::buffer
char *utoa_append::buffer#0 // 1375000.25
char utoa_append::digit
char utoa_append::digit#1 // 1.0000000001E10
char utoa_append::digit#2 // 1.00050000015E10
unsigned int utoa_append::return
unsigned int utoa_append::return#0 // 2000002.0
unsigned int utoa_append::sub
unsigned int utoa_append::sub#0 // 3.3335000005E9
unsigned int utoa_append::value
unsigned int utoa_append::value#0 // 3666667.333333333
unsigned int utoa_append::value#1 // 2.0000000002E10
unsigned int utoa_append::value#2 // 5.001833334166666E9

Initial phi equivalence classes
[ main::i#3 main::i#2 ]
[ 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_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ]
[ utoa::digit#2 utoa::digit#1 ]
[ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ]
[ utoa::started#2 utoa::started#4 ]
[ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ]
[ print_str::str#2 print_str::str#0 ]
[ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
[ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ]
[ utoa_append::digit#2 utoa_append::digit#1 ]
[ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ]
[ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ]
Added variable last_time to live range equivalence class [ last_time ]
Added variable sum::return#2 to live range equivalence class [ sum::return#2 ]
Added variable print_uint_decimal::w#0 to live range equivalence class [ print_uint_decimal::w#0 ]
Added variable Ticks#0 to live range equivalence class [ Ticks#0 ]
Added variable Ticks#1 to live range equivalence class [ Ticks#1 ]
Added variable print_uint::w#0 to live range equivalence class [ print_uint::w#0 ]
Added variable sum::tmp#1 to live range equivalence class [ sum::tmp#1 ]
Added variable utoa::$11 to live range equivalence class [ utoa::$11 ]
Added variable utoa::buffer#4 to live range equivalence class [ utoa::buffer#4 ]
Added variable utoa::$10 to live range equivalence class [ utoa::$10 ]
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 print_uchar::$0 to live range equivalence class [ print_uchar::$0 ]
Added variable print_uchar::$2 to live range equivalence class [ print_uchar::$2 ]
Complete equivalence classes
[ main::i#3 main::i#2 ]
[ 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_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ]
[ utoa::digit#2 utoa::digit#1 ]
[ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ]
[ utoa::started#2 utoa::started#4 ]
[ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ]
[ print_str::str#2 print_str::str#0 ]
[ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
[ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ]
[ utoa_append::digit#2 utoa_append::digit#1 ]
[ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ]
[ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ]
[ last_time ]
[ sum::return#2 ]
[ print_uint_decimal::w#0 ]
[ Ticks#0 ]
[ Ticks#1 ]
[ print_uint::w#0 ]
[ sum::tmp#1 ]
[ utoa::$11 ]
[ utoa::buffer#4 ]
[ utoa::$10 ]
[ utoa::digit_value#0 ]
[ utoa_append::buffer#0 ]
[ utoa_append::sub#0 ]
[ utoa_append::return#0 ]
[ print_uchar::$0 ]
[ print_uchar::$2 ]
Allocated zp[2]:2 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ]
Allocated zp[1]:4 [ utoa_append::digit#2 utoa_append::digit#1 ]
Allocated zp[2]:5 [ utoa_append::sub#0 ]
Allocated zp[1]:7 [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ]
Allocated zp[2]:8 [ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ]
Allocated zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ]
Allocated zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ]
Allocated zp[2]:14 [ print_str::str#2 print_str::str#0 ]
Allocated zp[1]:16 [ sum::i#3 sum::i#2 ]
Allocated zp[1]:17 [ utoa::digit#2 utoa::digit#1 ]
Allocated zp[1]:18 [ sum::tmp#1 ]
Allocated zp[1]:19 [ utoa::$10 ]
Allocated zp[2]:20 [ utoa_append::return#0 ]
Allocated zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 ]
Allocated zp[1]:24 [ utoa::started#2 utoa::started#4 ]
Allocated zp[2]:25 [ utoa_append::buffer#0 ]
Allocated zp[2]:27 [ utoa::digit_value#0 ]
Allocated zp[2]:29 [ sum::p#5 sum::p#2 ]
Allocated zp[2]:31 [ print_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ]
Allocated zp[1]:33 [ sum::page#3 sum::page#2 ]
Allocated zp[1]:34 [ utoa::$11 ]
Allocated zp[2]:35 [ utoa::buffer#4 ]
Allocated zp[1]:37 [ print_uchar::$0 ]
Allocated zp[1]:38 [ print_uchar::$2 ]
Allocated zp[1]:39 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Allocated zp[2]:40 [ print_uint_decimal::w#0 ]
Allocated zp[2]:42 [ print_uint::w#0 ]
Allocated zp[2]:44 [ sum::return#2 ]
Allocated zp[2]:46 [ Ticks#1 ]
Allocated zp[2]:48 [ main::i#3 main::i#2 ]
Allocated zp[2]:50 [ Ticks#0 ]
Allocated zp[2]:52 [ last_time ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] last_time = 0 [ last_time ] (  [ last_time ] { }  ) always clobbers reg byte a 
Statement [8] if(main::i#3<6) goto main::@2 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 ] ( main:3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 ] { }  ) always clobbers reg byte a 
Statement [14] sum::return#2 = sum::s#3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::return#2 ] ( main:3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::return#2 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [15] print_uint_decimal::w#0 = sum::return#2 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 print_uint_decimal::w#0 ] ( main:3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 print_uint_decimal::w#0 ] { { print_uint_decimal::w#0 = sum::return#2 } }  ) always clobbers reg byte a 
Statement [20] print_char_cursor#73 = print_line_cursor#0 [ last_time main::i#2 print_char_cursor#73 print_line_cursor#0 ] ( main:3 [ last_time main::i#2 print_char_cursor#73 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  } always clobbers reg byte a reg byte x reg byte y 
Statement [23] Ticks#0 = last_time [ last_time print_char_cursor#54 print_line_cursor#22 Ticks#0 ] ( main:3::end:10 [ last_time print_char_cursor#54 print_line_cursor#22 Ticks#0 ] { }  ) always clobbers reg byte a 
Statement [25] last_time = last_time - Ticks#0 [ last_time print_char_cursor#54 print_line_cursor#22 ] ( main:3::end:10 [ last_time print_char_cursor#54 print_line_cursor#22 ] { { Ticks#1 = print_uint::w#0 } }  ) always clobbers reg byte a 
Statement [26] Ticks#1 = last_time [ print_char_cursor#54 print_line_cursor#22 Ticks#1 ] ( main:3::end:10 [ print_char_cursor#54 print_line_cursor#22 Ticks#1 ] { { Ticks#1 = print_uint::w#0 } }  ) always clobbers reg byte a 
Statement [27] print_uint::w#0 = Ticks#1 [ print_char_cursor#54 print_line_cursor#22 print_uint::w#0 ] ( main:3::end:10 [ print_char_cursor#54 print_line_cursor#22 print_uint::w#0 ] { { Ticks#1 = print_uint::w#0 } }  ) always clobbers reg byte a 
Statement [37] sum::tmp#1 = sum::p#5[sum::i#3] [ sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] ( main:3::sum:13 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:33 [ sum::page#3 sum::page#2 ]
Removing always clobbered register reg byte a as potential for zp[1]:16 [ sum::i#3 sum::i#2 ]
Statement [38] sum::s#2 = sum::s#4 + sum::tmp#1 [ sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] ( main:3::sum:13 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [41] sum::p#2 = sum::p#5 + $100 [ sum::page#3 sum::s#2 sum::p#2 ] ( main:3::sum:13 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::page#3 sum::s#2 sum::p#2 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [43] utoa::value#0 = print_uint_decimal::w#0 [ print_char_cursor#54 utoa::value#0 ] ( main:3::print_uint_decimal:16 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [50] print_line_cursor#0 = print_line_cursor#10 + $28 [ print_line_cursor#0 print_char_cursor#49 ] ( main:3::print_ln:18 [ last_time main::i#3 print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#1 = print_char_cursor#49 } }  main:3::end:10::print_ln:30 [ print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#12 = print_char_cursor#49 } }  ) always clobbers reg byte a 
Statement [51] if(print_line_cursor#0<print_char_cursor#49) goto print_ln::@1 [ print_line_cursor#0 print_char_cursor#49 ] ( main:3::print_ln:18 [ last_time main::i#3 print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#1 = print_char_cursor#49 } }  main:3::end:10::print_ln:30 [ print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#12 = print_char_cursor#49 } }  ) always clobbers reg byte a 
Statement [62] *utoa::buffer#11 = DIGITS[utoa::$11] [ utoa::buffer#11 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::buffer#11 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a reg byte y 
Statement [63] utoa::buffer#4 = ++ utoa::buffer#11 [ utoa::buffer#4 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::buffer#4 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [64] *utoa::buffer#4 = 0 [ ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a reg byte y 
Statement [66] utoa::$10 = utoa::digit#2 << 1 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:17 [ utoa::digit#2 utoa::digit#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:24 [ utoa::started#2 utoa::started#4 ]
Statement [67] utoa::digit_value#0 = RADIX_DECIMAL_VALUES[utoa::$10] [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [69] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [72] utoa_append::buffer#0 = utoa::buffer#11 [ utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [73] utoa_append::value#0 = utoa::value#2 [ utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [74] utoa_append::sub#0 = utoa::digit_value#0 [ utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [76] utoa_append::return#0 = utoa_append::value#2 [ utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [77] utoa::value#1 = utoa_append::return#0 [ utoa::digit#2 utoa::buffer#11 utoa::value#1 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa::value#1 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [81] if(0!=*print_str::str#2) goto print_str::@2 [ print_char_cursor#1 print_str::str#2 ] ( main:3::print_uint_decimal:16::print_str:46 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#1 print_str::str#2 ] { { print_uint_decimal::w#0 = sum::return#2 } }  ) always clobbers reg byte a reg byte y 
Statement [83] print_char::ch#0 = *print_str::str#2 [ print_char_cursor#1 print_str::str#2 print_char::ch#0 ] ( main:3::print_uint_decimal:16::print_str:46 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#1 print_str::str#2 print_char::ch#0 ] { { print_uint_decimal::w#0 = sum::return#2 } { print_char::ch#0 = print_char::ch#3 } { print_char_cursor#1 = print_char_cursor#36 } }  ) always clobbers reg byte a reg byte y 
Statement [87] print_uchar::$0 = print_uchar::b#2 >> 4 [ print_uchar::b#2 print_char_cursor#52 print_uchar::$0 ] ( main:3::end:10::print_uint:28::print_uchar:54 [ print_line_cursor#22 print_uint::w#0 print_uchar::b#2 print_char_cursor#52 print_uchar::$0 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#36 = print_char_cursor#52 print_char_cursor#54 } { print_char::ch#1 = print_char::ch#3 } }  main:3::end:10::print_uint:28::print_uchar:56 [ print_line_cursor#22 print_uchar::b#2 print_char_cursor#52 print_uchar::$0 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#1 = print_char::ch#3 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:39 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Statement [90] print_uchar::$2 = print_uchar::b#2 & $f [ print_char_cursor#12 print_uchar::$2 ] ( main:3::end:10::print_uint:28::print_uchar:54 [ print_line_cursor#22 print_uint::w#0 print_char_cursor#12 print_uchar::$2 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#52 = print_char_cursor#54 } { print_char::ch#2 = print_char::ch#3 } { print_char_cursor#12 = print_char_cursor#36 } }  main:3::end:10::print_uint:28::print_uchar:56 [ print_line_cursor#22 print_char_cursor#12 print_uchar::$2 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#2 = print_char::ch#3 } }  ) always clobbers reg byte a 
Statement [96] if(utoa_append::value#2>=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:3::print_uint_decimal:16::utoa:44::utoa_append:75 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ utoa_append::digit#2 utoa_append::digit#1 ]
Statement [97] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] [ utoa_append::value#2 ] ( main:3::print_uint_decimal:16::utoa:44::utoa_append:75 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:17 [ utoa::digit#2 utoa::digit#1 ]
Statement [100] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:3::print_uint_decimal:16::utoa:44::utoa_append:75 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [102] *print_char_cursor#36 = print_char::ch#3 [ print_char_cursor#36 ] ( main:3::print_uint_decimal:16::print_str:46::print_char:84 [ last_time main::i#3 print_line_cursor#22 print_str::str#2 print_char_cursor#36 ] { { print_uint_decimal::w#0 = sum::return#2 } { print_char::ch#0 = print_char::ch#3 } { print_char_cursor#1 = print_char_cursor#36 } }  main:3::end:10::print_uint:28::print_uchar:54::print_char:89 [ print_line_cursor#22 print_uint::w#0 print_uchar::b#2 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#36 = print_char_cursor#52 print_char_cursor#54 } { print_char::ch#1 = print_char::ch#3 } }  main:3::end:10::print_uint:28::print_uchar:56::print_char:89 [ print_line_cursor#22 print_uchar::b#2 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#1 = print_char::ch#3 } }  main:3::end:10::print_uint:28::print_uchar:54::print_char:92 [ print_line_cursor#22 print_uint::w#0 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#52 = print_char_cursor#54 } { print_char::ch#2 = print_char::ch#3 } { print_char_cursor#12 = print_char_cursor#36 } }  main:3::end:10::print_uint:28::print_uchar:56::print_char:92 [ print_line_cursor#22 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#2 = print_char::ch#3 } }  ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:39 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Statement [1] last_time = 0 [ last_time ] (  [ last_time ] { }  ) always clobbers reg byte a 
Statement [8] if(main::i#3<6) goto main::@2 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 ] ( main:3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 ] { }  ) always clobbers reg byte a 
Statement [14] sum::return#2 = sum::s#3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::return#2 ] ( main:3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::return#2 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [15] print_uint_decimal::w#0 = sum::return#2 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 print_uint_decimal::w#0 ] ( main:3 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 print_uint_decimal::w#0 ] { { print_uint_decimal::w#0 = sum::return#2 } }  ) always clobbers reg byte a 
Statement [20] print_char_cursor#73 = print_line_cursor#0 [ last_time main::i#2 print_char_cursor#73 print_line_cursor#0 ] ( main:3 [ last_time main::i#2 print_char_cursor#73 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  } always clobbers reg byte a reg byte x reg byte y 
Statement [23] Ticks#0 = last_time [ last_time print_char_cursor#54 print_line_cursor#22 Ticks#0 ] ( main:3::end:10 [ last_time print_char_cursor#54 print_line_cursor#22 Ticks#0 ] { }  ) always clobbers reg byte a 
Statement [25] last_time = last_time - Ticks#0 [ last_time print_char_cursor#54 print_line_cursor#22 ] ( main:3::end:10 [ last_time print_char_cursor#54 print_line_cursor#22 ] { { Ticks#1 = print_uint::w#0 } }  ) always clobbers reg byte a 
Statement [26] Ticks#1 = last_time [ print_char_cursor#54 print_line_cursor#22 Ticks#1 ] ( main:3::end:10 [ print_char_cursor#54 print_line_cursor#22 Ticks#1 ] { { Ticks#1 = print_uint::w#0 } }  ) always clobbers reg byte a 
Statement [27] print_uint::w#0 = Ticks#1 [ print_char_cursor#54 print_line_cursor#22 print_uint::w#0 ] ( main:3::end:10 [ print_char_cursor#54 print_line_cursor#22 print_uint::w#0 ] { { Ticks#1 = print_uint::w#0 } }  ) always clobbers reg byte a 
Statement [37] sum::tmp#1 = sum::p#5[sum::i#3] [ sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] ( main:3::sum:13 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::page#3 sum::p#5 sum::i#3 sum::s#4 sum::tmp#1 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [38] sum::s#2 = sum::s#4 + sum::tmp#1 [ sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] ( main:3::sum:13 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::page#3 sum::p#5 sum::s#2 sum::i#3 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [41] sum::p#2 = sum::p#5 + $100 [ sum::page#3 sum::s#2 sum::p#2 ] ( main:3::sum:13 [ last_time main::i#3 print_char_cursor#54 print_line_cursor#22 sum::page#3 sum::s#2 sum::p#2 ] { { sum::return#2 = sum::s#3 } }  ) always clobbers reg byte a 
Statement [43] utoa::value#0 = print_uint_decimal::w#0 [ print_char_cursor#54 utoa::value#0 ] ( main:3::print_uint_decimal:16 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [50] print_line_cursor#0 = print_line_cursor#10 + $28 [ print_line_cursor#0 print_char_cursor#49 ] ( main:3::print_ln:18 [ last_time main::i#3 print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#1 = print_char_cursor#49 } }  main:3::end:10::print_ln:30 [ print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#12 = print_char_cursor#49 } }  ) always clobbers reg byte a 
Statement [51] if(print_line_cursor#0<print_char_cursor#49) goto print_ln::@1 [ print_line_cursor#0 print_char_cursor#49 ] ( main:3::print_ln:18 [ last_time main::i#3 print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#1 = print_char_cursor#49 } }  main:3::end:10::print_ln:30 [ print_line_cursor#0 print_char_cursor#49 ] { { print_char_cursor#12 = print_char_cursor#49 } }  ) always clobbers reg byte a 
Statement [62] *utoa::buffer#11 = DIGITS[utoa::$11] [ utoa::buffer#11 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::buffer#11 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a reg byte y 
Statement [63] utoa::buffer#4 = ++ utoa::buffer#11 [ utoa::buffer#4 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::buffer#4 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [64] *utoa::buffer#4 = 0 [ ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a reg byte y 
Statement [66] utoa::$10 = utoa::digit#2 << 1 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::$10 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [67] utoa::digit_value#0 = RADIX_DECIMAL_VALUES[utoa::$10] [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [69] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5 [ utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::started#2 utoa::buffer#11 utoa::digit_value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [72] utoa_append::buffer#0 = utoa::buffer#11 [ utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::value#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [73] utoa_append::value#0 = utoa::value#2 [ utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa::digit_value#0 utoa_append::buffer#0 utoa_append::value#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [74] utoa_append::sub#0 = utoa::digit_value#0 [ utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::value#0 utoa_append::sub#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [76] utoa_append::return#0 = utoa_append::value#2 [ utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::return#0 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [77] utoa::value#1 = utoa_append::return#0 [ utoa::digit#2 utoa::buffer#11 utoa::value#1 ] ( main:3::print_uint_decimal:16::utoa:44 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa::value#1 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } }  ) always clobbers reg byte a 
Statement [81] if(0!=*print_str::str#2) goto print_str::@2 [ print_char_cursor#1 print_str::str#2 ] ( main:3::print_uint_decimal:16::print_str:46 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#1 print_str::str#2 ] { { print_uint_decimal::w#0 = sum::return#2 } }  ) always clobbers reg byte a reg byte y 
Statement [83] print_char::ch#0 = *print_str::str#2 [ print_char_cursor#1 print_str::str#2 print_char::ch#0 ] ( main:3::print_uint_decimal:16::print_str:46 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#1 print_str::str#2 print_char::ch#0 ] { { print_uint_decimal::w#0 = sum::return#2 } { print_char::ch#0 = print_char::ch#3 } { print_char_cursor#1 = print_char_cursor#36 } }  ) always clobbers reg byte a reg byte y 
Statement [87] print_uchar::$0 = print_uchar::b#2 >> 4 [ print_uchar::b#2 print_char_cursor#52 print_uchar::$0 ] ( main:3::end:10::print_uint:28::print_uchar:54 [ print_line_cursor#22 print_uint::w#0 print_uchar::b#2 print_char_cursor#52 print_uchar::$0 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#36 = print_char_cursor#52 print_char_cursor#54 } { print_char::ch#1 = print_char::ch#3 } }  main:3::end:10::print_uint:28::print_uchar:56 [ print_line_cursor#22 print_uchar::b#2 print_char_cursor#52 print_uchar::$0 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#1 = print_char::ch#3 } }  ) always clobbers reg byte a 
Statement [90] print_uchar::$2 = print_uchar::b#2 & $f [ print_char_cursor#12 print_uchar::$2 ] ( main:3::end:10::print_uint:28::print_uchar:54 [ print_line_cursor#22 print_uint::w#0 print_char_cursor#12 print_uchar::$2 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#52 = print_char_cursor#54 } { print_char::ch#2 = print_char::ch#3 } { print_char_cursor#12 = print_char_cursor#36 } }  main:3::end:10::print_uint:28::print_uchar:56 [ print_line_cursor#22 print_char_cursor#12 print_uchar::$2 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#2 = print_char::ch#3 } }  ) always clobbers reg byte a 
Statement [96] if(utoa_append::value#2>=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:3::print_uint_decimal:16::utoa:44::utoa_append:75 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#2 utoa_append::digit#2 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [97] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] [ utoa_append::value#2 ] ( main:3::print_uint_decimal:16::utoa:44::utoa_append:75 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::value#2 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a reg byte y 
Statement [100] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0 [ utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] ( main:3::print_uint_decimal:16::utoa:44::utoa_append:75 [ last_time main::i#3 print_line_cursor#22 print_char_cursor#54 utoa::digit#2 utoa::buffer#11 utoa_append::buffer#0 utoa_append::sub#0 utoa_append::value#1 utoa_append::digit#1 ] { { print_uint_decimal::w#0 = sum::return#2 utoa::value#0 } { utoa_append::buffer#0 = utoa::buffer#11 } { utoa_append::value#0 = utoa::value#2 } { utoa_append::sub#0 = utoa::digit_value#0 } { utoa_append::return#0 = utoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [102] *print_char_cursor#36 = print_char::ch#3 [ print_char_cursor#36 ] ( main:3::print_uint_decimal:16::print_str:46::print_char:84 [ last_time main::i#3 print_line_cursor#22 print_str::str#2 print_char_cursor#36 ] { { print_uint_decimal::w#0 = sum::return#2 } { print_char::ch#0 = print_char::ch#3 } { print_char_cursor#1 = print_char_cursor#36 } }  main:3::end:10::print_uint:28::print_uchar:54::print_char:89 [ print_line_cursor#22 print_uint::w#0 print_uchar::b#2 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#36 = print_char_cursor#52 print_char_cursor#54 } { print_char::ch#1 = print_char::ch#3 } }  main:3::end:10::print_uint:28::print_uchar:56::print_char:89 [ print_line_cursor#22 print_uchar::b#2 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#1 = print_char::ch#3 } }  main:3::end:10::print_uint:28::print_uchar:54::print_char:92 [ print_line_cursor#22 print_uint::w#0 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#52 = print_char_cursor#54 } { print_char::ch#2 = print_char::ch#3 } { print_char_cursor#12 = print_char_cursor#36 } }  main:3::end:10::print_uint:28::print_uchar:56::print_char:92 [ print_line_cursor#22 print_char_cursor#36 ] { { Ticks#1 = print_uint::w#0 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#12 = print_char_cursor#52 print_char_cursor#36 } { print_char::ch#2 = print_char::ch#3 } }  ) always clobbers reg byte y 
Potential registers zp[2]:48 [ main::i#3 main::i#2 ] : zp[2]:48 , 
Potential registers zp[1]:33 [ sum::page#3 sum::page#2 ] : zp[1]:33 , reg byte x , reg byte y , 
Potential registers zp[2]:29 [ sum::p#5 sum::p#2 ] : zp[2]:29 , 
Potential registers zp[1]:16 [ sum::i#3 sum::i#2 ] : zp[1]:16 , reg byte x , reg byte y , 
Potential registers zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 ] : zp[2]:22 , 
Potential registers zp[2]:31 [ print_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ] : zp[2]:31 , 
Potential registers zp[1]:17 [ utoa::digit#2 utoa::digit#1 ] : zp[1]:17 , reg byte x , 
Potential registers zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ] : zp[2]:12 , 
Potential registers zp[1]:24 [ utoa::started#2 utoa::started#4 ] : zp[1]:24 , reg byte x , reg byte y , 
Potential registers zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ] : zp[2]:10 , 
Potential registers zp[2]:14 [ print_str::str#2 print_str::str#0 ] : zp[2]:14 , 
Potential registers zp[1]:39 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] : zp[1]:39 , reg byte x , 
Potential registers zp[2]:2 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] : zp[2]:2 , 
Potential registers zp[1]:4 [ utoa_append::digit#2 utoa_append::digit#1 ] : zp[1]:4 , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:8 [ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ] : zp[2]:8 , 
Potential registers zp[2]:52 [ last_time ] : zp[2]:52 , 
Potential registers zp[2]:44 [ sum::return#2 ] : zp[2]:44 , 
Potential registers zp[2]:40 [ print_uint_decimal::w#0 ] : zp[2]:40 , 
Potential registers zp[2]:50 [ Ticks#0 ] : zp[2]:50 , 
Potential registers zp[2]:46 [ Ticks#1 ] : zp[2]:46 , 
Potential registers zp[2]:42 [ print_uint::w#0 ] : zp[2]:42 , 
Potential registers zp[1]:18 [ sum::tmp#1 ] : zp[1]:18 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:34 [ utoa::$11 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:35 [ utoa::buffer#4 ] : zp[2]:35 , 
Potential registers zp[1]:19 [ utoa::$10 ] : zp[1]:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:27 [ utoa::digit_value#0 ] : zp[2]:27 , 
Potential registers zp[2]:25 [ utoa_append::buffer#0 ] : zp[2]:25 , 
Potential registers zp[2]:5 [ utoa_append::sub#0 ] : zp[2]:5 , 
Potential registers zp[2]:20 [ utoa_append::return#0 ] : zp[2]:20 , 
Potential registers zp[1]:37 [ print_uchar::$0 ] : zp[1]:37 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:38 [ print_uchar::$2 ] : zp[1]:38 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [utoa_append] 25,005,500,003.5: zp[2]:2 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] 20,005,000,002.5: zp[1]:4 [ utoa_append::digit#2 utoa_append::digit#1 ] 3,333,500,000.5: zp[2]:5 [ utoa_append::sub#0 ] 2,000,002: zp[2]:20 [ utoa_append::return#0 ] 1,375,000.25: zp[2]:25 [ utoa_append::buffer#0 ] 
Uplift Scope [utoa] 3,787,146.79: zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ] 3,078,361.36: zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ] 2,285,716.57: zp[1]:17 [ utoa::digit#2 utoa::digit#1 ] 2,000,002: zp[1]:19 [ utoa::$10 ] 1,500,001.5: zp[1]:24 [ utoa::started#2 utoa::started#4 ] 600,000.6: zp[2]:27 [ utoa::digit_value#0 ] 20,002: zp[1]:34 [ utoa::$11 ] 20,002: zp[2]:35 [ utoa::buffer#4 ] 
Uplift Scope [print_char] 13,060,010: zp[1]:7 [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ] 
Uplift Scope [] 11,525,246.03: zp[2]:8 [ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ] 251,101.99: zp[2]:31 [ print_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ] 202: zp[2]:46 [ Ticks#1 ] 101: zp[2]:50 [ Ticks#0 ] 21.37: zp[2]:52 [ last_time ] 
Uplift Scope [sum] 2,500,002.5: zp[1]:16 [ sum::i#3 sum::i#2 ] 2,000,002: zp[1]:18 [ sum::tmp#1 ] 1,520,027.85: zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 ] 271,430: zp[2]:29 [ sum::p#5 sum::p#2 ] 237,502.38: zp[1]:33 [ sum::page#3 sum::page#2 ] 202: zp[2]:44 [ sum::return#2 ] 
Uplift Scope [print_str] 3,000,003: zp[2]:14 [ print_str::str#2 print_str::str#0 ] 
Uplift Scope [print_uchar] 20,002: zp[1]:37 [ print_uchar::$0 ] 20,002: zp[1]:38 [ print_uchar::$2 ] 9,505: zp[1]:39 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] 
Uplift Scope [print_uint_decimal] 1,102: zp[2]:40 [ print_uint_decimal::w#0 ] 
Uplift Scope [print_uint] 701: zp[2]:42 [ print_uint::w#0 ] 
Uplift Scope [main] 134.67: zp[2]:48 [ main::i#3 main::i#2 ] 
Uplift Scope [print_ln] 
Uplift Scope [RADIX] 
Uplift Scope [MOS6526_CIA] 
Uplift Scope [MOS6569_VICII] 
Uplift Scope [MOS6581_SID] 
Uplift Scope [start] 
Uplift Scope [end] 
Uplift Scope [__start] 

Uplifting [utoa_append] best 142966 combination zp[2]:2 [ 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]:5 [ utoa_append::sub#0 ] zp[2]:20 [ utoa_append::return#0 ] zp[2]:25 [ utoa_append::buffer#0 ] 
Uplifting [utoa] best 141860 combination zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ] zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ] zp[1]:17 [ utoa::digit#2 utoa::digit#1 ] reg byte a [ utoa::$10 ] reg byte x [ utoa::started#2 utoa::started#4 ] zp[2]:27 [ utoa::digit_value#0 ] reg byte x [ utoa::$11 ] zp[2]:35 [ utoa::buffer#4 ] 
Uplifting [print_char] best 141551 combination reg byte a [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ] 
Uplifting [] best 141551 combination zp[2]:8 [ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ] zp[2]:31 [ print_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ] zp[2]:46 [ Ticks#1 ] zp[2]:50 [ Ticks#0 ] zp[2]:52 [ last_time ] 
Uplifting [sum] best 124651 combination reg byte y [ sum::i#3 sum::i#2 ] reg byte a [ sum::tmp#1 ] zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 ] zp[2]:29 [ sum::p#5 sum::p#2 ] reg byte x [ sum::page#3 sum::page#2 ] zp[2]:44 [ sum::return#2 ] 
Uplifting [print_str] best 124651 combination zp[2]:14 [ print_str::str#2 print_str::str#0 ] 
Uplifting [print_uchar] best 124633 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] 
Uplifting [print_uint_decimal] best 124633 combination zp[2]:40 [ print_uint_decimal::w#0 ] 
Uplifting [print_uint] best 124633 combination zp[2]:42 [ print_uint::w#0 ] 
Uplifting [main] best 124633 combination zp[2]:48 [ main::i#3 main::i#2 ] 
Uplifting [print_ln] best 124633 combination 
Uplifting [RADIX] best 124633 combination 
Uplifting [MOS6526_CIA] best 124633 combination 
Uplifting [MOS6569_VICII] best 124633 combination 
Uplifting [MOS6581_SID] best 124633 combination 
Uplifting [start] best 124633 combination 
Uplifting [end] best 124633 combination 
Uplifting [__start] best 124633 combination 
Attempting to uplift remaining variables inzp[1]:17 [ utoa::digit#2 utoa::digit#1 ]
Uplifting [utoa] best 124633 combination zp[1]:17 [ utoa::digit#2 utoa::digit#1 ] 
Coalescing zero page register [ zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 ] ] with [ zp[2]:44 [ sum::return#2 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 ] ] with [ zp[2]:2 [ utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 ] ] with [ zp[2]:40 [ print_uint_decimal::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_uint_decimal::w#0 ] ] with [ zp[2]:20 [ utoa_append::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 ] ] with [ zp[2]:35 [ utoa::buffer#4 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 utoa::buffer#4 ] ] with [ zp[2]:25 [ utoa_append::buffer#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:46 [ Ticks#1 ] ] with [ zp[2]:42 [ print_uint::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:27 [ utoa::digit_value#0 ] ] with [ zp[2]:5 [ utoa_append::sub#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 sum::return#2 ] ] with [ zp[2]:12 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_uint_decimal::w#0 utoa_append::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:10 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 utoa::buffer#4 utoa_append::buffer#0 ] ] with [ zp[2]:29 [ sum::p#5 sum::p#2 ] ]
Coalescing zero page register [ zp[2]:50 [ Ticks#0 ] ] with [ zp[2]:48 [ main::i#3 main::i#2 ] ]
Coalescing zero page register [ zp[2]:46 [ Ticks#1 print_uint::w#0 ] ] with [ zp[2]:22 [ sum::s#4 sum::s#3 sum::s#2 sum::return#2 utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_uint_decimal::w#0 utoa_append::return#0 ] ]
Coalescing zero page register [ zp[2]:27 [ utoa::digit_value#0 utoa_append::sub#0 ] ] with [ zp[2]:14 [ print_str::str#2 print_str::str#0 ] ]
Allocated (was zp[2]:46) zp[2]:2 [ Ticks#1 print_uint::w#0 sum::s#4 sum::s#3 sum::s#2 sum::return#2 utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_uint_decimal::w#0 utoa_append::return#0 ]
Allocated (was zp[2]:27) zp[2]:4 [ utoa::digit_value#0 utoa_append::sub#0 print_str::str#2 print_str::str#0 ]
Allocated (was zp[2]:8) zp[2]:6 [ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ]
Allocated (was zp[2]:10) zp[2]:8 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 utoa::buffer#4 utoa_append::buffer#0 sum::p#5 sum::p#2 ]
Allocated (was zp[1]:17) zp[1]:10 [ utoa::digit#2 utoa::digit#1 ]
Allocated (was zp[2]:31) zp[2]:11 [ print_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ]
Allocated (was zp[2]:50) zp[2]:13 [ Ticks#0 main::i#3 main::i#2 ]
Allocated (was zp[2]:52) zp[2]:15 [ last_time ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
/// @file
/// A lightweight library for printing on the C64.
///
/// Printing with this library is done by calling print_ function for each element
  // Upstart
  // Commodore 64 PRG executable file
.file [name="romsum-kc.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
  // Global Constants & labels
  .label rom = $e000
  .label print_screen = $400
  .label last_time = $f
  .label print_char_cursor = 6
  .label print_line_cursor = $b
  .label Ticks = $d
  .label Ticks_1 = 2
.segment Code
  // __start
__start: {
    jmp __init1
    // __start::__init1
  __init1:
    // [1] last_time = 0 -- vwuz1=vwuc1 
    lda #<0
    sta.z last_time
    lda #>0
    sta.z last_time+1
    // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
  __b1_from___init1:
    jmp __b1
    // __start::@1
  __b1:
    // [3] call main
    // [5] phi from __start::@1 to main [phi:__start::@1->main]
  main_from___b1:
    jsr main
    jmp __breturn
    // __start::@return
  __breturn:
    // [4] return 
    rts
}
  // main
main: {
    .label i = $d
    // [6] call start
    jsr start
    // [7] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [7] phi print_line_cursor#22 = print_screen#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor
    lda #>print_screen
    sta.z print_line_cursor+1
    // [7] phi print_char_cursor#54 = print_screen#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [7] phi main::i#3 = 0 [phi:main->main::@1#2] -- vwuz1=vbuc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    jmp __b1
    // main::@1
  __b1:
    // [8] if(main::i#3<6) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    bne !+
    lda.z i
    cmp #6
    bcc __b2_from___b1
  !:
    // [9] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
  __b3_from___b1:
    jmp __b3
    // main::@3
  __b3:
    // [10] call end
    jsr end
    jmp __breturn
    // main::@return
  __breturn:
    // [11] return 
    rts
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [13] call sum
    // [32] phi from main::@2 to sum [phi:main::@2->sum]
  sum_from___b2:
    jsr sum
    // [14] sum::return#2 = sum::s#3
    jmp __b4
    // main::@4
  __b4:
    // [15] print_uint_decimal::w#0 = sum::return#2
    // [16] call print_uint_decimal
    jsr print_uint_decimal
    // [17] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [18] call print_ln
    // [48] phi from main::@5 to print_ln [phi:main::@5->print_ln]
  print_ln_from___b5:
    // [48] phi print_char_cursor#49 = print_char_cursor#1 [phi:main::@5->print_ln#0] -- register_copy 
    jsr print_ln
    jmp __b6
    // main::@6
  __b6:
    // [19] main::i#2 = ++ main::i#3 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [20] print_char_cursor#73 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [7] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [7] phi print_line_cursor#22 = print_line_cursor#0 [phi:main::@6->main::@1#0] -- register_copy 
    // [7] phi print_char_cursor#54 = print_char_cursor#73 [phi:main::@6->main::@1#1] -- register_copy 
    // [7] phi main::i#3 = main::i#2 [phi:main::@6->main::@1#2] -- register_copy 
    jmp __b1
}
  // start
start: {
    .label LAST_TIME = last_time
    // asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1  }
    jsr $ffde
    sta LAST_TIME
    stx LAST_TIME+1
    jmp __breturn
    // start::@return
  __breturn:
    // [22] return 
    rts
}
  // end
end: {
    // [23] Ticks#0 = last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // [24] call start
    jsr start
    jmp __b1
    // end::@1
  __b1:
    // [25] last_time = last_time - Ticks#0 -- 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
    // [26] Ticks#1 = last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // [27] print_uint::w#0 = Ticks#1
    // [28] call print_uint
    jsr print_uint
    // [29] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
  __b2_from___b1:
    jmp __b2
    // end::@2
  __b2:
    // [30] call print_ln
    // [48] phi from end::@2 to print_ln [phi:end::@2->print_ln]
  print_ln_from___b2:
    // [48] phi print_char_cursor#49 = print_char_cursor#12 [phi:end::@2->print_ln#0] -- register_copy 
    jsr print_ln
    jmp __breturn
    // end::@return
  __breturn:
    // [31] return 
    rts
}
  // sum
sum: {
    .label s = 2
    .label p = 8
    .label return = 2
    // [33] phi from sum to sum::@1 [phi:sum->sum::@1]
  __b1_from_sum:
    // [33] phi sum::p#5 = rom [phi:sum->sum::@1#0] -- pbuz1=pbuc1 
    lda #<rom
    sta.z p
    lda #>rom
    sta.z p+1
    // [33] phi sum::s#3 = 0 [phi:sum->sum::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z s
    lda #>0
    sta.z s+1
    // [33] phi sum::page#3 = 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:
    // [34] if(sum::page#3<$20) goto sum::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$20
    bcc __b2_from___b1
    jmp __breturn
    // sum::@return
  __breturn:
    // [35] return 
    rts
    // [36] phi from sum::@1 to sum::@2 [phi:sum::@1->sum::@2]
  __b2_from___b1:
    // [36] phi sum::s#4 = sum::s#3 [phi:sum::@1->sum::@2#0] -- register_copy 
    // [36] phi sum::i#3 = 0 [phi:sum::@1->sum::@2#1] -- vbuyy=vbuc1 
    ldy #0
    jmp __b2
    // [36] phi from sum::@2 to sum::@2 [phi:sum::@2->sum::@2]
  __b2_from___b2:
    // [36] phi sum::s#4 = sum::s#2 [phi:sum::@2->sum::@2#0] -- register_copy 
    // [36] phi sum::i#3 = sum::i#2 [phi:sum::@2->sum::@2#1] -- register_copy 
    jmp __b2
    // sum::@2
  __b2:
    // [37] sum::tmp#1 = sum::p#5[sum::i#3] -- vbuaa=pbuz1_derefidx_vbuyy 
    lda (p),y
    // [38] sum::s#2 = sum::s#4 + sum::tmp#1 -- vwuz1=vwuz1_plus_vbuaa 
    clc
    adc.z s
    sta.z s
    bcc !+
    inc.z s+1
  !:
    // [39] sum::i#2 = ++ sum::i#3 -- vbuyy=_inc_vbuyy 
    iny
    // [40] if(0!=sum::i#2) goto sum::@2 -- 0_neq_vbuyy_then_la1 
    cpy #0
    bne __b2_from___b2
    jmp __b3
    // sum::@3
  __b3:
    // [41] sum::p#2 = sum::p#5 + $100 -- pbuz1=pbuz1_plus_vwuc1 
    lda.z p
    clc
    adc #<$100
    sta.z p
    lda.z p+1
    adc #>$100
    sta.z p+1
    // [42] sum::page#2 = ++ sum::page#3 -- vbuxx=_inc_vbuxx 
    inx
    // [33] phi from sum::@3 to sum::@1 [phi:sum::@3->sum::@1]
  __b1_from___b3:
    // [33] phi sum::p#5 = sum::p#2 [phi:sum::@3->sum::@1#0] -- register_copy 
    // [33] phi sum::s#3 = sum::s#2 [phi:sum::@3->sum::@1#1] -- register_copy 
    // [33] phi sum::page#3 = sum::page#2 [phi:sum::@3->sum::@1#2] -- register_copy 
    jmp __b1
}
  // print_uint_decimal
// Print a unsigned int as DECIMAL
// void print_uint_decimal(__zp(2) unsigned int w)
print_uint_decimal: {
    .label w = 2
    // [43] utoa::value#0 = print_uint_decimal::w#0
    // [44] call utoa
    // [58] phi from print_uint_decimal to utoa [phi:print_uint_decimal->utoa]
  utoa_from_print_uint_decimal:
    jsr utoa
    // [45] phi from print_uint_decimal to print_uint_decimal::@1 [phi:print_uint_decimal->print_uint_decimal::@1]
  __b1_from_print_uint_decimal:
    jmp __b1
    // print_uint_decimal::@1
  __b1:
    // [46] call print_str
    // [79] phi from print_uint_decimal::@1 to print_str [phi:print_uint_decimal::@1->print_str]
  print_str_from___b1:
    jsr print_str
    jmp __breturn
    // print_uint_decimal::@return
  __breturn:
    // [47] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [49] 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:
    // [49] phi print_line_cursor#10 = print_line_cursor#22 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [50] print_line_cursor#0 = print_line_cursor#10 + $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
  !:
    // [51] if(print_line_cursor#0<print_char_cursor#49) 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:
    // [52] return 
    rts
}
  // print_uint
// Print a unsigned int as HEX
// void print_uint(__zp(2) unsigned int w)
print_uint: {
    .label w = 2
    // [53] print_uchar::b#0 = byte1  print_uint::w#0 -- vbuxx=_byte1_vwuz1 
    ldx.z w+1
    // [54] call print_uchar
    // [86] phi from print_uint to print_uchar [phi:print_uint->print_uchar]
  print_uchar_from_print_uint:
    // [86] phi print_char_cursor#52 = print_char_cursor#54 [phi:print_uint->print_uchar#0] -- register_copy 
    // [86] phi print_uchar::b#2 = print_uchar::b#0 [phi:print_uint->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __b1
    // print_uint::@1
  __b1:
    // [55] print_uchar::b#1 = byte0  print_uint::w#0 -- vbuxx=_byte0_vwuz1 
    ldx.z w
    // [56] call print_uchar
    // [86] phi from print_uint::@1 to print_uchar [phi:print_uint::@1->print_uchar]
  print_uchar_from___b1:
    // [86] phi print_char_cursor#52 = print_char_cursor#12 [phi:print_uint::@1->print_uchar#0] -- register_copy 
    // [86] phi print_uchar::b#2 = print_uchar::b#1 [phi:print_uint::@1->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __breturn
    // print_uint::@return
  __breturn:
    // [57] return 
    rts
}
  // 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)
// void utoa(__zp(2) unsigned int value, __zp(8) char *buffer, char radix)
utoa: {
    .const max_digits = 5
    .label value = 2
    .label digit_value = 4
    .label buffer = 8
    .label digit = $a
    // [59] phi from utoa to utoa::@1 [phi:utoa->utoa::@1]
  __b1_from_utoa:
    // [59] phi utoa::buffer#11 = decimal_digits [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z buffer
    lda #>decimal_digits
    sta.z buffer+1
    // [59] phi utoa::started#2 = 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [59] phi utoa::value#2 = utoa::value#0 [phi:utoa->utoa::@1#2] -- register_copy 
    // [59] phi utoa::digit#2 = 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z digit
    jmp __b1
    // utoa::@1
  __b1:
    // [60] if(utoa::digit#2<utoa::max_digits#1-1) goto utoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    jmp __b3
    // utoa::@3
  __b3:
    // [61] utoa::$11 = (char)utoa::value#2 -- vbuxx=_byte_vwuz1 
    ldx.z value
    // [62] *utoa::buffer#11 = DIGITS[utoa::$11] -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    // [63] utoa::buffer#4 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [64] *utoa::buffer#4 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (buffer),y
    jmp __breturn
    // utoa::@return
  __breturn:
    // [65] return 
    rts
    // utoa::@2
  __b2:
    // [66] utoa::$10 = utoa::digit#2 << 1 -- vbuaa=vbuz1_rol_1 
    lda.z digit
    asl
    // [67] utoa::digit_value#0 = RADIX_DECIMAL_VALUES[utoa::$10] -- 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
    // [68] if(0!=utoa::started#2) goto utoa::@5 -- 0_neq_vbuxx_then_la1 
    cpx #0
    bne __b5
    jmp __b7
    // utoa::@7
  __b7:
    // [69] if(utoa::value#2>=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
    // [70] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4]
  __b4_from___b7:
    // [70] phi utoa::buffer#14 = utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy 
    // [70] phi utoa::started#4 = utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy 
    // [70] phi utoa::value#6 = utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy 
    jmp __b4
    // utoa::@4
  __b4:
    // [71] utoa::digit#1 = ++ utoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [59] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1]
  __b1_from___b4:
    // [59] phi utoa::buffer#11 = utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy 
    // [59] phi utoa::started#2 = utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy 
    // [59] phi utoa::value#2 = utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy 
    // [59] phi utoa::digit#2 = utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy 
    jmp __b1
    // utoa::@5
  __b5:
    // [72] utoa_append::buffer#0 = utoa::buffer#11
    // [73] utoa_append::value#0 = utoa::value#2
    // [74] utoa_append::sub#0 = utoa::digit_value#0
    // [75] call utoa_append
    // [94] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append]
  utoa_append_from___b5:
    jsr utoa_append
    // [76] utoa_append::return#0 = utoa_append::value#2
    jmp __b6
    // utoa::@6
  __b6:
    // [77] utoa::value#1 = utoa_append::return#0
    // [78] utoa::buffer#5 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [70] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4]
  __b4_from___b6:
    // [70] phi utoa::buffer#14 = utoa::buffer#5 [phi:utoa::@6->utoa::@4#0] -- register_copy 
    // [70] phi utoa::started#4 = 1 [phi:utoa::@6->utoa::@4#1] -- vbuxx=vbuc1 
    ldx #1
    // [70] phi utoa::value#6 = utoa::value#1 [phi:utoa::@6->utoa::@4#2] -- register_copy 
    jmp __b4
}
  // print_str
// Print a zero-terminated string
// void print_str(__zp(4) char *str)
print_str: {
    .label str = 4
    // [80] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
  __b1_from_print_str:
    // [80] phi print_char_cursor#1 = print_char_cursor#54 [phi:print_str->print_str::@1#0] -- register_copy 
    // [80] phi print_str::str#2 = 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:
    // [81] if(0!=*print_str::str#2) goto print_str::@2 -- 0_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    jmp __breturn
    // print_str::@return
  __breturn:
    // [82] return 
    rts
    // print_str::@2
  __b2:
    // [83] print_char::ch#0 = *print_str::str#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (str),y
    // [84] call print_char
    // [101] phi from print_str::@2 to print_char [phi:print_str::@2->print_char]
  print_char_from___b2:
    // [101] phi print_char_cursor#36 = print_char_cursor#1 [phi:print_str::@2->print_char#0] -- register_copy 
    // [101] phi print_char::ch#3 = print_char::ch#0 [phi:print_str::@2->print_char#1] -- register_copy 
    jsr print_char
    jmp __b3
    // print_str::@3
  __b3:
    // [85] print_str::str#0 = ++ print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [80] phi from print_str::@3 to print_str::@1 [phi:print_str::@3->print_str::@1]
  __b1_from___b3:
    // [80] phi print_char_cursor#1 = print_char_cursor#12 [phi:print_str::@3->print_str::@1#0] -- register_copy 
    // [80] phi print_str::str#2 = print_str::str#0 [phi:print_str::@3->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // [87] print_uchar::$0 = print_uchar::b#2 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [88] print_char::ch#1 = DIGITS[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    // [89] call print_char
  // Table of hexadecimal digits
    // [101] phi from print_uchar to print_char [phi:print_uchar->print_char]
  print_char_from_print_uchar:
    // [101] phi print_char_cursor#36 = print_char_cursor#52 [phi:print_uchar->print_char#0] -- register_copy 
    // [101] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_uchar::@1
  __b1:
    // [90] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [91] print_char::ch#2 = DIGITS[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    // [92] call print_char
    // [101] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
  print_char_from___b1:
    // [101] phi print_char_cursor#36 = print_char_cursor#12 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [101] phi print_char::ch#3 = print_char::ch#2 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_uchar::@return
  __breturn:
    // [93] return 
    rts
}
  // 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.
// __zp(2) unsigned int utoa_append(__zp(8) char *buffer, __zp(2) unsigned int value, __zp(4) unsigned int sub)
utoa_append: {
    .label buffer = 8
    .label value = 2
    .label sub = 4
    .label return = 2
    // [95] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1]
  __b1_from_utoa_append:
    // [95] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [95] phi utoa_append::value#2 = utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy 
    jmp __b1
    // utoa_append::@1
  __b1:
    // [96] if(utoa_append::value#2>=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:
    // [97] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    jmp __breturn
    // utoa_append::@return
  __breturn:
    // [98] return 
    rts
    // utoa_append::@2
  __b2:
    // [99] utoa_append::digit#1 = ++ utoa_append::digit#2 -- vbuxx=_inc_vbuxx 
    inx
    // [100] utoa_append::value#1 = utoa_append::value#2 - 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
    // [95] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1]
  __b1_from___b2:
    // [95] phi utoa_append::digit#2 = utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy 
    // [95] phi utoa_append::value#2 = utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy 
    jmp __b1
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // [102] *print_char_cursor#36 = print_char::ch#3 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [103] print_char_cursor#12 = ++ print_char_cursor#36 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [104] return 
    rts
}
  // File Data
.segment 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 unsigned int
  decimal_digits: .fill 6, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
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 __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
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 __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 __breturn
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda #>0
Removing instruction lda #>0
Replacing instruction ldx #0 with TAX
Replacing instruction lda #0 with TXA
Replacing instruction ldy #0 with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b2_from___b1 with __b2
Replacing label __b2_from___b2 with __b2
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Removing instruction __b1_from___init1:
Removing instruction main_from___b1:
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 __b2_from___b1:
Removing instruction print_ln_from___b2:
Removing instruction __b2_from___b2:
Removing instruction __b1_from_print_uint_decimal:
Removing instruction print_str_from___b1:
Removing instruction __b1_from_print_ln:
Removing instruction __b1_from___b1:
Removing instruction __b4_from___b7:
Removing instruction utoa_append_from___b5:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
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 __b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __b1_from_sum:
Removing instruction __breturn:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction utoa_from_print_uint_decimal:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction print_uchar_from_print_uint:
Removing instruction __b1:
Removing instruction print_uchar_from___b1:
Removing instruction __breturn:
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_print_str:
Removing instruction __breturn:
Removing instruction print_char_from___b2:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction print_char_from_print_uchar:
Removing instruction __b1:
Removing instruction print_char_from___b1:
Removing instruction __breturn:
Removing instruction __b1_from_utoa_append:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Relabelling long label __b2_from___b1 to __b3
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp __b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda.z digit_value+1
Succesful ASM optimization Pass5UnnecesaryLoadElimination

FINAL SYMBOL TABLE
__constant char DIGITS[] = "0123456789abcdef"z
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
__constant unsigned int RADIX_DECIMAL_VALUES[] = { $2710, $3e8, $64, $a }
unsigned int Ticks
unsigned int Ticks#0 // Ticks zp[2]:13 101.0
unsigned int Ticks#1 // Ticks_1 zp[2]:2 202.0
void __start()
__constant char decimal_digits[6] = { fill( 6, 0) }
void end()
__loadstore volatile unsigned int last_time // zp[2]:15 21.368421052631582
int main()
unsigned int main::i
unsigned int main::i#2 // i zp[2]:13 101.0
unsigned int main::i#3 // i zp[2]:13 33.666666666666664
int main::return
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // reg byte a 2000002.0
char print_char::ch#1 // reg byte a 20002.0
char print_char::ch#2 // reg byte a 20002.0
char print_char::ch#3 // reg byte a 1.1020004E7
char *print_char_cursor
char *print_char_cursor#1 // print_char_cursor zp[2]:6 251263.0
char *print_char_cursor#12 // print_char_cursor zp[2]:6 734073.6666666666
char *print_char_cursor#36 // print_char_cursor zp[2]:6 1.05100025E7
char *print_char_cursor#49 // print_char_cursor zp[2]:6 25050.75
char *print_char_cursor#52 // print_char_cursor zp[2]:6 4001.0
char *print_char_cursor#54 // print_char_cursor zp[2]:6 653.1176470588235
char *print_char_cursor#73 // print_char_cursor zp[2]:6 202.0
char *print_line_cursor
char *print_line_cursor#0 // print_line_cursor zp[2]:11 50034.16666666666
char *print_line_cursor#10 // print_line_cursor zp[2]:11 201003.0
char *print_line_cursor#22 // print_line_cursor zp[2]:11 64.82352941176471
void print_ln()
char *print_screen
__constant char *print_screen#0 = (char *) 1024 // print_screen
void print_str(char *str)
char *print_str::str
char *print_str::str#0 // str zp[2]:4 2000002.0
char *print_str::str#2 // str zp[2]:4 1000001.0
void print_uchar(char b)
char print_uchar::$0 // reg byte a 20002.0
char print_uchar::$2 // reg byte x 20002.0
char print_uchar::b
char print_uchar::b#0 // reg byte x 2002.0
char print_uchar::b#1 // reg byte x 2002.0
char print_uchar::b#2 // reg byte x 5501.0
void print_uint(unsigned int w)
unsigned int print_uint::w
unsigned int print_uint::w#0 // w zp[2]:2 701.0
void print_uint_decimal(unsigned int w)
unsigned int print_uint_decimal::w
unsigned int print_uint_decimal::w#0 // w zp[2]:2 1102.0
__constant char * const rom = (char *) 57344
void start()
__constant unsigned int * const start::LAST_TIME = &last_time
unsigned int sum()
char sum::i
char sum::i#2 // reg byte y 1500001.5
char sum::i#3 // reg byte y 1000001.0
char *sum::p
char *sum::p#2 // p zp[2]:8 100001.0
char *sum::p#5 // p zp[2]:8 171428.99999999997
char sum::page
char sum::page#2 // reg byte x 200002.0
char sum::page#3 // reg byte x 37500.375
unsigned int sum::return
unsigned int sum::return#2 // return zp[2]:2 202.0
unsigned int sum::s
unsigned int sum::s#2 // s zp[2]:2 420000.60000000003
unsigned int sum::s#3 // s zp[2]:2 50025.75
unsigned int sum::s#4 // s zp[2]:2 1050001.5
char sum::tmp
char sum::tmp#1 // reg byte a 2000002.0
void utoa(unsigned int value , char *buffer , char radix)
char utoa::$10 // reg byte a 2000002.0
char utoa::$11 // reg byte x 20002.0
char *utoa::buffer
char *utoa::buffer#11 // buffer zp[2]:8 287143.2857142857
char *utoa::buffer#14 // buffer zp[2]:8 1500001.5
char *utoa::buffer#4 // buffer zp[2]:8 20002.0
char *utoa::buffer#5 // buffer zp[2]:8 2000002.0
char utoa::digit
char utoa::digit#1 // digit zp[1]:10 2000002.0
char utoa::digit#2 // digit zp[1]:10 285714.5714285714
unsigned int utoa::digit_value
unsigned int utoa::digit_value#0 // digit_value zp[2]:4 600000.6000000001
unsigned int *utoa::digit_values
char utoa::max_digits
__constant char utoa::max_digits#1 = 5 // max_digits
char utoa::radix
char utoa::started
char utoa::started#2 // reg byte x 500000.5
char utoa::started#4 // reg byte x 1000001.0
unsigned int utoa::value
unsigned int utoa::value#0 // value zp[2]:2 5501.0
unsigned int utoa::value#1 // value zp[2]:2 1000001.0
unsigned int utoa::value#2 // value zp[2]:2 572857.857142857
unsigned int utoa::value#6 // value zp[2]:2 1500001.5
unsigned int utoa_append(char *buffer , unsigned int value , unsigned int sub)
char *utoa_append::buffer
char *utoa_append::buffer#0 // buffer zp[2]:8 1375000.25
char utoa_append::digit
char utoa_append::digit#1 // reg byte x 1.0000000001E10
char utoa_append::digit#2 // reg byte x 1.00050000015E10
unsigned int utoa_append::return
unsigned int utoa_append::return#0 // return zp[2]:2 2000002.0
unsigned int utoa_append::sub
unsigned int utoa_append::sub#0 // sub zp[2]:4 3.3335000005E9
unsigned int utoa_append::value
unsigned int utoa_append::value#0 // value zp[2]:2 3666667.333333333
unsigned int utoa_append::value#1 // value zp[2]:2 2.0000000002E10
unsigned int utoa_append::value#2 // value zp[2]:2 5.001833334166666E9

reg byte x [ sum::page#3 sum::page#2 ]
reg byte y [ sum::i#3 sum::i#2 ]
zp[2]:11 [ print_line_cursor#10 print_line_cursor#22 print_line_cursor#0 ]
zp[1]:10 [ utoa::digit#2 utoa::digit#1 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
zp[2]:8 [ utoa::buffer#11 utoa::buffer#14 utoa::buffer#5 utoa::buffer#4 utoa_append::buffer#0 sum::p#5 sum::p#2 ]
reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
reg byte a [ print_char::ch#3 print_char::ch#0 print_char::ch#1 print_char::ch#2 ]
zp[2]:6 [ print_char_cursor#36 print_char_cursor#52 print_char_cursor#49 print_char_cursor#12 print_char_cursor#1 print_char_cursor#54 print_char_cursor#73 ]
zp[2]:15 [ last_time ]
zp[2]:13 [ Ticks#0 main::i#3 main::i#2 ]
zp[2]:2 [ Ticks#1 print_uint::w#0 sum::s#4 sum::s#3 sum::s#2 sum::return#2 utoa::value#2 utoa::value#6 utoa::value#0 utoa::value#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 print_uint_decimal::w#0 utoa_append::return#0 ]
reg byte a [ sum::tmp#1 ]
reg byte x [ utoa::$11 ]
reg byte a [ utoa::$10 ]
zp[2]:4 [ utoa::digit_value#0 utoa_append::sub#0 print_str::str#2 print_str::str#0 ]
reg byte a [ print_uchar::$0 ]
reg byte x [ print_uchar::$2 ]


FINAL ASSEMBLER
Score: 99334

  // File Comments
/// @file
/// A lightweight library for printing on the C64.
///
/// Printing with this library is done by calling print_ function for each element
  // Upstart
  // Commodore 64 PRG executable file
.file [name="romsum-kc.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
  // Global Constants & labels
  .label rom = $e000
  .label print_screen = $400
  .label last_time = $f
  .label print_char_cursor = 6
  .label print_line_cursor = $b
  .label Ticks = $d
  .label Ticks_1 = 2
.segment Code
  // __start
__start: {
    // __start::__init1
    // unsigned int last_time
    // [1] last_time = 0 -- vwuz1=vwuc1 
    lda #<0
    sta.z last_time
    sta.z last_time+1
    // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
    // __start::@1
    // [3] call main
    // [5] phi from __start::@1 to main [phi:__start::@1->main]
    jsr main
    // __start::@return
    // [4] return 
    rts
}
  // main
main: {
    .label i = $d
    // start()
    // [6] call start
    jsr start
    // [7] phi from main to main::@1 [phi:main->main::@1]
    // [7] phi print_line_cursor#22 = print_screen#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor
    lda #>print_screen
    sta.z print_line_cursor+1
    // [7] phi print_char_cursor#54 = print_screen#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [7] phi main::i#3 = 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++)
    // [8] if(main::i#3<6) goto main::@2 -- vwuz1_lt_vbuc1_then_la1 
    lda.z i+1
    bne !+
    lda.z i
    cmp #6
    bcc __b2
  !:
    // [9] phi from main::@1 to main::@3 [phi:main::@1->main::@3]
    // main::@3
    // end()
    // [10] call end
    jsr end
    // main::@return
    // }
    // [11] return 
    rts
    // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
  __b2:
    // sum()
    // [13] call sum
    // [32] phi from main::@2 to sum [phi:main::@2->sum]
    jsr sum
    // sum()
    // [14] sum::return#2 = sum::s#3
    // main::@4
    // print_uint_decimal(sum())
    // [15] print_uint_decimal::w#0 = sum::return#2
    // [16] call print_uint_decimal
    jsr print_uint_decimal
    // [17] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // print_ln()
    // [18] call print_ln
    // [48] phi from main::@5 to print_ln [phi:main::@5->print_ln]
    // [48] phi print_char_cursor#49 = print_char_cursor#1 [phi:main::@5->print_ln#0] -- register_copy 
    jsr print_ln
    // main::@6
    // for(i=0;i<6;i++)
    // [19] main::i#2 = ++ main::i#3 -- vwuz1=_inc_vwuz1 
    inc.z i
    bne !+
    inc.z i+1
  !:
    // [20] print_char_cursor#73 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [7] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [7] phi print_line_cursor#22 = print_line_cursor#0 [phi:main::@6->main::@1#0] -- register_copy 
    // [7] phi print_char_cursor#54 = print_char_cursor#73 [phi:main::@6->main::@1#1] -- register_copy 
    // [7] phi main::i#3 = main::i#2 [phi:main::@6->main::@1#2] -- register_copy 
    jmp __b1
}
  // 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
    // start::@return
    // }
    // [22] return 
    rts
}
  // end
end: {
    // Ticks = last_time
    // [23] Ticks#0 = last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks
    lda.z last_time+1
    sta.z Ticks+1
    // start()
    // [24] call start
    jsr start
    // end::@1
    // last_time -= Ticks
    // [25] last_time = last_time - Ticks#0 -- 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
    // [26] Ticks#1 = last_time -- vwuz1=vwuz2 
    lda.z last_time
    sta.z Ticks_1
    lda.z last_time+1
    sta.z Ticks_1+1
    // print_uint(Ticks)
    // [27] print_uint::w#0 = Ticks#1
    // [28] call print_uint
    jsr print_uint
    // [29] phi from end::@1 to end::@2 [phi:end::@1->end::@2]
    // end::@2
    // print_ln()
    // [30] call print_ln
    // [48] phi from end::@2 to print_ln [phi:end::@2->print_ln]
    // [48] phi print_char_cursor#49 = print_char_cursor#12 [phi:end::@2->print_ln#0] -- register_copy 
    jsr print_ln
    // end::@return
    // }
    // [31] return 
    rts
}
  // sum
sum: {
    .label s = 2
    .label p = 8
    .label return = 2
    // [33] phi from sum to sum::@1 [phi:sum->sum::@1]
    // [33] phi sum::p#5 = rom [phi:sum->sum::@1#0] -- pbuz1=pbuc1 
    lda #<rom
    sta.z p
    lda #>rom
    sta.z p+1
    // [33] phi sum::s#3 = 0 [phi:sum->sum::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta.z s
    sta.z s+1
    // [33] phi sum::page#3 = 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++)
    // [34] if(sum::page#3<$20) goto sum::@2 -- vbuxx_lt_vbuc1_then_la1 
    cpx #$20
    bcc __b3
    // sum::@return
    // }
    // [35] return 
    rts
    // [36] phi from sum::@1 to sum::@2 [phi:sum::@1->sum::@2]
  __b3:
    // [36] phi sum::s#4 = sum::s#3 [phi:sum::@1->sum::@2#0] -- register_copy 
    // [36] phi sum::i#3 = 0 [phi:sum::@1->sum::@2#1] -- vbuyy=vbuc1 
    ldy #0
    // [36] phi from sum::@2 to sum::@2 [phi:sum::@2->sum::@2]
    // [36] phi sum::s#4 = sum::s#2 [phi:sum::@2->sum::@2#0] -- register_copy 
    // [36] phi sum::i#3 = sum::i#2 [phi:sum::@2->sum::@2#1] -- register_copy 
    // sum::@2
  __b2:
    // tmp = p[i]
    // [37] sum::tmp#1 = sum::p#5[sum::i#3] -- vbuaa=pbuz1_derefidx_vbuyy 
    lda (p),y
    // s += tmp
    // [38] sum::s#2 = sum::s#4 + sum::tmp#1 -- vwuz1=vwuz1_plus_vbuaa 
    clc
    adc.z s
    sta.z s
    bcc !+
    inc.z s+1
  !:
    // i++;
    // [39] sum::i#2 = ++ sum::i#3 -- vbuyy=_inc_vbuyy 
    iny
    // while (i)
    // [40] if(0!=sum::i#2) goto sum::@2 -- 0_neq_vbuyy_then_la1 
    cpy #0
    bne __b2
    // sum::@3
    // p += 0x100
    // [41] sum::p#2 = sum::p#5 + $100 -- pbuz1=pbuz1_plus_vwuc1 
    lda.z p
    clc
    adc #<$100
    sta.z p
    lda.z p+1
    adc #>$100
    sta.z p+1
    // for (page = 0; page < 0x20; page++)
    // [42] sum::page#2 = ++ sum::page#3 -- vbuxx=_inc_vbuxx 
    inx
    // [33] phi from sum::@3 to sum::@1 [phi:sum::@3->sum::@1]
    // [33] phi sum::p#5 = sum::p#2 [phi:sum::@3->sum::@1#0] -- register_copy 
    // [33] phi sum::s#3 = sum::s#2 [phi:sum::@3->sum::@1#1] -- register_copy 
    // [33] phi sum::page#3 = sum::page#2 [phi:sum::@3->sum::@1#2] -- register_copy 
    jmp __b1
}
  // print_uint_decimal
// Print a unsigned int as DECIMAL
// void print_uint_decimal(__zp(2) unsigned int w)
print_uint_decimal: {
    .label w = 2
    // utoa(w, decimal_digits, DECIMAL)
    // [43] utoa::value#0 = print_uint_decimal::w#0
    // [44] call utoa
    // [58] phi from print_uint_decimal to utoa [phi:print_uint_decimal->utoa]
    jsr utoa
    // [45] phi from print_uint_decimal to print_uint_decimal::@1 [phi:print_uint_decimal->print_uint_decimal::@1]
    // print_uint_decimal::@1
    // print_str(decimal_digits)
    // [46] call print_str
    // [79] phi from print_uint_decimal::@1 to print_str [phi:print_uint_decimal::@1->print_str]
    jsr print_str
    // print_uint_decimal::@return
    // }
    // [47] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [49] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
    // [49] phi print_line_cursor#10 = print_line_cursor#22 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  __b1:
    // print_line_cursor + $28
    // [50] print_line_cursor#0 = print_line_cursor#10 + $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)
    // [51] if(print_line_cursor#0<print_char_cursor#49) 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
    // }
    // [52] return 
    rts
}
  // print_uint
// Print a unsigned int as HEX
// void print_uint(__zp(2) unsigned int w)
print_uint: {
    .label w = 2
    // print_uchar(BYTE1(w))
    // [53] print_uchar::b#0 = byte1  print_uint::w#0 -- vbuxx=_byte1_vwuz1 
    ldx.z w+1
    // [54] call print_uchar
    // [86] phi from print_uint to print_uchar [phi:print_uint->print_uchar]
    // [86] phi print_char_cursor#52 = print_char_cursor#54 [phi:print_uint->print_uchar#0] -- register_copy 
    // [86] phi print_uchar::b#2 = print_uchar::b#0 [phi:print_uint->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_uint::@1
    // print_uchar(BYTE0(w))
    // [55] print_uchar::b#1 = byte0  print_uint::w#0 -- vbuxx=_byte0_vwuz1 
    ldx.z w
    // [56] call print_uchar
    // [86] phi from print_uint::@1 to print_uchar [phi:print_uint::@1->print_uchar]
    // [86] phi print_char_cursor#52 = print_char_cursor#12 [phi:print_uint::@1->print_uchar#0] -- register_copy 
    // [86] phi print_uchar::b#2 = print_uchar::b#1 [phi:print_uint::@1->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_uint::@return
    // }
    // [57] return 
    rts
}
  // 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)
// void utoa(__zp(2) unsigned int value, __zp(8) char *buffer, char radix)
utoa: {
    .const max_digits = 5
    .label value = 2
    .label digit_value = 4
    .label buffer = 8
    .label digit = $a
    // [59] phi from utoa to utoa::@1 [phi:utoa->utoa::@1]
    // [59] phi utoa::buffer#11 = decimal_digits [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits
    sta.z buffer
    lda #>decimal_digits
    sta.z buffer+1
    // [59] phi utoa::started#2 = 0 [phi:utoa->utoa::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [59] phi utoa::value#2 = utoa::value#0 [phi:utoa->utoa::@1#2] -- register_copy 
    // [59] phi utoa::digit#2 = 0 [phi:utoa->utoa::@1#3] -- vbuz1=vbuc1 
    txa
    sta.z digit
    // utoa::@1
  __b1:
    // for( char digit=0; digit<max_digits-1; digit++ )
    // [60] if(utoa::digit#2<utoa::max_digits#1-1) goto utoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    // utoa::@3
    // *buffer++ = DIGITS[(char)value]
    // [61] utoa::$11 = (char)utoa::value#2 -- vbuxx=_byte_vwuz1 
    ldx.z value
    // [62] *utoa::buffer#11 = DIGITS[utoa::$11] -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    // *buffer++ = DIGITS[(char)value];
    // [63] utoa::buffer#4 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // *buffer = 0
    // [64] *utoa::buffer#4 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (buffer),y
    // utoa::@return
    // }
    // [65] return 
    rts
    // utoa::@2
  __b2:
    // unsigned int digit_value = digit_values[digit]
    // [66] utoa::$10 = utoa::digit#2 << 1 -- vbuaa=vbuz1_rol_1 
    lda.z digit
    asl
    // [67] utoa::digit_value#0 = RADIX_DECIMAL_VALUES[utoa::$10] -- 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)
    // [68] if(0!=utoa::started#2) goto utoa::@5 -- 0_neq_vbuxx_then_la1 
    cpx #0
    bne __b5
    // utoa::@7
    // [69] if(utoa::value#2>=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
    // [70] phi from utoa::@7 to utoa::@4 [phi:utoa::@7->utoa::@4]
    // [70] phi utoa::buffer#14 = utoa::buffer#11 [phi:utoa::@7->utoa::@4#0] -- register_copy 
    // [70] phi utoa::started#4 = utoa::started#2 [phi:utoa::@7->utoa::@4#1] -- register_copy 
    // [70] phi utoa::value#6 = utoa::value#2 [phi:utoa::@7->utoa::@4#2] -- register_copy 
    // utoa::@4
  __b4:
    // for( char digit=0; digit<max_digits-1; digit++ )
    // [71] utoa::digit#1 = ++ utoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [59] phi from utoa::@4 to utoa::@1 [phi:utoa::@4->utoa::@1]
    // [59] phi utoa::buffer#11 = utoa::buffer#14 [phi:utoa::@4->utoa::@1#0] -- register_copy 
    // [59] phi utoa::started#2 = utoa::started#4 [phi:utoa::@4->utoa::@1#1] -- register_copy 
    // [59] phi utoa::value#2 = utoa::value#6 [phi:utoa::@4->utoa::@1#2] -- register_copy 
    // [59] phi utoa::digit#2 = utoa::digit#1 [phi:utoa::@4->utoa::@1#3] -- register_copy 
    jmp __b1
    // utoa::@5
  __b5:
    // utoa_append(buffer++, value, digit_value)
    // [72] utoa_append::buffer#0 = utoa::buffer#11
    // [73] utoa_append::value#0 = utoa::value#2
    // [74] utoa_append::sub#0 = utoa::digit_value#0
    // [75] call utoa_append
    // [94] phi from utoa::@5 to utoa_append [phi:utoa::@5->utoa_append]
    jsr utoa_append
    // utoa_append(buffer++, value, digit_value)
    // [76] utoa_append::return#0 = utoa_append::value#2
    // utoa::@6
    // value = utoa_append(buffer++, value, digit_value)
    // [77] utoa::value#1 = utoa_append::return#0
    // value = utoa_append(buffer++, value, digit_value);
    // [78] utoa::buffer#5 = ++ utoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [70] phi from utoa::@6 to utoa::@4 [phi:utoa::@6->utoa::@4]
    // [70] phi utoa::buffer#14 = utoa::buffer#5 [phi:utoa::@6->utoa::@4#0] -- register_copy 
    // [70] phi utoa::started#4 = 1 [phi:utoa::@6->utoa::@4#1] -- vbuxx=vbuc1 
    ldx #1
    // [70] phi utoa::value#6 = utoa::value#1 [phi:utoa::@6->utoa::@4#2] -- register_copy 
    jmp __b4
}
  // print_str
// Print a zero-terminated string
// void print_str(__zp(4) char *str)
print_str: {
    .label str = 4
    // [80] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
    // [80] phi print_char_cursor#1 = print_char_cursor#54 [phi:print_str->print_str::@1#0] -- register_copy 
    // [80] phi print_str::str#2 = 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)
    // [81] if(0!=*print_str::str#2) goto print_str::@2 -- 0_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    // print_str::@return
    // }
    // [82] return 
    rts
    // print_str::@2
  __b2:
    // print_char(*(str++))
    // [83] print_char::ch#0 = *print_str::str#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (str),y
    // [84] call print_char
    // [101] phi from print_str::@2 to print_char [phi:print_str::@2->print_char]
    // [101] phi print_char_cursor#36 = print_char_cursor#1 [phi:print_str::@2->print_char#0] -- register_copy 
    // [101] phi print_char::ch#3 = print_char::ch#0 [phi:print_str::@2->print_char#1] -- register_copy 
    jsr print_char
    // print_str::@3
    // print_char(*(str++));
    // [85] print_str::str#0 = ++ print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [80] phi from print_str::@3 to print_str::@1 [phi:print_str::@3->print_str::@1]
    // [80] phi print_char_cursor#1 = print_char_cursor#12 [phi:print_str::@3->print_str::@1#0] -- register_copy 
    // [80] phi print_str::str#2 = print_str::str#0 [phi:print_str::@3->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // b>>4
    // [87] print_uchar::$0 = print_uchar::b#2 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [88] print_char::ch#1 = DIGITS[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    // [89] call print_char
  // Table of hexadecimal digits
    // [101] phi from print_uchar to print_char [phi:print_uchar->print_char]
    // [101] phi print_char_cursor#36 = print_char_cursor#52 [phi:print_uchar->print_char#0] -- register_copy 
    // [101] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@1
    // b&$f
    // [90] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [91] print_char::ch#2 = DIGITS[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    // [92] call print_char
    // [101] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
    // [101] phi print_char_cursor#36 = print_char_cursor#12 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [101] phi print_char::ch#3 = print_char::ch#2 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@return
    // }
    // [93] return 
    rts
}
  // 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.
// __zp(2) unsigned int utoa_append(__zp(8) char *buffer, __zp(2) unsigned int value, __zp(4) unsigned int sub)
utoa_append: {
    .label buffer = 8
    .label value = 2
    .label sub = 4
    .label return = 2
    // [95] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1]
    // [95] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [95] phi utoa_append::value#2 = utoa_append::value#0 [phi:utoa_append->utoa_append::@1#1] -- register_copy 
    // utoa_append::@1
  __b1:
    // while (value >= sub)
    // [96] if(utoa_append::value#2>=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]
    // [97] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    // utoa_append::@return
    // }
    // [98] return 
    rts
    // utoa_append::@2
  __b2:
    // digit++;
    // [99] utoa_append::digit#1 = ++ utoa_append::digit#2 -- vbuxx=_inc_vbuxx 
    inx
    // value -= sub
    // [100] utoa_append::value#1 = utoa_append::value#2 - 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
    // [95] phi from utoa_append::@2 to utoa_append::@1 [phi:utoa_append::@2->utoa_append::@1]
    // [95] phi utoa_append::digit#2 = utoa_append::digit#1 [phi:utoa_append::@2->utoa_append::@1#0] -- register_copy 
    // [95] phi utoa_append::value#2 = utoa_append::value#1 [phi:utoa_append::@2->utoa_append::@1#1] -- register_copy 
    jmp __b1
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [102] *print_char_cursor#36 = print_char::ch#3 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [103] print_char_cursor#12 = ++ print_char_cursor#36 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [104] return 
    rts
}
  // File Data
.segment 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 unsigned int
  decimal_digits: .fill 6, 0

