Resolved forward reference mulf_sqr1 to (const byte*) mulf_sqr1
Resolved forward reference mulf_sqr2 to (const byte*) mulf_sqr2
Resolved forward reference PERSP_Z to (const signed byte*) 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*) strlen::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_at::str)
Warning! Adding boolean cast to non-boolean sub-expression (byte) print_str_lines::ch
Identified constant variable (byte*) HEAP_TOP
Identified constant variable (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) @16
Culled Empty Block (label) @18
Culled Empty Block (label) @19
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) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) @23
Culled Empty Block (label) print_sbyte::@4
Culled Empty Block (label) @24
Culled Empty Block (label) @25
Culled Empty Block (label) @26
Culled Empty Block (label) @27
Culled Empty Block (label) @28
Culled Empty Block (label) @29
Culled Empty Block (label) @30
Culled Empty Block (label) @31
Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @35
Culled Empty Block (label) @36
Culled Empty Block (label) @37
Culled Empty Block (label) @38
Culled Empty Block (label) @39
Culled Empty Block (label) @40
Culled Empty Block (label) @41
Culled Empty Block (label) @42
Culled Empty Block (label) @43
Culled Empty Block (label) @44
Culled Empty Block (label) mulf_init::@2

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  to:@17

(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
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
@17: 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:@45

(void()) print_str((byte*) print_str::str)
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

(void()) print_ln()
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

(void()) print_sbyte((signed byte) print_sbyte::b)
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

(void()) print_byte((byte) print_byte::b)
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 ← *((const byte*) print_hextab + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#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 ← *((const byte*) print_hextab + (number~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#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

(void()) print_char((byte) print_char::ch)
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

(void()) print_cls()
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

(void()) main()
main: scope:[main]  from @45
  (byte*) print_char_cursor#76 ← phi( @45/(byte*) print_char_cursor#73 )
  (byte*) print_line_cursor#25 ← phi( @45/(byte*) print_line_cursor#24 )
  (byte*) print_screen#4 ← phi( @45/(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)) (const byte*) mulf_sqr1
  *((const word*) psp1) ← (word~) main::$1
  (word~) main::$2 ← ((word)) (const byte*) mulf_sqr2
  *((const word*) psp2) ← (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

(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
do_perspective: scope:[do_perspective]  from main::@2
  (byte*) print_line_cursor#37 ← 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 byte*) do_perspective::str
  call print_str 
  to:do_perspective::@1
do_perspective::@1: scope:[do_perspective]  from do_perspective
  (byte*) print_line_cursor#36 ← phi( do_perspective/(byte*) print_line_cursor#37 )
  (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#35 ← phi( do_perspective::@1/(byte*) print_line_cursor#36 )
  (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 byte*) do_perspective::str1
  call print_str 
  to:do_perspective::@3
do_perspective::@3: scope:[do_perspective]  from do_perspective::@2
  (byte*) print_line_cursor#34 ← phi( do_perspective::@2/(byte*) print_line_cursor#35 )
  (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#33 ← phi( do_perspective::@3/(byte*) print_line_cursor#34 )
  (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 byte*) do_perspective::str2
  call print_str 
  to:do_perspective::@5
do_perspective::@5: scope:[do_perspective]  from do_perspective::@4
  (byte*) print_line_cursor#32 ← phi( do_perspective::@4/(byte*) print_line_cursor#33 )
  (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#31 ← phi( do_perspective::@5/(byte*) print_line_cursor#32 )
  (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 byte*) do_perspective::str3
  call print_str 
  to:do_perspective::@7
do_perspective::@7: scope:[do_perspective]  from do_perspective::@6
  (byte*) print_line_cursor#30 ← phi( do_perspective::@6/(byte*) print_line_cursor#31 )
  (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#29 ← phi( do_perspective::@7/(byte*) print_line_cursor#30 )
  (byte*) print_char_cursor#72 ← phi( do_perspective::@7/(byte*) print_char_cursor#25 )
  (byte~) do_perspective::$8 ← ((byte)) *((const signed byte*) xr)
  (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#28 ← phi( do_perspective::@8/(byte*) print_line_cursor#29 )
  (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 byte*) do_perspective::str4
  call print_str 
  to:do_perspective::@10
do_perspective::@10: scope:[do_perspective]  from do_perspective::@9
  (byte*) print_line_cursor#27 ← phi( do_perspective::@9/(byte*) print_line_cursor#28 )
  (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)) *((const signed byte*) yr)
  (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#27 )
  (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 byte*) 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

(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
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 )
  *((const signed byte*) xr) ← (signed byte) perspective::x#1
  *((const signed byte*) yr) ← (signed byte) perspective::y#1
  *((const signed byte*) zr) ← (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

(void()) mulf_init()
mulf_init: scope:[mulf_init]  from main
  (signed word) mulf_init::sqr#0 ← (signed word) 0
  (signed word) mulf_init::add#0 ← (signed word) 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
  *((const byte*) mulf_sqr1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  *((const byte*) mulf_sqr1+(number) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  (byte~) mulf_init::$1 ← - (byte) mulf_init::i#2
  *((const byte*) mulf_sqr1 + (byte~) mulf_init::$1) ← (byte) mulf_init::val#0
  (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2
  *((const byte*) mulf_sqr1+(number) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
  (number~) mulf_init::$3 ← (byte) mulf_init::i#2 + (number) 1
  *((const byte*) mulf_sqr2 + (number~) mulf_init::$3) ← (byte) mulf_init::val#0
  (number~) mulf_init::$4 ← (byte) mulf_init::i#2 + (number) 1
  *((const byte*) mulf_sqr2+(number) $100 + (number~) mulf_init::$4) ← (byte) mulf_init::val#0
  (number~) mulf_init::$5 ← (number) 1 - (byte) mulf_init::i#2
  *((const byte*) mulf_sqr2 + (number~) mulf_init::$5) ← (byte) mulf_init::val#0
  (number~) mulf_init::$6 ← (number) 1 - (byte) mulf_init::i#2
  *((const byte*) mulf_sqr2+(number) $100 + (number~) mulf_init::$6) ← (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::$7 ← (byte) mulf_init::i#1 != rangelast(0,$80)
  if((bool~) mulf_init::$7) goto mulf_init::@1
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@1
  return 
  to:@return
@45: scope:[]  from @17
  (byte*) print_screen#5 ← phi( @17/(byte*) print_screen#0 )
  (byte*) print_char_cursor#73 ← phi( @17/(byte*) print_char_cursor#0 )
  (byte*) print_line_cursor#24 ← phi( @17/(byte*) print_line_cursor#0 )
  call main 
  to:@46
@46: scope:[]  from @45
  (byte*) print_char_cursor#63 ← phi( @45/(byte*) print_char_cursor#18 )
  (byte*) print_line_cursor#20 ← phi( @45/(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 @46

SYMBOL TABLE SSA
(label) @17
(label) @45
(label) @46
(label) @begin
(label) @end
(const signed byte*) PERSP_Z[(number) $100]  = 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 = (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 byte*) do_perspective::str[(byte) 2]  = (byte*) "("
(const byte*) do_perspective::str1[(byte) 2]  = (byte*) ","
(const byte*) do_perspective::str2[(byte) 2]  = (byte*) ","
(const byte*) do_perspective::str3[(byte) 7]  = (byte*) ") -> ("
(const byte*) do_perspective::str4[(byte) 2]  = (byte*) ","
(const byte*) do_perspective::str5[(byte) 2]  = (byte*) ")"
(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
(byte~) mulf_init::$2
(number~) mulf_init::$3
(number~) mulf_init::$4
(number~) mulf_init::$5
(number~) mulf_init::$6
(bool~) mulf_init::$7
(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
(const byte*) mulf_sqr1[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr2[(number) $200]  = { 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::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#8
(byte*) print_char_cursor#9
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
(const byte*) print_hextab[]  = (byte*) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#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#4
(byte*) print_line_cursor#5
(byte*) print_line_cursor#6
(byte*) print_line_cursor#7
(byte*) print_line_cursor#8
(byte*) print_line_cursor#9
(void()) print_ln()
(byte*~) print_ln::$0
(bool~) print_ln::$1
(label) print_ln::@1
(label) print_ln::@2
(label) print_ln::@return
(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
(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
(const word*) psp1 = (word*)(number) $f3
(const word*) psp2 = (word*)(number) $f5
(const signed byte*) xr = (signed byte*)(number) $f0
(const signed byte*) yr = (signed byte*)(number) $f1
(const signed byte*) zr = (signed byte*)(number) $f2

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 (unumber) $100 in *((const byte*) mulf_sqr1+(number) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
Adding number conversion cast (unumber) $100 in *((const byte*) mulf_sqr1+(number) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$3 ← (byte) mulf_init::i#2 + (number) 1
Adding number conversion cast (unumber) mulf_init::$3 in (number~) mulf_init::$3 ← (byte) mulf_init::i#2 + (unumber)(number) 1
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$4 ← (byte) mulf_init::i#2 + (number) 1
Adding number conversion cast (unumber) mulf_init::$4 in (number~) mulf_init::$4 ← (byte) mulf_init::i#2 + (unumber)(number) 1
Adding number conversion cast (unumber) $100 in *((const byte*) mulf_sqr2+(number) $100 + (unumber~) mulf_init::$4) ← (byte) mulf_init::val#0
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$5 ← (number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) mulf_init::$5 in (number~) mulf_init::$5 ← (unumber)(number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) 1 in (number~) mulf_init::$6 ← (number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) mulf_init::$6 in (number~) mulf_init::$6 ← (unumber)(number) 1 - (byte) mulf_init::i#2
Adding number conversion cast (unumber) $100 in *((const byte*) mulf_sqr2+(number) $100 + (unumber~) mulf_init::$6) ← (byte) mulf_init::val#0
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_sbyte::$1 ← (byte)(signed byte) print_sbyte::b#6
Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8
Inlining cast (word~) main::$1 ← (word)(const byte*) mulf_sqr1
Inlining cast (word~) main::$2 ← (word)(const byte*) mulf_sqr2
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)*((const signed byte*) xr)
Inlining cast (byte~) do_perspective::$11 ← (byte)*((const signed byte*) yr)
Successful SSA optimization Pass2InlineCast
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 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 integer cast $39
Simplifying constant integer cast -$47
Simplifying constant integer cast $36
Simplifying constant integer cast $100
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 1
Simplifying constant integer cast $100
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 unsigned number type (word) $100
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 unsigned number type (byte) 1
Finalized unsigned number type (word) $100
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::$3 ← (byte) mulf_init::i#2 + (byte) 1
Inferred type updated to byte in (unumber~) mulf_init::$4 ← (byte) mulf_init::i#2 + (byte) 1
Inferred type updated to byte in (unumber~) mulf_init::$5 ← (byte) 1 - (byte) mulf_init::i#2
Inferred type updated to byte in (unumber~) mulf_init::$6 ← (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#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#36 (byte*) print_line_cursor#37 (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#30 (byte*) print_line_cursor#29 (byte*) print_line_cursor#28 (byte*) print_line_cursor#27 (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 [202] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1
Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5
Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2
Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1
Simple Condition (bool~) print_sbyte::$0 [30] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1
Simple Condition (bool~) mulf_init::$7 [149] if((byte) mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [67] (word~) main::$1 ← (word)(const byte*) mulf_sqr1
Constant right-side identified [69] (word~) main::$2 ← (word)(const byte*) mulf_sqr2
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) memset::c#0 = ' '
Constant (const word) memset::num#0 = $3e8
Constant (const word) main::$1 = (word)mulf_sqr1
Constant (const word) main::$2 = (word)mulf_sqr2
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 signed word) mulf_init::sqr#0 = 0
Constant (const signed word) mulf_init::add#0 = 1
Constant (const byte) mulf_init::i#0 = 0
Successful SSA optimization Pass2ConstantIdentification
Constant (const void*) memset::str#0 = (void*)print_line_cursor#0
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 (const byte*) memset::$2 = (byte*)memset::str#0
Constant (const byte*) memset::dst#0 = (byte*)memset::str#0
Constant (const void*) memset::return#2 = memset::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Consolidated constant strings into (const byte*) do_perspective::str1
Successful SSA optimization Pass2ConstantStringConsolidation
Resolved ranged next value [147] mulf_init::i#1 ← ++ mulf_init::i#2 to ++
Resolved ranged comparison value [149] if(mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 to (number) $81
Eliminating unused constant (const void*) memset::return#2
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::$2 = (byte~) mulf_init::$1 
Successful SSA optimization Pass2AliasElimination
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
Inlining Noop Cast [54] (byte) print_byte::b#1 ← (byte)*((const signed byte*) xr) keeping *(xr)
Inlining Noop Cast [57] (byte) print_byte::b#2 ← (byte)*((const signed byte*) yr) keeping *(yr)
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 mulf_init::sqr#0 = (signed word) 0
Constant inlined print_line_cursor#0 = (byte*) 1024
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 byte*) do_perspective::str1
Constant inlined print_sbyte::b#3 = (const signed byte) do_perspective::z#0
Constant inlined do_perspective::str2 = (const byte*) do_perspective::str1
Constant inlined mulf_init::i#0 = (byte) 0
Constant inlined memset::$2 = (byte*)(const void*) memset::str#0
Constant inlined mulf_init::add#0 = (signed word) 1
Constant inlined perspective::z#0 = (const signed byte) do_perspective::z#0
Constant inlined main::$1 = (word)(const byte*) mulf_sqr1
Constant inlined perspective::y#0 = (const signed byte) do_perspective::y#0
Constant inlined main::$2 = (word)(const byte*) mulf_sqr2
Constant inlined perspective::x#0 = (const signed byte) do_perspective::x#0
Constant inlined print_char::ch#1 = (byte) ' '
Constant inlined print_char::ch#0 = (byte) '-'
Constant inlined print_str::str#4 = (const byte*) do_perspective::str3
Constant inlined print_str::str#3 = (const byte*) do_perspective::str1
Constant inlined print_str::str#2 = (const byte*) do_perspective::str1
Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0
Constant inlined print_str::str#1 = (const byte*) do_perspective::str
Constant inlined print_str::str#6 = (const byte*) do_perspective::str5
Constant inlined print_str::str#5 = (const byte*) do_perspective::str1
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in assignment *(mulf_sqr2+1 + mulf_init::$3)
Consolidated array index constant in assignment *(mulf_sqr2+$100+1 + mulf_init::$4)
Successful SSA optimization Pass2ConstantAdditionElimination
Alias (byte) mulf_init::i#2 = (byte~) mulf_init::$3 (byte~) mulf_init::$4 
Successful SSA optimization Pass2AliasElimination
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 @17
Adding NOP phi() at start of @45
Adding NOP phi() at start of @46
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::@1
Adding NOP phi() at start of mulf_init
CALL GRAPH
Calls in [] to main:3 
Calls in [main] to mulf_init:7 print_cls:10 do_perspective:12 
Calls in [do_perspective] to print_str:16 print_sbyte:18 print_str:20 print_sbyte:22 print_str:24 print_sbyte:26 print_str:28 perspective:30 print_byte:33 print_str:35 print_byte:38 print_str:40 print_ln:42 
Calls in [print_byte] to print_char:68 print_char:73 
Calls in [print_sbyte] to print_char:88 print_byte:94 print_char:98 
Calls in [print_cls] to memset:102 

Created 15 initial phi equivalence classes
Coalesced [19] print_char_cursor#78 ← print_char_cursor#12
Coalesced (already) [23] print_char_cursor#79 ← print_char_cursor#12
Coalesced (already) [27] print_char_cursor#80 ← print_char_cursor#12
Coalesced [32] print_char_cursor#85 ← print_char_cursor#2
Coalesced (already) [34] print_char_cursor#81 ← print_char_cursor#12
Coalesced (already) [37] print_char_cursor#84 ← print_char_cursor#2
Coalesced (already) [39] print_char_cursor#77 ← print_char_cursor#12
Coalesced [51] print_line_cursor#38 ← print_line_cursor#1
Coalesced [53] print_str::str#10 ← print_str::str#9
Coalesced [54] print_char_cursor#82 ← print_char_cursor#74
Coalesced [61] print_str::str#11 ← print_str::str#0
Coalesced [62] print_char_cursor#83 ← print_char_cursor#1
Coalesced [66] print_char::ch#5 ← print_char::ch#2
Coalesced [67] print_char_cursor#87 ← print_char_cursor#69
Coalesced [71] print_char::ch#6 ← print_char::ch#3
Coalesced (already) [72] print_char_cursor#88 ← print_char_cursor#12
Coalesced (already) [87] print_char_cursor#90 ← print_char_cursor#2
Coalesced [89] print_sbyte::b#11 ← print_sbyte::b#4
Coalesced [92] print_byte::b#7 ← print_byte::b#0
Coalesced (already) [93] print_char_cursor#86 ← print_char_cursor#12
Coalesced (already) [97] print_char_cursor#89 ← print_char_cursor#2
Coalesced [100] print_sbyte::b#10 ← print_sbyte::b#0
Coalesced [113] memset::dst#4 ← memset::dst#1
Coalesced [133] mulf_init::sqr#3 ← mulf_init::sqr#1
Coalesced [134] mulf_init::i#3 ← mulf_init::i#1
Coalesced [135] mulf_init::add#3 ← mulf_init::add#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) @17
Culled Empty Block (label) @46
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::@1
Culled Empty Block (label) mulf_init::@3
Renumbering block @45 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()

(void()) main()
main: scope:[main]  from @1
  asm { sei  }
  [5] call mulf_init 
  to:main::@1
main::@1: scope:[main]  from main
  [6] *((const word*) psp1) ← (word)(const byte*) mulf_sqr1
  [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2
  [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

(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
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)
  [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)
  [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

(void()) print_ln()
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

(void()) print_str((byte*) print_str::str)
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 byte*) do_perspective::str do_perspective::@11/(const byte*) do_perspective::str5 do_perspective::@2/(const byte*) do_perspective::str1 do_perspective::@4/(const byte*) do_perspective::str1 do_perspective::@6/(const byte*) do_perspective::str3 do_perspective::@9/(const byte*) 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

(void()) print_byte((byte) print_byte::b)
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 + (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 + (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

(void()) print_char((byte) print_char::ch)
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

(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
perspective: scope:[perspective]  from do_perspective::@7
  [63] *((const signed byte*) xr) ← (const signed byte) do_perspective::x#0
  [64] *((const signed byte*) yr) ← (const signed byte) do_perspective::y#0
  [65] *((const signed byte*) zr) ← (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

(void()) print_sbyte((signed byte) print_sbyte::b)
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

(void()) print_cls()
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

(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset]  from print_cls
  [82] phi()
  to:memset::@1
memset::@1: scope:[memset]  from memset memset::@2
  [83] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
  [84] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
  to:memset::@return
memset::@return: scope:[memset]  from memset::@1
  [85] return 
  to:@return
memset::@2: scope:[memset]  from memset::@1
  [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0
  [87] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
  to:memset::@1

(void()) mulf_init()
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 word) 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 word) 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*) mulf_sqr1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [92] *((const byte*) mulf_sqr1+(word) $100 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [93] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2
  [94] *((const byte*) mulf_sqr1 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
  [95] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
  [96] *((const byte*) mulf_sqr2+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [97] *((const byte*) mulf_sqr2+(word) $100+(byte) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  [98] (byte~) mulf_init::$5 ← (byte) 1 - (byte) mulf_init::i#2
  [99] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$5) ← (byte) mulf_init::val#0
  [100] (byte~) mulf_init::$6 ← (byte) 1 - (byte) mulf_init::i#2
  [101] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (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
(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 22.0
(byte*) memset::dst#2 14.666666666666666
(byte*) memset::end
(word) memset::num
(void*) memset::return
(void*) memset::str
(void()) mulf_init()
(byte~) mulf_init::$2 16.5
(byte~) mulf_init::$5 22.0
(byte~) mulf_init::$6 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
(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_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

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#2 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 live range equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to live range equivalence class [ print_byte::$2 ]
Added variable mulf_init::val#0 to live range equivalence class [ mulf_init::val#0 ]
Added variable mulf_init::$2 to live range equivalence class [ mulf_init::$2 ]
Added variable mulf_init::$5 to live range equivalence class [ mulf_init::$5 ]
Added variable mulf_init::$6 to live range equivalence class [ mulf_init::$6 ]
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#2 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::$2 ]
[ mulf_init::$5 ]
[ mulf_init::$6 ]
Allocated zp[2]:2 [ print_line_cursor#11 print_line_cursor#1 ]
Allocated zp[2]:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ]
Allocated zp[1]:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ]
Allocated zp[1]:7 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
Allocated zp[2]: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[1]:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
Allocated zp[2]:11 [ memset::dst#2 memset::dst#1 ]
Allocated zp[2]:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ]
Allocated zp[1]:15 [ mulf_init::i#2 mulf_init::i#1 ]
Allocated zp[2]:16 [ mulf_init::add#2 mulf_init::add#1 ]
Allocated zp[1]:18 [ print_byte::$0 ]
Allocated zp[1]:19 [ print_byte::$2 ]
Allocated zp[1]:20 [ mulf_init::val#0 ]
Allocated zp[1]:21 [ mulf_init::$2 ]
Allocated zp[1]:22 [ mulf_init::$5 ]
Allocated zp[1]:23 [ mulf_init::$6 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // 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) ← (word)(const byte*) mulf_sqr1 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
    // [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 -- _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 byte*) 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 byte*) 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 byte*) 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 byte*) 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) -- 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 byte*) 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) -- 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 byte*) 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* zp(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 zp(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 + (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 + (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 zp(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) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
    // [64] *((const signed byte*) yr) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
    // [65] *((const signed byte*) zr) ← (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 zp($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::@1 [phi:memset->memset::@1]
  __b1_from_memset:
    // [83] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    jmp __b1
    // memset::@1
  __b1:
    // [84] if((byte*) memset::dst#2!=(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
    jmp __breturn
    // memset::@return
  __breturn:
    // [85] return 
    rts
    // memset::@2
  __b2:
    // [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [87] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [83] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
  __b1_from___b2:
    // [83] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label __2 = $15
    .label __5 = $16
    .label __6 = $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 word) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vwsc1 
    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 word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vwsc1 
    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*) mulf_sqr1 + (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*) mulf_sqr1+(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::$2 ← - (byte) mulf_init::i#2 -- vbuz1=_neg_vbuz2 
    lda.z i
    eor #$ff
    clc
    adc #1
    sta.z __2
    // [94] *((const byte*) mulf_sqr1 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z __2
    sta mulf_sqr1,y
    // [95] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z __2
    sta mulf_sqr1+$100,y
    // [96] *((const byte*) mulf_sqr2+(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*) mulf_sqr2+(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::$5 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuz1=vbuc1_minus_vbuz2 
    lda #1
    sec
    sbc.z i
    sta.z __5
    // [99] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$5) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z __5
    sta mulf_sqr2,y
    // [100] (byte~) mulf_init::$6 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuz1=vbuc1_minus_vbuz2 
    lda #1
    sec
    sbc.z i
    sta.z __6
    // [101] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda.z val
    ldy.z __6
    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_vbsc1 
    lda.z add
    clc
    adc #<2
    sta.z add
    lda.z add+1
    adc #>2
    sta.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) ← (word)(const byte*) mulf_sqr1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 [ ] ( 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[1]: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[1]: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[1]:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ]
Statement [63] *((const signed byte*) xr) ← (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) ← (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) ← (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] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::print_cls:8::memset:80 [ memset::dst#2 ] ) always clobbers reg byte a 
Statement [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:8::memset:80 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
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[1]:15 [ mulf_init::i#2 mulf_init::i#1 ]
Statement [93] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:20 [ mulf_init::val#0 ]
Statement [94] *((const byte*) mulf_sqr1 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:21 [ mulf_init::$2 ]
Statement [95] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$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 [96] *((const byte*) mulf_sqr2+(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*) mulf_sqr2+(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::$5 ← (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::$5 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$5 ] ) always clobbers reg byte a 
Statement [99] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$5) ← (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::$6 ← (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::$6 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] ) always clobbers reg byte a 
Statement [101] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (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) ← (word)(const byte*) mulf_sqr1 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 [ ] ( 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) ← (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) ← (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) ← (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] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::print_cls:8::memset:80 [ memset::dst#2 ] ) always clobbers reg byte a 
Statement [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::print_cls:8::memset:80 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y 
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*) mulf_sqr1 + (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*) mulf_sqr1+(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::$2 ← - (byte) mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ) always clobbers reg byte a 
Statement [94] *((const byte*) mulf_sqr1 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ) always clobbers reg byte a 
Statement [95] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$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 [96] *((const byte*) mulf_sqr2+(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*) mulf_sqr2+(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::$5 ← (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::$5 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$5 ] ) always clobbers reg byte a 
Statement [99] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$5) ← (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::$6 ← (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::$6 ] ( main:2::mulf_init:5 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] ) always clobbers reg byte a 
Statement [101] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (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[2]:2 [ print_line_cursor#11 print_line_cursor#1 ] : zp[2]:2 , 
Potential registers zp[2]:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] : zp[2]:4 , 
Potential registers zp[1]:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ] : zp[1]:6 , reg byte x , 
Potential registers zp[1]:7 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]: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[2]:8 , 
Potential registers zp[1]:10 [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ] : zp[1]:10 , reg byte a , reg byte x , 
Potential registers zp[2]:11 [ memset::dst#2 memset::dst#1 ] : zp[2]:11 , 
Potential registers zp[2]:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] : zp[2]:13 , 
Potential registers zp[1]:15 [ mulf_init::i#2 mulf_init::i#1 ] : zp[1]:15 , reg byte x , reg byte y , 
Potential registers zp[2]:16 [ mulf_init::add#2 mulf_init::add#1 ] : zp[2]:16 , 
Potential registers zp[1]:18 [ print_byte::$0 ] : zp[1]:18 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:19 [ print_byte::$2 ] : zp[1]:19 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:20 [ mulf_init::val#0 ] : zp[1]:20 , reg byte x , reg byte y , 
Potential registers zp[1]:21 [ mulf_init::$2 ] : zp[1]:21 , reg byte x , reg byte y , 
Potential registers zp[1]:22 [ mulf_init::$5 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:23 [ mulf_init::$6 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [mulf_init] 23.1: zp[1]:15 [ mulf_init::i#2 mulf_init::i#1 ] 22: zp[1]:22 [ mulf_init::$5 ] 22: zp[1]:23 [ mulf_init::$6 ] 16.5: zp[1]:21 [ mulf_init::$2 ] 9.69: zp[2]:16 [ mulf_init::add#2 mulf_init::add#1 ] 9: zp[1]:20 [ mulf_init::val#0 ] 8.04: zp[2]:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] 
Uplift Scope [] 38.5: zp[2]:2 [ print_line_cursor#11 print_line_cursor#1 ] 34.41: zp[2]: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 [memset] 36.67: zp[2]:11 [ memset::dst#2 memset::dst#1 ] 
Uplift Scope [print_str] 35.5: zp[2]:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] 
Uplift Scope [print_byte] 14.5: zp[1]:6 [ print_byte::b#3 print_byte::b#5 print_byte::b#6 print_byte::b#0 ] 4: zp[1]:18 [ print_byte::$0 ] 4: zp[1]:19 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp[1]:7 [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] 
Uplift Scope [print_sbyte] 9: zp[1]: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 4035 combination reg byte y [ mulf_init::i#2 mulf_init::i#1 ] reg byte x [ mulf_init::$5 ] reg byte x [ mulf_init::$6 ] reg byte x [ mulf_init::$2 ] zp[2]:16 [ mulf_init::add#2 mulf_init::add#1 ] zp[1]:20 [ mulf_init::val#0 ] zp[2]:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] 
Limited combination testing to 100 combinations of 432 possible.
Uplifting [] best 4035 combination zp[2]:2 [ print_line_cursor#11 print_line_cursor#1 ] zp[2]: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 [memset] best 4035 combination zp[2]:11 [ memset::dst#2 memset::dst#1 ] 
Uplifting [print_str] best 4035 combination zp[2]:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] 
Uplifting [print_byte] best 4014 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 3999 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] 
Uplifting [print_sbyte] best 3984 combination reg byte x [ print_sbyte::b#6 print_sbyte::b#0 print_sbyte::b#4 ] 
Uplifting [RADIX] best 3984 combination 
Uplifting [print_ln] best 3984 combination 
Uplifting [print_cls] best 3984 combination 
Uplifting [main] best 3984 combination 
Uplifting [do_perspective] best 3984 combination 
Uplifting [perspective] best 3984 combination 
Attempting to uplift remaining variables inzp[1]:20 [ mulf_init::val#0 ]
Uplifting [mulf_init] best 3984 combination zp[1]:20 [ mulf_init::val#0 ] 
Coalescing zero page register [ zp[2]:4 [ print_str::str#7 print_str::str#9 print_str::str#0 ] ] with [ zp[2]:2 [ print_line_cursor#11 print_line_cursor#1 ] ]
Coalescing zero page register [ zp[2]:11 [ memset::dst#2 memset::dst#1 ] ] with [ zp[2]: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[2]:13 [ mulf_init::sqr#2 mulf_init::sqr#1 ] ] with [ zp[2]: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[2]:16 [ mulf_init::add#2 mulf_init::add#1 ] ] with [ zp[2]:11 [ memset::dst#2 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[2]:13) zp[2]: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[2]:16) zp[2]:4 [ mulf_init::add#2 mulf_init::add#1 memset::dst#2 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[1]:20) zp[1]: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) ← (word)(const byte*) mulf_sqr1 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
    // [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 -- _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 byte*) 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 byte*) 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 byte*) 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 byte*) 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) -- 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 byte*) 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) -- 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 byte*) 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* zp(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 + (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 + (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) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
    // [64] *((const signed byte*) yr) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
    // [65] *((const signed byte*) zr) ← (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::@1 [phi:memset->memset::@1]
  __b1_from_memset:
    // [83] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    jmp __b1
    // memset::@1
  __b1:
    // [84] if((byte*) memset::dst#2!=(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
    jmp __breturn
    // memset::@return
  __breturn:
    // [85] return 
    rts
    // memset::@2
  __b2:
    // [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [87] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [83] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
  __b1_from___b2:
    // [83] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // 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 word) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vwsc1 
    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 word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vwsc1 
    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*) mulf_sqr1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr1,y
    // [92] *((const byte*) mulf_sqr1+(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::$2 ← - (byte) mulf_init::i#2 -- vbuxx=_neg_vbuyy 
    tya
    eor #$ff
    tax
    inx
    // [94] *((const byte*) mulf_sqr1 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1,x
    // [95] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1+$100,x
    // [96] *((const byte*) mulf_sqr2+(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*) mulf_sqr2+(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::$5 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // [99] *((const byte*) mulf_sqr2 + (byte~) mulf_init::$5) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2,x
    // [100] (byte~) mulf_init::$6 ← (byte) 1 - (byte) mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // [101] *((const byte*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (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_vbsc1 
    lda.z add
    clc
    adc #<2
    sta.z add
    lda.z add+1
    adc #>2
    sta.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 __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 __bbegin with __b1
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 __b1_from___b1 with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
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 __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 __b1_from_memset:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
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 __b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const signed byte*) PERSP_Z[(number) $100]  = 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 = (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)
(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 byte*) do_perspective::str[(byte) 2]  = (byte*) "("
(const byte*) do_perspective::str1[(byte) 2]  = (byte*) ","
(const byte*) do_perspective::str3[(byte) 7]  = (byte*) ") -> ("
(const byte*) do_perspective::str5[(byte) 2]  = (byte*) ")"
(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[2]:4 22.0
(byte*) memset::dst#2 dst zp[2]:4 14.666666666666666
(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::$2 reg byte x 16.5
(byte~) mulf_init::$5 reg byte x 22.0
(byte~) mulf_init::$6 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[2]:4 7.333333333333333
(signed word) mulf_init::add#2 add zp[2]: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[2]:2 5.5
(signed word) mulf_init::sqr#2 sqr zp[2]:2 2.5384615384615383
(byte) mulf_init::val
(byte) mulf_init::val#0 val zp[1]:6 9.0
(const byte*) mulf_sqr1[(number) $200]  = { fill( $200, 0) }
(const byte*) mulf_sqr2[(number) $200]  = { 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[2]:4 11.0
(byte*) print_char_cursor#12 print_char_cursor zp[2]:4 0.6666666666666666
(byte*) print_char_cursor#2 print_char_cursor zp[2]:4 2.076923076923077
(byte*) print_char_cursor#44 print_char_cursor zp[2]:4 6.0
(byte*) print_char_cursor#69 print_char_cursor zp[2]:4 2.6666666666666665
(byte*) print_char_cursor#74 print_char_cursor zp[2]:4 12.0
(void()) print_cls()
(label) print_cls::@return
(const byte*) print_hextab[]  = (byte*) "0123456789abcdef"z
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp[2]:2 16.5
(byte*) print_line_cursor#11 print_line_cursor zp[2]: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[2]:2 22.0
(byte*) print_str::str#7 str zp[2]:2 11.5
(byte*) print_str::str#9 str zp[2]:2 2.0
(const word*) psp1 = (word*) 243
(const word*) psp2 = (word*) 245
(const signed byte*) xr = (signed byte*) 240
(const signed byte*) yr = (signed byte*) 241
(const signed byte*) 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[2]: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[2]:4 [ mulf_init::add#2 mulf_init::add#1 memset::dst#2 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[1]:6 [ mulf_init::val#0 ]
reg byte x [ mulf_init::$2 ]
reg byte x [ mulf_init::$5 ]
reg byte x [ mulf_init::$6 ]


FINAL ASSEMBLER
Score: 3380

  // 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) ← (word)(const byte*) mulf_sqr1 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
    // *psp2 = (word)mulf_sqr2
    // [7] *((const word*) psp2) ← (word)(const byte*) mulf_sqr2 -- _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 byte*) 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 byte*) 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 byte*) 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 byte*) 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) -- 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 byte*) 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) -- 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 byte*) 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* zp(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 + (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 + (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) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
    // *yr = y
    // [64] *((const signed byte*) yr) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
    // *zr = z
    // [65] *((const signed byte*) zr) ← (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::@1 [phi:memset->memset::@1]
    // [83] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 
    lda #<str
    sta.z dst
    lda #>str
    sta.z dst+1
    // memset::@1
  __b1:
    // for(char* dst = str; dst!=end; dst++)
    // [84] if((byte*) memset::dst#2!=(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
    // }
    // [85] return 
    rts
    // memset::@2
  __b2:
    // *dst = c
    // [86] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [87] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [83] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
    // [83] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // 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 word) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vwsc1 
    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 word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vwsc1 
    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*) mulf_sqr1 + (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*) mulf_sqr1+(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::$2 ← - (byte) mulf_init::i#2 -- vbuxx=_neg_vbuyy 
    tya
    eor #$ff
    tax
    inx
    // mulf_sqr1[-i] = val
    // [94] *((const byte*) mulf_sqr1 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1,x
    // (mulf_sqr1+$100)[-i] = val
    // [95] *((const byte*) mulf_sqr1+(word) $100 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr1+$100,x
    // mulf_sqr2[i+1] = val
    // [96] *((const byte*) mulf_sqr2+(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*) mulf_sqr2+(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::$5 ← (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*) mulf_sqr2 + (byte~) mulf_init::$5) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2,x
    // 1-i
    // [100] (byte~) mulf_init::$6 ← (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*) mulf_sqr2+(word) $100 + (byte~) mulf_init::$6) ← (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_vbsc1 
    lda.z add
    clc
    adc #<2
    sta.z add
    lda.z add+1
    adc #>2
    sta.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)));
    	}
    }
	}


