Inlined call call prepareMEM(setFAC::w)
Inlined call call prepareMEM((unsigned int)setMEMtoFAC::mem)
Inlined call call prepareMEM((unsigned int)setFACtoMEM::mem)
Inlined call call prepareMEM((unsigned int)setARGtoMEM::mem)
Inlined call call prepareMEM((unsigned int)addMEMtoFAC::mem)
Inlined call call prepareMEM((unsigned int)subFACfromMEM::mem)
Inlined call call prepareMEM((unsigned int)divMEMbyFAC::mem)
Inlined call call prepareMEM((unsigned int)mulFACbyMEM::mem)
Inlined call call prepareMEM((unsigned int)pwrMEMbyFAC::mem)
Inlined call call __init
Eliminating unused variable with no statement getFAC::$0

CONTROL FLOW GRAPH SSA

void print_ln()
print_ln: scope:[print_ln]  from main::@14
  print_char_cursor#31 = phi( main::@14/print_char_cursor#10 )
  print_line_cursor#14 = phi( main::@14/print_line_cursor#15 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  print_char_cursor#16 = phi( print_ln/print_char_cursor#31, print_ln::@1/print_char_cursor#16 )
  print_line_cursor#7 = phi( print_ln/print_line_cursor#14, print_ln::@1/print_line_cursor#0 )
  print_ln::$0 = print_line_cursor#7 + $28
  print_line_cursor#0 = print_ln::$0
  print_ln::$1 = print_line_cursor#0 < print_char_cursor#16
  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#8 = phi( print_ln::@1/print_line_cursor#0 )
  print_char_cursor#0 = print_line_cursor#8
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  print_char_cursor#17 = phi( print_ln::@2/print_char_cursor#0 )
  print_line_cursor#9 = phi( print_ln::@2/print_line_cursor#8 )
  print_line_cursor#1 = print_line_cursor#9
  print_char_cursor#1 = print_char_cursor#17
  return 
  to:@return

void print_uint(unsigned int w)
print_uint: scope:[print_uint]  from main::@13
  print_char_cursor#32 = phi( main::@13/print_char_cursor#34 )
  print_uint::w#1 = phi( main::@13/print_uint::w#0 )
  print_uint::$0 = byte1  print_uint::w#1
  print_uchar::b#0 = print_uint::$0
  call print_uchar
  to:print_uint::@1
print_uint::@1: scope:[print_uint]  from print_uint
  print_uint::w#2 = phi( print_uint/print_uint::w#1 )
  print_char_cursor#18 = phi( print_uint/print_char_cursor#7 )
  print_char_cursor#2 = print_char_cursor#18
  print_uint::$2 = byte0  print_uint::w#2
  print_uchar::b#1 = print_uint::$2
  call print_uchar
  to:print_uint::@2
print_uint::@2: scope:[print_uint]  from print_uint::@1
  print_char_cursor#19 = phi( print_uint::@1/print_char_cursor#7 )
  print_char_cursor#3 = print_char_cursor#19
  to:print_uint::@return
print_uint::@return: scope:[print_uint]  from print_uint::@2
  print_char_cursor#20 = phi( print_uint::@2/print_char_cursor#3 )
  print_char_cursor#4 = print_char_cursor#20
  return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from print_uint print_uint::@1
  print_char_cursor#33 = phi( print_uint/print_char_cursor#32, print_uint::@1/print_char_cursor#2 )
  print_uchar::b#2 = phi( print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
  print_uchar::$0 = print_uchar::b#2 >> 4
  print_char::ch#0 = print_hextab[print_uchar::$0]
  call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  print_uchar::b#3 = phi( print_uchar/print_uchar::b#2 )
  print_char_cursor#21 = phi( print_uchar/print_char_cursor#9 )
  print_char_cursor#5 = print_char_cursor#21
  print_uchar::$2 = print_uchar::b#3 & $f
  print_char::ch#1 = print_hextab[print_uchar::$2]
  call print_char
  to:print_uchar::@2
print_uchar::@2: scope:[print_uchar]  from print_uchar::@1
  print_char_cursor#22 = phi( print_uchar::@1/print_char_cursor#9 )
  print_char_cursor#6 = print_char_cursor#22
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@2
  print_char_cursor#23 = phi( print_uchar::@2/print_char_cursor#6 )
  print_char_cursor#7 = print_char_cursor#23
  return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_uchar print_uchar::@1
  print_char_cursor#24 = phi( print_uchar/print_char_cursor#33, print_uchar::@1/print_char_cursor#5 )
  print_char::ch#2 = phi( print_uchar/print_char::ch#0, print_uchar::@1/print_char::ch#1 )
  *print_char_cursor#24 = print_char::ch#2
  print_char_cursor#8 = ++ print_char_cursor#24
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  print_char_cursor#25 = phi( print_char/print_char_cursor#8 )
  print_char_cursor#9 = print_char_cursor#25
  return 
  to:@return

void setFAC(unsigned int w)
setFAC: scope:[setFAC]  from main main::@1 main::@7
  setFAC::w#3 = phi( main/setFAC::w#0, main::@1/setFAC::w#1, main::@7/setFAC::w#2 )
  setFAC::prepareMEM1_mem#0 = setFAC::w#3
  to:setFAC::prepareMEM1
setFAC::prepareMEM1: scope:[setFAC]  from setFAC
  setFAC::prepareMEM1_mem#1 = phi( setFAC/setFAC::prepareMEM1_mem#0 )
  setFAC::prepareMEM1_$0 = byte0  setFAC::prepareMEM1_mem#1
  *memLo = setFAC::prepareMEM1_$0
  setFAC::prepareMEM1_$1 = byte1  setFAC::prepareMEM1_mem#1
  *memHi = setFAC::prepareMEM1_$1
  to:setFAC::@1
setFAC::@1: scope:[setFAC]  from setFAC::prepareMEM1
  asm { ldymemLo ldamemHi jsr$b391  }
  to:setFAC::@return
setFAC::@return: scope:[setFAC]  from setFAC::@1
  return 
  to:@return

unsigned int getFAC()
getFAC: scope:[getFAC]  from main::@12
  asm { jsr$b1aa stymemLo stamemHi  }
  getFAC::w#0 = *memHi w= *memLo
  getFAC::return#0 = getFAC::w#0
  to:getFAC::@return
getFAC::@return: scope:[getFAC]  from getFAC
  getFAC::return#3 = phi( getFAC/getFAC::return#0 )
  getFAC::return#1 = getFAC::return#3
  return 
  to:@return

void setMEMtoFAC(char *mem)
setMEMtoFAC: scope:[setMEMtoFAC]  from main::@3 main::@6
  setMEMtoFAC::mem#2 = phi( main::@3/setMEMtoFAC::mem#0, main::@6/setMEMtoFAC::mem#1 )
  setMEMtoFAC::prepareMEM1_mem#0 = (unsigned int)setMEMtoFAC::mem#2
  to:setMEMtoFAC::prepareMEM1
setMEMtoFAC::prepareMEM1: scope:[setMEMtoFAC]  from setMEMtoFAC
  setMEMtoFAC::prepareMEM1_mem#1 = phi( setMEMtoFAC/setMEMtoFAC::prepareMEM1_mem#0 )
  setMEMtoFAC::prepareMEM1_$0 = byte0  setMEMtoFAC::prepareMEM1_mem#1
  *memLo = setMEMtoFAC::prepareMEM1_$0
  setMEMtoFAC::prepareMEM1_$1 = byte1  setMEMtoFAC::prepareMEM1_mem#1
  *memHi = setMEMtoFAC::prepareMEM1_$1
  to:setMEMtoFAC::@1
setMEMtoFAC::@1: scope:[setMEMtoFAC]  from setMEMtoFAC::prepareMEM1
  asm { ldxmemLo ldymemHi jsr$bbd4  }
  to:setMEMtoFAC::@return
setMEMtoFAC::@return: scope:[setMEMtoFAC]  from setMEMtoFAC::@1
  return 
  to:@return

void addMEMtoFAC(char *mem)
addMEMtoFAC: scope:[addMEMtoFAC]  from main::@11
  addMEMtoFAC::mem#1 = phi( main::@11/addMEMtoFAC::mem#0 )
  addMEMtoFAC::prepareMEM1_mem#0 = (unsigned int)addMEMtoFAC::mem#1
  to:addMEMtoFAC::prepareMEM1
addMEMtoFAC::prepareMEM1: scope:[addMEMtoFAC]  from addMEMtoFAC
  addMEMtoFAC::prepareMEM1_mem#1 = phi( addMEMtoFAC/addMEMtoFAC::prepareMEM1_mem#0 )
  addMEMtoFAC::prepareMEM1_$0 = byte0  addMEMtoFAC::prepareMEM1_mem#1
  *memLo = addMEMtoFAC::prepareMEM1_$0
  addMEMtoFAC::prepareMEM1_$1 = byte1  addMEMtoFAC::prepareMEM1_mem#1
  *memHi = addMEMtoFAC::prepareMEM1_$1
  to:addMEMtoFAC::@1
addMEMtoFAC::@1: scope:[addMEMtoFAC]  from addMEMtoFAC::prepareMEM1
  asm { ldamemLo ldymemHi jsr$b867  }
  to:addMEMtoFAC::@return
addMEMtoFAC::@return: scope:[addMEMtoFAC]  from addMEMtoFAC::@1
  return 
  to:@return

void divMEMbyFAC(char *mem)
divMEMbyFAC: scope:[divMEMbyFAC]  from main::@8
  divMEMbyFAC::mem#1 = phi( main::@8/divMEMbyFAC::mem#0 )
  divMEMbyFAC::prepareMEM1_mem#0 = (unsigned int)divMEMbyFAC::mem#1
  to:divMEMbyFAC::prepareMEM1
divMEMbyFAC::prepareMEM1: scope:[divMEMbyFAC]  from divMEMbyFAC
  divMEMbyFAC::prepareMEM1_mem#1 = phi( divMEMbyFAC/divMEMbyFAC::prepareMEM1_mem#0 )
  divMEMbyFAC::prepareMEM1_$0 = byte0  divMEMbyFAC::prepareMEM1_mem#1
  *memLo = divMEMbyFAC::prepareMEM1_$0
  divMEMbyFAC::prepareMEM1_$1 = byte1  divMEMbyFAC::prepareMEM1_mem#1
  *memHi = divMEMbyFAC::prepareMEM1_$1
  to:divMEMbyFAC::@1
divMEMbyFAC::@1: scope:[divMEMbyFAC]  from divMEMbyFAC::prepareMEM1
  asm { ldamemLo ldymemHi jsr$bb0f  }
  to:divMEMbyFAC::@return
divMEMbyFAC::@return: scope:[divMEMbyFAC]  from divMEMbyFAC::@1
  return 
  to:@return

void mulFACbyMEM(char *mem)
mulFACbyMEM: scope:[mulFACbyMEM]  from main::@10 main::@5
  mulFACbyMEM::mem#2 = phi( main::@10/mulFACbyMEM::mem#1, main::@5/mulFACbyMEM::mem#0 )
  mulFACbyMEM::prepareMEM1_mem#0 = (unsigned int)mulFACbyMEM::mem#2
  to:mulFACbyMEM::prepareMEM1
mulFACbyMEM::prepareMEM1: scope:[mulFACbyMEM]  from mulFACbyMEM
  mulFACbyMEM::prepareMEM1_mem#1 = phi( mulFACbyMEM/mulFACbyMEM::prepareMEM1_mem#0 )
  mulFACbyMEM::prepareMEM1_$0 = byte0  mulFACbyMEM::prepareMEM1_mem#1
  *memLo = mulFACbyMEM::prepareMEM1_$0
  mulFACbyMEM::prepareMEM1_$1 = byte1  mulFACbyMEM::prepareMEM1_mem#1
  *memHi = mulFACbyMEM::prepareMEM1_$1
  to:mulFACbyMEM::@1
mulFACbyMEM::@1: scope:[mulFACbyMEM]  from mulFACbyMEM::prepareMEM1
  asm { ldamemLo ldymemHi jsr$ba28  }
  to:mulFACbyMEM::@return
mulFACbyMEM::@return: scope:[mulFACbyMEM]  from mulFACbyMEM::@1
  return 
  to:@return

void sinFAC()
sinFAC: scope:[sinFAC]  from main::@9
  asm { jsr$e26b  }
  to:sinFAC::@return
sinFAC::@return: scope:[sinFAC]  from sinFAC
  return 
  to:@return

void divFACby10()
divFACby10: scope:[divFACby10]  from main::@2
  asm { jsr$bafe  }
  to:divFACby10::@return
divFACby10::@return: scope:[divFACby10]  from divFACby10
  return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  print_line_cursor#30 = phi( __start::@1/print_line_cursor#16 )
  print_char_cursor#48 = phi( __start::@1/print_char_cursor#35 )
  setFAC::w#0 = $4fb
  call setFAC
  to:main::@2
main::@2: scope:[main]  from main
  print_line_cursor#29 = phi( main/print_line_cursor#30 )
  print_char_cursor#47 = phi( main/print_char_cursor#48 )
  call divFACby10
  to:main::@3
main::@3: scope:[main]  from main::@2
  print_line_cursor#28 = phi( main::@2/print_line_cursor#29 )
  print_char_cursor#46 = phi( main::@2/print_char_cursor#47 )
  setMEMtoFAC::mem#0 = main::f_127
  call setMEMtoFAC
  to:main::@4
main::@4: scope:[main]  from main::@3
  print_line_cursor#27 = phi( main::@3/print_line_cursor#28 )
  print_char_cursor#45 = phi( main::@3/print_char_cursor#46 )
  main::i#0 = 1
  to:main::@1
main::@1: scope:[main]  from main::@15 main::@4
  print_line_cursor#26 = phi( main::@15/print_line_cursor#2, main::@4/print_line_cursor#27 )
  print_char_cursor#44 = phi( main::@15/print_char_cursor#11, main::@4/print_char_cursor#45 )
  main::i#2 = phi( main::@15/main::i#1, main::@4/main::i#0 )
  setFAC::w#1 = (unsigned int)main::i#2
  call setFAC
  to:main::@5
main::@5: scope:[main]  from main::@1
  main::i#13 = phi( main::@1/main::i#2 )
  print_line_cursor#25 = phi( main::@1/print_line_cursor#26 )
  print_char_cursor#43 = phi( main::@1/print_char_cursor#44 )
  mulFACbyMEM::mem#0 = main::f_2pi
  call mulFACbyMEM
  to:main::@6
main::@6: scope:[main]  from main::@5
  main::i#12 = phi( main::@5/main::i#13 )
  print_line_cursor#24 = phi( main::@5/print_line_cursor#25 )
  print_char_cursor#42 = phi( main::@5/print_char_cursor#43 )
  setMEMtoFAC::mem#1 = main::f_i
  call setMEMtoFAC
  to:main::@7
main::@7: scope:[main]  from main::@6
  main::i#11 = phi( main::@6/main::i#12 )
  print_line_cursor#23 = phi( main::@6/print_line_cursor#24 )
  print_char_cursor#41 = phi( main::@6/print_char_cursor#42 )
  setFAC::w#2 = $19
  call setFAC
  to:main::@8
main::@8: scope:[main]  from main::@7
  main::i#10 = phi( main::@7/main::i#11 )
  print_line_cursor#22 = phi( main::@7/print_line_cursor#23 )
  print_char_cursor#40 = phi( main::@7/print_char_cursor#41 )
  divMEMbyFAC::mem#0 = main::f_i
  call divMEMbyFAC
  to:main::@9
main::@9: scope:[main]  from main::@8
  main::i#9 = phi( main::@8/main::i#10 )
  print_line_cursor#21 = phi( main::@8/print_line_cursor#22 )
  print_char_cursor#39 = phi( main::@8/print_char_cursor#40 )
  call sinFAC
  to:main::@10
main::@10: scope:[main]  from main::@9
  main::i#8 = phi( main::@9/main::i#9 )
  print_line_cursor#20 = phi( main::@9/print_line_cursor#21 )
  print_char_cursor#38 = phi( main::@9/print_char_cursor#39 )
  mulFACbyMEM::mem#1 = main::f_127
  call mulFACbyMEM
  to:main::@11
main::@11: scope:[main]  from main::@10
  main::i#7 = phi( main::@10/main::i#8 )
  print_line_cursor#19 = phi( main::@10/print_line_cursor#20 )
  print_char_cursor#37 = phi( main::@10/print_char_cursor#38 )
  addMEMtoFAC::mem#0 = main::f_127
  call addMEMtoFAC
  to:main::@12
main::@12: scope:[main]  from main::@11
  main::i#6 = phi( main::@11/main::i#7 )
  print_line_cursor#18 = phi( main::@11/print_line_cursor#19 )
  print_char_cursor#36 = phi( main::@11/print_char_cursor#37 )
  call getFAC
  getFAC::return#2 = getFAC::return#1
  to:main::@13
main::@13: scope:[main]  from main::@12
  main::i#5 = phi( main::@12/main::i#6 )
  print_line_cursor#17 = phi( main::@12/print_line_cursor#18 )
  print_char_cursor#34 = phi( main::@12/print_char_cursor#36 )
  getFAC::return#4 = phi( main::@12/getFAC::return#2 )
  main::$11 = getFAC::return#4
  print_uint::w#0 = main::$11
  call print_uint
  to:main::@14
main::@14: scope:[main]  from main::@13
  main::i#4 = phi( main::@13/main::i#5 )
  print_line_cursor#15 = phi( main::@13/print_line_cursor#17 )
  print_char_cursor#26 = phi( main::@13/print_char_cursor#4 )
  print_char_cursor#10 = print_char_cursor#26
  call print_ln
  to:main::@15
main::@15: scope:[main]  from main::@14
  main::i#3 = phi( main::@14/main::i#4 )
  print_char_cursor#27 = phi( main::@14/print_char_cursor#1 )
  print_line_cursor#10 = phi( main::@14/print_line_cursor#1 )
  print_line_cursor#2 = print_line_cursor#10
  print_char_cursor#11 = print_char_cursor#27
  main::i#1 = main::i#3 + rangenext(1,$19)
  main::$14 = main::i#1 != rangelast(1,$19)
  if(main::$14) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@15
  print_line_cursor#11 = phi( main::@15/print_line_cursor#2 )
  print_char_cursor#28 = phi( main::@15/print_char_cursor#11 )
  print_char_cursor#12 = print_char_cursor#28
  print_line_cursor#3 = print_line_cursor#11
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  print_screen#0 = (char *)$400
  print_line_cursor#4 = print_screen#0
  print_char_cursor#13 = print_line_cursor#4
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  print_screen#4 = phi( __start::__init1/print_screen#0 )
  print_line_cursor#16 = phi( __start::__init1/print_line_cursor#4 )
  print_char_cursor#35 = phi( __start::__init1/print_char_cursor#13 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  print_screen#3 = phi( __start::@1/print_screen#4 )
  print_line_cursor#12 = phi( __start::@1/print_line_cursor#3 )
  print_char_cursor#29 = phi( __start::@1/print_char_cursor#12 )
  print_char_cursor#14 = print_char_cursor#29
  print_line_cursor#5 = print_line_cursor#12
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  print_char_cursor#30 = phi( __start::@2/print_char_cursor#14 )
  print_line_cursor#13 = phi( __start::@2/print_line_cursor#5 )
  print_screen#2 = phi( __start::@2/print_screen#3 )
  print_screen#1 = print_screen#2
  print_line_cursor#6 = print_line_cursor#13
  print_char_cursor#15 = print_char_cursor#30
  return 
  to:@return

SYMBOL TABLE SSA
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
void __start()
void addMEMtoFAC(char *mem)
char *addMEMtoFAC::mem
char *addMEMtoFAC::mem#0
char *addMEMtoFAC::mem#1
char addMEMtoFAC::prepareMEM1_$0
char addMEMtoFAC::prepareMEM1_$1
unsigned int addMEMtoFAC::prepareMEM1_mem
unsigned int addMEMtoFAC::prepareMEM1_mem#0
unsigned int addMEMtoFAC::prepareMEM1_mem#1
void divFACby10()
void divMEMbyFAC(char *mem)
char *divMEMbyFAC::mem
char *divMEMbyFAC::mem#0
char *divMEMbyFAC::mem#1
char divMEMbyFAC::prepareMEM1_$0
char divMEMbyFAC::prepareMEM1_$1
unsigned int divMEMbyFAC::prepareMEM1_mem
unsigned int divMEMbyFAC::prepareMEM1_mem#0
unsigned int divMEMbyFAC::prepareMEM1_mem#1
unsigned int getFAC()
unsigned int getFAC::return
unsigned int getFAC::return#0
unsigned int getFAC::return#1
unsigned int getFAC::return#2
unsigned int getFAC::return#3
unsigned int getFAC::return#4
unsigned int getFAC::w
unsigned int getFAC::w#0
void main()
unsigned int main::$11
bool main::$14
__constant char main::f_127[] = { 0, 0, 0, 0, 0 }
__constant char * const main::f_2pi = (char *)$e2e5
__constant char main::f_i[] = { 0, 0, 0, 0, 0 }
char main::i
char main::i#0
char main::i#1
char main::i#10
char main::i#11
char main::i#12
char main::i#13
char main::i#2
char main::i#3
char main::i#4
char main::i#5
char main::i#6
char main::i#7
char main::i#8
char main::i#9
__constant char * const memHi = (char *)$ff
__constant char * const memLo = (char *)$fe
void mulFACbyMEM(char *mem)
char *mulFACbyMEM::mem
char *mulFACbyMEM::mem#0
char *mulFACbyMEM::mem#1
char *mulFACbyMEM::mem#2
char mulFACbyMEM::prepareMEM1_$0
char mulFACbyMEM::prepareMEM1_$1
unsigned int mulFACbyMEM::prepareMEM1_mem
unsigned int mulFACbyMEM::prepareMEM1_mem#0
unsigned int mulFACbyMEM::prepareMEM1_mem#1
void print_char(char ch)
char print_char::ch
char print_char::ch#0
char print_char::ch#1
char print_char::ch#2
char *print_char_cursor
char *print_char_cursor#0
char *print_char_cursor#1
char *print_char_cursor#10
char *print_char_cursor#11
char *print_char_cursor#12
char *print_char_cursor#13
char *print_char_cursor#14
char *print_char_cursor#15
char *print_char_cursor#16
char *print_char_cursor#17
char *print_char_cursor#18
char *print_char_cursor#19
char *print_char_cursor#2
char *print_char_cursor#20
char *print_char_cursor#21
char *print_char_cursor#22
char *print_char_cursor#23
char *print_char_cursor#24
char *print_char_cursor#25
char *print_char_cursor#26
char *print_char_cursor#27
char *print_char_cursor#28
char *print_char_cursor#29
char *print_char_cursor#3
char *print_char_cursor#30
char *print_char_cursor#31
char *print_char_cursor#32
char *print_char_cursor#33
char *print_char_cursor#34
char *print_char_cursor#35
char *print_char_cursor#36
char *print_char_cursor#37
char *print_char_cursor#38
char *print_char_cursor#39
char *print_char_cursor#4
char *print_char_cursor#40
char *print_char_cursor#41
char *print_char_cursor#42
char *print_char_cursor#43
char *print_char_cursor#44
char *print_char_cursor#45
char *print_char_cursor#46
char *print_char_cursor#47
char *print_char_cursor#48
char *print_char_cursor#5
char *print_char_cursor#6
char *print_char_cursor#7
char *print_char_cursor#8
char *print_char_cursor#9
__constant const char print_hextab[] = "0123456789abcdef"z
char *print_line_cursor
char *print_line_cursor#0
char *print_line_cursor#1
char *print_line_cursor#10
char *print_line_cursor#11
char *print_line_cursor#12
char *print_line_cursor#13
char *print_line_cursor#14
char *print_line_cursor#15
char *print_line_cursor#16
char *print_line_cursor#17
char *print_line_cursor#18
char *print_line_cursor#19
char *print_line_cursor#2
char *print_line_cursor#20
char *print_line_cursor#21
char *print_line_cursor#22
char *print_line_cursor#23
char *print_line_cursor#24
char *print_line_cursor#25
char *print_line_cursor#26
char *print_line_cursor#27
char *print_line_cursor#28
char *print_line_cursor#29
char *print_line_cursor#3
char *print_line_cursor#30
char *print_line_cursor#4
char *print_line_cursor#5
char *print_line_cursor#6
char *print_line_cursor#7
char *print_line_cursor#8
char *print_line_cursor#9
void print_ln()
char *print_ln::$0
bool print_ln::$1
char *print_screen
char *print_screen#0
char *print_screen#1
char *print_screen#2
char *print_screen#3
char *print_screen#4
void print_uchar(char b)
char print_uchar::$0
number print_uchar::$2
char print_uchar::b
char print_uchar::b#0
char print_uchar::b#1
char print_uchar::b#2
char print_uchar::b#3
void print_uint(unsigned int w)
char print_uint::$0
char print_uint::$2
unsigned int print_uint::w
unsigned int print_uint::w#0
unsigned int print_uint::w#1
unsigned int print_uint::w#2
void setFAC(unsigned int w)
char setFAC::prepareMEM1_$0
char setFAC::prepareMEM1_$1
unsigned int setFAC::prepareMEM1_mem
unsigned int setFAC::prepareMEM1_mem#0
unsigned int setFAC::prepareMEM1_mem#1
unsigned int setFAC::w
unsigned int setFAC::w#0
unsigned int setFAC::w#1
unsigned int setFAC::w#2
unsigned int setFAC::w#3
void setMEMtoFAC(char *mem)
char *setMEMtoFAC::mem
char *setMEMtoFAC::mem#0
char *setMEMtoFAC::mem#1
char *setMEMtoFAC::mem#2
char setMEMtoFAC::prepareMEM1_$0
char setMEMtoFAC::prepareMEM1_$1
unsigned int setMEMtoFAC::prepareMEM1_mem
unsigned int setMEMtoFAC::prepareMEM1_mem#0
unsigned int setMEMtoFAC::prepareMEM1_mem#1
void sinFAC()

Adding number conversion cast (unumber) $28 in print_ln::$0 = print_line_cursor#7 + $28
Adding number conversion cast (unumber) 4 in print_uchar::$0 = print_uchar::b#2 >> 4
Adding number conversion cast (unumber) $f in print_uchar::$2 = print_uchar::b#3 & $f
Adding number conversion cast (unumber) print_uchar::$2 in print_uchar::$2 = print_uchar::b#3 & (unumber)$f
Adding number conversion cast (unumber) $4fb in setFAC::w#0 = $4fb
Adding number conversion cast (unumber) $19 in setFAC::w#2 = $19
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast setFAC::w#0 = (unumber)$4fb
Inlining cast setFAC::w#2 = (unumber)$19
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (char *) 254
Simplifying constant pointer cast (char *) 255
Simplifying constant pointer cast (char *) 58085
Simplifying constant integer cast $28
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $4fb
Simplifying constant integer cast $19
Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $28
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) $f
Finalized unsigned number type (unsigned int) $4fb
Finalized unsigned number type (char) $19
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in print_uchar::$2 = print_uchar::b#3 & $f
Alias print_line_cursor#0 = print_ln::$0 print_line_cursor#8 print_char_cursor#0 print_line_cursor#9 print_char_cursor#17 print_line_cursor#1 print_char_cursor#1 
Alias print_uchar::b#0 = print_uint::$0 
Alias print_uint::w#1 = print_uint::w#2 
Alias print_char_cursor#18 = print_char_cursor#2 
Alias print_uchar::b#1 = print_uint::$2 
Alias print_char_cursor#19 = print_char_cursor#3 print_char_cursor#20 print_char_cursor#4 
Alias print_uchar::b#2 = print_uchar::b#3 
Alias print_char_cursor#21 = print_char_cursor#5 
Alias print_char_cursor#22 = print_char_cursor#6 print_char_cursor#23 print_char_cursor#7 
Alias print_char_cursor#25 = print_char_cursor#8 print_char_cursor#9 
Alias setFAC::prepareMEM1_mem#0 = setFAC::w#3 setFAC::prepareMEM1_mem#1 
Alias getFAC::return#0 = getFAC::w#0 getFAC::return#3 getFAC::return#1 
Alias setMEMtoFAC::prepareMEM1_mem#0 = setMEMtoFAC::prepareMEM1_mem#1 
Alias addMEMtoFAC::prepareMEM1_mem#0 = addMEMtoFAC::prepareMEM1_mem#1 
Alias divMEMbyFAC::prepareMEM1_mem#0 = divMEMbyFAC::prepareMEM1_mem#1 
Alias mulFACbyMEM::prepareMEM1_mem#0 = mulFACbyMEM::prepareMEM1_mem#1 
Alias print_char_cursor#45 = print_char_cursor#47 print_char_cursor#48 print_char_cursor#46 
Alias print_line_cursor#27 = print_line_cursor#29 print_line_cursor#30 print_line_cursor#28 
Alias print_char_cursor#34 = print_char_cursor#43 print_char_cursor#44 print_char_cursor#42 print_char_cursor#41 print_char_cursor#40 print_char_cursor#39 print_char_cursor#38 print_char_cursor#37 print_char_cursor#36 
Alias print_line_cursor#15 = print_line_cursor#25 print_line_cursor#26 print_line_cursor#24 print_line_cursor#23 print_line_cursor#22 print_line_cursor#21 print_line_cursor#20 print_line_cursor#19 print_line_cursor#18 print_line_cursor#17 
Alias main::i#10 = main::i#13 main::i#2 main::i#12 main::i#11 main::i#9 main::i#8 main::i#7 main::i#6 main::i#5 main::i#4 main::i#3 
Alias getFAC::return#2 = getFAC::return#4 
Alias print_uint::w#0 = main::$11 
Alias print_char_cursor#10 = print_char_cursor#26 
Alias print_line_cursor#10 = print_line_cursor#2 print_line_cursor#11 print_line_cursor#3 
Alias print_char_cursor#11 = print_char_cursor#27 print_char_cursor#28 print_char_cursor#12 
Alias print_screen#0 = print_line_cursor#4 print_char_cursor#13 print_char_cursor#35 print_line_cursor#16 print_screen#4 print_screen#3 print_screen#2 print_screen#1 
Alias print_char_cursor#14 = print_char_cursor#29 print_char_cursor#30 print_char_cursor#15 
Alias print_line_cursor#12 = print_line_cursor#5 print_line_cursor#13 print_line_cursor#6 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values print_line_cursor#14 print_line_cursor#15
Identical Phi Values print_char_cursor#31 print_char_cursor#10
Identical Phi Values print_char_cursor#16 print_char_cursor#31
Identical Phi Values print_uint::w#1 print_uint::w#0
Identical Phi Values print_char_cursor#32 print_char_cursor#34
Identical Phi Values print_char_cursor#18 print_char_cursor#22
Identical Phi Values print_char_cursor#19 print_char_cursor#22
Identical Phi Values print_char_cursor#21 print_char_cursor#25
Identical Phi Values print_char_cursor#22 print_char_cursor#25
Identical Phi Values addMEMtoFAC::mem#1 addMEMtoFAC::mem#0
Identical Phi Values divMEMbyFAC::mem#1 divMEMbyFAC::mem#0
Identical Phi Values print_char_cursor#45 print_screen#0
Identical Phi Values print_line_cursor#27 print_screen#0
Identical Phi Values print_char_cursor#10 print_char_cursor#19
Identical Phi Values print_line_cursor#10 print_line_cursor#0
Identical Phi Values print_char_cursor#11 print_line_cursor#0
Identical Phi Values print_char_cursor#14 print_char_cursor#11
Identical Phi Values print_line_cursor#12 print_line_cursor#10
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition print_ln::$1 [4] if(print_line_cursor#0<print_char_cursor#25) goto print_ln::@1
Simple Condition main::$14 [106] if(main::i#1!=rangelast(1,$19)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant setFAC::w#0 = $4fb
Constant setMEMtoFAC::mem#0 = main::f_127
Constant main::i#0 = 1
Constant mulFACbyMEM::mem#0 = main::f_2pi
Constant setMEMtoFAC::mem#1 = main::f_i
Constant setFAC::w#2 = $19
Constant divMEMbyFAC::mem#0 = main::f_i
Constant mulFACbyMEM::mem#1 = main::f_127
Constant addMEMtoFAC::mem#0 = main::f_127
Constant print_screen#0 = (char *) 1024
Successful SSA optimization Pass2ConstantIdentification
Constant addMEMtoFAC::prepareMEM1_mem#0 = (unsigned int)addMEMtoFAC::mem#0
Constant divMEMbyFAC::prepareMEM1_mem#0 = (unsigned int)divMEMbyFAC::mem#0
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [104] main::i#1 = ++ main::i#10 to ++
Resolved ranged comparison value [106] if(main::i#1!=rangelast(1,$19)) goto main::@1 to $1a
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) $1a in [82] if(main::i#1!=$1a) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $1a
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $1a
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [39] addMEMtoFAC::prepareMEM1_$0 = byte0  addMEMtoFAC::prepareMEM1_mem#0
Constant right-side identified [41] addMEMtoFAC::prepareMEM1_$1 = byte1  addMEMtoFAC::prepareMEM1_mem#0
Constant right-side identified [45] divMEMbyFAC::prepareMEM1_$0 = byte0  divMEMbyFAC::prepareMEM1_mem#0
Constant right-side identified [47] divMEMbyFAC::prepareMEM1_$1 = byte1  divMEMbyFAC::prepareMEM1_mem#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant addMEMtoFAC::prepareMEM1_$0 = byte0 addMEMtoFAC::prepareMEM1_mem#0
Constant addMEMtoFAC::prepareMEM1_$1 = byte1 addMEMtoFAC::prepareMEM1_mem#0
Constant divMEMbyFAC::prepareMEM1_$0 = byte0 divMEMbyFAC::prepareMEM1_mem#0
Constant divMEMbyFAC::prepareMEM1_$1 = byte1 divMEMbyFAC::prepareMEM1_mem#0
Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [32] setMEMtoFAC::prepareMEM1_mem#0 = (unsigned int)setMEMtoFAC::mem#2 keeping setMEMtoFAC::mem#2
Inlining Noop Cast [48] mulFACbyMEM::prepareMEM1_mem#0 = (unsigned int)mulFACbyMEM::mem#2 keeping mulFACbyMEM::mem#2
Successful SSA optimization Pass2NopCastInlining
Inlining constant with var siblings setFAC::w#0
Inlining constant with var siblings setFAC::w#2
Inlining constant with var siblings setMEMtoFAC::mem#0
Inlining constant with var siblings setMEMtoFAC::mem#1
Inlining constant with var siblings mulFACbyMEM::mem#0
Inlining constant with var siblings mulFACbyMEM::mem#1
Inlining constant with var siblings main::i#0
Constant inlined addMEMtoFAC::mem#0 = main::f_127
Constant inlined setFAC::w#2 = $19
Constant inlined divMEMbyFAC::prepareMEM1_$0 = byte0 divMEMbyFAC::prepareMEM1_mem#0
Constant inlined divMEMbyFAC::mem#0 = main::f_i
Constant inlined divMEMbyFAC::prepareMEM1_$1 = byte1 divMEMbyFAC::prepareMEM1_mem#0
Constant inlined addMEMtoFAC::prepareMEM1_$0 = byte0 addMEMtoFAC::prepareMEM1_mem#0
Constant inlined main::i#0 = 1
Constant inlined setMEMtoFAC::mem#1 = main::f_i
Constant inlined mulFACbyMEM::mem#0 = main::f_2pi
Constant inlined setMEMtoFAC::mem#0 = main::f_127
Constant inlined mulFACbyMEM::mem#1 = main::f_127
Constant inlined addMEMtoFAC::prepareMEM1_$1 = byte1 addMEMtoFAC::prepareMEM1_mem#0
Constant inlined setFAC::w#0 = $4fb
Successful SSA optimization Pass2ConstantInlining
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) $a
Finalized unsigned number type (char) $10
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 main::@16(between main::@15 and main::@1)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of main::@11
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::@14
Adding NOP phi() at start of divMEMbyFAC
Adding NOP phi() at start of addMEMtoFAC
Adding NOP phi() at start of print_uint::@2
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of print_uchar::@2
CALL GRAPH
Calls in [main] to setFAC:1 divFACby10:3 setMEMtoFAC:5 setFAC:10 mulFACbyMEM:12 setMEMtoFAC:14 setFAC:16 divMEMbyFAC:18 sinFAC:20 mulFACbyMEM:22 addMEMtoFAC:24 getFAC:26 print_uint:29 print_ln:31 
Calls in [print_uint] to print_uchar:79 print_uchar:83 
Calls in [print_uchar] to print_char:98 print_char:103 

Created 11 initial phi equivalence classes
Coalesced [9] setFAC::prepareMEM1_mem#2 = setFAC::w#1
Coalesced [35] main::i#14 = main::i#1
Not coalescing [36] print_char_cursor#53 = print_line_cursor#0
Coalesced [37] print_line_cursor#33 = print_line_cursor#0
Coalesced [77] print_uchar::b#4 = print_uchar::b#0
Coalesced [78] print_char_cursor#49 = print_char_cursor#34
Coalesced [81] print_uchar::b#5 = print_uchar::b#1
Coalesced [82] print_char_cursor#50 = print_char_cursor#25
Coalesced [86] print_line_cursor#31 = print_line_cursor#15
Coalesced (already) [92] print_line_cursor#32 = print_line_cursor#0
Coalesced [96] print_char::ch#3 = print_char::ch#0
Coalesced [97] print_char_cursor#51 = print_char_cursor#33
Coalesced [101] print_char::ch#4 = print_char::ch#1
Coalesced (already) [102] print_char_cursor#52 = print_char_cursor#25
Coalesced down to 8 phi equivalence classes
Culled Empty Block label main::@4
Culled Empty Block label print_uint::@2
Culled Empty Block label print_ln::@2
Culled Empty Block label print_ln::@3
Culled Empty Block label print_uchar::@2
Renumbering block main::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Renumbering block main::@8 to main::@7
Renumbering block main::@9 to main::@8
Renumbering block main::@10 to main::@9
Renumbering block main::@11 to main::@10
Renumbering block main::@12 to main::@11
Renumbering block main::@13 to main::@12
Renumbering block main::@14 to main::@13
Renumbering block main::@15 to main::@14
Renumbering block main::@16 to main::@15
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::@9
Adding NOP phi() at start of main::@10
Adding NOP phi() at start of main::@11
Adding NOP phi() at start of main::@13
Adding NOP phi() at start of divMEMbyFAC
Adding NOP phi() at start of addMEMtoFAC
Adding NOP phi() at start of print_ln

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  [1] call setFAC
  to:main::@2
main::@2: scope:[main]  from main
  [2] phi()
  [3] call divFACby10
  to:main::@3
main::@3: scope:[main]  from main::@2
  [4] phi()
  [5] call setMEMtoFAC
  to:main::@1
main::@1: scope:[main]  from main::@15 main::@3
  [6] print_line_cursor#15 = phi( main::@15/print_line_cursor#0, main::@3/print_screen#0 )
  [6] print_char_cursor#34 = phi( main::@15/print_char_cursor#53, main::@3/print_screen#0 )
  [6] main::i#10 = phi( main::@15/main::i#1, main::@3/1 )
  [7] setFAC::w#1 = (unsigned int)main::i#10
  [8] call setFAC
  to:main::@4
main::@4: scope:[main]  from main::@1
  [9] phi()
  [10] call mulFACbyMEM
  to:main::@5
main::@5: scope:[main]  from main::@4
  [11] phi()
  [12] call setMEMtoFAC
  to:main::@6
main::@6: scope:[main]  from main::@5
  [13] phi()
  [14] call setFAC
  to:main::@7
main::@7: scope:[main]  from main::@6
  [15] phi()
  [16] call divMEMbyFAC
  to:main::@8
main::@8: scope:[main]  from main::@7
  [17] phi()
  [18] call sinFAC
  to:main::@9
main::@9: scope:[main]  from main::@8
  [19] phi()
  [20] call mulFACbyMEM
  to:main::@10
main::@10: scope:[main]  from main::@9
  [21] phi()
  [22] call addMEMtoFAC
  to:main::@11
main::@11: scope:[main]  from main::@10
  [23] phi()
  [24] call getFAC
  [25] getFAC::return#2 = getFAC::return#0
  to:main::@12
main::@12: scope:[main]  from main::@11
  [26] print_uint::w#0 = getFAC::return#2
  [27] call print_uint
  to:main::@13
main::@13: scope:[main]  from main::@12
  [28] phi()
  [29] call print_ln
  to:main::@14
main::@14: scope:[main]  from main::@13
  [30] main::i#1 = ++ main::i#10
  [31] if(main::i#1!=$1a) goto main::@15
  to:main::@return
main::@return: scope:[main]  from main::@14
  [32] return 
  to:@return
main::@15: scope:[main]  from main::@14
  [33] print_char_cursor#53 = print_line_cursor#0
  to:main::@1

void setFAC(unsigned int w)
setFAC: scope:[setFAC]  from main main::@1 main::@6
  [34] setFAC::prepareMEM1_mem#0 = phi( main/$4fb, main::@1/setFAC::w#1, main::@6/$19 )
  to:setFAC::prepareMEM1
setFAC::prepareMEM1: scope:[setFAC]  from setFAC
  [35] setFAC::prepareMEM1_$0 = byte0  setFAC::prepareMEM1_mem#0
  [36] *memLo = setFAC::prepareMEM1_$0
  [37] setFAC::prepareMEM1_$1 = byte1  setFAC::prepareMEM1_mem#0
  [38] *memHi = setFAC::prepareMEM1_$1
  to:setFAC::@1
setFAC::@1: scope:[setFAC]  from setFAC::prepareMEM1
  asm { ldymemLo ldamemHi jsr$b391  }
  to:setFAC::@return
setFAC::@return: scope:[setFAC]  from setFAC::@1
  [40] return 
  to:@return

void divFACby10()
divFACby10: scope:[divFACby10]  from main::@2
  asm { jsr$bafe  }
  to:divFACby10::@return
divFACby10::@return: scope:[divFACby10]  from divFACby10
  [42] return 
  to:@return

void setMEMtoFAC(char *mem)
setMEMtoFAC: scope:[setMEMtoFAC]  from main::@3 main::@5
  [43] setMEMtoFAC::mem#2 = phi( main::@3/main::f_127, main::@5/main::f_i )
  to:setMEMtoFAC::prepareMEM1
setMEMtoFAC::prepareMEM1: scope:[setMEMtoFAC]  from setMEMtoFAC
  [44] setMEMtoFAC::prepareMEM1_$0 = byte0  (unsigned int)setMEMtoFAC::mem#2
  [45] *memLo = setMEMtoFAC::prepareMEM1_$0
  [46] setMEMtoFAC::prepareMEM1_$1 = byte1  (unsigned int)setMEMtoFAC::mem#2
  [47] *memHi = setMEMtoFAC::prepareMEM1_$1
  to:setMEMtoFAC::@1
setMEMtoFAC::@1: scope:[setMEMtoFAC]  from setMEMtoFAC::prepareMEM1
  asm { ldxmemLo ldymemHi jsr$bbd4  }
  to:setMEMtoFAC::@return
setMEMtoFAC::@return: scope:[setMEMtoFAC]  from setMEMtoFAC::@1
  [49] return 
  to:@return

void mulFACbyMEM(char *mem)
mulFACbyMEM: scope:[mulFACbyMEM]  from main::@4 main::@9
  [50] mulFACbyMEM::mem#2 = phi( main::@9/main::f_127, main::@4/main::f_2pi )
  to:mulFACbyMEM::prepareMEM1
mulFACbyMEM::prepareMEM1: scope:[mulFACbyMEM]  from mulFACbyMEM
  [51] mulFACbyMEM::prepareMEM1_$0 = byte0  (unsigned int)mulFACbyMEM::mem#2
  [52] *memLo = mulFACbyMEM::prepareMEM1_$0
  [53] mulFACbyMEM::prepareMEM1_$1 = byte1  (unsigned int)mulFACbyMEM::mem#2
  [54] *memHi = mulFACbyMEM::prepareMEM1_$1
  to:mulFACbyMEM::@1
mulFACbyMEM::@1: scope:[mulFACbyMEM]  from mulFACbyMEM::prepareMEM1
  asm { ldamemLo ldymemHi jsr$ba28  }
  to:mulFACbyMEM::@return
mulFACbyMEM::@return: scope:[mulFACbyMEM]  from mulFACbyMEM::@1
  [56] return 
  to:@return

void divMEMbyFAC(char *mem)
divMEMbyFAC: scope:[divMEMbyFAC]  from main::@7
  [57] phi()
  to:divMEMbyFAC::prepareMEM1
divMEMbyFAC::prepareMEM1: scope:[divMEMbyFAC]  from divMEMbyFAC
  [58] *memLo = byte0 divMEMbyFAC::prepareMEM1_mem#0
  [59] *memHi = byte1 divMEMbyFAC::prepareMEM1_mem#0
  to:divMEMbyFAC::@1
divMEMbyFAC::@1: scope:[divMEMbyFAC]  from divMEMbyFAC::prepareMEM1
  asm { ldamemLo ldymemHi jsr$bb0f  }
  to:divMEMbyFAC::@return
divMEMbyFAC::@return: scope:[divMEMbyFAC]  from divMEMbyFAC::@1
  [61] return 
  to:@return

void sinFAC()
sinFAC: scope:[sinFAC]  from main::@8
  asm { jsr$e26b  }
  to:sinFAC::@return
sinFAC::@return: scope:[sinFAC]  from sinFAC
  [63] return 
  to:@return

void addMEMtoFAC(char *mem)
addMEMtoFAC: scope:[addMEMtoFAC]  from main::@10
  [64] phi()
  to:addMEMtoFAC::prepareMEM1
addMEMtoFAC::prepareMEM1: scope:[addMEMtoFAC]  from addMEMtoFAC
  [65] *memLo = byte0 addMEMtoFAC::prepareMEM1_mem#0
  [66] *memHi = byte1 addMEMtoFAC::prepareMEM1_mem#0
  to:addMEMtoFAC::@1
addMEMtoFAC::@1: scope:[addMEMtoFAC]  from addMEMtoFAC::prepareMEM1
  asm { ldamemLo ldymemHi jsr$b867  }
  to:addMEMtoFAC::@return
addMEMtoFAC::@return: scope:[addMEMtoFAC]  from addMEMtoFAC::@1
  [68] return 
  to:@return

unsigned int getFAC()
getFAC: scope:[getFAC]  from main::@11
  asm { jsr$b1aa stymemLo stamemHi  }
  [70] getFAC::return#0 = *memHi w= *memLo
  to:getFAC::@return
getFAC::@return: scope:[getFAC]  from getFAC
  [71] return 
  to:@return

void print_uint(unsigned int w)
print_uint: scope:[print_uint]  from main::@12
  [72] print_uchar::b#0 = byte1  print_uint::w#0
  [73] call print_uchar
  to:print_uint::@1
print_uint::@1: scope:[print_uint]  from print_uint
  [74] print_uchar::b#1 = byte0  print_uint::w#0
  [75] call print_uchar
  to:print_uint::@return
print_uint::@return: scope:[print_uint]  from print_uint::@1
  [76] return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from main::@13
  [77] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [78] print_line_cursor#7 = phi( print_ln/print_line_cursor#15, print_ln::@1/print_line_cursor#0 )
  [79] print_line_cursor#0 = print_line_cursor#7 + $28
  [80] if(print_line_cursor#0<print_char_cursor#25) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [81] return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from print_uint print_uint::@1
  [82] print_char_cursor#33 = phi( print_uint/print_char_cursor#34, print_uint::@1/print_char_cursor#25 )
  [82] print_uchar::b#2 = phi( print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
  [83] print_uchar::$0 = print_uchar::b#2 >> 4
  [84] print_char::ch#0 = print_hextab[print_uchar::$0]
  [85] call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  [86] print_uchar::$2 = print_uchar::b#2 & $f
  [87] print_char::ch#1 = print_hextab[print_uchar::$2]
  [88] call print_char
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@1
  [89] return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_uchar print_uchar::@1
  [90] print_char_cursor#24 = phi( print_uchar/print_char_cursor#33, print_uchar::@1/print_char_cursor#25 )
  [90] print_char::ch#2 = phi( print_uchar/print_char::ch#0, print_uchar::@1/print_char::ch#1 )
  [91] *print_char_cursor#24 = print_char::ch#2
  [92] print_char_cursor#25 = ++ print_char_cursor#24
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [93] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void addMEMtoFAC(char *mem)
char *addMEMtoFAC::mem
unsigned int addMEMtoFAC::prepareMEM1_mem
void divFACby10()
void divMEMbyFAC(char *mem)
char *divMEMbyFAC::mem
unsigned int divMEMbyFAC::prepareMEM1_mem
unsigned int getFAC()
unsigned int getFAC::return
unsigned int getFAC::return#0 // 37.33333333333333
unsigned int getFAC::return#2 // 22.0
unsigned int getFAC::w
void main()
char main::i
char main::i#1 // 11.0
char main::i#10 // 0.9166666666666666
void mulFACbyMEM(char *mem)
char *mulFACbyMEM::mem
char *mulFACbyMEM::mem#2
char mulFACbyMEM::prepareMEM1_$0 // 202.0
char mulFACbyMEM::prepareMEM1_$1 // 202.0
unsigned int mulFACbyMEM::prepareMEM1_mem
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // 2002.0
char print_char::ch#1 // 2002.0
char print_char::ch#2 // 12003.0
char *print_char_cursor
char *print_char_cursor#24 // 11002.0
char *print_char_cursor#25 // 1241.4117647058824
char *print_char_cursor#33 // 401.0
char *print_char_cursor#34 // 5.090909090909091
char *print_char_cursor#53 // 22.0
char *print_line_cursor
char *print_line_cursor#0 // 4289.285714285714
char *print_line_cursor#15 // 4.666666666666666
char *print_line_cursor#7 // 20103.0
void print_ln()
char *print_screen
void print_uchar(char b)
char print_uchar::$0 // 2002.0
char print_uchar::$2 // 2002.0
char print_uchar::b
char print_uchar::b#0 // 202.0
char print_uchar::b#1 // 202.0
char print_uchar::b#2 // 551.0
void print_uint(unsigned int w)
unsigned int print_uint::w
unsigned int print_uint::w#0 // 71.0
void setFAC(unsigned int w)
char setFAC::prepareMEM1_$0 // 202.0
char setFAC::prepareMEM1_$1 // 202.0
unsigned int setFAC::prepareMEM1_mem
unsigned int setFAC::prepareMEM1_mem#0 // 71.0
unsigned int setFAC::w
unsigned int setFAC::w#1 // 22.0
void setMEMtoFAC(char *mem)
char *setMEMtoFAC::mem
char *setMEMtoFAC::mem#2
char setMEMtoFAC::prepareMEM1_$0 // 202.0
char setMEMtoFAC::prepareMEM1_$1 // 202.0
unsigned int setMEMtoFAC::prepareMEM1_mem
void sinFAC()

Initial phi equivalence classes
[ main::i#10 main::i#1 ]
[ setFAC::prepareMEM1_mem#0 setFAC::w#1 ]
[ setMEMtoFAC::mem#2 ]
[ mulFACbyMEM::mem#2 ]
[ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ]
[ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ]
Added variable getFAC::return#2 to live range equivalence class [ getFAC::return#2 ]
Added variable print_uint::w#0 to live range equivalence class [ print_uint::w#0 ]
Added variable setFAC::prepareMEM1_$0 to live range equivalence class [ setFAC::prepareMEM1_$0 ]
Added variable setFAC::prepareMEM1_$1 to live range equivalence class [ setFAC::prepareMEM1_$1 ]
Added variable setMEMtoFAC::prepareMEM1_$0 to live range equivalence class [ setMEMtoFAC::prepareMEM1_$0 ]
Added variable setMEMtoFAC::prepareMEM1_$1 to live range equivalence class [ setMEMtoFAC::prepareMEM1_$1 ]
Added variable mulFACbyMEM::prepareMEM1_$0 to live range equivalence class [ mulFACbyMEM::prepareMEM1_$0 ]
Added variable mulFACbyMEM::prepareMEM1_$1 to live range equivalence class [ mulFACbyMEM::prepareMEM1_$1 ]
Added variable getFAC::return#0 to live range equivalence class [ getFAC::return#0 ]
Added variable print_uchar::$0 to live range equivalence class [ print_uchar::$0 ]
Added variable print_uchar::$2 to live range equivalence class [ print_uchar::$2 ]
Complete equivalence classes
[ main::i#10 main::i#1 ]
[ setFAC::prepareMEM1_mem#0 setFAC::w#1 ]
[ setMEMtoFAC::mem#2 ]
[ mulFACbyMEM::mem#2 ]
[ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ]
[ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ]
[ getFAC::return#2 ]
[ print_uint::w#0 ]
[ setFAC::prepareMEM1_$0 ]
[ setFAC::prepareMEM1_$1 ]
[ setMEMtoFAC::prepareMEM1_$0 ]
[ setMEMtoFAC::prepareMEM1_$1 ]
[ mulFACbyMEM::prepareMEM1_$0 ]
[ mulFACbyMEM::prepareMEM1_$1 ]
[ getFAC::return#0 ]
[ print_uchar::$0 ]
[ print_uchar::$2 ]
Allocated zp[2]:2 [ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ]
Allocated zp[1]:4 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp[2]:5 [ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ]
Allocated zp[1]:7 [ print_uchar::$0 ]
Allocated zp[1]:8 [ print_uchar::$2 ]
Allocated zp[1]:9 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Allocated zp[1]:10 [ setFAC::prepareMEM1_$0 ]
Allocated zp[1]:11 [ setFAC::prepareMEM1_$1 ]
Allocated zp[1]:12 [ setMEMtoFAC::prepareMEM1_$0 ]
Allocated zp[1]:13 [ setMEMtoFAC::prepareMEM1_$1 ]
Allocated zp[1]:14 [ mulFACbyMEM::prepareMEM1_$0 ]
Allocated zp[1]:15 [ mulFACbyMEM::prepareMEM1_$1 ]
Allocated zp[2]:16 [ setFAC::prepareMEM1_mem#0 setFAC::w#1 ]
Allocated zp[2]:18 [ print_uint::w#0 ]
Allocated zp[2]:20 [ getFAC::return#0 ]
Allocated zp[2]:22 [ getFAC::return#2 ]
Allocated zp[1]:24 [ main::i#10 main::i#1 ]
Allocated zp[2]:25 [ setMEMtoFAC::mem#2 ]
Allocated zp[2]:27 [ mulFACbyMEM::mem#2 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] setFAC::w#1 = (unsigned int)main::i#10 [ main::i#10 print_char_cursor#34 print_line_cursor#15 setFAC::w#1 ] (  [ main::i#10 print_char_cursor#34 print_line_cursor#15 setFAC::w#1 ] { { setFAC::prepareMEM1_mem#0 = setFAC::w#1 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:24 [ main::i#10 main::i#1 ]
Statement [25] getFAC::return#2 = getFAC::return#0 [ main::i#10 print_char_cursor#34 print_line_cursor#15 getFAC::return#2 ] (  [ main::i#10 print_char_cursor#34 print_line_cursor#15 getFAC::return#2 ] { { getFAC::return#0 = getFAC::return#2 } }  ) always clobbers reg byte a 
Statement [26] print_uint::w#0 = getFAC::return#2 [ main::i#10 print_char_cursor#34 print_line_cursor#15 print_uint::w#0 ] (  [ main::i#10 print_char_cursor#34 print_line_cursor#15 print_uint::w#0 ] { { print_uint::w#0 = getFAC::return#2 } }  ) always clobbers reg byte a 
Statement [33] print_char_cursor#53 = print_line_cursor#0 [ main::i#1 print_char_cursor#53 print_line_cursor#0 ] (  [ main::i#1 print_char_cursor#53 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement asm { ldymemLo ldamemHi jsr$b391  } always clobbers reg byte a reg byte x reg byte y 
Removing always clobbered register reg byte x as potential for zp[1]:24 [ main::i#10 main::i#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:24 [ main::i#10 main::i#1 ]
Statement asm { jsr$bafe  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { ldxmemLo ldymemHi jsr$bbd4  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { ldamemLo ldymemHi jsr$ba28  } always clobbers reg byte a reg byte x reg byte y 
Statement [58] *memLo = byte0 divMEMbyFAC::prepareMEM1_mem#0 [ ] ( divMEMbyFAC:16 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement [59] *memHi = byte1 divMEMbyFAC::prepareMEM1_mem#0 [ ] ( divMEMbyFAC:16 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement asm { ldamemLo ldymemHi jsr$bb0f  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { jsr$e26b  } always clobbers reg byte a reg byte x reg byte y 
Statement [65] *memLo = byte0 addMEMtoFAC::prepareMEM1_mem#0 [ ] ( addMEMtoFAC:22 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement [66] *memHi = byte1 addMEMtoFAC::prepareMEM1_mem#0 [ ] ( addMEMtoFAC:22 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement asm { ldamemLo ldymemHi jsr$b867  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { jsr$b1aa stymemLo stamemHi  } always clobbers reg byte a reg byte x reg byte y 
Statement [70] getFAC::return#0 = *memHi w= *memLo [ getFAC::return#0 ] ( getFAC:24 [ main::i#10 print_char_cursor#34 print_line_cursor#15 getFAC::return#0 ] { { getFAC::return#0 = getFAC::return#2 } }  ) always clobbers reg byte a 
Statement [79] print_line_cursor#0 = print_line_cursor#7 + $28 [ print_line_cursor#0 print_char_cursor#25 ] ( print_ln:29 [ main::i#10 print_line_cursor#0 print_char_cursor#25 ] { }  ) always clobbers reg byte a 
Statement [80] if(print_line_cursor#0<print_char_cursor#25) goto print_ln::@1 [ print_line_cursor#0 print_char_cursor#25 ] ( print_ln:29 [ main::i#10 print_line_cursor#0 print_char_cursor#25 ] { }  ) always clobbers reg byte a 
Statement [83] print_uchar::$0 = print_uchar::b#2 >> 4 [ print_uchar::b#2 print_char_cursor#33 print_uchar::$0 ] ( print_uint:27::print_uchar:73 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_uchar::b#2 print_char_cursor#33 print_uchar::$0 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#34 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:27::print_uchar:75 [ main::i#10 print_line_cursor#15 print_uchar::b#2 print_char_cursor#33 print_uchar::$0 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#0 = print_char::ch#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:9 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Statement [86] print_uchar::$2 = print_uchar::b#2 & $f [ print_char_cursor#25 print_uchar::$2 ] ( print_uint:27::print_uchar:73 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_char_cursor#25 print_uchar::$2 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#33 = print_char_cursor#34 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#24 = print_char_cursor#25 } }  print_uint:27::print_uchar:75 [ main::i#10 print_line_cursor#15 print_char_cursor#25 print_uchar::$2 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte a 
Statement [91] *print_char_cursor#24 = print_char::ch#2 [ print_char_cursor#24 ] ( print_uint:27::print_uchar:73::print_char:85 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_uchar::b#2 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#34 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:27::print_uchar:75::print_char:85 [ main::i#10 print_line_cursor#15 print_uchar::b#2 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:27::print_uchar:73::print_char:88 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#33 = print_char_cursor#34 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#24 = print_char_cursor#25 } }  print_uint:27::print_uchar:75::print_char:88 [ main::i#10 print_line_cursor#15 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:9 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Statement [7] setFAC::w#1 = (unsigned int)main::i#10 [ main::i#10 print_char_cursor#34 print_line_cursor#15 setFAC::w#1 ] (  [ main::i#10 print_char_cursor#34 print_line_cursor#15 setFAC::w#1 ] { { setFAC::prepareMEM1_mem#0 = setFAC::w#1 } }  ) always clobbers reg byte a 
Statement [25] getFAC::return#2 = getFAC::return#0 [ main::i#10 print_char_cursor#34 print_line_cursor#15 getFAC::return#2 ] (  [ main::i#10 print_char_cursor#34 print_line_cursor#15 getFAC::return#2 ] { { getFAC::return#0 = getFAC::return#2 } }  ) always clobbers reg byte a 
Statement [26] print_uint::w#0 = getFAC::return#2 [ main::i#10 print_char_cursor#34 print_line_cursor#15 print_uint::w#0 ] (  [ main::i#10 print_char_cursor#34 print_line_cursor#15 print_uint::w#0 ] { { print_uint::w#0 = getFAC::return#2 } }  ) always clobbers reg byte a 
Statement [31] if(main::i#1!=$1a) goto main::@15 [ main::i#1 print_line_cursor#0 ] (  [ main::i#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [33] print_char_cursor#53 = print_line_cursor#0 [ main::i#1 print_char_cursor#53 print_line_cursor#0 ] (  [ main::i#1 print_char_cursor#53 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement asm { ldymemLo ldamemHi jsr$b391  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { jsr$bafe  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { ldxmemLo ldymemHi jsr$bbd4  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { ldamemLo ldymemHi jsr$ba28  } always clobbers reg byte a reg byte x reg byte y 
Statement [58] *memLo = byte0 divMEMbyFAC::prepareMEM1_mem#0 [ ] ( divMEMbyFAC:16 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement [59] *memHi = byte1 divMEMbyFAC::prepareMEM1_mem#0 [ ] ( divMEMbyFAC:16 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement asm { ldamemLo ldymemHi jsr$bb0f  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { jsr$e26b  } always clobbers reg byte a reg byte x reg byte y 
Statement [65] *memLo = byte0 addMEMtoFAC::prepareMEM1_mem#0 [ ] ( addMEMtoFAC:22 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement [66] *memHi = byte1 addMEMtoFAC::prepareMEM1_mem#0 [ ] ( addMEMtoFAC:22 [ main::i#10 print_char_cursor#34 print_line_cursor#15 ] { }  ) always clobbers reg byte a 
Statement asm { ldamemLo ldymemHi jsr$b867  } always clobbers reg byte a reg byte x reg byte y 
Statement asm { jsr$b1aa stymemLo stamemHi  } always clobbers reg byte a reg byte x reg byte y 
Statement [70] getFAC::return#0 = *memHi w= *memLo [ getFAC::return#0 ] ( getFAC:24 [ main::i#10 print_char_cursor#34 print_line_cursor#15 getFAC::return#0 ] { { getFAC::return#0 = getFAC::return#2 } }  ) always clobbers reg byte a 
Statement [79] print_line_cursor#0 = print_line_cursor#7 + $28 [ print_line_cursor#0 print_char_cursor#25 ] ( print_ln:29 [ main::i#10 print_line_cursor#0 print_char_cursor#25 ] { }  ) always clobbers reg byte a 
Statement [80] if(print_line_cursor#0<print_char_cursor#25) goto print_ln::@1 [ print_line_cursor#0 print_char_cursor#25 ] ( print_ln:29 [ main::i#10 print_line_cursor#0 print_char_cursor#25 ] { }  ) always clobbers reg byte a 
Statement [83] print_uchar::$0 = print_uchar::b#2 >> 4 [ print_uchar::b#2 print_char_cursor#33 print_uchar::$0 ] ( print_uint:27::print_uchar:73 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_uchar::b#2 print_char_cursor#33 print_uchar::$0 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#34 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:27::print_uchar:75 [ main::i#10 print_line_cursor#15 print_uchar::b#2 print_char_cursor#33 print_uchar::$0 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#0 = print_char::ch#2 } }  ) always clobbers reg byte a 
Statement [86] print_uchar::$2 = print_uchar::b#2 & $f [ print_char_cursor#25 print_uchar::$2 ] ( print_uint:27::print_uchar:73 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_char_cursor#25 print_uchar::$2 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#33 = print_char_cursor#34 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#24 = print_char_cursor#25 } }  print_uint:27::print_uchar:75 [ main::i#10 print_line_cursor#15 print_char_cursor#25 print_uchar::$2 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte a 
Statement [91] *print_char_cursor#24 = print_char::ch#2 [ print_char_cursor#24 ] ( print_uint:27::print_uchar:73::print_char:85 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_uchar::b#2 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#34 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:27::print_uchar:75::print_char:85 [ main::i#10 print_line_cursor#15 print_uchar::b#2 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:27::print_uchar:73::print_char:88 [ main::i#10 print_line_cursor#15 print_uint::w#0 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#0 = print_uchar::b#2 } { print_char_cursor#33 = print_char_cursor#34 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#24 = print_char_cursor#25 } }  print_uint:27::print_uchar:75::print_char:88 [ main::i#10 print_line_cursor#15 print_char_cursor#24 ] { { print_uint::w#0 = getFAC::return#2 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#24 = print_char_cursor#33 print_char_cursor#25 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte y 
Potential registers zp[1]:24 [ main::i#10 main::i#1 ] : zp[1]:24 , 
Potential registers zp[2]:16 [ setFAC::prepareMEM1_mem#0 setFAC::w#1 ] : zp[2]:16 , 
Potential registers zp[2]:25 [ setMEMtoFAC::mem#2 ] : zp[2]:25 , 
Potential registers zp[2]:27 [ mulFACbyMEM::mem#2 ] : zp[2]:27 , 
Potential registers zp[2]:2 [ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ] : zp[2]:2 , 
Potential registers zp[1]:9 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] : zp[1]:9 , reg byte x , 
Potential registers zp[1]:4 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:5 [ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ] : zp[2]:5 , 
Potential registers zp[2]:22 [ getFAC::return#2 ] : zp[2]:22 , 
Potential registers zp[2]:18 [ print_uint::w#0 ] : zp[2]:18 , 
Potential registers zp[1]:10 [ setFAC::prepareMEM1_$0 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ setFAC::prepareMEM1_$1 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:12 [ setMEMtoFAC::prepareMEM1_$0 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:13 [ setMEMtoFAC::prepareMEM1_$1 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:14 [ mulFACbyMEM::prepareMEM1_$0 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:15 [ mulFACbyMEM::prepareMEM1_$1 ] : zp[1]:15 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:20 [ getFAC::return#0 ] : zp[2]:20 , 
Potential registers zp[1]:7 [ print_uchar::$0 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ print_uchar::$2 ] : zp[1]:8 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [] 24,396.95: zp[2]:2 [ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ] 12,671.5: zp[2]:5 [ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ] 
Uplift Scope [print_char] 16,007: zp[1]:4 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [print_uchar] 2,002: zp[1]:7 [ print_uchar::$0 ] 2,002: zp[1]:8 [ print_uchar::$2 ] 955: zp[1]:9 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] 
Uplift Scope [setFAC] 202: zp[1]:10 [ setFAC::prepareMEM1_$0 ] 202: zp[1]:11 [ setFAC::prepareMEM1_$1 ] 93: zp[2]:16 [ setFAC::prepareMEM1_mem#0 setFAC::w#1 ] 
Uplift Scope [setMEMtoFAC] 202: zp[1]:12 [ setMEMtoFAC::prepareMEM1_$0 ] 202: zp[1]:13 [ setMEMtoFAC::prepareMEM1_$1 ] 0: zp[2]:25 [ setMEMtoFAC::mem#2 ] 
Uplift Scope [mulFACbyMEM] 202: zp[1]:14 [ mulFACbyMEM::prepareMEM1_$0 ] 202: zp[1]:15 [ mulFACbyMEM::prepareMEM1_$1 ] 0: zp[2]:27 [ mulFACbyMEM::mem#2 ] 
Uplift Scope [print_uint] 71: zp[2]:18 [ print_uint::w#0 ] 
Uplift Scope [getFAC] 37.33: zp[2]:20 [ getFAC::return#0 ] 22: zp[2]:22 [ getFAC::return#2 ] 
Uplift Scope [main] 11.92: zp[1]:24 [ main::i#10 main::i#1 ] 
Uplift Scope [print_ln] 
Uplift Scope [RADIX] 
Uplift Scope [addMEMtoFAC] 
Uplift Scope [divMEMbyFAC] 
Uplift Scope [sinFAC] 
Uplift Scope [divFACby10] 

Uplifting [] best 6445 combination zp[2]:2 [ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ] zp[2]:5 [ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ] 
Uplifting [print_char] best 6436 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [print_uchar] best 6418 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] 
Uplifting [setFAC] best 6406 combination reg byte a [ setFAC::prepareMEM1_$0 ] reg byte a [ setFAC::prepareMEM1_$1 ] zp[2]:16 [ setFAC::prepareMEM1_mem#0 setFAC::w#1 ] 
Uplifting [setMEMtoFAC] best 6394 combination reg byte a [ setMEMtoFAC::prepareMEM1_$0 ] reg byte a [ setMEMtoFAC::prepareMEM1_$1 ] zp[2]:25 [ setMEMtoFAC::mem#2 ] 
Uplifting [mulFACbyMEM] best 6382 combination reg byte a [ mulFACbyMEM::prepareMEM1_$0 ] reg byte a [ mulFACbyMEM::prepareMEM1_$1 ] zp[2]:27 [ mulFACbyMEM::mem#2 ] 
Uplifting [print_uint] best 6382 combination zp[2]:18 [ print_uint::w#0 ] 
Uplifting [getFAC] best 6382 combination zp[2]:20 [ getFAC::return#0 ] zp[2]:22 [ getFAC::return#2 ] 
Uplifting [main] best 6382 combination zp[1]:24 [ main::i#10 main::i#1 ] 
Uplifting [print_ln] best 6382 combination 
Uplifting [RADIX] best 6382 combination 
Uplifting [addMEMtoFAC] best 6382 combination 
Uplifting [divMEMbyFAC] best 6382 combination 
Uplifting [sinFAC] best 6382 combination 
Uplifting [divFACby10] best 6382 combination 
Attempting to uplift remaining variables inzp[1]:24 [ main::i#10 main::i#1 ]
Uplifting [main] best 6382 combination zp[1]:24 [ main::i#10 main::i#1 ] 
Coalescing zero page register [ zp[2]:22 [ getFAC::return#2 ] ] with [ zp[2]:18 [ print_uint::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:22 [ getFAC::return#2 print_uint::w#0 ] ] with [ zp[2]:20 [ getFAC::return#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:25 [ setMEMtoFAC::mem#2 ] ] with [ zp[2]:16 [ setFAC::prepareMEM1_mem#0 setFAC::w#1 ] ]
Coalescing zero page register [ zp[2]:22 [ getFAC::return#2 print_uint::w#0 getFAC::return#0 ] ] with [ zp[2]:27 [ mulFACbyMEM::mem#2 ] ]
Coalescing zero page register [ zp[2]:22 [ getFAC::return#2 print_uint::w#0 getFAC::return#0 mulFACbyMEM::mem#2 ] ] with [ zp[2]:25 [ setMEMtoFAC::mem#2 setFAC::prepareMEM1_mem#0 setFAC::w#1 ] ]
Allocated (was zp[2]:5) zp[2]:4 [ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ]
Allocated (was zp[2]:22) zp[2]:6 [ getFAC::return#2 print_uint::w#0 getFAC::return#0 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::prepareMEM1_mem#0 setFAC::w#1 ]
Allocated (was zp[1]:24) zp[1]:8 [ main::i#10 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="sinus-basic.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
  // Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM
  .label memLo = $fe
  .label memHi = $ff
  .label print_screen = $400
  .label print_line_cursor = 2
  .label print_char_cursor = 4
.segment Code
  // main
main: {
    .label f_2pi = $e2e5
    .label i = 8
    // [1] call setFAC
    // [34] phi from main to setFAC [phi:main->setFAC]
  setFAC_from_main:
    // [34] phi setFAC::prepareMEM1_mem#0 = $4fb [phi:main->setFAC#0] -- vwuz1=vwuc1 
    lda #<$4fb
    sta.z setFAC.prepareMEM1_mem
    lda #>$4fb
    sta.z setFAC.prepareMEM1_mem+1
    jsr setFAC
    // [2] phi from main to main::@2 [phi:main->main::@2]
  __b2_from_main:
    jmp __b2
    // main::@2
  __b2:
    // [3] call divFACby10
    jsr divFACby10
    // [4] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
  __b3_from___b2:
    jmp __b3
    // main::@3
  __b3:
    // [5] call setMEMtoFAC
    // [43] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC]
  setMEMtoFAC_from___b3:
    // [43] phi setMEMtoFAC::mem#2 = main::f_127 [phi:main::@3->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta.z setMEMtoFAC.mem
    lda #>f_127
    sta.z setMEMtoFAC.mem+1
    jsr setMEMtoFAC
    // [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  __b1_from___b3:
    // [6] phi print_line_cursor#15 = print_screen#0 [phi:main::@3->main::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor
    lda #>print_screen
    sta.z print_line_cursor+1
    // [6] phi print_char_cursor#34 = print_screen#0 [phi:main::@3->main::@1#1] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [6] phi main::i#10 = 1 [phi:main::@3->main::@1#2] -- vbuz1=vbuc1 
    lda #1
    sta.z i
    jmp __b1
    // main::@1
  __b1:
    // [7] setFAC::w#1 = (unsigned int)main::i#10 -- vwuz1=_word_vbuz2 
    lda.z i
    sta.z setFAC.w
    lda #0
    sta.z setFAC.w+1
    // [8] call setFAC
    // [34] phi from main::@1 to setFAC [phi:main::@1->setFAC]
  setFAC_from___b1:
    // [34] phi setFAC::prepareMEM1_mem#0 = setFAC::w#1 [phi:main::@1->setFAC#0] -- register_copy 
    jsr setFAC
    // [9] phi from main::@1 to main::@4 [phi:main::@1->main::@4]
  __b4_from___b1:
    jmp __b4
    // main::@4
  __b4:
    // [10] call mulFACbyMEM
    // [50] phi from main::@4 to mulFACbyMEM [phi:main::@4->mulFACbyMEM]
  mulFACbyMEM_from___b4:
    // [50] phi mulFACbyMEM::mem#2 = main::f_2pi [phi:main::@4->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_2pi
    sta.z mulFACbyMEM.mem
    lda #>f_2pi
    sta.z mulFACbyMEM.mem+1
    jsr mulFACbyMEM
    // [11] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
  __b5_from___b4:
    jmp __b5
    // main::@5
  __b5:
    // [12] call setMEMtoFAC
    // [43] phi from main::@5 to setMEMtoFAC [phi:main::@5->setMEMtoFAC]
  setMEMtoFAC_from___b5:
    // [43] phi setMEMtoFAC::mem#2 = main::f_i [phi:main::@5->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_i
    sta.z setMEMtoFAC.mem
    lda #>f_i
    sta.z setMEMtoFAC.mem+1
    jsr setMEMtoFAC
    // [13] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [14] call setFAC
    // [34] phi from main::@6 to setFAC [phi:main::@6->setFAC]
  setFAC_from___b6:
    // [34] phi setFAC::prepareMEM1_mem#0 = $19 [phi:main::@6->setFAC#0] -- vwuz1=vbuc1 
    lda #<$19
    sta.z setFAC.prepareMEM1_mem
    lda #>$19
    sta.z setFAC.prepareMEM1_mem+1
    jsr setFAC
    // [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  __b7_from___b6:
    jmp __b7
    // main::@7
  __b7:
    // [16] call divMEMbyFAC
    // [57] phi from main::@7 to divMEMbyFAC [phi:main::@7->divMEMbyFAC]
  divMEMbyFAC_from___b7:
    jsr divMEMbyFAC
    // [17] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  __b8_from___b7:
    jmp __b8
    // main::@8
  __b8:
    // [18] call sinFAC
    jsr sinFAC
    // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  __b9_from___b8:
    jmp __b9
    // main::@9
  __b9:
    // [20] call mulFACbyMEM
    // [50] phi from main::@9 to mulFACbyMEM [phi:main::@9->mulFACbyMEM]
  mulFACbyMEM_from___b9:
    // [50] phi mulFACbyMEM::mem#2 = main::f_127 [phi:main::@9->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta.z mulFACbyMEM.mem
    lda #>f_127
    sta.z mulFACbyMEM.mem+1
    jsr mulFACbyMEM
    // [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  __b10_from___b9:
    jmp __b10
    // main::@10
  __b10:
    // [22] call addMEMtoFAC
    // [64] phi from main::@10 to addMEMtoFAC [phi:main::@10->addMEMtoFAC]
  addMEMtoFAC_from___b10:
    jsr addMEMtoFAC
    // [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  __b11_from___b10:
    jmp __b11
    // main::@11
  __b11:
    // [24] call getFAC
    jsr getFAC
    // [25] getFAC::return#2 = getFAC::return#0
    jmp __b12
    // main::@12
  __b12:
    // [26] print_uint::w#0 = getFAC::return#2
    // [27] call print_uint
    jsr print_uint
    // [28] phi from main::@12 to main::@13 [phi:main::@12->main::@13]
  __b13_from___b12:
    jmp __b13
    // main::@13
  __b13:
    // [29] call print_ln
    // [77] phi from main::@13 to print_ln [phi:main::@13->print_ln]
  print_ln_from___b13:
    jsr print_ln
    jmp __b14
    // main::@14
  __b14:
    // [30] main::i#1 = ++ main::i#10 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [31] if(main::i#1!=$1a) goto main::@15 -- vbuz1_neq_vbuc1_then_la1 
    lda #$1a
    cmp.z i
    bne __b15
    jmp __breturn
    // main::@return
  __breturn:
    // [32] return 
    rts
    // main::@15
  __b15:
    // [33] print_char_cursor#53 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [6] phi from main::@15 to main::@1 [phi:main::@15->main::@1]
  __b1_from___b15:
    // [6] phi print_line_cursor#15 = print_line_cursor#0 [phi:main::@15->main::@1#0] -- register_copy 
    // [6] phi print_char_cursor#34 = print_char_cursor#53 [phi:main::@15->main::@1#1] -- register_copy 
    // [6] phi main::i#10 = main::i#1 [phi:main::@15->main::@1#2] -- register_copy 
    jmp __b1
  .segment Data
    f_i: .byte 0, 0, 0, 0, 0
    f_127: .byte 0, 0, 0, 0, 0
}
.segment Code
  // setFAC
// FAC = unsigned int
// Set the FAC (floating point accumulator) to the integer value of a 16bit unsigned int
// void setFAC(__zp(6) unsigned int w)
setFAC: {
    .label prepareMEM1_mem = 6
    .label w = 6
    jmp prepareMEM1
    // setFAC::prepareMEM1
  prepareMEM1:
    // [35] setFAC::prepareMEM1_$0 = byte0  setFAC::prepareMEM1_mem#0 -- vbuaa=_byte0_vwuz1 
    lda.z prepareMEM1_mem
    // [36] *memLo = setFAC::prepareMEM1_$0 -- _deref_pbuc1=vbuaa 
    sta memLo
    // [37] setFAC::prepareMEM1_$1 = byte1  setFAC::prepareMEM1_mem#0 -- vbuaa=_byte1_vwuz1 
    lda.z prepareMEM1_mem+1
    // [38] *memHi = setFAC::prepareMEM1_$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    jmp __b1
    // setFAC::@1
  __b1:
    // asm { ldymemLo ldamemHi jsr$b391  }
    // Load unsigned int register Y,A into FAC (floating point accumulator)
    ldy memLo
    lda memHi
    jsr $b391
    jmp __breturn
    // setFAC::@return
  __breturn:
    // [40] return 
    rts
}
  // divFACby10
// FAC = FAC/10
// Set FAC to FAC divided by 10
divFACby10: {
    // asm { jsr$bafe  }
    jsr $bafe
    jmp __breturn
    // divFACby10::@return
  __breturn:
    // [42] return 
    rts
}
  // setMEMtoFAC
// MEM = FAC
// Stores the value of the FAC to memory
// Stores 5 chars (means it is necessary to allocate 5 chars to avoid clobbering other data using eg. char[] mem = {0, 0, 0, 0, 0};)
// void setMEMtoFAC(__zp(6) char *mem)
setMEMtoFAC: {
    .label mem = 6
    jmp prepareMEM1
    // setMEMtoFAC::prepareMEM1
  prepareMEM1:
    // [44] setMEMtoFAC::prepareMEM1_$0 = byte0  (unsigned int)setMEMtoFAC::mem#2 -- vbuaa=_byte0_vwuz1 
    lda.z mem
    // [45] *memLo = setMEMtoFAC::prepareMEM1_$0 -- _deref_pbuc1=vbuaa 
    sta memLo
    // [46] setMEMtoFAC::prepareMEM1_$1 = byte1  (unsigned int)setMEMtoFAC::mem#2 -- vbuaa=_byte1_vwuz1 
    lda.z mem+1
    // [47] *memHi = setMEMtoFAC::prepareMEM1_$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    jmp __b1
    // setMEMtoFAC::@1
  __b1:
    // asm { ldxmemLo ldymemHi jsr$bbd4  }
    ldx memLo
    ldy memHi
    jsr $bbd4
    jmp __breturn
    // setMEMtoFAC::@return
  __breturn:
    // [49] return 
    rts
}
  // mulFACbyMEM
// FAC = MEM*FAC
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
// Reads 5 chars from memory
// void mulFACbyMEM(__zp(6) char *mem)
mulFACbyMEM: {
    .label mem = 6
    jmp prepareMEM1
    // mulFACbyMEM::prepareMEM1
  prepareMEM1:
    // [51] mulFACbyMEM::prepareMEM1_$0 = byte0  (unsigned int)mulFACbyMEM::mem#2 -- vbuaa=_byte0_vwuz1 
    lda.z mem
    // [52] *memLo = mulFACbyMEM::prepareMEM1_$0 -- _deref_pbuc1=vbuaa 
    sta memLo
    // [53] mulFACbyMEM::prepareMEM1_$1 = byte1  (unsigned int)mulFACbyMEM::mem#2 -- vbuaa=_byte1_vwuz1 
    lda.z mem+1
    // [54] *memHi = mulFACbyMEM::prepareMEM1_$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    jmp __b1
    // mulFACbyMEM::@1
  __b1:
    // asm { ldamemLo ldymemHi jsr$ba28  }
    lda memLo
    ldy memHi
    jsr $ba28
    jmp __breturn
    // mulFACbyMEM::@return
  __breturn:
    // [56] return 
    rts
}
  // divMEMbyFAC
// FAC = MEM/FAC
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
// Reads 5 chars from memory
// void divMEMbyFAC(char *mem)
divMEMbyFAC: {
    .const prepareMEM1_mem = main.f_i
    jmp prepareMEM1
    // divMEMbyFAC::prepareMEM1
  prepareMEM1:
    // [58] *memLo = byte0 divMEMbyFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #<prepareMEM1_mem
    sta memLo
    // [59] *memHi = byte1 divMEMbyFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #>prepareMEM1_mem
    sta memHi
    jmp __b1
    // divMEMbyFAC::@1
  __b1:
    // asm { ldamemLo ldymemHi jsr$bb0f  }
    lda memLo
    ldy memHi
    jsr $bb0f
    jmp __breturn
    // divMEMbyFAC::@return
  __breturn:
    // [61] return 
    rts
}
  // sinFAC
// FAC = sin(FAC)
// Set FAC to sine of the FAC - sin(FAC)
// Sine is calculated on radians (0-2*PI)
sinFAC: {
    // asm { jsr$e26b  }
    jsr $e26b
    jmp __breturn
    // sinFAC::@return
  __breturn:
    // [63] return 
    rts
}
  // addMEMtoFAC
// FAC = MEM+FAC
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
// Reads 5 chars from memory
// void addMEMtoFAC(char *mem)
addMEMtoFAC: {
    .const prepareMEM1_mem = main.f_127
    jmp prepareMEM1
    // addMEMtoFAC::prepareMEM1
  prepareMEM1:
    // [65] *memLo = byte0 addMEMtoFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #<prepareMEM1_mem
    sta memLo
    // [66] *memHi = byte1 addMEMtoFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #>prepareMEM1_mem
    sta memHi
    jmp __b1
    // addMEMtoFAC::@1
  __b1:
    // asm { ldamemLo ldymemHi jsr$b867  }
    lda memLo
    ldy memHi
    jsr $b867
    jmp __breturn
    // addMEMtoFAC::@return
  __breturn:
    // [68] return 
    rts
}
  // getFAC
// unsigned int = FAC
// Get the value of the FAC (floating point accumulator) as an integer 16bit unsigned int
// Destroys the value in the FAC in the process
getFAC: {
    .label return = 6
    // asm { jsr$b1aa stymemLo stamemHi  }
    // Load FAC (floating point accumulator) integer part into unsigned int register Y,A
    jsr $b1aa
    sty memLo
    sta memHi
    // [70] getFAC::return#0 = *memHi w= *memLo -- vwuz1=_deref_pbuc1_word__deref_pbuc2 
    lda memHi
    sta.z return+1
    lda memLo
    sta.z return
    jmp __breturn
    // getFAC::@return
  __breturn:
    // [71] return 
    rts
}
  // print_uint
// Print a unsigned int as HEX
// void print_uint(__zp(6) unsigned int w)
print_uint: {
    .label w = 6
    // [72] print_uchar::b#0 = byte1  print_uint::w#0 -- vbuxx=_byte1_vwuz1 
    ldx.z w+1
    // [73] call print_uchar
    // [82] phi from print_uint to print_uchar [phi:print_uint->print_uchar]
  print_uchar_from_print_uint:
    // [82] phi print_char_cursor#33 = print_char_cursor#34 [phi:print_uint->print_uchar#0] -- register_copy 
    // [82] phi print_uchar::b#2 = print_uchar::b#0 [phi:print_uint->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __b1
    // print_uint::@1
  __b1:
    // [74] print_uchar::b#1 = byte0  print_uint::w#0 -- vbuxx=_byte0_vwuz1 
    ldx.z w
    // [75] call print_uchar
    // [82] phi from print_uint::@1 to print_uchar [phi:print_uint::@1->print_uchar]
  print_uchar_from___b1:
    // [82] phi print_char_cursor#33 = print_char_cursor#25 [phi:print_uint::@1->print_uchar#0] -- register_copy 
    // [82] phi print_uchar::b#2 = print_uchar::b#1 [phi:print_uint::@1->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __breturn
    // print_uint::@return
  __breturn:
    // [76] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [78] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
  __b1_from_print_ln:
  __b1_from___b1:
    // [78] phi print_line_cursor#7 = print_line_cursor#15 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [79] print_line_cursor#0 = print_line_cursor#7 + $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [80] if(print_line_cursor#0<print_char_cursor#25) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc __b1_from___b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b1_from___b1
  !:
    jmp __breturn
    // print_ln::@return
  __breturn:
    // [81] return 
    rts
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // [83] print_uchar::$0 = print_uchar::b#2 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [84] print_char::ch#0 = print_hextab[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [85] call print_char
  // Table of hexadecimal digits
    // [90] phi from print_uchar to print_char [phi:print_uchar->print_char]
  print_char_from_print_uchar:
    // [90] phi print_char_cursor#24 = print_char_cursor#33 [phi:print_uchar->print_char#0] -- register_copy 
    // [90] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_uchar::@1
  __b1:
    // [86] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [87] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [88] call print_char
    // [90] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
  print_char_from___b1:
    // [90] phi print_char_cursor#24 = print_char_cursor#25 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [90] phi print_char::ch#2 = print_char::ch#1 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_uchar::@return
  __breturn:
    // [89] return 
    rts
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // [91] *print_char_cursor#24 = print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [92] print_char_cursor#25 = ++ print_char_cursor#24 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [93] return 
    rts
}
  // File Data
.segment Data
  print_hextab: .text "0123456789abcdef"

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b1
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b9
Removing instruction jmp __b10
Removing instruction jmp __b11
Removing instruction jmp __b12
Removing instruction jmp __b13
Removing instruction jmp __b14
Removing instruction jmp __breturn
Removing instruction jmp prepareMEM1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp prepareMEM1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp prepareMEM1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp prepareMEM1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Removing instruction jmp prepareMEM1
Removing instruction jmp __b1
Removing instruction jmp __breturn
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 __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda memHi
Replacing instruction lda memLo with TYA
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Removing instruction __b2_from_main:
Removing instruction __b3_from___b2:
Removing instruction setMEMtoFAC_from___b3:
Removing instruction __b4_from___b1:
Removing instruction mulFACbyMEM_from___b4:
Removing instruction __b5_from___b4:
Removing instruction setMEMtoFAC_from___b5:
Removing instruction __b6_from___b5:
Removing instruction setFAC_from___b6:
Removing instruction __b7_from___b6:
Removing instruction divMEMbyFAC_from___b7:
Removing instruction __b8_from___b7:
Removing instruction __b9_from___b8:
Removing instruction mulFACbyMEM_from___b9:
Removing instruction __b10_from___b9:
Removing instruction addMEMtoFAC_from___b10:
Removing instruction __b11_from___b10:
Removing instruction __b13_from___b12:
Removing instruction print_ln_from___b13:
Removing instruction __b1_from_print_ln:
Removing instruction __b1_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction setFAC_from_main:
Removing instruction __b2:
Removing instruction __b3:
Removing instruction __b1_from___b3:
Removing instruction setFAC_from___b1:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b7:
Removing instruction __b8:
Removing instruction __b9:
Removing instruction __b10:
Removing instruction __b11:
Removing instruction __b12:
Removing instruction __b13:
Removing instruction __b14:
Removing instruction __breturn:
Removing instruction __b1_from___b15:
Removing instruction prepareMEM1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction prepareMEM1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction prepareMEM1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction prepareMEM1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction prepareMEM1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction print_uchar_from_print_uint:
Removing instruction __b1:
Removing instruction print_uchar_from___b1:
Removing instruction __breturn:
Removing instruction __breturn:
Removing instruction print_char_from_print_uchar:
Removing instruction __b1:
Removing instruction print_char_from___b1:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction lda memHi
Replacing instruction ldy memHi with TAY
Succesful ASM optimization Pass5UnnecesaryLoadElimination

FINAL SYMBOL TABLE
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
void addMEMtoFAC(char *mem)
char *addMEMtoFAC::mem
unsigned int addMEMtoFAC::prepareMEM1_mem
__constant unsigned int addMEMtoFAC::prepareMEM1_mem#0 = (unsigned int)main::f_127 // prepareMEM1_mem
void divFACby10()
void divMEMbyFAC(char *mem)
char *divMEMbyFAC::mem
unsigned int divMEMbyFAC::prepareMEM1_mem
__constant unsigned int divMEMbyFAC::prepareMEM1_mem#0 = (unsigned int)main::f_i // prepareMEM1_mem
unsigned int getFAC()
unsigned int getFAC::return
unsigned int getFAC::return#0 // return zp[2]:6 37.33333333333333
unsigned int getFAC::return#2 // return zp[2]:6 22.0
unsigned int getFAC::w
void main()
__constant char main::f_127[] = { 0, 0, 0, 0, 0 }
__constant char * const main::f_2pi = (char *) 58085
__constant char main::f_i[] = { 0, 0, 0, 0, 0 }
char main::i
char main::i#1 // i zp[1]:8 11.0
char main::i#10 // i zp[1]:8 0.9166666666666666
__constant char * const memHi = (char *) 255
__constant char * const memLo = (char *) 254
void mulFACbyMEM(char *mem)
char *mulFACbyMEM::mem
char *mulFACbyMEM::mem#2 // mem zp[2]:6
char mulFACbyMEM::prepareMEM1_$0 // reg byte a 202.0
char mulFACbyMEM::prepareMEM1_$1 // reg byte a 202.0
unsigned int mulFACbyMEM::prepareMEM1_mem
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // reg byte a 2002.0
char print_char::ch#1 // reg byte a 2002.0
char print_char::ch#2 // reg byte a 12003.0
char *print_char_cursor
char *print_char_cursor#24 // print_char_cursor zp[2]:4 11002.0
char *print_char_cursor#25 // print_char_cursor zp[2]:4 1241.4117647058824
char *print_char_cursor#33 // print_char_cursor zp[2]:4 401.0
char *print_char_cursor#34 // print_char_cursor zp[2]:4 5.090909090909091
char *print_char_cursor#53 // print_char_cursor zp[2]:4 22.0
__constant const char print_hextab[] = "0123456789abcdef"z
char *print_line_cursor
char *print_line_cursor#0 // print_line_cursor zp[2]:2 4289.285714285714
char *print_line_cursor#15 // print_line_cursor zp[2]:2 4.666666666666666
char *print_line_cursor#7 // print_line_cursor zp[2]:2 20103.0
void print_ln()
char *print_screen
__constant char *print_screen#0 = (char *) 1024 // print_screen
void print_uchar(char b)
char print_uchar::$0 // reg byte a 2002.0
char print_uchar::$2 // reg byte x 2002.0
char print_uchar::b
char print_uchar::b#0 // reg byte x 202.0
char print_uchar::b#1 // reg byte x 202.0
char print_uchar::b#2 // reg byte x 551.0
void print_uint(unsigned int w)
unsigned int print_uint::w
unsigned int print_uint::w#0 // w zp[2]:6 71.0
void setFAC(unsigned int w)
char setFAC::prepareMEM1_$0 // reg byte a 202.0
char setFAC::prepareMEM1_$1 // reg byte a 202.0
unsigned int setFAC::prepareMEM1_mem
unsigned int setFAC::prepareMEM1_mem#0 // prepareMEM1_mem zp[2]:6 71.0
unsigned int setFAC::w
unsigned int setFAC::w#1 // w zp[2]:6 22.0
void setMEMtoFAC(char *mem)
char *setMEMtoFAC::mem
char *setMEMtoFAC::mem#2 // mem zp[2]:6
char setMEMtoFAC::prepareMEM1_$0 // reg byte a 202.0
char setMEMtoFAC::prepareMEM1_$1 // reg byte a 202.0
unsigned int setMEMtoFAC::prepareMEM1_mem
void sinFAC()

zp[1]:8 [ main::i#10 main::i#1 ]
zp[2]:2 [ print_line_cursor#7 print_line_cursor#15 print_line_cursor#0 ]
reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp[2]:4 [ print_char_cursor#24 print_char_cursor#33 print_char_cursor#34 print_char_cursor#53 print_char_cursor#25 ]
zp[2]:6 [ getFAC::return#2 print_uint::w#0 getFAC::return#0 mulFACbyMEM::mem#2 setMEMtoFAC::mem#2 setFAC::prepareMEM1_mem#0 setFAC::w#1 ]
reg byte a [ setFAC::prepareMEM1_$0 ]
reg byte a [ setFAC::prepareMEM1_$1 ]
reg byte a [ setMEMtoFAC::prepareMEM1_$0 ]
reg byte a [ setMEMtoFAC::prepareMEM1_$1 ]
reg byte a [ mulFACbyMEM::prepareMEM1_$0 ]
reg byte a [ mulFACbyMEM::prepareMEM1_$1 ]
reg byte a [ print_uchar::$0 ]
reg byte x [ print_uchar::$2 ]


FINAL ASSEMBLER
Score: 4957

  // 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="sinus-basic.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
  // Zeropage addresses used to hold lo/hi-bytes of addresses of float numbers in MEM
  .label memLo = $fe
  .label memHi = $ff
  .label print_screen = $400
  .label print_line_cursor = 2
  .label print_char_cursor = 4
.segment Code
  // main
main: {
    .label f_2pi = $e2e5
    .label i = 8
    // setFAC(1275)
    // [1] call setFAC
    // [34] phi from main to setFAC [phi:main->setFAC]
    // [34] phi setFAC::prepareMEM1_mem#0 = $4fb [phi:main->setFAC#0] -- vwuz1=vwuc1 
    lda #<$4fb
    sta.z setFAC.prepareMEM1_mem
    lda #>$4fb
    sta.z setFAC.prepareMEM1_mem+1
    jsr setFAC
    // [2] phi from main to main::@2 [phi:main->main::@2]
    // main::@2
    // divFACby10()
    // [3] call divFACby10
    jsr divFACby10
    // [4] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
    // main::@3
    // setMEMtoFAC(f_127)
    // [5] call setMEMtoFAC
    // [43] phi from main::@3 to setMEMtoFAC [phi:main::@3->setMEMtoFAC]
    // [43] phi setMEMtoFAC::mem#2 = main::f_127 [phi:main::@3->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta.z setMEMtoFAC.mem
    lda #>f_127
    sta.z setMEMtoFAC.mem+1
    jsr setMEMtoFAC
    // [6] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [6] phi print_line_cursor#15 = print_screen#0 [phi:main::@3->main::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor
    lda #>print_screen
    sta.z print_line_cursor+1
    // [6] phi print_char_cursor#34 = print_screen#0 [phi:main::@3->main::@1#1] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [6] phi main::i#10 = 1 [phi:main::@3->main::@1#2] -- vbuz1=vbuc1 
    lda #1
    sta.z i
    // main::@1
  __b1:
    // setFAC((word)i)
    // [7] setFAC::w#1 = (unsigned int)main::i#10 -- vwuz1=_word_vbuz2 
    lda.z i
    sta.z setFAC.w
    lda #0
    sta.z setFAC.w+1
    // [8] call setFAC
    // [34] phi from main::@1 to setFAC [phi:main::@1->setFAC]
    // [34] phi setFAC::prepareMEM1_mem#0 = setFAC::w#1 [phi:main::@1->setFAC#0] -- register_copy 
    jsr setFAC
    // [9] phi from main::@1 to main::@4 [phi:main::@1->main::@4]
    // main::@4
    // mulFACbyMEM(f_2pi)
    // [10] call mulFACbyMEM
    // [50] phi from main::@4 to mulFACbyMEM [phi:main::@4->mulFACbyMEM]
    // [50] phi mulFACbyMEM::mem#2 = main::f_2pi [phi:main::@4->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_2pi
    sta.z mulFACbyMEM.mem
    lda #>f_2pi
    sta.z mulFACbyMEM.mem+1
    jsr mulFACbyMEM
    // [11] phi from main::@4 to main::@5 [phi:main::@4->main::@5]
    // main::@5
    // setMEMtoFAC(f_i)
    // [12] call setMEMtoFAC
    // [43] phi from main::@5 to setMEMtoFAC [phi:main::@5->setMEMtoFAC]
    // [43] phi setMEMtoFAC::mem#2 = main::f_i [phi:main::@5->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_i
    sta.z setMEMtoFAC.mem
    lda #>f_i
    sta.z setMEMtoFAC.mem+1
    jsr setMEMtoFAC
    // [13] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // setFAC(25)
    // [14] call setFAC
    // [34] phi from main::@6 to setFAC [phi:main::@6->setFAC]
    // [34] phi setFAC::prepareMEM1_mem#0 = $19 [phi:main::@6->setFAC#0] -- vwuz1=vbuc1 
    lda #<$19
    sta.z setFAC.prepareMEM1_mem
    lda #>$19
    sta.z setFAC.prepareMEM1_mem+1
    jsr setFAC
    // [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
    // main::@7
    // divMEMbyFAC(f_i)
    // [16] call divMEMbyFAC
    // [57] phi from main::@7 to divMEMbyFAC [phi:main::@7->divMEMbyFAC]
    jsr divMEMbyFAC
    // [17] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
    // main::@8
    // sinFAC()
    // [18] call sinFAC
    jsr sinFAC
    // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
    // main::@9
    // mulFACbyMEM(f_127)
    // [20] call mulFACbyMEM
    // [50] phi from main::@9 to mulFACbyMEM [phi:main::@9->mulFACbyMEM]
    // [50] phi mulFACbyMEM::mem#2 = main::f_127 [phi:main::@9->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta.z mulFACbyMEM.mem
    lda #>f_127
    sta.z mulFACbyMEM.mem+1
    jsr mulFACbyMEM
    // [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
    // main::@10
    // addMEMtoFAC(f_127)
    // [22] call addMEMtoFAC
    // [64] phi from main::@10 to addMEMtoFAC [phi:main::@10->addMEMtoFAC]
    jsr addMEMtoFAC
    // [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
    // main::@11
    // getFAC()
    // [24] call getFAC
    jsr getFAC
    // [25] getFAC::return#2 = getFAC::return#0
    // main::@12
    // print_uint(getFAC())
    // [26] print_uint::w#0 = getFAC::return#2
    // [27] call print_uint
    jsr print_uint
    // [28] phi from main::@12 to main::@13 [phi:main::@12->main::@13]
    // main::@13
    // print_ln()
    // [29] call print_ln
    // [77] phi from main::@13 to print_ln [phi:main::@13->print_ln]
    jsr print_ln
    // main::@14
    // for(byte i : 1..25)
    // [30] main::i#1 = ++ main::i#10 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [31] if(main::i#1!=$1a) goto main::@15 -- vbuz1_neq_vbuc1_then_la1 
    lda #$1a
    cmp.z i
    bne __b15
    // main::@return
    // }
    // [32] return 
    rts
    // main::@15
  __b15:
    // [33] print_char_cursor#53 = print_line_cursor#0 -- pbuz1=pbuz2 
    lda.z print_line_cursor
    sta.z print_char_cursor
    lda.z print_line_cursor+1
    sta.z print_char_cursor+1
    // [6] phi from main::@15 to main::@1 [phi:main::@15->main::@1]
    // [6] phi print_line_cursor#15 = print_line_cursor#0 [phi:main::@15->main::@1#0] -- register_copy 
    // [6] phi print_char_cursor#34 = print_char_cursor#53 [phi:main::@15->main::@1#1] -- register_copy 
    // [6] phi main::i#10 = main::i#1 [phi:main::@15->main::@1#2] -- register_copy 
    jmp __b1
  .segment Data
    f_i: .byte 0, 0, 0, 0, 0
    f_127: .byte 0, 0, 0, 0, 0
}
.segment Code
  // setFAC
// FAC = unsigned int
// Set the FAC (floating point accumulator) to the integer value of a 16bit unsigned int
// void setFAC(__zp(6) unsigned int w)
setFAC: {
    .label prepareMEM1_mem = 6
    .label w = 6
    // setFAC::prepareMEM1
    // BYTE0(mem)
    // [35] setFAC::prepareMEM1_$0 = byte0  setFAC::prepareMEM1_mem#0 -- vbuaa=_byte0_vwuz1 
    lda.z prepareMEM1_mem
    // *memLo = BYTE0(mem)
    // [36] *memLo = setFAC::prepareMEM1_$0 -- _deref_pbuc1=vbuaa 
    sta memLo
    // BYTE1(mem)
    // [37] setFAC::prepareMEM1_$1 = byte1  setFAC::prepareMEM1_mem#0 -- vbuaa=_byte1_vwuz1 
    lda.z prepareMEM1_mem+1
    // *memHi = BYTE1(mem)
    // [38] *memHi = setFAC::prepareMEM1_$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    // setFAC::@1
    // asm
    // asm { ldymemLo ldamemHi jsr$b391  }
    // Load unsigned int register Y,A into FAC (floating point accumulator)
    ldy memLo
    jsr $b391
    // setFAC::@return
    // }
    // [40] return 
    rts
}
  // divFACby10
// FAC = FAC/10
// Set FAC to FAC divided by 10
divFACby10: {
    // asm
    // asm { jsr$bafe  }
    jsr $bafe
    // divFACby10::@return
    // }
    // [42] return 
    rts
}
  // setMEMtoFAC
// MEM = FAC
// Stores the value of the FAC to memory
// Stores 5 chars (means it is necessary to allocate 5 chars to avoid clobbering other data using eg. char[] mem = {0, 0, 0, 0, 0};)
// void setMEMtoFAC(__zp(6) char *mem)
setMEMtoFAC: {
    .label mem = 6
    // setMEMtoFAC::prepareMEM1
    // BYTE0(mem)
    // [44] setMEMtoFAC::prepareMEM1_$0 = byte0  (unsigned int)setMEMtoFAC::mem#2 -- vbuaa=_byte0_vwuz1 
    lda.z mem
    // *memLo = BYTE0(mem)
    // [45] *memLo = setMEMtoFAC::prepareMEM1_$0 -- _deref_pbuc1=vbuaa 
    sta memLo
    // BYTE1(mem)
    // [46] setMEMtoFAC::prepareMEM1_$1 = byte1  (unsigned int)setMEMtoFAC::mem#2 -- vbuaa=_byte1_vwuz1 
    lda.z mem+1
    // *memHi = BYTE1(mem)
    // [47] *memHi = setMEMtoFAC::prepareMEM1_$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    // setMEMtoFAC::@1
    // asm
    // asm { ldxmemLo ldymemHi jsr$bbd4  }
    ldx memLo
    tay
    jsr $bbd4
    // setMEMtoFAC::@return
    // }
    // [49] return 
    rts
}
  // mulFACbyMEM
// FAC = MEM*FAC
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
// Reads 5 chars from memory
// void mulFACbyMEM(__zp(6) char *mem)
mulFACbyMEM: {
    .label mem = 6
    // mulFACbyMEM::prepareMEM1
    // BYTE0(mem)
    // [51] mulFACbyMEM::prepareMEM1_$0 = byte0  (unsigned int)mulFACbyMEM::mem#2 -- vbuaa=_byte0_vwuz1 
    lda.z mem
    // *memLo = BYTE0(mem)
    // [52] *memLo = mulFACbyMEM::prepareMEM1_$0 -- _deref_pbuc1=vbuaa 
    sta memLo
    // BYTE1(mem)
    // [53] mulFACbyMEM::prepareMEM1_$1 = byte1  (unsigned int)mulFACbyMEM::mem#2 -- vbuaa=_byte1_vwuz1 
    lda.z mem+1
    // *memHi = BYTE1(mem)
    // [54] *memHi = mulFACbyMEM::prepareMEM1_$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    // mulFACbyMEM::@1
    // asm
    // asm { ldamemLo ldymemHi jsr$ba28  }
    lda memLo
    ldy memHi
    jsr $ba28
    // mulFACbyMEM::@return
    // }
    // [56] return 
    rts
}
  // divMEMbyFAC
// FAC = MEM/FAC
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
// Reads 5 chars from memory
// void divMEMbyFAC(char *mem)
divMEMbyFAC: {
    .const prepareMEM1_mem = main.f_i
    // divMEMbyFAC::prepareMEM1
    // *memLo = BYTE0(mem)
    // [58] *memLo = byte0 divMEMbyFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #<prepareMEM1_mem
    sta memLo
    // *memHi = BYTE1(mem)
    // [59] *memHi = byte1 divMEMbyFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #>prepareMEM1_mem
    sta memHi
    // divMEMbyFAC::@1
    // asm
    // asm { ldamemLo ldymemHi jsr$bb0f  }
    lda memLo
    ldy memHi
    jsr $bb0f
    // divMEMbyFAC::@return
    // }
    // [61] return 
    rts
}
  // sinFAC
// FAC = sin(FAC)
// Set FAC to sine of the FAC - sin(FAC)
// Sine is calculated on radians (0-2*PI)
sinFAC: {
    // asm
    // asm { jsr$e26b  }
    jsr $e26b
    // sinFAC::@return
    // }
    // [63] return 
    rts
}
  // addMEMtoFAC
// FAC = MEM+FAC
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
// Reads 5 chars from memory
// void addMEMtoFAC(char *mem)
addMEMtoFAC: {
    .const prepareMEM1_mem = main.f_127
    // addMEMtoFAC::prepareMEM1
    // *memLo = BYTE0(mem)
    // [65] *memLo = byte0 addMEMtoFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #<prepareMEM1_mem
    sta memLo
    // *memHi = BYTE1(mem)
    // [66] *memHi = byte1 addMEMtoFAC::prepareMEM1_mem#0 -- _deref_pbuc1=vbuc2 
    lda #>prepareMEM1_mem
    sta memHi
    // addMEMtoFAC::@1
    // asm
    // asm { ldamemLo ldymemHi jsr$b867  }
    lda memLo
    ldy memHi
    jsr $b867
    // addMEMtoFAC::@return
    // }
    // [68] return 
    rts
}
  // getFAC
// unsigned int = FAC
// Get the value of the FAC (floating point accumulator) as an integer 16bit unsigned int
// Destroys the value in the FAC in the process
getFAC: {
    .label return = 6
    // asm
    // asm { jsr$b1aa stymemLo stamemHi  }
    // Load FAC (floating point accumulator) integer part into unsigned int register Y,A
    jsr $b1aa
    sty memLo
    sta memHi
    // unsigned int w = MAKEWORD( *memHi, *memLo )
    // [70] getFAC::return#0 = *memHi w= *memLo -- vwuz1=_deref_pbuc1_word__deref_pbuc2 
    sta.z return+1
    tya
    sta.z return
    // getFAC::@return
    // }
    // [71] return 
    rts
}
  // print_uint
// Print a unsigned int as HEX
// void print_uint(__zp(6) unsigned int w)
print_uint: {
    .label w = 6
    // print_uchar(BYTE1(w))
    // [72] print_uchar::b#0 = byte1  print_uint::w#0 -- vbuxx=_byte1_vwuz1 
    ldx.z w+1
    // [73] call print_uchar
    // [82] phi from print_uint to print_uchar [phi:print_uint->print_uchar]
    // [82] phi print_char_cursor#33 = print_char_cursor#34 [phi:print_uint->print_uchar#0] -- register_copy 
    // [82] phi print_uchar::b#2 = print_uchar::b#0 [phi:print_uint->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_uint::@1
    // print_uchar(BYTE0(w))
    // [74] print_uchar::b#1 = byte0  print_uint::w#0 -- vbuxx=_byte0_vwuz1 
    ldx.z w
    // [75] call print_uchar
    // [82] phi from print_uint::@1 to print_uchar [phi:print_uint::@1->print_uchar]
    // [82] phi print_char_cursor#33 = print_char_cursor#25 [phi:print_uint::@1->print_uchar#0] -- register_copy 
    // [82] phi print_uchar::b#2 = print_uchar::b#1 [phi:print_uint::@1->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_uint::@return
    // }
    // [76] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [78] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
    // [78] phi print_line_cursor#7 = print_line_cursor#15 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  __b1:
    // print_line_cursor + $28
    // [79] print_line_cursor#0 = print_line_cursor#7 + $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // while (print_line_cursor<print_char_cursor)
    // [80] if(print_line_cursor#0<print_char_cursor#25) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc __b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc __b1
  !:
    // print_ln::@return
    // }
    // [81] return 
    rts
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // b>>4
    // [83] print_uchar::$0 = print_uchar::b#2 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [84] print_char::ch#0 = print_hextab[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [85] call print_char
  // Table of hexadecimal digits
    // [90] phi from print_uchar to print_char [phi:print_uchar->print_char]
    // [90] phi print_char_cursor#24 = print_char_cursor#33 [phi:print_uchar->print_char#0] -- register_copy 
    // [90] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@1
    // b&$f
    // [86] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [87] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [88] call print_char
    // [90] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
    // [90] phi print_char_cursor#24 = print_char_cursor#25 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [90] phi print_char::ch#2 = print_char::ch#1 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@return
    // }
    // [89] return 
    rts
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [91] *print_char_cursor#24 = print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [92] print_char_cursor#25 = ++ print_char_cursor#24 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [93] return 
    rts
}
  // File Data
.segment Data
  print_hextab: .text "0123456789abcdef"

