Inlined call call __init
Eliminating unused variable with no statement memset::$2

CONTROL FLOW GRAPH SSA

void print_str(char *str)
print_str: scope:[print_str]  from print_ulong_decimal::@1
  print_char_cursor#40 = phi( print_ulong_decimal::@1/print_char_cursor#35 )
  print_str::str#5 = phi( print_ulong_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#33 = phi( print_str/print_char_cursor#40, 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#32 = phi( print_str::@1/print_char_cursor#33 )
  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#17 = phi( print_str::@2/print_char_cursor#7 )
  print_char_cursor#0 = print_char_cursor#17
  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#18 = phi( print_str::@1/print_char_cursor#33 )
  print_char_cursor#1 = print_char_cursor#18
  return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from main::@4
  print_char_cursor#34 = phi( main::@4/print_char_cursor#11 )
  print_line_cursor#19 = phi( main::@4/print_line_cursor#21 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  print_char_cursor#19 = phi( print_ln/print_char_cursor#34, print_ln::@1/print_char_cursor#19 )
  print_line_cursor#10 = phi( print_ln/print_line_cursor#19, 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#19
  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#20 = 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#20
  return 
  to:@return

void print_ulong_decimal(unsigned long w)
print_ulong_decimal: scope:[print_ulong_decimal]  from main::@2
  print_char_cursor#41 = phi( main::@2/print_char_cursor#37 )
  print_ulong_decimal::w#1 = phi( main::@2/print_ulong_decimal::w#0 )
  ultoa::value#0 = print_ulong_decimal::w#1
  ultoa::buffer#0 = decimal_digits_long
  ultoa::radix#0 = DECIMAL
  call ultoa
  to:print_ulong_decimal::@1
print_ulong_decimal::@1: scope:[print_ulong_decimal]  from print_ulong_decimal
  print_char_cursor#35 = phi( print_ulong_decimal/print_char_cursor#41 )
  print_str::str#1 = decimal_digits_long
  call print_str
  to:print_ulong_decimal::@2
print_ulong_decimal::@2: scope:[print_ulong_decimal]  from print_ulong_decimal::@1
  print_char_cursor#21 = phi( print_ulong_decimal::@1/print_char_cursor#1 )
  print_char_cursor#4 = print_char_cursor#21
  to:print_ulong_decimal::@return
print_ulong_decimal::@return: scope:[print_ulong_decimal]  from print_ulong_decimal::@2
  print_char_cursor#22 = phi( print_ulong_decimal::@2/print_char_cursor#4 )
  print_char_cursor#5 = print_char_cursor#22
  return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_str::@2
  print_char_cursor#23 = phi( print_str::@2/print_char_cursor#32 )
  print_char::ch#1 = phi( print_str::@2/print_char::ch#0 )
  *print_char_cursor#23 = print_char::ch#1
  print_char_cursor#6 = ++ print_char_cursor#23
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  print_char_cursor#24 = phi( print_char/print_char_cursor#6 )
  print_char_cursor#7 = print_char_cursor#24
  return 
  to:@return

void print_cls()
print_cls: scope:[print_cls]  from main
  print_screen#2 = phi( main/print_screen#5 )
  memset::str#0 = (void *)print_screen#2
  memset::c#0 = ' '
  memset::num#0 = $3e8
  call memset
  memset::return#0 = memset::return#2
  to:print_cls::@1
print_cls::@1: scope:[print_cls]  from print_cls
  print_screen#3 = phi( print_cls/print_screen#2 )
  print_line_cursor#2 = print_screen#3
  print_char_cursor#8 = print_line_cursor#2
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls::@1
  print_char_cursor#25 = phi( print_cls::@1/print_char_cursor#8 )
  print_line_cursor#13 = phi( print_cls::@1/print_line_cursor#2 )
  print_line_cursor#3 = print_line_cursor#13
  print_char_cursor#9 = print_char_cursor#25
  return 
  to:@return

void * memset(void *str , char c , unsigned int num)
memset: scope:[memset]  from print_cls
  memset::c#4 = phi( print_cls/memset::c#0 )
  memset::str#3 = phi( print_cls/memset::str#0 )
  memset::num#1 = phi( print_cls/memset::num#0 )
  memset::$0 = memset::num#1 > 0
  memset::$1 = ! memset::$0
  if(memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@3
  memset::str#1 = phi( memset/memset::str#3, memset::@3/memset::str#4 )
  memset::return#1 = memset::str#1
  to:memset::@return
memset::@2: scope:[memset]  from memset
  memset::c#3 = phi( memset/memset::c#4 )
  memset::num#2 = phi( memset/memset::num#1 )
  memset::str#2 = phi( memset/memset::str#3 )
  memset::$4 = (char *)memset::str#2
  memset::end#0 = memset::$4 + memset::num#2
  memset::dst#0 = ((char *)) memset::str#2
  to:memset::@3
memset::@3: scope:[memset]  from memset::@2 memset::@4
  memset::c#2 = phi( memset::@2/memset::c#3, memset::@4/memset::c#1 )
  memset::str#4 = phi( memset::@2/memset::str#2, memset::@4/memset::str#5 )
  memset::end#1 = phi( memset::@2/memset::end#0, memset::@4/memset::end#2 )
  memset::dst#2 = phi( memset::@2/memset::dst#0, memset::@4/memset::dst#1 )
  memset::$3 = memset::dst#2 != memset::end#1
  if(memset::$3) goto memset::@4
  to:memset::@1
memset::@4: scope:[memset]  from memset::@3
  memset::str#5 = phi( memset::@3/memset::str#4 )
  memset::end#2 = phi( memset::@3/memset::end#1 )
  memset::dst#3 = phi( memset::@3/memset::dst#2 )
  memset::c#1 = phi( memset::@3/memset::c#2 )
  *memset::dst#3 = memset::c#1
  memset::dst#1 = ++ memset::dst#3
  to:memset::@3
memset::@return: scope:[memset]  from memset::@1
  memset::return#3 = phi( memset::@1/memset::return#1 )
  memset::return#2 = memset::return#3
  return 
  to:@return

void ultoa(unsigned long value , char *buffer , char radix)
ultoa: scope:[ultoa]  from print_ulong_decimal
  ultoa::buffer#21 = phi( print_ulong_decimal/ultoa::buffer#0 )
  ultoa::value#12 = phi( print_ulong_decimal/ultoa::value#0 )
  ultoa::radix#1 = phi( print_ulong_decimal/ultoa::radix#0 )
  ultoa::max_digits#0 = 0
  ultoa::digit_values#0 = (unsigned long *) 0
  ultoa::$0 = ultoa::radix#1 == DECIMAL
  if(ultoa::$0) goto ultoa::@1
  to:ultoa::@6
ultoa::@1: scope:[ultoa]  from ultoa
  ultoa::buffer#17 = phi( ultoa/ultoa::buffer#21 )
  ultoa::value#8 = phi( ultoa/ultoa::value#12 )
  ultoa::max_digits#1 = $a
  ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
  to:ultoa::@5
ultoa::@6: scope:[ultoa]  from ultoa
  ultoa::value#13 = phi( ultoa/ultoa::value#12 )
  ultoa::buffer#16 = phi( ultoa/ultoa::buffer#21 )
  ultoa::radix#2 = phi( ultoa/ultoa::radix#1 )
  ultoa::$1 = ultoa::radix#2 == HEXADECIMAL
  if(ultoa::$1) goto ultoa::@2
  to:ultoa::@7
ultoa::@2: scope:[ultoa]  from ultoa::@6
  ultoa::buffer#18 = phi( ultoa::@6/ultoa::buffer#16 )
  ultoa::value#9 = phi( ultoa::@6/ultoa::value#13 )
  ultoa::max_digits#2 = 8
  ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG
  to:ultoa::@5
ultoa::@7: scope:[ultoa]  from ultoa::@6
  ultoa::value#14 = phi( ultoa::@6/ultoa::value#13 )
  ultoa::buffer#13 = phi( ultoa::@6/ultoa::buffer#16 )
  ultoa::radix#3 = phi( ultoa::@6/ultoa::radix#2 )
  ultoa::$2 = ultoa::radix#3 == OCTAL
  if(ultoa::$2) goto ultoa::@3
  to:ultoa::@8
ultoa::@3: scope:[ultoa]  from ultoa::@7
  ultoa::buffer#19 = phi( ultoa::@7/ultoa::buffer#13 )
  ultoa::value#10 = phi( ultoa::@7/ultoa::value#14 )
  ultoa::max_digits#3 = $b
  ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG
  to:ultoa::@5
ultoa::@8: scope:[ultoa]  from ultoa::@7
  ultoa::value#15 = phi( ultoa::@7/ultoa::value#14 )
  ultoa::buffer#10 = phi( ultoa::@7/ultoa::buffer#13 )
  ultoa::radix#4 = phi( ultoa::@7/ultoa::radix#3 )
  ultoa::$3 = ultoa::radix#4 == BINARY
  if(ultoa::$3) goto ultoa::@4
  to:ultoa::@9
ultoa::@4: scope:[ultoa]  from ultoa::@8
  ultoa::buffer#20 = phi( ultoa::@8/ultoa::buffer#10 )
  ultoa::value#11 = phi( ultoa::@8/ultoa::value#15 )
  ultoa::max_digits#4 = $20
  ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG
  to:ultoa::@5
ultoa::@9: scope:[ultoa]  from ultoa::@8
  ultoa::buffer#6 = phi( ultoa::@8/ultoa::buffer#10 )
  *ultoa::buffer#6 = 'e'
  ultoa::buffer#1 = ++ ultoa::buffer#6
  *ultoa::buffer#1 = 'r'
  ultoa::buffer#2 = ++ ultoa::buffer#1
  *ultoa::buffer#2 = 'r'
  ultoa::buffer#3 = ++ ultoa::buffer#2
  *ultoa::buffer#3 = 0
  to:ultoa::@return
ultoa::@return: scope:[ultoa]  from ultoa::@12 ultoa::@9
  return 
  to:@return
ultoa::@5: scope:[ultoa]  from ultoa::@1 ultoa::@2 ultoa::@3 ultoa::@4
  ultoa::buffer#15 = phi( ultoa::@1/ultoa::buffer#17, ultoa::@2/ultoa::buffer#18, ultoa::@3/ultoa::buffer#19, ultoa::@4/ultoa::buffer#20 )
  ultoa::value#7 = phi( ultoa::@1/ultoa::value#8, ultoa::@2/ultoa::value#9, ultoa::@3/ultoa::value#10, ultoa::@4/ultoa::value#11 )
  ultoa::digit_values#8 = phi( ultoa::@1/ultoa::digit_values#1, ultoa::@2/ultoa::digit_values#2, ultoa::@3/ultoa::digit_values#3, ultoa::@4/ultoa::digit_values#4 )
  ultoa::max_digits#7 = phi( ultoa::@1/ultoa::max_digits#1, ultoa::@2/ultoa::max_digits#2, ultoa::@3/ultoa::max_digits#3, ultoa::@4/ultoa::max_digits#4 )
  ultoa::started#0 = 0
  ultoa::digit#0 = 0
  to:ultoa::@10
ultoa::@10: scope:[ultoa]  from ultoa::@13 ultoa::@5
  ultoa::buffer#11 = phi( ultoa::@13/ultoa::buffer#14, ultoa::@5/ultoa::buffer#15 )
  ultoa::started#3 = phi( ultoa::@13/ultoa::started#4, ultoa::@5/ultoa::started#0 )
  ultoa::value#5 = phi( ultoa::@13/ultoa::value#6, ultoa::@5/ultoa::value#7 )
  ultoa::digit_values#6 = phi( ultoa::@13/ultoa::digit_values#7, ultoa::@5/ultoa::digit_values#8 )
  ultoa::digit#2 = phi( ultoa::@13/ultoa::digit#1, ultoa::@5/ultoa::digit#0 )
  ultoa::max_digits#5 = phi( ultoa::@13/ultoa::max_digits#6, ultoa::@5/ultoa::max_digits#7 )
  ultoa::$4 = ultoa::max_digits#5 - 1
  ultoa::$5 = ultoa::digit#2 < ultoa::$4
  if(ultoa::$5) goto ultoa::@11
  to:ultoa::@12
ultoa::@11: scope:[ultoa]  from ultoa::@10
  ultoa::max_digits#8 = phi( ultoa::@10/ultoa::max_digits#5 )
  ultoa::buffer#12 = phi( ultoa::@10/ultoa::buffer#11 )
  ultoa::started#2 = phi( ultoa::@10/ultoa::started#3 )
  ultoa::value#2 = phi( ultoa::@10/ultoa::value#5 )
  ultoa::digit_values#5 = phi( ultoa::@10/ultoa::digit_values#6 )
  ultoa::digit#3 = phi( ultoa::@10/ultoa::digit#2 )
  ultoa::$10 = ultoa::digit#3 * SIZEOF_UNSIGNED_LONG
  ultoa::digit_value#0 = ultoa::digit_values#5[ultoa::$10]
  ultoa::$6 = ultoa::value#2 >= ultoa::digit_value#0
  ultoa::$7 = ultoa::started#2 || ultoa::$6
  ultoa::$8 = ! ultoa::$7
  if(ultoa::$8) goto ultoa::@13
  to:ultoa::@14
ultoa::@12: scope:[ultoa]  from ultoa::@10
  ultoa::buffer#7 = phi( ultoa::@10/ultoa::buffer#11 )
  ultoa::value#3 = phi( ultoa::@10/ultoa::value#5 )
  ultoa::$11 = (char)ultoa::value#3
  *ultoa::buffer#7 = DIGITS[ultoa::$11]
  ultoa::buffer#4 = ++ ultoa::buffer#7
  *ultoa::buffer#4 = 0
  to:ultoa::@return
ultoa::@13: scope:[ultoa]  from ultoa::@11 ultoa::@15
  ultoa::buffer#14 = phi( ultoa::@11/ultoa::buffer#12, ultoa::@15/ultoa::buffer#5 )
  ultoa::started#4 = phi( ultoa::@11/ultoa::started#2, ultoa::@15/ultoa::started#1 )
  ultoa::value#6 = phi( ultoa::@11/ultoa::value#2, ultoa::@15/ultoa::value#1 )
  ultoa::digit_values#7 = phi( ultoa::@11/ultoa::digit_values#5, ultoa::@15/ultoa::digit_values#9 )
  ultoa::max_digits#6 = phi( ultoa::@11/ultoa::max_digits#8, ultoa::@15/ultoa::max_digits#9 )
  ultoa::digit#4 = phi( ultoa::@11/ultoa::digit#3, ultoa::@15/ultoa::digit#5 )
  ultoa::digit#1 = ++ ultoa::digit#4
  to:ultoa::@10
ultoa::@14: scope:[ultoa]  from ultoa::@11
  ultoa::digit_values#10 = phi( ultoa::@11/ultoa::digit_values#5 )
  ultoa::max_digits#10 = phi( ultoa::@11/ultoa::max_digits#8 )
  ultoa::digit#6 = phi( ultoa::@11/ultoa::digit#3 )
  ultoa::digit_value#1 = phi( ultoa::@11/ultoa::digit_value#0 )
  ultoa::value#4 = phi( ultoa::@11/ultoa::value#2 )
  ultoa::buffer#8 = phi( ultoa::@11/ultoa::buffer#12 )
  ultoa_append::buffer#0 = ultoa::buffer#8
  ultoa_append::value#0 = ultoa::value#4
  ultoa_append::sub#0 = ultoa::digit_value#1
  call ultoa_append
  ultoa_append::return#0 = ultoa_append::return#2
  to:ultoa::@15
ultoa::@15: scope:[ultoa]  from ultoa::@14
  ultoa::digit_values#9 = phi( ultoa::@14/ultoa::digit_values#10 )
  ultoa::max_digits#9 = phi( ultoa::@14/ultoa::max_digits#10 )
  ultoa::digit#5 = phi( ultoa::@14/ultoa::digit#6 )
  ultoa::buffer#9 = phi( ultoa::@14/ultoa::buffer#8 )
  ultoa_append::return#3 = phi( ultoa::@14/ultoa_append::return#0 )
  ultoa::$9 = ultoa_append::return#3
  ultoa::value#1 = ultoa::$9
  ultoa::buffer#5 = ++ ultoa::buffer#9
  ultoa::started#1 = 1
  to:ultoa::@13

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

void main()
main: scope:[main]  from __start::@1
  print_char_cursor#36 = phi( __start::@1/print_char_cursor#39 )
  print_line_cursor#20 = phi( __start::@1/print_line_cursor#23 )
  print_screen#5 = phi( __start::@1/print_screen#7 )
  call print_cls
  to:main::@3
main::@3: scope:[main]  from main
  print_char_cursor#26 = phi( main/print_char_cursor#9 )
  print_line_cursor#14 = phi( main/print_line_cursor#3 )
  print_line_cursor#4 = print_line_cursor#14
  print_char_cursor#10 = print_char_cursor#26
  main::i#0 = 0
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@5
  print_char_cursor#38 = phi( main::@3/print_char_cursor#10, main::@5/print_char_cursor#12 )
  print_line_cursor#22 = phi( main::@3/print_line_cursor#4, main::@5/print_line_cursor#5 )
  main::i#2 = phi( main::@3/main::i#0, main::@5/main::i#1 )
  main::$1 = main::i#2 < $d02
  if(main::$1) goto main::@2
  to:main::@return
main::@2: scope:[main]  from main::@1
  print_line_cursor#24 = phi( main::@1/print_line_cursor#22 )
  print_char_cursor#37 = phi( main::@1/print_char_cursor#38 )
  main::i#3 = phi( main::@1/main::i#2 )
  main::$2 = main::i#3 * $22b
  print_ulong_decimal::w#0 = main::$2
  call print_ulong_decimal
  to:main::@4
main::@4: scope:[main]  from main::@2
  main::i#5 = phi( main::@2/main::i#3 )
  print_line_cursor#21 = phi( main::@2/print_line_cursor#24 )
  print_char_cursor#27 = phi( main::@2/print_char_cursor#5 )
  print_char_cursor#11 = print_char_cursor#27
  call print_ln
  to:main::@5
main::@5: scope:[main]  from main::@4
  main::i#4 = phi( main::@4/main::i#5 )
  print_char_cursor#28 = phi( main::@4/print_char_cursor#3 )
  print_line_cursor#15 = phi( main::@4/print_line_cursor#1 )
  print_line_cursor#5 = print_line_cursor#15
  print_char_cursor#12 = print_char_cursor#28
  main::i#1 = main::i#4 + $14d
  to:main::@1
main::@return: scope:[main]  from main::@1
  print_char_cursor#29 = phi( main::@1/print_char_cursor#38 )
  print_line_cursor#16 = phi( main::@1/print_line_cursor#22 )
  print_line_cursor#6 = print_line_cursor#16
  print_char_cursor#13 = print_char_cursor#29
  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#14 = print_line_cursor#7
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  print_screen#7 = phi( __start::__init1/print_screen#0 )
  print_char_cursor#39 = phi( __start::__init1/print_char_cursor#14 )
  print_line_cursor#23 = phi( __start::__init1/print_line_cursor#7 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  print_screen#6 = phi( __start::@1/print_screen#7 )
  print_char_cursor#30 = phi( __start::@1/print_char_cursor#13 )
  print_line_cursor#17 = phi( __start::@1/print_line_cursor#6 )
  print_line_cursor#8 = print_line_cursor#17
  print_char_cursor#15 = print_char_cursor#30
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  print_char_cursor#31 = phi( __start::@2/print_char_cursor#15 )
  print_line_cursor#18 = phi( __start::@2/print_line_cursor#8 )
  print_screen#4 = phi( __start::@2/print_screen#6 )
  print_screen#1 = print_screen#4
  print_line_cursor#9 = print_line_cursor#18
  print_char_cursor#16 = print_char_cursor#31
  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 long RADIX_BINARY_VALUES_LONG[] = { $80000000, $40000000, $20000000, $10000000, $8000000, $4000000, $2000000, $1000000, $800000, $400000, $200000, $100000, $80000, $40000, $20000, $10000, $8000, $4000, $2000, $1000, $800, $400, $200, $100, $80, $40, $20, $10, 8, 4, 2 }
__constant unsigned long RADIX_DECIMAL_VALUES_LONG[] = { $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a }
__constant unsigned long RADIX_HEXADECIMAL_VALUES_LONG[] = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 }
__constant unsigned long RADIX_OCTAL_VALUES_LONG[] = { $40000000, $8000000, $1000000, $200000, $40000, $8000, $1000, $200, $40, 8 }
__constant char SIZEOF_UNSIGNED_LONG = 4
void __start()
__constant char decimal_digits_long[$b] = { fill( $b, 0) }
void main()
bool main::$1
number main::$2
unsigned long main::i
unsigned long main::i#0
unsigned long main::i#1
unsigned long main::i#2
unsigned long main::i#3
unsigned long main::i#4
unsigned long main::i#5
void * memset(void *str , char c , unsigned int num)
bool memset::$0
bool memset::$1
bool memset::$3
char *memset::$4
char memset::c
char memset::c#0
char memset::c#1
char memset::c#2
char memset::c#3
char memset::c#4
char *memset::dst
char *memset::dst#0
char *memset::dst#1
char *memset::dst#2
char *memset::dst#3
char *memset::end
char *memset::end#0
char *memset::end#1
char *memset::end#2
unsigned int memset::num
unsigned int memset::num#0
unsigned int memset::num#1
unsigned int memset::num#2
void *memset::return
void *memset::return#0
void *memset::return#1
void *memset::return#2
void *memset::return#3
void *memset::str
void *memset::str#0
void *memset::str#1
void *memset::str#2
void *memset::str#3
void *memset::str#4
void *memset::str#5
void print_char(char ch)
char print_char::ch
char print_char::ch#0
char print_char::ch#1
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#5
char *print_char_cursor#6
char *print_char_cursor#7
char *print_char_cursor#8
char *print_char_cursor#9
void print_cls()
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#3
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
char *print_screen#5
char *print_screen#6
char *print_screen#7
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_ulong_decimal(unsigned long w)
unsigned long print_ulong_decimal::w
unsigned long print_ulong_decimal::w#0
unsigned long print_ulong_decimal::w#1
void ultoa(unsigned long value , char *buffer , char radix)
bool ultoa::$0
bool ultoa::$1
char ultoa::$10
char ultoa::$11
bool ultoa::$2
bool ultoa::$3
number ultoa::$4
bool ultoa::$5
bool ultoa::$6
bool ultoa::$7
bool ultoa::$8
unsigned long ultoa::$9
char *ultoa::buffer
char *ultoa::buffer#0
char *ultoa::buffer#1
char *ultoa::buffer#10
char *ultoa::buffer#11
char *ultoa::buffer#12
char *ultoa::buffer#13
char *ultoa::buffer#14
char *ultoa::buffer#15
char *ultoa::buffer#16
char *ultoa::buffer#17
char *ultoa::buffer#18
char *ultoa::buffer#19
char *ultoa::buffer#2
char *ultoa::buffer#20
char *ultoa::buffer#21
char *ultoa::buffer#3
char *ultoa::buffer#4
char *ultoa::buffer#5
char *ultoa::buffer#6
char *ultoa::buffer#7
char *ultoa::buffer#8
char *ultoa::buffer#9
char ultoa::digit
char ultoa::digit#0
char ultoa::digit#1
char ultoa::digit#2
char ultoa::digit#3
char ultoa::digit#4
char ultoa::digit#5
char ultoa::digit#6
unsigned long ultoa::digit_value
unsigned long ultoa::digit_value#0
unsigned long ultoa::digit_value#1
unsigned long *ultoa::digit_values
unsigned long *ultoa::digit_values#0
unsigned long *ultoa::digit_values#1
unsigned long *ultoa::digit_values#10
unsigned long *ultoa::digit_values#2
unsigned long *ultoa::digit_values#3
unsigned long *ultoa::digit_values#4
unsigned long *ultoa::digit_values#5
unsigned long *ultoa::digit_values#6
unsigned long *ultoa::digit_values#7
unsigned long *ultoa::digit_values#8
unsigned long *ultoa::digit_values#9
char ultoa::max_digits
char ultoa::max_digits#0
char ultoa::max_digits#1
char ultoa::max_digits#10
char ultoa::max_digits#2
char ultoa::max_digits#3
char ultoa::max_digits#4
char ultoa::max_digits#5
char ultoa::max_digits#6
char ultoa::max_digits#7
char ultoa::max_digits#8
char ultoa::max_digits#9
char ultoa::radix
char ultoa::radix#0
char ultoa::radix#1
char ultoa::radix#2
char ultoa::radix#3
char ultoa::radix#4
char ultoa::started
char ultoa::started#0
char ultoa::started#1
char ultoa::started#2
char ultoa::started#3
char ultoa::started#4
unsigned long ultoa::value
unsigned long ultoa::value#0
unsigned long ultoa::value#1
unsigned long ultoa::value#10
unsigned long ultoa::value#11
unsigned long ultoa::value#12
unsigned long ultoa::value#13
unsigned long ultoa::value#14
unsigned long ultoa::value#15
unsigned long ultoa::value#2
unsigned long ultoa::value#3
unsigned long ultoa::value#4
unsigned long ultoa::value#5
unsigned long ultoa::value#6
unsigned long ultoa::value#7
unsigned long ultoa::value#8
unsigned long ultoa::value#9
unsigned long ultoa_append(char *buffer , unsigned long value , unsigned long sub)
bool ultoa_append::$0
char *ultoa_append::buffer
char *ultoa_append::buffer#0
char *ultoa_append::buffer#1
char *ultoa_append::buffer#2
char *ultoa_append::buffer#3
char *ultoa_append::buffer#4
char ultoa_append::digit
char ultoa_append::digit#0
char ultoa_append::digit#1
char ultoa_append::digit#2
char ultoa_append::digit#3
char ultoa_append::digit#4
unsigned long ultoa_append::return
unsigned long ultoa_append::return#0
unsigned long ultoa_append::return#1
unsigned long ultoa_append::return#2
unsigned long ultoa_append::return#3
unsigned long ultoa_append::return#4
unsigned long ultoa_append::sub
unsigned long ultoa_append::sub#0
unsigned long ultoa_append::sub#1
unsigned long ultoa_append::sub#2
unsigned long ultoa_append::sub#3
unsigned long ultoa_append::value
unsigned long ultoa_append::value#0
unsigned long ultoa_append::value#1
unsigned long ultoa_append::value#2
unsigned long ultoa_append::value#3
unsigned long ultoa_append::value#4
unsigned long ultoa_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) $3e8 in memset::num#0 = $3e8
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#1 > 0
Adding number conversion cast (unumber) $a in ultoa::max_digits#1 = $a
Adding number conversion cast (unumber) 8 in ultoa::max_digits#2 = 8
Adding number conversion cast (unumber) $b in ultoa::max_digits#3 = $b
Adding number conversion cast (unumber) $20 in ultoa::max_digits#4 = $20
Adding number conversion cast (unumber) 0 in *ultoa::buffer#3 = 0
Adding number conversion cast (unumber) 1 in ultoa::$4 = ultoa::max_digits#5 - 1
Adding number conversion cast (unumber) ultoa::$4 in ultoa::$4 = ultoa::max_digits#5 - (unumber)1
Adding number conversion cast (unumber) 0 in *ultoa::buffer#4 = 0
Adding number conversion cast (unumber) 1 in ultoa::started#1 = 1
Adding number conversion cast (unumber) $d02 in main::$1 = main::i#2 < $d02
Adding number conversion cast (unumber) $22b in main::$2 = main::i#3 * $22b
Adding number conversion cast (unumber) main::$2 in main::$2 = main::i#3 * (unumber)$22b
Adding number conversion cast (unumber) $14d in main::i#1 = main::i#4 + $14d
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast memset::num#0 = (unumber)$3e8
Inlining cast memset::dst#0 = (char *)memset::str#2
Inlining cast ultoa::max_digits#1 = (unumber)$a
Inlining cast ultoa::max_digits#2 = (unumber)8
Inlining cast ultoa::max_digits#3 = (unumber)$b
Inlining cast ultoa::max_digits#4 = (unumber)$20
Inlining cast *ultoa::buffer#3 = (unumber)0
Inlining cast *ultoa::buffer#4 = (unumber)0
Inlining cast ultoa::started#1 = (unumber)1
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast $3e8
Simplifying constant integer cast 0
Simplifying constant integer cast $a
Simplifying constant integer cast 8
Simplifying constant integer cast $b
Simplifying constant integer cast $20
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $d02
Simplifying constant integer cast $22b
Simplifying constant integer cast $14d
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 (unsigned int) $3e8
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $a
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) $b
Finalized unsigned number type (char) $20
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 (unsigned int) $d02
Finalized unsigned number type (unsigned int) $22b
Finalized unsigned number type (unsigned int) $14d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in ultoa::$4 = ultoa::max_digits#5 - 1
Inferred type updated to unsigned long in main::$2 = main::i#3 * $22b
Inversing boolean not [59] memset::$1 = memset::num#1 <= 0 from [58] memset::$0 = memset::num#1 > 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias print_str::str#2 = print_str::str#3 print_str::str#4 
Alias print_char_cursor#1 = print_char_cursor#32 print_char_cursor#33 print_char_cursor#18 
Alias print_char_cursor#0 = print_char_cursor#17 
Alias print_line_cursor#0 = print_ln::$0 print_line_cursor#11 print_char_cursor#2 print_line_cursor#12 print_char_cursor#20 print_line_cursor#1 print_char_cursor#3 
Alias print_char_cursor#35 = print_char_cursor#41 
Alias print_char_cursor#21 = print_char_cursor#4 print_char_cursor#22 print_char_cursor#5 
Alias print_char_cursor#24 = print_char_cursor#6 print_char_cursor#7 
Alias print_line_cursor#13 = print_screen#3 print_screen#2 print_line_cursor#2 print_char_cursor#8 print_char_cursor#25 print_line_cursor#3 print_char_cursor#9 
Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2 
Alias memset::str#2 = memset::str#3 
Alias memset::num#1 = memset::num#2 
Alias memset::c#3 = memset::c#4 
Alias memset::c#1 = memset::c#2 
Alias memset::dst#2 = memset::dst#3 
Alias memset::end#1 = memset::end#2 
Alias memset::str#4 = memset::str#5 
Alias ultoa::value#10 = ultoa::value#8 ultoa::value#12 ultoa::value#13 ultoa::value#9 ultoa::value#14 ultoa::value#15 ultoa::value#11 
Alias ultoa::buffer#10 = ultoa::buffer#17 ultoa::buffer#21 ultoa::buffer#16 ultoa::buffer#18 ultoa::buffer#13 ultoa::buffer#19 ultoa::buffer#20 ultoa::buffer#6 
Alias ultoa::radix#1 = ultoa::radix#2 ultoa::radix#3 ultoa::radix#4 
Alias ultoa::digit#2 = ultoa::digit#3 ultoa::digit#6 ultoa::digit#5 
Alias ultoa::digit_values#10 = ultoa::digit_values#5 ultoa::digit_values#6 ultoa::digit_values#9 
Alias ultoa::value#2 = ultoa::value#5 ultoa::value#3 ultoa::value#4 
Alias ultoa::started#2 = ultoa::started#3 
Alias ultoa::buffer#11 = ultoa::buffer#12 ultoa::buffer#7 ultoa::buffer#8 ultoa::buffer#9 
Alias ultoa::max_digits#10 = ultoa::max_digits#8 ultoa::max_digits#5 ultoa::max_digits#9 
Alias ultoa::digit_value#0 = ultoa::digit_value#1 
Alias ultoa_append::return#0 = ultoa_append::return#3 
Alias ultoa::value#1 = ultoa::$9 
Alias ultoa_append::digit#2 = ultoa_append::digit#4 ultoa_append::digit#3 
Alias ultoa_append::value#2 = ultoa_append::value#3 ultoa_append::value#4 ultoa_append::return#1 ultoa_append::return#4 ultoa_append::return#2 
Alias ultoa_append::sub#1 = ultoa_append::sub#2 
Alias ultoa_append::buffer#1 = ultoa_append::buffer#4 ultoa_append::buffer#2 
Alias print_line_cursor#14 = print_line_cursor#4 
Alias print_char_cursor#10 = print_char_cursor#26 
Alias main::i#2 = main::i#3 main::i#5 main::i#4 
Alias print_char_cursor#13 = print_char_cursor#37 print_char_cursor#38 print_char_cursor#29 
Alias print_line_cursor#16 = print_line_cursor#24 print_line_cursor#22 print_line_cursor#21 print_line_cursor#6 
Alias print_ulong_decimal::w#0 = main::$2 
Alias print_char_cursor#11 = print_char_cursor#27 
Alias print_line_cursor#15 = print_line_cursor#5 
Alias print_char_cursor#12 = print_char_cursor#28 
Alias print_screen#0 = print_line_cursor#7 print_char_cursor#14 print_line_cursor#23 print_char_cursor#39 print_screen#7 print_screen#6 print_screen#4 print_screen#1 
Alias print_line_cursor#17 = print_line_cursor#8 print_line_cursor#18 print_line_cursor#9 
Alias print_char_cursor#15 = print_char_cursor#30 print_char_cursor#31 print_char_cursor#16 
Successful SSA optimization Pass2AliasElimination
Alias ultoa::value#10 = ultoa::value#7 
Alias ultoa::buffer#10 = ultoa::buffer#15 
Alias ultoa::digit#2 = ultoa::digit#4 
Alias ultoa::max_digits#10 = ultoa::max_digits#6 
Alias ultoa::digit_values#10 = ultoa::digit_values#7 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values print_str::str#5 print_str::str#1
Identical Phi Values print_char_cursor#40 print_char_cursor#35
Identical Phi Values print_char_cursor#0 print_char_cursor#24
Identical Phi Values print_line_cursor#19 print_line_cursor#16
Identical Phi Values print_char_cursor#34 print_char_cursor#11
Identical Phi Values print_char_cursor#19 print_char_cursor#34
Identical Phi Values print_ulong_decimal::w#1 print_ulong_decimal::w#0
Identical Phi Values print_char_cursor#35 print_char_cursor#13
Identical Phi Values print_char_cursor#21 print_char_cursor#1
Identical Phi Values print_char::ch#1 print_char::ch#0
Identical Phi Values print_char_cursor#23 print_char_cursor#1
Identical Phi Values print_line_cursor#13 print_screen#5
Identical Phi Values memset::num#1 memset::num#0
Identical Phi Values memset::str#2 memset::str#0
Identical Phi Values memset::c#3 memset::c#0
Identical Phi Values memset::end#1 memset::end#0
Identical Phi Values memset::str#4 memset::str#2
Identical Phi Values memset::c#1 memset::c#3
Identical Phi Values ultoa::radix#1 ultoa::radix#0
Identical Phi Values ultoa::value#10 ultoa::value#0
Identical Phi Values ultoa::buffer#10 ultoa::buffer#0
Identical Phi Values ultoa::max_digits#10 ultoa::max_digits#7
Identical Phi Values ultoa::digit_values#10 ultoa::digit_values#8
Identical Phi Values ultoa_append::value#5 ultoa_append::value#0
Identical Phi Values ultoa_append::sub#3 ultoa_append::sub#0
Identical Phi Values ultoa_append::buffer#3 ultoa_append::buffer#0
Identical Phi Values ultoa_append::sub#1 ultoa_append::sub#3
Identical Phi Values ultoa_append::buffer#1 ultoa_append::buffer#3
Identical Phi Values print_screen#5 print_screen#0
Identical Phi Values print_line_cursor#20 print_screen#0
Identical Phi Values print_char_cursor#36 print_screen#0
Identical Phi Values print_line_cursor#14 print_line_cursor#13
Identical Phi Values print_char_cursor#10 print_line_cursor#13
Identical Phi Values print_char_cursor#11 print_char_cursor#21
Identical Phi Values print_line_cursor#15 print_line_cursor#0
Identical Phi Values print_char_cursor#12 print_line_cursor#0
Identical Phi Values print_line_cursor#17 print_line_cursor#16
Identical Phi Values print_char_cursor#15 print_char_cursor#13
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values memset::return#1 memset::str#0
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#1) goto print_ln::@1
Simple Condition memset::$1 [37] if(memset::num#0<=0) goto memset::@1
Simple Condition memset::$3 [44] if(memset::dst#2!=memset::end#0) goto memset::@4
Simple Condition ultoa::$0 [52] if(ultoa::radix#0==DECIMAL) goto ultoa::@1
Simple Condition ultoa::$1 [56] if(ultoa::radix#0==HEXADECIMAL) goto ultoa::@2
Simple Condition ultoa::$2 [60] if(ultoa::radix#0==OCTAL) goto ultoa::@3
Simple Condition ultoa::$3 [64] if(ultoa::radix#0==BINARY) goto ultoa::@4
Simple Condition ultoa::$5 [81] if(ultoa::digit#2<ultoa::$4) goto ultoa::@11
Simple Condition ultoa_append::$0 [106] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2
Simple Condition main::$1 [117] if(main::i#2<$d02) goto main::@2
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting ! if()-condition to reversed if() [86] ultoa::$8 = ! ultoa::$7
Rewriting || if()-condition to two if()s [85] ultoa::$7 = ultoa::started#2 || ultoa::$6
Successful SSA optimization Pass2ConditionalAndOrRewriting
Warning! Adding boolean cast to non-boolean condition ultoa::started#2
Constant ultoa::buffer#0 = decimal_digits_long
Constant ultoa::radix#0 = DECIMAL
Constant print_str::str#1 = decimal_digits_long
Constant memset::c#0 = ' '
Constant memset::num#0 = $3e8
Constant ultoa::max_digits#0 = 0
Constant ultoa::digit_values#0 = (unsigned long *) 0
Constant ultoa::max_digits#1 = $a
Constant ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
Constant ultoa::max_digits#2 = 8
Constant ultoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_LONG
Constant ultoa::max_digits#3 = $b
Constant ultoa::digit_values#3 = RADIX_OCTAL_VALUES_LONG
Constant ultoa::max_digits#4 = $20
Constant ultoa::digit_values#4 = RADIX_BINARY_VALUES_LONG
Constant ultoa::started#0 = 0
Constant ultoa::digit#0 = 0
Constant ultoa::started#1 = 1
Constant ultoa_append::digit#0 = 0
Constant main::i#0 = 0
Constant print_screen#0 = (char *) 1024
Successful SSA optimization Pass2ConstantIdentification
Constant memset::str#0 = (void *)print_screen#0
Successful SSA optimization Pass2ConstantIdentification
Constant memset::return#0 = memset::str#0
Constant memset::$4 = (char *)memset::str#0
Constant memset::dst#0 = (char *)memset::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [37] if(memset::num#0<=0) goto memset::@1
if() condition always true - replacing block destination [52] if(ultoa::radix#0==DECIMAL) goto ultoa::@1
if() condition always false - eliminating [56] if(ultoa::radix#0==HEXADECIMAL) goto ultoa::@2
if() condition always false - eliminating [60] if(ultoa::radix#0==OCTAL) goto ultoa::@3
if() condition always false - eliminating [64] if(ultoa::radix#0==BINARY) goto ultoa::@4
Successful SSA optimization Pass2ConstantIfs
Eliminating variable ultoa::buffer#1 from unused block ultoa::@9
Eliminating variable ultoa::buffer#2 from unused block ultoa::@9
Eliminating variable ultoa::buffer#3 from unused block ultoa::@9
Removing unused block ultoa::@6
Removing PHI-reference to removed block (ultoa::@2) in block ultoa::@5
Removing PHI-reference to removed block (ultoa::@2) in block ultoa::@5
Removing unused block ultoa::@2
Removing unused block ultoa::@7
Removing PHI-reference to removed block (ultoa::@3) in block ultoa::@5
Removing PHI-reference to removed block (ultoa::@3) in block ultoa::@5
Removing unused block ultoa::@3
Removing unused block ultoa::@8
Removing PHI-reference to removed block (ultoa::@4) in block ultoa::@5
Removing PHI-reference to removed block (ultoa::@4) in block ultoa::@5
Removing unused block ultoa::@4
Removing unused block ultoa::@9
Successful SSA optimization Pass2EliminateUnusedBlocks
Eliminating unused constant memset::return#0
Eliminating unused constant BINARY
Eliminating unused constant OCTAL
Eliminating unused constant HEXADECIMAL
Eliminating unused constant ultoa::radix#0
Eliminating unused constant ultoa::max_digits#0
Eliminating unused constant ultoa::digit_values#0
Eliminating unused constant ultoa::max_digits#2
Eliminating unused constant ultoa::digit_values#2
Eliminating unused constant ultoa::max_digits#3
Eliminating unused constant ultoa::digit_values#3
Eliminating unused constant ultoa::max_digits#4
Eliminating unused constant ultoa::digit_values#4
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused constant DECIMAL
Eliminating unused constant RADIX_BINARY_VALUES_LONG
Eliminating unused constant RADIX_OCTAL_VALUES_LONG
Eliminating unused constant RADIX_HEXADECIMAL_VALUES_LONG
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 0 in [33] ultoa::$12 = 0 != ultoa::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 ultoa::max_digits#7 ultoa::max_digits#1
Identical Phi Values ultoa::digit_values#8 ultoa::digit_values#1
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition ultoa::$12 [34] if(0!=ultoa::started#2) goto ultoa::@14
Simple Condition ultoa::$6 [62] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@14
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [19] memset::end#0 = memset::$4 + memset::num#0
Constant right-side identified [28] ultoa::$4 = ultoa::max_digits#1 - 1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memset::end#0 = memset::$4+memset::num#0
Constant ultoa::$4 = ultoa::max_digits#1-1
Successful SSA optimization Pass2ConstantIdentification
Rewriting multiplication to use shift [27] ultoa::$10 = ultoa::digit#2 * SIZEOF_UNSIGNED_LONG
Rewriting multiplication to use shift and addition[52] print_ulong_decimal::w#0 = main::i#2 * $22b
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings print_str::str#1
Inlining constant with var siblings memset::dst#0
Inlining constant with var siblings ultoa::buffer#0
Inlining constant with var siblings ultoa::started#0
Inlining constant with var siblings ultoa::digit#0
Inlining constant with var siblings ultoa::started#1
Inlining constant with var siblings ultoa_append::digit#0
Inlining constant with var siblings main::i#0
Constant inlined memset::$4 = (char *)memset::str#0
Constant inlined ultoa::started#0 = 0
Constant inlined ultoa::digit#0 = 0
Constant inlined main::i#0 = 0
Constant inlined memset::dst#0 = (char *)memset::str#0
Constant inlined ultoa_append::digit#0 = 0
Constant inlined print_str::str#1 = decimal_digits_long
Constant inlined ultoa::digit_values#1 = RADIX_DECIMAL_VALUES_LONG
Constant inlined ultoa::$4 = ultoa::max_digits#1-1
Constant inlined ultoa::started#1 = 1
Constant inlined ultoa::buffer#0 = decimal_digits_long
Successful SSA optimization Pass2ConstantInlining
Alias print_ulong_decimal::w#0 = main::$12 
Successful SSA optimization Pass2AliasElimination
Eliminating unused constant SIZEOF_UNSIGNED_LONG
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) $b
Finalized unsigned number type (char) $b
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 ultoa::@17(between ultoa::@16 and ultoa::@13)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of print_cls::@1
Adding NOP phi() at start of print_ulong_decimal::@1
Adding NOP phi() at start of print_ulong_decimal::@2
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of ultoa
Adding NOP phi() at start of ultoa::@1
CALL GRAPH
Calls in [main] to print_cls:1 print_ulong_decimal:14 print_ln:16 
Calls in [print_cls] to memset:22 
Calls in [print_ulong_decimal] to ultoa:26 print_str:28 
Calls in [ultoa] to ultoa_append:73 
Calls in [print_str] to print_char:84 

Created 16 initial phi equivalence classes
Coalesced [18] main::i#6 = main::i#1
Not coalescing [19] print_line_cursor#27 = print_line_cursor#0
Coalesced [20] print_char_cursor#44 = print_line_cursor#0
Coalesced [31] print_line_cursor#25 = print_line_cursor#16
Not coalescing [37] print_line_cursor#26 = print_line_cursor#0
Coalesced [46] memset::dst#4 = memset::dst#1
Coalesced [49] ultoa::value#17 = ultoa::value#0
Coalesced [61] ultoa::value#18 = ultoa::value#2
Coalesced [62] ultoa::started#6 = ultoa::started#2
Coalesced [63] ultoa::buffer#23 = ultoa::buffer#11
Coalesced [66] ultoa::digit#7 = ultoa::digit#1
Coalesced (already) [67] ultoa::value#16 = ultoa::value#6
Coalesced (already) [68] ultoa::started#5 = ultoa::started#4
Coalesced (already) [69] ultoa::buffer#22 = ultoa::buffer#14
Coalesced [77] ultoa::value#19 = ultoa::value#1
Coalesced [78] ultoa::buffer#24 = ultoa::buffer#5
Not coalescing [79] print_char_cursor#42 = print_char_cursor#13
Coalesced [86] print_str::str#6 = print_str::str#0
Coalesced [87] print_char_cursor#43 = print_char_cursor#24
Coalesced [88] ultoa_append::value#6 = ultoa_append::value#0
Coalesced [95] ultoa_append::value#7 = ultoa_append::value#1
Coalesced [96] ultoa_append::digit#5 = ultoa_append::digit#1
Coalesced down to 12 phi equivalence classes
Culled Empty Block label main::@3
Culled Empty Block label print_cls::@1
Culled Empty Block label print_ulong_decimal::@2
Culled Empty Block label print_ln::@2
Culled Empty Block label memset::@2
Culled Empty Block label memset::@1
Culled Empty Block label ultoa::@1
Culled Empty Block label ultoa::@5
Culled Empty Block label ultoa::@17
Renumbering block print_ln::@3 to print_ln::@2
Renumbering block memset::@3 to memset::@1
Renumbering block memset::@4 to memset::@2
Renumbering block ultoa::@10 to ultoa::@1
Renumbering block ultoa::@11 to ultoa::@2
Renumbering block ultoa::@12 to ultoa::@3
Renumbering block ultoa::@13 to ultoa::@4
Renumbering block ultoa::@14 to ultoa::@5
Renumbering block ultoa::@15 to ultoa::@6
Renumbering block ultoa::@16 to ultoa::@7
Renumbering block main::@4 to main::@3
Renumbering block main::@5 to main::@4
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of print_ulong_decimal::@1
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of memset
Adding NOP phi() at start of ultoa
Adding NOP phi() at start of ultoa_append

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  [1] call print_cls
  to:main::@1
main::@1: scope:[main]  from main main::@4
  [2] print_char_cursor#13 = phi( main/print_screen#0, main::@4/print_line_cursor#0 )
  [2] print_line_cursor#16 = phi( main/print_screen#0, main::@4/print_line_cursor#27 )
  [2] main::i#2 = phi( main/0, main::@4/main::i#1 )
  [3] if(main::i#2<$d02) goto main::@2
  to:main::@return
main::@return: scope:[main]  from main::@1
  [4] return 
  to:@return
main::@2: scope:[main]  from main::@1
  [5] main::$5 = main::i#2 << 4
  [6] main::$6 = main::$5 + main::i#2
  [7] main::$7 = main::$6 << 2
  [8] main::$8 = main::$7 + main::i#2
  [9] main::$9 = main::$8 << 2
  [10] main::$10 = main::$9 + main::i#2
  [11] main::$11 = main::$10 << 1
  [12] print_ulong_decimal::w#0 = main::$11 + main::i#2
  [13] call print_ulong_decimal
  to:main::@3
main::@3: scope:[main]  from main::@2
  [14] phi()
  [15] call print_ln
  to:main::@4
main::@4: scope:[main]  from main::@3
  [16] main::i#1 = main::i#2 + $14d
  [17] print_line_cursor#27 = print_line_cursor#0
  to:main::@1

void print_cls()
print_cls: scope:[print_cls]  from main
  [18] phi()
  [19] call memset
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls
  [20] return 
  to:@return

void print_ulong_decimal(unsigned long w)
print_ulong_decimal: scope:[print_ulong_decimal]  from main::@2
  [21] ultoa::value#0 = print_ulong_decimal::w#0
  [22] call ultoa
  to:print_ulong_decimal::@1
print_ulong_decimal::@1: scope:[print_ulong_decimal]  from print_ulong_decimal
  [23] phi()
  [24] call print_str
  to:print_ulong_decimal::@return
print_ulong_decimal::@return: scope:[print_ulong_decimal]  from print_ulong_decimal::@1
  [25] return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from main::@3
  [26] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@2
  [27] print_line_cursor#10 = phi( print_ln/print_line_cursor#16, print_ln::@2/print_line_cursor#26 )
  [28] print_line_cursor#0 = print_line_cursor#10 + $28
  [29] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@2
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [30] return 
  to:@return
print_ln::@2: scope:[print_ln]  from print_ln::@1
  [31] print_line_cursor#26 = print_line_cursor#0
  to:print_ln::@1

void * memset(void *str , char c , unsigned int num)
memset: scope:[memset]  from print_cls
  [32] phi()
  to:memset::@1
memset::@1: scope:[memset]  from memset memset::@2
  [33] memset::dst#2 = phi( memset/(char *)memset::str#0, memset::@2/memset::dst#1 )
  [34] if(memset::dst#2!=memset::end#0) goto memset::@2
  to:memset::@return
memset::@return: scope:[memset]  from memset::@1
  [35] return 
  to:@return
memset::@2: scope:[memset]  from memset::@1
  [36] *memset::dst#2 = memset::c#0
  [37] memset::dst#1 = ++ memset::dst#2
  to:memset::@1

void ultoa(unsigned long value , char *buffer , char radix)
ultoa: scope:[ultoa]  from print_ulong_decimal
  [38] phi()
  to:ultoa::@1
ultoa::@1: scope:[ultoa]  from ultoa ultoa::@4
  [39] ultoa::buffer#11 = phi( ultoa::@4/ultoa::buffer#14, ultoa/decimal_digits_long )
  [39] ultoa::started#2 = phi( ultoa::@4/ultoa::started#4, ultoa/0 )
  [39] ultoa::value#2 = phi( ultoa::@4/ultoa::value#6, ultoa/ultoa::value#0 )
  [39] ultoa::digit#2 = phi( ultoa::@4/ultoa::digit#1, ultoa/0 )
  [40] if(ultoa::digit#2<ultoa::max_digits#1-1) goto ultoa::@2
  to:ultoa::@3
ultoa::@3: scope:[ultoa]  from ultoa::@1
  [41] ultoa::$11 = (char)ultoa::value#2
  [42] *ultoa::buffer#11 = DIGITS[ultoa::$11]
  [43] ultoa::buffer#4 = ++ ultoa::buffer#11
  [44] *ultoa::buffer#4 = 0
  to:ultoa::@return
ultoa::@return: scope:[ultoa]  from ultoa::@3
  [45] return 
  to:@return
ultoa::@2: scope:[ultoa]  from ultoa::@1
  [46] ultoa::$10 = ultoa::digit#2 << 2
  [47] ultoa::digit_value#0 = RADIX_DECIMAL_VALUES_LONG[ultoa::$10]
  [48] if(0!=ultoa::started#2) goto ultoa::@5
  to:ultoa::@7
ultoa::@7: scope:[ultoa]  from ultoa::@2
  [49] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5
  to:ultoa::@4
ultoa::@4: scope:[ultoa]  from ultoa::@6 ultoa::@7
  [50] ultoa::buffer#14 = phi( ultoa::@7/ultoa::buffer#11, ultoa::@6/ultoa::buffer#5 )
  [50] ultoa::started#4 = phi( ultoa::@7/ultoa::started#2, ultoa::@6/1 )
  [50] ultoa::value#6 = phi( ultoa::@7/ultoa::value#2, ultoa::@6/ultoa::value#1 )
  [51] ultoa::digit#1 = ++ ultoa::digit#2
  to:ultoa::@1
ultoa::@5: scope:[ultoa]  from ultoa::@2 ultoa::@7
  [52] ultoa_append::buffer#0 = ultoa::buffer#11
  [53] ultoa_append::value#0 = ultoa::value#2
  [54] ultoa_append::sub#0 = ultoa::digit_value#0
  [55] call ultoa_append
  [56] ultoa_append::return#0 = ultoa_append::value#2
  to:ultoa::@6
ultoa::@6: scope:[ultoa]  from ultoa::@5
  [57] ultoa::value#1 = ultoa_append::return#0
  [58] ultoa::buffer#5 = ++ ultoa::buffer#11
  to:ultoa::@4

void print_str(char *str)
print_str: scope:[print_str]  from print_ulong_decimal::@1
  [59] print_char_cursor#42 = print_char_cursor#13
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@3
  [60] print_char_cursor#1 = phi( print_str/print_char_cursor#42, print_str::@3/print_char_cursor#24 )
  [60] print_str::str#2 = phi( print_str/decimal_digits_long, print_str::@3/print_str::str#0 )
  [61] if(0!=*print_str::str#2) goto print_str::@2
  to:print_str::@return
print_str::@return: scope:[print_str]  from print_str::@1
  [62] return 
  to:@return
print_str::@2: scope:[print_str]  from print_str::@1
  [63] print_char::ch#0 = *print_str::str#2
  [64] call print_char
  to:print_str::@3
print_str::@3: scope:[print_str]  from print_str::@2
  [65] print_str::str#0 = ++ print_str::str#2
  to:print_str::@1

unsigned long ultoa_append(char *buffer , unsigned long value , unsigned long sub)
ultoa_append: scope:[ultoa_append]  from ultoa::@5
  [66] phi()
  to:ultoa_append::@1
ultoa_append::@1: scope:[ultoa_append]  from ultoa_append ultoa_append::@2
  [67] ultoa_append::digit#2 = phi( ultoa_append/0, ultoa_append::@2/ultoa_append::digit#1 )
  [67] ultoa_append::value#2 = phi( ultoa_append/ultoa_append::value#0, ultoa_append::@2/ultoa_append::value#1 )
  [68] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2
  to:ultoa_append::@3
ultoa_append::@3: scope:[ultoa_append]  from ultoa_append::@1
  [69] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2]
  to:ultoa_append::@return
ultoa_append::@return: scope:[ultoa_append]  from ultoa_append::@3
  [70] return 
  to:@return
ultoa_append::@2: scope:[ultoa_append]  from ultoa_append::@1
  [71] ultoa_append::digit#1 = ++ ultoa_append::digit#2
  [72] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0
  to:ultoa_append::@1

void print_char(char ch)
print_char: scope:[print_char]  from print_str::@2
  [73] *print_char_cursor#1 = print_char::ch#0
  [74] print_char_cursor#24 = ++ print_char_cursor#1
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [75] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void main()
unsigned long main::$10 // 22.0
unsigned long main::$11 // 22.0
unsigned long main::$5 // 22.0
unsigned long main::$6 // 22.0
unsigned long main::$7 // 22.0
unsigned long main::$8 // 22.0
unsigned long main::$9 // 22.0
unsigned long main::i
unsigned long main::i#1 // 11.0
unsigned long main::i#2 // 6.769230769230768
void * memset(void *str , char c , unsigned int num)
char memset::c
char *memset::dst
char *memset::dst#1 // 2002.0
char *memset::dst#2 // 1334.6666666666667
char *memset::end
unsigned int memset::num
void *memset::return
void *memset::str
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // 1100002.0
char *print_char_cursor
char *print_char_cursor#1 // 150786.07142857142
char *print_char_cursor#13 // 77.84615384615384
char *print_char_cursor#24 // 275000.5
char *print_char_cursor#42 // 2002.0
void print_cls()
char *print_line_cursor
char *print_line_cursor#0 // 5004.166666666666
char *print_line_cursor#10 // 20103.0
char *print_line_cursor#16 // 8.615384615384615
char *print_line_cursor#26 // 20002.0
char *print_line_cursor#27 // 22.0
void print_ln()
char *print_screen
void print_str(char *str)
char *print_str::str
char *print_str::str#0 // 200002.0
char *print_str::str#2 // 100001.0
void print_ulong_decimal(unsigned long w)
unsigned long print_ulong_decimal::w
unsigned long print_ulong_decimal::w#0 // 112.0
void ultoa(unsigned long value , char *buffer , char radix)
char ultoa::$10 // 200002.0
char ultoa::$11 // 2002.0
char *ultoa::buffer
char *ultoa::buffer#11 // 28714.714285714286
char *ultoa::buffer#14 // 150001.5
char *ultoa::buffer#4 // 2002.0
char *ultoa::buffer#5 // 200002.0
char ultoa::digit
char ultoa::digit#1 // 200002.0
char ultoa::digit#2 // 28571.714285714286
unsigned long ultoa::digit_value
unsigned long ultoa::digit_value#0 // 60000.600000000006
unsigned long *ultoa::digit_values
char ultoa::max_digits
char ultoa::radix
char ultoa::started
char ultoa::started#2 // 50000.5
char ultoa::started#4 // 100001.0
unsigned long ultoa::value
unsigned long ultoa::value#0 // 551.0
unsigned long ultoa::value#1 // 100001.0
unsigned long ultoa::value#2 // 57286.42857142857
unsigned long ultoa::value#6 // 150001.5
unsigned long ultoa_append(char *buffer , unsigned long value , unsigned long sub)
char *ultoa_append::buffer
char *ultoa_append::buffer#0 // 137500.25
char ultoa_append::digit
char ultoa_append::digit#1 // 1.000000001E9
char ultoa_append::digit#2 // 1.0005000015E9
unsigned long ultoa_append::return
unsigned long ultoa_append::return#0 // 200002.0
unsigned long ultoa_append::sub
unsigned long ultoa_append::sub#0 // 3.333500005E8
unsigned long ultoa_append::value
unsigned long ultoa_append::value#0 // 366667.3333333334
unsigned long ultoa_append::value#1 // 2.000000002E9
unsigned long ultoa_append::value#2 // 5.0018333416666675E8

Initial phi equivalence classes
[ main::i#2 main::i#1 ]
[ print_char_cursor#13 print_line_cursor#0 ]
[ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ]
[ memset::dst#2 memset::dst#1 ]
[ ultoa::digit#2 ultoa::digit#1 ]
[ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ]
[ ultoa::started#2 ultoa::started#4 ]
[ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ]
[ print_str::str#2 print_str::str#0 ]
[ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ]
[ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ]
[ ultoa_append::digit#2 ultoa_append::digit#1 ]
Added variable main::$5 to live range equivalence class [ main::$5 ]
Added variable main::$6 to live range equivalence class [ main::$6 ]
Added variable main::$7 to live range equivalence class [ main::$7 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Added variable main::$10 to live range equivalence class [ main::$10 ]
Added variable main::$11 to live range equivalence class [ main::$11 ]
Added variable print_ulong_decimal::w#0 to live range equivalence class [ print_ulong_decimal::w#0 ]
Added variable ultoa::$11 to live range equivalence class [ ultoa::$11 ]
Added variable ultoa::buffer#4 to live range equivalence class [ ultoa::buffer#4 ]
Added variable ultoa::$10 to live range equivalence class [ ultoa::$10 ]
Added variable ultoa::digit_value#0 to live range equivalence class [ ultoa::digit_value#0 ]
Added variable ultoa_append::buffer#0 to live range equivalence class [ ultoa_append::buffer#0 ]
Added variable ultoa_append::sub#0 to live range equivalence class [ ultoa_append::sub#0 ]
Added variable ultoa_append::return#0 to live range equivalence class [ ultoa_append::return#0 ]
Added variable print_char::ch#0 to live range equivalence class [ print_char::ch#0 ]
Complete equivalence classes
[ main::i#2 main::i#1 ]
[ print_char_cursor#13 print_line_cursor#0 ]
[ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ]
[ memset::dst#2 memset::dst#1 ]
[ ultoa::digit#2 ultoa::digit#1 ]
[ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ]
[ ultoa::started#2 ultoa::started#4 ]
[ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ]
[ print_str::str#2 print_str::str#0 ]
[ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ]
[ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ]
[ ultoa_append::digit#2 ultoa_append::digit#1 ]
[ main::$5 ]
[ main::$6 ]
[ main::$7 ]
[ main::$8 ]
[ main::$9 ]
[ main::$10 ]
[ main::$11 ]
[ print_ulong_decimal::w#0 ]
[ ultoa::$11 ]
[ ultoa::buffer#4 ]
[ ultoa::$10 ]
[ ultoa::digit_value#0 ]
[ ultoa_append::buffer#0 ]
[ ultoa_append::sub#0 ]
[ ultoa_append::return#0 ]
[ print_char::ch#0 ]
Allocated zp[4]:2 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ]
Allocated zp[1]:6 [ ultoa_append::digit#2 ultoa_append::digit#1 ]
Allocated zp[4]:7 [ ultoa_append::sub#0 ]
Allocated zp[1]:11 [ print_char::ch#0 ]
Allocated zp[2]:12 [ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ]
Allocated zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ]
Allocated zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ]
Allocated zp[2]:20 [ print_str::str#2 print_str::str#0 ]
Allocated zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ]
Allocated zp[1]:23 [ ultoa::$10 ]
Allocated zp[4]:24 [ ultoa_append::return#0 ]
Allocated zp[1]:28 [ ultoa::started#2 ultoa::started#4 ]
Allocated zp[2]:29 [ ultoa_append::buffer#0 ]
Allocated zp[4]:31 [ ultoa::digit_value#0 ]
Allocated zp[2]:35 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ]
Allocated zp[2]:37 [ print_char_cursor#13 print_line_cursor#0 ]
Allocated zp[2]:39 [ memset::dst#2 memset::dst#1 ]
Allocated zp[1]:41 [ ultoa::$11 ]
Allocated zp[2]:42 [ ultoa::buffer#4 ]
Allocated zp[4]:44 [ print_ulong_decimal::w#0 ]
Allocated zp[4]:48 [ main::$5 ]
Allocated zp[4]:52 [ main::$6 ]
Allocated zp[4]:56 [ main::$7 ]
Allocated zp[4]:60 [ main::$8 ]
Allocated zp[4]:64 [ main::$9 ]
Allocated zp[4]:68 [ main::$10 ]
Allocated zp[4]:72 [ main::$11 ]
Allocated zp[4]:76 [ main::i#2 main::i#1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [3] if(main::i#2<$d02) goto main::@2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 ] { }  ) always clobbers reg byte a 
Statement [5] main::$5 = main::i#2 << 4 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$5 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$5 ] { }  ) always clobbers reg byte a 
Statement [6] main::$6 = main::$5 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$6 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$6 ] { }  ) always clobbers reg byte a 
Statement [7] main::$7 = main::$6 << 2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$7 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$7 ] { }  ) always clobbers reg byte a 
Statement [8] main::$8 = main::$7 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$8 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$8 ] { }  ) always clobbers reg byte a 
Statement [9] main::$9 = main::$8 << 2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$9 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$9 ] { }  ) always clobbers reg byte a 
Statement [10] main::$10 = main::$9 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$10 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$10 ] { }  ) always clobbers reg byte a 
Statement [11] main::$11 = main::$10 << 1 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$11 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$11 ] { }  ) always clobbers reg byte a 
Statement [12] print_ulong_decimal::w#0 = main::$11 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 print_ulong_decimal::w#0 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 print_ulong_decimal::w#0 ] { }  ) always clobbers reg byte a 
Statement [16] main::i#1 = main::i#2 + $14d [ main::i#1 print_line_cursor#0 ] (  [ main::i#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [17] print_line_cursor#27 = print_line_cursor#0 [ main::i#1 print_line_cursor#27 print_line_cursor#0 ] (  [ main::i#1 print_line_cursor#27 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [21] ultoa::value#0 = print_ulong_decimal::w#0 [ print_char_cursor#13 ultoa::value#0 ] ( print_ulong_decimal:13 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [28] print_line_cursor#0 = print_line_cursor#10 + $28 [ print_line_cursor#0 print_char_cursor#1 ] ( print_ln:15 [ main::i#2 print_line_cursor#0 print_char_cursor#1 ] { }  ) always clobbers reg byte a 
Statement [29] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@2 [ print_line_cursor#0 print_char_cursor#1 ] ( print_ln:15 [ main::i#2 print_line_cursor#0 print_char_cursor#1 ] { }  ) always clobbers reg byte a 
Statement [31] print_line_cursor#26 = print_line_cursor#0 [ print_line_cursor#26 print_char_cursor#1 ] ( print_ln:15 [ main::i#2 print_line_cursor#26 print_char_cursor#1 ] { }  ) always clobbers reg byte a 
Statement [34] if(memset::dst#2!=memset::end#0) goto memset::@2 [ memset::dst#2 ] ( print_cls:1::memset:19 [ memset::dst#2 ] { }  ) always clobbers reg byte a 
Statement [36] *memset::dst#2 = memset::c#0 [ memset::dst#2 ] ( print_cls:1::memset:19 [ memset::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [41] ultoa::$11 = (char)ultoa::value#2 [ ultoa::buffer#11 ultoa::$11 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::buffer#11 ultoa::$11 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [42] *ultoa::buffer#11 = DIGITS[ultoa::$11] [ ultoa::buffer#11 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::buffer#11 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a reg byte y 
Statement [43] ultoa::buffer#4 = ++ ultoa::buffer#11 [ ultoa::buffer#4 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::buffer#4 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [44] *ultoa::buffer#4 = 0 [ ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a reg byte y 
Statement [46] ultoa::$10 = ultoa::digit#2 << 2 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$10 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$10 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:28 [ ultoa::started#2 ultoa::started#4 ]
Statement [47] ultoa::digit_value#0 = RADIX_DECIMAL_VALUES_LONG[ultoa::$10] [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [49] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [52] ultoa_append::buffer#0 = ultoa::buffer#11 [ ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [53] ultoa_append::value#0 = ultoa::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [54] ultoa_append::sub#0 = ultoa::digit_value#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [56] ultoa_append::return#0 = ultoa_append::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [57] ultoa::value#1 = ultoa_append::return#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa::value#1 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa::value#1 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [59] print_char_cursor#42 = print_char_cursor#13 [ print_char_cursor#42 ] ( print_ulong_decimal:13::print_str:24 [ main::i#2 print_line_cursor#16 print_char_cursor#42 ] { }  ) always clobbers reg byte a 
Statement [61] if(0!=*print_str::str#2) goto print_str::@2 [ print_char_cursor#1 print_str::str#2 ] ( print_ulong_decimal:13::print_str:24 [ main::i#2 print_line_cursor#16 print_char_cursor#1 print_str::str#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [63] print_char::ch#0 = *print_str::str#2 [ print_char_cursor#1 print_str::str#2 print_char::ch#0 ] ( print_ulong_decimal:13::print_str:24 [ main::i#2 print_line_cursor#16 print_char_cursor#1 print_str::str#2 print_char::ch#0 ] { }  ) always clobbers reg byte a reg byte y 
Statement [68] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( print_ulong_decimal:13::ultoa:22::ultoa_append:55 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:6 [ ultoa_append::digit#2 ultoa_append::digit#1 ]
Statement [69] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] [ ultoa_append::value#2 ] ( print_ulong_decimal:13::ultoa:22::ultoa_append:55 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ]
Statement [72] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( print_ulong_decimal:13::ultoa:22::ultoa_append:55 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [73] *print_char_cursor#1 = print_char::ch#0 [ print_char_cursor#1 ] ( print_ulong_decimal:13::print_str:24::print_char:64 [ main::i#2 print_line_cursor#16 print_str::str#2 print_char_cursor#1 ] { }  ) always clobbers reg byte y 
Statement [3] if(main::i#2<$d02) goto main::@2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 ] { }  ) always clobbers reg byte a 
Statement [5] main::$5 = main::i#2 << 4 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$5 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$5 ] { }  ) always clobbers reg byte a 
Statement [6] main::$6 = main::$5 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$6 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$6 ] { }  ) always clobbers reg byte a 
Statement [7] main::$7 = main::$6 << 2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$7 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$7 ] { }  ) always clobbers reg byte a 
Statement [8] main::$8 = main::$7 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$8 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$8 ] { }  ) always clobbers reg byte a 
Statement [9] main::$9 = main::$8 << 2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$9 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$9 ] { }  ) always clobbers reg byte a 
Statement [10] main::$10 = main::$9 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$10 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$10 ] { }  ) always clobbers reg byte a 
Statement [11] main::$11 = main::$10 << 1 [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$11 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 main::$11 ] { }  ) always clobbers reg byte a 
Statement [12] print_ulong_decimal::w#0 = main::$11 + main::i#2 [ main::i#2 print_line_cursor#16 print_char_cursor#13 print_ulong_decimal::w#0 ] (  [ main::i#2 print_line_cursor#16 print_char_cursor#13 print_ulong_decimal::w#0 ] { }  ) always clobbers reg byte a 
Statement [16] main::i#1 = main::i#2 + $14d [ main::i#1 print_line_cursor#0 ] (  [ main::i#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [17] print_line_cursor#27 = print_line_cursor#0 [ main::i#1 print_line_cursor#27 print_line_cursor#0 ] (  [ main::i#1 print_line_cursor#27 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [21] ultoa::value#0 = print_ulong_decimal::w#0 [ print_char_cursor#13 ultoa::value#0 ] ( print_ulong_decimal:13 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [28] print_line_cursor#0 = print_line_cursor#10 + $28 [ print_line_cursor#0 print_char_cursor#1 ] ( print_ln:15 [ main::i#2 print_line_cursor#0 print_char_cursor#1 ] { }  ) always clobbers reg byte a 
Statement [29] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@2 [ print_line_cursor#0 print_char_cursor#1 ] ( print_ln:15 [ main::i#2 print_line_cursor#0 print_char_cursor#1 ] { }  ) always clobbers reg byte a 
Statement [31] print_line_cursor#26 = print_line_cursor#0 [ print_line_cursor#26 print_char_cursor#1 ] ( print_ln:15 [ main::i#2 print_line_cursor#26 print_char_cursor#1 ] { }  ) always clobbers reg byte a 
Statement [34] if(memset::dst#2!=memset::end#0) goto memset::@2 [ memset::dst#2 ] ( print_cls:1::memset:19 [ memset::dst#2 ] { }  ) always clobbers reg byte a 
Statement [36] *memset::dst#2 = memset::c#0 [ memset::dst#2 ] ( print_cls:1::memset:19 [ memset::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [41] ultoa::$11 = (char)ultoa::value#2 [ ultoa::buffer#11 ultoa::$11 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::buffer#11 ultoa::$11 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [42] *ultoa::buffer#11 = DIGITS[ultoa::$11] [ ultoa::buffer#11 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::buffer#11 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a reg byte y 
Statement [43] ultoa::buffer#4 = ++ ultoa::buffer#11 [ ultoa::buffer#4 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::buffer#4 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [44] *ultoa::buffer#4 = 0 [ ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a reg byte y 
Statement [46] ultoa::$10 = ultoa::digit#2 << 2 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$10 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::$10 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [47] ultoa::digit_value#0 = RADIX_DECIMAL_VALUES_LONG[ultoa::$10] [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [49] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 [ ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::started#2 ultoa::buffer#11 ultoa::digit_value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [52] ultoa_append::buffer#0 = ultoa::buffer#11 [ ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::value#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [53] ultoa_append::value#0 = ultoa::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa::digit_value#0 ultoa_append::buffer#0 ultoa_append::value#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [54] ultoa_append::sub#0 = ultoa::digit_value#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::value#0 ultoa_append::sub#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [56] ultoa_append::return#0 = ultoa_append::value#2 [ ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::return#0 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [57] ultoa::value#1 = ultoa_append::return#0 [ ultoa::digit#2 ultoa::buffer#11 ultoa::value#1 ] ( print_ulong_decimal:13::ultoa:22 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa::value#1 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } }  ) always clobbers reg byte a 
Statement [59] print_char_cursor#42 = print_char_cursor#13 [ print_char_cursor#42 ] ( print_ulong_decimal:13::print_str:24 [ main::i#2 print_line_cursor#16 print_char_cursor#42 ] { }  ) always clobbers reg byte a 
Statement [61] if(0!=*print_str::str#2) goto print_str::@2 [ print_char_cursor#1 print_str::str#2 ] ( print_ulong_decimal:13::print_str:24 [ main::i#2 print_line_cursor#16 print_char_cursor#1 print_str::str#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [63] print_char::ch#0 = *print_str::str#2 [ print_char_cursor#1 print_str::str#2 print_char::ch#0 ] ( print_ulong_decimal:13::print_str:24 [ main::i#2 print_line_cursor#16 print_char_cursor#1 print_str::str#2 print_char::ch#0 ] { }  ) always clobbers reg byte a reg byte y 
Statement [68] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] ( print_ulong_decimal:13::ultoa:22::ultoa_append:55 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#2 ultoa_append::digit#2 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [69] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] [ ultoa_append::value#2 ] ( print_ulong_decimal:13::ultoa:22::ultoa_append:55 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::value#2 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a reg byte y 
Statement [72] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 [ ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] ( print_ulong_decimal:13::ultoa:22::ultoa_append:55 [ main::i#2 print_line_cursor#16 print_char_cursor#13 ultoa::digit#2 ultoa::buffer#11 ultoa_append::buffer#0 ultoa_append::sub#0 ultoa_append::value#1 ultoa_append::digit#1 ] { { ultoa::value#0 = print_ulong_decimal::w#0 } { ultoa_append::buffer#0 = ultoa::buffer#11 } { ultoa_append::value#0 = ultoa::value#2 } { ultoa_append::sub#0 = ultoa::digit_value#0 } { ultoa_append::return#0 = ultoa_append::value#2 } }  ) always clobbers reg byte a 
Statement [73] *print_char_cursor#1 = print_char::ch#0 [ print_char_cursor#1 ] ( print_ulong_decimal:13::print_str:24::print_char:64 [ main::i#2 print_line_cursor#16 print_str::str#2 print_char_cursor#1 ] { }  ) always clobbers reg byte y 
Potential registers zp[4]:76 [ main::i#2 main::i#1 ] : zp[4]:76 , 
Potential registers zp[2]:37 [ print_char_cursor#13 print_line_cursor#0 ] : zp[2]:37 , 
Potential registers zp[2]:35 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ] : zp[2]:35 , 
Potential registers zp[2]:39 [ memset::dst#2 memset::dst#1 ] : zp[2]:39 , 
Potential registers zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ] : zp[1]:22 , reg byte x , 
Potential registers zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ] : zp[4]:16 , 
Potential registers zp[1]:28 [ ultoa::started#2 ultoa::started#4 ] : zp[1]:28 , reg byte x , reg byte y , 
Potential registers zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ] : zp[2]:14 , 
Potential registers zp[2]:20 [ print_str::str#2 print_str::str#0 ] : zp[2]:20 , 
Potential registers zp[2]:12 [ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ] : zp[2]:12 , 
Potential registers zp[4]:2 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] : zp[4]:2 , 
Potential registers zp[1]:6 [ ultoa_append::digit#2 ultoa_append::digit#1 ] : zp[1]:6 , reg byte x , reg byte y , 
Potential registers zp[4]:48 [ main::$5 ] : zp[4]:48 , 
Potential registers zp[4]:52 [ main::$6 ] : zp[4]:52 , 
Potential registers zp[4]:56 [ main::$7 ] : zp[4]:56 , 
Potential registers zp[4]:60 [ main::$8 ] : zp[4]:60 , 
Potential registers zp[4]:64 [ main::$9 ] : zp[4]:64 , 
Potential registers zp[4]:68 [ main::$10 ] : zp[4]:68 , 
Potential registers zp[4]:72 [ main::$11 ] : zp[4]:72 , 
Potential registers zp[4]:44 [ print_ulong_decimal::w#0 ] : zp[4]:44 , 
Potential registers zp[1]:41 [ ultoa::$11 ] : zp[1]:41 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:42 [ ultoa::buffer#4 ] : zp[2]:42 , 
Potential registers zp[1]:23 [ ultoa::$10 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[4]:31 [ ultoa::digit_value#0 ] : zp[4]:31 , 
Potential registers zp[2]:29 [ ultoa_append::buffer#0 ] : zp[2]:29 , 
Potential registers zp[4]:7 [ ultoa_append::sub#0 ] : zp[4]:7 , 
Potential registers zp[4]:24 [ ultoa_append::return#0 ] : zp[4]:24 , 
Potential registers zp[1]:11 [ print_char::ch#0 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [ultoa_append] 2,500,550,003.5: zp[4]:2 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] 2,000,500,002.5: zp[1]:6 [ ultoa_append::digit#2 ultoa_append::digit#1 ] 333,350,000.5: zp[4]:7 [ ultoa_append::sub#0 ] 200,002: zp[4]:24 [ ultoa_append::return#0 ] 137,500.25: zp[2]:29 [ ultoa_append::buffer#0 ] 
Uplift Scope [ultoa] 378,718.21: zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ] 307,839.93: zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ] 228,573.71: zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ] 200,002: zp[1]:23 [ ultoa::$10 ] 150,001.5: zp[1]:28 [ ultoa::started#2 ultoa::started#4 ] 60,000.6: zp[4]:31 [ ultoa::digit_value#0 ] 2,002: zp[1]:41 [ ultoa::$11 ] 2,002: zp[2]:42 [ ultoa::buffer#4 ] 
Uplift Scope [print_char] 1,100,002: zp[1]:11 [ print_char::ch#0 ] 
Uplift Scope [] 427,788.57: zp[2]:12 [ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ] 40,135.62: zp[2]:35 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ] 5,082.01: zp[2]:37 [ print_char_cursor#13 print_line_cursor#0 ] 
Uplift Scope [print_str] 300,003: zp[2]:20 [ print_str::str#2 print_str::str#0 ] 
Uplift Scope [memset] 3,336.67: zp[2]:39 [ memset::dst#2 memset::dst#1 ] 
Uplift Scope [main] 22: zp[4]:48 [ main::$5 ] 22: zp[4]:52 [ main::$6 ] 22: zp[4]:56 [ main::$7 ] 22: zp[4]:60 [ main::$8 ] 22: zp[4]:64 [ main::$9 ] 22: zp[4]:68 [ main::$10 ] 22: zp[4]:72 [ main::$11 ] 17.77: zp[4]:76 [ main::i#2 main::i#1 ] 
Uplift Scope [print_ulong_decimal] 112: zp[4]:44 [ print_ulong_decimal::w#0 ] 
Uplift Scope [print_ln] 
Uplift Scope [print_cls] 
Uplift Scope [RADIX] 

Uplifting [ultoa_append] best 137561 combination zp[4]:2 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ] zp[4]:7 [ ultoa_append::sub#0 ] zp[4]:24 [ ultoa_append::return#0 ] zp[2]:29 [ ultoa_append::buffer#0 ] 
Uplifting [ultoa] best 136457 combination zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ] zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ] zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ] reg byte a [ ultoa::$10 ] reg byte x [ ultoa::started#2 ultoa::started#4 ] zp[4]:31 [ ultoa::digit_value#0 ] reg byte a [ ultoa::$11 ] zp[2]:42 [ ultoa::buffer#4 ] 
Uplifting [print_char] best 136154 combination reg byte a [ print_char::ch#0 ] 
Uplifting [] best 136154 combination zp[2]:12 [ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ] zp[2]:35 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ] zp[2]:37 [ print_char_cursor#13 print_line_cursor#0 ] 
Uplifting [print_str] best 136154 combination zp[2]:20 [ print_str::str#2 print_str::str#0 ] 
Uplifting [memset] best 136154 combination zp[2]:39 [ memset::dst#2 memset::dst#1 ] 
Uplifting [main] best 136154 combination zp[4]:48 [ main::$5 ] zp[4]:52 [ main::$6 ] zp[4]:56 [ main::$7 ] zp[4]:60 [ main::$8 ] zp[4]:64 [ main::$9 ] zp[4]:68 [ main::$10 ] zp[4]:72 [ main::$11 ] zp[4]:76 [ main::i#2 main::i#1 ] 
Uplifting [print_ulong_decimal] best 136154 combination zp[4]:44 [ print_ulong_decimal::w#0 ] 
Uplifting [print_ln] best 136154 combination 
Uplifting [print_cls] best 136154 combination 
Uplifting [RADIX] best 136154 combination 
Attempting to uplift remaining variables inzp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ]
Uplifting [ultoa] best 136154 combination zp[1]:22 [ ultoa::digit#2 ultoa::digit#1 ] 
Coalescing zero page register [ zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ] ] with [ zp[4]:2 [ ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] ] - score: 1
Coalescing zero page register [ zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ] ] with [ zp[4]:44 [ print_ulong_decimal::w#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_ulong_decimal::w#0 ] ] with [ zp[4]:24 [ ultoa_append::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ] ] with [ zp[2]:42 [ ultoa::buffer#4 ] ] - score: 1
Coalescing zero page register [ zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ultoa::buffer#4 ] ] with [ zp[2]:29 [ ultoa_append::buffer#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:48 [ main::$5 ] ] with [ zp[4]:52 [ main::$6 ] ] - score: 1
Coalescing zero page register [ zp[4]:56 [ main::$7 ] ] with [ zp[4]:60 [ main::$8 ] ] - score: 1
Coalescing zero page register [ zp[4]:64 [ main::$9 ] ] with [ zp[4]:68 [ main::$10 ] ] - score: 1
Coalescing zero page register [ zp[4]:31 [ ultoa::digit_value#0 ] ] with [ zp[4]:7 [ ultoa_append::sub#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_ulong_decimal::w#0 ultoa_append::return#0 ] ] with [ zp[4]:72 [ main::$11 ] ] - score: 1
Coalescing zero page register [ zp[4]:48 [ main::$5 main::$6 ] ] with [ zp[4]:56 [ main::$7 main::$8 ] ] - score: 1
Coalescing zero page register [ zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_ulong_decimal::w#0 ultoa_append::return#0 main::$11 ] ] with [ zp[4]:64 [ main::$9 main::$10 ] ] - score: 1
Coalescing zero page register [ zp[4]:16 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_ulong_decimal::w#0 ultoa_append::return#0 main::$11 main::$9 main::$10 ] ] with [ zp[4]:48 [ main::$5 main::$6 main::$7 main::$8 ] ] - score: 1
Coalescing zero page register [ zp[2]:39 [ memset::dst#2 memset::dst#1 ] ] with [ zp[2]:37 [ print_char_cursor#13 print_line_cursor#0 ] ]
Coalescing zero page register [ zp[2]:20 [ print_str::str#2 print_str::str#0 ] ] with [ zp[2]:14 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ultoa::buffer#4 ultoa_append::buffer#0 ] ]
Allocated (was zp[4]:16) zp[4]:2 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_ulong_decimal::w#0 ultoa_append::return#0 main::$11 main::$9 main::$10 main::$5 main::$6 main::$7 main::$8 ]
Allocated (was zp[4]:31) zp[4]:6 [ ultoa::digit_value#0 ultoa_append::sub#0 ]
Allocated (was zp[2]:20) zp[2]:10 [ print_str::str#2 print_str::str#0 ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ultoa::buffer#4 ultoa_append::buffer#0 ]
Allocated (was zp[1]:22) zp[1]:14 [ ultoa::digit#2 ultoa::digit#1 ]
Allocated (was zp[2]:35) zp[2]:15 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ]
Allocated (was zp[2]:39) zp[2]:17 [ memset::dst#2 memset::dst#1 print_char_cursor#13 print_line_cursor#0 ]
Allocated (was zp[4]:76) zp[4]:19 [ main::i#2 main::i#1 ]

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="multiply-16bit-const.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(main)
  // Global Constants & labels
  .label print_screen = $400
  .label print_char_cursor = $c
  .label print_line_cursor = $11
  .label print_char_cursor_1 = $11
  .label print_line_cursor_1 = $f
.segment Code
  // main
main: {
    .label i = $13
    .label __5 = 2
    .label __6 = 2
    .label __7 = 2
    .label __8 = 2
    .label __9 = 2
    .label __10 = 2
    .label __11 = 2
    // [1] call print_cls
    // [18] phi from main to print_cls [phi:main->print_cls]
  print_cls_from_main:
    jsr print_cls
    // [2] phi from main to main::@1 [phi:main->main::@1]
  __b1_from_main:
    // [2] phi print_char_cursor#13 = print_screen#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor_1
    lda #>print_screen
    sta.z print_char_cursor_1+1
    // [2] phi print_line_cursor#16 = print_screen#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor_1
    lda #>print_screen
    sta.z print_line_cursor_1+1
    // [2] phi main::i#2 = 0 [phi:main->main::@1#2] -- vduz1=vduc1 
    lda #<0
    sta.z i
    lda #>0
    sta.z i+1
    lda #<0>>$10
    sta.z i+2
    lda #>0>>$10
    sta.z i+3
    jmp __b1
    // main::@1
  __b1:
    // [3] if(main::i#2<$d02) goto main::@2 -- vduz1_lt_vduc1_then_la1 
    lda.z i+3
    cmp #>$d02>>$10
    bcc __b2
    bne !+
    lda.z i+2
    cmp #<$d02>>$10
    bcc __b2
    bne !+
    lda.z i+1
    cmp #>$d02
    bcc __b2
    bne !+
    lda.z i
    cmp #<$d02
    bcc __b2
  !:
    jmp __breturn
    // main::@return
  __breturn:
    // [4] return 
    rts
    // main::@2
  __b2:
    // [5] main::$5 = main::i#2 << 4 -- vduz1=vduz2_rol_4 
    lda.z i
    asl
    sta.z __5
    lda.z i+1
    rol
    sta.z __5+1
    lda.z i+2
    rol
    sta.z __5+2
    lda.z i+3
    rol
    sta.z __5+3
    asl.z __5
    rol.z __5+1
    rol.z __5+2
    rol.z __5+3
    asl.z __5
    rol.z __5+1
    rol.z __5+2
    rol.z __5+3
    asl.z __5
    rol.z __5+1
    rol.z __5+2
    rol.z __5+3
    // [6] main::$6 = main::$5 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z __6
    adc.z i
    sta.z __6
    lda.z __6+1
    adc.z i+1
    sta.z __6+1
    lda.z __6+2
    adc.z i+2
    sta.z __6+2
    lda.z __6+3
    adc.z i+3
    sta.z __6+3
    // [7] main::$7 = main::$6 << 2 -- vduz1=vduz1_rol_2 
    asl.z __7
    rol.z __7+1
    rol.z __7+2
    rol.z __7+3
    asl.z __7
    rol.z __7+1
    rol.z __7+2
    rol.z __7+3
    // [8] main::$8 = main::$7 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z __8
    adc.z i
    sta.z __8
    lda.z __8+1
    adc.z i+1
    sta.z __8+1
    lda.z __8+2
    adc.z i+2
    sta.z __8+2
    lda.z __8+3
    adc.z i+3
    sta.z __8+3
    // [9] main::$9 = main::$8 << 2 -- vduz1=vduz1_rol_2 
    asl.z __9
    rol.z __9+1
    rol.z __9+2
    rol.z __9+3
    asl.z __9
    rol.z __9+1
    rol.z __9+2
    rol.z __9+3
    // [10] main::$10 = main::$9 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z __10
    adc.z i
    sta.z __10
    lda.z __10+1
    adc.z i+1
    sta.z __10+1
    lda.z __10+2
    adc.z i+2
    sta.z __10+2
    lda.z __10+3
    adc.z i+3
    sta.z __10+3
    // [11] main::$11 = main::$10 << 1 -- vduz1=vduz1_rol_1 
    asl.z __11
    rol.z __11+1
    rol.z __11+2
    rol.z __11+3
    // [12] print_ulong_decimal::w#0 = main::$11 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z print_ulong_decimal.w
    adc.z i
    sta.z print_ulong_decimal.w
    lda.z print_ulong_decimal.w+1
    adc.z i+1
    sta.z print_ulong_decimal.w+1
    lda.z print_ulong_decimal.w+2
    adc.z i+2
    sta.z print_ulong_decimal.w+2
    lda.z print_ulong_decimal.w+3
    adc.z i+3
    sta.z print_ulong_decimal.w+3
    // [13] call print_ulong_decimal
    jsr print_ulong_decimal
    // [14] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    jmp __b3
    // main::@3
  __b3:
    // [15] call print_ln
    // [26] phi from main::@3 to print_ln [phi:main::@3->print_ln]
  print_ln_from___b3:
    jsr print_ln
    jmp __b4
    // main::@4
  __b4:
    // [16] main::i#1 = main::i#2 + $14d -- vduz1=vduz1_plus_vwuc1 
    clc
    lda.z i
    adc #<$14d
    sta.z i
    lda.z i+1
    adc #>$14d
    sta.z i+1
    lda.z i+2
    adc #0
    sta.z i+2
    lda.z i+3
    adc #0
    sta.z i+3
    // [17] print_line_cursor#27 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_line_cursor_1
    lda.z print_line_cursor+1
    sta.z print_line_cursor_1+1
    // [2] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  __b1_from___b4:
    // [2] phi print_char_cursor#13 = print_line_cursor#0 [phi:main::@4->main::@1#0] -- register_copy 
    // [2] phi print_line_cursor#16 = print_line_cursor#27 [phi:main::@4->main::@1#1] -- register_copy 
    // [2] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp __b1
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // [19] call memset
    // [32] phi from print_cls to memset [phi:print_cls->memset]
  memset_from_print_cls:
    jsr memset
    jmp __breturn
    // print_cls::@return
  __breturn:
    // [20] return 
    rts
}
  // print_ulong_decimal
// Print a unsigned long as DECIMAL
// void print_ulong_decimal(__zp(2) unsigned long w)
print_ulong_decimal: {
    .label w = 2
    // [21] ultoa::value#0 = print_ulong_decimal::w#0
    // [22] call ultoa
    // [38] phi from print_ulong_decimal to ultoa [phi:print_ulong_decimal->ultoa]
  ultoa_from_print_ulong_decimal:
    jsr ultoa
    // [23] phi from print_ulong_decimal to print_ulong_decimal::@1 [phi:print_ulong_decimal->print_ulong_decimal::@1]
  __b1_from_print_ulong_decimal:
    jmp __b1
    // print_ulong_decimal::@1
  __b1:
    // [24] call print_str
    jsr print_str
    jmp __breturn
    // print_ulong_decimal::@return
  __breturn:
    // [25] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [27] phi from print_ln print_ln::@2 to print_ln::@1 [phi:print_ln/print_ln::@2->print_ln::@1]
  __b1_from_print_ln:
  __b1_from___b2:
    // [27] phi print_line_cursor#10 = print_line_cursor#16 [phi:print_ln/print_ln::@2->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [28] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz2_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor_1
    sta.z print_line_cursor
    lda #0
    adc.z print_line_cursor_1+1
    sta.z print_line_cursor+1
    // [29] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@2 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc __b2
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b2
  !:
    jmp __breturn
    // print_ln::@return
  __breturn:
    // [30] return 
    rts
    // print_ln::@2
  __b2:
    // [31] print_line_cursor#26 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_line_cursor_1
    lda.z print_line_cursor+1
    sta.z print_line_cursor_1+1
    jmp __b1_from___b2
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(void *str, char c, unsigned int num)
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = print_screen
    .label end = str+num
    .label dst = $11
    // [33] phi from memset to memset::@1 [phi:memset->memset::@1]
  __b1_from_memset:
    // [33] phi memset::dst#2 = (char *)memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    jmp __b1
    // memset::@1
  __b1:
    // [34] if(memset::dst#2!=memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z dst+1
    cmp #>end
    bne __b2
    lda.z dst
    cmp #<end
    bne __b2
    jmp __breturn
    // memset::@return
  __breturn:
    // [35] return 
    rts
    // memset::@2
  __b2:
    // [36] *memset::dst#2 = memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [37] memset::dst#1 = ++ memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [33] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
  __b1_from___b2:
    // [33] phi memset::dst#2 = memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // ultoa
// 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 ultoa(__zp(2) unsigned long value, __zp($a) char *buffer, char radix)
ultoa: {
    .const max_digits = $a
    .label value = 2
    .label digit_value = 6
    .label buffer = $a
    .label digit = $e
    // [39] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1]
  __b1_from_ultoa:
    // [39] phi ultoa::buffer#11 = decimal_digits_long [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits_long
    sta.z buffer
    lda #>decimal_digits_long
    sta.z buffer+1
    // [39] phi ultoa::started#2 = 0 [phi:ultoa->ultoa::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [39] phi ultoa::value#2 = ultoa::value#0 [phi:ultoa->ultoa::@1#2] -- register_copy 
    // [39] phi ultoa::digit#2 = 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z digit
    jmp __b1
    // ultoa::@1
  __b1:
    // [40] if(ultoa::digit#2<ultoa::max_digits#1-1) goto ultoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    jmp __b3
    // ultoa::@3
  __b3:
    // [41] ultoa::$11 = (char)ultoa::value#2 -- vbuaa=_byte_vduz1 
    lda.z value
    // [42] *ultoa::buffer#11 = DIGITS[ultoa::$11] -- _deref_pbuz1=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    ldy #0
    sta (buffer),y
    // [43] ultoa::buffer#4 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [44] *ultoa::buffer#4 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (buffer),y
    jmp __breturn
    // ultoa::@return
  __breturn:
    // [45] return 
    rts
    // ultoa::@2
  __b2:
    // [46] ultoa::$10 = ultoa::digit#2 << 2 -- vbuaa=vbuz1_rol_2 
    lda.z digit
    asl
    asl
    // [47] ultoa::digit_value#0 = RADIX_DECIMAL_VALUES_LONG[ultoa::$10] -- vduz1=pduc1_derefidx_vbuaa 
    tay
    lda RADIX_DECIMAL_VALUES_LONG,y
    sta.z digit_value
    lda RADIX_DECIMAL_VALUES_LONG+1,y
    sta.z digit_value+1
    lda RADIX_DECIMAL_VALUES_LONG+2,y
    sta.z digit_value+2
    lda RADIX_DECIMAL_VALUES_LONG+3,y
    sta.z digit_value+3
    // [48] if(0!=ultoa::started#2) goto ultoa::@5 -- 0_neq_vbuxx_then_la1 
    cpx #0
    bne __b5
    jmp __b7
    // ultoa::@7
  __b7:
    // [49] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 -- vduz1_ge_vduz2_then_la1 
    lda.z value+3
    cmp.z digit_value+3
    bcc !+
    bne __b5
    lda.z value+2
    cmp.z digit_value+2
    bcc !+
    bne __b5
    lda.z value+1
    cmp.z digit_value+1
    bcc !+
    bne __b5
    lda.z value
    cmp.z digit_value
    bcs __b5
  !:
    // [50] phi from ultoa::@7 to ultoa::@4 [phi:ultoa::@7->ultoa::@4]
  __b4_from___b7:
    // [50] phi ultoa::buffer#14 = ultoa::buffer#11 [phi:ultoa::@7->ultoa::@4#0] -- register_copy 
    // [50] phi ultoa::started#4 = ultoa::started#2 [phi:ultoa::@7->ultoa::@4#1] -- register_copy 
    // [50] phi ultoa::value#6 = ultoa::value#2 [phi:ultoa::@7->ultoa::@4#2] -- register_copy 
    jmp __b4
    // ultoa::@4
  __b4:
    // [51] ultoa::digit#1 = ++ ultoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [39] phi from ultoa::@4 to ultoa::@1 [phi:ultoa::@4->ultoa::@1]
  __b1_from___b4:
    // [39] phi ultoa::buffer#11 = ultoa::buffer#14 [phi:ultoa::@4->ultoa::@1#0] -- register_copy 
    // [39] phi ultoa::started#2 = ultoa::started#4 [phi:ultoa::@4->ultoa::@1#1] -- register_copy 
    // [39] phi ultoa::value#2 = ultoa::value#6 [phi:ultoa::@4->ultoa::@1#2] -- register_copy 
    // [39] phi ultoa::digit#2 = ultoa::digit#1 [phi:ultoa::@4->ultoa::@1#3] -- register_copy 
    jmp __b1
    // ultoa::@5
  __b5:
    // [52] ultoa_append::buffer#0 = ultoa::buffer#11
    // [53] ultoa_append::value#0 = ultoa::value#2
    // [54] ultoa_append::sub#0 = ultoa::digit_value#0
    // [55] call ultoa_append
    // [66] phi from ultoa::@5 to ultoa_append [phi:ultoa::@5->ultoa_append]
  ultoa_append_from___b5:
    jsr ultoa_append
    // [56] ultoa_append::return#0 = ultoa_append::value#2
    jmp __b6
    // ultoa::@6
  __b6:
    // [57] ultoa::value#1 = ultoa_append::return#0
    // [58] ultoa::buffer#5 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [50] phi from ultoa::@6 to ultoa::@4 [phi:ultoa::@6->ultoa::@4]
  __b4_from___b6:
    // [50] phi ultoa::buffer#14 = ultoa::buffer#5 [phi:ultoa::@6->ultoa::@4#0] -- register_copy 
    // [50] phi ultoa::started#4 = 1 [phi:ultoa::@6->ultoa::@4#1] -- vbuxx=vbuc1 
    ldx #1
    // [50] phi ultoa::value#6 = ultoa::value#1 [phi:ultoa::@6->ultoa::@4#2] -- register_copy 
    jmp __b4
}
  // print_str
// Print a zero-terminated string
// void print_str(__zp($a) char *str)
print_str: {
    .label str = $a
    // [59] print_char_cursor#42 = print_char_cursor#13 -- pbuz1=pbuz2 
    lda.z print_char_cursor_1
    sta.z print_char_cursor
    lda.z print_char_cursor_1+1
    sta.z print_char_cursor+1
    // [60] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
  __b1_from_print_str:
    // [60] phi print_char_cursor#1 = print_char_cursor#42 [phi:print_str->print_str::@1#0] -- register_copy 
    // [60] phi print_str::str#2 = decimal_digits_long [phi:print_str->print_str::@1#1] -- pbuz1=pbuc1 
    lda #<decimal_digits_long
    sta.z str
    lda #>decimal_digits_long
    sta.z str+1
    jmp __b1
    // print_str::@1
  __b1:
    // [61] 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:
    // [62] return 
    rts
    // print_str::@2
  __b2:
    // [63] print_char::ch#0 = *print_str::str#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (str),y
    // [64] call print_char
    jsr print_char
    jmp __b3
    // print_str::@3
  __b3:
    // [65] print_str::str#0 = ++ print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [60] phi from print_str::@3 to print_str::@1 [phi:print_str::@3->print_str::@1]
  __b1_from___b3:
    // [60] phi print_char_cursor#1 = print_char_cursor#24 [phi:print_str::@3->print_str::@1#0] -- register_copy 
    // [60] phi print_str::str#2 = print_str::str#0 [phi:print_str::@3->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // ultoa_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 long ultoa_append(__zp($a) char *buffer, __zp(2) unsigned long value, __zp(6) unsigned long sub)
ultoa_append: {
    .label buffer = $a
    .label value = 2
    .label sub = 6
    .label return = 2
    // [67] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1]
  __b1_from_ultoa_append:
    // [67] phi ultoa_append::digit#2 = 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [67] phi ultoa_append::value#2 = ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy 
    jmp __b1
    // ultoa_append::@1
  __b1:
    // [68] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 
    lda.z value+3
    cmp.z sub+3
    bcc !+
    bne __b2
    lda.z value+2
    cmp.z sub+2
    bcc !+
    bne __b2
    lda.z value+1
    cmp.z sub+1
    bcc !+
    bne __b2
    lda.z value
    cmp.z sub
    bcs __b2
  !:
    jmp __b3
    // ultoa_append::@3
  __b3:
    // [69] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    jmp __breturn
    // ultoa_append::@return
  __breturn:
    // [70] return 
    rts
    // ultoa_append::@2
  __b2:
    // [71] ultoa_append::digit#1 = ++ ultoa_append::digit#2 -- vbuxx=_inc_vbuxx 
    inx
    // [72] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 
    lda.z value
    sec
    sbc.z sub
    sta.z value
    lda.z value+1
    sbc.z sub+1
    sta.z value+1
    lda.z value+2
    sbc.z sub+2
    sta.z value+2
    lda.z value+3
    sbc.z sub+3
    sta.z value+3
    // [67] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1]
  __b1_from___b2:
    // [67] phi ultoa_append::digit#2 = ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy 
    // [67] phi ultoa_append::value#2 = ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_append::@1#1] -- register_copy 
    jmp __b1
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // [73] *print_char_cursor#1 = print_char::ch#0 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [74] print_char_cursor#24 = ++ print_char_cursor#1 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [75] return 
    rts
}
  // File Data
.segment Data
  // The digits used for numbers
  DIGITS: .text "0123456789abcdef"
  // Values of decimal digits
  RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
  // Digits used for storing the decimal unsigned int
  decimal_digits_long: .fill $b, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __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 __b3
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda.z print_line_cursor+1
Replacing instruction lda #0 with TXA
Replacing instruction ldy #0 with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b1_from___b2 with __b1
Removing instruction __b3_from___b2:
Removing instruction print_ln_from___b3:
Removing instruction __b1_from_print_ulong_decimal:
Removing instruction __b1_from_print_ln:
Removing instruction __b1_from___b2:
Removing instruction __b4_from___b7:
Removing instruction ultoa_append_from___b5:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction print_cls_from_main:
Removing instruction __b1_from_main:
Removing instruction __breturn:
Removing instruction __b3:
Removing instruction __b4:
Removing instruction __b1_from___b4:
Removing instruction memset_from_print_cls:
Removing instruction __breturn:
Removing instruction ultoa_from_print_ulong_decimal:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction __b1_from_memset:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __b1_from_ultoa:
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 __b3:
Removing instruction __b1_from___b3:
Removing instruction __b1_from_ultoa_append:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

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 long RADIX_DECIMAL_VALUES_LONG[] = { $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a }
__constant char decimal_digits_long[$b] = { fill( $b, 0) }
void main()
unsigned long main::$10 // zp[4]:2 22.0
unsigned long main::$11 // zp[4]:2 22.0
unsigned long main::$5 // zp[4]:2 22.0
unsigned long main::$6 // zp[4]:2 22.0
unsigned long main::$7 // zp[4]:2 22.0
unsigned long main::$8 // zp[4]:2 22.0
unsigned long main::$9 // zp[4]:2 22.0
unsigned long main::i
unsigned long main::i#1 // i zp[4]:19 11.0
unsigned long main::i#2 // i zp[4]:19 6.769230769230768
void * memset(void *str , char c , unsigned int num)
char memset::c
__constant char memset::c#0 = ' ' // c
char *memset::dst
char *memset::dst#1 // dst zp[2]:17 2002.0
char *memset::dst#2 // dst zp[2]:17 1334.6666666666667
char *memset::end
__constant char *memset::end#0 = (char *)memset::str#0+memset::num#0 // end
unsigned int memset::num
__constant unsigned int memset::num#0 = $3e8 // num
void *memset::return
void *memset::str
__constant void *memset::str#0 = (void *)print_screen#0 // str
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // reg byte a 1100002.0
char *print_char_cursor
char *print_char_cursor#1 // print_char_cursor zp[2]:12 150786.07142857142
char *print_char_cursor#13 // print_char_cursor_1 zp[2]:17 77.84615384615384
char *print_char_cursor#24 // print_char_cursor zp[2]:12 275000.5
char *print_char_cursor#42 // print_char_cursor zp[2]:12 2002.0
void print_cls()
char *print_line_cursor
char *print_line_cursor#0 // print_line_cursor zp[2]:17 5004.166666666666
char *print_line_cursor#10 // print_line_cursor_1 zp[2]:15 20103.0
char *print_line_cursor#16 // print_line_cursor_1 zp[2]:15 8.615384615384615
char *print_line_cursor#26 // print_line_cursor_1 zp[2]:15 20002.0
char *print_line_cursor#27 // print_line_cursor_1 zp[2]:15 22.0
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]:10 200002.0
char *print_str::str#2 // str zp[2]:10 100001.0
void print_ulong_decimal(unsigned long w)
unsigned long print_ulong_decimal::w
unsigned long print_ulong_decimal::w#0 // w zp[4]:2 112.0
void ultoa(unsigned long value , char *buffer , char radix)
char ultoa::$10 // reg byte a 200002.0
char ultoa::$11 // reg byte a 2002.0
char *ultoa::buffer
char *ultoa::buffer#11 // buffer zp[2]:10 28714.714285714286
char *ultoa::buffer#14 // buffer zp[2]:10 150001.5
char *ultoa::buffer#4 // buffer zp[2]:10 2002.0
char *ultoa::buffer#5 // buffer zp[2]:10 200002.0
char ultoa::digit
char ultoa::digit#1 // digit zp[1]:14 200002.0
char ultoa::digit#2 // digit zp[1]:14 28571.714285714286
unsigned long ultoa::digit_value
unsigned long ultoa::digit_value#0 // digit_value zp[4]:6 60000.600000000006
unsigned long *ultoa::digit_values
char ultoa::max_digits
__constant char ultoa::max_digits#1 = $a // max_digits
char ultoa::radix
char ultoa::started
char ultoa::started#2 // reg byte x 50000.5
char ultoa::started#4 // reg byte x 100001.0
unsigned long ultoa::value
unsigned long ultoa::value#0 // value zp[4]:2 551.0
unsigned long ultoa::value#1 // value zp[4]:2 100001.0
unsigned long ultoa::value#2 // value zp[4]:2 57286.42857142857
unsigned long ultoa::value#6 // value zp[4]:2 150001.5
unsigned long ultoa_append(char *buffer , unsigned long value , unsigned long sub)
char *ultoa_append::buffer
char *ultoa_append::buffer#0 // buffer zp[2]:10 137500.25
char ultoa_append::digit
char ultoa_append::digit#1 // reg byte x 1.000000001E9
char ultoa_append::digit#2 // reg byte x 1.0005000015E9
unsigned long ultoa_append::return
unsigned long ultoa_append::return#0 // return zp[4]:2 200002.0
unsigned long ultoa_append::sub
unsigned long ultoa_append::sub#0 // sub zp[4]:6 3.333500005E8
unsigned long ultoa_append::value
unsigned long ultoa_append::value#0 // value zp[4]:2 366667.3333333334
unsigned long ultoa_append::value#1 // value zp[4]:2 2.000000002E9
unsigned long ultoa_append::value#2 // value zp[4]:2 5.0018333416666675E8

zp[4]:19 [ main::i#2 main::i#1 ]
zp[2]:15 [ print_line_cursor#10 print_line_cursor#16 print_line_cursor#27 print_line_cursor#26 ]
zp[2]:17 [ memset::dst#2 memset::dst#1 print_char_cursor#13 print_line_cursor#0 ]
zp[1]:14 [ ultoa::digit#2 ultoa::digit#1 ]
zp[4]:2 [ ultoa::value#2 ultoa::value#6 ultoa::value#0 ultoa::value#1 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 print_ulong_decimal::w#0 ultoa_append::return#0 main::$11 main::$9 main::$10 main::$5 main::$6 main::$7 main::$8 ]
reg byte x [ ultoa::started#2 ultoa::started#4 ]
zp[2]:10 [ print_str::str#2 print_str::str#0 ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#5 ultoa::buffer#4 ultoa_append::buffer#0 ]
zp[2]:12 [ print_char_cursor#1 print_char_cursor#42 print_char_cursor#24 ]
reg byte x [ ultoa_append::digit#2 ultoa_append::digit#1 ]
reg byte a [ ultoa::$11 ]
reg byte a [ ultoa::$10 ]
zp[4]:6 [ ultoa::digit_value#0 ultoa_append::sub#0 ]
reg byte a [ print_char::ch#0 ]


FINAL ASSEMBLER
Score: 115473

  // 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="multiply-16bit-const.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(main)
  // Global Constants & labels
  .label print_screen = $400
  .label print_char_cursor = $c
  .label print_line_cursor = $11
  .label print_char_cursor_1 = $11
  .label print_line_cursor_1 = $f
.segment Code
  // main
main: {
    .label i = $13
    .label __5 = 2
    .label __6 = 2
    .label __7 = 2
    .label __8 = 2
    .label __9 = 2
    .label __10 = 2
    .label __11 = 2
    // print_cls()
    // [1] call print_cls
    // [18] phi from main to print_cls [phi:main->print_cls]
    jsr print_cls
    // [2] phi from main to main::@1 [phi:main->main::@1]
    // [2] phi print_char_cursor#13 = print_screen#0 [phi:main->main::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor_1
    lda #>print_screen
    sta.z print_char_cursor_1+1
    // [2] phi print_line_cursor#16 = print_screen#0 [phi:main->main::@1#1] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor_1
    lda #>print_screen
    sta.z print_line_cursor_1+1
    // [2] phi main::i#2 = 0 [phi:main->main::@1#2] -- vduz1=vduc1 
    lda #<0
    sta.z i
    sta.z i+1
    lda #<0>>$10
    sta.z i+2
    lda #>0>>$10
    sta.z i+3
    // main::@1
  __b1:
    // for(unsigned long i=0;i<3330;i+=333)
    // [3] if(main::i#2<$d02) goto main::@2 -- vduz1_lt_vduc1_then_la1 
    lda.z i+3
    cmp #>$d02>>$10
    bcc __b2
    bne !+
    lda.z i+2
    cmp #<$d02>>$10
    bcc __b2
    bne !+
    lda.z i+1
    cmp #>$d02
    bcc __b2
    bne !+
    lda.z i
    cmp #<$d02
    bcc __b2
  !:
    // main::@return
    // }
    // [4] return 
    rts
    // main::@2
  __b2:
    // print_ulong_decimal(i*555)
    // [5] main::$5 = main::i#2 << 4 -- vduz1=vduz2_rol_4 
    lda.z i
    asl
    sta.z __5
    lda.z i+1
    rol
    sta.z __5+1
    lda.z i+2
    rol
    sta.z __5+2
    lda.z i+3
    rol
    sta.z __5+3
    asl.z __5
    rol.z __5+1
    rol.z __5+2
    rol.z __5+3
    asl.z __5
    rol.z __5+1
    rol.z __5+2
    rol.z __5+3
    asl.z __5
    rol.z __5+1
    rol.z __5+2
    rol.z __5+3
    // [6] main::$6 = main::$5 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z __6
    adc.z i
    sta.z __6
    lda.z __6+1
    adc.z i+1
    sta.z __6+1
    lda.z __6+2
    adc.z i+2
    sta.z __6+2
    lda.z __6+3
    adc.z i+3
    sta.z __6+3
    // [7] main::$7 = main::$6 << 2 -- vduz1=vduz1_rol_2 
    asl.z __7
    rol.z __7+1
    rol.z __7+2
    rol.z __7+3
    asl.z __7
    rol.z __7+1
    rol.z __7+2
    rol.z __7+3
    // [8] main::$8 = main::$7 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z __8
    adc.z i
    sta.z __8
    lda.z __8+1
    adc.z i+1
    sta.z __8+1
    lda.z __8+2
    adc.z i+2
    sta.z __8+2
    lda.z __8+3
    adc.z i+3
    sta.z __8+3
    // [9] main::$9 = main::$8 << 2 -- vduz1=vduz1_rol_2 
    asl.z __9
    rol.z __9+1
    rol.z __9+2
    rol.z __9+3
    asl.z __9
    rol.z __9+1
    rol.z __9+2
    rol.z __9+3
    // [10] main::$10 = main::$9 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z __10
    adc.z i
    sta.z __10
    lda.z __10+1
    adc.z i+1
    sta.z __10+1
    lda.z __10+2
    adc.z i+2
    sta.z __10+2
    lda.z __10+3
    adc.z i+3
    sta.z __10+3
    // [11] main::$11 = main::$10 << 1 -- vduz1=vduz1_rol_1 
    asl.z __11
    rol.z __11+1
    rol.z __11+2
    rol.z __11+3
    // [12] print_ulong_decimal::w#0 = main::$11 + main::i#2 -- vduz1=vduz1_plus_vduz2 
    clc
    lda.z print_ulong_decimal.w
    adc.z i
    sta.z print_ulong_decimal.w
    lda.z print_ulong_decimal.w+1
    adc.z i+1
    sta.z print_ulong_decimal.w+1
    lda.z print_ulong_decimal.w+2
    adc.z i+2
    sta.z print_ulong_decimal.w+2
    lda.z print_ulong_decimal.w+3
    adc.z i+3
    sta.z print_ulong_decimal.w+3
    // [13] call print_ulong_decimal
    jsr print_ulong_decimal
    // [14] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // main::@3
    // print_ln()
    // [15] call print_ln
    // [26] phi from main::@3 to print_ln [phi:main::@3->print_ln]
    jsr print_ln
    // main::@4
    // i+=333
    // [16] main::i#1 = main::i#2 + $14d -- vduz1=vduz1_plus_vwuc1 
    clc
    lda.z i
    adc #<$14d
    sta.z i
    lda.z i+1
    adc #>$14d
    sta.z i+1
    lda.z i+2
    adc #0
    sta.z i+2
    lda.z i+3
    adc #0
    sta.z i+3
    // [17] print_line_cursor#27 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_line_cursor_1
    lda.z print_line_cursor+1
    sta.z print_line_cursor_1+1
    // [2] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
    // [2] phi print_char_cursor#13 = print_line_cursor#0 [phi:main::@4->main::@1#0] -- register_copy 
    // [2] phi print_line_cursor#16 = print_line_cursor#27 [phi:main::@4->main::@1#1] -- register_copy 
    // [2] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#2] -- register_copy 
    jmp __b1
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // memset(print_screen, ' ', 1000)
    // [19] call memset
    // [32] phi from print_cls to memset [phi:print_cls->memset]
    jsr memset
    // print_cls::@return
    // }
    // [20] return 
    rts
}
  // print_ulong_decimal
// Print a unsigned long as DECIMAL
// void print_ulong_decimal(__zp(2) unsigned long w)
print_ulong_decimal: {
    .label w = 2
    // ultoa(w, decimal_digits_long, DECIMAL)
    // [21] ultoa::value#0 = print_ulong_decimal::w#0
    // [22] call ultoa
    // [38] phi from print_ulong_decimal to ultoa [phi:print_ulong_decimal->ultoa]
    jsr ultoa
    // [23] phi from print_ulong_decimal to print_ulong_decimal::@1 [phi:print_ulong_decimal->print_ulong_decimal::@1]
    // print_ulong_decimal::@1
    // print_str(decimal_digits_long)
    // [24] call print_str
    jsr print_str
    // print_ulong_decimal::@return
    // }
    // [25] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [27] phi from print_ln print_ln::@2 to print_ln::@1 [phi:print_ln/print_ln::@2->print_ln::@1]
    // [27] phi print_line_cursor#10 = print_line_cursor#16 [phi:print_ln/print_ln::@2->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  __b1:
    // print_line_cursor + $28
    // [28] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz2_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor_1
    sta.z print_line_cursor
    lda #0
    adc.z print_line_cursor_1+1
    sta.z print_line_cursor+1
    // while (print_line_cursor<print_char_cursor)
    // [29] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@2 -- pbuz1_lt_pbuz2_then_la1 
    cmp.z print_char_cursor+1
    bcc __b2
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b2
  !:
    // print_ln::@return
    // }
    // [30] return 
    rts
    // print_ln::@2
  __b2:
    // [31] print_line_cursor#26 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_line_cursor_1
    lda.z print_line_cursor+1
    sta.z print_line_cursor_1+1
    jmp __b1
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(void *str, char c, unsigned int num)
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = print_screen
    .label end = str+num
    .label dst = $11
    // [33] phi from memset to memset::@1 [phi:memset->memset::@1]
    // [33] phi memset::dst#2 = (char *)memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    // memset::@1
  __b1:
    // for(char* dst = str; dst!=end; dst++)
    // [34] if(memset::dst#2!=memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z dst+1
    cmp #>end
    bne __b2
    lda.z dst
    cmp #<end
    bne __b2
    // memset::@return
    // }
    // [35] return 
    rts
    // memset::@2
  __b2:
    // *dst = c
    // [36] *memset::dst#2 = memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [37] memset::dst#1 = ++ memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [33] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
    // [33] phi memset::dst#2 = memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // ultoa
// 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 ultoa(__zp(2) unsigned long value, __zp($a) char *buffer, char radix)
ultoa: {
    .const max_digits = $a
    .label value = 2
    .label digit_value = 6
    .label buffer = $a
    .label digit = $e
    // [39] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1]
    // [39] phi ultoa::buffer#11 = decimal_digits_long [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 
    lda #<decimal_digits_long
    sta.z buffer
    lda #>decimal_digits_long
    sta.z buffer+1
    // [39] phi ultoa::started#2 = 0 [phi:ultoa->ultoa::@1#1] -- vbuxx=vbuc1 
    ldx #0
    // [39] phi ultoa::value#2 = ultoa::value#0 [phi:ultoa->ultoa::@1#2] -- register_copy 
    // [39] phi ultoa::digit#2 = 0 [phi:ultoa->ultoa::@1#3] -- vbuz1=vbuc1 
    txa
    sta.z digit
    // ultoa::@1
  __b1:
    // for( char digit=0; digit<max_digits-1; digit++ )
    // [40] if(ultoa::digit#2<ultoa::max_digits#1-1) goto ultoa::@2 -- vbuz1_lt_vbuc1_then_la1 
    lda.z digit
    cmp #max_digits-1
    bcc __b2
    // ultoa::@3
    // *buffer++ = DIGITS[(char)value]
    // [41] ultoa::$11 = (char)ultoa::value#2 -- vbuaa=_byte_vduz1 
    lda.z value
    // [42] *ultoa::buffer#11 = DIGITS[ultoa::$11] -- _deref_pbuz1=pbuc1_derefidx_vbuaa 
    tay
    lda DIGITS,y
    ldy #0
    sta (buffer),y
    // *buffer++ = DIGITS[(char)value];
    // [43] ultoa::buffer#4 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // *buffer = 0
    // [44] *ultoa::buffer#4 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (buffer),y
    // ultoa::@return
    // }
    // [45] return 
    rts
    // ultoa::@2
  __b2:
    // unsigned long digit_value = digit_values[digit]
    // [46] ultoa::$10 = ultoa::digit#2 << 2 -- vbuaa=vbuz1_rol_2 
    lda.z digit
    asl
    asl
    // [47] ultoa::digit_value#0 = RADIX_DECIMAL_VALUES_LONG[ultoa::$10] -- vduz1=pduc1_derefidx_vbuaa 
    tay
    lda RADIX_DECIMAL_VALUES_LONG,y
    sta.z digit_value
    lda RADIX_DECIMAL_VALUES_LONG+1,y
    sta.z digit_value+1
    lda RADIX_DECIMAL_VALUES_LONG+2,y
    sta.z digit_value+2
    lda RADIX_DECIMAL_VALUES_LONG+3,y
    sta.z digit_value+3
    // if (started || value >= digit_value)
    // [48] if(0!=ultoa::started#2) goto ultoa::@5 -- 0_neq_vbuxx_then_la1 
    cpx #0
    bne __b5
    // ultoa::@7
    // [49] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5 -- vduz1_ge_vduz2_then_la1 
    lda.z value+3
    cmp.z digit_value+3
    bcc !+
    bne __b5
    lda.z value+2
    cmp.z digit_value+2
    bcc !+
    bne __b5
    lda.z value+1
    cmp.z digit_value+1
    bcc !+
    bne __b5
    lda.z value
    cmp.z digit_value
    bcs __b5
  !:
    // [50] phi from ultoa::@7 to ultoa::@4 [phi:ultoa::@7->ultoa::@4]
    // [50] phi ultoa::buffer#14 = ultoa::buffer#11 [phi:ultoa::@7->ultoa::@4#0] -- register_copy 
    // [50] phi ultoa::started#4 = ultoa::started#2 [phi:ultoa::@7->ultoa::@4#1] -- register_copy 
    // [50] phi ultoa::value#6 = ultoa::value#2 [phi:ultoa::@7->ultoa::@4#2] -- register_copy 
    // ultoa::@4
  __b4:
    // for( char digit=0; digit<max_digits-1; digit++ )
    // [51] ultoa::digit#1 = ++ ultoa::digit#2 -- vbuz1=_inc_vbuz1 
    inc.z digit
    // [39] phi from ultoa::@4 to ultoa::@1 [phi:ultoa::@4->ultoa::@1]
    // [39] phi ultoa::buffer#11 = ultoa::buffer#14 [phi:ultoa::@4->ultoa::@1#0] -- register_copy 
    // [39] phi ultoa::started#2 = ultoa::started#4 [phi:ultoa::@4->ultoa::@1#1] -- register_copy 
    // [39] phi ultoa::value#2 = ultoa::value#6 [phi:ultoa::@4->ultoa::@1#2] -- register_copy 
    // [39] phi ultoa::digit#2 = ultoa::digit#1 [phi:ultoa::@4->ultoa::@1#3] -- register_copy 
    jmp __b1
    // ultoa::@5
  __b5:
    // ultoa_append(buffer++, value, digit_value)
    // [52] ultoa_append::buffer#0 = ultoa::buffer#11
    // [53] ultoa_append::value#0 = ultoa::value#2
    // [54] ultoa_append::sub#0 = ultoa::digit_value#0
    // [55] call ultoa_append
    // [66] phi from ultoa::@5 to ultoa_append [phi:ultoa::@5->ultoa_append]
    jsr ultoa_append
    // ultoa_append(buffer++, value, digit_value)
    // [56] ultoa_append::return#0 = ultoa_append::value#2
    // ultoa::@6
    // value = ultoa_append(buffer++, value, digit_value)
    // [57] ultoa::value#1 = ultoa_append::return#0
    // value = ultoa_append(buffer++, value, digit_value);
    // [58] ultoa::buffer#5 = ++ ultoa::buffer#11 -- pbuz1=_inc_pbuz1 
    inc.z buffer
    bne !+
    inc.z buffer+1
  !:
    // [50] phi from ultoa::@6 to ultoa::@4 [phi:ultoa::@6->ultoa::@4]
    // [50] phi ultoa::buffer#14 = ultoa::buffer#5 [phi:ultoa::@6->ultoa::@4#0] -- register_copy 
    // [50] phi ultoa::started#4 = 1 [phi:ultoa::@6->ultoa::@4#1] -- vbuxx=vbuc1 
    ldx #1
    // [50] phi ultoa::value#6 = ultoa::value#1 [phi:ultoa::@6->ultoa::@4#2] -- register_copy 
    jmp __b4
}
  // print_str
// Print a zero-terminated string
// void print_str(__zp($a) char *str)
print_str: {
    .label str = $a
    // [59] print_char_cursor#42 = print_char_cursor#13 -- pbuz1=pbuz2 
    lda.z print_char_cursor_1
    sta.z print_char_cursor
    lda.z print_char_cursor_1+1
    sta.z print_char_cursor+1
    // [60] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
    // [60] phi print_char_cursor#1 = print_char_cursor#42 [phi:print_str->print_str::@1#0] -- register_copy 
    // [60] phi print_str::str#2 = decimal_digits_long [phi:print_str->print_str::@1#1] -- pbuz1=pbuc1 
    lda #<decimal_digits_long
    sta.z str
    lda #>decimal_digits_long
    sta.z str+1
    // print_str::@1
  __b1:
    // while(*str)
    // [61] 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
    // }
    // [62] return 
    rts
    // print_str::@2
  __b2:
    // print_char(*(str++))
    // [63] print_char::ch#0 = *print_str::str#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (str),y
    // [64] call print_char
    jsr print_char
    // print_str::@3
    // print_char(*(str++));
    // [65] print_str::str#0 = ++ print_str::str#2 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    // [60] phi from print_str::@3 to print_str::@1 [phi:print_str::@3->print_str::@1]
    // [60] phi print_char_cursor#1 = print_char_cursor#24 [phi:print_str::@3->print_str::@1#0] -- register_copy 
    // [60] phi print_str::str#2 = print_str::str#0 [phi:print_str::@3->print_str::@1#1] -- register_copy 
    jmp __b1
}
  // ultoa_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 long ultoa_append(__zp($a) char *buffer, __zp(2) unsigned long value, __zp(6) unsigned long sub)
ultoa_append: {
    .label buffer = $a
    .label value = 2
    .label sub = 6
    .label return = 2
    // [67] phi from ultoa_append to ultoa_append::@1 [phi:ultoa_append->ultoa_append::@1]
    // [67] phi ultoa_append::digit#2 = 0 [phi:ultoa_append->ultoa_append::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [67] phi ultoa_append::value#2 = ultoa_append::value#0 [phi:ultoa_append->ultoa_append::@1#1] -- register_copy 
    // ultoa_append::@1
  __b1:
    // while (value >= sub)
    // [68] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2 -- vduz1_ge_vduz2_then_la1 
    lda.z value+3
    cmp.z sub+3
    bcc !+
    bne __b2
    lda.z value+2
    cmp.z sub+2
    bcc !+
    bne __b2
    lda.z value+1
    cmp.z sub+1
    bcc !+
    bne __b2
    lda.z value
    cmp.z sub
    bcs __b2
  !:
    // ultoa_append::@3
    // *buffer = DIGITS[digit]
    // [69] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2] -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda DIGITS,x
    ldy #0
    sta (buffer),y
    // ultoa_append::@return
    // }
    // [70] return 
    rts
    // ultoa_append::@2
  __b2:
    // digit++;
    // [71] ultoa_append::digit#1 = ++ ultoa_append::digit#2 -- vbuxx=_inc_vbuxx 
    inx
    // value -= sub
    // [72] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0 -- vduz1=vduz1_minus_vduz2 
    lda.z value
    sec
    sbc.z sub
    sta.z value
    lda.z value+1
    sbc.z sub+1
    sta.z value+1
    lda.z value+2
    sbc.z sub+2
    sta.z value+2
    lda.z value+3
    sbc.z sub+3
    sta.z value+3
    // [67] phi from ultoa_append::@2 to ultoa_append::@1 [phi:ultoa_append::@2->ultoa_append::@1]
    // [67] phi ultoa_append::digit#2 = ultoa_append::digit#1 [phi:ultoa_append::@2->ultoa_append::@1#0] -- register_copy 
    // [67] phi ultoa_append::value#2 = ultoa_append::value#1 [phi:ultoa_append::@2->ultoa_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
    // [73] *print_char_cursor#1 = print_char::ch#0 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [74] print_char_cursor#24 = ++ print_char_cursor#1 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [75] return 
    rts
}
  // File Data
.segment Data
  // The digits used for numbers
  DIGITS: .text "0123456789abcdef"
  // Values of decimal digits
  RADIX_DECIMAL_VALUES_LONG: .dword $3b9aca00, $5f5e100, $989680, $f4240, $186a0, $2710, $3e8, $64, $a
  // Digits used for storing the decimal unsigned int
  decimal_digits_long: .fill $b, 0

