Resolved forward reference mulf_sqr1 to (byte[$200]) mulf_sqr1
Resolved forward reference mulf_sqr2 to (byte[$200]) mulf_sqr2
Resolved forward reference PERSP_Z to (signed byte[$100]) PERSP_Z
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*) 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 (signed byte*) xr
Identified constant variable (signed byte*) yr
Identified constant variable (signed byte*) zr
Identified constant variable (word*) psp1
Identified constant variable (word*) psp2
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
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) memset::@7
Culled Empty Block (label) memset::@6
Culled Empty Block (label) memset::@8
Culled Empty Block (label) memset::@9
Culled Empty Block (label) memset::@3
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) @13
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) print_str::@4
Culled Empty Block (label) print_str::@3
Culled Empty Block (label) print_str::@5
Culled Empty Block (label) print_str::@6
Culled Empty Block (label) @19
Culled Empty Block (label) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) print_sbyte::@4
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) @34
Culled Empty Block (label) @35
Culled Empty Block (label) @36
Culled Empty Block (label) @37
Culled Empty Block (label) @38
Culled Empty Block (label) @39
Culled Empty Block (label) @41
Culled Empty Block (label) @42
Culled Empty Block (label) mulf_init::@2

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@16
memset: scope:[memset]  from print_cls
  (byte) memset::c#4 ← phi( print_cls/(byte) memset::c#0 )
  (void*) memset::str#3 ← phi( print_cls/(void*) memset::str#0 )
  (word) memset::num#1 ← phi( print_cls/(word) memset::num#0 )
  (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
  (bool~) memset::$1 ← ! (bool~) memset::$0
  if((bool~) memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@4
  (void*) memset::str#1 ← phi( memset/(void*) memset::str#3 memset::@4/(void*) memset::str#4 )
  (void*) memset::return#0 ← (void*) memset::str#1
  to:memset::@return
memset::@2: scope:[memset]  from memset
  (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 )
  (word) memset::num#2 ← phi( memset/(word) memset::num#1 )
  (void*) memset::str#2 ← phi( memset/(void*) memset::str#3 )
  (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#2
  (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#2
  (byte*) memset::end#0 ← (byte*~) memset::$3
  (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2
  to:memset::@4
memset::@4: scope:[memset]  from memset::@2 memset::@5
  (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@5/(byte) memset::c#1 )
  (void*) memset::str#4 ← phi( memset::@2/(void*) memset::str#2 memset::@5/(void*) memset::str#5 )
  (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@5/(byte*) memset::end#2 )
  (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@5/(byte*) memset::dst#1 )
  (bool~) memset::$4 ← (byte*) memset::dst#2 != (byte*) memset::end#1
  if((bool~) memset::$4) goto memset::@5
  to:memset::@1
memset::@5: scope:[memset]  from memset::@4
  (void*) memset::str#5 ← phi( memset::@4/(void*) memset::str#4 )
  (byte*) memset::end#2 ← phi( memset::@4/(byte*) memset::end#1 )
  (byte*) memset::dst#3 ← phi( memset::@4/(byte*) memset::dst#2 )
  (byte) memset::c#1 ← phi( memset::@4/(byte) memset::c#2 )
  *((byte*) memset::dst#3) ← (byte) memset::c#1
  (byte*) memset::dst#1 ← ++ (byte*) memset::dst#3
  to:memset::@4
memset::@return: scope:[memset]  from memset::@1
  (void*) memset::return#3 ← phi( memset::@1/(void*) memset::return#0 )
  (void*) memset::return#1 ← (void*) memset::return#3
  return 
  to:@return
@16: 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:@33
print_str: scope:[print_str]  from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9
  (byte*) print_char_cursor#74 ← phi( do_perspective/(byte*) print_char_cursor#71 do_perspective::@11/(byte*) print_char_cursor#28 do_perspective::@2/(byte*) print_char_cursor#20 do_perspective::@4/(byte*) print_char_cursor#22 do_perspective::@6/(byte*) print_char_cursor#24 do_perspective::@9/(byte*) print_char_cursor#26 )
  (byte*) print_str::str#9 ← phi( do_perspective/(byte*) print_str::str#1 do_perspective::@11/(byte*) print_str::str#6 do_perspective::@2/(byte*) print_str::str#2 do_perspective::@4/(byte*) print_str::str#3 do_perspective::@6/(byte*) print_str::str#4 do_perspective::@9/(byte*) print_str::str#5 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  (byte*) print_char_cursor#64 ← phi( print_str/(byte*) print_char_cursor#74 print_str::@2/(byte*) print_char_cursor#1 )
  (byte*) print_str::str#7 ← phi( print_str/(byte*) print_str::str#9 print_str::@2/(byte*) print_str::str#0 )
  (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#7)
  if((bool~) print_str::$0) goto print_str::@2
  to:print_str::@return
print_str::@2: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#33 ← phi( print_str::@1/(byte*) print_char_cursor#64 )
  (byte*) print_str::str#8 ← phi( print_str::@1/(byte*) print_str::str#7 )
  *((byte*) print_char_cursor#33) ← *((byte*) print_str::str#8)
  (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#33
  (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8
  to:print_str::@1
print_str::@return: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#34 ← phi( print_str::@1/(byte*) print_char_cursor#64 )
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#34
  return 
  to:@return
print_ln: scope:[print_ln]  from do_perspective::@12
  (byte*) print_char_cursor#65 ← phi( do_perspective::@12/(byte*) print_char_cursor#29 )
  (byte*) print_line_cursor#21 ← phi( do_perspective::@12/(byte*) print_line_cursor#23 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#35 ← phi( print_ln/(byte*) print_char_cursor#65 print_ln::@1/(byte*) print_char_cursor#35 )
  (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#11 + (number) $28
  (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#35
  if((bool~) print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  (byte*) print_line_cursor#12 ← phi( print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#3 ← (byte*) print_line_cursor#12
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#36 ← phi( print_ln::@2/(byte*) print_char_cursor#3 )
  (byte*) print_line_cursor#13 ← phi( print_ln::@2/(byte*) print_line_cursor#12 )
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#13
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#36
  return 
  to:@return
print_sbyte: scope:[print_sbyte]  from do_perspective::@1 do_perspective::@3 do_perspective::@5
  (byte*) print_char_cursor#75 ← phi( do_perspective::@1/(byte*) print_char_cursor#19 do_perspective::@3/(byte*) print_char_cursor#21 do_perspective::@5/(byte*) print_char_cursor#23 )
  (signed byte) print_sbyte::b#4 ← phi( do_perspective::@1/(signed byte) print_sbyte::b#1 do_perspective::@3/(signed byte) print_sbyte::b#2 do_perspective::@5/(signed byte) print_sbyte::b#3 )
  (bool~) print_sbyte::$0 ← (signed byte) print_sbyte::b#4 < (number) 0
  if((bool~) print_sbyte::$0) goto print_sbyte::@1
  to:print_sbyte::@3
print_sbyte::@1: scope:[print_sbyte]  from print_sbyte
  (signed byte) print_sbyte::b#7 ← phi( print_sbyte/(signed byte) print_sbyte::b#4 )
  (byte*) print_char_cursor#66 ← phi( print_sbyte/(byte*) print_char_cursor#75 )
  (byte) print_char::ch#0 ← (byte) '-'
  call print_char 
  to:print_sbyte::@5
print_sbyte::@5: scope:[print_sbyte]  from print_sbyte::@1
  (signed byte) print_sbyte::b#5 ← phi( print_sbyte::@1/(signed byte) print_sbyte::b#7 )
  (byte*) print_char_cursor#37 ← phi( print_sbyte::@1/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#37
  (signed byte~) print_sbyte::$5 ← - (signed byte) print_sbyte::b#5
  (signed byte) print_sbyte::b#0 ← (signed byte~) print_sbyte::$5
  to:print_sbyte::@2
print_sbyte::@3: scope:[print_sbyte]  from print_sbyte
  (signed byte) print_sbyte::b#9 ← phi( print_sbyte/(signed byte) print_sbyte::b#4 )
  (byte*) print_char_cursor#67 ← phi( print_sbyte/(byte*) print_char_cursor#75 )
  (byte) print_char::ch#1 ← (byte) ' '
  call print_char 
  to:print_sbyte::@6
print_sbyte::@6: scope:[print_sbyte]  from print_sbyte::@3
  (signed byte) print_sbyte::b#8 ← phi( print_sbyte::@3/(signed byte) print_sbyte::b#9 )
  (byte*) print_char_cursor#38 ← phi( print_sbyte::@3/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#38
  to:print_sbyte::@2
print_sbyte::@2: scope:[print_sbyte]  from print_sbyte::@5 print_sbyte::@6
  (byte*) print_char_cursor#68 ← phi( print_sbyte::@5/(byte*) print_char_cursor#5 print_sbyte::@6/(byte*) print_char_cursor#6 )
  (signed byte) print_sbyte::b#6 ← phi( print_sbyte::@5/(signed byte) print_sbyte::b#0 print_sbyte::@6/(signed byte) print_sbyte::b#8 )
  (byte~) print_sbyte::$1 ← ((byte)) (signed byte) print_sbyte::b#6
  (byte) print_byte::b#0 ← (byte~) print_sbyte::$1
  call print_byte 
  to:print_sbyte::@7
print_sbyte::@7: scope:[print_sbyte]  from print_sbyte::@2
  (byte*) print_char_cursor#39 ← phi( print_sbyte::@2/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#39
  to:print_sbyte::@return
print_sbyte::@return: scope:[print_sbyte]  from print_sbyte::@7
  (byte*) print_char_cursor#40 ← phi( print_sbyte::@7/(byte*) print_char_cursor#7 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#40
  return 
  to:@return
@33: scope:[]  from @16
  (byte*) print_screen#8 ← phi( @16/(byte*) print_screen#0 )
  (byte*) print_char_cursor#79 ← phi( @16/(byte*) print_char_cursor#0 )
  (byte*) print_line_cursor#30 ← phi( @16/(byte*) print_line_cursor#0 )
  (byte[]) print_hextab#0 ← (const string) $0
  to:@40
print_byte: scope:[print_byte]  from do_perspective::@10 do_perspective::@8 print_sbyte::@2
  (byte*) print_char_cursor#69 ← phi( do_perspective::@10/(byte*) print_char_cursor#27 do_perspective::@8/(byte*) print_char_cursor#72 print_sbyte::@2/(byte*) print_char_cursor#68 )
  (byte) print_byte::b#3 ← phi( do_perspective::@10/(byte) print_byte::b#2 do_perspective::@8/(byte) print_byte::b#1 print_sbyte::@2/(byte) print_byte::b#0 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (number) 4
  (byte) print_char::ch#2 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#4 ← phi( print_byte/(byte) print_byte::b#3 )
  (byte*) print_char_cursor#41 ← phi( print_byte/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#41
  (number~) print_byte::$2 ← (byte) print_byte::b#4 & (number) $f
  (byte) print_char::ch#3 ← *((byte[]) print_hextab#0 + (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#42 ← phi( print_byte::@1/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#42
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#43 ← phi( print_byte::@2/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#43
  return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3
  (byte*) print_char_cursor#44 ← phi( print_byte/(byte*) print_char_cursor#69 print_byte::@1/(byte*) print_char_cursor#9 print_sbyte::@1/(byte*) print_char_cursor#66 print_sbyte::@3/(byte*) print_char_cursor#67 )
  (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) print_char::ch#0 print_sbyte::@3/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4
  (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#45 ← phi( print_char/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#45
  return 
  to:@return
print_cls: scope:[print_cls]  from main::@1
  (byte*) print_screen#1 ← phi( main::@1/(byte*) print_screen#3 )
  (void*) memset::str#0 ← (void*)(byte*) print_screen#1
  (byte) memset::c#0 ← (byte) ' '
  (word) memset::num#0 ← (number) $3e8
  call memset 
  (void*) memset::return#2 ← (void*) memset::return#1
  to:print_cls::@1
print_cls::@1: scope:[print_cls]  from print_cls
  (byte*) print_screen#2 ← phi( print_cls/(byte*) print_screen#1 )
  (byte*) print_line_cursor#3 ← (byte*) print_screen#2
  (byte*) print_char_cursor#14 ← (byte*) print_line_cursor#3
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls::@1
  (byte*) print_char_cursor#46 ← phi( print_cls::@1/(byte*) print_char_cursor#14 )
  (byte*) print_line_cursor#14 ← phi( print_cls::@1/(byte*) print_line_cursor#3 )
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#14
  (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#46
  return 
  to:@return
@40: scope:[]  from @33
  (byte*) print_screen#7 ← phi( @33/(byte*) print_screen#8 )
  (byte*) print_char_cursor#78 ← phi( @33/(byte*) print_char_cursor#79 )
  (byte*) print_line_cursor#29 ← phi( @33/(byte*) print_line_cursor#30 )
  (signed byte*) xr#0 ← ((signed byte*)) (number) $f0
  (signed byte*) yr#0 ← ((signed byte*)) (number) $f1
  (signed byte*) zr#0 ← ((signed byte*)) (number) $f2
  (word*) psp1#0 ← ((word*)) (number) $f3
  (word*) psp2#0 ← ((word*)) (number) $f5
  to:@43
main: scope:[main]  from @44
  (byte*) print_char_cursor#76 ← phi( @44/(byte*) print_char_cursor#73 )
  (byte*) print_line_cursor#25 ← phi( @44/(byte*) print_line_cursor#24 )
  (byte*) print_screen#4 ← phi( @44/(byte*) print_screen#5 )
  asm { sei  }
  call mulf_init 
  to:main::@1
main::@1: scope:[main]  from main
  (byte*) print_char_cursor#70 ← phi( main/(byte*) print_char_cursor#76 )
  (byte*) print_line_cursor#22 ← phi( main/(byte*) print_line_cursor#25 )
  (byte*) print_screen#3 ← phi( main/(byte*) print_screen#4 )
  (word~) main::$1 ← ((word)) (byte[$200]) mulf_sqr1#0
  *((word*) psp1#0) ← (word~) main::$1
  (word~) main::$2 ← ((word)) (byte[$200]) mulf_sqr2#0
  *((word*) psp2#0) ← (word~) main::$2
  call print_cls 
  to:main::@2
main::@2: scope:[main]  from main::@1
  (byte*) print_char_cursor#47 ← phi( main::@1/(byte*) print_char_cursor#15 )
  (byte*) print_line_cursor#15 ← phi( main::@1/(byte*) print_line_cursor#4 )
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#15
  (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#47
  (signed byte) do_perspective::x#0 ← (number) $39
  (signed byte) do_perspective::y#0 ← (number) -$47
  (signed byte) do_perspective::z#0 ← (number) $36
  call do_perspective 
  to:main::@3
main::@3: scope:[main]  from main::@2
  (byte*) print_line_cursor#16 ← phi( main::@2/(byte*) print_line_cursor#9 )
  (byte*) print_char_cursor#48 ← phi( main::@2/(byte*) print_char_cursor#31 )
  (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#48
  (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#16
  to:main::@return
main::@return: scope:[main]  from main::@3
  (byte*) print_char_cursor#49 ← phi( main::@3/(byte*) print_char_cursor#17 )
  (byte*) print_line_cursor#17 ← phi( main::@3/(byte*) print_line_cursor#6 )
  (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#17
  (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#49
  return 
  to:@return
do_perspective: scope:[do_perspective]  from main::@2
  (byte*) print_line_cursor#40 ← phi( main::@2/(byte*) print_line_cursor#5 )
  (signed byte) do_perspective::z#8 ← phi( main::@2/(signed byte) do_perspective::z#0 )
  (signed byte) do_perspective::y#7 ← phi( main::@2/(signed byte) do_perspective::y#0 )
  (signed byte) do_perspective::x#3 ← phi( main::@2/(signed byte) do_perspective::x#0 )
  (byte*) print_char_cursor#71 ← phi( main::@2/(byte*) print_char_cursor#16 )
  (byte*) print_str::str#1 ← (const string) do_perspective::str
  call print_str 
  to:do_perspective::@1
do_perspective::@1: scope:[do_perspective]  from do_perspective
  (byte*) print_line_cursor#39 ← phi( do_perspective/(byte*) print_line_cursor#40 )
  (signed byte) do_perspective::z#7 ← phi( do_perspective/(signed byte) do_perspective::z#8 )
  (signed byte) do_perspective::y#5 ← phi( do_perspective/(signed byte) do_perspective::y#7 )
  (signed byte) do_perspective::x#1 ← phi( do_perspective/(signed byte) do_perspective::x#3 )
  (byte*) print_char_cursor#50 ← phi( do_perspective/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#19 ← (byte*) print_char_cursor#50
  (signed byte) print_sbyte::b#1 ← (signed byte) do_perspective::x#1
  call print_sbyte 
  to:do_perspective::@2
do_perspective::@2: scope:[do_perspective]  from do_perspective::@1
  (byte*) print_line_cursor#38 ← phi( do_perspective::@1/(byte*) print_line_cursor#39 )
  (signed byte) do_perspective::x#8 ← phi( do_perspective::@1/(signed byte) do_perspective::x#1 )
  (signed byte) do_perspective::z#6 ← phi( do_perspective::@1/(signed byte) do_perspective::z#7 )
  (signed byte) do_perspective::y#3 ← phi( do_perspective::@1/(signed byte) do_perspective::y#5 )
  (byte*) print_char_cursor#51 ← phi( do_perspective::@1/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#51
  (byte*) print_str::str#2 ← (const string) do_perspective::str1
  call print_str 
  to:do_perspective::@3
do_perspective::@3: scope:[do_perspective]  from do_perspective::@2
  (byte*) print_line_cursor#37 ← phi( do_perspective::@2/(byte*) print_line_cursor#38 )
  (signed byte) do_perspective::x#7 ← phi( do_perspective::@2/(signed byte) do_perspective::x#8 )
  (signed byte) do_perspective::z#5 ← phi( do_perspective::@2/(signed byte) do_perspective::z#6 )
  (signed byte) do_perspective::y#1 ← phi( do_perspective::@2/(signed byte) do_perspective::y#3 )
  (byte*) print_char_cursor#52 ← phi( do_perspective::@2/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#21 ← (byte*) print_char_cursor#52
  (signed byte) print_sbyte::b#2 ← (signed byte) do_perspective::y#1
  call print_sbyte 
  to:do_perspective::@4
do_perspective::@4: scope:[do_perspective]  from do_perspective::@3
  (byte*) print_line_cursor#36 ← phi( do_perspective::@3/(byte*) print_line_cursor#37 )
  (signed byte) do_perspective::y#8 ← phi( do_perspective::@3/(signed byte) do_perspective::y#1 )
  (signed byte) do_perspective::x#6 ← phi( do_perspective::@3/(signed byte) do_perspective::x#7 )
  (signed byte) do_perspective::z#3 ← phi( do_perspective::@3/(signed byte) do_perspective::z#5 )
  (byte*) print_char_cursor#53 ← phi( do_perspective::@3/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#53
  (byte*) print_str::str#3 ← (const string) do_perspective::str2
  call print_str 
  to:do_perspective::@5
do_perspective::@5: scope:[do_perspective]  from do_perspective::@4
  (byte*) print_line_cursor#35 ← phi( do_perspective::@4/(byte*) print_line_cursor#36 )
  (signed byte) do_perspective::y#6 ← phi( do_perspective::@4/(signed byte) do_perspective::y#8 )
  (signed byte) do_perspective::x#5 ← phi( do_perspective::@4/(signed byte) do_perspective::x#6 )
  (signed byte) do_perspective::z#1 ← phi( do_perspective::@4/(signed byte) do_perspective::z#3 )
  (byte*) print_char_cursor#54 ← phi( do_perspective::@4/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#23 ← (byte*) print_char_cursor#54
  (signed byte) print_sbyte::b#3 ← (signed byte) do_perspective::z#1
  call print_sbyte 
  to:do_perspective::@6
do_perspective::@6: scope:[do_perspective]  from do_perspective::@5
  (byte*) print_line_cursor#34 ← phi( do_perspective::@5/(byte*) print_line_cursor#35 )
  (signed byte) do_perspective::z#4 ← phi( do_perspective::@5/(signed byte) do_perspective::z#1 )
  (signed byte) do_perspective::y#4 ← phi( do_perspective::@5/(signed byte) do_perspective::y#6 )
  (signed byte) do_perspective::x#4 ← phi( do_perspective::@5/(signed byte) do_perspective::x#5 )
  (byte*) print_char_cursor#55 ← phi( do_perspective::@5/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#24 ← (byte*) print_char_cursor#55
  (byte*) print_str::str#4 ← (const string) do_perspective::str3
  call print_str 
  to:do_perspective::@7
do_perspective::@7: scope:[do_perspective]  from do_perspective::@6
  (byte*) print_line_cursor#33 ← phi( do_perspective::@6/(byte*) print_line_cursor#34 )
  (signed byte) do_perspective::z#2 ← phi( do_perspective::@6/(signed byte) do_perspective::z#4 )
  (signed byte) do_perspective::y#2 ← phi( do_perspective::@6/(signed byte) do_perspective::y#4 )
  (signed byte) do_perspective::x#2 ← phi( do_perspective::@6/(signed byte) do_perspective::x#4 )
  (byte*) print_char_cursor#56 ← phi( do_perspective::@6/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#25 ← (byte*) print_char_cursor#56
  (signed byte) perspective::x#0 ← (signed byte) do_perspective::x#2
  (signed byte) perspective::y#0 ← (signed byte) do_perspective::y#2
  (signed byte) perspective::z#0 ← (signed byte) do_perspective::z#2
  call perspective 
  to:do_perspective::@8
do_perspective::@8: scope:[do_perspective]  from do_perspective::@7
  (byte*) print_line_cursor#32 ← phi( do_perspective::@7/(byte*) print_line_cursor#33 )
  (byte*) print_char_cursor#72 ← phi( do_perspective::@7/(byte*) print_char_cursor#25 )
  (byte~) do_perspective::$8 ← ((byte)) *((signed byte*) xr#0)
  (byte) print_byte::b#1 ← (byte~) do_perspective::$8
  call print_byte 
  to:do_perspective::@9
do_perspective::@9: scope:[do_perspective]  from do_perspective::@8
  (byte*) print_line_cursor#31 ← phi( do_perspective::@8/(byte*) print_line_cursor#32 )
  (byte*) print_char_cursor#57 ← phi( do_perspective::@8/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#26 ← (byte*) print_char_cursor#57
  (byte*) print_str::str#5 ← (const string) do_perspective::str4
  call print_str 
  to:do_perspective::@10
do_perspective::@10: scope:[do_perspective]  from do_perspective::@9
  (byte*) print_line_cursor#28 ← phi( do_perspective::@9/(byte*) print_line_cursor#31 )
  (byte*) print_char_cursor#58 ← phi( do_perspective::@9/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#27 ← (byte*) print_char_cursor#58
  (byte~) do_perspective::$11 ← ((byte)) *((signed byte*) yr#0)
  (byte) print_byte::b#2 ← (byte~) do_perspective::$11
  call print_byte 
  to:do_perspective::@11
do_perspective::@11: scope:[do_perspective]  from do_perspective::@10
  (byte*) print_line_cursor#26 ← phi( do_perspective::@10/(byte*) print_line_cursor#28 )
  (byte*) print_char_cursor#59 ← phi( do_perspective::@10/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#28 ← (byte*) print_char_cursor#59
  (byte*) print_str::str#6 ← (const string) do_perspective::str5
  call print_str 
  to:do_perspective::@12
do_perspective::@12: scope:[do_perspective]  from do_perspective::@11
  (byte*) print_line_cursor#23 ← phi( do_perspective::@11/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#60 ← phi( do_perspective::@11/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#29 ← (byte*) print_char_cursor#60
  call print_ln 
  to:do_perspective::@13
do_perspective::@13: scope:[do_perspective]  from do_perspective::@12
  (byte*) print_char_cursor#61 ← phi( do_perspective::@12/(byte*) print_char_cursor#4 )
  (byte*) print_line_cursor#18 ← phi( do_perspective::@12/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#8 ← (byte*) print_line_cursor#18
  (byte*) print_char_cursor#30 ← (byte*) print_char_cursor#61
  to:do_perspective::@return
do_perspective::@return: scope:[do_perspective]  from do_perspective::@13
  (byte*) print_line_cursor#19 ← phi( do_perspective::@13/(byte*) print_line_cursor#8 )
  (byte*) print_char_cursor#62 ← phi( do_perspective::@13/(byte*) print_char_cursor#30 )
  (byte*) print_char_cursor#31 ← (byte*) print_char_cursor#62
  (byte*) print_line_cursor#9 ← (byte*) print_line_cursor#19
  return 
  to:@return
perspective: scope:[perspective]  from do_perspective::@7
  (signed byte) perspective::z#1 ← phi( do_perspective::@7/(signed byte) perspective::z#0 )
  (signed byte) perspective::y#1 ← phi( do_perspective::@7/(signed byte) perspective::y#0 )
  (signed byte) perspective::x#1 ← phi( do_perspective::@7/(signed byte) perspective::x#0 )
  *((signed byte*) xr#0) ← (signed byte) perspective::x#1
  *((signed byte*) yr#0) ← (signed byte) perspective::y#1
  *((signed byte*) zr#0) ← (signed byte) perspective::z#1
  asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  }
  to:perspective::@return
perspective::@return: scope:[perspective]  from perspective
  return 
  to:@return
@43: scope:[]  from @40
  (byte*) print_screen#6 ← phi( @40/(byte*) print_screen#7 )
  (byte*) print_char_cursor#77 ← phi( @40/(byte*) print_char_cursor#78 )
  (byte*) print_line_cursor#27 ← phi( @40/(byte*) print_line_cursor#29 )
  (byte[$200]) mulf_sqr1#0 ← { fill( $200, 0) }
  (byte[$200]) mulf_sqr2#0 ← { fill( $200, 0) }
  to:@44
mulf_init: scope:[mulf_init]  from main
  (signed word) mulf_init::sqr#0 ← (number) 0
  (signed word) mulf_init::add#0 ← (number) 1
  (byte) mulf_init::i#0 ← (byte) 0
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@1
  (signed word) mulf_init::add#2 ← phi( mulf_init/(signed word) mulf_init::add#0 mulf_init::@1/(signed word) mulf_init::add#1 )
  (byte) mulf_init::i#2 ← phi( mulf_init/(byte) mulf_init::i#0 mulf_init::@1/(byte) mulf_init::i#1 )
  (signed word) mulf_init::sqr#2 ← phi( mulf_init/(signed word) mulf_init::sqr#0 mulf_init::@1/(signed word) mulf_init::sqr#1 )
  (byte~) mulf_init::$0 ← > (signed word) mulf_init::sqr#2
  (byte) mulf_init::val#0 ← (byte~) mulf_init::$0
  *((byte[$200]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$1 ← (byte[$200]) mulf_sqr1#0 + (number) $100
  *((byte*~) mulf_init::$1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2
  *((byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$3 ← (byte[$200]) mulf_sqr1#0 + (number) $100
  (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2
  *((byte*~) mulf_init::$3 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0
  (number~) mulf_init::$5 ← (byte) mulf_init::i#2 + (number) 1
  *((byte[$200]) mulf_sqr2#0 + (number~) mulf_init::$5) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$6 ← (byte[$200]) mulf_sqr2#0 + (number) $100
  (number~) mulf_init::$7 ← (byte) mulf_init::i#2 + (number) 1
  *((byte*~) mulf_init::$6 + (number~) mulf_init::$7) ← (byte) mulf_init::val#0
  (number~) mulf_init::$8 ← (number) 1 - (byte) mulf_init::i#2
  *((byte[$200]) mulf_sqr2#0 + (number~) mulf_init::$8) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$9 ← (byte[$200]) mulf_sqr2#0 + (number) $100
  (number~) mulf_init::$10 ← (number) 1 - (byte) mulf_init::i#2
  *((byte*~) mulf_init::$9 + (number~) mulf_init::$10) ← (byte) mulf_init::val#0
  (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2
  (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (number) 2
  (byte) mulf_init::i#1 ← (byte) mulf_init::i#2 + rangenext(0,$80)
  (bool~) mulf_init::$11 ← (byte) mulf_init::i#1 != rangelast(0,$80)
  if((bool~) mulf_init::$11) goto mulf_init::@1
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@1
  return 
  to:@return
@44: scope:[]  from @43
  (byte*) print_screen#5 ← phi( @43/(byte*) print_screen#6 )
  (byte*) print_char_cursor#73 ← phi( @43/(byte*) print_char_cursor#77 )
  (byte*) print_line_cursor#24 ← phi( @43/(byte*) print_line_cursor#27 )
  (signed byte[$100]) PERSP_Z#0 ← kickasm {{ {
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}
 }}
  call main 
  to:@45
@45: scope:[]  from @44
  (byte*) print_char_cursor#63 ← phi( @44/(byte*) print_char_cursor#18 )
  (byte*) print_line_cursor#20 ← phi( @44/(byte*) print_line_cursor#7 )
  (byte*) print_line_cursor#10 ← (byte*) print_line_cursor#20
  (byte*) print_char_cursor#32 ← (byte*) print_char_cursor#63
  to:@end
@end: scope:[]  from @45

SYMBOL TABLE SSA
(const string) $0 = (string) "0123456789abcdef"z
(label) @16
(label) @33
(label) @40
(label) @43
(label) @44
(label) @45
(label) @begin
(label) @end
(signed byte[$100]) PERSP_Z
(signed byte[$100]) PERSP_Z#0
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
(byte~) do_perspective::$11
(byte~) do_perspective::$8
(label) do_perspective::@1
(label) do_perspective::@10
(label) do_perspective::@11
(label) do_perspective::@12
(label) do_perspective::@13
(label) do_perspective::@2
(label) do_perspective::@3
(label) do_perspective::@4
(label) do_perspective::@5
(label) do_perspective::@6
(label) do_perspective::@7
(label) do_perspective::@8
(label) do_perspective::@9
(label) do_perspective::@return
(const string) do_perspective::str = (string) "("
(const string) do_perspective::str1 = (string) ","
(const string) do_perspective::str2 = (string) ","
(const string) do_perspective::str3 = (string) ") -> ("
(const string) do_perspective::str4 = (string) ","
(const string) do_perspective::str5 = (string) ")"
(signed byte) do_perspective::x
(signed byte) do_perspective::x#0
(signed byte) do_perspective::x#1
(signed byte) do_perspective::x#2
(signed byte) do_perspective::x#3
(signed byte) do_perspective::x#4
(signed byte) do_perspective::x#5
(signed byte) do_perspective::x#6
(signed byte) do_perspective::x#7
(signed byte) do_perspective::x#8
(signed byte) do_perspective::y
(signed byte) do_perspective::y#0
(signed byte) do_perspective::y#1
(signed byte) do_perspective::y#2
(signed byte) do_perspective::y#3
(signed byte) do_perspective::y#4
(signed byte) do_perspective::y#5
(signed byte) do_perspective::y#6
(signed byte) do_perspective::y#7
(signed byte) do_perspective::y#8
(signed byte) do_perspective::z
(signed byte) do_perspective::z#0
(signed byte) do_perspective::z#1
(signed byte) do_perspective::z#2
(signed byte) do_perspective::z#3
(signed byte) do_perspective::z#4
(signed byte) do_perspective::z#5
(signed byte) do_perspective::z#6
(signed byte) do_perspective::z#7
(signed byte) do_perspective::z#8
(void()) main()
(word~) main::$1
(word~) main::$2
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(bool~) memset::$0
(bool~) memset::$1
(byte*~) memset::$2
(byte*~) memset::$3
(bool~) memset::$4
(label) memset::@1
(label) memset::@2
(label) memset::@4
(label) memset::@5
(label) memset::@return
(byte) memset::c
(byte) memset::c#0
(byte) memset::c#1
(byte) memset::c#2
(byte) memset::c#3
(byte) memset::c#4
(byte*) memset::dst
(byte*) memset::dst#0
(byte*) memset::dst#1
(byte*) memset::dst#2
(byte*) memset::dst#3
(byte*) memset::end
(byte*) memset::end#0
(byte*) memset::end#1
(byte*) memset::end#2
(word) memset::num
(word) memset::num#0
(word) memset::num#1
(word) memset::num#2
(void*) memset::return
(void*) memset::return#0
(void*) memset::return#1
(void*) memset::return#2
(void*) memset::return#3
(void*) memset::str
(void*) memset::str#0
(void*) memset::str#1
(void*) memset::str#2
(void*) memset::str#3
(void*) memset::str#4
(void*) memset::str#5
(void()) mulf_init()
(byte~) mulf_init::$0
(byte*~) mulf_init::$1
(number~) mulf_init::$10
(bool~) mulf_init::$11
(byte~) mulf_init::$2
(byte*~) mulf_init::$3
(byte~) mulf_init::$4
(number~) mulf_init::$5
(byte*~) mulf_init::$6
(number~) mulf_init::$7
(number~) mulf_init::$8
(byte*~) mulf_init::$9
(label) mulf_init::@1
(label) mulf_init::@return
(signed word) mulf_init::add
(signed word) mulf_init::add#0
(signed word) mulf_init::add#1
(signed word) mulf_init::add#2
(byte) mulf_init::i
(byte) mulf_init::i#0
(byte) mulf_init::i#1
(byte) mulf_init::i#2
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#0
(signed word) mulf_init::sqr#1
(signed word) mulf_init::sqr#2
(byte) mulf_init::val
(byte) mulf_init::val#0
(byte[$200]) mulf_sqr1
(byte[$200]) mulf_sqr1#0
(byte[$200]) mulf_sqr2
(byte[$200]) mulf_sqr2#0
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
(label) perspective::@return
(signed byte) perspective::x
(signed byte) perspective::x#0
(signed byte) perspective::x#1
(signed byte) perspective::y
(signed byte) perspective::y#0
(signed byte) perspective::y#1
(signed byte) perspective::z
(signed byte) perspective::z#0
(signed byte) perspective::z#1
(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
(byte) print_byte::b#4
(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::ch#3
(byte) print_char::ch#4
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#40
(byte*) print_char_cursor#41
(byte*) print_char_cursor#42
(byte*) print_char_cursor#43
(byte*) print_char_cursor#44
(byte*) print_char_cursor#45
(byte*) print_char_cursor#46
(byte*) print_char_cursor#47
(byte*) print_char_cursor#48
(byte*) print_char_cursor#49
(byte*) print_char_cursor#5
(byte*) print_char_cursor#50
(byte*) print_char_cursor#51
(byte*) print_char_cursor#52
(byte*) print_char_cursor#53
(byte*) print_char_cursor#54
(byte*) print_char_cursor#55
(byte*) print_char_cursor#56
(byte*) print_char_cursor#57
(byte*) print_char_cursor#58
(byte*) print_char_cursor#59
(byte*) print_char_cursor#6
(byte*) print_char_cursor#60
(byte*) print_char_cursor#61
(byte*) print_char_cursor#62
(byte*) print_char_cursor#63
(byte*) print_char_cursor#64
(byte*) print_char_cursor#65
(byte*) print_char_cursor#66
(byte*) print_char_cursor#67
(byte*) print_char_cursor#68
(byte*) print_char_cursor#69
(byte*) print_char_cursor#7
(byte*) print_char_cursor#70
(byte*) print_char_cursor#71
(byte*) print_char_cursor#72
(byte*) print_char_cursor#73
(byte*) print_char_cursor#74
(byte*) print_char_cursor#75
(byte*) print_char_cursor#76
(byte*) print_char_cursor#77
(byte*) print_char_cursor#78
(byte*) print_char_cursor#79
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
(byte[]) print_hextab
(byte[]) print_hextab#0
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#18
(byte*) print_line_cursor#19
(byte*) print_line_cursor#2
(byte*) print_line_cursor#20
(byte*) print_line_cursor#21
(byte*) print_line_cursor#22
(byte*) print_line_cursor#23
(byte*) print_line_cursor#24
(byte*) print_line_cursor#25
(byte*) print_line_cursor#26
(byte*) print_line_cursor#27
(byte*) print_line_cursor#28
(byte*) print_line_cursor#29
(byte*) print_line_cursor#3
(byte*) print_line_cursor#30
(byte*) print_line_cursor#31
(byte*) print_line_cursor#32
(byte*) print_line_cursor#33
(byte*) print_line_cursor#34
(byte*) print_line_cursor#35
(byte*) print_line_cursor#36
(byte*) print_line_cursor#37
(byte*) print_line_cursor#38
(byte*) print_line_cursor#39
(byte*) print_line_cursor#4
(byte*) print_line_cursor#40
(byte*) print_line_cursor#5
(byte*) print_line_cursor#6
(byte*) print_line_cursor#7
(byte*) print_line_cursor#8
(byte*) print_line_cursor#9
(void()) print_ln()
(byte*~) print_ln::$0
(bool~) print_ln::$1
(label) print_ln::@1
(label) print_ln::@2
(label) print_ln::@return
(void()) print_sbyte((signed byte) print_sbyte::b)
(bool~) print_sbyte::$0
(byte~) print_sbyte::$1
(signed byte~) print_sbyte::$5
(label) print_sbyte::@1
(label) print_sbyte::@2
(label) print_sbyte::@3
(label) print_sbyte::@5
(label) print_sbyte::@6
(label) print_sbyte::@7
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0
(signed byte) print_sbyte::b#1
(signed byte) print_sbyte::b#2
(signed byte) print_sbyte::b#3
(signed byte) print_sbyte::b#4
(signed byte) print_sbyte::b#5
(signed byte) print_sbyte::b#6
(signed byte) print_sbyte::b#7
(signed byte) print_sbyte::b#8
(signed byte) print_sbyte::b#9
(byte*) print_screen
(byte*) print_screen#0
(byte*) print_screen#1
(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
(void()) print_str((byte*) print_str::str)
(bool~) print_str::$0
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0
(byte*) print_str::str#1
(byte*) print_str::str#2
(byte*) print_str::str#3
(byte*) print_str::str#4
(byte*) print_str::str#5
(byte*) print_str::str#6
(byte*) print_str::str#7
(byte*) print_str::str#8
(byte*) print_str::str#9
(word*) psp1
(word*) psp1#0
(word*) psp2
(word*) psp2#0
(signed byte*) xr
(signed byte*) xr#0
(signed byte*) yr
(signed byte*) yr#0
(signed byte*) zr
(signed byte*) zr#0

Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0
Adding number conversion cast (unumber) 0 in (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#7)
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#11 + (number) $28
Adding number conversion cast (snumber) 0 in (bool~) print_sbyte::$0 ← (signed byte) print_sbyte::b#4 < (number) 0
Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (number) 4
Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte) print_byte::b#4 & (number) $f
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#4 & (unumber)(number) $f
Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8
Adding number conversion cast (snumber) $39 in (signed byte) do_perspective::x#0 ← (number) $39
Adding number conversion cast (snumber) -$47 in (signed byte) do_perspective::y#0 ← (number) -$47
Adding number conversion cast (snumber) $36 in (signed byte) do_perspective::z#0 ← (number) $36
Adding number conversion cast (snumber) 0 in (signed word) mulf_init::sqr#0 ← (number) 0
Adding number conversion cast (snumber) 1 in (signed word) mulf_init::add#0 ← (number) 1
Adding number conversion cast (unumber) $100 in (byte*~) mulf_init::$1 ← (byte[$200]) mulf_sqr1#0 + (number) $100
Adding number conversion cast (unumber) $100 in (byte*~) mulf_init::$3 ← (byte[$200]) mulf_sqr1#0 + (number) $100
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$5 ← (byte) mulf_init::i#2 + (number) 1
Adding number conversion cast (unumber) mulf_init::$5 in (number~) mulf_init::$5 ← (byte) mulf_init::i#2 + (unumber)(number) 1
Adding number conversion cast (unumber) $100 in (byte*~) mulf_init::$6 ← (byte[$200]) mulf_sqr2#0 + (number) $100
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$7 ← (byte) mulf_init::i#2 + (number) 1
Adding number conversion cast (unumber) mulf_init::$7 in (number~) mulf_init::$7 ← (byte) mulf_init::i#2 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$8 ← (number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) mulf_init::$8 in (number~) mulf_init::$8 ← (unumber)(number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) $100 in (byte*~) mulf_init::$9 ← (byte[$200]) mulf_sqr2#0 + (number) $100
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$10 ← (number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) mulf_init::$10 in (number~) mulf_init::$10 ← (unumber)(number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (snumber) 2 in (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (number) 2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Inlining cast (byte~) print_sbyte::$1 ← (byte)(signed byte) print_sbyte::b#6
Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (signed byte*) xr#0 ← (signed byte*)(number) $f0
Inlining cast (signed byte*) yr#0 ← (signed byte*)(number) $f1
Inlining cast (signed byte*) zr#0 ← (signed byte*)(number) $f2
Inlining cast (word*) psp1#0 ← (word*)(number) $f3
Inlining cast (word*) psp2#0 ← (word*)(number) $f5
Inlining cast (word~) main::$1 ← (word)(byte[$200]) mulf_sqr1#0
Inlining cast (word~) main::$2 ← (word)(byte[$200]) mulf_sqr2#0
Inlining cast (signed byte) do_perspective::x#0 ← (snumber)(number) $39
Inlining cast (signed byte) do_perspective::y#0 ← (snumber)(number) -$47
Inlining cast (signed byte) do_perspective::z#0 ← (snumber)(number) $36
Inlining cast (byte~) do_perspective::$8 ← (byte)*((signed byte*) xr#0)
Inlining cast (byte~) do_perspective::$11 ← (byte)*((signed byte*) yr#0)
Inlining cast (signed word) mulf_init::sqr#0 ← (snumber)(number) 0
Inlining cast (signed word) mulf_init::add#0 ← (snumber)(number) 1
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $3e8
Simplifying constant pointer cast (signed byte*) 240
Simplifying constant pointer cast (signed byte*) 241
Simplifying constant pointer cast (signed byte*) 242
Simplifying constant pointer cast (word*) 243
Simplifying constant pointer cast (word*) 245
Simplifying constant integer cast $39
Simplifying constant integer cast -$47
Simplifying constant integer cast $36
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast $100
Simplifying constant integer cast $100
Simplifying constant integer cast 1
Simplifying constant integer cast $100
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast $100
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Finalized unsigned number type (word) $3e8
Finalized signed number type (signed byte) $39
Finalized signed number type (signed byte) -$47
Finalized signed number type (signed byte) $36
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 1
Finalized unsigned number type (word) $100
Finalized unsigned number type (word) $100
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $100
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Finalized unsigned number type (word) $100
Finalized unsigned number type (byte) 1
Finalized signed number type (signed byte) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#4 & (byte) $f
Inferred type updated to byte in (unumber~) mulf_init::$5 ← (byte) mulf_init::i#2 + (byte) 1
Inferred type updated to byte in (unumber~) mulf_init::$7 ← (byte) mulf_init::i#2 + (byte) 1
Inferred type updated to byte in (unumber~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2
Inferred type updated to byte in (unumber~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2
Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1 
Alias (void*) memset::str#2 = (void*) memset::str#3 
Alias (word) memset::num#1 = (word) memset::num#2 
Alias (byte) memset::c#3 = (byte) memset::c#4 
Alias (byte*) memset::end#0 = (byte*~) memset::$3 
Alias (byte) memset::c#1 = (byte) memset::c#2 
Alias (byte*) memset::dst#2 = (byte*) memset::dst#3 
Alias (byte*) memset::end#1 = (byte*) memset::end#2 
Alias (void*) memset::str#4 = (void*) memset::str#5 
Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#30 (byte*) print_char_cursor#79 (byte*) print_screen#8 (byte*) print_line_cursor#29 (byte*) print_char_cursor#78 (byte*) print_screen#7 (byte*) print_line_cursor#27 (byte*) print_char_cursor#77 (byte*) print_screen#6 (byte*) print_line_cursor#24 (byte*) print_char_cursor#73 (byte*) print_screen#5 
Alias (byte*) print_str::str#7 = (byte*) print_str::str#8 
Alias (byte*) print_char_cursor#2 = (byte*) print_char_cursor#33 (byte*) print_char_cursor#64 (byte*) print_char_cursor#34 
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#12 (byte*) print_char_cursor#3 (byte*) print_line_cursor#13 (byte*) print_char_cursor#36 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 
Alias (byte*) print_char_cursor#66 = (byte*) print_char_cursor#75 (byte*) print_char_cursor#67 
Alias (signed byte) print_sbyte::b#4 = (signed byte) print_sbyte::b#7 (signed byte) print_sbyte::b#5 (signed byte) print_sbyte::b#9 (signed byte) print_sbyte::b#8 
Alias (byte*) print_char_cursor#37 = (byte*) print_char_cursor#5 
Alias (signed byte) print_sbyte::b#0 = (signed byte~) print_sbyte::$5 
Alias (byte*) print_char_cursor#38 = (byte*) print_char_cursor#6 
Alias (byte) print_byte::b#0 = (byte~) print_sbyte::$1 
Alias (byte*) print_char_cursor#39 = (byte*) print_char_cursor#7 (byte*) print_char_cursor#40 (byte*) print_char_cursor#8 
Alias (byte) print_byte::b#3 = (byte) print_byte::b#4 
Alias (byte*) print_char_cursor#41 = (byte*) print_char_cursor#9 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#42 (byte*) print_char_cursor#43 (byte*) print_char_cursor#11 
Alias (byte*) print_char_cursor#12 = (byte*) print_char_cursor#45 (byte*) print_char_cursor#13 
Alias (byte*) print_line_cursor#14 = (byte*) print_screen#2 (byte*) print_screen#1 (byte*) print_line_cursor#3 (byte*) print_char_cursor#14 (byte*) print_char_cursor#46 (byte*) print_line_cursor#4 (byte*) print_char_cursor#15 
Alias (byte*) print_screen#3 = (byte*) print_screen#4 
Alias (byte*) print_line_cursor#22 = (byte*) print_line_cursor#25 
Alias (byte*) print_char_cursor#70 = (byte*) print_char_cursor#76 
Alias (byte*) print_line_cursor#15 = (byte*) print_line_cursor#5 
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#47 
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#48 (byte*) print_char_cursor#49 (byte*) print_char_cursor#18 
Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#6 (byte*) print_line_cursor#17 (byte*) print_line_cursor#7 
Alias (signed byte) do_perspective::x#1 = (signed byte) do_perspective::x#3 (signed byte) do_perspective::x#8 (signed byte) do_perspective::x#7 (signed byte) do_perspective::x#6 (signed byte) do_perspective::x#5 (signed byte) do_perspective::x#4 (signed byte) do_perspective::x#2 
Alias (signed byte) do_perspective::y#1 = (signed byte) do_perspective::y#5 (signed byte) do_perspective::y#7 (signed byte) do_perspective::y#3 (signed byte) do_perspective::y#8 (signed byte) do_perspective::y#6 (signed byte) do_perspective::y#4 (signed byte) do_perspective::y#2 
Alias (signed byte) do_perspective::z#1 = (signed byte) do_perspective::z#7 (signed byte) do_perspective::z#8 (signed byte) do_perspective::z#6 (signed byte) do_perspective::z#5 (signed byte) do_perspective::z#3 (signed byte) do_perspective::z#4 (signed byte) do_perspective::z#2 
Alias (byte*) print_line_cursor#23 = (byte*) print_line_cursor#39 (byte*) print_line_cursor#40 (byte*) print_line_cursor#38 (byte*) print_line_cursor#37 (byte*) print_line_cursor#36 (byte*) print_line_cursor#35 (byte*) print_line_cursor#34 (byte*) print_line_cursor#33 (byte*) print_line_cursor#32 (byte*) print_line_cursor#31 (byte*) print_line_cursor#28 (byte*) print_line_cursor#26 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#50 
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#51 
Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#52 
Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#53 
Alias (byte*) print_char_cursor#23 = (byte*) print_char_cursor#54 
Alias (byte*) print_char_cursor#24 = (byte*) print_char_cursor#55 
Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#56 (byte*) print_char_cursor#72 
Alias (byte) print_byte::b#1 = (byte~) do_perspective::$8 
Alias (byte*) print_char_cursor#26 = (byte*) print_char_cursor#57 
Alias (byte*) print_char_cursor#27 = (byte*) print_char_cursor#58 
Alias (byte) print_byte::b#2 = (byte~) do_perspective::$11 
Alias (byte*) print_char_cursor#28 = (byte*) print_char_cursor#59 
Alias (byte*) print_char_cursor#29 = (byte*) print_char_cursor#60 
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#8 (byte*) print_line_cursor#19 (byte*) print_line_cursor#9 
Alias (byte*) print_char_cursor#30 = (byte*) print_char_cursor#61 (byte*) print_char_cursor#62 (byte*) print_char_cursor#31 
Alias (byte) mulf_init::val#0 = (byte~) mulf_init::$0 
Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#20 
Alias (byte*) print_char_cursor#32 = (byte*) print_char_cursor#63 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (word) memset::num#1 (word) memset::num#0
Identical Phi Values (void*) memset::str#2 (void*) memset::str#0
Identical Phi Values (byte) memset::c#3 (byte) memset::c#0
Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0
Identical Phi Values (void*) memset::str#4 (void*) memset::str#2
Identical Phi Values (byte) memset::c#1 (byte) memset::c#3
Identical Phi Values (byte*) print_line_cursor#21 (byte*) print_line_cursor#23
Identical Phi Values (byte*) print_char_cursor#65 (byte*) print_char_cursor#29
Identical Phi Values (byte*) print_char_cursor#35 (byte*) print_char_cursor#65
Identical Phi Values (byte*) print_char_cursor#37 (byte*) print_char_cursor#12
Identical Phi Values (byte*) print_char_cursor#38 (byte*) print_char_cursor#12
Identical Phi Values (byte*) print_char_cursor#39 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_char_cursor#41 (byte*) print_char_cursor#12
Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#12
Identical Phi Values (byte*) print_line_cursor#14 (byte*) print_screen#3
Identical Phi Values (byte*) print_screen#3 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_line_cursor#22 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_char_cursor#70 (byte*) print_line_cursor#0
Identical Phi Values (byte*) print_line_cursor#15 (byte*) print_line_cursor#14
Identical Phi Values (byte*) print_char_cursor#16 (byte*) print_line_cursor#14
Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_char_cursor#30
Identical Phi Values (byte*) print_line_cursor#16 (byte*) print_line_cursor#18
Identical Phi Values (byte*) print_char_cursor#71 (byte*) print_char_cursor#16
Identical Phi Values (signed byte) do_perspective::x#1 (signed byte) do_perspective::x#0
Identical Phi Values (signed byte) do_perspective::y#1 (signed byte) do_perspective::y#0
Identical Phi Values (signed byte) do_perspective::z#1 (signed byte) do_perspective::z#0
Identical Phi Values (byte*) print_line_cursor#23 (byte*) print_line_cursor#15
Identical Phi Values (byte*) print_char_cursor#19 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#39
Identical Phi Values (byte*) print_char_cursor#21 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#22 (byte*) print_char_cursor#39
Identical Phi Values (byte*) print_char_cursor#23 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#24 (byte*) print_char_cursor#39
Identical Phi Values (byte*) print_char_cursor#25 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#26 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_char_cursor#27 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#28 (byte*) print_char_cursor#10
Identical Phi Values (byte*) print_char_cursor#29 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#1
Identical Phi Values (byte*) print_char_cursor#30 (byte*) print_line_cursor#1
Identical Phi Values (signed byte) perspective::x#1 (signed byte) perspective::x#0
Identical Phi Values (signed byte) perspective::y#1 (signed byte) perspective::y#0
Identical Phi Values (signed byte) perspective::z#1 (signed byte) perspective::z#0
Identical Phi Values (byte*) print_line_cursor#10 (byte*) print_line_cursor#16
Identical Phi Values (byte*) print_char_cursor#32 (byte*) print_char_cursor#17
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (void*) memset::return#0 (void*) memset::str#0
Identical Phi Values (byte*) print_char_cursor#66 (byte*) print_char_cursor#2
Identical Phi Values (byte*) print_char_cursor#68 (byte*) print_char_cursor#12
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [215] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) print_str::$0 [26] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [39] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1
Simple Condition (bool~) print_sbyte::$0 [48] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1
Simple Condition (bool~) mulf_init::$11 [231] if((byte) mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [201] (byte[$200]) mulf_sqr1#0 ← { fill( $200, 0) }
Constant right-side identified [202] (byte[$200]) mulf_sqr2#0 ← { fill( $200, 0) }
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) print_line_cursor#0 = (byte*) 1024
Constant (const byte) print_char::ch#0 = '-'
Constant (const byte) print_char::ch#1 = ' '
Constant (const byte[]) print_hextab#0 = $0
Constant (const byte) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const signed byte*) xr#0 = (signed byte*) 240
Constant (const signed byte*) yr#0 = (signed byte*) 241
Constant (const signed byte*) zr#0 = (signed byte*) 242
Constant (const word*) psp1#0 = (word*) 243
Constant (const word*) psp2#0 = (word*) 245
Constant (const signed byte) do_perspective::x#0 = $39
Constant (const signed byte) do_perspective::y#0 = -$47
Constant (const signed byte) do_perspective::z#0 = $36
Constant (const byte*) print_str::str#1 = do_perspective::str
Constant (const byte*) print_str::str#2 = do_perspective::str1
Constant (const byte*) print_str::str#3 = do_perspective::str2
Constant (const byte*) print_str::str#4 = do_perspective::str3
Constant (const byte*) print_str::str#5 = do_perspective::str4
Constant (const byte*) print_str::str#6 = do_perspective::str5
Constant (const byte[$200]) mulf_sqr1#0 = { fill( $200, 0) }
Constant (const byte[$200]) mulf_sqr2#0 = { fill( $200, 0) }
Constant (const signed word) mulf_init::sqr#0 = 0
Constant (const signed word) mulf_init::add#0 = 1
Constant (const byte) mulf_init::i#0 = 0
Constant (const signed byte[$100]) PERSP_Z#0 = kickasm {{ {
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}
 }}
Successful SSA optimization Pass2ConstantIdentification
Constant (const signed byte) print_sbyte::b#1 = do_perspective::x#0
Constant (const signed byte) print_sbyte::b#2 = do_perspective::y#0
Constant (const signed byte) print_sbyte::b#3 = do_perspective::z#0
Constant (const signed byte) perspective::x#0 = do_perspective::x#0
Constant (const signed byte) perspective::y#0 = do_perspective::y#0
Constant (const signed byte) perspective::z#0 = do_perspective::z#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (void*)print_line_cursor#0 in [93] (void*) memset::str#0 ← (void*)(const byte*) print_line_cursor#0
Constant value identified (word)mulf_sqr1#0 in [115] (word~) main::$1 ← (word)(const byte[$200]) mulf_sqr1#0
Constant value identified (word)mulf_sqr2#0 in [117] (word~) main::$2 ← (word)(const byte[$200]) mulf_sqr2#0
Successful SSA optimization Pass2ConstantValues
if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Successful SSA optimization Pass2ConstantStringConsolidation
Resolved ranged next value [229] mulf_init::i#1 ← ++ mulf_init::i#2 to ++
Resolved ranged comparison value [231] if(mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 to (number) $81
Eliminating unused variable (void*) memset::return#2 and assignment [42] (void*) memset::return#2 ← (void*) memset::str#0
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) $81 in if((byte) mulf_init::i#1!=(number) $81) goto mulf_init::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $81
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $81
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte~) mulf_init::$4 = (byte~) mulf_init::$2 
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [76] (byte*~) mulf_init::$1 ← (const byte[$200]) mulf_sqr1#0 + (word) $100
Constant right-side identified [80] (byte*~) mulf_init::$3 ← (const byte[$200]) mulf_sqr1#0 + (word) $100
Constant right-side identified [85] (byte*~) mulf_init::$6 ← (const byte[$200]) mulf_sqr2#0 + (word) $100
Constant right-side identified [90] (byte*~) mulf_init::$9 ← (const byte[$200]) mulf_sqr2#0 + (word) $100
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const void*) memset::str#0 = (void*)print_line_cursor#0
Constant (const word) main::$1 = (word)mulf_sqr1#0
Constant (const word) main::$2 = (word)mulf_sqr2#0
Constant (const byte*) mulf_init::$1 = mulf_sqr1#0+$100
Constant (const byte*) mulf_init::$3 = mulf_sqr1#0+$100
Constant (const byte*) mulf_init::$6 = mulf_sqr2#0+$100
Constant (const byte*) mulf_init::$9 = mulf_sqr2#0+$100
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte*)memset::str#0 in [0] (byte*~) memset::$2 ← (byte*)(const void*) memset::str#0
Constant value identified (byte*)memset::str#0 in [2] (byte*) memset::dst#0 ← (byte*)(const void*) memset::str#0
Successful SSA optimization Pass2ConstantValues
Constant (const byte*) memset::$2 = (byte*)memset::str#0
Constant (const byte*) memset::dst#0 = (byte*)memset::str#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte*) memset::end#0 = memset::$2+memset::num#0
Successful SSA optimization Pass2ConstantIdentification
Successful SSA optimization Pass2LoopHeadConstantIdentification
Alias (byte*) memset::dst#1 = (byte*) memset::dst#2 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) memset::dst#5 (const byte*) memset::dst#0
Successful SSA optimization Pass2IdenticalPhiElimination
if() condition always true - replacing block destination [91] if((const byte*) memset::dst#0!=(const byte*) memset::end#0) goto memset::@5
Successful SSA optimization Pass2ConstantIfs
Inlining Noop Cast [54] (byte) print_byte::b#1 ← (byte)*((const signed byte*) xr#0) keeping *(xr#0)
Inlining Noop Cast [57] (byte) print_byte::b#2 ← (byte)*((const signed byte*) yr#0) keeping *(yr#0)
Successful SSA optimization Pass2NopCastInlining
Inlining constant with var siblings (const byte*) memset::dst#0
Inlining constant with var siblings (const byte*) print_str::str#1
Inlining constant with var siblings (const byte*) print_str::str#2
Inlining constant with var siblings (const byte*) print_str::str#3
Inlining constant with var siblings (const byte*) print_str::str#4
Inlining constant with var siblings (const byte*) print_str::str#5
Inlining constant with var siblings (const byte*) print_str::str#6
Inlining constant with var siblings (const signed byte) print_sbyte::b#1
Inlining constant with var siblings (const signed byte) print_sbyte::b#2
Inlining constant with var siblings (const signed byte) print_sbyte::b#3
Inlining constant with var siblings (const byte) print_char::ch#0
Inlining constant with var siblings (const byte) print_char::ch#1
Inlining constant with var siblings (const signed word) mulf_init::sqr#0
Inlining constant with var siblings (const signed word) mulf_init::add#0
Inlining constant with var siblings (const byte) mulf_init::i#0
Inlining constant with var siblings (const byte*) print_line_cursor#0
Constant inlined print_sbyte::b#1 = (const signed byte) do_perspective::x#0
Constant inlined print_sbyte::b#2 = (const signed byte) do_perspective::y#0
Constant inlined do_perspective::str4 = (const string) do_perspective::str1
Constant inlined print_sbyte::b#3 = (const signed byte) do_perspective::z#0
Constant inlined do_perspective::str2 = (const string) do_perspective::str1
Constant inlined mulf_init::i#0 = (byte) 0
Constant inlined mulf_init::$1 = (const byte[$200]) mulf_sqr1#0+(word) $100
Constant inlined $0 = (const byte[]) print_hextab#0
Constant inlined mulf_init::$3 = (const byte[$200]) mulf_sqr1#0+(word) $100
Constant inlined mulf_init::$6 = (const byte[$200]) mulf_sqr2#0+(word) $100
Constant inlined memset::$2 = (byte*)(const void*) memset::str#0
Constant inlined mulf_init::add#0 = (signed byte) 1
Constant inlined perspective::z#0 = (const signed byte) do_perspective::z#0
Constant inlined perspective::y#0 = (const signed byte) do_perspective::y#0
Constant inlined perspective::x#0 = (const signed byte) do_perspective::x#0
Constant inlined mulf_init::sqr#0 = (signed byte) 0
Constant inlined print_line_cursor#0 = (byte*) 1024
Constant inlined mulf_init::$9 = (const byte[$200]) mulf_sqr2#0+(word) $100
Constant inlined main::$1 = (word)(const byte[$200]) mulf_sqr1#0
Constant inlined main::$2 = (word)(const byte[$200]) mulf_sqr2#0
Constant inlined print_char::ch#1 = (byte) ' '
Constant inlined print_char::ch#0 = (byte) '-'
Constant inlined print_str::str#4 = (const string) do_perspective::str3
Constant inlined print_str::str#3 = (const string) do_perspective::str1
Constant inlined print_str::str#2 = (const string) do_perspective::str1
Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0
Constant inlined print_str::str#1 = (const string) do_perspective::str
Constant inlined print_str::str#6 = (const string) do_perspective::str5
Constant inlined print_str::str#5 = (const string) do_perspective::str1
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in assignment *(mulf_sqr2#0+1 + mulf_init::$5)
Consolidated array index constant in assignment *(mulf_sqr2#0+$100+1 + mulf_init::$7)
Successful SSA optimization Pass2ConstantAdditionElimination
Alias (byte) mulf_init::i#2 = (byte~) mulf_init::$5 (byte~) mulf_init::$7 
Successful SSA optimization Pass2AliasElimination
Added new block during phi lifting memset::@10(between memset::@4 and memset::@5)
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Added new block during phi lifting mulf_init::@3(between mulf_init::@1 and mulf_init::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @16
Adding NOP phi() at start of @33
Adding NOP phi() at start of @40
Adding NOP phi() at start of @43
Adding NOP phi() at start of @44
Adding NOP phi() at start of @45
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of do_perspective
Adding NOP phi() at start of do_perspective::@1
Adding NOP phi() at start of do_perspective::@3
Adding NOP phi() at start of do_perspective::@5
Adding NOP phi() at start of do_perspective::@7
Adding NOP phi() at start of do_perspective::@12
Adding NOP phi() at start of do_perspective::@13
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_ln::@2
Adding NOP phi() at start of print_byte::@2
Adding NOP phi() at start of print_sbyte::@7
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of print_cls::@1
Adding NOP phi() at start of memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@4_1
Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of mulf_init
CALL GRAPH
Calls in [] to main:6 
Calls in [main] to mulf_init:10 print_cls:13 do_perspective:15 
Calls in [do_perspective] to print_str:19 print_sbyte:21 print_str:23 print_sbyte:25 print_str:27 print_sbyte:29 print_str:31 perspective:33 print_byte:36 print_str:38 print_byte:41 print_str:43 print_ln:45 
Calls in [print_byte] to print_char:71 print_char:76 
Calls in [print_sbyte] to print_char:91 print_byte:97 print_char:101 
Calls in [print_cls] to memset:105 

Created 15 initial phi equivalence classes
Coalesced [22] print_char_cursor#81 ← print_char_cursor#12
Coalesced (already) [26] print_char_cursor#82 ← print_char_cursor#12
Coalesced (already) [30] print_char_cursor#83 ← print_char_cursor#12
Coalesced [35] print_char_cursor#88 ← print_char_cursor#2
Coalesced (already) [37] print_char_cursor#84 ← print_char_cursor#12
Coalesced (already) [40] print_char_cursor#87 ← print_char_cursor#2
Coalesced (already) [42] print_char_cursor#80 ← print_char_cursor#12
Coalesced [54] print_line_cursor#41 ← print_line_cursor#1
Coalesced [56] print_str::str#10 ← print_str::str#9
Coalesced [57] print_char_cursor#85 ← print_char_cursor#74
Coalesced [64] print_str::str#11 ← print_str::str#0
Coalesced [65] print_char_cursor#86 ← print_char_cursor#1
Coalesced [69] print_char::ch#5 ← print_char::ch#2
Coalesced [70] print_char_cursor#90 ← print_char_cursor#69
Coalesced [74] print_char::ch#6 ← print_char::ch#3
Coalesced (already) [75] print_char_cursor#91 ← print_char_cursor#12
Coalesced (already) [90] print_char_cursor#93 ← print_char_cursor#2
Coalesced [92] print_sbyte::b#11 ← print_sbyte::b#4
Coalesced [95] print_byte::b#7 ← print_byte::b#0
Coalesced (already) [96] print_char_cursor#89 ← print_char_cursor#12
Coalesced (already) [100] print_char_cursor#92 ← print_char_cursor#2
Coalesced [103] print_sbyte::b#10 ← print_sbyte::b#0
Coalesced [117] memset::dst#6 ← memset::dst#1
Coalesced [137] mulf_init::sqr#3 ← mulf_init::sqr#1
Coalesced [138] mulf_init::i#3 ← mulf_init::i#1
Coalesced [139] mulf_init::add#3 ← mulf_init::add#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) @16
Culled Empty Block (label) @33
Culled Empty Block (label) @40
Culled Empty Block (label) @43
Culled Empty Block (label) @45
Culled Empty Block (label) main::@3
Culled Empty Block (label) do_perspective::@13
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_ln::@3
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) print_sbyte::@6
Culled Empty Block (label) print_sbyte::@7
Culled Empty Block (label) print_cls::@1
Culled Empty Block (label) memset::@2
Culled Empty Block (label) memset::@4_1
Culled Empty Block (label) memset::@1
Culled Empty Block (label) memset::@10
Culled Empty Block (label) mulf_init::@3
Renumbering block @44 to @1
Renumbering block memset::@4 to memset::@1
Renumbering block memset::@5 to memset::@2
Renumbering block print_sbyte::@5 to print_sbyte::@4
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::@2
Adding NOP phi() at start of do_perspective
Adding NOP phi() at start of do_perspective::@1
Adding NOP phi() at start of do_perspective::@2
Adding NOP phi() at start of do_perspective::@3
Adding NOP phi() at start of do_perspective::@4
Adding NOP phi() at start of do_perspective::@5
Adding NOP phi() at start of do_perspective::@6
Adding NOP phi() at start of do_perspective::@7
Adding NOP phi() at start of do_perspective::@9
Adding NOP phi() at start of do_perspective::@11
Adding NOP phi() at start of do_perspective::@12
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_sbyte::@3
Adding NOP phi() at start of print_sbyte::@1
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of memset
Adding NOP phi() at start of mulf_init

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()
main: scope:[main]  from @1
  asm { sei  }
  [5] call mulf_init 
  to:main::@1
main::@1: scope:[main]  from main
  [6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0
  [7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0
  [8] call print_cls 
  to:main::@2
main::@2: scope:[main]  from main::@1
  [9] phi()
  [10] call do_perspective 
  to:main::@return
main::@return: scope:[main]  from main::@2
  [11] return 
  to:@return
do_perspective: scope:[do_perspective]  from main::@2
  [12] phi()
  [13] call print_str 
  to:do_perspective::@1
do_perspective::@1: scope:[do_perspective]  from do_perspective
  [14] phi()
  [15] call print_sbyte 
  to:do_perspective::@2
do_perspective::@2: scope:[do_perspective]  from do_perspective::@1
  [16] phi()
  [17] call print_str 
  to:do_perspective::@3
do_perspective::@3: scope:[do_perspective]  from do_perspective::@2
  [18] phi()
  [19] call print_sbyte 
  to:do_perspective::@4
do_perspective::@4: scope:[do_perspective]  from do_perspective::@3
  [20] phi()
  [21] call print_str 
  to:do_perspective::@5
do_perspective::@5: scope:[do_perspective]  from do_perspective::@4
  [22] phi()
  [23] call print_sbyte 
  to:do_perspective::@6
do_perspective::@6: scope:[do_perspective]  from do_perspective::@5
  [24] phi()
  [25] call print_str 
  to:do_perspective::@7
do_perspective::@7: scope:[do_perspective]  from do_perspective::@6
  [26] phi()
  [27] call perspective 
  to:do_perspective::@8
do_perspective::@8: scope:[do_perspective]  from do_perspective::@7
  [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0)
  [29] call print_byte 
  to:do_perspective::@9
do_perspective::@9: scope:[do_perspective]  from do_perspective::@8
  [30] phi()
  [31] call print_str 
  to:do_perspective::@10
do_perspective::@10: scope:[do_perspective]  from do_perspective::@9
  [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0)
  [33] call print_byte 
  to:do_perspective::@11
do_perspective::@11: scope:[do_perspective]  from do_perspective::@10
  [34] phi()
  [35] call print_str 
  to:do_perspective::@12
do_perspective::@12: scope:[do_perspective]  from do_perspective::@11
  [36] phi()
  [37] call print_ln 
  to:do_perspective::@return
do_perspective::@return: scope:[do_perspective]  from do_perspective::@12
  [38] return 
  to:@return
print_ln: scope:[print_ln]  from do_perspective::@12
  [39] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [40] (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) 1024 print_ln::@1/(byte*) print_line_cursor#1 )
  [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28
  [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [43] return 
  to:@return
print_str: scope:[print_str]  from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9
  [44] (byte*) print_char_cursor#74 ← phi( do_perspective/(byte*) 1024 do_perspective::@11/(byte*) print_char_cursor#12 do_perspective::@2/(byte*) print_char_cursor#12 do_perspective::@4/(byte*) print_char_cursor#12 do_perspective::@6/(byte*) print_char_cursor#12 do_perspective::@9/(byte*) print_char_cursor#12 )
  [44] (byte*) print_str::str#9 ← phi( do_perspective/(const string) do_perspective::str do_perspective::@11/(const string) do_perspective::str5 do_perspective::@2/(const string) do_perspective::str1 do_perspective::@4/(const string) do_perspective::str1 do_perspective::@6/(const string) do_perspective::str3 do_perspective::@9/(const string) do_perspective::str1 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  [45] (byte*) print_char_cursor#2 ← phi( print_str/(byte*) print_char_cursor#74 print_str::@2/(byte*) print_char_cursor#1 )
  [45] (byte*) print_str::str#7 ← phi( print_str/(byte*) print_str::str#9 print_str::@2/(byte*) print_str::str#0 )
  [46] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2
  to:print_str::@return
print_str::@return: scope:[print_str]  from print_str::@1
  [47] return 
  to:@return
print_str::@2: scope:[print_str]  from print_str::@1
  [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7)
  [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2
  [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7
  to:print_str::@1
print_byte: scope:[print_byte]  from do_perspective::@10 do_perspective::@8 print_sbyte::@2
  [51] (byte*) print_char_cursor#69 ← phi( do_perspective::@10/(byte*) print_char_cursor#2 do_perspective::@8/(byte*) print_char_cursor#2 print_sbyte::@2/(byte*) print_char_cursor#12 )
  [51] (byte) print_byte::b#3 ← phi( do_perspective::@10/(byte~) print_byte::b#5 do_perspective::@8/(byte~) print_byte::b#6 print_sbyte::@2/(byte) print_byte::b#0 )
  [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte) 4
  [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
  [54] call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f
  [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
  [57] call print_char 
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@1
  [58] return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3
  [59] (byte*) print_char_cursor#44 ← phi( print_byte/(byte*) print_char_cursor#69 print_byte::@1/(byte*) print_char_cursor#12 print_sbyte::@1/(byte*) print_char_cursor#2 print_sbyte::@3/(byte*) print_char_cursor#2 )
  [59] (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' )
  [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4
  [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [62] return 
  to:@return
perspective: scope:[perspective]  from do_perspective::@7
  [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0
  [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0
  [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0
  asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  }
  to:perspective::@return
perspective::@return: scope:[perspective]  from perspective
  [67] return 
  to:@return
print_sbyte: scope:[print_sbyte]  from do_perspective::@1 do_perspective::@3 do_perspective::@5
  [68] (signed byte) print_sbyte::b#4 ← phi( do_perspective::@1/(const signed byte) do_perspective::x#0 do_perspective::@3/(const signed byte) do_perspective::y#0 do_perspective::@5/(const signed byte) do_perspective::z#0 )
  [69] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1
  to:print_sbyte::@3
print_sbyte::@3: scope:[print_sbyte]  from print_sbyte
  [70] phi()
  [71] call print_char 
  to:print_sbyte::@2
print_sbyte::@2: scope:[print_sbyte]  from print_sbyte::@3 print_sbyte::@4
  [72] (signed byte) print_sbyte::b#6 ← phi( print_sbyte::@4/(signed byte) print_sbyte::b#0 print_sbyte::@3/(signed byte) print_sbyte::b#4 )
  [73] (byte) print_byte::b#0 ← (byte)(signed byte) print_sbyte::b#6
  [74] call print_byte 
  to:print_sbyte::@return
print_sbyte::@return: scope:[print_sbyte]  from print_sbyte::@2
  [75] return 
  to:@return
print_sbyte::@1: scope:[print_sbyte]  from print_sbyte
  [76] phi()
  [77] call print_char 
  to:print_sbyte::@4
print_sbyte::@4: scope:[print_sbyte]  from print_sbyte::@1
  [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4
  to:print_sbyte::@2
print_cls: scope:[print_cls]  from main::@1
  [79] phi()
  [80] call memset 
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls
  [81] return 
  to:@return
memset: scope:[memset]  from print_cls
  [82] phi()
  to:memset::@2
memset::@2: scope:[memset]  from memset memset::@1
  [83] (byte*) memset::dst#4 ← phi( memset::@1/(byte*) memset::dst#1 memset/(byte*)(const void*) memset::str#0 )
  [84] *((byte*) memset::dst#4) ← (const byte) memset::c#0
  [85] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4
  to:memset::@1
memset::@1: scope:[memset]  from memset::@2
  [86] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2
  to:memset::@return
memset::@return: scope:[memset]  from memset::@1
  [87] return 
  to:@return
mulf_init: scope:[mulf_init]  from main
  [88] phi()
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@1
  [89] (signed word) mulf_init::add#2 ← phi( mulf_init/(signed byte) 1 mulf_init::@1/(signed word) mulf_init::add#1 )
  [89] (byte) mulf_init::i#2 ← phi( mulf_init/(byte) 0 mulf_init::@1/(byte) mulf_init::i#1 )
  [89] (signed word) mulf_init::sqr#2 ← phi( mulf_init/(signed byte) 0 mulf_init::@1/(signed word) mulf_init::sqr#1 )
  [90] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2
  [91] *((const byte[$200]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [92] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [93] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2
  [94] *((const byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0
  [95] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0
  [96] *((const byte[$200]) mulf_sqr2#0+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [97] *((const byte[$200]) mulf_sqr2#0+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [98] (byte~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2
  [99] *((const byte[$200]) mulf_sqr2#0 + (byte~) mulf_init::$8) ← (byte) mulf_init::val#0
  [100] (byte~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2
  [101] *((const byte[$200]) mulf_sqr2#0+(word) $100 + (byte~) mulf_init::$10) ← (byte) mulf_init::val#0
  [102] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2
  [103] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2
  [104] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2
  [105] if((byte) mulf_init::i#1!=(byte) $81) goto mulf_init::@1
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@1
  [106] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(signed byte[$100]) PERSP_Z
(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
(signed byte) do_perspective::x
(signed byte) do_perspective::y
(signed byte) do_perspective::z
(void()) main()
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(byte) memset::c
(byte*) memset::dst
(byte*) memset::dst#1 16.5
(byte*) memset::dst#4 16.5
(byte*) memset::end
(word) memset::num
(void*) memset::return
(void*) memset::str
(void()) mulf_init()
(byte~) mulf_init::$10 22.0
(byte~) mulf_init::$4 16.5
(byte~) mulf_init::$8 22.0
(signed word) mulf_init::add
(signed word) mulf_init::add#1 7.333333333333333
(signed word) mulf_init::add#2 2.357142857142857
(byte) mulf_init::i
(byte) mulf_init::i#1 16.5
(byte) mulf_init::i#2 6.6
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#1 5.5
(signed word) mulf_init::sqr#2 2.5384615384615383
(byte) mulf_init::val
(byte) mulf_init::val#0 9.0
(byte[$200]) mulf_sqr1
(byte[$200]) mulf_sqr2
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
(signed byte) perspective::x
(signed byte) perspective::y
(signed byte) perspective::z
(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#3 2.5
(byte~) print_byte::b#5 4.0
(byte~) print_byte::b#6 4.0
(void()) print_char((byte) print_char::ch)
(byte) print_char::ch
(byte) print_char::ch#2 4.0
(byte) print_char::ch#3 4.0
(byte) print_char::ch#4 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 11.0
(byte*) print_char_cursor#12 0.6666666666666666
(byte*) print_char_cursor#2 2.076923076923077
(byte*) print_char_cursor#44 6.0
(byte*) print_char_cursor#69 2.6666666666666665
(byte*) print_char_cursor#74 12.0
(void()) print_cls()
(byte[]) print_hextab
(byte*) print_line_cursor
(byte*) print_line_cursor#1 16.5
(byte*) print_line_cursor#11 22.0
(void()) print_ln()
(void()) print_sbyte((signed byte) print_sbyte::b)
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 4.0
(signed byte) print_sbyte::b#4 1.0
(signed byte) print_sbyte::b#6 4.0
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(byte*) print_str::str
(byte*) print_str::str#0 22.0
(byte*) print_str::str#7 11.5
(byte*) print_str::str#9 2.0
(word*) psp1
(word*) psp2
(signed byte*) xr
(signed byte*) yr
(signed byte*) zr

Initial phi equivalence classes
[ print_line_cursor#11 print_line_cursor#1 ]
[ print_str::str#7 print_str::str#9 print_str::str#0 ]
[ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
[ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
[ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ]
[ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
[ memset::dst#4 memset::dst#1 ]
[ mulf_init::sqr#2 mulf_init::sqr#1 ]
[ mulf_init::i#2 mulf_init::i#1 ]
[ mulf_init::add#2 mulf_init::add#1 ]
Added variable print_byte::$0 to zero page equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to zero page equivalence class [ print_byte::$2 ]
Added variable mulf_init::val#0 to zero page equivalence class [ mulf_init::val#0 ]
Added variable mulf_init::$4 to zero page equivalence class [ mulf_init::$4 ]
Added variable mulf_init::$8 to zero page equivalence class [ mulf_init::$8 ]
Added variable mulf_init::$10 to zero page equivalence class [ mulf_init::$10 ]
Complete equivalence classes
[ print_line_cursor#11 print_line_cursor#1 ]
[ print_str::str#7 print_str::str#9 print_str::str#0 ]
[ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
[ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
[ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ]
[ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
[ memset::dst#4 memset::dst#1 ]
[ mulf_init::sqr#2 mulf_init::sqr#1 ]
[ mulf_init::i#2 mulf_init::i#1 ]
[ mulf_init::add#2 mulf_init::add#1 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
[ mulf_init::val#0 ]
[ mulf_init::$4 ]
[ mulf_init::$8 ]
[ mulf_init::$10 ]
Allocated zp ZP_WORD:2 [ print_line_cursor#11 print_line_cursor#1 ]
Allocated zp ZP_WORD:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ]
Allocated zp ZP_BYTE:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
Allocated zp ZP_BYTE:7 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
Allocated zp ZP_WORD:8 [ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ]
Allocated zp ZP_BYTE:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
Allocated zp ZP_WORD:11 [ memset::dst#4 memset::dst#1 ]
Allocated zp ZP_WORD:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ]
Allocated zp ZP_BYTE:15 [ mulf_init::i#2 mulf_init::i#1 ]
Allocated zp ZP_WORD:16 [ mulf_init::add#2 mulf_init::add#1 ]
Allocated zp ZP_BYTE:18 [ print_byte::$0 ]
Allocated zp ZP_BYTE:19 [ print_byte::$2 ]
Allocated zp ZP_BYTE:20 [ mulf_init::val#0 ]
Allocated zp ZP_BYTE:21 [ mulf_init::$4 ]
Allocated zp ZP_BYTE:22 [ mulf_init::$8 ]
Allocated zp ZP_BYTE:23 [ mulf_init::$10 ]

INITIAL ASM
Target platform is c64basic
  // File Comments
// 3D Rotation using a Rotation Matrix
// Based on: 
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation  
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // The rotated point - updated by calling rotate()
  .label xr = $f0
  .label yr = $f1
  .label zr = $f2
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $f3
  .label psp2 = $f5
  .label print_char_cursor = 8
  .label print_line_cursor = 2
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // asm { sei  }
    sei
    // [5] call mulf_init 
    // [88] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp b1
    // main::@1
  b1:
    // [6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
    // [7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr2
    sta psp2
    lda #>mulf_sqr2
    sta psp2+1
    // [8] call print_cls 
    // [79] phi from main::@1 to print_cls [phi:main::@1->print_cls]
  print_cls_from_b1:
    jsr print_cls
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [10] call do_perspective 
    // [12] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
  do_perspective_from_b2:
    jsr do_perspective
    jmp breturn
    // main::@return
  breturn:
    // [11] return 
    rts
}
  // do_perspective
do_perspective: {
    .label x = $39
    .label y = -$47
    .label z = $36
    // [13] call print_str 
    // [44] phi from do_perspective to print_str [phi:do_perspective->print_str]
  print_str_from_do_perspective:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) 1024 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str [phi:do_perspective->print_str#1] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str.str
    lda #>str
    sta.z print_str.str+1
    jsr print_str
    // [14] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
  b1_from_do_perspective:
    jmp b1
    // do_perspective::@1
  b1:
    // [15] call print_sbyte 
    // [68] phi from do_perspective::@1 to print_sbyte [phi:do_perspective::@1->print_sbyte]
  print_sbyte_from_b1:
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::x#0 [phi:do_perspective::@1->print_sbyte#0] -- vbsz1=vbsc1 
    lda #x
    sta.z print_sbyte.b
    jsr print_sbyte
    // [16] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
  b2_from_b1:
    jmp b2
    // do_perspective::@2
  b2:
    // [17] call print_str 
    // [44] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
  print_str_from_b2:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@2->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@2->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // [18] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
  b3_from_b2:
    jmp b3
    // do_perspective::@3
  b3:
    // [19] call print_sbyte 
    // [68] phi from do_perspective::@3 to print_sbyte [phi:do_perspective::@3->print_sbyte]
  print_sbyte_from_b3:
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::y#0 [phi:do_perspective::@3->print_sbyte#0] -- vbsz1=vbsc1 
    lda #y
    sta.z print_sbyte.b
    jsr print_sbyte
    // [20] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
  b4_from_b3:
    jmp b4
    // do_perspective::@4
  b4:
    // [21] call print_str 
    // [44] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
  print_str_from_b4:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@4->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@4->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // [22] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
  b5_from_b4:
    jmp b5
    // do_perspective::@5
  b5:
    // [23] call print_sbyte 
    // [68] phi from do_perspective::@5 to print_sbyte [phi:do_perspective::@5->print_sbyte]
  print_sbyte_from_b5:
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::z#0 [phi:do_perspective::@5->print_sbyte#0] -- vbsz1=vbsc1 
    lda #z
    sta.z print_sbyte.b
    jsr print_sbyte
    // [24] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
  b6_from_b5:
    jmp b6
    // do_perspective::@6
  b6:
    // [25] call print_str 
    // [44] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
  print_str_from_b6:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@6->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str3 [phi:do_perspective::@6->print_str#1] -- pbuz1=pbuc1 
    lda #<str3
    sta.z print_str.str
    lda #>str3
    sta.z print_str.str+1
    jsr print_str
    // [26] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
  b7_from_b6:
    jmp b7
    // do_perspective::@7
  b7:
    // [27] call perspective 
    jsr perspective
    jmp b8
    // do_perspective::@8
  b8:
    // [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0) -- vbuz1=_deref_pbuc1 
    lda xr
    sta.z print_byte.b
    // [29] call print_byte 
    // [51] phi from do_perspective::@8 to print_byte [phi:do_perspective::@8->print_byte]
  print_byte_from_b8:
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@8->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#6 [phi:do_perspective::@8->print_byte#1] -- register_copy 
    jsr print_byte
    // [30] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
  b9_from_b8:
    jmp b9
    // do_perspective::@9
  b9:
    // [31] call print_str 
    // [44] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
  print_str_from_b9:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@9->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@9->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    jmp b10
    // do_perspective::@10
  b10:
    // [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0) -- vbuz1=_deref_pbuc1 
    lda yr
    sta.z print_byte.b
    // [33] call print_byte 
    // [51] phi from do_perspective::@10 to print_byte [phi:do_perspective::@10->print_byte]
  print_byte_from_b10:
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@10->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#5 [phi:do_perspective::@10->print_byte#1] -- register_copy 
    jsr print_byte
    // [34] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
  b11_from_b10:
    jmp b11
    // do_perspective::@11
  b11:
    // [35] call print_str 
    // [44] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
  print_str_from_b11:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@11->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str5 [phi:do_perspective::@11->print_str#1] -- pbuz1=pbuc1 
    lda #<str5
    sta.z print_str.str
    lda #>str5
    sta.z print_str.str+1
    jsr print_str
    // [36] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
  b12_from_b11:
    jmp b12
    // do_perspective::@12
  b12:
    // [37] call print_ln 
    // [39] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
  print_ln_from_b12:
    jsr print_ln
    jmp breturn
    // do_perspective::@return
  breturn:
    // [38] return 
    rts
    str: .text "("
    .byte 0
    str1: .text ","
    .byte 0
    str3: .text ") -> ("
    .byte 0
    str5: .text ")"
    .byte 0
}
  // print_ln
// Print a newline
print_ln: {
    // [40] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  b1_from_print_ln:
    // [40] phi (byte*) print_line_cursor#11 = (byte*) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    jmp b1
    // [40] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  b1_from_b1:
    // [40] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
    // print_ln::@1
  b1:
    // [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
    // print_ln::@return
  breturn:
    // [43] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zeropage(4) str)
print_str: {
    .label str = 4
    // [45] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  b1_from_print_str:
  b1_from_b2:
    // [45] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#74 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
    // [45] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    jmp b1
    // print_str::@1
  b1:
    // [46] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne b2
    jmp breturn
    // print_str::@return
  breturn:
    // [47] return 
    rts
    // print_str::@2
  b2:
    // [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
    // [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp b1_from_b2
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zeropage(6) b)
print_byte: {
    .label _0 = $12
    .label _2 = $13
    .label b = 6
    // [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte) 4 -- vbuz1=vbuz2_ror_4 
    lda.z b
    lsr
    lsr
    lsr
    lsr
    sta.z _0
    // [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z _0
    lda print_hextab,y
    sta.z print_char.ch
    // [54] call print_char 
    // [59] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#69 [phi:print_byte->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
    // print_byte::@1
  b1:
    // [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and.z b
    sta.z _2
    // [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy.z _2
    lda print_hextab,y
    sta.z print_char.ch
    // [57] call print_char 
    // [59] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#12 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
    // print_byte::@return
  breturn:
    // [58] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte zeropage(7) ch)
print_char: {
    .label ch = 7
    // [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuz2 
    lda.z ch
    ldy #0
    sta (print_char_cursor),y
    // [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp breturn
    // print_char::@return
  breturn:
    // [62] return 
    rts
}
  // perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
perspective: {
    // [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
    // [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
    // [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.z
    sta zr
    // asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  }
    lda zr
    sta PP+1
  PP:
    lda PERSP_Z
    sta psp1
    eor #$ff
    sta psp2
    clc
    ldy yr
    lda (psp1),y
    sbc (psp2),y
    adc #$80
    sta yr
    clc
    ldy xr
    lda (psp1),y
    sbc (psp2),y
    adc #$80
    sta xr
    jmp breturn
    // perspective::@return
  breturn:
    // [67] return 
    rts
}
  // print_sbyte
// Print a signed byte as HEX
// print_sbyte(signed byte zeropage($a) b)
print_sbyte: {
    .label b = $a
    // [69] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 -- vbsz1_lt_0_then_la1 
    lda.z b
    bmi b1_from_print_sbyte
    // [70] phi from print_sbyte to print_sbyte::@3 [phi:print_sbyte->print_sbyte::@3]
  b3_from_print_sbyte:
    jmp b3
    // print_sbyte::@3
  b3:
    // [71] call print_char 
    // [59] phi from print_sbyte::@3 to print_char [phi:print_sbyte::@3->print_char]
  print_char_from_b3:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@3->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sbyte::@3->print_char#1] -- vbuz1=vbuc1 
    lda #' '
    sta.z print_char.ch
    jsr print_char
    // [72] phi from print_sbyte::@3 print_sbyte::@4 to print_sbyte::@2 [phi:print_sbyte::@3/print_sbyte::@4->print_sbyte::@2]
  b2_from_b3:
  b2_from_b4:
    // [72] phi (signed byte) print_sbyte::b#6 = (signed byte) print_sbyte::b#4 [phi:print_sbyte::@3/print_sbyte::@4->print_sbyte::@2#0] -- register_copy 
    jmp b2
    // print_sbyte::@2
  b2:
    // [73] (byte) print_byte::b#0 ← (byte)(signed byte) print_sbyte::b#6 -- vbuz1=vbuz2 
    lda.z b
    sta.z print_byte.b
    // [74] call print_byte 
    // [51] phi from print_sbyte::@2 to print_byte [phi:print_sbyte::@2->print_byte]
  print_byte_from_b2:
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#12 [phi:print_sbyte::@2->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte) print_byte::b#0 [phi:print_sbyte::@2->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
    // print_sbyte::@return
  breturn:
    // [75] return 
    rts
    // [76] phi from print_sbyte to print_sbyte::@1 [phi:print_sbyte->print_sbyte::@1]
  b1_from_print_sbyte:
    jmp b1
    // print_sbyte::@1
  b1:
    // [77] call print_char 
    // [59] phi from print_sbyte::@1 to print_char [phi:print_sbyte::@1->print_char]
  print_char_from_b1:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@1->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sbyte::@1->print_char#1] -- vbuz1=vbuc1 
    lda #'-'
    sta.z print_char.ch
    jsr print_char
    jmp b4
    // print_sbyte::@4
  b4:
    // [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 -- vbsz1=_neg_vbsz1 
    lda.z b
    eor #$ff
    clc
    adc #1
    sta.z b
    jmp b2_from_b4
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // [80] call memset 
    // [82] phi from print_cls to memset [phi:print_cls->memset]
  memset_from_print_cls:
    jsr memset
    jmp breturn
    // print_cls::@return
  breturn:
    // [81] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = $400
    .label end = str+num
    .label dst = $b
    // [83] phi from memset to memset::@2 [phi:memset->memset::@2]
  b2_from_memset:
    // [83] phi (byte*) memset::dst#4 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@2#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    jmp b2
    // [83] phi from memset::@1 to memset::@2 [phi:memset::@1->memset::@2]
  b2_from_b1:
    // [83] phi (byte*) memset::dst#4 = (byte*) memset::dst#1 [phi:memset::@1->memset::@2#0] -- register_copy 
    jmp b2
    // memset::@2
  b2:
    // [84] *((byte*) memset::dst#4) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [85] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    jmp b1
    // memset::@1
  b1:
    // [86] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z dst+1
    cmp #>end
    bne b2_from_b1
    lda.z dst
    cmp #<end
    bne b2_from_b1
    jmp breturn
    // memset::@return
  breturn:
    // [87] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label _4 = $15
    .label _8 = $16
    .label _10 = $17
    .label val = $14
    .label sqr = $d
    .label add = $10
    .label i = $f
    // [89] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  b1_from_mulf_init:
    // [89] phi (signed word) mulf_init::add#2 = (signed byte) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vbsc1 
    lda #<1
    sta.z add
    lda #>1
    sta.z add+1
    // [89] phi (byte) mulf_init::i#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [89] phi (signed word) mulf_init::sqr#2 = (signed byte) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vbsc1 
    lda #<0
    sta.z sqr
    lda #>0
    sta.z sqr+1
    jmp b1
    // [89] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
  b1_from_b1:
    // [89] phi (signed word) mulf_init::add#2 = (signed word) mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
    // [89] phi (byte) mulf_init::i#2 = (byte) mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
    // [89] phi (signed word) mulf_init::sqr#2 = (signed word) mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    jmp b1
    // mulf_init::@1
  b1:
    // [90] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 -- vbuz1=_hi_vwsz2 
    lda.z sqr+1
    sta.z val
    // [91] *((const byte[$200]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z i
    sta mulf_sqr1,y
    // [92] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z i
    sta mulf_sqr1+$100,y
    // [93] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 -- vbuz1=_neg_vbuz2 
    lda.z i
    eor #$ff
    clc
    adc #1
    sta.z _4
    // [94] *((const byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z _4
    sta mulf_sqr1,y
    // [95] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z _4
    sta mulf_sqr1+$100,y
    // [96] *((const byte[$200]) mulf_sqr2#0+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z i
    sta mulf_sqr2+1,y
    // [97] *((const byte[$200]) mulf_sqr2#0+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z i
    sta mulf_sqr2+$100+1,y
    // [98] (byte~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuz1=vbuc1_minus_vbuz2 
    lda #1
    sec
    sbc.z i
    sta.z _8
    // [99] *((const byte[$200]) mulf_sqr2#0 + (byte~) mulf_init::$8) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z _8
    sta mulf_sqr2,y
    // [100] (byte~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuz1=vbuc1_minus_vbuz2 
    lda #1
    sec
    sbc.z i
    sta.z _10
    // [101] *((const byte[$200]) mulf_sqr2#0+(word) $100 + (byte~) mulf_init::$10) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z _10
    sta mulf_sqr2+$100,y
    // [102] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    lda.z sqr
    clc
    adc.z add
    sta.z sqr
    lda.z sqr+1
    adc.z add+1
    sta.z sqr+1
    // [103] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2 -- vwsz1=vwsz1_plus_2 
    lda.z add
    clc
    adc #2
    sta.z add
    bcc !+
    inc.z add+1
  !:
    // [104] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [105] if((byte) mulf_init::i#1!=(byte) $81) goto mulf_init::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$81
    cmp.z i
    bne b1_from_b1
    jmp breturn
    // mulf_init::@return
  breturn:
    // [106] return 
    rts
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  // Multiplication tables for seriously fast multiplication. 
  // This version is optimized for speed over accuracy
  // - It can multiply signed numbers with no extra code - but only for numbers in [-$3f;$3f]  
  // - It throws away the low part of the 32-bit result
  // - It return >a*b*4 to maximize precision (when passed maximal input values $3f*$3f the result is $3e) 
  // See the following for information about the method
  // - http://codebase64.org/doku.php?id=base:seriously_fast_multiplication 
  // - http://codebase64.org/doku.php?id=magazines:chacking16
  // mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
  // f(x) = >(( x * x ))
  .align $100
  mulf_sqr1: .fill $200, 0
  // g(x) =  >((( 1 - x ) * ( 1 - x )))
  .align $100
  mulf_sqr2: .fill $200, 0
  // Perspective multiplication table containing (d/(z0-z)[z] for each z-value   
  .align $100
PERSP_Z:
{
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}


REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::do_perspective:10::print_ln:37 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::do_perspective:10::print_ln:37 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [46] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 [ print_char_cursor#2 print_str::str#7 ] ( main:2::do_perspective:10::print_str:13 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:17 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:21 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:25 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:31 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:35 [ print_char_cursor#2 print_str::str#7 ] ) always clobbers reg byte a reg byte y 
Statement [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) [ print_char_cursor#2 print_str::str#7 ] ( main:2::do_perspective:10::print_str:13 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:17 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:21 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:25 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:31 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:35 [ print_char_cursor#2 print_str::str#7 ] ) always clobbers reg byte a reg byte y 
Statement [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte) 4 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] ( main:2::do_perspective:10::print_byte:29 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_byte:33 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
Statement [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f [ print_char_cursor#12 print_byte::$2 ] ( main:2::do_perspective:10::print_byte:29 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_byte:33 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74 [ print_char_cursor#12 print_byte::$2 ] ) always clobbers reg byte a 
Statement [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 [ print_char_cursor#44 ] ( main:2::do_perspective:10::print_byte:29::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_byte:33::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_byte:29::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_byte:33::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_char:71 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_char:71 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_char:71 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_char:77 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_char:77 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_char:77 [ print_sbyte::b#4 print_char_cursor#44 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
Statement [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 [ ] ( main:2::do_perspective:10::perspective:27 [ print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 [ ] ( main:2::do_perspective:10::perspective:27 [ print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 [ ] ( main:2::do_perspective:10::perspective:27 [ print_char_cursor#2 ] ) always clobbers reg byte a 
Statement asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  } always clobbers reg byte a reg byte y 
Statement [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 [ print_char_cursor#12 print_sbyte::b#0 ] ( main:2::do_perspective:10::print_sbyte:15 [ print_char_cursor#12 print_sbyte::b#0 ] main:2::do_perspective:10::print_sbyte:19 [ print_char_cursor#12 print_sbyte::b#0 ] main:2::do_perspective:10::print_sbyte:23 [ print_char_cursor#12 print_sbyte::b#0 ] ) always clobbers reg byte a 
Statement [84] *((byte*) memset::dst#4) ← (const byte) memset::c#0 [ memset::dst#4 ] ( main:2::print_cls:8::memset:80 [ memset::dst#4 ] ) always clobbers reg byte a reg byte y 
Statement [86] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#1 ] ( main:2::print_cls:8::memset:80 [ memset::dst#1 ] ) always clobbers reg byte a 
Statement [90] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ mulf_init::i#2 mulf_init::i#1 ]
Statement [93] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ mulf_init::val#0 ]
Statement [94] *((const byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ mulf_init::$4 ]
Statement [95] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [96] *((const byte[$200]) mulf_sqr2#0+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [97] *((const byte[$200]) mulf_sqr2#0+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [98] (byte~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$8 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$8 ] ) always clobbers reg byte a 
Statement [99] *((const byte[$200]) mulf_sqr2#0 + (byte~) mulf_init::$8) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [100] (byte~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$10 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$10 ] ) always clobbers reg byte a 
Statement [101] *((const byte[$200]) mulf_sqr2#0+(word) $100 + (byte~) mulf_init::$10) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] ) always clobbers reg byte a 
Statement [102] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] ( main:2::mulf_init:5 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] ) always clobbers reg byte a 
Statement [103] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] ( main:2::mulf_init:5 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] ) always clobbers reg byte a 
Statement [6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::do_perspective:10::print_ln:37 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 [ print_line_cursor#1 print_char_cursor#2 ] ( main:2::do_perspective:10::print_ln:37 [ print_line_cursor#1 print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [46] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 [ print_char_cursor#2 print_str::str#7 ] ( main:2::do_perspective:10::print_str:13 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:17 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:21 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:25 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:31 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:35 [ print_char_cursor#2 print_str::str#7 ] ) always clobbers reg byte a reg byte y 
Statement [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) [ print_char_cursor#2 print_str::str#7 ] ( main:2::do_perspective:10::print_str:13 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:17 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:21 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:25 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:31 [ print_char_cursor#2 print_str::str#7 ] main:2::do_perspective:10::print_str:35 [ print_char_cursor#2 print_str::str#7 ] ) always clobbers reg byte a reg byte y 
Statement [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte) 4 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] ( main:2::do_perspective:10::print_byte:29 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_byte:33 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74 [ print_byte::b#3 print_char_cursor#69 print_byte::$0 ] ) always clobbers reg byte a 
Statement [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f [ print_char_cursor#12 print_byte::$2 ] ( main:2::do_perspective:10::print_byte:29 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_byte:33 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74 [ print_char_cursor#12 print_byte::$2 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74 [ print_char_cursor#12 print_byte::$2 ] ) always clobbers reg byte a 
Statement [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 [ print_char_cursor#44 ] ( main:2::do_perspective:10::print_byte:29::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_byte:33::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74::print_char:54 [ print_byte::b#3 print_char_cursor#44 ] main:2::do_perspective:10::print_byte:29::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_byte:33::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_byte:74::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_byte:74::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_byte:74::print_char:57 [ print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_char:71 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_char:71 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_char:71 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:15::print_char:77 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:19::print_char:77 [ print_sbyte::b#4 print_char_cursor#44 ] main:2::do_perspective:10::print_sbyte:23::print_char:77 [ print_sbyte::b#4 print_char_cursor#44 ] ) always clobbers reg byte y 
Statement [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 [ ] ( main:2::do_perspective:10::perspective:27 [ print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 [ ] ( main:2::do_perspective:10::perspective:27 [ print_char_cursor#2 ] ) always clobbers reg byte a 
Statement [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 [ ] ( main:2::do_perspective:10::perspective:27 [ print_char_cursor#2 ] ) always clobbers reg byte a 
Statement asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  } always clobbers reg byte a reg byte y 
Statement [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 [ print_char_cursor#12 print_sbyte::b#0 ] ( main:2::do_perspective:10::print_sbyte:15 [ print_char_cursor#12 print_sbyte::b#0 ] main:2::do_perspective:10::print_sbyte:19 [ print_char_cursor#12 print_sbyte::b#0 ] main:2::do_perspective:10::print_sbyte:23 [ print_char_cursor#12 print_sbyte::b#0 ] ) always clobbers reg byte a 
Statement [84] *((byte*) memset::dst#4) ← (const byte) memset::c#0 [ memset::dst#4 ] ( main:2::print_cls:8::memset:80 [ memset::dst#4 ] ) always clobbers reg byte a reg byte y 
Statement [86] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#1 ] ( main:2::print_cls:8::memset:80 [ memset::dst#1 ] ) always clobbers reg byte a 
Statement [90] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [91] *((const byte[$200]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [92] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [93] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ) always clobbers reg byte a 
Statement [94] *((const byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$4 ] ) always clobbers reg byte a 
Statement [95] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [96] *((const byte[$200]) mulf_sqr2#0+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [97] *((const byte[$200]) mulf_sqr2#0+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [98] (byte~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$8 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$8 ] ) always clobbers reg byte a 
Statement [99] *((const byte[$200]) mulf_sqr2#0 + (byte~) mulf_init::$8) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ) always clobbers reg byte a 
Statement [100] (byte~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$10 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$10 ] ) always clobbers reg byte a 
Statement [101] *((const byte[$200]) mulf_sqr2#0+(word) $100 + (byte~) mulf_init::$10) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] ) always clobbers reg byte a 
Statement [102] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] ( main:2::mulf_init:5 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] ) always clobbers reg byte a 
Statement [103] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] ( main:2::mulf_init:5 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] ) always clobbers reg byte a 
Potential registers zp ZP_WORD:2 [ print_line_cursor#11 print_line_cursor#1 ] : zp ZP_WORD:2 , 
Potential registers zp ZP_WORD:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ] : zp ZP_BYTE:6 , reg byte x , 
Potential registers zp ZP_BYTE:7 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:8 [ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ] : zp ZP_WORD:8 , 
Potential registers zp ZP_BYTE:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , 
Potential registers zp ZP_WORD:11 [ memset::dst#4 memset::dst#1 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_WORD:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] : zp ZP_WORD:13 , 
Potential registers zp ZP_BYTE:15 [ mulf_init::i#2 mulf_init::i#1 ] : zp ZP_BYTE:15 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:16 [ mulf_init::add#2 mulf_init::add#1 ] : zp ZP_WORD:16 , 
Potential registers zp ZP_BYTE:18 [ print_byte::$0 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:19 [ print_byte::$2 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ mulf_init::val#0 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:21 [ mulf_init::$4 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ mulf_init::$8 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ mulf_init::$10 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [mulf_init] 23.1: zp ZP_BYTE:15 [ mulf_init::i#2 mulf_init::i#1 ] 22: zp ZP_BYTE:22 [ mulf_init::$8 ] 22: zp ZP_BYTE:23 [ mulf_init::$10 ] 16.5: zp ZP_BYTE:21 [ mulf_init::$4 ] 9.69: zp ZP_WORD:16 [ mulf_init::add#2 mulf_init::add#1 ] 9: zp ZP_BYTE:20 [ mulf_init::val#0 ] 8.04: zp ZP_WORD:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] 
Uplift Scope [] 38.5: zp ZP_WORD:2 [ print_line_cursor#11 print_line_cursor#1 ] 34.41: zp ZP_WORD:8 [ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ] 
Uplift Scope [print_str] 35.5: zp ZP_WORD:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] 
Uplift Scope [memset] 33: zp ZP_WORD:11 [ memset::dst#4 memset::dst#1 ] 
Uplift Scope [print_byte] 14.5: zp ZP_BYTE:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ] 4: zp ZP_BYTE:18 [ print_byte::$0 ] 4: zp ZP_BYTE:19 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp ZP_BYTE:7 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] 
Uplift Scope [print_sbyte] 9: zp ZP_BYTE:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ] 
Uplift Scope [RADIX] 
Uplift Scope [print_ln] 
Uplift Scope [print_cls] 
Uplift Scope [main] 
Uplift Scope [do_perspective] 
Uplift Scope [perspective] 

Uplifting [mulf_init] best 4060 combination reg byte y [ mulf_init::i#2 mulf_init::i#1 ] reg byte x [ mulf_init::$8 ] reg byte x [ mulf_init::$10 ] reg byte x [ mulf_init::$4 ] zp ZP_WORD:16 [ mulf_init::add#2 mulf_init::add#1 ] zp ZP_BYTE:20 [ mulf_init::val#0 ] zp ZP_WORD:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] 
Limited combination testing to 100 combinations of 432 possible.
Uplifting [] best 4060 combination zp ZP_WORD:2 [ print_line_cursor#11 print_line_cursor#1 ] zp ZP_WORD:8 [ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ] 
Uplifting [print_str] best 4060 combination zp ZP_WORD:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] 
Uplifting [memset] best 4060 combination zp ZP_WORD:11 [ memset::dst#4 memset::dst#1 ] 
Uplifting [print_byte] best 4039 combination reg byte x [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] 
Uplifting [print_char] best 4024 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] 
Uplifting [print_sbyte] best 4009 combination reg byte x [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ] 
Uplifting [RADIX] best 4009 combination 
Uplifting [print_ln] best 4009 combination 
Uplifting [print_cls] best 4009 combination 
Uplifting [main] best 4009 combination 
Uplifting [do_perspective] best 4009 combination 
Uplifting [perspective] best 4009 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ mulf_init::val#0 ]
Uplifting [mulf_init] best 4009 combination zp ZP_BYTE:20 [ mulf_init::val#0 ] 
Coalescing zero page register [ zp ZP_WORD:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] ] with [ zp ZP_WORD:2 [ print_line_cursor#11 print_line_cursor#1 ] ]
Coalescing zero page register [ zp ZP_WORD:11 [ memset::dst#4 memset::dst#1 ] ] with [ zp ZP_WORD:8 [ print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ] ]
Coalescing zero page register [ zp ZP_WORD:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] ] with [ zp ZP_WORD:4 [ print_str::str#7 print_str::str#9 print_str::str#0 print_line_cursor#11 print_line_cursor#1 ] ]
Coalescing zero page register [ zp ZP_WORD:16 [ mulf_init::add#2 mulf_init::add#1 ] ] with [ zp ZP_WORD:11 [ memset::dst#4 memset::dst#1 print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ] ]
Allocated (was zp ZP_WORD:13) zp ZP_WORD:2 [ mulf_init::sqr#2 mulf_init::sqr#1 print_str::str#7 print_str::str#9 print_str::str#0 print_line_cursor#11 print_line_cursor#1 ]
Allocated (was zp ZP_WORD:16) zp ZP_WORD:4 [ mulf_init::add#2 mulf_init::add#1 memset::dst#4 memset::dst#1 print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ]
Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:6 [ mulf_init::val#0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// 3D Rotation using a Rotation Matrix
// Based on: 
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation  
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // The rotated point - updated by calling rotate()
  .label xr = $f0
  .label yr = $f1
  .label zr = $f2
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $f3
  .label psp2 = $f5
  .label print_char_cursor = 4
  .label print_line_cursor = 2
  // @begin
bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
b1_from_bbegin:
  jmp b1
  // @1
b1:
  // [2] call main 
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
bend_from_b1:
  jmp bend
  // @end
bend:
  // main
main: {
    // asm { sei  }
    sei
    // [5] call mulf_init 
    // [88] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp b1
    // main::@1
  b1:
    // [6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
    // [7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr2
    sta psp2
    lda #>mulf_sqr2
    sta psp2+1
    // [8] call print_cls 
    // [79] phi from main::@1 to print_cls [phi:main::@1->print_cls]
  print_cls_from_b1:
    jsr print_cls
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
    // main::@2
  b2:
    // [10] call do_perspective 
    // [12] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
  do_perspective_from_b2:
    jsr do_perspective
    jmp breturn
    // main::@return
  breturn:
    // [11] return 
    rts
}
  // do_perspective
do_perspective: {
    .label x = $39
    .label y = -$47
    .label z = $36
    // [13] call print_str 
    // [44] phi from do_perspective to print_str [phi:do_perspective->print_str]
  print_str_from_do_perspective:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) 1024 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str [phi:do_perspective->print_str#1] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str.str
    lda #>str
    sta.z print_str.str+1
    jsr print_str
    // [14] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
  b1_from_do_perspective:
    jmp b1
    // do_perspective::@1
  b1:
    // [15] call print_sbyte 
    // [68] phi from do_perspective::@1 to print_sbyte [phi:do_perspective::@1->print_sbyte]
  print_sbyte_from_b1:
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::x#0 [phi:do_perspective::@1->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #x
    jsr print_sbyte
    // [16] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
  b2_from_b1:
    jmp b2
    // do_perspective::@2
  b2:
    // [17] call print_str 
    // [44] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
  print_str_from_b2:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@2->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@2->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // [18] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
  b3_from_b2:
    jmp b3
    // do_perspective::@3
  b3:
    // [19] call print_sbyte 
    // [68] phi from do_perspective::@3 to print_sbyte [phi:do_perspective::@3->print_sbyte]
  print_sbyte_from_b3:
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::y#0 [phi:do_perspective::@3->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #y
    jsr print_sbyte
    // [20] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
  b4_from_b3:
    jmp b4
    // do_perspective::@4
  b4:
    // [21] call print_str 
    // [44] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
  print_str_from_b4:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@4->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@4->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // [22] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
  b5_from_b4:
    jmp b5
    // do_perspective::@5
  b5:
    // [23] call print_sbyte 
    // [68] phi from do_perspective::@5 to print_sbyte [phi:do_perspective::@5->print_sbyte]
  print_sbyte_from_b5:
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::z#0 [phi:do_perspective::@5->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #z
    jsr print_sbyte
    // [24] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
  b6_from_b5:
    jmp b6
    // do_perspective::@6
  b6:
    // [25] call print_str 
    // [44] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
  print_str_from_b6:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@6->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str3 [phi:do_perspective::@6->print_str#1] -- pbuz1=pbuc1 
    lda #<str3
    sta.z print_str.str
    lda #>str3
    sta.z print_str.str+1
    jsr print_str
    // [26] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
  b7_from_b6:
    jmp b7
    // do_perspective::@7
  b7:
    // [27] call perspective 
    jsr perspective
    jmp b8
    // do_perspective::@8
  b8:
    // [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0) -- vbuxx=_deref_pbuc1 
    ldx xr
    // [29] call print_byte 
    // [51] phi from do_perspective::@8 to print_byte [phi:do_perspective::@8->print_byte]
  print_byte_from_b8:
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@8->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#6 [phi:do_perspective::@8->print_byte#1] -- register_copy 
    jsr print_byte
    // [30] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
  b9_from_b8:
    jmp b9
    // do_perspective::@9
  b9:
    // [31] call print_str 
    // [44] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
  print_str_from_b9:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@9->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@9->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    jmp b10
    // do_perspective::@10
  b10:
    // [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0) -- vbuxx=_deref_pbuc1 
    ldx yr
    // [33] call print_byte 
    // [51] phi from do_perspective::@10 to print_byte [phi:do_perspective::@10->print_byte]
  print_byte_from_b10:
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@10->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#5 [phi:do_perspective::@10->print_byte#1] -- register_copy 
    jsr print_byte
    // [34] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
  b11_from_b10:
    jmp b11
    // do_perspective::@11
  b11:
    // [35] call print_str 
    // [44] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
  print_str_from_b11:
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@11->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str5 [phi:do_perspective::@11->print_str#1] -- pbuz1=pbuc1 
    lda #<str5
    sta.z print_str.str
    lda #>str5
    sta.z print_str.str+1
    jsr print_str
    // [36] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
  b12_from_b11:
    jmp b12
    // do_perspective::@12
  b12:
    // [37] call print_ln 
    // [39] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
  print_ln_from_b12:
    jsr print_ln
    jmp breturn
    // do_perspective::@return
  breturn:
    // [38] return 
    rts
    str: .text "("
    .byte 0
    str1: .text ","
    .byte 0
    str3: .text ") -> ("
    .byte 0
    str5: .text ")"
    .byte 0
}
  // print_ln
// Print a newline
print_ln: {
    // [40] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  b1_from_print_ln:
    // [40] phi (byte*) print_line_cursor#11 = (byte*) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    jmp b1
    // [40] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  b1_from_b1:
    // [40] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
    // print_ln::@1
  b1:
    // [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
    // print_ln::@return
  breturn:
    // [43] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zeropage(2) str)
print_str: {
    .label str = 2
    // [45] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  b1_from_print_str:
  b1_from_b2:
    // [45] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#74 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
    // [45] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    jmp b1
    // print_str::@1
  b1:
    // [46] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne b2
    jmp breturn
    // print_str::@return
  breturn:
    // [47] return 
    rts
    // print_str::@2
  b2:
    // [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
    // [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp b1_from_b2
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [54] call print_char 
    // [59] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#69 [phi:print_byte->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
    // print_byte::@1
  b1:
    // [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [57] call print_char 
    // [59] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#12 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
    // print_byte::@return
  breturn:
    // [58] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp breturn
    // print_char::@return
  breturn:
    // [62] return 
    rts
}
  // perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
perspective: {
    // [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
    // [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
    // [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.z
    sta zr
    // asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  }
    lda zr
    sta PP+1
  PP:
    lda PERSP_Z
    sta psp1
    eor #$ff
    sta psp2
    clc
    ldy yr
    lda (psp1),y
    sbc (psp2),y
    adc #$80
    sta yr
    clc
    ldy xr
    lda (psp1),y
    sbc (psp2),y
    adc #$80
    sta xr
    jmp breturn
    // perspective::@return
  breturn:
    // [67] return 
    rts
}
  // print_sbyte
// Print a signed byte as HEX
// print_sbyte(signed byte register(X) b)
print_sbyte: {
    // [69] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 -- vbsxx_lt_0_then_la1 
    cpx #0
    bmi b1_from_print_sbyte
    // [70] phi from print_sbyte to print_sbyte::@3 [phi:print_sbyte->print_sbyte::@3]
  b3_from_print_sbyte:
    jmp b3
    // print_sbyte::@3
  b3:
    // [71] call print_char 
    // [59] phi from print_sbyte::@3 to print_char [phi:print_sbyte::@3->print_char]
  print_char_from_b3:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@3->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sbyte::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
    // [72] phi from print_sbyte::@3 print_sbyte::@4 to print_sbyte::@2 [phi:print_sbyte::@3/print_sbyte::@4->print_sbyte::@2]
  b2_from_b3:
  b2_from_b4:
    // [72] phi (signed byte) print_sbyte::b#6 = (signed byte) print_sbyte::b#4 [phi:print_sbyte::@3/print_sbyte::@4->print_sbyte::@2#0] -- register_copy 
    jmp b2
    // print_sbyte::@2
  b2:
    // [73] (byte) print_byte::b#0 ← (byte)(signed byte) print_sbyte::b#6
    // [74] call print_byte 
    // [51] phi from print_sbyte::@2 to print_byte [phi:print_sbyte::@2->print_byte]
  print_byte_from_b2:
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#12 [phi:print_sbyte::@2->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte) print_byte::b#0 [phi:print_sbyte::@2->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
    // print_sbyte::@return
  breturn:
    // [75] return 
    rts
    // [76] phi from print_sbyte to print_sbyte::@1 [phi:print_sbyte->print_sbyte::@1]
  b1_from_print_sbyte:
    jmp b1
    // print_sbyte::@1
  b1:
    // [77] call print_char 
    // [59] phi from print_sbyte::@1 to print_char [phi:print_sbyte::@1->print_char]
  print_char_from_b1:
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@1->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sbyte::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    jmp b4
    // print_sbyte::@4
  b4:
    // [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 -- vbsxx=_neg_vbsxx 
    txa
    eor #$ff
    clc
    adc #1
    tax
    jmp b2_from_b4
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // [80] call memset 
    // [82] phi from print_cls to memset [phi:print_cls->memset]
  memset_from_print_cls:
    jsr memset
    jmp breturn
    // print_cls::@return
  breturn:
    // [81] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = $400
    .label end = str+num
    .label dst = 4
    // [83] phi from memset to memset::@2 [phi:memset->memset::@2]
  b2_from_memset:
    // [83] phi (byte*) memset::dst#4 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@2#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    jmp b2
    // [83] phi from memset::@1 to memset::@2 [phi:memset::@1->memset::@2]
  b2_from_b1:
    // [83] phi (byte*) memset::dst#4 = (byte*) memset::dst#1 [phi:memset::@1->memset::@2#0] -- register_copy 
    jmp b2
    // memset::@2
  b2:
    // [84] *((byte*) memset::dst#4) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [85] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    jmp b1
    // memset::@1
  b1:
    // [86] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z dst+1
    cmp #>end
    bne b2_from_b1
    lda.z dst
    cmp #<end
    bne b2_from_b1
    jmp breturn
    // memset::@return
  breturn:
    // [87] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label val = 6
    .label sqr = 2
    .label add = 4
    // [89] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  b1_from_mulf_init:
    // [89] phi (signed word) mulf_init::add#2 = (signed byte) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vbsc1 
    lda #<1
    sta.z add
    lda #>1
    sta.z add+1
    // [89] phi (byte) mulf_init::i#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#1] -- vbuyy=vbuc1 
    ldy #0
    // [89] phi (signed word) mulf_init::sqr#2 = (signed byte) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vbsc1 
    lda #<0
    sta.z sqr
    lda #>0
    sta.z sqr+1
    jmp b1
    // [89] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
  b1_from_b1:
    // [89] phi (signed word) mulf_init::add#2 = (signed word) mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
    // [89] phi (byte) mulf_init::i#2 = (byte) mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
    // [89] phi (signed word) mulf_init::sqr#2 = (signed word) mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    jmp b1
    // mulf_init::@1
  b1:
    // [90] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 -- vbuz1=_hi_vwsz2 
    lda.z sqr+1
    sta.z val
    // [91] *((const byte[$200]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr1,y
    // [92] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr1+$100,y
    // [93] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 -- vbuxx=_neg_vbuyy 
    tya
    eor #$ff
    tax
    inx
    // [94] *((const byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1,x
    // [95] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1+$100,x
    // [96] *((const byte[$200]) mulf_sqr2#0+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr2+1,y
    // [97] *((const byte[$200]) mulf_sqr2#0+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr2+$100+1,y
    // [98] (byte~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // [99] *((const byte[$200]) mulf_sqr2#0 + (byte~) mulf_init::$8) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2,x
    // [100] (byte~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // [101] *((const byte[$200]) mulf_sqr2#0+(word) $100 + (byte~) mulf_init::$10) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2+$100,x
    // [102] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    lda.z sqr
    clc
    adc.z add
    sta.z sqr
    lda.z sqr+1
    adc.z add+1
    sta.z sqr+1
    // [103] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2 -- vwsz1=vwsz1_plus_2 
    lda.z add
    clc
    adc #2
    sta.z add
    bcc !+
    inc.z add+1
  !:
    // [104] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [105] if((byte) mulf_init::i#1!=(byte) $81) goto mulf_init::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$81
    bne b1_from_b1
    jmp breturn
    // mulf_init::@return
  breturn:
    // [106] return 
    rts
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  // Multiplication tables for seriously fast multiplication. 
  // This version is optimized for speed over accuracy
  // - It can multiply signed numbers with no extra code - but only for numbers in [-$3f;$3f]  
  // - It throws away the low part of the 32-bit result
  // - It return >a*b*4 to maximize precision (when passed maximal input values $3f*$3f the result is $3e) 
  // See the following for information about the method
  // - http://codebase64.org/doku.php?id=base:seriously_fast_multiplication 
  // - http://codebase64.org/doku.php?id=magazines:chacking16
  // mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
  // f(x) = >(( x * x ))
  .align $100
  mulf_sqr1: .fill $200, 0
  // g(x) =  >((( 1 - x ) * ( 1 - x )))
  .align $100
  mulf_sqr2: .fill $200, 0
  // Perspective multiplication table containing (d/(z0-z)[z] for each z-value   
  .align $100
PERSP_Z:
{
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp b9
Removing instruction jmp b10
Removing instruction jmp b11
Removing instruction jmp b12
Removing instruction jmp 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 b3
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b4
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction ldy #0
Removing instruction lda zr
Replacing instruction ldy #0 with TAY
Removing instruction lda #<0
Removing instruction lda #>0
Removing instruction lda.z val
Removing instruction lda.z val
Removing instruction lda.z val
Removing instruction lda.z val
Removing instruction lda.z val
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b2 with b1
Replacing label b1_from_print_sbyte with b1
Replacing label b2_from_b4 with b2
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Replacing label b1_from_b1 with b1
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b2_from_b1:
Removing instruction do_perspective_from_b2:
Removing instruction b1_from_do_perspective:
Removing instruction print_sbyte_from_b1:
Removing instruction b2_from_b1:
Removing instruction print_str_from_b2:
Removing instruction b3_from_b2:
Removing instruction print_sbyte_from_b3:
Removing instruction b4_from_b3:
Removing instruction print_str_from_b4:
Removing instruction b5_from_b4:
Removing instruction print_sbyte_from_b5:
Removing instruction b6_from_b5:
Removing instruction print_str_from_b6:
Removing instruction b7_from_b6:
Removing instruction b9_from_b8:
Removing instruction print_str_from_b9:
Removing instruction b11_from_b10:
Removing instruction print_str_from_b11:
Removing instruction b12_from_b11:
Removing instruction print_ln_from_b12:
Removing instruction b1_from_b1:
Removing instruction b1_from_print_str:
Removing instruction b1_from_b2:
Removing instruction b3_from_print_sbyte:
Removing instruction print_char_from_b3:
Removing instruction b2_from_b3:
Removing instruction b2_from_b4:
Removing instruction print_byte_from_b2:
Removing instruction b1_from_print_sbyte:
Removing instruction print_char_from_b1:
Removing instruction b2_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction mulf_init_from_main:
Removing instruction b1:
Removing instruction print_cls_from_b1:
Removing instruction b2:
Removing instruction breturn:
Removing instruction print_str_from_do_perspective:
Removing instruction b1:
Removing instruction b2:
Removing instruction b3:
Removing instruction b4:
Removing instruction b5:
Removing instruction b6:
Removing instruction b7:
Removing instruction b8:
Removing instruction print_byte_from_b8:
Removing instruction b9:
Removing instruction b10:
Removing instruction print_byte_from_b10:
Removing instruction b11:
Removing instruction b12:
Removing instruction breturn:
Removing instruction b1_from_print_ln:
Removing instruction breturn:
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 b3:
Removing instruction breturn:
Removing instruction b4:
Removing instruction memset_from_print_cls:
Removing instruction breturn:
Removing instruction b2_from_memset:
Removing instruction b1:
Removing instruction breturn:
Removing instruction b1_from_mulf_init:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(signed byte[$100]) PERSP_Z
(const signed byte[$100]) PERSP_Z#0 PERSP_Z = kickasm {{ {
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}
 }}
(const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
(label) do_perspective::@1
(label) do_perspective::@10
(label) do_perspective::@11
(label) do_perspective::@12
(label) do_perspective::@2
(label) do_perspective::@3
(label) do_perspective::@4
(label) do_perspective::@5
(label) do_perspective::@6
(label) do_perspective::@7
(label) do_perspective::@8
(label) do_perspective::@9
(label) do_perspective::@return
(const string) do_perspective::str str = (string) "("
(const string) do_perspective::str1 str1 = (string) ","
(const string) do_perspective::str3 str3 = (string) ") -> ("
(const string) do_perspective::str5 str5 = (string) ")"
(signed byte) do_perspective::x
(const signed byte) do_perspective::x#0 x = (signed byte) $39
(signed byte) do_perspective::y
(const signed byte) do_perspective::y#0 y = (signed byte) -$47
(signed byte) do_perspective::z
(const signed byte) do_perspective::z#0 z = (signed byte) $36
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@return
(byte) memset::c
(const byte) memset::c#0 c = (byte) ' '
(byte*) memset::dst
(byte*) memset::dst#1 dst zp ZP_WORD:4 16.5
(byte*) memset::dst#4 dst zp ZP_WORD:4 16.5
(byte*) memset::end
(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0
(word) memset::num
(const word) memset::num#0 num = (word) $3e8
(void*) memset::return
(void*) memset::str
(const void*) memset::str#0 str = (void*)(byte*) 1024
(void()) mulf_init()
(byte~) mulf_init::$10 reg byte x 22.0
(byte~) mulf_init::$4 reg byte x 16.5
(byte~) mulf_init::$8 reg byte x 22.0
(label) mulf_init::@1
(label) mulf_init::@return
(signed word) mulf_init::add
(signed word) mulf_init::add#1 add zp ZP_WORD:4 7.333333333333333
(signed word) mulf_init::add#2 add zp ZP_WORD:4 2.357142857142857
(byte) mulf_init::i
(byte) mulf_init::i#1 reg byte y 16.5
(byte) mulf_init::i#2 reg byte y 6.6
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#1 sqr zp ZP_WORD:2 5.5
(signed word) mulf_init::sqr#2 sqr zp ZP_WORD:2 2.5384615384615383
(byte) mulf_init::val
(byte) mulf_init::val#0 val zp ZP_BYTE:6 9.0
(byte[$200]) mulf_sqr1
(const byte[$200]) mulf_sqr1#0 mulf_sqr1 = { fill( $200, 0) }
(byte[$200]) mulf_sqr2
(const byte[$200]) mulf_sqr2#0 mulf_sqr2 = { fill( $200, 0) }
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
(label) perspective::@return
(signed byte) perspective::x
(signed byte) perspective::y
(signed byte) perspective::z
(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#3 reg byte x 2.5
(byte~) print_byte::b#5 reg byte x 4.0
(byte~) print_byte::b#6 reg byte x 4.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#2 reg byte a 4.0
(byte) print_char::ch#3 reg byte a 4.0
(byte) print_char::ch#4 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:4 11.0
(byte*) print_char_cursor#12 print_char_cursor zp ZP_WORD:4 0.6666666666666666
(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:4 2.076923076923077
(byte*) print_char_cursor#44 print_char_cursor zp ZP_WORD:4 6.0
(byte*) print_char_cursor#69 print_char_cursor zp ZP_WORD:4 2.6666666666666665
(byte*) print_char_cursor#74 print_char_cursor zp ZP_WORD:4 12.0
(void()) print_cls()
(label) print_cls::@return
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:2 16.5
(byte*) print_line_cursor#11 print_line_cursor zp ZP_WORD:2 22.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(void()) print_sbyte((signed byte) print_sbyte::b)
(label) print_sbyte::@1
(label) print_sbyte::@2
(label) print_sbyte::@3
(label) print_sbyte::@4
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 reg byte x 4.0
(signed byte) print_sbyte::b#4 reg byte x 1.0
(signed byte) print_sbyte::b#6 reg byte x 4.0
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0 str zp ZP_WORD:2 22.0
(byte*) print_str::str#7 str zp ZP_WORD:2 11.5
(byte*) print_str::str#9 str zp ZP_WORD:2 2.0
(word*) psp1
(const word*) psp1#0 psp1 = (word*) 243
(word*) psp2
(const word*) psp2#0 psp2 = (word*) 245
(signed byte*) xr
(const signed byte*) xr#0 xr = (signed byte*) 240
(signed byte*) yr
(const signed byte*) yr#0 yr = (signed byte*) 241
(signed byte*) zr
(const signed byte*) zr#0 zr = (signed byte*) 242

reg byte x [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
reg byte x [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
zp ZP_WORD:2 [ mulf_init::sqr#2 mulf_init::sqr#1 print_str::str#7 print_str::str#9 print_str::str#0 print_line_cursor#11 print_line_cursor#1 ]
reg byte y [ mulf_init::i#2 mulf_init::i#1 ]
zp ZP_WORD:4 [ mulf_init::add#2 mulf_init::add#1 memset::dst#4 memset::dst#1 print_char_cursor#44 print_char_cursor#69 print_char_cursor#2 print_char_cursor#74 print_char_cursor#12 print_char_cursor#1 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]
zp ZP_BYTE:6 [ mulf_init::val#0 ]
reg byte x [ mulf_init::$4 ]
reg byte x [ mulf_init::$8 ]
reg byte x [ mulf_init::$10 ]


FINAL ASSEMBLER
Score: 3345

  // File Comments
// 3D Rotation using a Rotation Matrix
// Based on: 
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation  
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  // The rotated point - updated by calling rotate()
  .label xr = $f0
  .label yr = $f1
  .label zr = $f2
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $f3
  .label psp2 = $f5
  .label print_char_cursor = 4
  .label print_line_cursor = 2
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    // asm
    // asm { sei  }
    sei
    // mulf_init()
    // [5] call mulf_init 
    // [88] phi from main to mulf_init [phi:main->mulf_init]
    jsr mulf_init
    // main::@1
    // *psp1 = (word)mulf_sqr1
    // [6] *((const word*) psp1#0) ← (word)(const byte[$200]) mulf_sqr1#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
    // *psp2 = (word)mulf_sqr2
    // [7] *((const word*) psp2#0) ← (word)(const byte[$200]) mulf_sqr2#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr2
    sta psp2
    lda #>mulf_sqr2
    sta psp2+1
    // print_cls()
    // [8] call print_cls 
    // [79] phi from main::@1 to print_cls [phi:main::@1->print_cls]
    jsr print_cls
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // do_perspective($39, -$47, $36)
    // [10] call do_perspective 
    // [12] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
    jsr do_perspective
    // main::@return
    // }
    // [11] return 
    rts
}
  // do_perspective
do_perspective: {
    .label x = $39
    .label y = -$47
    .label z = $36
    // print_str("(")
    // [13] call print_str 
    // [44] phi from do_perspective to print_str [phi:do_perspective->print_str]
    // [44] phi (byte*) print_char_cursor#74 = (byte*) 1024 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_char_cursor
    lda #>$400
    sta.z print_char_cursor+1
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str [phi:do_perspective->print_str#1] -- pbuz1=pbuc1 
    lda #<str
    sta.z print_str.str
    lda #>str
    sta.z print_str.str+1
    jsr print_str
    // [14] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
    // do_perspective::@1
    // print_sbyte(x)
    // [15] call print_sbyte 
    // [68] phi from do_perspective::@1 to print_sbyte [phi:do_perspective::@1->print_sbyte]
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::x#0 [phi:do_perspective::@1->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #x
    jsr print_sbyte
    // [16] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
    // do_perspective::@2
    // print_str(",")
    // [17] call print_str 
    // [44] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@2->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@2->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // [18] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
    // do_perspective::@3
    // print_sbyte(y)
    // [19] call print_sbyte 
    // [68] phi from do_perspective::@3 to print_sbyte [phi:do_perspective::@3->print_sbyte]
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::y#0 [phi:do_perspective::@3->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #y
    jsr print_sbyte
    // [20] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
    // do_perspective::@4
    // print_str(",")
    // [21] call print_str 
    // [44] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@4->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@4->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // [22] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
    // do_perspective::@5
    // print_sbyte(z)
    // [23] call print_sbyte 
    // [68] phi from do_perspective::@5 to print_sbyte [phi:do_perspective::@5->print_sbyte]
    // [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::z#0 [phi:do_perspective::@5->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #z
    jsr print_sbyte
    // [24] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
    // do_perspective::@6
    // print_str(") -> (")
    // [25] call print_str 
    // [44] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@6->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str3 [phi:do_perspective::@6->print_str#1] -- pbuz1=pbuc1 
    lda #<str3
    sta.z print_str.str
    lda #>str3
    sta.z print_str.str+1
    jsr print_str
    // [26] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
    // do_perspective::@7
    // perspective(x, y, z)
    // [27] call perspective 
    jsr perspective
    // do_perspective::@8
    // [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0) -- vbuxx=_deref_pbuc1 
    ldx xr
    // print_byte((byte)*xr)
    // [29] call print_byte 
    // [51] phi from do_perspective::@8 to print_byte [phi:do_perspective::@8->print_byte]
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@8->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#6 [phi:do_perspective::@8->print_byte#1] -- register_copy 
    jsr print_byte
    // [30] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
    // do_perspective::@9
    // print_str(",")
    // [31] call print_str 
    // [44] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@9->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@9->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta.z print_str.str
    lda #>str1
    sta.z print_str.str+1
    jsr print_str
    // do_perspective::@10
    // [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0) -- vbuxx=_deref_pbuc1 
    ldx yr
    // print_byte((byte)*yr)
    // [33] call print_byte 
    // [51] phi from do_perspective::@10 to print_byte [phi:do_perspective::@10->print_byte]
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@10->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#5 [phi:do_perspective::@10->print_byte#1] -- register_copy 
    jsr print_byte
    // [34] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
    // do_perspective::@11
    // print_str(")")
    // [35] call print_str 
    // [44] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
    // [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@11->print_str#0] -- register_copy 
    // [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str5 [phi:do_perspective::@11->print_str#1] -- pbuz1=pbuc1 
    lda #<str5
    sta.z print_str.str
    lda #>str5
    sta.z print_str.str+1
    jsr print_str
    // [36] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
    // do_perspective::@12
    // print_ln()
    // [37] call print_ln 
    // [39] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
    jsr print_ln
    // do_perspective::@return
    // }
    // [38] return 
    rts
    str: .text "("
    .byte 0
    str1: .text ","
    .byte 0
    str3: .text ") -> ("
    .byte 0
    str5: .text ")"
    .byte 0
}
  // print_ln
// Print a newline
print_ln: {
    // [40] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
    // [40] phi (byte*) print_line_cursor#11 = (byte*) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta.z print_line_cursor
    lda #>$400
    sta.z print_line_cursor+1
    // [40] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
    // [40] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  b1:
    // print_line_cursor + $28
    // [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 
    lda #$28
    clc
    adc.z print_line_cursor
    sta.z print_line_cursor
    bcc !+
    inc.z print_line_cursor+1
  !:
    // while (print_line_cursor<print_char_cursor)
    // [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda.z print_line_cursor+1
    cmp.z print_char_cursor+1
    bcc b1
    bne !+
    lda.z print_line_cursor
    cmp.z print_char_cursor
    bcc b1
  !:
    // print_ln::@return
    // }
    // [43] return 
    rts
}
  // print_str
// Print a zero-terminated string
// print_str(byte* zeropage(2) str)
print_str: {
    .label str = 2
    // [45] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
    // [45] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#74 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
    // [45] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    // print_str::@1
  b1:
    // while(*str)
    // [46] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 -- vbuc1_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne b2
    // print_str::@return
    // }
    // [47] return 
    rts
    // print_str::@2
  b2:
    // *(print_char_cursor++) = *(str++)
    // [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    sta (print_char_cursor),y
    // *(print_char_cursor++) = *(str++);
    // [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp b1
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // b>>4
    // [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [54] call print_char 
    // [59] phi from print_byte to print_char [phi:print_byte->print_char]
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#69 [phi:print_byte->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@1
    // b&$f
    // [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [57] call print_char 
    // [59] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#12 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@return
    // }
    // [58] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [62] return 
    rts
}
  // perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
perspective: {
    // *xr = x
    // [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
    // *yr = y
    // [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
    // *zr = z
    // [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.z
    sta zr
    // asm
    // asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  }
    sta PP+1
  PP:
    lda PERSP_Z
    sta psp1
    eor #$ff
    sta psp2
    clc
    ldy yr
    lda (psp1),y
    sbc (psp2),y
    adc #$80
    sta yr
    clc
    ldy xr
    lda (psp1),y
    sbc (psp2),y
    adc #$80
    sta xr
    // perspective::@return
    // }
    // [67] return 
    rts
}
  // print_sbyte
// Print a signed byte as HEX
// print_sbyte(signed byte register(X) b)
print_sbyte: {
    // if(b<0)
    // [69] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 -- vbsxx_lt_0_then_la1 
    cpx #0
    bmi b1
    // [70] phi from print_sbyte to print_sbyte::@3 [phi:print_sbyte->print_sbyte::@3]
    // print_sbyte::@3
    // print_char(' ')
    // [71] call print_char 
    // [59] phi from print_sbyte::@3 to print_char [phi:print_sbyte::@3->print_char]
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@3->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sbyte::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
    // [72] phi from print_sbyte::@3 print_sbyte::@4 to print_sbyte::@2 [phi:print_sbyte::@3/print_sbyte::@4->print_sbyte::@2]
    // [72] phi (signed byte) print_sbyte::b#6 = (signed byte) print_sbyte::b#4 [phi:print_sbyte::@3/print_sbyte::@4->print_sbyte::@2#0] -- register_copy 
    // print_sbyte::@2
  b2:
    // print_byte((byte)b)
    // [73] (byte) print_byte::b#0 ← (byte)(signed byte) print_sbyte::b#6
    // [74] call print_byte 
    // [51] phi from print_sbyte::@2 to print_byte [phi:print_sbyte::@2->print_byte]
    // [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#12 [phi:print_sbyte::@2->print_byte#0] -- register_copy 
    // [51] phi (byte) print_byte::b#3 = (byte) print_byte::b#0 [phi:print_sbyte::@2->print_byte#1] -- register_copy 
    jsr print_byte
    // print_sbyte::@return
    // }
    // [75] return 
    rts
    // [76] phi from print_sbyte to print_sbyte::@1 [phi:print_sbyte->print_sbyte::@1]
    // print_sbyte::@1
  b1:
    // print_char('-')
    // [77] call print_char 
    // [59] phi from print_sbyte::@1 to print_char [phi:print_sbyte::@1->print_char]
    // [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@1->print_char#0] -- register_copy 
    // [59] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sbyte::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    // print_sbyte::@4
    // b = -b
    // [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 -- vbsxx=_neg_vbsxx 
    txa
    eor #$ff
    clc
    adc #1
    tax
    jmp b2
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // memset(print_screen, ' ', 1000)
    // [80] call memset 
    // [82] phi from print_cls to memset [phi:print_cls->memset]
    jsr memset
    // print_cls::@return
    // }
    // [81] return 
    rts
}
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = $400
    .label end = str+num
    .label dst = 4
    // [83] phi from memset to memset::@2 [phi:memset->memset::@2]
    // [83] phi (byte*) memset::dst#4 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@2#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    // [83] phi from memset::@1 to memset::@2 [phi:memset::@1->memset::@2]
    // [83] phi (byte*) memset::dst#4 = (byte*) memset::dst#1 [phi:memset::@1->memset::@2#0] -- register_copy 
    // memset::@2
  b2:
    // *dst = c
    // [84] *((byte*) memset::dst#4) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [85] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#4 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // memset::@1
    // [86] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 
    lda.z dst+1
    cmp #>end
    bne b2
    lda.z dst
    cmp #<end
    bne b2
    // memset::@return
    // }
    // [87] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label val = 6
    .label sqr = 2
    .label add = 4
    // [89] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
    // [89] phi (signed word) mulf_init::add#2 = (signed byte) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vbsc1 
    lda #<1
    sta.z add
    lda #>1
    sta.z add+1
    // [89] phi (byte) mulf_init::i#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#1] -- vbuyy=vbuc1 
    tay
    // [89] phi (signed word) mulf_init::sqr#2 = (signed byte) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vbsc1 
    sta.z sqr
    sta.z sqr+1
    // [89] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
    // [89] phi (signed word) mulf_init::add#2 = (signed word) mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
    // [89] phi (byte) mulf_init::i#2 = (byte) mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
    // [89] phi (signed word) mulf_init::sqr#2 = (signed word) mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    // mulf_init::@1
  b1:
    // val = >sqr
    // [90] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 -- vbuz1=_hi_vwsz2 
    lda.z sqr+1
    sta.z val
    // mulf_sqr1[i] = val
    // [91] *((const byte[$200]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr1,y
    // (mulf_sqr1+$100)[i] = val
    // [92] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr1+$100,y
    // -i
    // [93] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 -- vbuxx=_neg_vbuyy 
    tya
    eor #$ff
    tax
    inx
    // mulf_sqr1[-i] = val
    // [94] *((const byte[$200]) mulf_sqr1#0 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1,x
    // (mulf_sqr1+$100)[-i] = val
    // [95] *((const byte[$200]) mulf_sqr1#0+(word) $100 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr1+$100,x
    // mulf_sqr2[i+1] = val
    // [96] *((const byte[$200]) mulf_sqr2#0+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr2+1,y
    // (mulf_sqr2+$100)[i+1] = val
    // [97] *((const byte[$200]) mulf_sqr2#0+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr2+$100+1,y
    // 1-i
    // [98] (byte~) mulf_init::$8 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // mulf_sqr2[1-i] = val
    // [99] *((const byte[$200]) mulf_sqr2#0 + (byte~) mulf_init::$8) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2,x
    // 1-i
    // [100] (byte~) mulf_init::$10 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // (mulf_sqr2+$100)[1-i] = val
    // [101] *((const byte[$200]) mulf_sqr2#0+(word) $100 + (byte~) mulf_init::$10) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2+$100,x
    // sqr += add
    // [102] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    lda.z sqr
    clc
    adc.z add
    sta.z sqr
    lda.z sqr+1
    adc.z add+1
    sta.z sqr+1
    // add +=2
    // [103] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (signed byte) 2 -- vwsz1=vwsz1_plus_2 
    lda.z add
    clc
    adc #2
    sta.z add
    bcc !+
    inc.z add+1
  !:
    // for( byte i:0..128)
    // [104] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [105] if((byte) mulf_init::i#1!=(byte) $81) goto mulf_init::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$81
    bne b1
    // mulf_init::@return
    // }
    // [106] return 
    rts
}
  // File Data
  print_hextab: .text "0123456789abcdef"
  // Multiplication tables for seriously fast multiplication. 
  // This version is optimized for speed over accuracy
  // - It can multiply signed numbers with no extra code - but only for numbers in [-$3f;$3f]  
  // - It throws away the low part of the 32-bit result
  // - It return >a*b*4 to maximize precision (when passed maximal input values $3f*$3f the result is $3e) 
  // See the following for information about the method
  // - http://codebase64.org/doku.php?id=base:seriously_fast_multiplication 
  // - http://codebase64.org/doku.php?id=magazines:chacking16
  // mulf_sqr tables will contain f(x)=int(x*x) and g(x) = f(1-x).
  // f(x) = >(( x * x ))
  .align $100
  mulf_sqr1: .fill $200, 0
  // g(x) =  >((( 1 - x ) * ( 1 - x )))
  .align $100
  mulf_sqr2: .fill $200, 0
  // Perspective multiplication table containing (d/(z0-z)[z] for each z-value   
  .align $100
PERSP_Z:
{
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}


