
CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) print_screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) print_line_cursor#0 ← (byte*) print_screen#0
  (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
  to:@12
print_ln: scope:[print_ln]  from main::@15
  (byte*) print_char_cursor#29 ← phi( main::@15/(byte*) print_char_cursor#11 )
  (byte*) print_line_cursor#12 ← phi( main::@15/(byte*) print_line_cursor#13 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#15 ← phi( print_ln/(byte*) print_char_cursor#29 print_ln::@1/(byte*) print_char_cursor#15 )
  (byte*) print_line_cursor#6 ← phi( print_ln/(byte*) print_line_cursor#12 print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#15
  if((bool~) print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  (byte*) print_line_cursor#7 ← phi( print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#1 ← (byte*) print_line_cursor#7
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#16 ← phi( print_ln::@2/(byte*) print_char_cursor#1 )
  (byte*) print_line_cursor#8 ← phi( print_ln::@2/(byte*) print_line_cursor#7 )
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#8
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#16
  return 
  to:@return
print_word: scope:[print_word]  from main::@14
  (byte*) print_char_cursor#30 ← phi( main::@14/(byte*) print_char_cursor#32 )
  (word) print_word::w#1 ← phi( main::@14/(word) print_word::w#0 )
  (byte~) print_word::$0 ← > (word) print_word::w#1
  (byte) print_byte::b#0 ← (byte~) print_word::$0
  call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  (word) print_word::w#2 ← phi( print_word/(word) print_word::w#1 )
  (byte*) print_char_cursor#17 ← phi( print_word/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#17
  (byte~) print_word::$2 ← < (word) print_word::w#2
  (byte) print_byte::b#1 ← (byte~) print_word::$2
  call print_byte 
  to:print_word::@2
print_word::@2: scope:[print_word]  from print_word::@1
  (byte*) print_char_cursor#18 ← phi( print_word::@1/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#18
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@2
  (byte*) print_char_cursor#19 ← phi( print_word::@2/(byte*) print_char_cursor#4 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#19
  return 
  to:@return
@12: scope:[]  from @begin
  (byte*) print_line_cursor#17 ← phi( @begin/(byte*) print_line_cursor#0 )
  (byte*) print_char_cursor#36 ← phi( @begin/(byte*) print_char_cursor#0 )
  (byte[]) print_hextab#0 ← (const string) $0
  to:@19
print_byte: scope:[print_byte]  from print_word print_word::@1
  (byte*) print_char_cursor#31 ← phi( print_word/(byte*) print_char_cursor#30 print_word::@1/(byte*) print_char_cursor#3 )
  (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) print_char::ch#0 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 )
  (byte*) print_char_cursor#20 ← phi( print_byte/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#20
  (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word/dword/signed dword) 15
  (byte) print_char::ch#1 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#21 ← phi( print_byte::@1/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#21
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#22 ← phi( print_byte::@2/(byte*) print_char_cursor#7 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#22
  return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1
  (byte*) print_char_cursor#23 ← phi( print_byte/(byte*) print_char_cursor#31 print_byte::@1/(byte*) print_char_cursor#6 )
  (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2
  (byte*) print_char_cursor#9 ← ++ (byte*) print_char_cursor#23
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#24 ← phi( print_char/(byte*) print_char_cursor#9 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#24
  return 
  to:@return
@19: scope:[]  from @12
  (byte*) print_line_cursor#16 ← phi( @12/(byte*) print_line_cursor#17 )
  (byte*) print_char_cursor#35 ← phi( @12/(byte*) print_char_cursor#36 )
  (byte*) memLo#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 254
  (byte*) memHi#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 255
  to:@47
prepareMEM: scope:[prepareMEM]  from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC
  (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 )
  (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5
  *((byte*) memLo#0) ← (byte~) prepareMEM::$0
  (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5
  *((byte*) memHi#0) ← (byte~) prepareMEM::$1
  to:prepareMEM::@return
prepareMEM::@return: scope:[prepareMEM]  from prepareMEM
  return 
  to:@return
setFAC: scope:[setFAC]  from main main::@1 main::@8
  (word) setFAC::w#3 ← phi( main/(word) setFAC::w#0 main::@1/(word) setFAC::w#1 main::@8/(word) setFAC::w#2 )
  (byte*~) setFAC::$0 ← ((byte*)) (word) setFAC::w#3
  (byte*) prepareMEM::mem#0 ← (byte*~) setFAC::$0
  call prepareMEM 
  to:setFAC::@1
setFAC::@1: scope:[setFAC]  from setFAC
  asm { ldy$fe lda$ff jsr$b391  }
  to:setFAC::@return
setFAC::@return: scope:[setFAC]  from setFAC::@1
  return 
  to:@return
getFAC: scope:[getFAC]  from main::@13
  asm { jsr$b1aa sty$fe sta$ff  }
  (word) getFAC::w#0 ← { *((byte*) memHi#0), *((byte*) memLo#0) }
  (word) getFAC::return#0 ← (word) getFAC::w#0
  to:getFAC::@return
getFAC::@return: scope:[getFAC]  from getFAC
  (word) getFAC::return#3 ← phi( getFAC/(word) getFAC::return#0 )
  (word) getFAC::return#1 ← (word) getFAC::return#3
  return 
  to:@return
setMEMtoFAC: scope:[setMEMtoFAC]  from main::@4 main::@7
  (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(byte*) setMEMtoFAC::mem#0 main::@7/(byte*) setMEMtoFAC::mem#1 )
  (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2
  call prepareMEM 
  to:setMEMtoFAC::@1
setMEMtoFAC::@1: scope:[setMEMtoFAC]  from setMEMtoFAC
  asm { ldx$fe ldy$ff jsr$bbd4  }
  to:setMEMtoFAC::@return
setMEMtoFAC::@return: scope:[setMEMtoFAC]  from setMEMtoFAC::@1
  return 
  to:@return
addMEMtoFAC: scope:[addMEMtoFAC]  from main::@12
  (byte*) addMEMtoFAC::mem#1 ← phi( main::@12/(byte*) addMEMtoFAC::mem#0 )
  (byte*) prepareMEM::mem#2 ← (byte*) addMEMtoFAC::mem#1
  call prepareMEM 
  to:addMEMtoFAC::@1
addMEMtoFAC::@1: scope:[addMEMtoFAC]  from addMEMtoFAC
  asm { lda$fe ldy$ff jsr$b867  }
  to:addMEMtoFAC::@return
addMEMtoFAC::@return: scope:[addMEMtoFAC]  from addMEMtoFAC::@1
  return 
  to:@return
divMEMbyFAC: scope:[divMEMbyFAC]  from main::@9
  (byte*) divMEMbyFAC::mem#1 ← phi( main::@9/(byte*) divMEMbyFAC::mem#0 )
  (byte*) prepareMEM::mem#3 ← (byte*) divMEMbyFAC::mem#1
  call prepareMEM 
  to:divMEMbyFAC::@1
divMEMbyFAC::@1: scope:[divMEMbyFAC]  from divMEMbyFAC
  asm { lda$fe ldy$ff jsr$bb0f  }
  to:divMEMbyFAC::@return
divMEMbyFAC::@return: scope:[divMEMbyFAC]  from divMEMbyFAC::@1
  return 
  to:@return
mulFACbyMEM: scope:[mulFACbyMEM]  from main::@11 main::@6
  (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(byte*) mulFACbyMEM::mem#1 main::@6/(byte*) mulFACbyMEM::mem#0 )
  (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2
  call prepareMEM 
  to:mulFACbyMEM::@1
mulFACbyMEM::@1: scope:[mulFACbyMEM]  from mulFACbyMEM
  asm { lda$fe ldy$ff jsr$ba28  }
  to:mulFACbyMEM::@return
mulFACbyMEM::@return: scope:[mulFACbyMEM]  from mulFACbyMEM::@1
  return 
  to:@return
sinFAC: scope:[sinFAC]  from main::@10
  asm { jsr$e26b  }
  to:sinFAC::@return
sinFAC::@return: scope:[sinFAC]  from sinFAC
  return 
  to:@return
divFACby10: scope:[divFACby10]  from main::@3
  asm { jsr$bafe  }
  to:divFACby10::@return
divFACby10::@return: scope:[divFACby10]  from divFACby10
  return 
  to:@return
main: scope:[main]  from @47
  (byte*) print_line_cursor#30 ← phi( @47/(byte*) print_line_cursor#14 )
  (byte*) print_char_cursor#48 ← phi( @47/(byte*) print_char_cursor#33 )
  (byte[]) main::f_i#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 }
  (byte[]) main::f_127#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 }
  (byte*) main::f_2pi#0 ← ((byte*)) (word/dword/signed dword) 58085
  (word) setFAC::w#0 ← (word/signed word/dword/signed dword) 1275
  call setFAC 
  to:main::@3
main::@3: scope:[main]  from main
  (byte*) print_line_cursor#29 ← phi( main/(byte*) print_line_cursor#30 )
  (byte*) print_char_cursor#47 ← phi( main/(byte*) print_char_cursor#48 )
  call divFACby10 
  to:main::@4
main::@4: scope:[main]  from main::@3
  (byte*) print_line_cursor#28 ← phi( main::@3/(byte*) print_line_cursor#29 )
  (byte*) print_char_cursor#46 ← phi( main::@3/(byte*) print_char_cursor#47 )
  (byte*) setMEMtoFAC::mem#0 ← (byte[]) main::f_127#0
  call setMEMtoFAC 
  to:main::@5
main::@5: scope:[main]  from main::@4
  (byte*) print_line_cursor#27 ← phi( main::@4/(byte*) print_line_cursor#28 )
  (byte*) print_char_cursor#45 ← phi( main::@4/(byte*) print_char_cursor#46 )
  (byte) main::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  to:main::@1
main::@1: scope:[main]  from main::@16 main::@5
  (byte*) print_line_cursor#26 ← phi( main::@16/(byte*) print_line_cursor#3 main::@5/(byte*) print_line_cursor#27 )
  (byte*) print_char_cursor#44 ← phi( main::@16/(byte*) print_char_cursor#12 main::@5/(byte*) print_char_cursor#45 )
  (byte) main::i#2 ← phi( main::@16/(byte) main::i#1 main::@5/(byte) main::i#0 )
  (word~) main::$3 ← ((word)) (byte) main::i#2
  (word) setFAC::w#1 ← (word~) main::$3
  call setFAC 
  to:main::@6
main::@6: scope:[main]  from main::@1
  (byte) main::i#13 ← phi( main::@1/(byte) main::i#2 )
  (byte*) print_line_cursor#25 ← phi( main::@1/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#43 ← phi( main::@1/(byte*) print_char_cursor#44 )
  (byte*) mulFACbyMEM::mem#0 ← (byte*) main::f_2pi#0
  call mulFACbyMEM 
  to:main::@7
main::@7: scope:[main]  from main::@6
  (byte) main::i#12 ← phi( main::@6/(byte) main::i#13 )
  (byte*) print_line_cursor#24 ← phi( main::@6/(byte*) print_line_cursor#25 )
  (byte*) print_char_cursor#42 ← phi( main::@6/(byte*) print_char_cursor#43 )
  (byte*) setMEMtoFAC::mem#1 ← (byte[]) main::f_i#0
  call setMEMtoFAC 
  to:main::@8
main::@8: scope:[main]  from main::@7
  (byte) main::i#11 ← phi( main::@7/(byte) main::i#12 )
  (byte*) print_line_cursor#23 ← phi( main::@7/(byte*) print_line_cursor#24 )
  (byte*) print_char_cursor#41 ← phi( main::@7/(byte*) print_char_cursor#42 )
  (word) setFAC::w#2 ← (byte/signed byte/word/signed word/dword/signed dword) 25
  call setFAC 
  to:main::@9
main::@9: scope:[main]  from main::@8
  (byte) main::i#10 ← phi( main::@8/(byte) main::i#11 )
  (byte*) print_line_cursor#22 ← phi( main::@8/(byte*) print_line_cursor#23 )
  (byte*) print_char_cursor#40 ← phi( main::@8/(byte*) print_char_cursor#41 )
  (byte*) divMEMbyFAC::mem#0 ← (byte[]) main::f_i#0
  call divMEMbyFAC 
  to:main::@10
main::@10: scope:[main]  from main::@9
  (byte) main::i#9 ← phi( main::@9/(byte) main::i#10 )
  (byte*) print_line_cursor#21 ← phi( main::@9/(byte*) print_line_cursor#22 )
  (byte*) print_char_cursor#39 ← phi( main::@9/(byte*) print_char_cursor#40 )
  call sinFAC 
  to:main::@11
main::@11: scope:[main]  from main::@10
  (byte) main::i#8 ← phi( main::@10/(byte) main::i#9 )
  (byte*) print_line_cursor#20 ← phi( main::@10/(byte*) print_line_cursor#21 )
  (byte*) print_char_cursor#38 ← phi( main::@10/(byte*) print_char_cursor#39 )
  (byte*) mulFACbyMEM::mem#1 ← (byte[]) main::f_127#0
  call mulFACbyMEM 
  to:main::@12
main::@12: scope:[main]  from main::@11
  (byte) main::i#7 ← phi( main::@11/(byte) main::i#8 )
  (byte*) print_line_cursor#19 ← phi( main::@11/(byte*) print_line_cursor#20 )
  (byte*) print_char_cursor#37 ← phi( main::@11/(byte*) print_char_cursor#38 )
  (byte*) addMEMtoFAC::mem#0 ← (byte[]) main::f_127#0
  call addMEMtoFAC 
  to:main::@13
main::@13: scope:[main]  from main::@12
  (byte) main::i#6 ← phi( main::@12/(byte) main::i#7 )
  (byte*) print_line_cursor#18 ← phi( main::@12/(byte*) print_line_cursor#19 )
  (byte*) print_char_cursor#34 ← phi( main::@12/(byte*) print_char_cursor#37 )
  call getFAC 
  (word) getFAC::return#2 ← (word) getFAC::return#1
  to:main::@14
main::@14: scope:[main]  from main::@13
  (byte) main::i#5 ← phi( main::@13/(byte) main::i#6 )
  (byte*) print_line_cursor#15 ← phi( main::@13/(byte*) print_line_cursor#18 )
  (byte*) print_char_cursor#32 ← phi( main::@13/(byte*) print_char_cursor#34 )
  (word) getFAC::return#4 ← phi( main::@13/(word) getFAC::return#2 )
  (word~) main::$12 ← (word) getFAC::return#4
  (word) print_word::w#0 ← (word~) main::$12
  call print_word 
  to:main::@15
main::@15: scope:[main]  from main::@14
  (byte) main::i#4 ← phi( main::@14/(byte) main::i#5 )
  (byte*) print_line_cursor#13 ← phi( main::@14/(byte*) print_line_cursor#15 )
  (byte*) print_char_cursor#25 ← phi( main::@14/(byte*) print_char_cursor#5 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#25
  call print_ln 
  to:main::@16
main::@16: scope:[main]  from main::@15
  (byte) main::i#3 ← phi( main::@15/(byte) main::i#4 )
  (byte*) print_char_cursor#26 ← phi( main::@15/(byte*) print_char_cursor#2 )
  (byte*) print_line_cursor#9 ← phi( main::@15/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#3 ← (byte*) print_line_cursor#9
  (byte*) print_char_cursor#12 ← (byte*) print_char_cursor#26
  (byte) main::i#1 ← (byte) main::i#3 + rangenext(1,25)
  (bool~) main::$15 ← (byte) main::i#1 != rangelast(1,25)
  if((bool~) main::$15) goto main::@1
  to:main::@return
main::@return: scope:[main]  from main::@16
  (byte*) print_line_cursor#10 ← phi( main::@16/(byte*) print_line_cursor#3 )
  (byte*) print_char_cursor#27 ← phi( main::@16/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#27
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#10
  return 
  to:@return
@47: scope:[]  from @19
  (byte*) print_line_cursor#14 ← phi( @19/(byte*) print_line_cursor#16 )
  (byte*) print_char_cursor#33 ← phi( @19/(byte*) print_char_cursor#35 )
  call main 
  to:@48
@48: scope:[]  from @47
  (byte*) print_line_cursor#11 ← phi( @47/(byte*) print_line_cursor#4 )
  (byte*) print_char_cursor#28 ← phi( @47/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#28
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#11
  to:@end
@end: scope:[]  from @48

SYMBOL TABLE SSA
(const string) $0 = (string) "0123456789abcdef"
(label) @12
(label) @19
(label) @47
(label) @48
(label) @begin
(label) @end
(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem)
(label) addMEMtoFAC::@1
(label) addMEMtoFAC::@return
(byte*) addMEMtoFAC::mem
(byte*) addMEMtoFAC::mem#0
(byte*) addMEMtoFAC::mem#1
(void()) divFACby10()
(label) divFACby10::@return
(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem)
(label) divMEMbyFAC::@1
(label) divMEMbyFAC::@return
(byte*) divMEMbyFAC::mem
(byte*) divMEMbyFAC::mem#0
(byte*) divMEMbyFAC::mem#1
(word()) getFAC()
(label) getFAC::@return
(word) getFAC::return
(word) getFAC::return#0
(word) getFAC::return#1
(word) getFAC::return#2
(word) getFAC::return#3
(word) getFAC::return#4
(word) getFAC::w
(word) getFAC::w#0
(void()) main()
(word~) main::$12
(bool~) main::$15
(word~) main::$3
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte[]) main::f_127
(byte[]) main::f_127#0
(byte*) main::f_2pi
(byte*) main::f_2pi#0
(byte[]) main::f_i
(byte[]) main::f_i#0
(byte) main::i
(byte) main::i#0
(byte) main::i#1
(byte) main::i#10
(byte) main::i#11
(byte) main::i#12
(byte) main::i#13
(byte) main::i#2
(byte) main::i#3
(byte) main::i#4
(byte) main::i#5
(byte) main::i#6
(byte) main::i#7
(byte) main::i#8
(byte) main::i#9
(byte*) memHi
(byte*) memHi#0
(byte*) memLo
(byte*) memLo#0
(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem)
(label) mulFACbyMEM::@1
(label) mulFACbyMEM::@return
(byte*) mulFACbyMEM::mem
(byte*) mulFACbyMEM::mem#0
(byte*) mulFACbyMEM::mem#1
(byte*) mulFACbyMEM::mem#2
(void()) prepareMEM((byte*) prepareMEM::mem)
(byte~) prepareMEM::$0
(byte~) prepareMEM::$1
(label) prepareMEM::@return
(byte*) prepareMEM::mem
(byte*) prepareMEM::mem#0
(byte*) prepareMEM::mem#1
(byte*) prepareMEM::mem#2
(byte*) prepareMEM::mem#3
(byte*) prepareMEM::mem#4
(byte*) prepareMEM::mem#5
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0
(byte~) print_byte::$2
(label) print_byte::@1
(label) print_byte::@2
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0
(byte) print_byte::b#1
(byte) print_byte::b#2
(byte) print_byte::b#3
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0
(byte) print_char::ch#1
(byte) print_char::ch#2
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#40
(byte*) print_char_cursor#41
(byte*) print_char_cursor#42
(byte*) print_char_cursor#43
(byte*) print_char_cursor#44
(byte*) print_char_cursor#45
(byte*) print_char_cursor#46
(byte*) print_char_cursor#47
(byte*) print_char_cursor#48
(byte*) print_char_cursor#5
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(byte[]) print_hextab
(byte[]) print_hextab#0
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#18
(byte*) print_line_cursor#19
(byte*) print_line_cursor#2
(byte*) print_line_cursor#20
(byte*) print_line_cursor#21
(byte*) print_line_cursor#22
(byte*) print_line_cursor#23
(byte*) print_line_cursor#24
(byte*) print_line_cursor#25
(byte*) print_line_cursor#26
(byte*) print_line_cursor#27
(byte*) print_line_cursor#28
(byte*) print_line_cursor#29
(byte*) print_line_cursor#3
(byte*) print_line_cursor#30
(byte*) print_line_cursor#4
(byte*) print_line_cursor#5
(byte*) print_line_cursor#6
(byte*) print_line_cursor#7
(byte*) print_line_cursor#8
(byte*) print_line_cursor#9
(void()) print_ln()
(byte*~) print_ln::$0
(bool~) print_ln::$1
(label) print_ln::@1
(label) print_ln::@2
(label) print_ln::@return
(byte*) print_screen
(byte*) print_screen#0
(void()) print_word((word) print_word::w)
(byte~) print_word::$0
(byte~) print_word::$2
(label) print_word::@1
(label) print_word::@2
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0
(word) print_word::w#1
(word) print_word::w#2
(void()) setFAC((word) setFAC::w)
(byte*~) setFAC::$0
(label) setFAC::@1
(label) setFAC::@return
(word) setFAC::w
(word) setFAC::w#0
(word) setFAC::w#1
(word) setFAC::w#2
(word) setFAC::w#3
(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem)
(label) setMEMtoFAC::@1
(label) setMEMtoFAC::@return
(byte*) setMEMtoFAC::mem
(byte*) setMEMtoFAC::mem#0
(byte*) setMEMtoFAC::mem#1
(byte*) setMEMtoFAC::mem#2
(void()) sinFAC()
(label) sinFAC::@return

Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#36 (byte*) print_line_cursor#17 (byte*) print_char_cursor#35 (byte*) print_line_cursor#16 (byte*) print_char_cursor#33 (byte*) print_line_cursor#14 
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#7 (byte*) print_char_cursor#1 (byte*) print_line_cursor#8 (byte*) print_char_cursor#16 (byte*) print_line_cursor#2 (byte*) print_char_cursor#2 
Alias (byte) print_byte::b#0 = (byte~) print_word::$0 
Alias (word) print_word::w#1 = (word) print_word::w#2 
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#3 
Alias (byte) print_byte::b#1 = (byte~) print_word::$2 
Alias (byte*) print_char_cursor#18 = (byte*) print_char_cursor#4 (byte*) print_char_cursor#19 (byte*) print_char_cursor#5 
Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#6 
Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#7 (byte*) print_char_cursor#22 (byte*) print_char_cursor#8 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#24 (byte*) print_char_cursor#9 
Alias (byte*) prepareMEM::mem#0 = (byte*~) setFAC::$0 
Alias (word) getFAC::return#0 = (word) getFAC::w#0 (word) getFAC::return#3 (word) getFAC::return#1 
Alias (byte*) print_char_cursor#45 = (byte*) print_char_cursor#47 (byte*) print_char_cursor#48 (byte*) print_char_cursor#46 
Alias (byte*) print_line_cursor#27 = (byte*) print_line_cursor#29 (byte*) print_line_cursor#30 (byte*) print_line_cursor#28 
Alias (word) setFAC::w#1 = (word~) main::$3 
Alias (byte*) print_char_cursor#32 = (byte*) print_char_cursor#43 (byte*) print_char_cursor#44 (byte*) print_char_cursor#42 (byte*) print_char_cursor#41 (byte*) print_char_cursor#40 (byte*) print_char_cursor#39 (byte*) print_char_cursor#38 (byte*) print_char_cursor#37 (byte*) print_char_cursor#34 
Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#25 (byte*) print_line_cursor#26 (byte*) print_line_cursor#24 (byte*) print_line_cursor#23 (byte*) print_line_cursor#22 (byte*) print_line_cursor#21 (byte*) print_line_cursor#20 (byte*) print_line_cursor#19 (byte*) print_line_cursor#18 (byte*) print_line_cursor#15 
Alias (byte) main::i#10 = (byte) main::i#13 (byte) main::i#2 (byte) main::i#12 (byte) main::i#11 (byte) main::i#9 (byte) main::i#8 (byte) main::i#7 (byte) main::i#6 (byte) main::i#5 (byte) main::i#4 (byte) main::i#3 
Alias (word) getFAC::return#2 = (word) getFAC::return#4 
Alias (word) print_word::w#0 = (word~) main::$12 
Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#25 
Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#3 (byte*) print_line_cursor#9 (byte*) print_line_cursor#4 
Alias (byte*) print_char_cursor#12 = (byte*) print_char_cursor#26 (byte*) print_char_cursor#27 (byte*) print_char_cursor#13 
Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#28 
Alias (byte*) print_line_cursor#11 = (byte*) print_line_cursor#5 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) print_char_cursor#15
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) print_line_cursor#12 (byte*) print_line_cursor#13
Redundant Phi (byte*) print_char_cursor#29 (byte*) print_char_cursor#11
Redundant Phi (byte*) print_char_cursor#15 (byte*) print_char_cursor#29
Redundant Phi (word) print_word::w#1 (word) print_word::w#0
Redundant Phi (byte*) print_char_cursor#30 (byte*) print_char_cursor#32
Redundant Phi (byte*) print_char_cursor#17 (byte*) print_char_cursor#21
Redundant Phi (byte*) print_char_cursor#18 (byte*) print_char_cursor#21
Redundant Phi (byte*) print_char_cursor#20 (byte*) print_char_cursor#10
Redundant Phi (byte*) print_char_cursor#21 (byte*) print_char_cursor#10
Redundant Phi (byte*) addMEMtoFAC::mem#1 (byte*) addMEMtoFAC::mem#0
Redundant Phi (byte*) divMEMbyFAC::mem#1 (byte*) divMEMbyFAC::mem#0
Redundant Phi (byte*) print_char_cursor#45 (byte*) print_char_cursor#0
Redundant Phi (byte*) print_line_cursor#27 (byte*) print_char_cursor#0
Redundant Phi (byte*) print_char_cursor#11 (byte*) print_char_cursor#18
Redundant Phi (byte*) print_line_cursor#10 (byte*) print_line_cursor#1
Redundant Phi (byte*) print_char_cursor#12 (byte*) print_line_cursor#1
Redundant Phi (byte*) print_char_cursor#14 (byte*) print_char_cursor#12
Redundant Phi (byte*) print_line_cursor#11 (byte*) print_line_cursor#10
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1
Simple Condition (bool~) main::$15 [148] if((byte) main::i#1!=rangelast(1,25)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) print_char_cursor#0 = ((byte*))1024
Constant (const byte[]) print_hextab#0 = $0
Constant (const byte*) memLo#0 = ((byte*))254
Constant (const byte*) memHi#0 = ((byte*))255
Constant (const byte[]) main::f_i#0 = { 0, 0, 0, 0, 0 }
Constant (const byte[]) main::f_127#0 = { 0, 0, 0, 0, 0 }
Constant (const byte*) main::f_2pi#0 = ((byte*))58085
Constant (const word) setFAC::w#0 = 1275
Constant (const byte) main::i#0 = 1
Constant (const word) setFAC::w#2 = 25
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) setMEMtoFAC::mem#0 = main::f_127#0
Constant (const byte*) mulFACbyMEM::mem#0 = main::f_2pi#0
Constant (const byte*) setMEMtoFAC::mem#1 = main::f_i#0
Constant (const byte*) divMEMbyFAC::mem#0 = main::f_i#0
Constant (const byte*) mulFACbyMEM::mem#1 = main::f_127#0
Constant (const byte*) addMEMtoFAC::mem#0 = main::f_127#0
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) prepareMEM::mem#2 = addMEMtoFAC::mem#0
Constant (const byte*) prepareMEM::mem#3 = divMEMbyFAC::mem#0
Successful SSA optimization Pass2ConstantIdentification
Fixing inline constructor with getFAC::$0 ← *(memHi#0) w= *(memLo#0)
Successful SSA optimization Pass2FixInlineConstructors
Eliminating Noop Cast (byte*) prepareMEM::mem#0 ← ((byte*)) (word) setFAC::w#3
Successful SSA optimization Pass2NopCastElimination
Resolved ranged next value main::i#1 ← ++ main::i#10 to ++
Resolved ranged comparison value if(main::i#1!=rangelast(1,25)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 26
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_word::@2
Culled Empty Block (label) @12
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) @19
Culled Empty Block (label) main::@5
Culled Empty Block (label) @48
Successful SSA optimization Pass2CullEmptyBlocks
Alias (word) getFAC::return#0 = (word~) getFAC::$0 
Successful SSA optimization Pass2AliasElimination
Inlining constant with var siblings (const byte*) prepareMEM::mem#2
Inlining constant with var siblings (const byte*) prepareMEM::mem#3
Inlining constant with var siblings (const word) setFAC::w#0
Inlining constant with var siblings (const word) setFAC::w#2
Inlining constant with var siblings (const byte*) setMEMtoFAC::mem#0
Inlining constant with var siblings (const byte*) setMEMtoFAC::mem#1
Inlining constant with var siblings (const byte*) mulFACbyMEM::mem#0
Inlining constant with var siblings (const byte*) mulFACbyMEM::mem#1
Inlining constant with var siblings (const byte) main::i#0
Inlining constant with var siblings (const byte*) print_char_cursor#0
Constant inlined addMEMtoFAC::mem#0 = (const byte[]) main::f_127#0
Constant inlined setFAC::w#2 = (byte/signed byte/word/signed word/dword/signed dword) 25
Constant inlined prepareMEM::mem#2 = (const byte[]) main::f_127#0
Constant inlined prepareMEM::mem#3 = (const byte[]) main::f_i#0
Constant inlined $0 = (const byte[]) print_hextab#0
Constant inlined print_char_cursor#0 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined divMEMbyFAC::mem#0 = (const byte[]) main::f_i#0
Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined setMEMtoFAC::mem#1 = (const byte[]) main::f_i#0
Constant inlined mulFACbyMEM::mem#0 = (const byte*) main::f_2pi#0
Constant inlined setMEMtoFAC::mem#0 = (const byte[]) main::f_127#0
Constant inlined mulFACbyMEM::mem#1 = (const byte[]) main::f_127#0
Constant inlined setFAC::w#0 = (word/signed word/dword/signed dword) 1275
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting main::@17(between main::@16 and main::@1)
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @47
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
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::@13
Adding NOP phi() at start of main::@15
Adding NOP phi() at start of addMEMtoFAC
Adding NOP phi() at start of divMEMbyFAC
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to setFAC:5 divFACby10:7 setMEMtoFAC:9 setFAC:13 mulFACbyMEM:15 setMEMtoFAC:17 setFAC:19 divMEMbyFAC:21 sinFAC:23 mulFACbyMEM:25 addMEMtoFAC:27 getFAC:29 print_word:32 print_ln:34 
Calls in [print_word] to print_byte:50 print_byte:54 
Calls in [print_byte] to print_char:61 print_char:66 
Calls in [addMEMtoFAC] to prepareMEM:76 
Calls in [mulFACbyMEM] to prepareMEM:88 
Calls in [divMEMbyFAC] to prepareMEM:94 
Calls in [setFAC] to prepareMEM:99 
Calls in [setMEMtoFAC] to prepareMEM:105 

Created 12 initial phi equivalence classes
Coalesced [12] setFAC::w#4 ← setFAC::w#1
Coalesced [38] main::i#14 ← main::i#1
Not coalescing [39] print_char_cursor#49 ← print_line_cursor#1
Coalesced [40] print_line_cursor#31 ← print_line_cursor#1
Coalesced [41] print_line_cursor#32 ← print_line_cursor#13
Coalesced (already) [46] print_line_cursor#33 ← print_line_cursor#1
Coalesced [48] print_byte::b#4 ← print_byte::b#0
Coalesced [49] print_char_cursor#50 ← print_char_cursor#32
Coalesced [52] print_byte::b#5 ← print_byte::b#1
Coalesced [53] print_char_cursor#51 ← print_char_cursor#10
Coalesced [59] print_char::ch#3 ← print_char::ch#0
Coalesced [60] print_char_cursor#52 ← print_char_cursor#31
Coalesced [64] print_char::ch#4 ← print_char::ch#1
Coalesced (already) [65] print_char_cursor#53 ← print_char_cursor#10
Coalesced [87] prepareMEM::mem#6 ← prepareMEM::mem#4
Coalesced [104] prepareMEM::mem#8 ← prepareMEM::mem#1
Coalesced down to 9 phi equivalence classes
Culled Empty Block (label) print_ln::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @47
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of main::@4
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::@13
Adding NOP phi() at start of main::@15
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of addMEMtoFAC
Adding NOP phi() at start of divMEMbyFAC

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@47
@47: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @47
  [3] phi()
main: scope:[main]  from @47
  [4] phi()
  [5] call setFAC 
  to:main::@3
main::@3: scope:[main]  from main
  [6] phi()
  [7] call divFACby10 
  to:main::@4
main::@4: scope:[main]  from main::@3
  [8] phi()
  [9] call setMEMtoFAC 
  to:main::@1
main::@1: scope:[main]  from main::@17 main::@4
  [10] (byte*) print_line_cursor#13 ← phi( main::@17/(byte*) print_line_cursor#1 main::@4/((byte*))(word/signed word/dword/signed dword) 1024 )
  [10] (byte*) print_char_cursor#32 ← phi( main::@17/(byte*~) print_char_cursor#49 main::@4/((byte*))(word/signed word/dword/signed dword) 1024 )
  [10] (byte) main::i#10 ← phi( main::@17/(byte) main::i#1 main::@4/(byte/signed byte/word/signed word/dword/signed dword) 1 )
  [11] (word) setFAC::w#1 ← ((word)) (byte) main::i#10
  [12] call setFAC 
  to:main::@6
main::@6: scope:[main]  from main::@1
  [13] phi()
  [14] call mulFACbyMEM 
  to:main::@7
main::@7: scope:[main]  from main::@6
  [15] phi()
  [16] call setMEMtoFAC 
  to:main::@8
main::@8: scope:[main]  from main::@7
  [17] phi()
  [18] call setFAC 
  to:main::@9
main::@9: scope:[main]  from main::@8
  [19] phi()
  [20] call divMEMbyFAC 
  to:main::@10
main::@10: scope:[main]  from main::@9
  [21] phi()
  [22] call sinFAC 
  to:main::@11
main::@11: scope:[main]  from main::@10
  [23] phi()
  [24] call mulFACbyMEM 
  to:main::@12
main::@12: scope:[main]  from main::@11
  [25] phi()
  [26] call addMEMtoFAC 
  to:main::@13
main::@13: scope:[main]  from main::@12
  [27] phi()
  [28] call getFAC 
  [29] (word) getFAC::return#2 ← (word) getFAC::return#0
  to:main::@14
main::@14: scope:[main]  from main::@13
  [30] (word) print_word::w#0 ← (word) getFAC::return#2
  [31] call print_word 
  to:main::@15
main::@15: scope:[main]  from main::@14
  [32] phi()
  [33] call print_ln 
  to:main::@16
main::@16: scope:[main]  from main::@15
  [34] (byte) main::i#1 ← ++ (byte) main::i#10
  [35] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 26) goto main::@17
  to:main::@return
main::@return: scope:[main]  from main::@16
  [36] return 
  to:@return
main::@17: scope:[main]  from main::@16
  [37] (byte*~) print_char_cursor#49 ← (byte*) print_line_cursor#1
  to:main::@1
print_ln: scope:[print_ln]  from main::@15
  [38] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [39] (byte*) print_line_cursor#6 ← phi( print_ln/(byte*) print_line_cursor#13 print_ln::@1/(byte*) print_line_cursor#1 )
  [40] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40
  [41] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [42] return 
  to:@return
print_word: scope:[print_word]  from main::@14
  [43] (byte) print_byte::b#0 ← > (word) print_word::w#0
  [44] call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  [45] (byte) print_byte::b#1 ← < (word) print_word::w#0
  [46] call print_byte 
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@1
  [47] return 
  to:@return
print_byte: scope:[print_byte]  from print_word print_word::@1
  [48] (byte*) print_char_cursor#31 ← phi( print_word/(byte*) print_char_cursor#32 print_word::@1/(byte*) print_char_cursor#10 )
  [48] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  [49] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4
  [50] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
  [51] call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  [52] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15
  [53] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
  [54] call print_char 
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@1
  [55] return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1
  [56] (byte*) print_char_cursor#23 ← phi( print_byte/(byte*) print_char_cursor#31 print_byte::@1/(byte*) print_char_cursor#10 )
  [56] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  [57] *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2
  [58] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#23
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [59] return 
  to:@return
getFAC: scope:[getFAC]  from main::@13
  asm { jsr$b1aa sty$fe sta$ff  }
  [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0)
  to:getFAC::@return
getFAC::@return: scope:[getFAC]  from getFAC
  [62] return 
  to:@return
addMEMtoFAC: scope:[addMEMtoFAC]  from main::@12
  [63] phi()
  [64] call prepareMEM 
  to:addMEMtoFAC::@1
addMEMtoFAC::@1: scope:[addMEMtoFAC]  from addMEMtoFAC
  asm { lda$fe ldy$ff jsr$b867  }
  to:addMEMtoFAC::@return
addMEMtoFAC::@return: scope:[addMEMtoFAC]  from addMEMtoFAC::@1
  [66] return 
  to:@return
prepareMEM: scope:[prepareMEM]  from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC
  [67] (byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(const byte[]) main::f_127#0 divMEMbyFAC/(const byte[]) main::f_i#0 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*~) prepareMEM::mem#7 setMEMtoFAC/(byte*) prepareMEM::mem#1 )
  [68] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5
  [69] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0
  [70] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5
  [71] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1
  to:prepareMEM::@return
prepareMEM::@return: scope:[prepareMEM]  from prepareMEM
  [72] return 
  to:@return
mulFACbyMEM: scope:[mulFACbyMEM]  from main::@11 main::@6
  [73] (byte*) mulFACbyMEM::mem#2 ← phi( main::@11/(const byte[]) main::f_127#0 main::@6/(const byte*) main::f_2pi#0 )
  [74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2
  [75] call prepareMEM 
  to:mulFACbyMEM::@1
mulFACbyMEM::@1: scope:[mulFACbyMEM]  from mulFACbyMEM
  asm { lda$fe ldy$ff jsr$ba28  }
  to:mulFACbyMEM::@return
mulFACbyMEM::@return: scope:[mulFACbyMEM]  from mulFACbyMEM::@1
  [77] return 
  to:@return
sinFAC: scope:[sinFAC]  from main::@10
  asm { jsr$e26b  }
  to:sinFAC::@return
sinFAC::@return: scope:[sinFAC]  from sinFAC
  [79] return 
  to:@return
divMEMbyFAC: scope:[divMEMbyFAC]  from main::@9
  [80] phi()
  [81] call prepareMEM 
  to:divMEMbyFAC::@1
divMEMbyFAC::@1: scope:[divMEMbyFAC]  from divMEMbyFAC
  asm { lda$fe ldy$ff jsr$bb0f  }
  to:divMEMbyFAC::@return
divMEMbyFAC::@return: scope:[divMEMbyFAC]  from divMEMbyFAC::@1
  [83] return 
  to:@return
setFAC: scope:[setFAC]  from main main::@1 main::@8
  [84] (word) setFAC::w#3 ← phi( main/(word/signed word/dword/signed dword) 1275 main::@1/(word) setFAC::w#1 main::@8/(byte/signed byte/word/signed word/dword/signed dword) 25 )
  [85] (byte*~) prepareMEM::mem#7 ← (byte*)(word) setFAC::w#3
  [86] call prepareMEM 
  to:setFAC::@1
setFAC::@1: scope:[setFAC]  from setFAC
  asm { ldy$fe lda$ff jsr$b391  }
  to:setFAC::@return
setFAC::@return: scope:[setFAC]  from setFAC::@1
  [88] return 
  to:@return
setMEMtoFAC: scope:[setMEMtoFAC]  from main::@4 main::@7
  [89] (byte*) setMEMtoFAC::mem#2 ← phi( main::@4/(const byte[]) main::f_127#0 main::@7/(const byte[]) main::f_i#0 )
  [90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2
  [91] call prepareMEM 
  to:setMEMtoFAC::@1
setMEMtoFAC::@1: scope:[setMEMtoFAC]  from setMEMtoFAC
  asm { ldx$fe ldy$ff jsr$bbd4  }
  to:setMEMtoFAC::@return
setMEMtoFAC::@return: scope:[setMEMtoFAC]  from setMEMtoFAC::@1
  [93] return 
  to:@return
divFACby10: scope:[divFACby10]  from main::@3
  asm { jsr$bafe  }
  to:divFACby10::@return
divFACby10::@return: scope:[divFACby10]  from divFACby10
  [95] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem)
(byte*) addMEMtoFAC::mem
(void()) divFACby10()
(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem)
(byte*) divMEMbyFAC::mem
(word()) getFAC()
(word) getFAC::return
(word) getFAC::return#0 4.333333333333333
(word) getFAC::return#2 22.0
(word) getFAC::w
(void()) main()
(byte[]) main::f_127
(byte*) main::f_2pi
(byte[]) main::f_i
(byte) main::i
(byte) main::i#1 11.0
(byte) main::i#10 1.375
(byte*) memHi
(byte*) memLo
(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem)
(byte*) mulFACbyMEM::mem
(byte*) mulFACbyMEM::mem#2 2.0
(void()) prepareMEM((byte*) prepareMEM::mem)
(byte~) prepareMEM::$0 4.0
(byte~) prepareMEM::$1 4.0
(byte*) prepareMEM::mem
(byte*) prepareMEM::mem#1 4.0
(byte*) prepareMEM::mem#4 4.0
(byte*) prepareMEM::mem#5 3.333333333333333
(byte*~) prepareMEM::mem#7 4.0
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 4.0
(byte~) print_byte::$2 4.0
(byte) print_byte::b
(byte) print_byte::b#0 4.0
(byte) print_byte::b#1 4.0
(byte) print_byte::b#2 2.0
(void()) print_char((byte) print_char::ch)
(byte) print_char::ch
(byte) print_char::ch#0 4.0
(byte) print_char::ch#1 4.0
(byte) print_char::ch#2 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#10 6.2941176470588225
(byte*) print_char_cursor#23 4.0
(byte*) print_char_cursor#31 2.0
(byte*) print_char_cursor#32 0.5909090909090909
(byte*~) print_char_cursor#49 22.0
(byte[]) print_hextab
(byte*) print_line_cursor
(byte*) print_line_cursor#1 46.42857142857143
(byte*) print_line_cursor#13 0.5416666666666666
(byte*) print_line_cursor#6 204.0
(void()) print_ln()
(byte*) print_screen
(void()) print_word((word) print_word::w)
(word) print_word::w
(word) print_word::w#0 5.0
(void()) setFAC((word) setFAC::w)
(word) setFAC::w
(word) setFAC::w#1 22.0
(word) setFAC::w#3 11.0
(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem)
(byte*) setMEMtoFAC::mem
(byte*) setMEMtoFAC::mem#2 2.0
(void()) sinFAC()

Initial phi equivalence classes
[ main::i#10 main::i#1 ]
[ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ]
[ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ]
[ mulFACbyMEM::mem#2 ]
[ setFAC::w#3 setFAC::w#1 ]
[ setMEMtoFAC::mem#2 ]
Added variable getFAC::return#2 to zero page equivalence class [ getFAC::return#2 ]
Added variable print_word::w#0 to zero page equivalence class [ print_word::w#0 ]
Added variable print_byte::$0 to zero page equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to zero page equivalence class [ print_byte::$2 ]
Added variable getFAC::return#0 to zero page equivalence class [ getFAC::return#0 ]
Added variable prepareMEM::$0 to zero page equivalence class [ prepareMEM::$0 ]
Added variable prepareMEM::$1 to zero page equivalence class [ prepareMEM::$1 ]
Complete equivalence classes
[ main::i#10 main::i#1 ]
[ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ]
[ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ]
[ mulFACbyMEM::mem#2 ]
[ setFAC::w#3 setFAC::w#1 ]
[ setMEMtoFAC::mem#2 ]
[ getFAC::return#2 ]
[ print_word::w#0 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
[ getFAC::return#0 ]
[ prepareMEM::$0 ]
[ prepareMEM::$1 ]
Allocated zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
Allocated zp ZP_WORD:3 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ]
Allocated zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp ZP_WORD:7 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ]
Allocated zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ]
Allocated zp ZP_WORD:11 [ mulFACbyMEM::mem#2 ]
Allocated zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ]
Allocated zp ZP_WORD:15 [ setMEMtoFAC::mem#2 ]
Allocated zp ZP_WORD:17 [ getFAC::return#2 ]
Allocated zp ZP_WORD:19 [ print_word::w#0 ]
Allocated zp ZP_BYTE:21 [ print_byte::$0 ]
Allocated zp ZP_BYTE:22 [ print_byte::$2 ]
Allocated zp ZP_WORD:23 [ getFAC::return#0 ]
Allocated zp ZP_BYTE:25 [ prepareMEM::$0 ]
Allocated zp ZP_BYTE:26 [ prepareMEM::$1 ]

INITIAL ASM
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 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_line_cursor = 3
  .label print_char_cursor = 7
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @47 [phi:@begin->@47]
b47_from_bbegin:
  jmp b47
//SEG5 @47
b47:
//SEG6 [2] call main 
//SEG7 [4] phi from @47 to main [phi:@47->main]
main_from_b47:
  jsr main
//SEG8 [3] phi from @47 to @end [phi:@47->@end]
bend_from_b47:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
    .label f_2pi = $e2e5
    .label i = 2
  //SEG11 [5] call setFAC 
  //SEG12 [84] phi from main to setFAC [phi:main->setFAC]
  setFAC_from_main:
  //SEG13 [84] phi (word) setFAC::w#3 = (word/signed word/dword/signed dword) 1275 [phi:main->setFAC#0] -- vwuz1=vwuc1 
    lda #<$4fb
    sta setFAC.w
    lda #>$4fb
    sta setFAC.w+1
    jsr setFAC
  //SEG14 [6] phi from main to main::@3 [phi:main->main::@3]
  b3_from_main:
    jmp b3
  //SEG15 main::@3
  b3:
  //SEG16 [7] call divFACby10 
    jsr divFACby10
  //SEG17 [8] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  b4_from_b3:
    jmp b4
  //SEG18 main::@4
  b4:
  //SEG19 [9] call setMEMtoFAC 
  //SEG20 [89] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC]
  setMEMtoFAC_from_b4:
  //SEG21 [89] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta setMEMtoFAC.mem
    lda #>f_127
    sta setMEMtoFAC.mem+1
    jsr setMEMtoFAC
  //SEG22 [10] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  b1_from_b4:
  //SEG23 [10] phi (byte*) print_line_cursor#13 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::@4->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
  //SEG24 [10] phi (byte*) print_char_cursor#32 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::@4->main::@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
  //SEG25 [10] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@4->main::@1#2] -- vbuz1=vbuc1 
    lda #1
    sta i
    jmp b1
  //SEG26 main::@1
  b1:
  //SEG27 [11] (word) setFAC::w#1 ← ((word)) (byte) main::i#10 -- vwuz1=_word_vbuz2 
    lda i
    sta setFAC.w
    lda #0
    sta setFAC.w+1
  //SEG28 [12] call setFAC 
  //SEG29 [84] phi from main::@1 to setFAC [phi:main::@1->setFAC]
  setFAC_from_b1:
  //SEG30 [84] phi (word) setFAC::w#3 = (word) setFAC::w#1 [phi:main::@1->setFAC#0] -- register_copy 
    jsr setFAC
  //SEG31 [13] phi from main::@1 to main::@6 [phi:main::@1->main::@6]
  b6_from_b1:
    jmp b6
  //SEG32 main::@6
  b6:
  //SEG33 [14] call mulFACbyMEM 
  //SEG34 [73] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM]
  mulFACbyMEM_from_b6:
  //SEG35 [73] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_2pi
    sta mulFACbyMEM.mem
    lda #>f_2pi
    sta mulFACbyMEM.mem+1
    jsr mulFACbyMEM
  //SEG36 [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  b7_from_b6:
    jmp b7
  //SEG37 main::@7
  b7:
  //SEG38 [16] call setMEMtoFAC 
  //SEG39 [89] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC]
  setMEMtoFAC_from_b7:
  //SEG40 [89] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_i
    sta setMEMtoFAC.mem
    lda #>f_i
    sta setMEMtoFAC.mem+1
    jsr setMEMtoFAC
  //SEG41 [17] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  b8_from_b7:
    jmp b8
  //SEG42 main::@8
  b8:
  //SEG43 [18] call setFAC 
  //SEG44 [84] phi from main::@8 to setFAC [phi:main::@8->setFAC]
  setFAC_from_b8:
  //SEG45 [84] phi (word) setFAC::w#3 = (byte/signed byte/word/signed word/dword/signed dword) 25 [phi:main::@8->setFAC#0] -- vwuz1=vbuc1 
    lda #<$19
    sta setFAC.w
    lda #>$19
    sta setFAC.w+1
    jsr setFAC
  //SEG46 [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  b9_from_b8:
    jmp b9
  //SEG47 main::@9
  b9:
  //SEG48 [20] call divMEMbyFAC 
  //SEG49 [80] phi from main::@9 to divMEMbyFAC [phi:main::@9->divMEMbyFAC]
  divMEMbyFAC_from_b9:
    jsr divMEMbyFAC
  //SEG50 [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  b10_from_b9:
    jmp b10
  //SEG51 main::@10
  b10:
  //SEG52 [22] call sinFAC 
    jsr sinFAC
  //SEG53 [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  b11_from_b10:
    jmp b11
  //SEG54 main::@11
  b11:
  //SEG55 [24] call mulFACbyMEM 
  //SEG56 [73] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM]
  mulFACbyMEM_from_b11:
  //SEG57 [73] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta mulFACbyMEM.mem
    lda #>f_127
    sta mulFACbyMEM.mem+1
    jsr mulFACbyMEM
  //SEG58 [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12]
  b12_from_b11:
    jmp b12
  //SEG59 main::@12
  b12:
  //SEG60 [26] call addMEMtoFAC 
  //SEG61 [63] phi from main::@12 to addMEMtoFAC [phi:main::@12->addMEMtoFAC]
  addMEMtoFAC_from_b12:
    jsr addMEMtoFAC
  //SEG62 [27] phi from main::@12 to main::@13 [phi:main::@12->main::@13]
  b13_from_b12:
    jmp b13
  //SEG63 main::@13
  b13:
  //SEG64 [28] call getFAC 
    jsr getFAC
  //SEG65 [29] (word) getFAC::return#2 ← (word) getFAC::return#0 -- vwuz1=vwuz2 
    lda getFAC.return
    sta getFAC.return_2
    lda getFAC.return+1
    sta getFAC.return_2+1
    jmp b14
  //SEG66 main::@14
  b14:
  //SEG67 [30] (word) print_word::w#0 ← (word) getFAC::return#2 -- vwuz1=vwuz2 
    lda getFAC.return_2
    sta print_word.w
    lda getFAC.return_2+1
    sta print_word.w+1
  //SEG68 [31] call print_word 
    jsr print_word
  //SEG69 [32] phi from main::@14 to main::@15 [phi:main::@14->main::@15]
  b15_from_b14:
    jmp b15
  //SEG70 main::@15
  b15:
  //SEG71 [33] call print_ln 
  //SEG72 [38] phi from main::@15 to print_ln [phi:main::@15->print_ln]
  print_ln_from_b15:
    jsr print_ln
    jmp b16
  //SEG73 main::@16
  b16:
  //SEG74 [34] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG75 [35] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 26) goto main::@17 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$1a
    bne b17
    jmp breturn
  //SEG76 main::@return
  breturn:
  //SEG77 [36] return 
    rts
  //SEG78 main::@17
  b17:
  //SEG79 [37] (byte*~) print_char_cursor#49 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda print_line_cursor
    sta print_char_cursor
    lda print_line_cursor+1
    sta print_char_cursor+1
  //SEG80 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1]
  b1_from_b17:
  //SEG81 [10] phi (byte*) print_line_cursor#13 = (byte*) print_line_cursor#1 [phi:main::@17->main::@1#0] -- register_copy 
  //SEG82 [10] phi (byte*) print_char_cursor#32 = (byte*~) print_char_cursor#49 [phi:main::@17->main::@1#1] -- register_copy 
  //SEG83 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy 
    jmp b1
    f_i: .byte 0, 0, 0, 0, 0
    f_127: .byte 0, 0, 0, 0, 0
}
//SEG84 print_ln
// Print a newline
print_ln: {
  //SEG85 [39] 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:
  //SEG86 [39] phi (byte*) print_line_cursor#6 = (byte*) print_line_cursor#13 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
  //SEG87 print_ln::@1
  b1:
  //SEG88 [40] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda print_line_cursor
    clc
    adc #$28
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
  //SEG89 [41] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG90 print_ln::@return
  breturn:
  //SEG91 [42] return 
    rts
}
//SEG92 print_word
// Print a word as HEX
// print_word(word zeropage($13) w)
print_word: {
    .label w = $13
  //SEG93 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda w+1
    sta print_byte.b
  //SEG94 [44] call print_byte 
  //SEG95 [48] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
  //SEG96 [48] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#32 [phi:print_word->print_byte#0] -- register_copy 
  //SEG97 [48] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp b1
  //SEG98 print_word::@1
  b1:
  //SEG99 [45] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuz1=_lo_vwuz2 
    lda w
    sta print_byte.b
  //SEG100 [46] call print_byte 
  //SEG101 [48] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from_b1:
  //SEG102 [48] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
  //SEG103 [48] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
  //SEG104 print_word::@return
  breturn:
  //SEG105 [47] return 
    rts
}
//SEG106 print_byte
// Print a byte as HEX
// print_byte(byte zeropage(5) b)
print_byte: {
    .label _0 = $15
    .label _2 = $16
    .label b = 5
  //SEG107 [49] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz2_ror_4 
    lda b
    lsr
    lsr
    lsr
    lsr
    sta _0
  //SEG108 [50] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _0
    lda print_hextab,y
    sta print_char.ch
  //SEG109 [51] call print_char 
  //SEG110 [56] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
  //SEG111 [56] phi (byte*) print_char_cursor#23 = (byte*) print_char_cursor#31 [phi:print_byte->print_char#0] -- register_copy 
  //SEG112 [56] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
  //SEG113 print_byte::@1
  b1:
  //SEG114 [52] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and b
    sta _2
  //SEG115 [53] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _2
    lda print_hextab,y
    sta print_char.ch
  //SEG116 [54] call print_char 
  //SEG117 [56] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
  //SEG118 [56] phi (byte*) print_char_cursor#23 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
  //SEG119 [56] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
  //SEG120 print_byte::@return
  breturn:
  //SEG121 [55] return 
    rts
}
//SEG122 print_char
// Print a single char
// print_char(byte zeropage(6) ch)
print_char: {
    .label ch = 6
  //SEG123 [57] *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (print_char_cursor),y
  //SEG124 [58] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#23 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
  //SEG125 print_char::@return
  breturn:
  //SEG126 [59] return 
    rts
}
//SEG127 getFAC
// word = FAC
// Get the value of the FAC (floating point accumulator) as an integer 16bit word
// Destroys the value in the FAC in the process
getFAC: {
    .label return = $17
    .label return_2 = $11
  //SEG128 asm { jsr$b1aa sty$fe sta$ff  }
    // Load FAC (floating point accumulator) integer part into word register Y,A
    jsr $b1aa
    sty $fe
    sta $ff
  //SEG129 [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 
    lda memLo
    sta return
    lda memHi
    sta return+1
    jmp breturn
  //SEG130 getFAC::@return
  breturn:
  //SEG131 [62] return 
    rts
}
//SEG132 addMEMtoFAC
// FAC = MEM+FAC
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
// Reads 5 bytes from memory
addMEMtoFAC: {
  //SEG133 [64] call prepareMEM 
  //SEG134 [67] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM]
  prepareMEM_from_addMEMtoFAC:
  //SEG135 [67] phi (byte*) prepareMEM::mem#5 = (const byte[]) main::f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- pbuz1=pbuc1 
    lda #<main.f_127
    sta prepareMEM.mem
    lda #>main.f_127
    sta prepareMEM.mem+1
    jsr prepareMEM
    jmp b1
  //SEG136 addMEMtoFAC::@1
  b1:
  //SEG137 asm { lda$fe ldy$ff jsr$b867  }
    lda $fe
    ldy $ff
    jsr $b867
    jmp breturn
  //SEG138 addMEMtoFAC::@return
  breturn:
  //SEG139 [66] return 
    rts
}
//SEG140 prepareMEM
// Prepare MEM pointers for operations using MEM
// prepareMEM(byte* zeropage(9) mem)
prepareMEM: {
    .label _0 = $19
    .label _1 = $1a
    .label mem = 9
  //SEG141 [68] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 -- vbuz1=_lo_pbuz2 
    lda mem
    sta _0
  //SEG142 [69] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 -- _deref_pbuc1=vbuz1 
    lda _0
    sta memLo
  //SEG143 [70] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 -- vbuz1=_hi_pbuz2 
    lda mem+1
    sta _1
  //SEG144 [71] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 -- _deref_pbuc1=vbuz1 
    lda _1
    sta memHi
    jmp breturn
  //SEG145 prepareMEM::@return
  breturn:
  //SEG146 [72] return 
    rts
}
//SEG147 mulFACbyMEM
// FAC = MEM*FAC
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
// Reads 5 bytes from memory
// mulFACbyMEM(byte* zeropage($b) mem)
mulFACbyMEM: {
    .label mem = $b
  //SEG148 [74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 -- pbuz1=pbuz2 
    lda mem
    sta prepareMEM.mem
    lda mem+1
    sta prepareMEM.mem+1
  //SEG149 [75] call prepareMEM 
  //SEG150 [67] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM]
  prepareMEM_from_mulFACbyMEM:
  //SEG151 [67] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy 
    jsr prepareMEM
    jmp b1
  //SEG152 mulFACbyMEM::@1
  b1:
  //SEG153 asm { lda$fe ldy$ff jsr$ba28  }
    lda $fe
    ldy $ff
    jsr $ba28
    jmp breturn
  //SEG154 mulFACbyMEM::@return
  breturn:
  //SEG155 [77] return 
    rts
}
//SEG156 sinFAC
// FAC = sin(FAC)
// Set FAC to sinus of the FAC - sin(FAC)
// Sinus is calculated on radians (0-2*PI)
sinFAC: {
  //SEG157 asm { jsr$e26b  }
    jsr $e26b
    jmp breturn
  //SEG158 sinFAC::@return
  breturn:
  //SEG159 [79] return 
    rts
}
//SEG160 divMEMbyFAC
// FAC = MEM/FAC
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
// Reads 5 bytes from memory
divMEMbyFAC: {
  //SEG161 [81] call prepareMEM 
  //SEG162 [67] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM]
  prepareMEM_from_divMEMbyFAC:
  //SEG163 [67] phi (byte*) prepareMEM::mem#5 = (const byte[]) main::f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- pbuz1=pbuc1 
    lda #<main.f_i
    sta prepareMEM.mem
    lda #>main.f_i
    sta prepareMEM.mem+1
    jsr prepareMEM
    jmp b1
  //SEG164 divMEMbyFAC::@1
  b1:
  //SEG165 asm { lda$fe ldy$ff jsr$bb0f  }
    lda $fe
    ldy $ff
    jsr $bb0f
    jmp breturn
  //SEG166 divMEMbyFAC::@return
  breturn:
  //SEG167 [83] return 
    rts
}
//SEG168 setFAC
// FAC = word
// Set the FAC (floating point accumulator) to the integer value of a 16bit word
// setFAC(word zeropage($d) w)
setFAC: {
    .label w = $d
  //SEG169 [85] (byte*~) prepareMEM::mem#7 ← (byte*)(word) setFAC::w#3 -- pbuz1=pbuz2 
    lda w
    sta prepareMEM.mem
    lda w+1
    sta prepareMEM.mem+1
  //SEG170 [86] call prepareMEM 
  //SEG171 [67] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM]
  prepareMEM_from_setFAC:
  //SEG172 [67] phi (byte*) prepareMEM::mem#5 = (byte*~) prepareMEM::mem#7 [phi:setFAC->prepareMEM#0] -- register_copy 
    jsr prepareMEM
    jmp b1
  //SEG173 setFAC::@1
  b1:
  //SEG174 asm { ldy$fe lda$ff jsr$b391  }
    // Load word register Y,A into FAC (floating point accumulator)
    ldy $fe
    lda $ff
    jsr $b391
    jmp breturn
  //SEG175 setFAC::@return
  breturn:
  //SEG176 [88] return 
    rts
}
//SEG177 setMEMtoFAC
// MEM = FAC
// Stores the value of the FAC to memory
// Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};)
// setMEMtoFAC(byte* zeropage($f) mem)
setMEMtoFAC: {
    .label mem = $f
  //SEG178 [90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 -- pbuz1=pbuz2 
    lda mem
    sta prepareMEM.mem
    lda mem+1
    sta prepareMEM.mem+1
  //SEG179 [91] call prepareMEM 
  //SEG180 [67] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM]
  prepareMEM_from_setMEMtoFAC:
  //SEG181 [67] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy 
    jsr prepareMEM
    jmp b1
  //SEG182 setMEMtoFAC::@1
  b1:
  //SEG183 asm { ldx$fe ldy$ff jsr$bbd4  }
    ldx $fe
    ldy $ff
    jsr $bbd4
    jmp breturn
  //SEG184 setMEMtoFAC::@return
  breturn:
  //SEG185 [93] return 
    rts
}
//SEG186 divFACby10
// FAC = FAC/10
// Set FAC to FAC divided by 10
divFACby10: {
  //SEG187 asm { jsr$bafe  }
    jsr $bafe
    jmp breturn
  //SEG188 divFACby10::@return
  breturn:
  //SEG189 [95] return 
    rts
}
  print_hextab: .text "0123456789abcdef"

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [11] (word) setFAC::w#1 ← ((word)) (byte) main::i#10 [ main::i#10 print_char_cursor#32 print_line_cursor#13 setFAC::w#1 ] ( main:2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 setFAC::w#1 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
Statement [29] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 print_char_cursor#32 print_line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 getFAC::return#2 ] ) always clobbers reg byte a 
Statement [30] (word) print_word::w#0 ← (word) getFAC::return#2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 print_word::w#0 ] ) always clobbers reg byte a 
Statement [37] (byte*~) print_char_cursor#49 ← (byte*) print_line_cursor#1 [ main::i#1 print_char_cursor#49 print_line_cursor#1 ] ( main:2 [ main::i#1 print_char_cursor#49 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [40] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ print_line_cursor#1 print_char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [41] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_char_cursor#32 print_word::w#0 print_byte::b#0 ] ( main:2::print_word:31 [ main::i#10 print_line_cursor#13 print_char_cursor#32 print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [45] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_char_cursor#10 print_byte::b#1 ] ( main:2::print_word:31 [ main::i#10 print_line_cursor#13 print_char_cursor#10 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [49] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ print_byte::b#2 print_char_cursor#31 print_byte::$0 ] ( main:2::print_word:31::print_byte:44 [ main::i#10 print_line_cursor#13 print_word::w#0 print_byte::b#2 print_char_cursor#31 print_byte::$0 ] main:2::print_word:31::print_byte:46 [ main::i#10 print_line_cursor#13 print_byte::b#2 print_char_cursor#31 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [52] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ print_char_cursor#10 print_byte::$2 ] ( main:2::print_word:31::print_byte:44 [ main::i#10 print_line_cursor#13 print_word::w#0 print_char_cursor#10 print_byte::$2 ] main:2::print_word:31::print_byte:46 [ main::i#10 print_line_cursor#13 print_char_cursor#10 print_byte::$2 ] ) always clobbers reg byte a 
Statement [57] *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2 [ print_char_cursor#23 ] ( main:2::print_word:31::print_byte:44::print_char:51 [ main::i#10 print_line_cursor#13 print_word::w#0 print_byte::b#2 print_char_cursor#23 ] main:2::print_word:31::print_byte:46::print_char:51 [ main::i#10 print_line_cursor#13 print_byte::b#2 print_char_cursor#23 ] main:2::print_word:31::print_byte:44::print_char:54 [ main::i#10 print_line_cursor#13 print_word::w#0 print_char_cursor#23 ] main:2::print_word:31::print_byte:46::print_char:54 [ main::i#10 print_line_cursor#13 print_char_cursor#23 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) [ getFAC::return#0 ] ( main:2::getFAC:28 [ main::i#10 print_char_cursor#32 print_line_cursor#13 getFAC::return#0 ] ) always clobbers reg byte a 
Statement asm { lda$fe ldy$ff jsr$b867  } always clobbers reg byte a reg byte y 
Statement [74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:14 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:24 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#4 ] ) always clobbers reg byte a 
Statement asm { lda$fe ldy$ff jsr$ba28  } always clobbers reg byte a reg byte y 
Statement asm { lda$fe ldy$ff jsr$bb0f  } always clobbers reg byte a reg byte y 
Statement [85] (byte*~) prepareMEM::mem#7 ← (byte*)(word) setFAC::w#3 [ prepareMEM::mem#7 ] ( main:2::setFAC:5 [ prepareMEM::mem#7 ] main:2::setFAC:12 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#7 ] main:2::setFAC:18 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#7 ] ) always clobbers reg byte a 
Statement asm { ldy$fe lda$ff jsr$b391  } always clobbers reg byte a reg byte y 
Statement [90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:9 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:16 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#1 ] ) always clobbers reg byte a 
Statement asm { ldx$fe ldy$ff jsr$bbd4  } always clobbers reg byte x reg byte y 
Removing always clobbered register reg byte x as potential for zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
Statement [11] (word) setFAC::w#1 ← ((word)) (byte) main::i#10 [ main::i#10 print_char_cursor#32 print_line_cursor#13 setFAC::w#1 ] ( main:2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 setFAC::w#1 ] ) always clobbers reg byte a 
Statement [29] (word) getFAC::return#2 ← (word) getFAC::return#0 [ main::i#10 print_char_cursor#32 print_line_cursor#13 getFAC::return#2 ] ( main:2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 getFAC::return#2 ] ) always clobbers reg byte a 
Statement [30] (word) print_word::w#0 ← (word) getFAC::return#2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 print_word::w#0 ] ( main:2 [ main::i#10 print_char_cursor#32 print_line_cursor#13 print_word::w#0 ] ) always clobbers reg byte a 
Statement [35] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 26) goto main::@17 [ main::i#1 print_line_cursor#1 ] ( main:2 [ main::i#1 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [37] (byte*~) print_char_cursor#49 ← (byte*) print_line_cursor#1 [ main::i#1 print_char_cursor#49 print_line_cursor#1 ] ( main:2 [ main::i#1 print_char_cursor#49 print_line_cursor#1 ] ) always clobbers reg byte a 
Statement [40] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ print_line_cursor#1 print_char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [41] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#10 ] ( main:2::print_ln:33 [ main::i#10 print_line_cursor#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_char_cursor#32 print_word::w#0 print_byte::b#0 ] ( main:2::print_word:31 [ main::i#10 print_line_cursor#13 print_char_cursor#32 print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [45] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_char_cursor#10 print_byte::b#1 ] ( main:2::print_word:31 [ main::i#10 print_line_cursor#13 print_char_cursor#10 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [49] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ print_byte::b#2 print_char_cursor#31 print_byte::$0 ] ( main:2::print_word:31::print_byte:44 [ main::i#10 print_line_cursor#13 print_word::w#0 print_byte::b#2 print_char_cursor#31 print_byte::$0 ] main:2::print_word:31::print_byte:46 [ main::i#10 print_line_cursor#13 print_byte::b#2 print_char_cursor#31 print_byte::$0 ] ) always clobbers reg byte a 
Statement [52] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ print_char_cursor#10 print_byte::$2 ] ( main:2::print_word:31::print_byte:44 [ main::i#10 print_line_cursor#13 print_word::w#0 print_char_cursor#10 print_byte::$2 ] main:2::print_word:31::print_byte:46 [ main::i#10 print_line_cursor#13 print_char_cursor#10 print_byte::$2 ] ) always clobbers reg byte a 
Statement [57] *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2 [ print_char_cursor#23 ] ( main:2::print_word:31::print_byte:44::print_char:51 [ main::i#10 print_line_cursor#13 print_word::w#0 print_byte::b#2 print_char_cursor#23 ] main:2::print_word:31::print_byte:46::print_char:51 [ main::i#10 print_line_cursor#13 print_byte::b#2 print_char_cursor#23 ] main:2::print_word:31::print_byte:44::print_char:54 [ main::i#10 print_line_cursor#13 print_word::w#0 print_char_cursor#23 ] main:2::print_word:31::print_byte:46::print_char:54 [ main::i#10 print_line_cursor#13 print_char_cursor#23 ] ) always clobbers reg byte y 
Statement [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) [ getFAC::return#0 ] ( main:2::getFAC:28 [ main::i#10 print_char_cursor#32 print_line_cursor#13 getFAC::return#0 ] ) always clobbers reg byte a 
Statement asm { lda$fe ldy$ff jsr$b867  } always clobbers reg byte a reg byte y 
Statement [74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2 [ prepareMEM::mem#4 ] ( main:2::mulFACbyMEM:14 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#4 ] main:2::mulFACbyMEM:24 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#4 ] ) always clobbers reg byte a 
Statement asm { lda$fe ldy$ff jsr$ba28  } always clobbers reg byte a reg byte y 
Statement asm { lda$fe ldy$ff jsr$bb0f  } always clobbers reg byte a reg byte y 
Statement [85] (byte*~) prepareMEM::mem#7 ← (byte*)(word) setFAC::w#3 [ prepareMEM::mem#7 ] ( main:2::setFAC:5 [ prepareMEM::mem#7 ] main:2::setFAC:12 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#7 ] main:2::setFAC:18 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#7 ] ) always clobbers reg byte a 
Statement asm { ldy$fe lda$ff jsr$b391  } always clobbers reg byte a reg byte y 
Statement [90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2 [ prepareMEM::mem#1 ] ( main:2::setMEMtoFAC:9 [ prepareMEM::mem#1 ] main:2::setMEMtoFAC:16 [ main::i#10 print_char_cursor#32 print_line_cursor#13 prepareMEM::mem#1 ] ) always clobbers reg byte a 
Statement asm { ldx$fe ldy$ff jsr$bbd4  } always clobbers reg byte x reg byte y 
Potential registers zp ZP_BYTE:2 [ main::i#10 main::i#1 ] : zp ZP_BYTE:2 , 
Potential registers zp ZP_WORD:3 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ] : zp ZP_WORD:3 , 
Potential registers zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp ZP_BYTE:5 , reg byte x , 
Potential registers zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:7 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ] : zp ZP_WORD:7 , 
Potential registers zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ] : zp ZP_WORD:9 , 
Potential registers zp ZP_WORD:11 [ mulFACbyMEM::mem#2 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] : zp ZP_WORD:13 , 
Potential registers zp ZP_WORD:15 [ setMEMtoFAC::mem#2 ] : zp ZP_WORD:15 , 
Potential registers zp ZP_WORD:17 [ getFAC::return#2 ] : zp ZP_WORD:17 , 
Potential registers zp ZP_WORD:19 [ print_word::w#0 ] : zp ZP_WORD:19 , 
Potential registers zp ZP_BYTE:21 [ print_byte::$0 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ print_byte::$2 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:23 [ getFAC::return#0 ] : zp ZP_WORD:23 , 
Potential registers zp ZP_BYTE:25 [ prepareMEM::$0 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ prepareMEM::$1 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [] 250.97: zp ZP_WORD:3 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ] 34.89: zp ZP_WORD:7 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ] 
Uplift Scope [setFAC] 33: zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] 
Uplift Scope [getFAC] 22: zp ZP_WORD:17 [ getFAC::return#2 ] 4.33: zp ZP_WORD:23 [ getFAC::return#0 ] 
Uplift Scope [prepareMEM] 15.33: zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ] 4: zp ZP_BYTE:25 [ prepareMEM::$0 ] 4: zp ZP_BYTE:26 [ prepareMEM::$1 ] 
Uplift Scope [print_byte] 10: zp ZP_BYTE:5 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:21 [ print_byte::$0 ] 4: zp ZP_BYTE:22 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp ZP_BYTE:6 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [main] 12.38: zp ZP_BYTE:2 [ main::i#10 main::i#1 ] 
Uplift Scope [print_word] 5: zp ZP_WORD:19 [ print_word::w#0 ] 
Uplift Scope [setMEMtoFAC] 2: zp ZP_WORD:15 [ setMEMtoFAC::mem#2 ] 
Uplift Scope [mulFACbyMEM] 2: zp ZP_WORD:11 [ mulFACbyMEM::mem#2 ] 
Uplift Scope [print_ln] 
Uplift Scope [addMEMtoFAC] 
Uplift Scope [divMEMbyFAC] 
Uplift Scope [sinFAC] 
Uplift Scope [divFACby10] 

Uplifting [] best 6314 combination zp ZP_WORD:3 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ] zp ZP_WORD:7 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ] 
Uplifting [setFAC] best 6314 combination zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] 
Uplifting [getFAC] best 6314 combination zp ZP_WORD:17 [ getFAC::return#2 ] zp ZP_WORD:23 [ getFAC::return#0 ] 
Uplifting [prepareMEM] best 6302 combination zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ] reg byte a [ prepareMEM::$0 ] reg byte a [ prepareMEM::$1 ] 
Uplifting [print_byte] best 6290 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] 
Uplifting [print_char] best 6281 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [main] best 6281 combination zp ZP_BYTE:2 [ main::i#10 main::i#1 ] 
Uplifting [print_word] best 6281 combination zp ZP_WORD:19 [ print_word::w#0 ] 
Uplifting [setMEMtoFAC] best 6281 combination zp ZP_WORD:15 [ setMEMtoFAC::mem#2 ] 
Uplifting [mulFACbyMEM] best 6281 combination zp ZP_WORD:11 [ mulFACbyMEM::mem#2 ] 
Uplifting [print_ln] best 6281 combination 
Uplifting [addMEMtoFAC] best 6281 combination 
Uplifting [divMEMbyFAC] best 6281 combination 
Uplifting [sinFAC] best 6281 combination 
Uplifting [divFACby10] best 6281 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::i#10 main::i#1 ]
Uplifting [main] best 6281 combination zp ZP_BYTE:2 [ main::i#10 main::i#1 ] 
Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 ] ] with [ zp ZP_WORD:11 [ mulFACbyMEM::mem#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 ] ] with [ zp ZP_WORD:13 [ setFAC::w#3 setFAC::w#1 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 ] ] with [ zp ZP_WORD:15 [ setMEMtoFAC::mem#2 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:17 [ getFAC::return#2 ] ] with [ zp ZP_WORD:19 [ print_word::w#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:17 [ getFAC::return#2 print_word::w#0 ] ] with [ zp ZP_WORD:23 [ getFAC::return#0 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:9 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 ] ] with [ zp ZP_WORD:17 [ getFAC::return#2 print_word::w#0 getFAC::return#0 ] ]
Allocated (was zp ZP_WORD:7) zp ZP_WORD:5 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ]
Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 print_word::w#0 getFAC::return#0 ]

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 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_line_cursor = 3
  .label print_char_cursor = 5
//SEG3 @begin
bbegin:
//SEG4 [1] phi from @begin to @47 [phi:@begin->@47]
b47_from_bbegin:
  jmp b47
//SEG5 @47
b47:
//SEG6 [2] call main 
//SEG7 [4] phi from @47 to main [phi:@47->main]
main_from_b47:
  jsr main
//SEG8 [3] phi from @47 to @end [phi:@47->@end]
bend_from_b47:
  jmp bend
//SEG9 @end
bend:
//SEG10 main
main: {
    .label f_2pi = $e2e5
    .label i = 2
  //SEG11 [5] call setFAC 
  //SEG12 [84] phi from main to setFAC [phi:main->setFAC]
  setFAC_from_main:
  //SEG13 [84] phi (word) setFAC::w#3 = (word/signed word/dword/signed dword) 1275 [phi:main->setFAC#0] -- vwuz1=vwuc1 
    lda #<$4fb
    sta setFAC.w
    lda #>$4fb
    sta setFAC.w+1
    jsr setFAC
  //SEG14 [6] phi from main to main::@3 [phi:main->main::@3]
  b3_from_main:
    jmp b3
  //SEG15 main::@3
  b3:
  //SEG16 [7] call divFACby10 
    jsr divFACby10
  //SEG17 [8] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  b4_from_b3:
    jmp b4
  //SEG18 main::@4
  b4:
  //SEG19 [9] call setMEMtoFAC 
  //SEG20 [89] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC]
  setMEMtoFAC_from_b4:
  //SEG21 [89] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta setMEMtoFAC.mem
    lda #>f_127
    sta setMEMtoFAC.mem+1
    jsr setMEMtoFAC
  //SEG22 [10] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  b1_from_b4:
  //SEG23 [10] phi (byte*) print_line_cursor#13 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::@4->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
  //SEG24 [10] phi (byte*) print_char_cursor#32 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::@4->main::@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
  //SEG25 [10] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@4->main::@1#2] -- vbuz1=vbuc1 
    lda #1
    sta i
    jmp b1
  //SEG26 main::@1
  b1:
  //SEG27 [11] (word) setFAC::w#1 ← ((word)) (byte) main::i#10 -- vwuz1=_word_vbuz2 
    lda i
    sta setFAC.w
    lda #0
    sta setFAC.w+1
  //SEG28 [12] call setFAC 
  //SEG29 [84] phi from main::@1 to setFAC [phi:main::@1->setFAC]
  setFAC_from_b1:
  //SEG30 [84] phi (word) setFAC::w#3 = (word) setFAC::w#1 [phi:main::@1->setFAC#0] -- register_copy 
    jsr setFAC
  //SEG31 [13] phi from main::@1 to main::@6 [phi:main::@1->main::@6]
  b6_from_b1:
    jmp b6
  //SEG32 main::@6
  b6:
  //SEG33 [14] call mulFACbyMEM 
  //SEG34 [73] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM]
  mulFACbyMEM_from_b6:
  //SEG35 [73] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_2pi
    sta mulFACbyMEM.mem
    lda #>f_2pi
    sta mulFACbyMEM.mem+1
    jsr mulFACbyMEM
  //SEG36 [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  b7_from_b6:
    jmp b7
  //SEG37 main::@7
  b7:
  //SEG38 [16] call setMEMtoFAC 
  //SEG39 [89] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC]
  setMEMtoFAC_from_b7:
  //SEG40 [89] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_i
    sta setMEMtoFAC.mem
    lda #>f_i
    sta setMEMtoFAC.mem+1
    jsr setMEMtoFAC
  //SEG41 [17] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  b8_from_b7:
    jmp b8
  //SEG42 main::@8
  b8:
  //SEG43 [18] call setFAC 
  //SEG44 [84] phi from main::@8 to setFAC [phi:main::@8->setFAC]
  setFAC_from_b8:
  //SEG45 [84] phi (word) setFAC::w#3 = (byte/signed byte/word/signed word/dword/signed dword) 25 [phi:main::@8->setFAC#0] -- vwuz1=vbuc1 
    lda #<$19
    sta setFAC.w
    lda #>$19
    sta setFAC.w+1
    jsr setFAC
  //SEG46 [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  b9_from_b8:
    jmp b9
  //SEG47 main::@9
  b9:
  //SEG48 [20] call divMEMbyFAC 
  //SEG49 [80] phi from main::@9 to divMEMbyFAC [phi:main::@9->divMEMbyFAC]
  divMEMbyFAC_from_b9:
    jsr divMEMbyFAC
  //SEG50 [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  b10_from_b9:
    jmp b10
  //SEG51 main::@10
  b10:
  //SEG52 [22] call sinFAC 
    jsr sinFAC
  //SEG53 [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  b11_from_b10:
    jmp b11
  //SEG54 main::@11
  b11:
  //SEG55 [24] call mulFACbyMEM 
  //SEG56 [73] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM]
  mulFACbyMEM_from_b11:
  //SEG57 [73] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta mulFACbyMEM.mem
    lda #>f_127
    sta mulFACbyMEM.mem+1
    jsr mulFACbyMEM
  //SEG58 [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12]
  b12_from_b11:
    jmp b12
  //SEG59 main::@12
  b12:
  //SEG60 [26] call addMEMtoFAC 
  //SEG61 [63] phi from main::@12 to addMEMtoFAC [phi:main::@12->addMEMtoFAC]
  addMEMtoFAC_from_b12:
    jsr addMEMtoFAC
  //SEG62 [27] phi from main::@12 to main::@13 [phi:main::@12->main::@13]
  b13_from_b12:
    jmp b13
  //SEG63 main::@13
  b13:
  //SEG64 [28] call getFAC 
    jsr getFAC
  //SEG65 [29] (word) getFAC::return#2 ← (word) getFAC::return#0
    jmp b14
  //SEG66 main::@14
  b14:
  //SEG67 [30] (word) print_word::w#0 ← (word) getFAC::return#2
  //SEG68 [31] call print_word 
    jsr print_word
  //SEG69 [32] phi from main::@14 to main::@15 [phi:main::@14->main::@15]
  b15_from_b14:
    jmp b15
  //SEG70 main::@15
  b15:
  //SEG71 [33] call print_ln 
  //SEG72 [38] phi from main::@15 to print_ln [phi:main::@15->print_ln]
  print_ln_from_b15:
    jsr print_ln
    jmp b16
  //SEG73 main::@16
  b16:
  //SEG74 [34] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG75 [35] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 26) goto main::@17 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$1a
    bne b17
    jmp breturn
  //SEG76 main::@return
  breturn:
  //SEG77 [36] return 
    rts
  //SEG78 main::@17
  b17:
  //SEG79 [37] (byte*~) print_char_cursor#49 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda print_line_cursor
    sta print_char_cursor
    lda print_line_cursor+1
    sta print_char_cursor+1
  //SEG80 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1]
  b1_from_b17:
  //SEG81 [10] phi (byte*) print_line_cursor#13 = (byte*) print_line_cursor#1 [phi:main::@17->main::@1#0] -- register_copy 
  //SEG82 [10] phi (byte*) print_char_cursor#32 = (byte*~) print_char_cursor#49 [phi:main::@17->main::@1#1] -- register_copy 
  //SEG83 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy 
    jmp b1
    f_i: .byte 0, 0, 0, 0, 0
    f_127: .byte 0, 0, 0, 0, 0
}
//SEG84 print_ln
// Print a newline
print_ln: {
  //SEG85 [39] 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:
  //SEG86 [39] phi (byte*) print_line_cursor#6 = (byte*) print_line_cursor#13 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
  //SEG87 print_ln::@1
  b1:
  //SEG88 [40] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda print_line_cursor
    clc
    adc #$28
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
  //SEG89 [41] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG90 print_ln::@return
  breturn:
  //SEG91 [42] return 
    rts
}
//SEG92 print_word
// Print a word as HEX
// print_word(word zeropage(7) w)
print_word: {
    .label w = 7
  //SEG93 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda w+1
    tax
  //SEG94 [44] call print_byte 
  //SEG95 [48] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
  //SEG96 [48] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#32 [phi:print_word->print_byte#0] -- register_copy 
  //SEG97 [48] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp b1
  //SEG98 print_word::@1
  b1:
  //SEG99 [45] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda w
    tax
  //SEG100 [46] call print_byte 
  //SEG101 [48] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from_b1:
  //SEG102 [48] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
  //SEG103 [48] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
  //SEG104 print_word::@return
  breturn:
  //SEG105 [47] return 
    rts
}
//SEG106 print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
  //SEG107 [49] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
  //SEG108 [50] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG109 [51] call print_char 
  //SEG110 [56] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
  //SEG111 [56] phi (byte*) print_char_cursor#23 = (byte*) print_char_cursor#31 [phi:print_byte->print_char#0] -- register_copy 
  //SEG112 [56] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
  //SEG113 print_byte::@1
  b1:
  //SEG114 [52] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f
  //SEG115 [53] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG116 [54] call print_char 
  //SEG117 [56] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
  //SEG118 [56] phi (byte*) print_char_cursor#23 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
  //SEG119 [56] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
  //SEG120 print_byte::@return
  breturn:
  //SEG121 [55] return 
    rts
}
//SEG122 print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
  //SEG123 [57] *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
  //SEG124 [58] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#23 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
  //SEG125 print_char::@return
  breturn:
  //SEG126 [59] return 
    rts
}
//SEG127 getFAC
// word = FAC
// Get the value of the FAC (floating point accumulator) as an integer 16bit word
// Destroys the value in the FAC in the process
getFAC: {
    .label return = 7
  //SEG128 asm { jsr$b1aa sty$fe sta$ff  }
    // Load FAC (floating point accumulator) integer part into word register Y,A
    jsr $b1aa
    sty $fe
    sta $ff
  //SEG129 [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 
    lda memLo
    sta return
    lda memHi
    sta return+1
    jmp breturn
  //SEG130 getFAC::@return
  breturn:
  //SEG131 [62] return 
    rts
}
//SEG132 addMEMtoFAC
// FAC = MEM+FAC
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
// Reads 5 bytes from memory
addMEMtoFAC: {
  //SEG133 [64] call prepareMEM 
  //SEG134 [67] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM]
  prepareMEM_from_addMEMtoFAC:
  //SEG135 [67] phi (byte*) prepareMEM::mem#5 = (const byte[]) main::f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- pbuz1=pbuc1 
    lda #<main.f_127
    sta prepareMEM.mem
    lda #>main.f_127
    sta prepareMEM.mem+1
    jsr prepareMEM
    jmp b1
  //SEG136 addMEMtoFAC::@1
  b1:
  //SEG137 asm { lda$fe ldy$ff jsr$b867  }
    lda $fe
    ldy $ff
    jsr $b867
    jmp breturn
  //SEG138 addMEMtoFAC::@return
  breturn:
  //SEG139 [66] return 
    rts
}
//SEG140 prepareMEM
// Prepare MEM pointers for operations using MEM
// prepareMEM(byte* zeropage(7) mem)
prepareMEM: {
    .label mem = 7
  //SEG141 [68] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 -- vbuaa=_lo_pbuz1 
    lda mem
  //SEG142 [69] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 -- _deref_pbuc1=vbuaa 
    sta memLo
  //SEG143 [70] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 -- vbuaa=_hi_pbuz1 
    lda mem+1
  //SEG144 [71] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 -- _deref_pbuc1=vbuaa 
    sta memHi
    jmp breturn
  //SEG145 prepareMEM::@return
  breturn:
  //SEG146 [72] return 
    rts
}
//SEG147 mulFACbyMEM
// FAC = MEM*FAC
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
// Reads 5 bytes from memory
// mulFACbyMEM(byte* zeropage(7) mem)
mulFACbyMEM: {
    .label mem = 7
  //SEG148 [74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2
  //SEG149 [75] call prepareMEM 
  //SEG150 [67] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM]
  prepareMEM_from_mulFACbyMEM:
  //SEG151 [67] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy 
    jsr prepareMEM
    jmp b1
  //SEG152 mulFACbyMEM::@1
  b1:
  //SEG153 asm { lda$fe ldy$ff jsr$ba28  }
    lda $fe
    ldy $ff
    jsr $ba28
    jmp breturn
  //SEG154 mulFACbyMEM::@return
  breturn:
  //SEG155 [77] return 
    rts
}
//SEG156 sinFAC
// FAC = sin(FAC)
// Set FAC to sinus of the FAC - sin(FAC)
// Sinus is calculated on radians (0-2*PI)
sinFAC: {
  //SEG157 asm { jsr$e26b  }
    jsr $e26b
    jmp breturn
  //SEG158 sinFAC::@return
  breturn:
  //SEG159 [79] return 
    rts
}
//SEG160 divMEMbyFAC
// FAC = MEM/FAC
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
// Reads 5 bytes from memory
divMEMbyFAC: {
  //SEG161 [81] call prepareMEM 
  //SEG162 [67] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM]
  prepareMEM_from_divMEMbyFAC:
  //SEG163 [67] phi (byte*) prepareMEM::mem#5 = (const byte[]) main::f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- pbuz1=pbuc1 
    lda #<main.f_i
    sta prepareMEM.mem
    lda #>main.f_i
    sta prepareMEM.mem+1
    jsr prepareMEM
    jmp b1
  //SEG164 divMEMbyFAC::@1
  b1:
  //SEG165 asm { lda$fe ldy$ff jsr$bb0f  }
    lda $fe
    ldy $ff
    jsr $bb0f
    jmp breturn
  //SEG166 divMEMbyFAC::@return
  breturn:
  //SEG167 [83] return 
    rts
}
//SEG168 setFAC
// FAC = word
// Set the FAC (floating point accumulator) to the integer value of a 16bit word
// setFAC(word zeropage(7) w)
setFAC: {
    .label w = 7
  //SEG169 [85] (byte*~) prepareMEM::mem#7 ← (byte*)(word) setFAC::w#3
  //SEG170 [86] call prepareMEM 
  //SEG171 [67] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM]
  prepareMEM_from_setFAC:
  //SEG172 [67] phi (byte*) prepareMEM::mem#5 = (byte*~) prepareMEM::mem#7 [phi:setFAC->prepareMEM#0] -- register_copy 
    jsr prepareMEM
    jmp b1
  //SEG173 setFAC::@1
  b1:
  //SEG174 asm { ldy$fe lda$ff jsr$b391  }
    // Load word register Y,A into FAC (floating point accumulator)
    ldy $fe
    lda $ff
    jsr $b391
    jmp breturn
  //SEG175 setFAC::@return
  breturn:
  //SEG176 [88] return 
    rts
}
//SEG177 setMEMtoFAC
// MEM = FAC
// Stores the value of the FAC to memory
// Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};)
// setMEMtoFAC(byte* zeropage(7) mem)
setMEMtoFAC: {
    .label mem = 7
  //SEG178 [90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2
  //SEG179 [91] call prepareMEM 
  //SEG180 [67] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM]
  prepareMEM_from_setMEMtoFAC:
  //SEG181 [67] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy 
    jsr prepareMEM
    jmp b1
  //SEG182 setMEMtoFAC::@1
  b1:
  //SEG183 asm { ldx$fe ldy$ff jsr$bbd4  }
    ldx $fe
    ldy $ff
    jsr $bbd4
    jmp breturn
  //SEG184 setMEMtoFAC::@return
  breturn:
  //SEG185 [93] return 
    rts
}
//SEG186 divFACby10
// FAC = FAC/10
// Set FAC to FAC divided by 10
divFACby10: {
  //SEG187 asm { jsr$bafe  }
    jsr $bafe
    jmp breturn
  //SEG188 divFACby10::@return
  breturn:
  //SEG189 [95] return 
    rts
}
  print_hextab: .text "0123456789abcdef"

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b47
Removing instruction jmp bend
Removing instruction jmp b3
Removing instruction jmp b4
Removing instruction jmp b1
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 b15
Removing instruction jmp b16
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
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp breturn
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
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b47_from_bbegin:
Removing instruction b47:
Removing instruction main_from_b47:
Removing instruction bend_from_b47:
Removing instruction b3_from_main:
Removing instruction b4_from_b3:
Removing instruction setMEMtoFAC_from_b4:
Removing instruction b6_from_b1:
Removing instruction mulFACbyMEM_from_b6:
Removing instruction b7_from_b6:
Removing instruction setMEMtoFAC_from_b7:
Removing instruction b8_from_b7:
Removing instruction setFAC_from_b8:
Removing instruction b9_from_b8:
Removing instruction divMEMbyFAC_from_b9:
Removing instruction b10_from_b9:
Removing instruction b11_from_b10:
Removing instruction mulFACbyMEM_from_b11:
Removing instruction b12_from_b11:
Removing instruction addMEMtoFAC_from_b12:
Removing instruction b13_from_b12:
Removing instruction b15_from_b14:
Removing instruction print_ln_from_b15:
Removing instruction b1_from_print_ln:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction setFAC_from_main:
Removing instruction b3:
Removing instruction b4:
Removing instruction b1_from_b4:
Removing instruction setFAC_from_b1:
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 b15:
Removing instruction b16:
Removing instruction breturn:
Removing instruction b1_from_b17:
Removing instruction breturn:
Removing instruction print_byte_from_print_word:
Removing instruction b1:
Removing instruction print_byte_from_b1:
Removing instruction breturn:
Removing instruction print_char_from_print_byte:
Removing instruction b1:
Removing instruction print_char_from_b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction prepareMEM_from_addMEMtoFAC:
Removing instruction b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction prepareMEM_from_mulFACbyMEM:
Removing instruction b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction prepareMEM_from_divMEMbyFAC:
Removing instruction b1:
Removing instruction breturn:
Removing instruction prepareMEM_from_setFAC:
Removing instruction b1:
Removing instruction breturn:
Removing instruction prepareMEM_from_setMEMtoFAC:
Removing instruction b1:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @47
(label) @begin
(label) @end
(void()) addMEMtoFAC((byte*) addMEMtoFAC::mem)
(label) addMEMtoFAC::@1
(label) addMEMtoFAC::@return
(byte*) addMEMtoFAC::mem
(void()) divFACby10()
(label) divFACby10::@return
(void()) divMEMbyFAC((byte*) divMEMbyFAC::mem)
(label) divMEMbyFAC::@1
(label) divMEMbyFAC::@return
(byte*) divMEMbyFAC::mem
(word()) getFAC()
(label) getFAC::@return
(word) getFAC::return
(word) getFAC::return#0 return zp ZP_WORD:7 4.333333333333333
(word) getFAC::return#2 return zp ZP_WORD:7 22.0
(word) getFAC::w
(void()) main()
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@17
(label) main::@3
(label) main::@4
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte[]) main::f_127
(const byte[]) main::f_127#0 f_127 = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 }
(byte*) main::f_2pi
(const byte*) main::f_2pi#0 f_2pi = ((byte*))(word/dword/signed dword) 58085
(byte[]) main::f_i
(const byte[]) main::f_i#0 f_i = { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 }
(byte) main::i
(byte) main::i#1 i zp ZP_BYTE:2 11.0
(byte) main::i#10 i zp ZP_BYTE:2 1.375
(byte*) memHi
(const byte*) memHi#0 memHi = ((byte*))(byte/word/signed word/dword/signed dword) 255
(byte*) memLo
(const byte*) memLo#0 memLo = ((byte*))(byte/word/signed word/dword/signed dword) 254
(void()) mulFACbyMEM((byte*) mulFACbyMEM::mem)
(label) mulFACbyMEM::@1
(label) mulFACbyMEM::@return
(byte*) mulFACbyMEM::mem
(byte*) mulFACbyMEM::mem#2 mem zp ZP_WORD:7 2.0
(void()) prepareMEM((byte*) prepareMEM::mem)
(byte~) prepareMEM::$0 reg byte a 4.0
(byte~) prepareMEM::$1 reg byte a 4.0
(label) prepareMEM::@return
(byte*) prepareMEM::mem
(byte*) prepareMEM::mem#1 mem zp ZP_WORD:7 4.0
(byte*) prepareMEM::mem#4 mem zp ZP_WORD:7 4.0
(byte*) prepareMEM::mem#5 mem zp ZP_WORD:7 3.333333333333333
(byte*~) prepareMEM::mem#7 mem zp ZP_WORD:7 4.0
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte a 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0 reg byte a 4.0
(byte) print_char::ch#1 reg byte a 4.0
(byte) print_char::ch#2 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#10 print_char_cursor zp ZP_WORD:5 6.2941176470588225
(byte*) print_char_cursor#23 print_char_cursor zp ZP_WORD:5 4.0
(byte*) print_char_cursor#31 print_char_cursor zp ZP_WORD:5 2.0
(byte*) print_char_cursor#32 print_char_cursor zp ZP_WORD:5 0.5909090909090909
(byte*~) print_char_cursor#49 print_char_cursor zp ZP_WORD:5 22.0
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:3 46.42857142857143
(byte*) print_line_cursor#13 print_line_cursor zp ZP_WORD:3 0.5416666666666666
(byte*) print_line_cursor#6 print_line_cursor zp ZP_WORD:3 204.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(byte*) print_screen
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0 w zp ZP_WORD:7 5.0
(void()) setFAC((word) setFAC::w)
(label) setFAC::@1
(label) setFAC::@return
(word) setFAC::w
(word) setFAC::w#1 w zp ZP_WORD:7 22.0
(word) setFAC::w#3 w zp ZP_WORD:7 11.0
(void()) setMEMtoFAC((byte*) setMEMtoFAC::mem)
(label) setMEMtoFAC::@1
(label) setMEMtoFAC::@return
(byte*) setMEMtoFAC::mem
(byte*) setMEMtoFAC::mem#2 mem zp ZP_WORD:7 2.0
(void()) sinFAC()
(label) sinFAC::@return

zp ZP_BYTE:2 [ main::i#10 main::i#1 ]
zp ZP_WORD:3 [ print_line_cursor#6 print_line_cursor#13 print_line_cursor#1 ]
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp ZP_WORD:5 [ print_char_cursor#23 print_char_cursor#31 print_char_cursor#32 print_char_cursor#49 print_char_cursor#10 ]
zp ZP_WORD:7 [ prepareMEM::mem#5 prepareMEM::mem#4 prepareMEM::mem#7 prepareMEM::mem#1 mulFACbyMEM::mem#2 setFAC::w#3 setFAC::w#1 setMEMtoFAC::mem#2 getFAC::return#2 print_word::w#0 getFAC::return#0 ]
reg byte a [ print_byte::$0 ]
reg byte a [ print_byte::$2 ]
reg byte a [ prepareMEM::$0 ]
reg byte a [ prepareMEM::$1 ]


FINAL ASSEMBLER
Score: 4967

//SEG0 File Comments
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 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_line_cursor = 3
  .label print_char_cursor = 5
//SEG3 @begin
//SEG4 [1] phi from @begin to @47 [phi:@begin->@47]
//SEG5 @47
//SEG6 [2] call main 
//SEG7 [4] phi from @47 to main [phi:@47->main]
//SEG8 [3] phi from @47 to @end [phi:@47->@end]
//SEG9 @end
//SEG10 main
main: {
    .label f_2pi = $e2e5
    .label i = 2
  //SEG11 [5] call setFAC 
  //SEG12 [84] phi from main to setFAC [phi:main->setFAC]
  //SEG13 [84] phi (word) setFAC::w#3 = (word/signed word/dword/signed dword) 1275 [phi:main->setFAC#0] -- vwuz1=vwuc1 
    lda #<$4fb
    sta setFAC.w
    lda #>$4fb
    sta setFAC.w+1
    jsr setFAC
  //SEG14 [6] phi from main to main::@3 [phi:main->main::@3]
  //SEG15 main::@3
  //SEG16 [7] call divFACby10 
    jsr divFACby10
  //SEG17 [8] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
  //SEG18 main::@4
  //SEG19 [9] call setMEMtoFAC 
  //SEG20 [89] phi from main::@4 to setMEMtoFAC [phi:main::@4->setMEMtoFAC]
  //SEG21 [89] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_127#0 [phi:main::@4->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta setMEMtoFAC.mem
    lda #>f_127
    sta setMEMtoFAC.mem+1
    jsr setMEMtoFAC
  //SEG22 [10] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  //SEG23 [10] phi (byte*) print_line_cursor#13 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::@4->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
  //SEG24 [10] phi (byte*) print_char_cursor#32 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main::@4->main::@1#1] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
  //SEG25 [10] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@4->main::@1#2] -- vbuz1=vbuc1 
    lda #1
    sta i
  //SEG26 main::@1
  b1:
  //SEG27 [11] (word) setFAC::w#1 ← ((word)) (byte) main::i#10 -- vwuz1=_word_vbuz2 
    lda i
    sta setFAC.w
    lda #0
    sta setFAC.w+1
  //SEG28 [12] call setFAC 
  //SEG29 [84] phi from main::@1 to setFAC [phi:main::@1->setFAC]
  //SEG30 [84] phi (word) setFAC::w#3 = (word) setFAC::w#1 [phi:main::@1->setFAC#0] -- register_copy 
    jsr setFAC
  //SEG31 [13] phi from main::@1 to main::@6 [phi:main::@1->main::@6]
  //SEG32 main::@6
  //SEG33 [14] call mulFACbyMEM 
  //SEG34 [73] phi from main::@6 to mulFACbyMEM [phi:main::@6->mulFACbyMEM]
  //SEG35 [73] phi (byte*) mulFACbyMEM::mem#2 = (const byte*) main::f_2pi#0 [phi:main::@6->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_2pi
    sta mulFACbyMEM.mem
    lda #>f_2pi
    sta mulFACbyMEM.mem+1
    jsr mulFACbyMEM
  //SEG36 [15] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
  //SEG37 main::@7
  //SEG38 [16] call setMEMtoFAC 
  //SEG39 [89] phi from main::@7 to setMEMtoFAC [phi:main::@7->setMEMtoFAC]
  //SEG40 [89] phi (byte*) setMEMtoFAC::mem#2 = (const byte[]) main::f_i#0 [phi:main::@7->setMEMtoFAC#0] -- pbuz1=pbuc1 
    lda #<f_i
    sta setMEMtoFAC.mem
    lda #>f_i
    sta setMEMtoFAC.mem+1
    jsr setMEMtoFAC
  //SEG41 [17] phi from main::@7 to main::@8 [phi:main::@7->main::@8]
  //SEG42 main::@8
  //SEG43 [18] call setFAC 
  //SEG44 [84] phi from main::@8 to setFAC [phi:main::@8->setFAC]
  //SEG45 [84] phi (word) setFAC::w#3 = (byte/signed byte/word/signed word/dword/signed dword) 25 [phi:main::@8->setFAC#0] -- vwuz1=vbuc1 
    lda #<$19
    sta setFAC.w
    lda #>$19
    sta setFAC.w+1
    jsr setFAC
  //SEG46 [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
  //SEG47 main::@9
  //SEG48 [20] call divMEMbyFAC 
  //SEG49 [80] phi from main::@9 to divMEMbyFAC [phi:main::@9->divMEMbyFAC]
    jsr divMEMbyFAC
  //SEG50 [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10]
  //SEG51 main::@10
  //SEG52 [22] call sinFAC 
    jsr sinFAC
  //SEG53 [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11]
  //SEG54 main::@11
  //SEG55 [24] call mulFACbyMEM 
  //SEG56 [73] phi from main::@11 to mulFACbyMEM [phi:main::@11->mulFACbyMEM]
  //SEG57 [73] phi (byte*) mulFACbyMEM::mem#2 = (const byte[]) main::f_127#0 [phi:main::@11->mulFACbyMEM#0] -- pbuz1=pbuc1 
    lda #<f_127
    sta mulFACbyMEM.mem
    lda #>f_127
    sta mulFACbyMEM.mem+1
    jsr mulFACbyMEM
  //SEG58 [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12]
  //SEG59 main::@12
  //SEG60 [26] call addMEMtoFAC 
  //SEG61 [63] phi from main::@12 to addMEMtoFAC [phi:main::@12->addMEMtoFAC]
    jsr addMEMtoFAC
  //SEG62 [27] phi from main::@12 to main::@13 [phi:main::@12->main::@13]
  //SEG63 main::@13
  //SEG64 [28] call getFAC 
    jsr getFAC
  //SEG65 [29] (word) getFAC::return#2 ← (word) getFAC::return#0
  //SEG66 main::@14
  //SEG67 [30] (word) print_word::w#0 ← (word) getFAC::return#2
  //SEG68 [31] call print_word 
    jsr print_word
  //SEG69 [32] phi from main::@14 to main::@15 [phi:main::@14->main::@15]
  //SEG70 main::@15
  //SEG71 [33] call print_ln 
  //SEG72 [38] phi from main::@15 to print_ln [phi:main::@15->print_ln]
    jsr print_ln
  //SEG73 main::@16
  //SEG74 [34] (byte) main::i#1 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG75 [35] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 26) goto main::@17 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$1a
    bne b17
  //SEG76 main::@return
  //SEG77 [36] return 
    rts
  //SEG78 main::@17
  b17:
  //SEG79 [37] (byte*~) print_char_cursor#49 ← (byte*) print_line_cursor#1 -- pbuz1=pbuz2 
    lda print_line_cursor
    sta print_char_cursor
    lda print_line_cursor+1
    sta print_char_cursor+1
  //SEG80 [10] phi from main::@17 to main::@1 [phi:main::@17->main::@1]
  //SEG81 [10] phi (byte*) print_line_cursor#13 = (byte*) print_line_cursor#1 [phi:main::@17->main::@1#0] -- register_copy 
  //SEG82 [10] phi (byte*) print_char_cursor#32 = (byte*~) print_char_cursor#49 [phi:main::@17->main::@1#1] -- register_copy 
  //SEG83 [10] phi (byte) main::i#10 = (byte) main::i#1 [phi:main::@17->main::@1#2] -- register_copy 
    jmp b1
    f_i: .byte 0, 0, 0, 0, 0
    f_127: .byte 0, 0, 0, 0, 0
}
//SEG84 print_ln
// Print a newline
print_ln: {
  //SEG85 [39] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1]
  //SEG86 [39] phi (byte*) print_line_cursor#6 = (byte*) print_line_cursor#13 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy 
  //SEG87 print_ln::@1
  b1:
  //SEG88 [40] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#6 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda print_line_cursor
    clc
    adc #$28
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
  //SEG89 [41] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1
  !:
  //SEG90 print_ln::@return
  //SEG91 [42] return 
    rts
}
//SEG92 print_word
// Print a word as HEX
// print_word(word zeropage(7) w)
print_word: {
    .label w = 7
  //SEG93 [43] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda w+1
    tax
  //SEG94 [44] call print_byte 
  //SEG95 [48] phi from print_word to print_byte [phi:print_word->print_byte]
  //SEG96 [48] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#32 [phi:print_word->print_byte#0] -- register_copy 
  //SEG97 [48] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG98 print_word::@1
  //SEG99 [45] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda w
    tax
  //SEG100 [46] call print_byte 
  //SEG101 [48] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  //SEG102 [48] phi (byte*) print_char_cursor#31 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
  //SEG103 [48] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG104 print_word::@return
  //SEG105 [47] return 
    rts
}
//SEG106 print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
  //SEG107 [49] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
  //SEG108 [50] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG109 [51] call print_char 
  //SEG110 [56] phi from print_byte to print_char [phi:print_byte->print_char]
  //SEG111 [56] phi (byte*) print_char_cursor#23 = (byte*) print_char_cursor#31 [phi:print_byte->print_char#0] -- register_copy 
  //SEG112 [56] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
  //SEG113 print_byte::@1
  //SEG114 [52] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f
  //SEG115 [53] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG116 [54] call print_char 
  //SEG117 [56] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  //SEG118 [56] phi (byte*) print_char_cursor#23 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
  //SEG119 [56] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
  //SEG120 print_byte::@return
  //SEG121 [55] return 
    rts
}
//SEG122 print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
  //SEG123 [57] *((byte*) print_char_cursor#23) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
  //SEG124 [58] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#23 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
  //SEG125 print_char::@return
  //SEG126 [59] return 
    rts
}
//SEG127 getFAC
// word = FAC
// Get the value of the FAC (floating point accumulator) as an integer 16bit word
// Destroys the value in the FAC in the process
getFAC: {
    .label return = 7
  //SEG128 asm { jsr$b1aa sty$fe sta$ff  }
    // Load FAC (floating point accumulator) integer part into word register Y,A
    jsr $b1aa
    sty $fe
    sta $ff
  //SEG129 [61] (word) getFAC::return#0 ← *((const byte*) memHi#0) w= *((const byte*) memLo#0) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 
    lda memLo
    sta return
    lda memHi
    sta return+1
  //SEG130 getFAC::@return
  //SEG131 [62] return 
    rts
}
//SEG132 addMEMtoFAC
// FAC = MEM+FAC
// Set FAC to MEM (float saved in memory) plus FAC (float accumulator)
// Reads 5 bytes from memory
addMEMtoFAC: {
  //SEG133 [64] call prepareMEM 
  //SEG134 [67] phi from addMEMtoFAC to prepareMEM [phi:addMEMtoFAC->prepareMEM]
  //SEG135 [67] phi (byte*) prepareMEM::mem#5 = (const byte[]) main::f_127#0 [phi:addMEMtoFAC->prepareMEM#0] -- pbuz1=pbuc1 
    lda #<main.f_127
    sta prepareMEM.mem
    lda #>main.f_127
    sta prepareMEM.mem+1
    jsr prepareMEM
  //SEG136 addMEMtoFAC::@1
  //SEG137 asm { lda$fe ldy$ff jsr$b867  }
    lda $fe
    ldy $ff
    jsr $b867
  //SEG138 addMEMtoFAC::@return
  //SEG139 [66] return 
    rts
}
//SEG140 prepareMEM
// Prepare MEM pointers for operations using MEM
// prepareMEM(byte* zeropage(7) mem)
prepareMEM: {
    .label mem = 7
  //SEG141 [68] (byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5 -- vbuaa=_lo_pbuz1 
    lda mem
  //SEG142 [69] *((const byte*) memLo#0) ← (byte~) prepareMEM::$0 -- _deref_pbuc1=vbuaa 
    sta memLo
  //SEG143 [70] (byte~) prepareMEM::$1 ← > (byte*) prepareMEM::mem#5 -- vbuaa=_hi_pbuz1 
    lda mem+1
  //SEG144 [71] *((const byte*) memHi#0) ← (byte~) prepareMEM::$1 -- _deref_pbuc1=vbuaa 
    sta memHi
  //SEG145 prepareMEM::@return
  //SEG146 [72] return 
    rts
}
//SEG147 mulFACbyMEM
// FAC = MEM*FAC
// Set FAC to MEM (float saved in memory) multiplied by FAC (float accumulator)
// Reads 5 bytes from memory
// mulFACbyMEM(byte* zeropage(7) mem)
mulFACbyMEM: {
    .label mem = 7
  //SEG148 [74] (byte*) prepareMEM::mem#4 ← (byte*) mulFACbyMEM::mem#2
  //SEG149 [75] call prepareMEM 
  //SEG150 [67] phi from mulFACbyMEM to prepareMEM [phi:mulFACbyMEM->prepareMEM]
  //SEG151 [67] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#4 [phi:mulFACbyMEM->prepareMEM#0] -- register_copy 
    jsr prepareMEM
  //SEG152 mulFACbyMEM::@1
  //SEG153 asm { lda$fe ldy$ff jsr$ba28  }
    lda $fe
    ldy $ff
    jsr $ba28
  //SEG154 mulFACbyMEM::@return
  //SEG155 [77] return 
    rts
}
//SEG156 sinFAC
// FAC = sin(FAC)
// Set FAC to sinus of the FAC - sin(FAC)
// Sinus is calculated on radians (0-2*PI)
sinFAC: {
  //SEG157 asm { jsr$e26b  }
    jsr $e26b
  //SEG158 sinFAC::@return
  //SEG159 [79] return 
    rts
}
//SEG160 divMEMbyFAC
// FAC = MEM/FAC
// Set FAC to MEM (float saved in memory) divided by FAC (float accumulator)
// Reads 5 bytes from memory
divMEMbyFAC: {
  //SEG161 [81] call prepareMEM 
  //SEG162 [67] phi from divMEMbyFAC to prepareMEM [phi:divMEMbyFAC->prepareMEM]
  //SEG163 [67] phi (byte*) prepareMEM::mem#5 = (const byte[]) main::f_i#0 [phi:divMEMbyFAC->prepareMEM#0] -- pbuz1=pbuc1 
    lda #<main.f_i
    sta prepareMEM.mem
    lda #>main.f_i
    sta prepareMEM.mem+1
    jsr prepareMEM
  //SEG164 divMEMbyFAC::@1
  //SEG165 asm { lda$fe ldy$ff jsr$bb0f  }
    lda $fe
    ldy $ff
    jsr $bb0f
  //SEG166 divMEMbyFAC::@return
  //SEG167 [83] return 
    rts
}
//SEG168 setFAC
// FAC = word
// Set the FAC (floating point accumulator) to the integer value of a 16bit word
// setFAC(word zeropage(7) w)
setFAC: {
    .label w = 7
  //SEG169 [85] (byte*~) prepareMEM::mem#7 ← (byte*)(word) setFAC::w#3
  //SEG170 [86] call prepareMEM 
  //SEG171 [67] phi from setFAC to prepareMEM [phi:setFAC->prepareMEM]
  //SEG172 [67] phi (byte*) prepareMEM::mem#5 = (byte*~) prepareMEM::mem#7 [phi:setFAC->prepareMEM#0] -- register_copy 
    jsr prepareMEM
  //SEG173 setFAC::@1
  //SEG174 asm { ldy$fe lda$ff jsr$b391  }
    // Load word register Y,A into FAC (floating point accumulator)
    ldy $fe
    lda $ff
    jsr $b391
  //SEG175 setFAC::@return
  //SEG176 [88] return 
    rts
}
//SEG177 setMEMtoFAC
// MEM = FAC
// Stores the value of the FAC to memory
// Stores 5 bytes (means it is necessary to allocate 5 bytes to avoid clobbering other data using eg. byte[] mem = {0, 0, 0, 0, 0};)
// setMEMtoFAC(byte* zeropage(7) mem)
setMEMtoFAC: {
    .label mem = 7
  //SEG178 [90] (byte*) prepareMEM::mem#1 ← (byte*) setMEMtoFAC::mem#2
  //SEG179 [91] call prepareMEM 
  //SEG180 [67] phi from setMEMtoFAC to prepareMEM [phi:setMEMtoFAC->prepareMEM]
  //SEG181 [67] phi (byte*) prepareMEM::mem#5 = (byte*) prepareMEM::mem#1 [phi:setMEMtoFAC->prepareMEM#0] -- register_copy 
    jsr prepareMEM
  //SEG182 setMEMtoFAC::@1
  //SEG183 asm { ldx$fe ldy$ff jsr$bbd4  }
    ldx $fe
    ldy $ff
    jsr $bbd4
  //SEG184 setMEMtoFAC::@return
  //SEG185 [93] return 
    rts
}
//SEG186 divFACby10
// FAC = FAC/10
// Set FAC to FAC divided by 10
divFACby10: {
  //SEG187 asm { jsr$bafe  }
    jsr $bafe
  //SEG188 divFACby10::@return
  //SEG189 [95] return 
    rts
}
  print_hextab: .text "0123456789abcdef"

