Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean condition *((byte*) strlen::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_at::str)
Warning! Adding boolean cast to non-boolean sub-expression (byte) print_str_lines::ch
Identified constant variable (byte*) HEAP_TOP
Identified constant variable (byte*) RASTER
Identified constant variable (byte*) BORDERCOL
Identified constant variable (byte*) SCREEN
Identified constant variable (word) main::a
Identified constant variable (word) main::b
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) @11
Culled Empty Block (label) @12
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) @16
Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) @19
Culled Empty Block (label) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) @23
Culled Empty Block (label) @24
Culled Empty Block (label) @25
Culled Empty Block (label) @26
Culled Empty Block (label) @27
Culled Empty Block (label) @28
Culled Empty Block (label) @29
Culled Empty Block (label) @30
Culled Empty Block (label) @31
Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
Culled Empty Block (label) @36
Culled Empty Block (label) @37
Culled Empty Block (label) main::@2
Culled Empty Block (label) main::@11
Culled Empty Block (label) main::@3
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@10
Culled Empty Block (label) @38
Culled Empty Block (label) mulf_init::@5
Culled Empty Block (label) mulf_init::@6
Culled Empty Block (label) mulf_init::@8
Culled Empty Block (label) mulf_init::@13
Culled Empty Block (label) mulf_init::@14
Culled Empty Block (label) mulf_init::@16
Culled Empty Block (label) @39
Culled Empty Block (label) mulf16u::@1

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@13
@13: scope:[]  from @begin
  (byte*) print_screen#0 ← (byte*)(number) $400
  (byte*) print_line_cursor#0 ← (byte*) print_screen#0
  (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
  to:@40

(void()) print_word((word) print_word::w)
print_word: scope:[print_word]  from print_dword print_dword::@1
  (byte*) print_char_cursor#34 ← phi( print_dword/(byte*) print_char_cursor#35 print_dword::@1/(byte*) print_char_cursor#4 )
  (word) print_word::w#2 ← phi( print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 )
  (byte~) print_word::$0 ← > (word) print_word::w#2
  (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#3 ← phi( print_word/(word) print_word::w#2 )
  (byte*) print_char_cursor#18 ← phi( print_word/(byte*) print_char_cursor#9 )
  (byte*) print_char_cursor#1 ← (byte*) print_char_cursor#18
  (byte~) print_word::$2 ← < (word) print_word::w#3
  (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#19 ← phi( print_word::@1/(byte*) print_char_cursor#9 )
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#19
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@2
  (byte*) print_char_cursor#20 ← phi( print_word::@2/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#20
  return 
  to:@return

(void()) print_dword((dword) print_dword::dw)
print_dword: scope:[print_dword]  from main::@14
  (byte*) print_char_cursor#35 ← phi( main::@14/(byte*) print_char_cursor#37 )
  (dword) print_dword::dw#1 ← phi( main::@14/(dword) print_dword::dw#0 )
  (word~) print_dword::$0 ← > (dword) print_dword::dw#1
  (word) print_word::w#0 ← (word~) print_dword::$0
  call print_word 
  to:print_dword::@1
print_dword::@1: scope:[print_dword]  from print_dword
  (dword) print_dword::dw#2 ← phi( print_dword/(dword) print_dword::dw#1 )
  (byte*) print_char_cursor#21 ← phi( print_dword/(byte*) print_char_cursor#3 )
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#21
  (word~) print_dword::$2 ← < (dword) print_dword::dw#2
  (word) print_word::w#1 ← (word~) print_dword::$2
  call print_word 
  to:print_dword::@2
print_dword::@2: scope:[print_dword]  from print_dword::@1
  (byte*) print_char_cursor#22 ← phi( print_dword::@1/(byte*) print_char_cursor#3 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#22
  to:print_dword::@return
print_dword::@return: scope:[print_dword]  from print_dword::@2
  (byte*) print_char_cursor#23 ← phi( print_dword::@2/(byte*) print_char_cursor#5 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#23
  return 
  to:@return

(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte]  from print_word print_word::@1
  (byte*) print_char_cursor#36 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#1 )
  (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
  (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 )
  (byte*) print_char_cursor#24 ← phi( print_byte/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#24
  (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
  (byte) print_char::ch#1 ← *((const byte*) print_hextab + (number~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#25 ← phi( print_byte::@1/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#25
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#26 ← phi( print_byte::@2/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#26
  return 
  to:@return

(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char]  from print_byte print_byte::@1
  (byte*) print_char_cursor#27 ← phi( print_byte/(byte*) print_char_cursor#36 print_byte::@1/(byte*) print_char_cursor#7 )
  (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#27) ← (byte) print_char::ch#2
  (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#27
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#28 ← phi( print_char/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#28
  return 
  to:@return

(void()) print_set_screen((byte*) print_set_screen::screen)
print_set_screen: scope:[print_set_screen]  from main::@15
  (byte*) print_set_screen::screen#1 ← phi( main::@15/(byte*) print_set_screen::screen#0 )
  (byte*) print_screen#1 ← (byte*) print_set_screen::screen#1
  (byte*) print_line_cursor#1 ← (byte*) print_screen#1
  (byte*) print_char_cursor#12 ← (byte*) print_line_cursor#1
  to:print_set_screen::@return
print_set_screen::@return: scope:[print_set_screen]  from print_set_screen
  (byte*) print_char_cursor#29 ← phi( print_set_screen/(byte*) print_char_cursor#12 )
  (byte*) print_line_cursor#6 ← phi( print_set_screen/(byte*) print_line_cursor#1 )
  (byte*) print_screen#6 ← phi( print_set_screen/(byte*) print_screen#1 )
  (byte*) print_screen#2 ← (byte*) print_screen#6
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#6
  (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#29
  return 
  to:@return

(void()) main()
main: scope:[main]  from @40
  (byte*) print_line_cursor#15 ← phi( @40/(byte*) print_line_cursor#12 )
  (byte*) print_screen#15 ← phi( @40/(byte*) print_screen#12 )
  (byte*) print_char_cursor#42 ← phi( @40/(byte*) print_char_cursor#39 )
  call mulf_init 
  to:main::@13
main::@13: scope:[main]  from main
  (byte*) print_line_cursor#13 ← phi( main/(byte*) print_line_cursor#15 )
  (byte*) print_screen#13 ← phi( main/(byte*) print_screen#15 )
  (byte*) print_char_cursor#40 ← phi( main/(byte*) print_char_cursor#42 )
  asm { sei  }
  to:main::@1
main::@1: scope:[main]  from main::@13 main::@16
  (byte*) print_line_cursor#11 ← phi( main::@13/(byte*) print_line_cursor#13 main::@16/(byte*) print_line_cursor#3 )
  (byte*) print_screen#11 ← phi( main::@13/(byte*) print_screen#13 main::@16/(byte*) print_screen#3 )
  (byte*) print_char_cursor#38 ← phi( main::@13/(byte*) print_char_cursor#40 main::@16/(byte*) print_char_cursor#15 )
  if(true) goto main::@4
  to:main::@return
main::@4: scope:[main]  from main::@1 main::@4
  (byte*) print_line_cursor#17 ← phi( main::@1/(byte*) print_line_cursor#11 main::@4/(byte*) print_line_cursor#17 )
  (byte*) print_screen#17 ← phi( main::@1/(byte*) print_screen#11 main::@4/(byte*) print_screen#17 )
  (byte*) print_char_cursor#43 ← phi( main::@1/(byte*) print_char_cursor#38 main::@4/(byte*) print_char_cursor#43 )
  (bool~) main::$1 ← *((const byte*) RASTER) != (number) $ff
  if((bool~) main::$1) goto main::@4
  to:main::@6
main::@6: scope:[main]  from main::@4
  (byte*) print_line_cursor#16 ← phi( main::@4/(byte*) print_line_cursor#17 )
  (byte*) print_screen#16 ← phi( main::@4/(byte*) print_screen#17 )
  (byte*) print_char_cursor#41 ← phi( main::@4/(byte*) print_char_cursor#43 )
  *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL)
  (word) mulf16u::a#0 ← (const word) main::a
  (word) mulf16u::b#0 ← (const word) main::b
  call mulf16u 
  (dword) mulf16u::return#0 ← (dword) mulf16u::return#2
  to:main::@14
main::@14: scope:[main]  from main::@6
  (byte*) print_line_cursor#14 ← phi( main::@6/(byte*) print_line_cursor#16 )
  (byte*) print_screen#14 ← phi( main::@6/(byte*) print_screen#16 )
  (byte*) print_char_cursor#37 ← phi( main::@6/(byte*) print_char_cursor#41 )
  (dword) mulf16u::return#3 ← phi( main::@6/(dword) mulf16u::return#0 )
  (dword~) main::$3 ← (dword) mulf16u::return#3
  (dword) main::r#0 ← (dword~) main::$3
  *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL)
  (dword) print_dword::dw#0 ← (dword) main::r#0
  call print_dword 
  to:main::@15
main::@15: scope:[main]  from main::@14
  (byte*) print_line_cursor#10 ← phi( main::@14/(byte*) print_line_cursor#14 )
  (byte*) print_screen#10 ← phi( main::@14/(byte*) print_screen#14 )
  (byte*) print_char_cursor#30 ← phi( main::@14/(byte*) print_char_cursor#6 )
  (byte*) print_char_cursor#14 ← (byte*) print_char_cursor#30
  (byte*) print_set_screen::screen#0 ← (const byte*) SCREEN
  call print_set_screen 
  to:main::@16
main::@16: scope:[main]  from main::@15
  (byte*) print_char_cursor#31 ← phi( main::@15/(byte*) print_char_cursor#13 )
  (byte*) print_line_cursor#7 ← phi( main::@15/(byte*) print_line_cursor#2 )
  (byte*) print_screen#7 ← phi( main::@15/(byte*) print_screen#2 )
  (byte*) print_screen#3 ← (byte*) print_screen#7
  (byte*) print_line_cursor#3 ← (byte*) print_line_cursor#7
  (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#31
  to:main::@1
main::@return: scope:[main]  from main::@1
  (byte*) print_line_cursor#8 ← phi( main::@1/(byte*) print_line_cursor#11 )
  (byte*) print_screen#8 ← phi( main::@1/(byte*) print_screen#11 )
  (byte*) print_char_cursor#32 ← phi( main::@1/(byte*) print_char_cursor#38 )
  (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#32
  (byte*) print_screen#4 ← (byte*) print_screen#8
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#8
  return 
  to:@return

(void()) mulf_init()
mulf_init: scope:[mulf_init]  from main
  (word) mulf_init::sqr#0 ← (word) 0
  (byte) mulf_init::x_2#0 ← (byte) 0
  (byte) mulf_init::c#0 ← (byte) 0
  (byte*) mulf_init::sqr1_hi#0 ← (const byte*) mulf_sqr1_hi+(number) 1
  (byte*) mulf_init::sqr1_lo#0 ← (const byte*) mulf_sqr1_lo+(number) 1
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@4
  (byte) mulf_init::x_2#5 ← phi( mulf_init/(byte) mulf_init::x_2#0 mulf_init::@4/(byte) mulf_init::x_2#2 )
  (byte*) mulf_init::sqr1_hi#5 ← phi( mulf_init/(byte*) mulf_init::sqr1_hi#0 mulf_init::@4/(byte*) mulf_init::sqr1_hi#1 )
  (word) mulf_init::sqr#6 ← phi( mulf_init/(word) mulf_init::sqr#0 mulf_init::@4/(word) mulf_init::sqr#1 )
  (byte) mulf_init::c#3 ← phi( mulf_init/(byte) mulf_init::c#0 mulf_init::@4/(byte) mulf_init::c#4 )
  (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(byte*) mulf_init::sqr1_lo#0 mulf_init::@4/(byte*) mulf_init::sqr1_lo#1 )
  (bool~) mulf_init::$0 ← (byte*) mulf_init::sqr1_lo#2 != (const byte*) mulf_sqr1_lo+(number) $200
  if((bool~) mulf_init::$0) goto mulf_init::@2
  to:mulf_init::@3
mulf_init::@2: scope:[mulf_init]  from mulf_init::@1
  (byte) mulf_init::x_2#4 ← phi( mulf_init::@1/(byte) mulf_init::x_2#5 )
  (byte*) mulf_init::sqr1_hi#3 ← phi( mulf_init::@1/(byte*) mulf_init::sqr1_hi#5 )
  (byte*) mulf_init::sqr1_lo#4 ← phi( mulf_init::@1/(byte*) mulf_init::sqr1_lo#2 )
  (word) mulf_init::sqr#5 ← phi( mulf_init::@1/(word) mulf_init::sqr#6 )
  (byte) mulf_init::c#2 ← phi( mulf_init::@1/(byte) mulf_init::c#3 )
  (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2
  (number~) mulf_init::$1 ← (byte) mulf_init::c#1 & (number) 1
  (bool~) mulf_init::$2 ← (number~) mulf_init::$1 == (number) 0
  (bool~) mulf_init::$3 ← ! (bool~) mulf_init::$2
  if((bool~) mulf_init::$3) goto mulf_init::@4
  to:mulf_init::@7
mulf_init::@3: scope:[mulf_init]  from mulf_init::@1
  (byte) mulf_init::x_255#0 ← (byte)(number) -1
  (byte) mulf_init::dir#0 ← (byte) $ff
  (byte*) mulf_init::sqr2_hi#0 ← (const byte*) mulf_sqr2_hi
  (byte*) mulf_init::sqr2_lo#0 ← (const byte*) mulf_sqr2_lo
  to:mulf_init::@9
mulf_init::@4: scope:[mulf_init]  from mulf_init::@2 mulf_init::@7
  (byte) mulf_init::c#4 ← phi( mulf_init::@2/(byte) mulf_init::c#1 mulf_init::@7/(byte) mulf_init::c#5 )
  (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#4 mulf_init::@7/(byte) mulf_init::x_2#1 )
  (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init::@2/(byte*) mulf_init::sqr1_hi#3 mulf_init::@7/(byte*) mulf_init::sqr1_hi#4 )
  (byte*) mulf_init::sqr1_lo#3 ← phi( mulf_init::@2/(byte*) mulf_init::sqr1_lo#4 mulf_init::@7/(byte*) mulf_init::sqr1_lo#5 )
  (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#5 mulf_init::@7/(word) mulf_init::sqr#2 )
  (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3
  *((byte*) mulf_init::sqr1_lo#3) ← (byte~) mulf_init::$4
  (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3
  *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5
  (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2
  (word~) mulf_init::$6 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2
  (word) mulf_init::sqr#1 ← (word~) mulf_init::$6
  (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#3
  to:mulf_init::@1
mulf_init::@7: scope:[mulf_init]  from mulf_init::@2
  (byte) mulf_init::c#5 ← phi( mulf_init::@2/(byte) mulf_init::c#1 )
  (byte*) mulf_init::sqr1_hi#4 ← phi( mulf_init::@2/(byte*) mulf_init::sqr1_hi#3 )
  (byte*) mulf_init::sqr1_lo#5 ← phi( mulf_init::@2/(byte*) mulf_init::sqr1_lo#4 )
  (word) mulf_init::sqr#4 ← phi( mulf_init::@2/(word) mulf_init::sqr#5 )
  (byte) mulf_init::x_2#3 ← phi( mulf_init::@2/(byte) mulf_init::x_2#4 )
  (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3
  (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4
  to:mulf_init::@4
mulf_init::@9: scope:[mulf_init]  from mulf_init::@12 mulf_init::@3
  (byte) mulf_init::dir#3 ← phi( mulf_init::@12/(byte) mulf_init::dir#4 mulf_init::@3/(byte) mulf_init::dir#0 )
  (byte*) mulf_init::sqr2_hi#3 ← phi( mulf_init::@12/(byte*) mulf_init::sqr2_hi#4 mulf_init::@3/(byte*) mulf_init::sqr2_hi#0 )
  (byte) mulf_init::x_255#3 ← phi( mulf_init::@12/(byte) mulf_init::x_255#4 mulf_init::@3/(byte) mulf_init::x_255#0 )
  (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@12/(byte*) mulf_init::sqr2_lo#1 mulf_init::@3/(byte*) mulf_init::sqr2_lo#0 )
  (bool~) mulf_init::$7 ← (byte*) mulf_init::sqr2_lo#2 != (const byte*) mulf_sqr2_lo+(number) $1ff
  if((bool~) mulf_init::$7) goto mulf_init::@10
  to:mulf_init::@11
mulf_init::@10: scope:[mulf_init]  from mulf_init::@9
  (byte) mulf_init::dir#2 ← phi( mulf_init::@9/(byte) mulf_init::dir#3 )
  (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@9/(byte*) mulf_init::sqr2_hi#3 )
  (byte*) mulf_init::sqr2_lo#3 ← phi( mulf_init::@9/(byte*) mulf_init::sqr2_lo#2 )
  (byte) mulf_init::x_255#2 ← phi( mulf_init::@9/(byte) mulf_init::x_255#3 )
  *((byte*) mulf_init::sqr2_lo#3) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2)
  *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2)
  (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2
  (byte~) mulf_init::$8 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2
  (byte) mulf_init::x_255#1 ← (byte~) mulf_init::$8
  (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (number) 0
  (bool~) mulf_init::$10 ← ! (bool~) mulf_init::$9
  if((bool~) mulf_init::$10) goto mulf_init::@12
  to:mulf_init::@15
mulf_init::@11: scope:[mulf_init]  from mulf_init::@9
  *((const byte*) mulf_sqr2_lo+(number) $1ff) ← *((const byte*) mulf_sqr1_lo+(number) $100)
  *((const byte*) mulf_sqr2_hi+(number) $1ff) ← *((const byte*) mulf_sqr1_hi+(number) $100)
  to:mulf_init::@return
mulf_init::@12: scope:[mulf_init]  from mulf_init::@10 mulf_init::@15
  (byte) mulf_init::dir#4 ← phi( mulf_init::@10/(byte) mulf_init::dir#2 mulf_init::@15/(byte) mulf_init::dir#1 )
  (byte*) mulf_init::sqr2_hi#4 ← phi( mulf_init::@10/(byte*) mulf_init::sqr2_hi#1 mulf_init::@15/(byte*) mulf_init::sqr2_hi#5 )
  (byte) mulf_init::x_255#4 ← phi( mulf_init::@10/(byte) mulf_init::x_255#1 mulf_init::@15/(byte) mulf_init::x_255#5 )
  (byte*) mulf_init::sqr2_lo#4 ← phi( mulf_init::@10/(byte*) mulf_init::sqr2_lo#3 mulf_init::@15/(byte*) mulf_init::sqr2_lo#5 )
  (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#4
  to:mulf_init::@9
mulf_init::@15: scope:[mulf_init]  from mulf_init::@10
  (byte*) mulf_init::sqr2_hi#5 ← phi( mulf_init::@10/(byte*) mulf_init::sqr2_hi#1 )
  (byte) mulf_init::x_255#5 ← phi( mulf_init::@10/(byte) mulf_init::x_255#1 )
  (byte*) mulf_init::sqr2_lo#5 ← phi( mulf_init::@10/(byte*) mulf_init::sqr2_lo#3 )
  (byte) mulf_init::dir#1 ← (number) 1
  to:mulf_init::@12
mulf_init::@return: scope:[mulf_init]  from mulf_init::@11
  return 
  to:@return

(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
mulf16u: scope:[mulf16u]  from main::@6
  (word) mulf16u::b#1 ← phi( main::@6/(word) mulf16u::b#0 )
  (word) mulf16u::a#1 ← phi( main::@6/(word) mulf16u::a#0 )
  *((const word*) mulf16u::memA) ← (word) mulf16u::a#1
  *((const word*) mulf16u::memB) ← (word) mulf16u::b#1
  asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  }
  (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR)
  to:mulf16u::@return
mulf16u::@return: scope:[mulf16u]  from mulf16u
  (dword) mulf16u::return#4 ← phi( mulf16u/(dword) mulf16u::return#1 )
  (dword) mulf16u::return#2 ← (dword) mulf16u::return#4
  return 
  to:@return
@40: scope:[]  from @13
  (byte*) print_line_cursor#12 ← phi( @13/(byte*) print_line_cursor#0 )
  (byte*) print_screen#12 ← phi( @13/(byte*) print_screen#0 )
  (byte*) print_char_cursor#39 ← phi( @13/(byte*) print_char_cursor#0 )
  call main 
  to:@41
@41: scope:[]  from @40
  (byte*) print_line_cursor#9 ← phi( @40/(byte*) print_line_cursor#4 )
  (byte*) print_screen#9 ← phi( @40/(byte*) print_screen#4 )
  (byte*) print_char_cursor#33 ← phi( @40/(byte*) print_char_cursor#16 )
  (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#33
  (byte*) print_screen#5 ← (byte*) print_screen#9
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#9
  to:@end
@end: scope:[]  from @41

SYMBOL TABLE SSA
(label) @13
(label) @40
(label) @41
(label) @begin
(label) @end
(const byte*) BORDERCOL = (byte*)(number) $d020
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const byte*) RASTER = (byte*)(number) $d012
(const byte*) SCREEN = (byte*)(number) $400
(void()) main()
(bool~) main::$1
(dword~) main::$3
(label) main::@1
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@16
(label) main::@4
(label) main::@6
(label) main::@return
(const word) main::a = (word) $4d2
(const word) main::b = (word) $929
(dword) main::r
(dword) main::r#0
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
(label) mulf16u::@return
(word) mulf16u::a
(word) mulf16u::a#0
(word) mulf16u::a#1
(word) mulf16u::b
(word) mulf16u::b#0
(word) mulf16u::b#1
(const word*) mulf16u::memA = (word*)(number) $f8
(const word*) mulf16u::memB = (word*)(number) $fa
(const dword*) mulf16u::memR = (dword*)(number) $fc
(dword) mulf16u::return
(dword) mulf16u::return#0
(dword) mulf16u::return#1
(dword) mulf16u::return#2
(dword) mulf16u::return#3
(dword) mulf16u::return#4
(void()) mulf_init()
(bool~) mulf_init::$0
(number~) mulf_init::$1
(bool~) mulf_init::$10
(bool~) mulf_init::$2
(bool~) mulf_init::$3
(byte~) mulf_init::$4
(byte~) mulf_init::$5
(word~) mulf_init::$6
(bool~) mulf_init::$7
(byte~) mulf_init::$8
(bool~) mulf_init::$9
(label) mulf_init::@1
(label) mulf_init::@10
(label) mulf_init::@11
(label) mulf_init::@12
(label) mulf_init::@15
(label) mulf_init::@2
(label) mulf_init::@3
(label) mulf_init::@4
(label) mulf_init::@7
(label) mulf_init::@9
(label) mulf_init::@return
(byte) mulf_init::c
(byte) mulf_init::c#0
(byte) mulf_init::c#1
(byte) mulf_init::c#2
(byte) mulf_init::c#3
(byte) mulf_init::c#4
(byte) mulf_init::c#5
(byte) mulf_init::dir
(byte) mulf_init::dir#0
(byte) mulf_init::dir#1
(byte) mulf_init::dir#2
(byte) mulf_init::dir#3
(byte) mulf_init::dir#4
(word) mulf_init::sqr
(word) mulf_init::sqr#0
(word) mulf_init::sqr#1
(word) mulf_init::sqr#2
(word) mulf_init::sqr#3
(word) mulf_init::sqr#4
(word) mulf_init::sqr#5
(word) mulf_init::sqr#6
(byte*) mulf_init::sqr1_hi
(byte*) mulf_init::sqr1_hi#0
(byte*) mulf_init::sqr1_hi#1
(byte*) mulf_init::sqr1_hi#2
(byte*) mulf_init::sqr1_hi#3
(byte*) mulf_init::sqr1_hi#4
(byte*) mulf_init::sqr1_hi#5
(byte*) mulf_init::sqr1_lo
(byte*) mulf_init::sqr1_lo#0
(byte*) mulf_init::sqr1_lo#1
(byte*) mulf_init::sqr1_lo#2
(byte*) mulf_init::sqr1_lo#3
(byte*) mulf_init::sqr1_lo#4
(byte*) mulf_init::sqr1_lo#5
(byte*) mulf_init::sqr2_hi
(byte*) mulf_init::sqr2_hi#0
(byte*) mulf_init::sqr2_hi#1
(byte*) mulf_init::sqr2_hi#2
(byte*) mulf_init::sqr2_hi#3
(byte*) mulf_init::sqr2_hi#4
(byte*) mulf_init::sqr2_hi#5
(byte*) mulf_init::sqr2_lo
(byte*) mulf_init::sqr2_lo#0
(byte*) mulf_init::sqr2_lo#1
(byte*) mulf_init::sqr2_lo#2
(byte*) mulf_init::sqr2_lo#3
(byte*) mulf_init::sqr2_lo#4
(byte*) mulf_init::sqr2_lo#5
(byte) mulf_init::x_2
(byte) mulf_init::x_2#0
(byte) mulf_init::x_2#1
(byte) mulf_init::x_2#2
(byte) mulf_init::x_2#3
(byte) mulf_init::x_2#4
(byte) mulf_init::x_2#5
(byte) mulf_init::x_255
(byte) mulf_init::x_255#0
(byte) mulf_init::x_255#1
(byte) mulf_init::x_255#2
(byte) mulf_init::x_255#3
(byte) mulf_init::x_255#4
(byte) mulf_init::x_255#5
(const byte*) mulf_sqr1_hi[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr1_lo[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr2_hi[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr2_lo[(number) $200]  = { fill( $200, 0) }
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0
(number~) print_byte::$2
(label) print_byte::@1
(label) print_byte::@2
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0
(byte) print_byte::b#1
(byte) print_byte::b#2
(byte) print_byte::b#3
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0
(byte) print_char::ch#1
(byte) print_char::ch#2
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#40
(byte*) print_char_cursor#41
(byte*) print_char_cursor#42
(byte*) print_char_cursor#43
(byte*) print_char_cursor#5
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(void()) print_dword((dword) print_dword::dw)
(word~) print_dword::$0
(word~) print_dword::$2
(label) print_dword::@1
(label) print_dword::@2
(label) print_dword::@return
(dword) print_dword::dw
(dword) print_dword::dw#0
(dword) print_dword::dw#1
(dword) print_dword::dw#2
(const byte*) print_hextab[]  = (string) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#2
(byte*) print_line_cursor#3
(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
(byte*) print_screen
(byte*) print_screen#0
(byte*) print_screen#1
(byte*) print_screen#10
(byte*) print_screen#11
(byte*) print_screen#12
(byte*) print_screen#13
(byte*) print_screen#14
(byte*) print_screen#15
(byte*) print_screen#16
(byte*) print_screen#17
(byte*) print_screen#2
(byte*) print_screen#3
(byte*) print_screen#4
(byte*) print_screen#5
(byte*) print_screen#6
(byte*) print_screen#7
(byte*) print_screen#8
(byte*) print_screen#9
(void()) print_set_screen((byte*) print_set_screen::screen)
(label) print_set_screen::@return
(byte*) print_set_screen::screen
(byte*) print_set_screen::screen#0
(byte*) print_set_screen::screen#1
(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
(word) print_word::w#3

Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (unumber)(number) $f
Adding number conversion cast (unumber) $ff in (bool~) main::$1 ← *((const byte*) RASTER) != (number) $ff
Adding number conversion cast (unumber) 1 in (byte*) mulf_init::sqr1_hi#0 ← (const byte*) mulf_sqr1_hi+(number) 1
Adding number conversion cast (unumber) 1 in (byte*) mulf_init::sqr1_lo#0 ← (const byte*) mulf_sqr1_lo+(number) 1
Adding number conversion cast (unumber) $200 in (bool~) mulf_init::$0 ← (byte*) mulf_init::sqr1_lo#2 != (const byte*) mulf_sqr1_lo+(number) $200
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$1 ← (byte) mulf_init::c#1 & (number) 1
Adding number conversion cast (unumber) mulf_init::$1 in (number~) mulf_init::$1 ← (byte) mulf_init::c#1 & (unumber)(number) 1
Adding number conversion cast (unumber) 0 in (bool~) mulf_init::$2 ← (unumber~) mulf_init::$1 == (number) 0
Adding number conversion cast (unumber) $1ff in (bool~) mulf_init::$7 ← (byte*) mulf_init::sqr2_lo#2 != (const byte*) mulf_sqr2_lo+(number) $1ff
Adding number conversion cast (unumber) 0 in (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (number) 0
Adding number conversion cast (unumber) $100 in *((const byte*) mulf_sqr2_lo+(number) $1ff) ← *((const byte*) mulf_sqr1_lo+(number) $100)
Adding number conversion cast (unumber) $1ff in *((const byte*) mulf_sqr2_lo+(number) $1ff) ← *((const byte*) mulf_sqr1_lo+(unumber)(number) $100)
Adding number conversion cast (unumber) $100 in *((const byte*) mulf_sqr2_hi+(number) $1ff) ← *((const byte*) mulf_sqr1_hi+(number) $100)
Adding number conversion cast (unumber) $1ff in *((const byte*) mulf_sqr2_hi+(number) $1ff) ← *((const byte*) mulf_sqr1_hi+(unumber)(number) $100)
Adding number conversion cast (unumber) 1 in (byte) mulf_init::dir#1 ← (number) 1
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte) mulf_init::dir#1 ← (unumber)(number) 1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (word*) 248
Simplifying constant pointer cast (word*) 250
Simplifying constant pointer cast (dword*) 252
Simplifying constant pointer cast (byte*) 53266
Simplifying constant pointer cast (byte*) 53280
Simplifying constant pointer cast (byte*) 1024
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $ff
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $200
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast -1
Simplifying constant integer cast $1ff
Simplifying constant integer cast 0
Simplifying constant integer cast $100
Simplifying constant integer cast $1ff
Simplifying constant integer cast $100
Simplifying constant integer cast $1ff
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (byte) $ff
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $200
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $1ff
Finalized unsigned number type (byte) 0
Finalized unsigned number type (word) $100
Finalized unsigned number type (word) $1ff
Finalized unsigned number type (word) $100
Finalized unsigned number type (word) $1ff
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f
Inferred type updated to byte in (unumber~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1
Inversing boolean not [106] (bool~) mulf_init::$3 ← (byte~) mulf_init::$1 != (byte) 0 from [105] (bool~) mulf_init::$2 ← (byte~) mulf_init::$1 == (byte) 0
Inversing boolean not [134] (bool~) mulf_init::$10 ← (byte) mulf_init::x_255#1 != (byte) 0 from [133] (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#39 (byte*) print_screen#12 (byte*) print_line_cursor#12 
Alias (byte) print_byte::b#0 = (byte~) print_word::$0 
Alias (word) print_word::w#2 = (word) print_word::w#3 
Alias (byte*) print_char_cursor#1 = (byte*) print_char_cursor#18 
Alias (byte) print_byte::b#1 = (byte~) print_word::$2 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#2 (byte*) print_char_cursor#20 (byte*) print_char_cursor#3 
Alias (word) print_word::w#0 = (word~) print_dword::$0 
Alias (dword) print_dword::dw#1 = (dword) print_dword::dw#2 
Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#4 
Alias (word) print_word::w#1 = (word~) print_dword::$2 
Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#5 (byte*) print_char_cursor#23 (byte*) print_char_cursor#6 
Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 
Alias (byte*) print_char_cursor#24 = (byte*) print_char_cursor#7 
Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#8 (byte*) print_char_cursor#26 (byte*) print_char_cursor#9 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#28 (byte*) print_char_cursor#11 
Alias (byte*) print_screen#1 = (byte*) print_line_cursor#1 (byte*) print_char_cursor#12 (byte*) print_screen#6 (byte*) print_line_cursor#6 (byte*) print_char_cursor#29 (byte*) print_screen#2 (byte*) print_line_cursor#2 (byte*) print_char_cursor#13 
Alias (byte*) print_char_cursor#40 = (byte*) print_char_cursor#42 
Alias (byte*) print_screen#13 = (byte*) print_screen#15 
Alias (byte*) print_line_cursor#13 = (byte*) print_line_cursor#15 
Alias (byte*) print_char_cursor#37 = (byte*) print_char_cursor#41 (byte*) print_char_cursor#43 
Alias (byte*) print_screen#10 = (byte*) print_screen#16 (byte*) print_screen#17 (byte*) print_screen#14 
Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#16 (byte*) print_line_cursor#17 (byte*) print_line_cursor#14 
Alias (dword) mulf16u::return#0 = (dword) mulf16u::return#3 
Alias (dword) main::r#0 = (dword~) main::$3 
Alias (byte*) print_char_cursor#14 = (byte*) print_char_cursor#30 
Alias (byte*) print_screen#3 = (byte*) print_screen#7 
Alias (byte*) print_line_cursor#3 = (byte*) print_line_cursor#7 
Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#31 
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#32 (byte*) print_char_cursor#38 
Alias (byte*) print_screen#11 = (byte*) print_screen#8 (byte*) print_screen#4 
Alias (byte*) print_line_cursor#11 = (byte*) print_line_cursor#8 (byte*) print_line_cursor#4 
Alias (byte) mulf_init::c#2 = (byte) mulf_init::c#3 
Alias (word) mulf_init::sqr#4 = (word) mulf_init::sqr#5 (word) mulf_init::sqr#6 
Alias (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#4 (byte*) mulf_init::sqr1_lo#5 
Alias (byte*) mulf_init::sqr1_hi#3 = (byte*) mulf_init::sqr1_hi#5 (byte*) mulf_init::sqr1_hi#4 
Alias (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#4 (byte) mulf_init::x_2#5 
Alias (word) mulf_init::sqr#1 = (word~) mulf_init::$6 
Alias (byte) mulf_init::c#1 = (byte) mulf_init::c#5 
Alias (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#3 
Alias (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#3 (byte*) mulf_init::sqr2_lo#5 
Alias (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#3 
Alias (byte) mulf_init::dir#2 = (byte) mulf_init::dir#3 
Alias (byte) mulf_init::x_255#1 = (byte~) mulf_init::$8 (byte) mulf_init::x_255#5 
Alias (byte*) mulf_init::sqr2_hi#1 = (byte*) mulf_init::sqr2_hi#5 
Alias (dword) mulf16u::return#1 = (dword) mulf16u::return#4 (dword) mulf16u::return#2 
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#33 
Alias (byte*) print_screen#5 = (byte*) print_screen#9 
Alias (byte*) print_line_cursor#5 = (byte*) print_line_cursor#9 
Successful SSA optimization Pass2AliasElimination
Alias (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#3 
Alias (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#3 
Alias (byte) mulf_init::c#1 = (byte) mulf_init::c#4 
Alias (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#4 
Alias (byte) mulf_init::x_255#1 = (byte) mulf_init::x_255#4 
Alias (byte*) mulf_init::sqr2_hi#1 = (byte*) mulf_init::sqr2_hi#4 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) print_char_cursor#1 (byte*) print_char_cursor#25
Identical Phi Values (byte*) print_char_cursor#19 (byte*) print_char_cursor#25
Identical Phi Values (dword) print_dword::dw#1 (dword) print_dword::dw#0
Identical Phi Values (byte*) print_char_cursor#35 (byte*) print_char_cursor#37
Identical Phi Values (byte*) print_char_cursor#21 (byte*) print_char_cursor#19
Identical Phi Values (byte*) print_char_cursor#22 (byte*) print_char_cursor#19
Identical Phi Values (byte*) print_char_cursor#24 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_char_cursor#25 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_set_screen::screen#1 (byte*) print_set_screen::screen#0
Identical Phi Values (byte*) print_char_cursor#40 (byte*) print_char_cursor#0
Identical Phi Values (byte*) print_screen#13 (byte*) print_char_cursor#0
Identical Phi Values (byte*) print_line_cursor#13 (byte*) print_char_cursor#0
Identical Phi Values (byte*) print_char_cursor#37 (byte*) print_char_cursor#16
Identical Phi Values (byte*) print_screen#10 (byte*) print_screen#11
Identical Phi Values (byte*) print_line_cursor#10 (byte*) print_line_cursor#11
Identical Phi Values (byte*) print_char_cursor#14 (byte*) print_char_cursor#22
Identical Phi Values (byte*) print_screen#3 (byte*) print_screen#1
Identical Phi Values (byte*) print_line_cursor#3 (byte*) print_screen#1
Identical Phi Values (byte*) print_char_cursor#15 (byte*) print_screen#1
Identical Phi Values (word) mulf16u::a#1 (word) mulf16u::a#0
Identical Phi Values (word) mulf16u::b#1 (word) mulf16u::b#0
Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_char_cursor#16
Identical Phi Values (byte*) print_screen#5 (byte*) print_screen#11
Identical Phi Values (byte*) print_line_cursor#5 (byte*) print_line_cursor#11
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) main::$1 [68] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4
Simple Condition (bool~) mulf_init::$0 [101] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2
Simple Condition (bool~) mulf_init::$3 [107] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4
Simple Condition (bool~) mulf_init::$7 [126] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10
Simple Condition (bool~) mulf_init::$10 [135] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) print_char_cursor#0 = (byte*) 1024
Constant (const word) mulf16u::a#0 = main::a
Constant (const word) mulf16u::b#0 = main::b
Constant (const byte*) print_set_screen::screen#0 = SCREEN
Constant (const word) mulf_init::sqr#0 = 0
Constant (const byte) mulf_init::x_2#0 = 0
Constant (const byte) mulf_init::c#0 = 0
Constant (const byte*) mulf_init::sqr1_hi#0 = mulf_sqr1_hi+1
Constant (const byte*) mulf_init::sqr1_lo#0 = mulf_sqr1_lo+1
Constant (const byte) mulf_init::x_255#0 = -1
Constant (const byte) mulf_init::dir#0 = $ff
Constant (const byte*) mulf_init::sqr2_hi#0 = mulf_sqr2_hi
Constant (const byte*) mulf_init::sqr2_lo#0 = mulf_sqr2_lo
Constant (const byte) mulf_init::dir#1 = 1
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) print_screen#1 = print_set_screen::screen#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [65] if(true) goto main::@4
Successful SSA optimization Pass2ConstantIfs
Eliminating unused variable - keeping the phi block (byte*) print_screen#11
Eliminating unused variable - keeping the phi block (byte*) print_line_cursor#11
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Inlining constant with var siblings (const word) mulf_init::sqr#0
Inlining constant with var siblings (const byte) mulf_init::x_2#0
Inlining constant with var siblings (const byte) mulf_init::c#0
Inlining constant with var siblings (const byte*) mulf_init::sqr1_hi#0
Inlining constant with var siblings (const byte*) mulf_init::sqr1_lo#0
Inlining constant with var siblings (const byte) mulf_init::x_255#0
Inlining constant with var siblings (const byte) mulf_init::dir#0
Inlining constant with var siblings (const byte*) mulf_init::sqr2_hi#0
Inlining constant with var siblings (const byte*) mulf_init::sqr2_lo#0
Inlining constant with var siblings (const byte) mulf_init::dir#1
Inlining constant with var siblings (const byte*) print_char_cursor#0
Constant inlined mulf_init::c#0 = (byte) 0
Constant inlined mulf_init::sqr2_lo#0 = (const byte*) mulf_sqr2_lo
Constant inlined mulf_init::sqr#0 = (word) 0
Constant inlined mulf16u::b#0 = (const word) main::b
Constant inlined mulf_init::sqr2_hi#0 = (const byte*) mulf_sqr2_hi
Constant inlined mulf16u::a#0 = (const word) main::a
Constant inlined print_screen#1 = (const byte*) SCREEN
Constant inlined mulf_init::dir#1 = (byte) 1
Constant inlined print_char_cursor#0 = (byte*) 1024
Constant inlined mulf_init::dir#0 = (byte) $ff
Constant inlined mulf_init::sqr1_hi#0 = (const byte*) mulf_sqr1_hi+(byte) 1
Constant inlined print_set_screen::screen#0 = (const byte*) SCREEN
Constant inlined mulf_init::sqr1_lo#0 = (const byte*) mulf_sqr1_lo+(byte) 1
Constant inlined mulf_init::x_255#0 = (byte) -1
Constant inlined mulf_init::x_2#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting mulf_init::@17(between mulf_init::@2 and mulf_init::@4)
Added new block during phi lifting mulf_init::@18(between mulf_init::@10 and mulf_init::@12)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @13
Adding NOP phi() at start of @40
Adding NOP phi() at start of @41
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@15
Adding NOP phi() at start of main::@16
Adding NOP phi() at start of print_set_screen
Adding NOP phi() at start of print_dword::@2
Adding NOP phi() at start of print_word::@2
Adding NOP phi() at start of print_byte::@2
Adding NOP phi() at start of mulf_init
Adding NOP phi() at start of mulf_init::@3
Adding NOP phi() at start of mulf_init::@15
CALL GRAPH
Calls in [] to main:3 
Calls in [main] to mulf_init:7 mulf16u:12 print_dword:17 print_set_screen:19 
Calls in [print_dword] to print_word:26 print_word:30 
Calls in [print_word] to print_byte:37 print_byte:41 
Calls in [print_byte] to print_char:49 print_char:54 

Created 19 initial phi equivalence classes
Coalesced [24] print_word::w#4 ← print_word::w#0
Coalesced [25] print_char_cursor#44 ← print_char_cursor#16
Coalesced [28] print_word::w#5 ← print_word::w#1
Coalesced [29] print_char_cursor#45 ← print_char_cursor#10
Coalesced [35] print_byte::b#4 ← print_byte::b#0
Coalesced [36] print_char_cursor#46 ← print_char_cursor#34
Coalesced [39] print_byte::b#5 ← print_byte::b#1
Coalesced (already) [40] print_char_cursor#47 ← print_char_cursor#10
Coalesced [47] print_char::ch#3 ← print_char::ch#0
Coalesced [48] print_char_cursor#48 ← print_char_cursor#36
Coalesced [52] print_char::ch#4 ← print_char::ch#1
Coalesced (already) [53] print_char_cursor#49 ← print_char_cursor#10
Coalesced [83] mulf_init::sqr2_lo#6 ← mulf_init::sqr2_lo#1
Coalesced [84] mulf_init::x_255#6 ← mulf_init::x_255#1
Coalesced [85] mulf_init::sqr2_hi#6 ← mulf_init::sqr2_hi#1
Coalesced [86] mulf_init::dir#5 ← mulf_init::dir#4
Coalesced (already) [87] mulf_init::dir#6 ← mulf_init::dir#2
Coalesced [93] mulf_init::sqr#9 ← mulf_init::sqr#2
Coalesced [94] mulf_init::x_2#8 ← mulf_init::x_2#1
Coalesced [103] mulf_init::sqr1_lo#6 ← mulf_init::sqr1_lo#1
Coalesced [104] mulf_init::c#6 ← mulf_init::c#1
Coalesced [105] mulf_init::sqr#7 ← mulf_init::sqr#1
Coalesced [106] mulf_init::sqr1_hi#6 ← mulf_init::sqr1_hi#1
Coalesced [107] mulf_init::x_2#6 ← mulf_init::x_2#2
Coalesced [108] mulf_init::sqr#8 ← mulf_init::sqr#4
Coalesced (already) [109] mulf_init::x_2#7 ← mulf_init::x_2#3
Coalesced down to 13 phi equivalence classes
Culled Empty Block (label) @13
Culled Empty Block (label) @41
Culled Empty Block (label) main::@16
Culled Empty Block (label) print_dword::@2
Culled Empty Block (label) print_word::@2
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) mulf_init::@3
Culled Empty Block (label) mulf_init::@15
Culled Empty Block (label) mulf_init::@17
Renumbering block @40 to @1
Renumbering block main::@4 to main::@2
Renumbering block main::@6 to main::@3
Renumbering block main::@13 to main::@4
Renumbering block main::@14 to main::@5
Renumbering block main::@15 to main::@6
Renumbering block mulf_init::@4 to mulf_init::@3
Renumbering block mulf_init::@7 to mulf_init::@4
Renumbering block mulf_init::@9 to mulf_init::@5
Renumbering block mulf_init::@10 to mulf_init::@6
Renumbering block mulf_init::@11 to mulf_init::@7
Renumbering block mulf_init::@12 to mulf_init::@8
Renumbering block mulf_init::@18 to mulf_init::@9
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@6
Adding NOP phi() at start of print_set_screen
Adding NOP phi() at start of mulf_init
Adding NOP phi() at start of mulf_init::@9

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()

(void()) main()
main: scope:[main]  from @1
  [4] phi()
  [5] call mulf_init 
  to:main::@4
main::@4: scope:[main]  from main
  asm { sei  }
  to:main::@1
main::@1: scope:[main]  from main::@4 main::@6
  [7] (byte*) print_char_cursor#16 ← phi( main::@4/(byte*) 1024 main::@6/(const byte*) SCREEN )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@2
  [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@2
  [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL)
  [10] call mulf16u 
  [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1
  to:main::@5
main::@5: scope:[main]  from main::@3
  [12] (dword) main::r#0 ← (dword) mulf16u::return#0
  [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL)
  [14] (dword) print_dword::dw#0 ← (dword) main::r#0
  [15] call print_dword 
  to:main::@6
main::@6: scope:[main]  from main::@5
  [16] phi()
  [17] call print_set_screen 
  to:main::@1

(void()) print_set_screen((byte*) print_set_screen::screen)
print_set_screen: scope:[print_set_screen]  from main::@6
  [18] phi()
  to:print_set_screen::@return
print_set_screen::@return: scope:[print_set_screen]  from print_set_screen
  [19] return 
  to:@return

(void()) print_dword((dword) print_dword::dw)
print_dword: scope:[print_dword]  from main::@5
  [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0
  [21] call print_word 
  to:print_dword::@1
print_dword::@1: scope:[print_dword]  from print_dword
  [22] (word) print_word::w#1 ← < (dword) print_dword::dw#0
  [23] call print_word 
  to:print_dword::@return
print_dword::@return: scope:[print_dword]  from print_dword::@1
  [24] return 
  to:@return

(void()) print_word((word) print_word::w)
print_word: scope:[print_word]  from print_dword print_dword::@1
  [25] (byte*) print_char_cursor#34 ← phi( print_dword/(byte*) print_char_cursor#16 print_dword::@1/(byte*) print_char_cursor#10 )
  [25] (word) print_word::w#2 ← phi( print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 )
  [26] (byte) print_byte::b#0 ← > (word) print_word::w#2
  [27] call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  [28] (byte) print_byte::b#1 ← < (word) print_word::w#2
  [29] call print_byte 
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@1
  [30] return 
  to:@return

(void()) print_byte((byte) print_byte::b)
print_byte: scope:[print_byte]  from print_word print_word::@1
  [31] (byte*) print_char_cursor#36 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#10 )
  [31] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4
  [33] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0)
  [34] call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  [35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f
  [36] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2)
  [37] call print_char 
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@1
  [38] return 
  to:@return

(void()) print_char((byte) print_char::ch)
print_char: scope:[print_char]  from print_byte print_byte::@1
  [39] (byte*) print_char_cursor#27 ← phi( print_byte/(byte*) print_char_cursor#36 print_byte::@1/(byte*) print_char_cursor#10 )
  [39] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  [40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2
  [41] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#27
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [42] return 
  to:@return

(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
mulf16u: scope:[mulf16u]  from main::@3
  [43] *((const word*) mulf16u::memA) ← (const word) main::a
  [44] *((const word*) mulf16u::memB) ← (const word) main::b
  asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  }
  [46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR)
  to:mulf16u::@return
mulf16u::@return: scope:[mulf16u]  from mulf16u
  [47] return 
  to:@return

(void()) mulf_init()
mulf_init: scope:[mulf_init]  from main
  [48] phi()
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@3
  [49] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 )
  [49] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 )
  [49] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 )
  [49] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 )
  [49] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 )
  [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2
  to:mulf_init::@5
mulf_init::@5: scope:[mulf_init]  from mulf_init::@1 mulf_init::@8
  [51] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff )
  [51] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi )
  [51] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 )
  [51] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo )
  [52] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6
  to:mulf_init::@7
mulf_init::@7: scope:[mulf_init]  from mulf_init::@5
  [53] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100)
  [54] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100)
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@7
  [55] return 
  to:@return
mulf_init::@6: scope:[mulf_init]  from mulf_init::@5
  [56] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2)
  [57] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2)
  [58] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2
  [59] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2
  [60] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9
  to:mulf_init::@8
mulf_init::@9: scope:[mulf_init]  from mulf_init::@6
  [61] phi()
  to:mulf_init::@8
mulf_init::@8: scope:[mulf_init]  from mulf_init::@6 mulf_init::@9
  [62] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 )
  [63] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2
  to:mulf_init::@5
mulf_init::@2: scope:[mulf_init]  from mulf_init::@1
  [64] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2
  [65] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1
  [66] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3
  to:mulf_init::@4
mulf_init::@4: scope:[mulf_init]  from mulf_init::@2
  [67] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3
  [68] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4
  to:mulf_init::@3
mulf_init::@3: scope:[mulf_init]  from mulf_init::@2 mulf_init::@4
  [69] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 )
  [69] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 )
  [70] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3
  [71] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4
  [72] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3
  [73] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5
  [74] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2
  [75] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2
  [76] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2
  to:mulf_init::@1


VARIABLE REGISTER WEIGHTS
(void()) main()
(dword) main::r
(dword) main::r#0 11.0
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
(word) mulf16u::a
(word) mulf16u::b
(dword) mulf16u::return
(dword) mulf16u::return#0 22.0
(dword) mulf16u::return#1 4.333333333333333
(void()) mulf_init()
(byte~) mulf_init::$1 22.0
(byte~) mulf_init::$4 22.0
(byte~) mulf_init::$5 22.0
(byte) mulf_init::c
(byte) mulf_init::c#1 2.5384615384615383
(byte) mulf_init::c#2 11.0
(byte) mulf_init::dir
(byte) mulf_init::dir#2 4.125
(byte) mulf_init::dir#4 11.0
(word) mulf_init::sqr
(word) mulf_init::sqr#1 11.0
(word) mulf_init::sqr#2 22.0
(word) mulf_init::sqr#3 9.166666666666666
(word) mulf_init::sqr#4 5.5
(byte*) mulf_init::sqr1_hi
(byte*) mulf_init::sqr1_hi#1 7.333333333333333
(byte*) mulf_init::sqr1_hi#2 2.75
(byte*) mulf_init::sqr1_lo
(byte*) mulf_init::sqr1_lo#1 22.0
(byte*) mulf_init::sqr1_lo#2 3.142857142857143
(byte*) mulf_init::sqr2_hi
(byte*) mulf_init::sqr2_hi#1 3.6666666666666665
(byte*) mulf_init::sqr2_hi#2 8.25
(byte*) mulf_init::sqr2_lo
(byte*) mulf_init::sqr2_lo#1 22.0
(byte*) mulf_init::sqr2_lo#2 4.888888888888889
(byte) mulf_init::x_2
(byte) mulf_init::x_2#1 11.0
(byte) mulf_init::x_2#2 5.5
(byte) mulf_init::x_2#3 6.6000000000000005
(byte) mulf_init::x_255
(byte) mulf_init::x_255#1 6.6000000000000005
(byte) mulf_init::x_255#2 8.8
(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 0.6153846153846154
(byte*) print_char_cursor#16 0.2222222222222222
(byte*) print_char_cursor#27 4.0
(byte*) print_char_cursor#34 3.0
(byte*) print_char_cursor#36 2.0
(void()) print_dword((dword) print_dword::dw)
(dword) print_dword::dw
(dword) print_dword::dw#0 5.0
(byte*) print_line_cursor
(byte*) print_screen
(void()) print_set_screen((byte*) print_set_screen::screen)
(byte*) print_set_screen::screen
(void()) print_word((word) print_word::w)
(word) print_word::w
(word) print_word::w#0 4.0
(word) print_word::w#1 4.0
(word) print_word::w#2 2.6666666666666665

Initial phi equivalence classes
[ print_word::w#2 print_word::w#0 print_word::w#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#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ]
[ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ]
[ mulf_init::c#2 mulf_init::c#1 ]
[ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
[ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
[ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
[ mulf_init::x_255#2 mulf_init::x_255#1 ]
[ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
[ mulf_init::dir#2 mulf_init::dir#4 ]
[ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
Added variable mulf16u::return#0 to live range equivalence class [ mulf16u::return#0 ]
Added variable main::r#0 to live range equivalence class [ main::r#0 ]
Added variable print_dword::dw#0 to live range equivalence class [ print_dword::dw#0 ]
Added variable print_byte::$0 to live range equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to live range equivalence class [ print_byte::$2 ]
Added variable mulf16u::return#1 to live range equivalence class [ mulf16u::return#1 ]
Added variable mulf_init::$1 to live range equivalence class [ mulf_init::$1 ]
Added variable mulf_init::$4 to live range equivalence class [ mulf_init::$4 ]
Added variable mulf_init::$5 to live range equivalence class [ mulf_init::$5 ]
Complete equivalence classes
[ print_word::w#2 print_word::w#0 print_word::w#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#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ]
[ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ]
[ mulf_init::c#2 mulf_init::c#1 ]
[ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
[ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
[ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
[ mulf_init::x_255#2 mulf_init::x_255#1 ]
[ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
[ mulf_init::dir#2 mulf_init::dir#4 ]
[ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
[ mulf16u::return#0 ]
[ main::r#0 ]
[ print_dword::dw#0 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
[ mulf16u::return#1 ]
[ mulf_init::$1 ]
[ mulf_init::$4 ]
[ mulf_init::$5 ]
Allocated zp[2]:2 [ print_word::w#2 print_word::w#0 print_word::w#1 ]
Allocated zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp[1]:5 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp[2]:6 [ print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ]
Allocated zp[2]:8 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ]
Allocated zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ]
Allocated zp[2]:11 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
Allocated zp[1]:13 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
Allocated zp[2]:14 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
Allocated zp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Allocated zp[2]:17 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
Allocated zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ]
Allocated zp[2]:20 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
Allocated zp[4]:22 [ mulf16u::return#0 ]
Allocated zp[4]:26 [ main::r#0 ]
Allocated zp[4]:30 [ print_dword::dw#0 ]
Allocated zp[1]:34 [ print_byte::$0 ]
Allocated zp[1]:35 [ print_byte::$2 ]
Allocated zp[4]:36 [ mulf16u::return#1 ]
Allocated zp[1]:40 [ mulf_init::$1 ]
Allocated zp[1]:41 [ mulf_init::$4 ]
Allocated zp[1]:42 [ mulf_init::$5 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label SCREEN = $400
  .label print_char_cursor = 6
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label a = $4d2
    .label b = $929
    .label r = $1a
    // [5] call mulf_init 
    // [48] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp __b4
    // main::@4
  __b4:
    // asm { sei  }
    sei
    // [7] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  __b1_from___b4:
    // [7] phi (byte*) print_char_cursor#16 = (byte*) 1024 [phi:main::@4->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    jmp __b1
    // main::@1
  __b1:
    jmp __b2
    // main::@2
  __b2:
    // [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne __b2
    jmp __b3
    // main::@3
  __b3:
    // [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDERCOL
    // [10] call mulf16u 
    jsr mulf16u
    // [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 -- vduz1=vduz2 
    lda.z mulf16u.return_1
    sta.z mulf16u.return
    lda.z mulf16u.return_1+1
    sta.z mulf16u.return+1
    lda.z mulf16u.return_1+2
    sta.z mulf16u.return+2
    lda.z mulf16u.return_1+3
    sta.z mulf16u.return+3
    jmp __b5
    // main::@5
  __b5:
    // [12] (dword) main::r#0 ← (dword) mulf16u::return#0 -- vduz1=vduz2 
    lda.z mulf16u.return
    sta.z r
    lda.z mulf16u.return+1
    sta.z r+1
    lda.z mulf16u.return+2
    sta.z r+2
    lda.z mulf16u.return+3
    sta.z r+3
    // [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BORDERCOL
    // [14] (dword) print_dword::dw#0 ← (dword) main::r#0 -- vduz1=vduz2 
    lda.z r
    sta.z print_dword.dw
    lda.z r+1
    sta.z print_dword.dw+1
    lda.z r+2
    sta.z print_dword.dw+2
    lda.z r+3
    sta.z print_dword.dw+3
    // [15] call print_dword 
    jsr print_dword
    // [16] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [17] call print_set_screen 
    // [18] phi from main::@6 to print_set_screen [phi:main::@6->print_set_screen]
  print_set_screen_from___b6:
    jsr print_set_screen
    // [7] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [7] phi (byte*) print_char_cursor#16 = (const byte*) SCREEN [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z print_char_cursor
    lda #>SCREEN
    sta.z print_char_cursor+1
    jmp __b1
}
  // print_set_screen
// Set the screen to print on. Also resets current line/char cursor.
print_set_screen: {
    jmp __breturn
    // print_set_screen::@return
  __breturn:
    // [19] return 
    rts
}
  // print_dword
// Print a dword as HEX
// print_dword(dword zp($1e) dw)
print_dword: {
    .label dw = $1e
    // [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 -- vwuz1=_hi_vduz2 
    lda.z dw+2
    sta.z print_word.w
    lda.z dw+3
    sta.z print_word.w+1
    // [21] call print_word 
    // [25] phi from print_dword to print_word [phi:print_dword->print_word]
  print_word_from_print_dword:
    // [25] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#16 [phi:print_dword->print_word#0] -- register_copy 
    // [25] phi (word) print_word::w#2 = (word) print_word::w#0 [phi:print_dword->print_word#1] -- register_copy 
    jsr print_word
    jmp __b1
    // print_dword::@1
  __b1:
    // [22] (word) print_word::w#1 ← < (dword) print_dword::dw#0 -- vwuz1=_lo_vduz2 
    lda.z dw
    sta.z print_word.w
    lda.z dw+1
    sta.z print_word.w+1
    // [23] call print_word 
    // [25] phi from print_dword::@1 to print_word [phi:print_dword::@1->print_word]
  print_word_from___b1:
    // [25] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#10 [phi:print_dword::@1->print_word#0] -- register_copy 
    // [25] phi (word) print_word::w#2 = (word) print_word::w#1 [phi:print_dword::@1->print_word#1] -- register_copy 
    jsr print_word
    jmp __breturn
    // print_dword::@return
  __breturn:
    // [24] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp(2) w)
print_word: {
    .label w = 2
    // [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 -- vbuz1=_hi_vwuz2 
    lda.z w+1
    sta.z print_byte.b
    // [27] call print_byte 
    // [31] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [31] phi (byte*) print_char_cursor#36 = (byte*) print_char_cursor#34 [phi:print_word->print_byte#0] -- register_copy 
    // [31] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __b1
    // print_word::@1
  __b1:
    // [28] (byte) print_byte::b#1 ← < (word) print_word::w#2 -- vbuz1=_lo_vwuz2 
    lda.z w
    sta.z print_byte.b
    // [29] call print_byte 
    // [31] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from___b1:
    // [31] phi (byte*) print_char_cursor#36 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [31] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __breturn
    // print_word::@return
  __breturn:
    // [30] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zp(4) b)
print_byte: {
    .label __0 = $22
    .label __2 = $23
    .label b = 4
    // [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 
    lda.z b
    lsr
    lsr
    lsr
    lsr
    sta.z __0
    // [33] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __0
    lda print_hextab,y
    sta.z print_char.ch
    // [34] call print_char 
    // [39] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [39] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#36 [phi:print_byte->print_char#0] -- register_copy 
    // [39] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_byte::@1
  __b1:
    // [35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and.z b
    sta.z __2
    // [36] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z __2
    lda print_hextab,y
    sta.z print_char.ch
    // [37] call print_char 
    // [39] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from___b1:
    // [39] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [39] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_byte::@return
  __breturn:
    // [38] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte zp(5) ch)
print_char: {
    .label ch = 5
    // [40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2 
    lda.z ch
    ldy #0
    sta (print_char_cursor),y
    // [41] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#27 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [42] return 
    rts
}
  // mulf16u
// Fast multiply two unsigned words to a double word result
// Done in assembler to utilize fast addition A+X
mulf16u: {
    .label memA = $f8
    .label memB = $fa
    .label memR = $fc
    .label return = $16
    .label return_1 = $24
    // [43] *((const word*) mulf16u::memA) ← (const word) main::a -- _deref_pwuc1=vwuc2 
    lda #<main.a
    sta memA
    lda #>main.a
    sta memA+1
    // [44] *((const word*) mulf16u::memB) ← (const word) main::b -- _deref_pwuc1=vwuc2 
    lda #<main.b
    sta memB
    lda #>main.b
    sta memB+1
    // asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  }
    lda memA
    sta sm1a+1
    sta sm3a+1
    sta sm5a+1
    sta sm7a+1
    eor #$ff
    sta sm2a+1
    sta sm4a+1
    sta sm6a+1
    sta sm8a+1
    lda memA+1
    sta sm1b+1
    sta sm3b+1
    sta sm5b+1
    sta sm7b+1
    eor #$ff
    sta sm2b+1
    sta sm4b+1
    sta sm6b+1
    sta sm8b+1
    ldx memB
    sec
  sm1a:
    lda mulf_sqr1_lo,x
  sm2a:
    sbc mulf_sqr2_lo,x
    sta memR+0
  sm3a:
    lda mulf_sqr1_hi,x
  sm4a:
    sbc mulf_sqr2_hi,x
    sta _AA+1
    sec
  sm1b:
    lda mulf_sqr1_lo,x
  sm2b:
    sbc mulf_sqr2_lo,x
    sta _cc+1
  sm3b:
    lda mulf_sqr1_hi,x
  sm4b:
    sbc mulf_sqr2_hi,x
    sta _CC+1
    ldx memB+1
    sec
  sm5a:
    lda mulf_sqr1_lo,x
  sm6a:
    sbc mulf_sqr2_lo,x
    sta _bb+1
  sm7a:
    lda mulf_sqr1_hi,x
  sm8a:
    sbc mulf_sqr2_hi,x
    sta _BB+1
    sec
  sm5b:
    lda mulf_sqr1_lo,x
  sm6b:
    sbc mulf_sqr2_lo,x
    sta _dd+1
  sm7b:
    lda mulf_sqr1_hi,x
  sm8b:
    sbc mulf_sqr2_hi,x
    sta memR+3
    clc
  _AA:
    lda #0
  _bb:
    adc #0
    sta memR+1
  _BB:
    lda #0
  _CC:
    adc #0
    sta memR+2
    bcc !+
    inc memR+3
    clc
  !:
  _cc:
    lda #0
    adc memR+1
    sta memR+1
  _dd:
    lda #0
    adc memR+2
    sta memR+2
    bcc !+
    inc memR+3
  !:
    // [46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR) -- vduz1=_deref_pduc1 
    lda memR
    sta.z return_1
    lda memR+1
    sta.z return_1+1
    lda memR+2
    sta.z return_1+2
    lda memR+3
    sta.z return_1+3
    jmp __breturn
    // mulf16u::@return
  __breturn:
    // [47] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
mulf_init: {
    .label __1 = $28
    .label __4 = $29
    .label __5 = $2a
    // x/2
    .label c = $a
    // Counter used for determining x%2==0
    .label sqr1_hi = $b
    // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4
    .label sqr = $14
    .label sqr1_lo = 8
    // sqr = (x*x)/4
    .label x_2 = $d
    // Decrease or increase x_255 - initially we decrease
    .label sqr2_hi = $11
    // Fill mulf_sqr2 = g(x) = f(x-255) : If x-255<0 then g(x)=f(255-x) (because x*x = -x*-x)
    // g(0) = f(255), g(1) = f(254), ..., g(254) = f(1), g(255) = f(0), g(256) = f(1), ..., g(510) = f(255), g(511) = f(256)
    .label x_255 = $10
    .label sqr2_lo = $e
    //Start with g(0)=f(255)
    .label dir = $13
    // [49] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  __b1_from_mulf_init:
    // [49] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z x_2
    // [49] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 
    lda #<mulf_sqr1_hi+1
    sta.z sqr1_hi
    lda #>mulf_sqr1_hi+1
    sta.z sqr1_hi+1
    // [49] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 
    lda #<0
    sta.z sqr
    lda #>0
    sta.z sqr+1
    // [49] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [49] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 
    lda #<mulf_sqr1_lo+1
    sta.z sqr1_lo
    lda #>mulf_sqr1_lo+1
    sta.z sqr1_lo+1
    jmp __b1
    // mulf_init::@1
  __b1:
    // [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z sqr1_lo+1
    cmp #>mulf_sqr1_lo+$200
    bne __b2
    lda.z sqr1_lo
    cmp #<mulf_sqr1_lo+$200
    bne __b2
    // [51] phi from mulf_init::@1 to mulf_init::@5 [phi:mulf_init::@1->mulf_init::@5]
  __b5_from___b1:
    // [51] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 
    lda #$ff
    sta.z dir
    // [51] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 
    lda #<mulf_sqr2_hi
    sta.z sqr2_hi
    lda #>mulf_sqr2_hi
    sta.z sqr2_hi+1
    // [51] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuz1=vbuc1 
    lda #-1
    sta.z x_255
    // [51] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 
    lda #<mulf_sqr2_lo
    sta.z sqr2_lo
    lda #>mulf_sqr2_lo
    sta.z sqr2_lo+1
    jmp __b5
    // mulf_init::@5
  __b5:
    // [52] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 
    lda.z sqr2_lo+1
    cmp #>mulf_sqr2_lo+$1ff
    bne __b6
    lda.z sqr2_lo
    cmp #<mulf_sqr2_lo+$1ff
    bne __b6
    jmp __b7
    // mulf_init::@7
  __b7:
    // [53] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 
    // Set the very last value g(511) = f(256)
    lda mulf_sqr1_lo+$100
    sta mulf_sqr2_lo+$1ff
    // [54] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 
    lda mulf_sqr1_hi+$100
    sta mulf_sqr2_hi+$1ff
    jmp __breturn
    // mulf_init::@return
  __breturn:
    // [55] return 
    rts
    // mulf_init::@6
  __b6:
    // [56] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 
    ldy.z x_255
    lda mulf_sqr1_lo,y
    ldy #0
    sta (sqr2_lo),y
    // [57] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 
    ldy.z x_255
    lda mulf_sqr1_hi,y
    ldy #0
    sta (sqr2_hi),y
    // [58] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr2_hi
    bne !+
    inc.z sqr2_hi+1
  !:
    // [59] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuz1=vbuz1_plus_vbuz2 
    lda.z x_255
    clc
    adc.z dir
    sta.z x_255
    // [60] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuz1_neq_0_then_la1 
    lda.z x_255
    cmp #0
    bne __b9_from___b6
    // [62] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8]
  __b8_from___b6:
    // [62] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 
    lda #1
    sta.z dir
    jmp __b8
    // [61] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9]
  __b9_from___b6:
    jmp __b9
    // mulf_init::@9
  __b9:
    // [62] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8]
  __b8_from___b9:
    // [62] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy 
    jmp __b8
    // mulf_init::@8
  __b8:
    // [63] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr2_lo
    bne !+
    inc.z sqr2_lo+1
  !:
    // [51] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5]
  __b5_from___b8:
    // [51] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy 
    // [51] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy 
    // [51] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy 
    // [51] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy 
    jmp __b5
    // mulf_init::@2
  __b2:
    // [64] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [65] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 
    lda #1
    and.z c
    sta.z __1
    // [66] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuz1_neq_0_then_la1 
    lda.z __1
    cmp #0
    bne __b3_from___b2
    jmp __b4
    // mulf_init::@4
  __b4:
    // [67] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuz1=_inc_vbuz1 
    inc.z x_2
    // [68] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 
    inc.z sqr
    bne !+
    inc.z sqr+1
  !:
    // [69] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3]
  __b3_from___b2:
  __b3_from___b4:
    // [69] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy 
    // [69] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy 
    jmp __b3
    // mulf_init::@3
  __b3:
    // [70] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuz1=_lo_vwuz2 
    lda.z sqr
    sta.z __4
    // [71] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuz2 
    lda.z __4
    ldy #0
    sta (sqr1_lo),y
    // [72] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuz1=_hi_vwuz2 
    lda.z sqr+1
    sta.z __5
    // [73] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuz2 
    lda.z __5
    ldy #0
    sta (sqr1_hi),y
    // [74] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr1_hi
    bne !+
    inc.z sqr1_hi+1
  !:
    // [75] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuz2 
    lda.z x_2
    clc
    adc.z sqr
    sta.z sqr
    bcc !+
    inc.z sqr+1
  !:
    // [76] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr1_lo
    bne !+
    inc.z sqr1_lo+1
  !:
    // [49] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1]
  __b1_from___b3:
    // [49] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy 
    // [49] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy 
    // [49] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy 
    // [49] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy 
    // [49] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy 
    jmp __b1
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  // mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
  // <f(x) = <(( x * x )/4)
  .align $100
  mulf_sqr1_lo: .fill $200, 0
  // >f(x) = >(( x * x )/4)
  .align $100
  mulf_sqr1_hi: .fill $200, 0
  // <g(x) =  <((( x - 255) * ( x - 255 ))/4)
  .align $100
  mulf_sqr2_lo: .fill $200, 0
  // >g(x) = >((( x - 255) * ( x - 255 ))/4)
  .align $100
  mulf_sqr2_hi: .fill $200, 0

REGISTER UPLIFT POTENTIAL REGISTERS
Statement [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ print_char_cursor#16 ] ( main:2 [ print_char_cursor#16 ] ) always clobbers reg byte a 
Statement [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 [ print_char_cursor#16 mulf16u::return#0 ] ( main:2 [ print_char_cursor#16 mulf16u::return#0 ] ) always clobbers reg byte a 
Statement [12] (dword) main::r#0 ← (dword) mulf16u::return#0 [ print_char_cursor#16 main::r#0 ] ( main:2 [ print_char_cursor#16 main::r#0 ] ) always clobbers reg byte a 
Statement [14] (dword) print_dword::dw#0 ← (dword) main::r#0 [ print_char_cursor#16 print_dword::dw#0 ] ( main:2 [ print_char_cursor#16 print_dword::dw#0 ] ) always clobbers reg byte a 
Statement [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [ print_char_cursor#16 print_dword::dw#0 print_word::w#0 ] ( main:2::print_dword:15 [ print_char_cursor#16 print_dword::dw#0 print_word::w#0 ] ) always clobbers reg byte a 
Statement [22] (word) print_word::w#1 ← < (dword) print_dword::dw#0 [ print_word::w#1 print_char_cursor#10 ] ( main:2::print_dword:15 [ print_word::w#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 [ print_word::w#2 print_char_cursor#34 print_byte::b#0 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_word::w#2 print_char_cursor#34 print_byte::b#0 ] main:2::print_dword:15::print_word:23 [ print_word::w#2 print_char_cursor#34 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [28] (byte) print_byte::b#1 ← < (word) print_word::w#2 [ print_char_cursor#10 print_byte::b#1 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_char_cursor#10 print_byte::b#1 ] main:2::print_dword:15::print_word:23 [ print_char_cursor#10 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#36 print_byte::$0 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_byte::b#2 print_char_cursor#36 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#10 print_byte::$2 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 print_byte::$2 ] ) always clobbers reg byte a 
Statement [40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2 [ print_char_cursor#27 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char_cursor#27 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [43] *((const word*) mulf16u::memA) ← (const word) main::a [ ] ( main:2::mulf16u:10 [ print_char_cursor#16 ] ) always clobbers reg byte a 
Statement [44] *((const word*) mulf16u::memB) ← (const word) main::b [ ] ( main:2::mulf16u:10 [ print_char_cursor#16 ] ) always clobbers reg byte a 
Statement asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  } always clobbers reg byte a reg byte x 
Statement [46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR) [ mulf16u::return#1 ] ( main:2::mulf16u:10 [ print_char_cursor#16 mulf16u::return#1 ] ) always clobbers reg byte a 
Statement [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:13 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
Statement [52] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ]
Statement [53] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:2::mulf_init:5 [ ] ) always clobbers reg byte a 
Statement [54] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:2::mulf_init:5 [ ] ) always clobbers reg byte a 
Statement [56] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ]
Statement [57] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ) always clobbers reg byte a reg byte y 
Statement [59] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ) always clobbers reg byte a 
Statement [65] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ) always clobbers reg byte a 
Statement [70] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$4 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$4 ] ) always clobbers reg byte a 
Statement [71] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:13 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
Statement [72] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$5 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$5 ] ) always clobbers reg byte a 
Statement [73] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ) always clobbers reg byte y 
Statement [75] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ) always clobbers reg byte a 
Statement [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ print_char_cursor#16 ] ( main:2 [ print_char_cursor#16 ] ) always clobbers reg byte a 
Statement [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 [ print_char_cursor#16 mulf16u::return#0 ] ( main:2 [ print_char_cursor#16 mulf16u::return#0 ] ) always clobbers reg byte a 
Statement [12] (dword) main::r#0 ← (dword) mulf16u::return#0 [ print_char_cursor#16 main::r#0 ] ( main:2 [ print_char_cursor#16 main::r#0 ] ) always clobbers reg byte a 
Statement [14] (dword) print_dword::dw#0 ← (dword) main::r#0 [ print_char_cursor#16 print_dword::dw#0 ] ( main:2 [ print_char_cursor#16 print_dword::dw#0 ] ) always clobbers reg byte a 
Statement [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [ print_char_cursor#16 print_dword::dw#0 print_word::w#0 ] ( main:2::print_dword:15 [ print_char_cursor#16 print_dword::dw#0 print_word::w#0 ] ) always clobbers reg byte a 
Statement [22] (word) print_word::w#1 ← < (dword) print_dword::dw#0 [ print_word::w#1 print_char_cursor#10 ] ( main:2::print_dword:15 [ print_word::w#1 print_char_cursor#10 ] ) always clobbers reg byte a 
Statement [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 [ print_word::w#2 print_char_cursor#34 print_byte::b#0 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_word::w#2 print_char_cursor#34 print_byte::b#0 ] main:2::print_dword:15::print_word:23 [ print_word::w#2 print_char_cursor#34 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [28] (byte) print_byte::b#1 ← < (word) print_word::w#2 [ print_char_cursor#10 print_byte::b#1 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_char_cursor#10 print_byte::b#1 ] main:2::print_dword:15::print_word:23 [ print_char_cursor#10 print_byte::b#1 ] ) always clobbers reg byte a 
Statement [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#36 print_byte::$0 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_byte::b#2 print_char_cursor#36 print_byte::$0 ] ) always clobbers reg byte a 
Statement [35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#10 print_byte::$2 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 print_byte::$2 ] ) always clobbers reg byte a 
Statement [40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2 [ print_char_cursor#27 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char_cursor#27 ] ) always clobbers reg byte y 
Statement [43] *((const word*) mulf16u::memA) ← (const word) main::a [ ] ( main:2::mulf16u:10 [ print_char_cursor#16 ] ) always clobbers reg byte a 
Statement [44] *((const word*) mulf16u::memB) ← (const word) main::b [ ] ( main:2::mulf16u:10 [ print_char_cursor#16 ] ) always clobbers reg byte a 
Statement asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  } always clobbers reg byte a reg byte x 
Statement [46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR) [ mulf16u::return#1 ] ( main:2::mulf16u:10 [ print_char_cursor#16 mulf16u::return#1 ] ) always clobbers reg byte a 
Statement [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ) always clobbers reg byte a 
Statement [52] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ) always clobbers reg byte a 
Statement [53] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:2::mulf_init:5 [ ] ) always clobbers reg byte a 
Statement [54] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:2::mulf_init:5 [ ] ) always clobbers reg byte a 
Statement [56] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ) always clobbers reg byte a reg byte y 
Statement [57] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ) always clobbers reg byte a reg byte y 
Statement [59] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ) always clobbers reg byte a 
Statement [65] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ) always clobbers reg byte a 
Statement [70] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$4 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$4 ] ) always clobbers reg byte a 
Statement [71] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ) always clobbers reg byte y 
Statement [72] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$5 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$5 ] ) always clobbers reg byte a 
Statement [73] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ) always clobbers reg byte y 
Statement [75] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ) always clobbers reg byte a 
Potential registers zp[2]:2 [ print_word::w#2 print_word::w#0 print_word::w#1 ] : zp[2]:2 , 
Potential registers zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp[1]:4 , reg byte x , 
Potential registers zp[1]:5 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:6 [ print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ] : zp[2]:6 , 
Potential registers zp[2]:8 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] : zp[2]:8 , 
Potential registers zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ] : zp[1]:10 , reg byte x , 
Potential registers zp[2]:11 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] : zp[2]:11 , 
Potential registers zp[1]:13 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] : zp[1]:13 , reg byte x , 
Potential registers zp[2]:14 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] : zp[2]:14 , 
Potential registers zp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ] : zp[1]:16 , reg byte x , 
Potential registers zp[2]:17 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] : zp[2]:17 , 
Potential registers zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ] : zp[1]:19 , reg byte x , 
Potential registers zp[2]:20 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] : zp[2]:20 , 
Potential registers zp[4]:22 [ mulf16u::return#0 ] : zp[4]:22 , 
Potential registers zp[4]:26 [ main::r#0 ] : zp[4]:26 , 
Potential registers zp[4]:30 [ print_dword::dw#0 ] : zp[4]:30 , 
Potential registers zp[1]:34 [ print_byte::$0 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:35 [ print_byte::$2 ] : zp[1]:35 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[4]:36 [ mulf16u::return#1 ] : zp[4]:36 , 
Potential registers zp[1]:40 [ mulf_init::$1 ] : zp[1]:40 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:41 [ mulf_init::$4 ] : zp[1]:41 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:42 [ mulf_init::$5 ] : zp[1]:42 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [mulf_init] 47.67: zp[2]:20 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] 26.89: zp[2]:14 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] 25.14: zp[2]:8 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] 23.1: zp[1]:13 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] 22: zp[1]:40 [ mulf_init::$1 ] 22: zp[1]:41 [ mulf_init::$4 ] 22: zp[1]:42 [ mulf_init::$5 ] 15.4: zp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ] 15.12: zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ] 13.54: zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ] 11.92: zp[2]:17 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] 10.08: zp[2]:11 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] 
Uplift Scope [mulf16u] 22: zp[4]:22 [ mulf16u::return#0 ] 4.33: zp[4]:36 [ mulf16u::return#1 ] 
Uplift Scope [print_byte] 10: zp[1]:4 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp[1]:34 [ print_byte::$0 ] 4: zp[1]:35 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp[1]:5 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [main] 11: zp[4]:26 [ main::r#0 ] 
Uplift Scope [print_word] 10.67: zp[2]:2 [ print_word::w#2 print_word::w#0 print_word::w#1 ] 
Uplift Scope [] 9.84: zp[2]:6 [ print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ] 
Uplift Scope [print_dword] 5: zp[4]:30 [ print_dword::dw#0 ] 
Uplift Scope [RADIX] 
Uplift Scope [print_set_screen] 

Uplifting [mulf_init] best 6046 combination zp[2]:20 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:14 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:8 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:17 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:11 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] 
Limited combination testing to 100 combinations of 1024 possible.
Uplifting [mulf16u] best 6046 combination zp[4]:22 [ mulf16u::return#0 ] zp[4]:36 [ mulf16u::return#1 ] 
Uplifting [print_byte] best 6032 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] 
Uplifting [print_char] best 6023 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [main] best 6023 combination zp[4]:26 [ main::r#0 ] 
Uplifting [print_word] best 6023 combination zp[2]:2 [ print_word::w#2 print_word::w#0 print_word::w#1 ] 
Uplifting [] best 6023 combination zp[2]:6 [ print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ] 
Uplifting [print_dword] best 6023 combination zp[4]:30 [ print_dword::dw#0 ] 
Uplifting [RADIX] best 6023 combination 
Uplifting [print_set_screen] best 6023 combination 
Attempting to uplift remaining variables inzp[1]:16 [ mulf_init::x_255#2 mulf_init::x_255#1 ]
Uplifting [mulf_init] best 5883 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] 
Attempting to uplift remaining variables inzp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ]
Uplifting [mulf_init] best 5883 combination zp[1]:19 [ mulf_init::dir#2 mulf_init::dir#4 ] 
Attempting to uplift remaining variables inzp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ]
Uplifting [mulf_init] best 5883 combination zp[1]:10 [ mulf_init::c#2 mulf_init::c#1 ] 
Coalescing zero page register [ zp[4]:22 [ mulf16u::return#0 ] ] with [ zp[4]:26 [ main::r#0 ] ] - score: 1
Coalescing zero page register [ zp[4]:22 [ mulf16u::return#0 main::r#0 ] ] with [ zp[4]:36 [ mulf16u::return#1 ] ] - score: 1
Coalescing zero page register [ zp[4]:22 [ mulf16u::return#0 main::r#0 mulf16u::return#1 ] ] with [ zp[4]:30 [ print_dword::dw#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:8 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] ] with [ zp[2]:2 [ print_word::w#2 print_word::w#0 print_word::w#1 ] ]
Coalescing zero page register [ zp[2]:11 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] ] with [ zp[2]:6 [ print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ] ]
Allocated (was zp[2]:8) zp[2]:2 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 print_word::w#2 print_word::w#0 print_word::w#1 ]
Allocated (was zp[1]:10) zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
Allocated (was zp[2]:11) zp[2]:5 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ]
Allocated (was zp[2]:14) zp[2]:7 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
Allocated (was zp[2]:17) zp[2]:9 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
Allocated (was zp[1]:19) zp[1]:11 [ mulf_init::dir#2 mulf_init::dir#4 ]
Allocated (was zp[2]:20) zp[2]:12 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
Allocated (was zp[4]:22) zp[4]:14 [ mulf16u::return#0 main::r#0 mulf16u::return#1 print_dword::dw#0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label SCREEN = $400
  .label print_char_cursor = 5
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label a = $4d2
    .label b = $929
    .label r = $e
    // [5] call mulf_init 
    // [48] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp __b4
    // main::@4
  __b4:
    // asm { sei  }
    sei
    // [7] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
  __b1_from___b4:
    // [7] phi (byte*) print_char_cursor#16 = (byte*) 1024 [phi:main::@4->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    jmp __b1
    // main::@1
  __b1:
    jmp __b2
    // main::@2
  __b2:
    // [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne __b2
    jmp __b3
    // main::@3
  __b3:
    // [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDERCOL
    // [10] call mulf16u 
    jsr mulf16u
    // [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1
    jmp __b5
    // main::@5
  __b5:
    // [12] (dword) main::r#0 ← (dword) mulf16u::return#0
    // [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BORDERCOL
    // [14] (dword) print_dword::dw#0 ← (dword) main::r#0
    // [15] call print_dword 
    jsr print_dword
    // [16] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
  __b6_from___b5:
    jmp __b6
    // main::@6
  __b6:
    // [17] call print_set_screen 
    // [18] phi from main::@6 to print_set_screen [phi:main::@6->print_set_screen]
  print_set_screen_from___b6:
    jsr print_set_screen
    // [7] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [7] phi (byte*) print_char_cursor#16 = (const byte*) SCREEN [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z print_char_cursor
    lda #>SCREEN
    sta.z print_char_cursor+1
    jmp __b1
}
  // print_set_screen
// Set the screen to print on. Also resets current line/char cursor.
print_set_screen: {
    jmp __breturn
    // print_set_screen::@return
  __breturn:
    // [19] return 
    rts
}
  // print_dword
// Print a dword as HEX
// print_dword(dword zp($e) dw)
print_dword: {
    .label dw = $e
    // [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 -- vwuz1=_hi_vduz2 
    lda.z dw+2
    sta.z print_word.w
    lda.z dw+3
    sta.z print_word.w+1
    // [21] call print_word 
    // [25] phi from print_dword to print_word [phi:print_dword->print_word]
  print_word_from_print_dword:
    // [25] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#16 [phi:print_dword->print_word#0] -- register_copy 
    // [25] phi (word) print_word::w#2 = (word) print_word::w#0 [phi:print_dword->print_word#1] -- register_copy 
    jsr print_word
    jmp __b1
    // print_dword::@1
  __b1:
    // [22] (word) print_word::w#1 ← < (dword) print_dword::dw#0 -- vwuz1=_lo_vduz2 
    lda.z dw
    sta.z print_word.w
    lda.z dw+1
    sta.z print_word.w+1
    // [23] call print_word 
    // [25] phi from print_dword::@1 to print_word [phi:print_dword::@1->print_word]
  print_word_from___b1:
    // [25] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#10 [phi:print_dword::@1->print_word#0] -- register_copy 
    // [25] phi (word) print_word::w#2 = (word) print_word::w#1 [phi:print_dword::@1->print_word#1] -- register_copy 
    jsr print_word
    jmp __breturn
    // print_dword::@return
  __breturn:
    // [24] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp(2) w)
print_word: {
    .label w = 2
    // [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 -- vbuxx=_hi_vwuz1 
    lda.z w+1
    tax
    // [27] call print_byte 
    // [31] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [31] phi (byte*) print_char_cursor#36 = (byte*) print_char_cursor#34 [phi:print_word->print_byte#0] -- register_copy 
    // [31] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __b1
    // print_word::@1
  __b1:
    // [28] (byte) print_byte::b#1 ← < (word) print_word::w#2 -- vbuxx=_lo_vwuz1 
    lda.z w
    tax
    // [29] call print_byte 
    // [31] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from___b1:
    // [31] phi (byte*) print_char_cursor#36 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [31] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp __breturn
    // print_word::@return
  __breturn:
    // [30] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [33] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [34] call print_char 
    // [39] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [39] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#36 [phi:print_byte->print_char#0] -- register_copy 
    // [39] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_byte::@1
  __b1:
    // [35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [36] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [37] call print_char 
    // [39] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from___b1:
    // [39] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [39] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_byte::@return
  __breturn:
    // [38] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // [40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [41] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#27 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [42] return 
    rts
}
  // mulf16u
// Fast multiply two unsigned words to a double word result
// Done in assembler to utilize fast addition A+X
mulf16u: {
    .label memA = $f8
    .label memB = $fa
    .label memR = $fc
    .label return = $e
    // [43] *((const word*) mulf16u::memA) ← (const word) main::a -- _deref_pwuc1=vwuc2 
    lda #<main.a
    sta memA
    lda #>main.a
    sta memA+1
    // [44] *((const word*) mulf16u::memB) ← (const word) main::b -- _deref_pwuc1=vwuc2 
    lda #<main.b
    sta memB
    lda #>main.b
    sta memB+1
    // asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  }
    lda memA
    sta sm1a+1
    sta sm3a+1
    sta sm5a+1
    sta sm7a+1
    eor #$ff
    sta sm2a+1
    sta sm4a+1
    sta sm6a+1
    sta sm8a+1
    lda memA+1
    sta sm1b+1
    sta sm3b+1
    sta sm5b+1
    sta sm7b+1
    eor #$ff
    sta sm2b+1
    sta sm4b+1
    sta sm6b+1
    sta sm8b+1
    ldx memB
    sec
  sm1a:
    lda mulf_sqr1_lo,x
  sm2a:
    sbc mulf_sqr2_lo,x
    sta memR+0
  sm3a:
    lda mulf_sqr1_hi,x
  sm4a:
    sbc mulf_sqr2_hi,x
    sta _AA+1
    sec
  sm1b:
    lda mulf_sqr1_lo,x
  sm2b:
    sbc mulf_sqr2_lo,x
    sta _cc+1
  sm3b:
    lda mulf_sqr1_hi,x
  sm4b:
    sbc mulf_sqr2_hi,x
    sta _CC+1
    ldx memB+1
    sec
  sm5a:
    lda mulf_sqr1_lo,x
  sm6a:
    sbc mulf_sqr2_lo,x
    sta _bb+1
  sm7a:
    lda mulf_sqr1_hi,x
  sm8a:
    sbc mulf_sqr2_hi,x
    sta _BB+1
    sec
  sm5b:
    lda mulf_sqr1_lo,x
  sm6b:
    sbc mulf_sqr2_lo,x
    sta _dd+1
  sm7b:
    lda mulf_sqr1_hi,x
  sm8b:
    sbc mulf_sqr2_hi,x
    sta memR+3
    clc
  _AA:
    lda #0
  _bb:
    adc #0
    sta memR+1
  _BB:
    lda #0
  _CC:
    adc #0
    sta memR+2
    bcc !+
    inc memR+3
    clc
  !:
  _cc:
    lda #0
    adc memR+1
    sta memR+1
  _dd:
    lda #0
    adc memR+2
    sta memR+2
    bcc !+
    inc memR+3
  !:
    // [46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR) -- vduz1=_deref_pduc1 
    lda memR
    sta.z return
    lda memR+1
    sta.z return+1
    lda memR+2
    sta.z return+2
    lda memR+3
    sta.z return+3
    jmp __breturn
    // mulf16u::@return
  __breturn:
    // [47] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
mulf_init: {
    // x/2
    .label c = 4
    // Counter used for determining x%2==0
    .label sqr1_hi = 5
    // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4
    .label sqr = $c
    .label sqr1_lo = 2
    // Decrease or increase x_255 - initially we decrease
    .label sqr2_hi = 9
    .label sqr2_lo = 7
    //Start with g(0)=f(255)
    .label dir = $b
    // [49] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  __b1_from_mulf_init:
    // [49] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [49] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 
    lda #<mulf_sqr1_hi+1
    sta.z sqr1_hi
    lda #>mulf_sqr1_hi+1
    sta.z sqr1_hi+1
    // [49] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 
    lda #<0
    sta.z sqr
    lda #>0
    sta.z sqr+1
    // [49] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [49] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 
    lda #<mulf_sqr1_lo+1
    sta.z sqr1_lo
    lda #>mulf_sqr1_lo+1
    sta.z sqr1_lo+1
    jmp __b1
    // mulf_init::@1
  __b1:
    // [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z sqr1_lo+1
    cmp #>mulf_sqr1_lo+$200
    bne __b2
    lda.z sqr1_lo
    cmp #<mulf_sqr1_lo+$200
    bne __b2
    // [51] phi from mulf_init::@1 to mulf_init::@5 [phi:mulf_init::@1->mulf_init::@5]
  __b5_from___b1:
    // [51] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 
    lda #$ff
    sta.z dir
    // [51] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 
    lda #<mulf_sqr2_hi
    sta.z sqr2_hi
    lda #>mulf_sqr2_hi
    sta.z sqr2_hi+1
    // [51] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuxx=vbuc1 
    ldx #-1
    // [51] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 
    lda #<mulf_sqr2_lo
    sta.z sqr2_lo
    lda #>mulf_sqr2_lo
    sta.z sqr2_lo+1
    jmp __b5
    // mulf_init::@5
  __b5:
    // [52] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 
    lda.z sqr2_lo+1
    cmp #>mulf_sqr2_lo+$1ff
    bne __b6
    lda.z sqr2_lo
    cmp #<mulf_sqr2_lo+$1ff
    bne __b6
    jmp __b7
    // mulf_init::@7
  __b7:
    // [53] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 
    // Set the very last value g(511) = f(256)
    lda mulf_sqr1_lo+$100
    sta mulf_sqr2_lo+$1ff
    // [54] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 
    lda mulf_sqr1_hi+$100
    sta mulf_sqr2_hi+$1ff
    jmp __breturn
    // mulf_init::@return
  __breturn:
    // [55] return 
    rts
    // mulf_init::@6
  __b6:
    // [56] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda mulf_sqr1_lo,x
    ldy #0
    sta (sqr2_lo),y
    // [57] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda mulf_sqr1_hi,x
    ldy #0
    sta (sqr2_hi),y
    // [58] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr2_hi
    bne !+
    inc.z sqr2_hi+1
  !:
    // [59] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuxx=vbuxx_plus_vbuz1 
    txa
    clc
    adc.z dir
    tax
    // [60] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b9_from___b6
    // [62] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8]
  __b8_from___b6:
    // [62] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 
    lda #1
    sta.z dir
    jmp __b8
    // [61] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9]
  __b9_from___b6:
    jmp __b9
    // mulf_init::@9
  __b9:
    // [62] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8]
  __b8_from___b9:
    // [62] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy 
    jmp __b8
    // mulf_init::@8
  __b8:
    // [63] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr2_lo
    bne !+
    inc.z sqr2_lo+1
  !:
    // [51] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5]
  __b5_from___b8:
    // [51] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy 
    // [51] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy 
    // [51] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy 
    // [51] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy 
    jmp __b5
    // mulf_init::@2
  __b2:
    // [64] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [65] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuaa=vbuz1_band_vbuc1 
    lda #1
    and.z c
    // [66] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b3_from___b2
    jmp __b4
    // mulf_init::@4
  __b4:
    // [67] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuxx=_inc_vbuxx 
    inx
    // [68] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 
    inc.z sqr
    bne !+
    inc.z sqr+1
  !:
    // [69] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3]
  __b3_from___b2:
  __b3_from___b4:
    // [69] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy 
    // [69] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy 
    jmp __b3
    // mulf_init::@3
  __b3:
    // [70] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuaa=_lo_vwuz1 
    lda.z sqr
    // [71] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sqr1_lo),y
    // [72] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuaa=_hi_vwuz1 
    lda.z sqr+1
    // [73] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sqr1_hi),y
    // [74] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr1_hi
    bne !+
    inc.z sqr1_hi+1
  !:
    // [75] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuxx 
    txa
    clc
    adc.z sqr
    sta.z sqr
    bcc !+
    inc.z sqr+1
  !:
    // [76] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr1_lo
    bne !+
    inc.z sqr1_lo+1
  !:
    // [49] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1]
  __b1_from___b3:
    // [49] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy 
    // [49] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy 
    // [49] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy 
    // [49] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy 
    // [49] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy 
    jmp __b1
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  // mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
  // <f(x) = <(( x * x )/4)
  .align $100
  mulf_sqr1_lo: .fill $200, 0
  // >f(x) = >(( x * x )/4)
  .align $100
  mulf_sqr1_hi: .fill $200, 0
  // <g(x) =  <((( x - 255) * ( x - 255 ))/4)
  .align $100
  mulf_sqr2_lo: .fill $200, 0
  // >g(x) = >((( x - 255) * ( x - 255 ))/4)
  .align $100
  mulf_sqr2_hi: .fill $200, 0

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __b1
Removing instruction jmp __bend
Removing instruction jmp __b4
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b5
Removing instruction jmp __b6
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 __b5
Removing instruction jmp __b7
Removing instruction jmp __breturn
Removing instruction jmp __b9
Removing instruction jmp __b8
Removing instruction jmp __b4
Removing instruction jmp __b3
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction lda #<0 with TXA
Removing instruction lda #>0
Removing instruction lda #0
Removing instruction ldy #0
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b1 with __b2
Replacing label __b9_from___b6 with __b8
Replacing label __b3_from___b2 with __b3
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
Removing instruction __b1:
Removing instruction __b6_from___b5:
Removing instruction print_set_screen_from___b6:
Removing instruction __b9_from___b6:
Removing instruction __b9:
Removing instruction __b8_from___b9:
Removing instruction __b3_from___b2:
Removing instruction __b3_from___b4:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction mulf_init_from_main:
Removing instruction __b4:
Removing instruction __b1_from___b4:
Removing instruction __b3:
Removing instruction __b5:
Removing instruction __b6:
Removing instruction __b1_from___b6:
Removing instruction __breturn:
Removing instruction print_word_from_print_dword:
Removing instruction __b1:
Removing instruction print_word_from___b1:
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 __b1_from_mulf_init:
Removing instruction __b5_from___b1:
Removing instruction __b7:
Removing instruction __breturn:
Removing instruction __b8_from___b6:
Removing instruction __b5_from___b8:
Removing instruction __b4:
Removing instruction __b1_from___b3:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp __b8
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte*) BORDERCOL = (byte*) 53280
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(const byte*) RASTER = (byte*) 53266
(const byte*) SCREEN = (byte*) 1024
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(const word) main::a = (word) $4d2
(const word) main::b = (word) $929
(dword) main::r
(dword) main::r#0 r zp[4]:14 11.0
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
(label) mulf16u::@return
(word) mulf16u::a
(word) mulf16u::b
(const word*) mulf16u::memA = (word*) 248
(const word*) mulf16u::memB = (word*) 250
(const dword*) mulf16u::memR = (dword*) 252
(dword) mulf16u::return
(dword) mulf16u::return#0 return zp[4]:14 22.0
(dword) mulf16u::return#1 return zp[4]:14 4.333333333333333
(void()) mulf_init()
(byte~) mulf_init::$1 reg byte a 22.0
(byte~) mulf_init::$4 reg byte a 22.0
(byte~) mulf_init::$5 reg byte a 22.0
(label) mulf_init::@1
(label) mulf_init::@2
(label) mulf_init::@3
(label) mulf_init::@4
(label) mulf_init::@5
(label) mulf_init::@6
(label) mulf_init::@7
(label) mulf_init::@8
(label) mulf_init::@9
(label) mulf_init::@return
(byte) mulf_init::c
(byte) mulf_init::c#1 c zp[1]:4 2.5384615384615383
(byte) mulf_init::c#2 c zp[1]:4 11.0
(byte) mulf_init::dir
(byte) mulf_init::dir#2 dir zp[1]:11 4.125
(byte) mulf_init::dir#4 dir zp[1]:11 11.0
(word) mulf_init::sqr
(word) mulf_init::sqr#1 sqr zp[2]:12 11.0
(word) mulf_init::sqr#2 sqr zp[2]:12 22.0
(word) mulf_init::sqr#3 sqr zp[2]:12 9.166666666666666
(word) mulf_init::sqr#4 sqr zp[2]:12 5.5
(byte*) mulf_init::sqr1_hi
(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:5 7.333333333333333
(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:5 2.75
(byte*) mulf_init::sqr1_lo
(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:2 22.0
(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:2 3.142857142857143
(byte*) mulf_init::sqr2_hi
(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:9 3.6666666666666665
(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:9 8.25
(byte*) mulf_init::sqr2_lo
(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:7 22.0
(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:7 4.888888888888889
(byte) mulf_init::x_2
(byte) mulf_init::x_2#1 reg byte x 11.0
(byte) mulf_init::x_2#2 reg byte x 5.5
(byte) mulf_init::x_2#3 reg byte x 6.6000000000000005
(byte) mulf_init::x_255
(byte) mulf_init::x_255#1 reg byte x 6.6000000000000005
(byte) mulf_init::x_255#2 reg byte x 8.8
(const byte*) mulf_sqr1_hi[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr1_lo[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr2_hi[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr2_lo[(number) $200]  = { fill( $200, 0) }
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte x 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0 reg byte a 4.0
(byte) print_char::ch#1 reg byte a 4.0
(byte) print_char::ch#2 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#10 print_char_cursor zp[2]:5 0.6153846153846154
(byte*) print_char_cursor#16 print_char_cursor zp[2]:5 0.2222222222222222
(byte*) print_char_cursor#27 print_char_cursor zp[2]:5 4.0
(byte*) print_char_cursor#34 print_char_cursor zp[2]:5 3.0
(byte*) print_char_cursor#36 print_char_cursor zp[2]:5 2.0
(void()) print_dword((dword) print_dword::dw)
(label) print_dword::@1
(label) print_dword::@return
(dword) print_dword::dw
(dword) print_dword::dw#0 dw zp[4]:14 5.0
(const byte*) print_hextab[]  = (string) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_screen
(void()) print_set_screen((byte*) print_set_screen::screen)
(label) print_set_screen::@return
(byte*) print_set_screen::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[2]:2 4.0
(word) print_word::w#1 w zp[2]:2 4.0
(word) print_word::w#2 w zp[2]:2 2.6666666666666665

reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp[2]:2 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 print_word::w#2 print_word::w#0 print_word::w#1 ]
zp[1]:4 [ mulf_init::c#2 mulf_init::c#1 ]
zp[2]:5 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 ]
reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
zp[2]:7 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
zp[2]:9 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
zp[1]:11 [ mulf_init::dir#2 mulf_init::dir#4 ]
zp[2]:12 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
zp[4]:14 [ mulf16u::return#0 main::r#0 mulf16u::return#1 print_dword::dw#0 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]
reg byte a [ mulf_init::$1 ]
reg byte a [ mulf_init::$4 ]
reg byte a [ mulf_init::$5 ]


FINAL ASSEMBLER
Score: 4351

  // File Comments
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label RASTER = $d012
  .label BORDERCOL = $d020
  .label SCREEN = $400
  .label print_char_cursor = 5
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .label a = $4d2
    .label b = $929
    .label r = $e
    // mulf_init()
    // [5] call mulf_init 
    // [48] phi from main to mulf_init [phi:main->mulf_init]
    jsr mulf_init
    // main::@4
    // asm
    // asm { sei  }
    sei
    // [7] phi from main::@4 to main::@1 [phi:main::@4->main::@1]
    // [7] phi (byte*) print_char_cursor#16 = (byte*) 1024 [phi:main::@4->main::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // main::@1
    // main::@2
  __b2:
    // while(*RASTER!=$ff)
    // [8] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 
    lda #$ff
    cmp RASTER
    bne __b2
    // main::@3
    // (*BORDERCOL)++;
    // [9] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc BORDERCOL
    // mulf16u(a, b)
    // [10] call mulf16u 
    jsr mulf16u
    // [11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1
    // main::@5
    // r = mulf16u(a, b)
    // [12] (dword) main::r#0 ← (dword) mulf16u::return#0
    // (*BORDERCOL)--;
    // [13] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 
    dec BORDERCOL
    // print_dword(r)
    // [14] (dword) print_dword::dw#0 ← (dword) main::r#0
    // [15] call print_dword 
    jsr print_dword
    // [16] phi from main::@5 to main::@6 [phi:main::@5->main::@6]
    // main::@6
    // print_set_screen(SCREEN)
    // [17] call print_set_screen 
    // [18] phi from main::@6 to print_set_screen [phi:main::@6->print_set_screen]
    jsr print_set_screen
    // [7] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [7] phi (byte*) print_char_cursor#16 = (const byte*) SCREEN [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z print_char_cursor
    lda #>SCREEN
    sta.z print_char_cursor+1
    jmp __b2
}
  // print_set_screen
// Set the screen to print on. Also resets current line/char cursor.
print_set_screen: {
    // print_set_screen::@return
    // }
    // [19] return 
    rts
}
  // print_dword
// Print a dword as HEX
// print_dword(dword zp($e) dw)
print_dword: {
    .label dw = $e
    // print_word(>dw)
    // [20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 -- vwuz1=_hi_vduz2 
    lda.z dw+2
    sta.z print_word.w
    lda.z dw+3
    sta.z print_word.w+1
    // [21] call print_word 
    // [25] phi from print_dword to print_word [phi:print_dword->print_word]
    // [25] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#16 [phi:print_dword->print_word#0] -- register_copy 
    // [25] phi (word) print_word::w#2 = (word) print_word::w#0 [phi:print_dword->print_word#1] -- register_copy 
    jsr print_word
    // print_dword::@1
    // print_word(<dw)
    // [22] (word) print_word::w#1 ← < (dword) print_dword::dw#0 -- vwuz1=_lo_vduz2 
    lda.z dw
    sta.z print_word.w
    lda.z dw+1
    sta.z print_word.w+1
    // [23] call print_word 
    // [25] phi from print_dword::@1 to print_word [phi:print_dword::@1->print_word]
    // [25] phi (byte*) print_char_cursor#34 = (byte*) print_char_cursor#10 [phi:print_dword::@1->print_word#0] -- register_copy 
    // [25] phi (word) print_word::w#2 = (word) print_word::w#1 [phi:print_dword::@1->print_word#1] -- register_copy 
    jsr print_word
    // print_dword::@return
    // }
    // [24] return 
    rts
}
  // print_word
// Print a word as HEX
// print_word(word zp(2) w)
print_word: {
    .label w = 2
    // print_byte(>w)
    // [26] (byte) print_byte::b#0 ← > (word) print_word::w#2 -- vbuxx=_hi_vwuz1 
    lda.z w+1
    tax
    // [27] call print_byte 
    // [31] phi from print_word to print_byte [phi:print_word->print_byte]
    // [31] phi (byte*) print_char_cursor#36 = (byte*) print_char_cursor#34 [phi:print_word->print_byte#0] -- register_copy 
    // [31] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@1
    // print_byte(<w)
    // [28] (byte) print_byte::b#1 ← < (word) print_word::w#2 -- vbuxx=_lo_vwuz1 
    lda.z w
    tax
    // [29] call print_byte 
    // [31] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
    // [31] phi (byte*) print_char_cursor#36 = (byte*) print_char_cursor#10 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [31] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@return
    // }
    // [30] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // b>>4
    // [32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [33] (byte) print_char::ch#0 ← *((const byte*) print_hextab + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [34] call print_char 
    // [39] phi from print_byte to print_char [phi:print_byte->print_char]
    // [39] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#36 [phi:print_byte->print_char#0] -- register_copy 
    // [39] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@1
    // b&$f
    // [35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [36] (byte) print_char::ch#1 ← *((const byte*) print_hextab + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [37] call print_char 
    // [39] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
    // [39] phi (byte*) print_char_cursor#27 = (byte*) print_char_cursor#10 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [39] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@return
    // }
    // [38] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [41] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#27 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [42] return 
    rts
}
  // mulf16u
// Fast multiply two unsigned words to a double word result
// Done in assembler to utilize fast addition A+X
mulf16u: {
    .label memA = $f8
    .label memB = $fa
    .label memR = $fc
    .label return = $e
    // *memA = a
    // [43] *((const word*) mulf16u::memA) ← (const word) main::a -- _deref_pwuc1=vwuc2 
    lda #<main.a
    sta memA
    lda #>main.a
    sta memA+1
    // *memB = b
    // [44] *((const word*) mulf16u::memB) ← (const word) main::b -- _deref_pwuc1=vwuc2 
    lda #<main.b
    sta memB
    lda #>main.b
    sta memB+1
    // asm
    // asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !:  }
    lda memA
    sta sm1a+1
    sta sm3a+1
    sta sm5a+1
    sta sm7a+1
    eor #$ff
    sta sm2a+1
    sta sm4a+1
    sta sm6a+1
    sta sm8a+1
    lda memA+1
    sta sm1b+1
    sta sm3b+1
    sta sm5b+1
    sta sm7b+1
    eor #$ff
    sta sm2b+1
    sta sm4b+1
    sta sm6b+1
    sta sm8b+1
    ldx memB
    sec
  sm1a:
    lda mulf_sqr1_lo,x
  sm2a:
    sbc mulf_sqr2_lo,x
    sta memR+0
  sm3a:
    lda mulf_sqr1_hi,x
  sm4a:
    sbc mulf_sqr2_hi,x
    sta _AA+1
    sec
  sm1b:
    lda mulf_sqr1_lo,x
  sm2b:
    sbc mulf_sqr2_lo,x
    sta _cc+1
  sm3b:
    lda mulf_sqr1_hi,x
  sm4b:
    sbc mulf_sqr2_hi,x
    sta _CC+1
    ldx memB+1
    sec
  sm5a:
    lda mulf_sqr1_lo,x
  sm6a:
    sbc mulf_sqr2_lo,x
    sta _bb+1
  sm7a:
    lda mulf_sqr1_hi,x
  sm8a:
    sbc mulf_sqr2_hi,x
    sta _BB+1
    sec
  sm5b:
    lda mulf_sqr1_lo,x
  sm6b:
    sbc mulf_sqr2_lo,x
    sta _dd+1
  sm7b:
    lda mulf_sqr1_hi,x
  sm8b:
    sbc mulf_sqr2_hi,x
    sta memR+3
    clc
  _AA:
    lda #0
  _bb:
    adc #0
    sta memR+1
  _BB:
    lda #0
  _CC:
    adc #0
    sta memR+2
    bcc !+
    inc memR+3
    clc
  !:
  _cc:
    lda #0
    adc memR+1
    sta memR+1
  _dd:
    lda #0
    adc memR+2
    sta memR+2
    bcc !+
    inc memR+3
  !:
    // return *memR;
    // [46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR) -- vduz1=_deref_pduc1 
    lda memR
    sta.z return
    lda memR+1
    sta.z return+1
    lda memR+2
    sta.z return+2
    lda memR+3
    sta.z return+3
    // mulf16u::@return
    // }
    // [47] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
mulf_init: {
    // x/2
    .label c = 4
    // Counter used for determining x%2==0
    .label sqr1_hi = 5
    // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4
    .label sqr = $c
    .label sqr1_lo = 2
    // Decrease or increase x_255 - initially we decrease
    .label sqr2_hi = 9
    .label sqr2_lo = 7
    //Start with g(0)=f(255)
    .label dir = $b
    // [49] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
    // [49] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuxx=vbuc1 
    ldx #0
    // [49] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 
    lda #<mulf_sqr1_hi+1
    sta.z sqr1_hi
    lda #>mulf_sqr1_hi+1
    sta.z sqr1_hi+1
    // [49] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 
    txa
    sta.z sqr
    sta.z sqr+1
    // [49] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 
    sta.z c
    // [49] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 
    lda #<mulf_sqr1_lo+1
    sta.z sqr1_lo
    lda #>mulf_sqr1_lo+1
    sta.z sqr1_lo+1
    // mulf_init::@1
  __b1:
    // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++)
    // [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z sqr1_lo+1
    cmp #>mulf_sqr1_lo+$200
    bne __b2
    lda.z sqr1_lo
    cmp #<mulf_sqr1_lo+$200
    bne __b2
    // [51] phi from mulf_init::@1 to mulf_init::@5 [phi:mulf_init::@1->mulf_init::@5]
    // [51] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 
    lda #$ff
    sta.z dir
    // [51] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 
    lda #<mulf_sqr2_hi
    sta.z sqr2_hi
    lda #>mulf_sqr2_hi
    sta.z sqr2_hi+1
    // [51] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuxx=vbuc1 
    ldx #-1
    // [51] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 
    lda #<mulf_sqr2_lo
    sta.z sqr2_lo
    lda #>mulf_sqr2_lo
    sta.z sqr2_lo+1
    // mulf_init::@5
  __b5:
    // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++)
    // [52] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 
    lda.z sqr2_lo+1
    cmp #>mulf_sqr2_lo+$1ff
    bne __b6
    lda.z sqr2_lo
    cmp #<mulf_sqr2_lo+$1ff
    bne __b6
    // mulf_init::@7
    // *(mulf_sqr2_lo+511) = *(mulf_sqr1_lo+256)
    // [53] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 
    // Set the very last value g(511) = f(256)
    lda mulf_sqr1_lo+$100
    sta mulf_sqr2_lo+$1ff
    // *(mulf_sqr2_hi+511) = *(mulf_sqr1_hi+256)
    // [54] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 
    lda mulf_sqr1_hi+$100
    sta mulf_sqr2_hi+$1ff
    // mulf_init::@return
    // }
    // [55] return 
    rts
    // mulf_init::@6
  __b6:
    // *sqr2_lo = mulf_sqr1_lo[x_255]
    // [56] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda mulf_sqr1_lo,x
    ldy #0
    sta (sqr2_lo),y
    // *sqr2_hi++ = mulf_sqr1_hi[x_255]
    // [57] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx 
    lda mulf_sqr1_hi,x
    sta (sqr2_hi),y
    // *sqr2_hi++ = mulf_sqr1_hi[x_255];
    // [58] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr2_hi
    bne !+
    inc.z sqr2_hi+1
  !:
    // x_255 = x_255 + dir
    // [59] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuxx=vbuxx_plus_vbuz1 
    txa
    clc
    adc.z dir
    tax
    // if(x_255==0)
    // [60] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuxx_neq_0_then_la1 
    cpx #0
    bne __b8
    // [62] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8]
    // [62] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 
    lda #1
    sta.z dir
    // [61] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9]
    // mulf_init::@9
    // [62] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8]
    // [62] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy 
    // mulf_init::@8
  __b8:
    // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++)
    // [63] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr2_lo
    bne !+
    inc.z sqr2_lo+1
  !:
    // [51] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5]
    // [51] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy 
    // [51] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy 
    // [51] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy 
    // [51] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy 
    jmp __b5
    // mulf_init::@2
  __b2:
    // if((++c&1)==0)
    // [64] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 
    inc.z c
    // ++c&1
    // [65] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuaa=vbuz1_band_vbuc1 
    lda #1
    and.z c
    // if((++c&1)==0)
    // [66] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuaa_neq_0_then_la1 
    cmp #0
    bne __b3
    // mulf_init::@4
    // x_2++;
    // [67] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuxx=_inc_vbuxx 
    inx
    // sqr++;
    // [68] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 
    inc.z sqr
    bne !+
    inc.z sqr+1
  !:
    // [69] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3]
    // [69] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy 
    // [69] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy 
    // mulf_init::@3
  __b3:
    // <sqr
    // [70] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuaa=_lo_vwuz1 
    lda.z sqr
    // *sqr1_lo = <sqr
    // [71] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (sqr1_lo),y
    // >sqr
    // [72] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuaa=_hi_vwuz1 
    lda.z sqr+1
    // *sqr1_hi++ = >sqr
    // [73] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuaa 
    sta (sqr1_hi),y
    // *sqr1_hi++ = >sqr;
    // [74] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr1_hi
    bne !+
    inc.z sqr1_hi+1
  !:
    // sqr = sqr + x_2
    // [75] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuxx 
    txa
    clc
    adc.z sqr
    sta.z sqr
    bcc !+
    inc.z sqr+1
  !:
    // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++)
    // [76] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 
    inc.z sqr1_lo
    bne !+
    inc.z sqr1_lo+1
  !:
    // [49] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1]
    // [49] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy 
    // [49] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy 
    // [49] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy 
    // [49] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy 
    // [49] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy 
    jmp __b1
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  // mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
  // <f(x) = <(( x * x )/4)
  .align $100
  mulf_sqr1_lo: .fill $200, 0
  // >f(x) = >(( x * x )/4)
  .align $100
  mulf_sqr1_hi: .fill $200, 0
  // <g(x) =  <((( x - 255) * ( x - 255 ))/4)
  .align $100
  mulf_sqr2_lo: .fill $200, 0
  // >g(x) = >((( x - 255) * ( x - 255 ))/4)
  .align $100
  mulf_sqr2_hi: .fill $200, 0

