Resolved forward reference mulf_sqr1 to mulf_sqr1
Resolved forward reference mulf_sqr2 to mulf_sqr2
Resolved forward reference PERSP_Z to PERSP_Z
Setting inferred volatile on symbol affected by address-of: zr in 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  }
Setting inferred volatile on symbol affected by address-of: psp1 in 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  }
Setting inferred volatile on symbol affected by address-of: psp2 in 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  }
Setting inferred volatile on symbol affected by address-of: yr in 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  }
Setting inferred volatile on symbol affected by address-of: xr in 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  }
Inlined call vicSelectGfxBank::$0 = call toDd00(vicSelectGfxBank::gfx)
Inlined call call __init
Eliminating unused variable with no statement memset::$2
Eliminating unused variable with no statement mulf_init::$0

CONTROL FLOW GRAPH SSA

void print_str(char *str)
print_str: scope:[print_str]  from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9
  print_char_cursor#77 = phi( do_perspective/print_char_cursor#74, do_perspective::@11/print_char_cursor#27, do_perspective::@2/print_char_cursor#19, do_perspective::@4/print_char_cursor#21, do_perspective::@6/print_char_cursor#23, do_perspective::@9/print_char_cursor#25 )
  print_str::str#10 = phi( do_perspective/print_str::str#1, do_perspective::@11/print_str::str#6, do_perspective::@2/print_str::str#2, do_perspective::@4/print_str::str#3, do_perspective::@6/print_str::str#4, do_perspective::@9/print_str::str#5 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@3
  print_char_cursor#67 = phi( print_str/print_char_cursor#77, print_str::@3/print_char_cursor#0 )
  print_str::str#7 = phi( print_str/print_str::str#10, print_str::@3/print_str::str#0 )
  print_str::$1 = 0 != *print_str::str#7
  if(print_str::$1) goto print_str::@2
  to:print_str::@return
print_str::@2: scope:[print_str]  from print_str::@1
  print_char_cursor#66 = phi( print_str::@1/print_char_cursor#67 )
  print_str::str#8 = phi( print_str::@1/print_str::str#7 )
  print_char::ch#0 = *print_str::str#8
  call print_char
  to:print_str::@3
print_str::@3: scope:[print_str]  from print_str::@2
  print_str::str#9 = phi( print_str::@2/print_str::str#8 )
  print_char_cursor#34 = phi( print_str::@2/print_char_cursor#12 )
  print_char_cursor#0 = print_char_cursor#34
  print_str::str#0 = ++ print_str::str#9
  to:print_str::@1
print_str::@return: scope:[print_str]  from print_str::@1
  print_char_cursor#35 = phi( print_str::@1/print_char_cursor#67 )
  print_char_cursor#1 = print_char_cursor#35
  return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from do_perspective::@12
  print_char_cursor#68 = phi( do_perspective::@12/print_char_cursor#28 )
  print_line_cursor#23 = phi( do_perspective::@12/print_line_cursor#25 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  print_char_cursor#36 = phi( print_ln/print_char_cursor#68, print_ln::@1/print_char_cursor#36 )
  print_line_cursor#12 = phi( print_ln/print_line_cursor#23, print_ln::@1/print_line_cursor#0 )
  print_ln::$0 = print_line_cursor#12 + $28
  print_line_cursor#0 = print_ln::$0
  print_ln::$1 = print_line_cursor#0 < print_char_cursor#36
  if(print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  print_line_cursor#13 = phi( print_ln::@1/print_line_cursor#0 )
  print_char_cursor#2 = print_line_cursor#13
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  print_char_cursor#37 = phi( print_ln::@2/print_char_cursor#2 )
  print_line_cursor#14 = phi( print_ln::@2/print_line_cursor#13 )
  print_line_cursor#1 = print_line_cursor#14
  print_char_cursor#3 = print_char_cursor#37
  return 
  to:@return

void print_schar(signed char b)
print_schar: scope:[print_schar]  from do_perspective::@1 do_perspective::@3 do_perspective::@5
  print_char_cursor#78 = phi( do_perspective::@1/print_char_cursor#18, do_perspective::@3/print_char_cursor#20, do_perspective::@5/print_char_cursor#22 )
  print_schar::b#4 = phi( do_perspective::@1/print_schar::b#1, do_perspective::@3/print_schar::b#2, do_perspective::@5/print_schar::b#3 )
  print_schar::$0 = print_schar::b#4 < 0
  if(print_schar::$0) goto print_schar::@1
  to:print_schar::@3
print_schar::@1: scope:[print_schar]  from print_schar
  print_schar::b#7 = phi( print_schar/print_schar::b#4 )
  print_char_cursor#69 = phi( print_schar/print_char_cursor#78 )
  print_char::ch#1 = '-'
  call print_char
  to:print_schar::@4
print_schar::@4: scope:[print_schar]  from print_schar::@1
  print_schar::b#5 = phi( print_schar::@1/print_schar::b#7 )
  print_char_cursor#38 = phi( print_schar::@1/print_char_cursor#12 )
  print_char_cursor#4 = print_char_cursor#38
  print_schar::$4 = - print_schar::b#5
  print_schar::b#0 = print_schar::$4
  to:print_schar::@2
print_schar::@3: scope:[print_schar]  from print_schar
  print_schar::b#9 = phi( print_schar/print_schar::b#4 )
  print_char_cursor#70 = phi( print_schar/print_char_cursor#78 )
  print_char::ch#2 = ' '
  call print_char
  to:print_schar::@5
print_schar::@5: scope:[print_schar]  from print_schar::@3
  print_schar::b#8 = phi( print_schar::@3/print_schar::b#9 )
  print_char_cursor#39 = phi( print_schar::@3/print_char_cursor#12 )
  print_char_cursor#5 = print_char_cursor#39
  to:print_schar::@2
print_schar::@2: scope:[print_schar]  from print_schar::@4 print_schar::@5
  print_char_cursor#71 = phi( print_schar::@4/print_char_cursor#4, print_schar::@5/print_char_cursor#5 )
  print_schar::b#6 = phi( print_schar::@4/print_schar::b#0, print_schar::@5/print_schar::b#8 )
  print_uchar::b#0 = (char)print_schar::b#6
  call print_uchar
  to:print_schar::@6
print_schar::@6: scope:[print_schar]  from print_schar::@2
  print_char_cursor#40 = phi( print_schar::@2/print_char_cursor#10 )
  print_char_cursor#6 = print_char_cursor#40
  to:print_schar::@return
print_schar::@return: scope:[print_schar]  from print_schar::@6
  print_char_cursor#41 = phi( print_schar::@6/print_char_cursor#6 )
  print_char_cursor#7 = print_char_cursor#41
  return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from do_perspective::@10 do_perspective::@8 print_schar::@2
  print_char_cursor#72 = phi( do_perspective::@10/print_char_cursor#26, do_perspective::@8/print_char_cursor#75, print_schar::@2/print_char_cursor#71 )
  print_uchar::b#3 = phi( do_perspective::@10/print_uchar::b#2, do_perspective::@8/print_uchar::b#1, print_schar::@2/print_uchar::b#0 )
  print_uchar::$0 = print_uchar::b#3 >> 4
  print_char::ch#3 = print_hextab[print_uchar::$0]
  call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  print_uchar::b#4 = phi( print_uchar/print_uchar::b#3 )
  print_char_cursor#42 = phi( print_uchar/print_char_cursor#12 )
  print_char_cursor#8 = print_char_cursor#42
  print_uchar::$2 = print_uchar::b#4 & $f
  print_char::ch#4 = print_hextab[print_uchar::$2]
  call print_char
  to:print_uchar::@2
print_uchar::@2: scope:[print_uchar]  from print_uchar::@1
  print_char_cursor#43 = phi( print_uchar::@1/print_char_cursor#12 )
  print_char_cursor#9 = print_char_cursor#43
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@2
  print_char_cursor#44 = phi( print_uchar::@2/print_char_cursor#9 )
  print_char_cursor#10 = print_char_cursor#44
  return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_schar::@1 print_schar::@3 print_str::@2 print_uchar print_uchar::@1
  print_char_cursor#45 = phi( print_schar::@1/print_char_cursor#69, print_schar::@3/print_char_cursor#70, print_str::@2/print_char_cursor#66, print_uchar/print_char_cursor#72, print_uchar::@1/print_char_cursor#8 )
  print_char::ch#5 = phi( print_schar::@1/print_char::ch#1, print_schar::@3/print_char::ch#2, print_str::@2/print_char::ch#0, print_uchar/print_char::ch#3, print_uchar::@1/print_char::ch#4 )
  *print_char_cursor#45 = print_char::ch#5
  print_char_cursor#11 = ++ print_char_cursor#45
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  print_char_cursor#46 = phi( print_char/print_char_cursor#11 )
  print_char_cursor#12 = print_char_cursor#46
  return 
  to:@return

void print_cls()
print_cls: scope:[print_cls]  from main::@1
  print_screen#2 = phi( main::@1/print_screen#5 )
  memset::str#0 = (void *)print_screen#2
  memset::c#0 = ' '
  memset::num#0 = $3e8
  call memset
  memset::return#0 = memset::return#2
  to:print_cls::@1
print_cls::@1: scope:[print_cls]  from print_cls
  print_screen#3 = phi( print_cls/print_screen#2 )
  print_line_cursor#2 = print_screen#3
  print_char_cursor#13 = print_line_cursor#2
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls::@1
  print_char_cursor#47 = phi( print_cls::@1/print_char_cursor#13 )
  print_line_cursor#15 = phi( print_cls::@1/print_line_cursor#2 )
  print_line_cursor#3 = print_line_cursor#15
  print_char_cursor#14 = print_char_cursor#47
  return 
  to:@return

void * memset(void *str , char c , unsigned int num)
memset: scope:[memset]  from print_cls
  memset::c#4 = phi( print_cls/memset::c#0 )
  memset::str#3 = phi( print_cls/memset::str#0 )
  memset::num#1 = phi( print_cls/memset::num#0 )
  memset::$0 = memset::num#1 > 0
  memset::$1 = ! memset::$0
  if(memset::$1) goto memset::@1
  to:memset::@2
memset::@1: scope:[memset]  from memset memset::@3
  memset::str#1 = phi( memset/memset::str#3, memset::@3/memset::str#4 )
  memset::return#1 = memset::str#1
  to:memset::@return
memset::@2: scope:[memset]  from memset
  memset::c#3 = phi( memset/memset::c#4 )
  memset::num#2 = phi( memset/memset::num#1 )
  memset::str#2 = phi( memset/memset::str#3 )
  memset::$4 = (char *)memset::str#2
  memset::end#0 = memset::$4 + memset::num#2
  memset::dst#0 = ((char *)) memset::str#2
  to:memset::@3
memset::@3: scope:[memset]  from memset::@2 memset::@4
  memset::c#2 = phi( memset::@2/memset::c#3, memset::@4/memset::c#1 )
  memset::str#4 = phi( memset::@2/memset::str#2, memset::@4/memset::str#5 )
  memset::end#1 = phi( memset::@2/memset::end#0, memset::@4/memset::end#2 )
  memset::dst#2 = phi( memset::@2/memset::dst#0, memset::@4/memset::dst#1 )
  memset::$3 = memset::dst#2 != memset::end#1
  if(memset::$3) goto memset::@4
  to:memset::@1
memset::@4: scope:[memset]  from memset::@3
  memset::str#5 = phi( memset::@3/memset::str#4 )
  memset::end#2 = phi( memset::@3/memset::end#1 )
  memset::dst#3 = phi( memset::@3/memset::dst#2 )
  memset::c#1 = phi( memset::@3/memset::c#2 )
  *memset::dst#3 = memset::c#1
  memset::dst#1 = ++ memset::dst#3
  to:memset::@3
memset::@return: scope:[memset]  from memset::@1
  memset::return#3 = phi( memset::@1/memset::return#1 )
  memset::return#2 = memset::return#3
  return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  print_char_cursor#79 = phi( __start::@1/print_char_cursor#76 )
  print_line_cursor#27 = phi( __start::@1/print_line_cursor#26 )
  print_screen#7 = phi( __start::@1/print_screen#8 )
  asm { sei  }
  call mulf_init
  to:main::@1
main::@1: scope:[main]  from main
  print_char_cursor#73 = phi( main/print_char_cursor#79 )
  print_line_cursor#24 = phi( main/print_line_cursor#27 )
  print_screen#5 = phi( main/print_screen#7 )
  psp1 = (unsigned int)mulf_sqr1
  psp2 = (unsigned int)mulf_sqr2
  call print_cls
  to:main::@2
main::@2: scope:[main]  from main::@1
  print_char_cursor#48 = phi( main::@1/print_char_cursor#14 )
  print_line_cursor#16 = phi( main::@1/print_line_cursor#3 )
  print_line_cursor#4 = print_line_cursor#16
  print_char_cursor#15 = print_char_cursor#48
  do_perspective::x#0 = $39
  do_perspective::y#0 = -$47
  do_perspective::z#0 = $36
  call do_perspective
  to:main::@3
main::@3: scope:[main]  from main::@2
  print_line_cursor#17 = phi( main::@2/print_line_cursor#8 )
  print_char_cursor#49 = phi( main::@2/print_char_cursor#30 )
  print_char_cursor#16 = print_char_cursor#49
  print_line_cursor#5 = print_line_cursor#17
  to:main::@return
main::@return: scope:[main]  from main::@3
  print_char_cursor#50 = phi( main::@3/print_char_cursor#16 )
  print_line_cursor#18 = phi( main::@3/print_line_cursor#5 )
  print_line_cursor#6 = print_line_cursor#18
  print_char_cursor#17 = print_char_cursor#50
  return 
  to:@return

void do_perspective(signed char x , signed char y , signed char z)
do_perspective: scope:[do_perspective]  from main::@2
  print_line_cursor#39 = phi( main::@2/print_line_cursor#4 )
  do_perspective::z#8 = phi( main::@2/do_perspective::z#0 )
  do_perspective::y#7 = phi( main::@2/do_perspective::y#0 )
  do_perspective::x#3 = phi( main::@2/do_perspective::x#0 )
  print_char_cursor#74 = phi( main::@2/print_char_cursor#15 )
  print_str::str#1 = do_perspective::str
  call print_str
  to:do_perspective::@1
do_perspective::@1: scope:[do_perspective]  from do_perspective
  print_line_cursor#38 = phi( do_perspective/print_line_cursor#39 )
  do_perspective::z#7 = phi( do_perspective/do_perspective::z#8 )
  do_perspective::y#5 = phi( do_perspective/do_perspective::y#7 )
  do_perspective::x#1 = phi( do_perspective/do_perspective::x#3 )
  print_char_cursor#51 = phi( do_perspective/print_char_cursor#1 )
  print_char_cursor#18 = print_char_cursor#51
  print_schar::b#1 = do_perspective::x#1
  call print_schar
  to:do_perspective::@2
do_perspective::@2: scope:[do_perspective]  from do_perspective::@1
  print_line_cursor#37 = phi( do_perspective::@1/print_line_cursor#38 )
  do_perspective::x#8 = phi( do_perspective::@1/do_perspective::x#1 )
  do_perspective::z#6 = phi( do_perspective::@1/do_perspective::z#7 )
  do_perspective::y#3 = phi( do_perspective::@1/do_perspective::y#5 )
  print_char_cursor#52 = phi( do_perspective::@1/print_char_cursor#7 )
  print_char_cursor#19 = print_char_cursor#52
  print_str::str#2 = do_perspective::str1
  call print_str
  to:do_perspective::@3
do_perspective::@3: scope:[do_perspective]  from do_perspective::@2
  print_line_cursor#36 = phi( do_perspective::@2/print_line_cursor#37 )
  do_perspective::x#7 = phi( do_perspective::@2/do_perspective::x#8 )
  do_perspective::z#5 = phi( do_perspective::@2/do_perspective::z#6 )
  do_perspective::y#1 = phi( do_perspective::@2/do_perspective::y#3 )
  print_char_cursor#53 = phi( do_perspective::@2/print_char_cursor#1 )
  print_char_cursor#20 = print_char_cursor#53
  print_schar::b#2 = do_perspective::y#1
  call print_schar
  to:do_perspective::@4
do_perspective::@4: scope:[do_perspective]  from do_perspective::@3
  print_line_cursor#35 = phi( do_perspective::@3/print_line_cursor#36 )
  do_perspective::y#8 = phi( do_perspective::@3/do_perspective::y#1 )
  do_perspective::x#6 = phi( do_perspective::@3/do_perspective::x#7 )
  do_perspective::z#3 = phi( do_perspective::@3/do_perspective::z#5 )
  print_char_cursor#54 = phi( do_perspective::@3/print_char_cursor#7 )
  print_char_cursor#21 = print_char_cursor#54
  print_str::str#3 = do_perspective::str2
  call print_str
  to:do_perspective::@5
do_perspective::@5: scope:[do_perspective]  from do_perspective::@4
  print_line_cursor#34 = phi( do_perspective::@4/print_line_cursor#35 )
  do_perspective::y#6 = phi( do_perspective::@4/do_perspective::y#8 )
  do_perspective::x#5 = phi( do_perspective::@4/do_perspective::x#6 )
  do_perspective::z#1 = phi( do_perspective::@4/do_perspective::z#3 )
  print_char_cursor#55 = phi( do_perspective::@4/print_char_cursor#1 )
  print_char_cursor#22 = print_char_cursor#55
  print_schar::b#3 = do_perspective::z#1
  call print_schar
  to:do_perspective::@6
do_perspective::@6: scope:[do_perspective]  from do_perspective::@5
  print_line_cursor#33 = phi( do_perspective::@5/print_line_cursor#34 )
  do_perspective::z#4 = phi( do_perspective::@5/do_perspective::z#1 )
  do_perspective::y#4 = phi( do_perspective::@5/do_perspective::y#6 )
  do_perspective::x#4 = phi( do_perspective::@5/do_perspective::x#5 )
  print_char_cursor#56 = phi( do_perspective::@5/print_char_cursor#7 )
  print_char_cursor#23 = print_char_cursor#56
  print_str::str#4 = do_perspective::str3
  call print_str
  to:do_perspective::@7
do_perspective::@7: scope:[do_perspective]  from do_perspective::@6
  print_line_cursor#32 = phi( do_perspective::@6/print_line_cursor#33 )
  do_perspective::z#2 = phi( do_perspective::@6/do_perspective::z#4 )
  do_perspective::y#2 = phi( do_perspective::@6/do_perspective::y#4 )
  do_perspective::x#2 = phi( do_perspective::@6/do_perspective::x#4 )
  print_char_cursor#57 = phi( do_perspective::@6/print_char_cursor#1 )
  print_char_cursor#24 = print_char_cursor#57
  perspective::x#0 = do_perspective::x#2
  perspective::y#0 = do_perspective::y#2
  perspective::z#0 = do_perspective::z#2
  call perspective
  to:do_perspective::@8
do_perspective::@8: scope:[do_perspective]  from do_perspective::@7
  print_line_cursor#31 = phi( do_perspective::@7/print_line_cursor#32 )
  print_char_cursor#75 = phi( do_perspective::@7/print_char_cursor#24 )
  print_uchar::b#1 = (char)xr
  call print_uchar
  to:do_perspective::@9
do_perspective::@9: scope:[do_perspective]  from do_perspective::@8
  print_line_cursor#30 = phi( do_perspective::@8/print_line_cursor#31 )
  print_char_cursor#58 = phi( do_perspective::@8/print_char_cursor#10 )
  print_char_cursor#25 = print_char_cursor#58
  print_str::str#5 = do_perspective::str4
  call print_str
  to:do_perspective::@10
do_perspective::@10: scope:[do_perspective]  from do_perspective::@9
  print_line_cursor#29 = phi( do_perspective::@9/print_line_cursor#30 )
  print_char_cursor#59 = phi( do_perspective::@9/print_char_cursor#1 )
  print_char_cursor#26 = print_char_cursor#59
  print_uchar::b#2 = (char)yr
  call print_uchar
  to:do_perspective::@11
do_perspective::@11: scope:[do_perspective]  from do_perspective::@10
  print_line_cursor#28 = phi( do_perspective::@10/print_line_cursor#29 )
  print_char_cursor#60 = phi( do_perspective::@10/print_char_cursor#10 )
  print_char_cursor#27 = print_char_cursor#60
  print_str::str#6 = do_perspective::str5
  call print_str
  to:do_perspective::@12
do_perspective::@12: scope:[do_perspective]  from do_perspective::@11
  print_line_cursor#25 = phi( do_perspective::@11/print_line_cursor#28 )
  print_char_cursor#61 = phi( do_perspective::@11/print_char_cursor#1 )
  print_char_cursor#28 = print_char_cursor#61
  call print_ln
  to:do_perspective::@13
do_perspective::@13: scope:[do_perspective]  from do_perspective::@12
  print_char_cursor#62 = phi( do_perspective::@12/print_char_cursor#3 )
  print_line_cursor#19 = phi( do_perspective::@12/print_line_cursor#1 )
  print_line_cursor#7 = print_line_cursor#19
  print_char_cursor#29 = print_char_cursor#62
  to:do_perspective::@return
do_perspective::@return: scope:[do_perspective]  from do_perspective::@13
  print_line_cursor#20 = phi( do_perspective::@13/print_line_cursor#7 )
  print_char_cursor#63 = phi( do_perspective::@13/print_char_cursor#29 )
  print_char_cursor#30 = print_char_cursor#63
  print_line_cursor#8 = print_line_cursor#20
  return 
  to:@return

void perspective(signed char x , signed char y , signed char z)
perspective: scope:[perspective]  from do_perspective::@7
  perspective::z#1 = phi( do_perspective::@7/perspective::z#0 )
  perspective::y#1 = phi( do_perspective::@7/perspective::y#0 )
  perspective::x#1 = phi( do_perspective::@7/perspective::x#0 )
  xr = perspective::x#1
  yr = perspective::y#1
  zr = 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
  mulf_init::sqr#0 = 0
  mulf_init::add#0 = 1
  mulf_init::i#0 = 0
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@1
  mulf_init::add#2 = phi( mulf_init/mulf_init::add#0, mulf_init::@1/mulf_init::add#1 )
  mulf_init::i#2 = phi( mulf_init/mulf_init::i#0, mulf_init::@1/mulf_init::i#1 )
  mulf_init::sqr#2 = phi( mulf_init/mulf_init::sqr#0, mulf_init::@1/mulf_init::sqr#1 )
  mulf_init::val#0 = byte1  mulf_init::sqr#2
  mulf_sqr1[mulf_init::i#2] = mulf_init::val#0
  (mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0
  mulf_init::$1 = - mulf_init::i#2
  mulf_sqr1[mulf_init::$1] = mulf_init::val#0
  mulf_init::$2 = - mulf_init::i#2
  (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0
  mulf_init::$3 = mulf_init::i#2 + 1
  mulf_sqr2[mulf_init::$3] = mulf_init::val#0
  mulf_init::$4 = mulf_init::i#2 + 1
  (mulf_sqr2+$100)[mulf_init::$4] = mulf_init::val#0
  mulf_init::$5 = 1 - mulf_init::i#2
  mulf_sqr2[mulf_init::$5] = mulf_init::val#0
  mulf_init::$6 = 1 - mulf_init::i#2
  (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0
  mulf_init::sqr#1 = mulf_init::sqr#2 + mulf_init::add#2
  mulf_init::add#1 = mulf_init::add#2 + 2
  mulf_init::i#1 = mulf_init::i#2 + rangenext(0,$80)
  mulf_init::$7 = mulf_init::i#1 != rangelast(0,$80)
  if(mulf_init::$7) goto mulf_init::@1
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@1
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  print_screen#0 = (char *)$400
  print_line_cursor#9 = print_screen#0
  print_char_cursor#31 = print_line_cursor#9
  xr = 0
  yr = 0
  zr = 0
  psp1 = 0
  psp2 = 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  print_screen#8 = phi( __start::__init1/print_screen#0 )
  print_char_cursor#76 = phi( __start::__init1/print_char_cursor#31 )
  print_line_cursor#26 = phi( __start::__init1/print_line_cursor#9 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  print_screen#6 = phi( __start::@1/print_screen#8 )
  print_char_cursor#64 = phi( __start::@1/print_char_cursor#17 )
  print_line_cursor#21 = phi( __start::@1/print_line_cursor#6 )
  print_line_cursor#10 = print_line_cursor#21
  print_char_cursor#32 = print_char_cursor#64
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  print_char_cursor#65 = phi( __start::@2/print_char_cursor#32 )
  print_line_cursor#22 = phi( __start::@2/print_line_cursor#10 )
  print_screen#4 = phi( __start::@2/print_screen#6 )
  print_screen#1 = print_screen#4
  print_line_cursor#11 = print_line_cursor#22
  print_char_cursor#33 = print_char_cursor#65
  return 
  to:@return

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

Adding number conversion cast (unumber) 0 in print_str::$1 = 0 != *print_str::str#7
Adding number conversion cast (unumber) $28 in print_ln::$0 = print_line_cursor#12 + $28
Adding number conversion cast (snumber) 0 in print_schar::$0 = print_schar::b#4 < 0
Adding number conversion cast (unumber) 4 in print_uchar::$0 = print_uchar::b#3 >> 4
Adding number conversion cast (unumber) $f in print_uchar::$2 = print_uchar::b#4 & $f
Adding number conversion cast (unumber) print_uchar::$2 in print_uchar::$2 = print_uchar::b#4 & (unumber)$f
Adding number conversion cast (unumber) $3e8 in memset::num#0 = $3e8
Adding number conversion cast (unumber) 0 in memset::$0 = memset::num#1 > 0
Adding number conversion cast (snumber) $39 in do_perspective::x#0 = $39
Adding number conversion cast (snumber) -$47 in do_perspective::y#0 = -$47
Adding number conversion cast (snumber) $36 in do_perspective::z#0 = $36
Adding number conversion cast (unumber) $100 in (mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0
Adding number conversion cast (unumber) $100 in (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0
Adding number conversion cast (unumber) 1 in mulf_init::$3 = mulf_init::i#2 + 1
Adding number conversion cast (unumber) mulf_init::$3 in mulf_init::$3 = mulf_init::i#2 + (unumber)1
Adding number conversion cast (unumber) 1 in mulf_init::$4 = mulf_init::i#2 + 1
Adding number conversion cast (unumber) mulf_init::$4 in mulf_init::$4 = mulf_init::i#2 + (unumber)1
Adding number conversion cast (unumber) $100 in (mulf_sqr2+$100)[mulf_init::$4] = mulf_init::val#0
Adding number conversion cast (unumber) 1 in mulf_init::$5 = 1 - mulf_init::i#2
Adding number conversion cast (unumber) mulf_init::$5 in mulf_init::$5 = (unumber)1 - mulf_init::i#2
Adding number conversion cast (unumber) 1 in mulf_init::$6 = 1 - mulf_init::i#2
Adding number conversion cast (unumber) mulf_init::$6 in mulf_init::$6 = (unumber)1 - mulf_init::i#2
Adding number conversion cast (unumber) $100 in (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0
Adding number conversion cast (snumber) 2 in mulf_init::add#1 = mulf_init::add#2 + 2
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast memset::num#0 = (unumber)$3e8
Inlining cast memset::dst#0 = (char *)memset::str#2
Inlining cast do_perspective::x#0 = (snumber)$39
Inlining cast do_perspective::y#0 = (snumber)-$47
Inlining cast do_perspective::z#0 = (snumber)$36
Successful SSA optimization Pass2InlineCast
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 0
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
Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $28
Finalized signed number type (signed char) 0
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) $f
Finalized unsigned number type (unsigned int) $3e8
Finalized unsigned number type (char) 0
Finalized signed number type (signed char) $39
Finalized signed number type (signed char) -$47
Finalized signed number type (signed char) $36
Finalized unsigned number type (unsigned int) $100
Finalized unsigned number type (unsigned int) $100
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 1
Finalized unsigned number type (unsigned int) $100
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 1
Finalized unsigned number type (unsigned int) $100
Finalized signed number type (signed char) 2
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in print_uchar::$2 = print_uchar::b#4 & $f
Inferred type updated to char in mulf_init::$3 = mulf_init::i#2 + 1
Inferred type updated to char in mulf_init::$4 = mulf_init::i#2 + 1
Inferred type updated to char in mulf_init::$5 = 1 - mulf_init::i#2
Inferred type updated to char in mulf_init::$6 = 1 - mulf_init::i#2
Inversing boolean not [83] memset::$1 = memset::num#1 <= 0 from [82] memset::$0 = memset::num#1 > 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias print_str::str#7 = print_str::str#8 print_str::str#9 
Alias print_char_cursor#1 = print_char_cursor#66 print_char_cursor#67 print_char_cursor#35 
Alias print_char_cursor#0 = print_char_cursor#34 
Alias print_line_cursor#0 = print_ln::$0 print_line_cursor#13 print_char_cursor#2 print_line_cursor#14 print_char_cursor#37 print_line_cursor#1 print_char_cursor#3 
Alias print_char_cursor#69 = print_char_cursor#78 print_char_cursor#70 
Alias print_schar::b#4 = print_schar::b#7 print_schar::b#5 print_schar::b#9 print_schar::b#8 
Alias print_char_cursor#38 = print_char_cursor#4 
Alias print_schar::b#0 = print_schar::$4 
Alias print_char_cursor#39 = print_char_cursor#5 
Alias print_char_cursor#40 = print_char_cursor#6 print_char_cursor#41 print_char_cursor#7 
Alias print_uchar::b#3 = print_uchar::b#4 
Alias print_char_cursor#42 = print_char_cursor#8 
Alias print_char_cursor#10 = print_char_cursor#9 print_char_cursor#43 print_char_cursor#44 
Alias print_char_cursor#11 = print_char_cursor#46 print_char_cursor#12 
Alias print_line_cursor#15 = print_screen#3 print_screen#2 print_line_cursor#2 print_char_cursor#13 print_char_cursor#47 print_line_cursor#3 print_char_cursor#14 
Alias memset::return#1 = memset::str#1 memset::return#3 memset::return#2 
Alias memset::str#2 = memset::str#3 
Alias memset::num#1 = memset::num#2 
Alias memset::c#3 = memset::c#4 
Alias memset::c#1 = memset::c#2 
Alias memset::dst#2 = memset::dst#3 
Alias memset::end#1 = memset::end#2 
Alias memset::str#4 = memset::str#5 
Alias print_screen#5 = print_screen#7 
Alias print_line_cursor#24 = print_line_cursor#27 
Alias print_char_cursor#73 = print_char_cursor#79 
Alias print_line_cursor#16 = print_line_cursor#4 
Alias print_char_cursor#15 = print_char_cursor#48 
Alias print_char_cursor#16 = print_char_cursor#49 print_char_cursor#50 print_char_cursor#17 
Alias print_line_cursor#17 = print_line_cursor#5 print_line_cursor#18 print_line_cursor#6 
Alias do_perspective::x#1 = do_perspective::x#3 do_perspective::x#8 do_perspective::x#7 do_perspective::x#6 do_perspective::x#5 do_perspective::x#4 do_perspective::x#2 
Alias do_perspective::y#1 = do_perspective::y#5 do_perspective::y#7 do_perspective::y#3 do_perspective::y#8 do_perspective::y#6 do_perspective::y#4 do_perspective::y#2 
Alias do_perspective::z#1 = do_perspective::z#7 do_perspective::z#8 do_perspective::z#6 do_perspective::z#5 do_perspective::z#3 do_perspective::z#4 do_perspective::z#2 
Alias print_line_cursor#25 = print_line_cursor#38 print_line_cursor#39 print_line_cursor#37 print_line_cursor#36 print_line_cursor#35 print_line_cursor#34 print_line_cursor#33 print_line_cursor#32 print_line_cursor#31 print_line_cursor#30 print_line_cursor#29 print_line_cursor#28 
Alias print_char_cursor#18 = print_char_cursor#51 
Alias print_char_cursor#19 = print_char_cursor#52 
Alias print_char_cursor#20 = print_char_cursor#53 
Alias print_char_cursor#21 = print_char_cursor#54 
Alias print_char_cursor#22 = print_char_cursor#55 
Alias print_char_cursor#23 = print_char_cursor#56 
Alias print_char_cursor#24 = print_char_cursor#57 print_char_cursor#75 
Alias print_char_cursor#25 = print_char_cursor#58 
Alias print_char_cursor#26 = print_char_cursor#59 
Alias print_char_cursor#27 = print_char_cursor#60 
Alias print_char_cursor#28 = print_char_cursor#61 
Alias print_line_cursor#19 = print_line_cursor#7 print_line_cursor#20 print_line_cursor#8 
Alias print_char_cursor#29 = print_char_cursor#62 print_char_cursor#63 print_char_cursor#30 
Alias print_screen#0 = print_line_cursor#9 print_char_cursor#31 print_line_cursor#26 print_char_cursor#76 print_screen#8 print_screen#6 print_screen#4 print_screen#1 
Alias print_line_cursor#10 = print_line_cursor#21 print_line_cursor#22 print_line_cursor#11 
Alias print_char_cursor#32 = print_char_cursor#64 print_char_cursor#65 print_char_cursor#33 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values print_char_cursor#0 print_char_cursor#11
Identical Phi Values print_line_cursor#23 print_line_cursor#25
Identical Phi Values print_char_cursor#68 print_char_cursor#28
Identical Phi Values print_char_cursor#36 print_char_cursor#68
Identical Phi Values print_char_cursor#38 print_char_cursor#11
Identical Phi Values print_char_cursor#39 print_char_cursor#11
Identical Phi Values print_char_cursor#40 print_char_cursor#10
Identical Phi Values print_char_cursor#42 print_char_cursor#11
Identical Phi Values print_char_cursor#10 print_char_cursor#11
Identical Phi Values print_line_cursor#15 print_screen#5
Identical Phi Values memset::num#1 memset::num#0
Identical Phi Values memset::str#2 memset::str#0
Identical Phi Values memset::c#3 memset::c#0
Identical Phi Values memset::end#1 memset::end#0
Identical Phi Values memset::str#4 memset::str#2
Identical Phi Values memset::c#1 memset::c#3
Identical Phi Values print_screen#5 print_screen#0
Identical Phi Values print_line_cursor#24 print_screen#0
Identical Phi Values print_char_cursor#73 print_screen#0
Identical Phi Values print_line_cursor#16 print_line_cursor#15
Identical Phi Values print_char_cursor#15 print_line_cursor#15
Identical Phi Values print_char_cursor#16 print_char_cursor#29
Identical Phi Values print_line_cursor#17 print_line_cursor#19
Identical Phi Values print_char_cursor#74 print_char_cursor#15
Identical Phi Values do_perspective::x#1 do_perspective::x#0
Identical Phi Values do_perspective::y#1 do_perspective::y#0
Identical Phi Values do_perspective::z#1 do_perspective::z#0
Identical Phi Values print_line_cursor#25 print_line_cursor#16
Identical Phi Values print_char_cursor#18 print_char_cursor#1
Identical Phi Values print_char_cursor#19 print_char_cursor#40
Identical Phi Values print_char_cursor#20 print_char_cursor#1
Identical Phi Values print_char_cursor#21 print_char_cursor#40
Identical Phi Values print_char_cursor#22 print_char_cursor#1
Identical Phi Values print_char_cursor#23 print_char_cursor#40
Identical Phi Values print_char_cursor#24 print_char_cursor#1
Identical Phi Values print_char_cursor#25 print_char_cursor#10
Identical Phi Values print_char_cursor#26 print_char_cursor#1
Identical Phi Values print_char_cursor#27 print_char_cursor#10
Identical Phi Values print_char_cursor#28 print_char_cursor#1
Identical Phi Values print_line_cursor#19 print_line_cursor#0
Identical Phi Values print_char_cursor#29 print_line_cursor#0
Identical Phi Values perspective::x#1 perspective::x#0
Identical Phi Values perspective::y#1 perspective::y#0
Identical Phi Values perspective::z#1 perspective::z#0
Identical Phi Values print_line_cursor#10 print_line_cursor#17
Identical Phi Values print_char_cursor#32 print_char_cursor#16
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values print_char_cursor#69 print_char_cursor#1
Identical Phi Values print_char_cursor#71 print_char_cursor#11
Identical Phi Values memset::return#1 memset::str#0
Successful SSA optimization Pass2IdenticalPhiElimination
Identified duplicate assignment right side [194] mulf_init::$2 = - mulf_init::i#2
Identified duplicate assignment right side [202] mulf_init::$6 = 1 - mulf_init::i#2
Successful SSA optimization Pass2DuplicateRValueIdentification
Simple Condition print_str::$1 [3] if(0!=*print_str::str#7) goto print_str::@2
Simple Condition print_ln::$1 [13] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@1
Simple Condition print_schar::$0 [17] if(print_schar::b#4<0) goto print_schar::@1
Simple Condition memset::$1 [53] if(memset::num#0<=0) goto memset::@1
Simple Condition memset::$3 [60] if(memset::dst#2!=memset::end#0) goto memset::@4
Simple Condition mulf_init::$7 [147] if(mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant right-side identified [67] psp1 = (unsigned int)mulf_sqr1
Constant right-side identified [68] psp2 = (unsigned int)mulf_sqr2
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant print_char::ch#1 = '-'
Constant print_char::ch#2 = ' '
Constant memset::c#0 = ' '
Constant memset::num#0 = $3e8
Constant do_perspective::x#0 = $39
Constant do_perspective::y#0 = -$47
Constant do_perspective::z#0 = $36
Constant print_str::str#1 = do_perspective::str
Constant print_str::str#2 = do_perspective::str1
Constant print_str::str#3 = do_perspective::str2
Constant print_str::str#4 = do_perspective::str3
Constant print_str::str#5 = do_perspective::str4
Constant print_str::str#6 = do_perspective::str5
Constant mulf_init::sqr#0 = 0
Constant mulf_init::add#0 = 1
Constant mulf_init::i#0 = 0
Constant print_screen#0 = (char *) 1024
Successful SSA optimization Pass2ConstantIdentification
Constant memset::str#0 = (void *)print_screen#0
Constant print_schar::b#1 = do_perspective::x#0
Constant print_schar::b#2 = do_perspective::y#0
Constant print_schar::b#3 = do_perspective::z#0
Constant perspective::x#0 = do_perspective::x#0
Constant perspective::y#0 = do_perspective::y#0
Constant perspective::z#0 = do_perspective::z#0
Successful SSA optimization Pass2ConstantIdentification
Constant memset::return#0 = memset::str#0
Constant memset::$4 = (char *)memset::str#0
Constant memset::dst#0 = (char *)memset::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always false - eliminating [53] if(memset::num#0<=0) goto memset::@1
Successful SSA optimization Pass2ConstantIfs
Consolidated constant strings into do_perspective::str1
Successful SSA optimization Pass2ConstantStringConsolidation
Resolved ranged next value [145] mulf_init::i#1 = ++ mulf_init::i#2 to ++
Resolved ranged comparison value [147] if(mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 to $81
Eliminating unused constant memset::return#0
Successful SSA optimization PassNEliminateUnusedVars
Adding number conversion cast (unumber) $81 in if(mulf_init::i#1!=$81) goto mulf_init::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast $81
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $81
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias mulf_init::$2 = mulf_init::$1 
Alias mulf_init::$6 = mulf_init::$5 
Successful SSA optimization Pass2AliasElimination
Constant right-side identified [34] memset::end#0 = memset::$4 + memset::num#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memset::end#0 = memset::$4+memset::num#0
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with var siblings print_str::str#1
Inlining constant with var siblings print_str::str#2
Inlining constant with var siblings print_str::str#3
Inlining constant with var siblings print_str::str#4
Inlining constant with var siblings print_str::str#5
Inlining constant with var siblings print_str::str#6
Inlining constant with var siblings print_schar::b#1
Inlining constant with var siblings print_schar::b#2
Inlining constant with var siblings print_schar::b#3
Inlining constant with var siblings print_char::ch#1
Inlining constant with var siblings print_char::ch#2
Inlining constant with var siblings memset::dst#0
Inlining constant with var siblings mulf_init::sqr#0
Inlining constant with var siblings mulf_init::add#0
Inlining constant with var siblings mulf_init::i#0
Constant inlined mulf_init::sqr#0 = 0
Constant inlined do_perspective::str4 = do_perspective::str1
Constant inlined do_perspective::str2 = do_perspective::str1
Constant inlined mulf_init::i#0 = 0
Constant inlined print_schar::b#1 = do_perspective::x#0
Constant inlined print_char::ch#2 = ' '
Constant inlined print_schar::b#3 = do_perspective::z#0
Constant inlined mulf_init::add#0 = 1
Constant inlined print_schar::b#2 = do_perspective::y#0
Constant inlined perspective::z#0 = do_perspective::z#0
Constant inlined memset::$4 = (char *)memset::str#0
Constant inlined perspective::y#0 = do_perspective::y#0
Constant inlined perspective::x#0 = do_perspective::x#0
Constant inlined print_char::ch#1 = '-'
Constant inlined print_str::str#4 = do_perspective::str3
Constant inlined print_str::str#3 = do_perspective::str1
Constant inlined print_str::str#2 = do_perspective::str1
Constant inlined memset::dst#0 = (char *)memset::str#0
Constant inlined print_str::str#1 = do_perspective::str
Constant inlined print_str::str#6 = do_perspective::str5
Constant inlined print_str::str#5 = 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 mulf_init::i#2 = mulf_init::$3 mulf_init::$4 
Successful SSA optimization Pass2AliasElimination
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) $a
Finalized unsigned number type (char) $10
Finalized unsigned number type (unsigned int) $200
Finalized unsigned number type (unsigned int) $200
Finalized unsigned number type (unsigned int) $200
Finalized unsigned number type (unsigned int) $200
Finalized unsigned number type (unsigned int) $100
Successful SSA optimization PassNFinalizeNumberTypeConversions
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Added new block during phi lifting mulf_init::@2(between mulf_init::@1 and mulf_init::@1)
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of __start::@2
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of main::@3
Adding NOP phi() at start of mulf_init
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of print_cls::@1
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 memset
Adding NOP phi() at start of memset::@2
Adding NOP phi() at start of memset::@1
Adding NOP phi() at start of print_schar::@6
Adding NOP phi() at start of print_uchar::@2
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_ln::@2
CALL GRAPH
Calls in [__start] to main:7 
Calls in [main] to mulf_init:11 print_cls:14 do_perspective:16 
Calls in [print_cls] to memset:41 
Calls in [do_perspective] to print_str:45 print_schar:47 print_str:49 print_schar:51 print_str:53 print_schar:55 print_str:57 perspective:59 print_uchar:63 print_str:65 print_uchar:69 print_str:71 print_ln:73 
Calls in [print_str] to print_char:94 
Calls in [print_schar] to print_char:101 print_uchar:107 print_char:111 
Calls in [print_uchar] to print_char:124 print_char:129 

Created 15 initial phi equivalence classes
Coalesced [37] mulf_init::sqr#3 = mulf_init::sqr#1
Coalesced [38] mulf_init::i#3 = mulf_init::i#1
Coalesced [39] mulf_init::add#3 = mulf_init::add#1
Coalesced [48] print_char_cursor#81 = print_char_cursor#11
Coalesced (already) [52] print_char_cursor#82 = print_char_cursor#11
Coalesced (already) [56] print_char_cursor#83 = print_char_cursor#11
Coalesced [61] print_uchar::b#6 = print_uchar::b#1
Coalesced [62] print_char_cursor#88 = print_char_cursor#1
Coalesced (already) [64] print_char_cursor#84 = print_char_cursor#11
Coalesced [67] print_uchar::b#5 = print_uchar::b#2
Coalesced (already) [68] print_char_cursor#87 = print_char_cursor#1
Coalesced (already) [70] print_char_cursor#80 = print_char_cursor#11
Coalesced [84] memset::dst#4 = memset::dst#1
Coalesced [86] print_str::str#11 = print_str::str#10
Coalesced [87] print_char_cursor#85 = print_char_cursor#77
Coalesced [92] print_char::ch#6 = print_char::ch#0
Coalesced [93] print_char_cursor#92 = print_char_cursor#1
Coalesced [96] print_str::str#12 = print_str::str#0
Coalesced (already) [97] print_char_cursor#86 = print_char_cursor#11
Coalesced (already) [100] print_char_cursor#91 = print_char_cursor#1
Coalesced [102] print_schar::b#11 = print_schar::b#4
Coalesced [105] print_uchar::b#7 = print_uchar::b#0
Coalesced (already) [106] print_char_cursor#89 = print_char_cursor#11
Coalesced (already) [110] print_char_cursor#90 = print_char_cursor#1
Coalesced [113] print_schar::b#10 = print_schar::b#0
Coalesced [122] print_char::ch#7 = print_char::ch#3
Coalesced (already) [123] print_char_cursor#93 = print_char_cursor#72
Coalesced [127] print_char::ch#8 = print_char::ch#4
Coalesced (already) [128] print_char_cursor#94 = print_char_cursor#11
Coalesced [138] print_line_cursor#40 = print_line_cursor#0
Coalesced down to 10 phi equivalence classes
Culled Empty Block label __start::@2
Culled Empty Block label main::@3
Culled Empty Block label mulf_init::@2
Culled Empty Block label print_cls::@1
Culled Empty Block label do_perspective::@13
Culled Empty Block label memset::@2
Culled Empty Block label memset::@1
Culled Empty Block label print_schar::@5
Culled Empty Block label print_schar::@6
Culled Empty Block label print_uchar::@2
Culled Empty Block label print_ln::@2
Culled Empty Block label print_ln::@3
Renumbering block memset::@3 to memset::@1
Renumbering block memset::@4 to memset::@2
Adding NOP phi() at start of __start
Adding NOP phi() at start of __start::@1
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of mulf_init
Adding NOP phi() at start of print_cls
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 memset
Adding NOP phi() at start of print_schar::@3
Adding NOP phi() at start of print_schar::@1
Adding NOP phi() at start of print_ln

FINAL CONTROL FLOW GRAPH

void __start()
__start: scope:[__start]  from
  [0] phi()
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  [1] xr = 0
  [2] yr = 0
  [3] zr = 0
  [4] psp1 = 0
  [5] psp2 = 0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  [6] phi()
  [7] call main
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  [8] return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  asm { sei  }
  [10] call mulf_init
  to:main::@1
main::@1: scope:[main]  from main
  [11] psp1 = (unsigned int)mulf_sqr1
  [12] psp2 = (unsigned int)mulf_sqr2
  [13] call print_cls
  to:main::@2
main::@2: scope:[main]  from main::@1
  [14] phi()
  [15] call do_perspective
  to:main::@return
main::@return: scope:[main]  from main::@2
  [16] return 
  to:@return

void mulf_init()
mulf_init: scope:[mulf_init]  from main
  [17] phi()
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@1
  [18] mulf_init::add#2 = phi( mulf_init/1, mulf_init::@1/mulf_init::add#1 )
  [18] mulf_init::i#2 = phi( mulf_init/0, mulf_init::@1/mulf_init::i#1 )
  [18] mulf_init::sqr#2 = phi( mulf_init/0, mulf_init::@1/mulf_init::sqr#1 )
  [19] mulf_init::val#0 = byte1  mulf_init::sqr#2
  [20] mulf_sqr1[mulf_init::i#2] = mulf_init::val#0
  [21] (mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0
  [22] mulf_init::$2 = - mulf_init::i#2
  [23] mulf_sqr1[mulf_init::$2] = mulf_init::val#0
  [24] (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0
  [25] (mulf_sqr2+1)[mulf_init::i#2] = mulf_init::val#0
  [26] (mulf_sqr2+$100+1)[mulf_init::i#2] = mulf_init::val#0
  [27] mulf_init::$6 = 1 - mulf_init::i#2
  [28] mulf_sqr2[mulf_init::$6] = mulf_init::val#0
  [29] (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0
  [30] mulf_init::sqr#1 = mulf_init::sqr#2 + mulf_init::add#2
  [31] mulf_init::add#1 = mulf_init::add#2 + 2
  [32] mulf_init::i#1 = ++ mulf_init::i#2
  [33] if(mulf_init::i#1!=$81) goto mulf_init::@1
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@1
  [34] return 
  to:@return

void print_cls()
print_cls: scope:[print_cls]  from main::@1
  [35] phi()
  [36] call memset
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls
  [37] return 
  to:@return

void do_perspective(signed char x , signed char y , signed char z)
do_perspective: scope:[do_perspective]  from main::@2
  [38] phi()
  [39] call print_str
  to:do_perspective::@1
do_perspective::@1: scope:[do_perspective]  from do_perspective
  [40] phi()
  [41] call print_schar
  to:do_perspective::@2
do_perspective::@2: scope:[do_perspective]  from do_perspective::@1
  [42] phi()
  [43] call print_str
  to:do_perspective::@3
do_perspective::@3: scope:[do_perspective]  from do_perspective::@2
  [44] phi()
  [45] call print_schar
  to:do_perspective::@4
do_perspective::@4: scope:[do_perspective]  from do_perspective::@3
  [46] phi()
  [47] call print_str
  to:do_perspective::@5
do_perspective::@5: scope:[do_perspective]  from do_perspective::@4
  [48] phi()
  [49] call print_schar
  to:do_perspective::@6
do_perspective::@6: scope:[do_perspective]  from do_perspective::@5
  [50] phi()
  [51] call print_str
  to:do_perspective::@7
do_perspective::@7: scope:[do_perspective]  from do_perspective::@6
  [52] phi()
  [53] call perspective
  to:do_perspective::@8
do_perspective::@8: scope:[do_perspective]  from do_perspective::@7
  [54] print_uchar::b#1 = (char)xr
  [55] call print_uchar
  to:do_perspective::@9
do_perspective::@9: scope:[do_perspective]  from do_perspective::@8
  [56] phi()
  [57] call print_str
  to:do_perspective::@10
do_perspective::@10: scope:[do_perspective]  from do_perspective::@9
  [58] print_uchar::b#2 = (char)yr
  [59] call print_uchar
  to:do_perspective::@11
do_perspective::@11: scope:[do_perspective]  from do_perspective::@10
  [60] phi()
  [61] call print_str
  to:do_perspective::@12
do_perspective::@12: scope:[do_perspective]  from do_perspective::@11
  [62] phi()
  [63] call print_ln
  to:do_perspective::@return
do_perspective::@return: scope:[do_perspective]  from do_perspective::@12
  [64] return 
  to:@return

void * memset(void *str , char c , unsigned int num)
memset: scope:[memset]  from print_cls
  [65] phi()
  to:memset::@1
memset::@1: scope:[memset]  from memset memset::@2
  [66] memset::dst#2 = phi( memset/(char *)memset::str#0, memset::@2/memset::dst#1 )
  [67] if(memset::dst#2!=memset::end#0) goto memset::@2
  to:memset::@return
memset::@return: scope:[memset]  from memset::@1
  [68] return 
  to:@return
memset::@2: scope:[memset]  from memset::@1
  [69] *memset::dst#2 = memset::c#0
  [70] memset::dst#1 = ++ memset::dst#2
  to:memset::@1

void print_str(char *str)
print_str: scope:[print_str]  from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9
  [71] print_char_cursor#77 = phi( do_perspective/print_screen#0, do_perspective::@11/print_char_cursor#11, do_perspective::@2/print_char_cursor#11, do_perspective::@4/print_char_cursor#11, do_perspective::@6/print_char_cursor#11, do_perspective::@9/print_char_cursor#11 )
  [71] print_str::str#10 = phi( do_perspective/do_perspective::str, do_perspective::@11/do_perspective::str5, do_perspective::@2/do_perspective::str1, do_perspective::@4/do_perspective::str1, do_perspective::@6/do_perspective::str3, do_perspective::@9/do_perspective::str1 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@3
  [72] print_char_cursor#1 = phi( print_str/print_char_cursor#77, print_str::@3/print_char_cursor#11 )
  [72] print_str::str#7 = phi( print_str/print_str::str#10, print_str::@3/print_str::str#0 )
  [73] if(0!=*print_str::str#7) goto print_str::@2
  to:print_str::@return
print_str::@return: scope:[print_str]  from print_str::@1
  [74] return 
  to:@return
print_str::@2: scope:[print_str]  from print_str::@1
  [75] print_char::ch#0 = *print_str::str#7
  [76] call print_char
  to:print_str::@3
print_str::@3: scope:[print_str]  from print_str::@2
  [77] print_str::str#0 = ++ print_str::str#7
  to:print_str::@1

void print_schar(signed char b)
print_schar: scope:[print_schar]  from do_perspective::@1 do_perspective::@3 do_perspective::@5
  [78] print_schar::b#4 = phi( do_perspective::@1/do_perspective::x#0, do_perspective::@3/do_perspective::y#0, do_perspective::@5/do_perspective::z#0 )
  [79] if(print_schar::b#4<0) goto print_schar::@1
  to:print_schar::@3
print_schar::@3: scope:[print_schar]  from print_schar
  [80] phi()
  [81] call print_char
  to:print_schar::@2
print_schar::@2: scope:[print_schar]  from print_schar::@3 print_schar::@4
  [82] print_schar::b#6 = phi( print_schar::@4/print_schar::b#0, print_schar::@3/print_schar::b#4 )
  [83] print_uchar::b#0 = (char)print_schar::b#6
  [84] call print_uchar
  to:print_schar::@return
print_schar::@return: scope:[print_schar]  from print_schar::@2
  [85] return 
  to:@return
print_schar::@1: scope:[print_schar]  from print_schar
  [86] phi()
  [87] call print_char
  to:print_schar::@4
print_schar::@4: scope:[print_schar]  from print_schar::@1
  [88] print_schar::b#0 = - print_schar::b#4
  to:print_schar::@2

void perspective(signed char x , signed char y , signed char z)
perspective: scope:[perspective]  from do_perspective::@7
  [89] xr = do_perspective::x#0
  [90] yr = do_perspective::y#0
  [91] zr = 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
  [93] return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from do_perspective::@10 do_perspective::@8 print_schar::@2
  [94] print_char_cursor#72 = phi( do_perspective::@10/print_char_cursor#1, do_perspective::@8/print_char_cursor#1, print_schar::@2/print_char_cursor#11 )
  [94] print_uchar::b#3 = phi( do_perspective::@10/print_uchar::b#2, do_perspective::@8/print_uchar::b#1, print_schar::@2/print_uchar::b#0 )
  [95] print_uchar::$0 = print_uchar::b#3 >> 4
  [96] print_char::ch#3 = print_hextab[print_uchar::$0]
  [97] call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  [98] print_uchar::$2 = print_uchar::b#3 & $f
  [99] print_char::ch#4 = print_hextab[print_uchar::$2]
  [100] call print_char
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@1
  [101] return 
  to:@return

void print_ln()
print_ln: scope:[print_ln]  from do_perspective::@12
  [102] phi()
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  [103] print_line_cursor#12 = phi( print_ln/print_screen#0, print_ln::@1/print_line_cursor#0 )
  [104] print_line_cursor#0 = print_line_cursor#12 + $28
  [105] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@1
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@1
  [106] return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_schar::@1 print_schar::@3 print_str::@2 print_uchar print_uchar::@1
  [107] print_char_cursor#45 = phi( print_schar::@1/print_char_cursor#1, print_schar::@3/print_char_cursor#1, print_str::@2/print_char_cursor#1, print_uchar/print_char_cursor#72, print_uchar::@1/print_char_cursor#11 )
  [107] print_char::ch#5 = phi( print_schar::@1/'-', print_schar::@3/' ', print_str::@2/print_char::ch#0, print_uchar/print_char::ch#3, print_uchar::@1/print_char::ch#4 )
  [108] *print_char_cursor#45 = print_char::ch#5
  [109] print_char_cursor#11 = ++ print_char_cursor#45
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [110] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void __start()
void do_perspective(signed char x , signed char y , signed char z)
signed char do_perspective::x
signed char do_perspective::y
signed char do_perspective::z
void main()
void * memset(void *str , char c , unsigned int num)
char memset::c
char *memset::dst
char *memset::dst#1 // 20002.0
char *memset::dst#2 // 13334.666666666666
char *memset::end
unsigned int memset::num
void *memset::return
void *memset::str
void mulf_init()
char mulf_init::$2 // 1501.5
char mulf_init::$6 // 1501.5
int mulf_init::add
int mulf_init::add#1 // 667.3333333333334
int mulf_init::add#2 // 231.0
char mulf_init::i
char mulf_init::i#1 // 1501.5
char mulf_init::i#2 // 572.0
int mulf_init::sqr
int mulf_init::sqr#1 // 500.5
int mulf_init::sqr#2 // 250.25
char mulf_init::val
char mulf_init::val#0 // 900.9000000000001
void perspective(signed char x , signed char y , signed char z)
signed char perspective::x
signed char perspective::y
signed char perspective::z
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // 20002.0
char print_char::ch#3 // 20002.0
char print_char::ch#4 // 20002.0
char print_char::ch#5 // 130004.0
char *print_char_cursor
char *print_char_cursor#1 // 1277.230769230769
char *print_char_cursor#11 // 4673.423076923077
char *print_char_cursor#45 // 116003.5
char *print_char_cursor#72 // 3734.6666666666665
char *print_char_cursor#77 // 1506.0
void print_cls()
char *print_line_cursor
char *print_line_cursor#0 // 15001.5
char *print_line_cursor#12 // 20002.0
void print_ln()
void print_schar(signed char b)
signed char print_schar::b
signed char print_schar::b#0 // 2002.0
signed char print_schar::b#4 // 500.5
signed char print_schar::b#6 // 2002.0
char *print_screen
void print_str(char *str)
char *print_str::str
char *print_str::str#0 // 20002.0
char *print_str::str#10 // 1001.0
char *print_str::str#7 // 10251.25
void print_uchar(char b)
char print_uchar::$0 // 20002.0
char print_uchar::$2 // 20002.0
char print_uchar::b
char print_uchar::b#0 // 2002.0
char print_uchar::b#1 // 202.0
char print_uchar::b#2 // 202.0
char print_uchar::b#3 // 5301.25
__loadstore volatile unsigned int psp1 // 0.5909090909090909
__loadstore volatile unsigned int psp2 // 0.6190476190476191
__loadstore volatile signed char xr // 167.16666666666669
__loadstore volatile signed char yr // 111.44444444444446
__loadstore volatile signed char zr // 1003.0

Initial phi equivalence classes
[ mulf_init::sqr#2 mulf_init::sqr#1 ]
[ mulf_init::i#2 mulf_init::i#1 ]
[ mulf_init::add#2 mulf_init::add#1 ]
[ memset::dst#2 memset::dst#1 ]
[ print_str::str#7 print_str::str#10 print_str::str#0 ]
[ print_schar::b#6 print_schar::b#0 print_schar::b#4 ]
[ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ]
[ print_line_cursor#12 print_line_cursor#0 ]
[ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ]
[ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ]
Added variable xr to live range equivalence class [ xr ]
Added variable yr to live range equivalence class [ yr ]
Added variable zr to live range equivalence class [ zr ]
Added variable psp1 to live range equivalence class [ psp1 ]
Added variable psp2 to live range equivalence class [ psp2 ]
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::$6 to live range equivalence class [ mulf_init::$6 ]
Added variable print_uchar::$0 to live range equivalence class [ print_uchar::$0 ]
Added variable print_uchar::$2 to live range equivalence class [ print_uchar::$2 ]
Complete equivalence classes
[ mulf_init::sqr#2 mulf_init::sqr#1 ]
[ mulf_init::i#2 mulf_init::i#1 ]
[ mulf_init::add#2 mulf_init::add#1 ]
[ memset::dst#2 memset::dst#1 ]
[ print_str::str#7 print_str::str#10 print_str::str#0 ]
[ print_schar::b#6 print_schar::b#0 print_schar::b#4 ]
[ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ]
[ print_line_cursor#12 print_line_cursor#0 ]
[ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ]
[ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ]
[ xr ]
[ yr ]
[ zr ]
[ psp1 ]
[ psp2 ]
[ mulf_init::val#0 ]
[ mulf_init::$2 ]
[ mulf_init::$6 ]
[ print_uchar::$0 ]
[ print_uchar::$2 ]
Allocated zp[1]:2 [ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ]
Allocated zp[2]:3 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ]
Allocated zp[2]:5 [ print_line_cursor#12 print_line_cursor#0 ]
Allocated zp[2]:7 [ memset::dst#2 memset::dst#1 ]
Allocated zp[2]:9 [ print_str::str#7 print_str::str#10 print_str::str#0 ]
Allocated zp[1]:11 [ print_uchar::$0 ]
Allocated zp[1]:12 [ print_uchar::$2 ]
Allocated zp[1]:13 [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ]
Allocated zp[1]:14 [ print_schar::b#6 print_schar::b#0 print_schar::b#4 ]
Allocated zp[1]:15 [ mulf_init::i#2 mulf_init::i#1 ]
Allocated zp[1]:16 [ mulf_init::$2 ]
Allocated zp[1]:17 [ mulf_init::$6 ]
Allocated zp[1]:18 [ zr ]
Allocated zp[1]:19 [ mulf_init::val#0 ]
Allocated zp[2]:20 [ mulf_init::add#2 mulf_init::add#1 ]
Allocated zp[2]:22 [ mulf_init::sqr#2 mulf_init::sqr#1 ]
Allocated zp[1]:24 [ xr ]
Allocated zp[1]:25 [ yr ]
Allocated zp[2]:26 [ psp2 ]
Allocated zp[2]:28 [ psp1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [1] xr = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [2] yr = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [3] zr = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [4] psp1 = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [5] psp2 = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [11] psp1 = (unsigned int)mulf_sqr1 [ psp1 ] ( main:7 [ psp1 ] { }  ) always clobbers reg byte a 
Statement [12] psp2 = (unsigned int)mulf_sqr2 [ psp1 psp2 ] ( main:7 [ psp1 psp2 ] { }  ) always clobbers reg byte a 
Statement [22] mulf_init::$2 = - mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:7::mulf_init:10 [ 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]:15 [ mulf_init::i#2 mulf_init::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:19 [ mulf_init::val#0 ]
Statement [23] mulf_sqr1[mulf_init::$2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:7::mulf_init:10 [ 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]:16 [ mulf_init::$2 ]
Statement [24] (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [25] (mulf_sqr2+1)[mulf_init::i#2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [26] (mulf_sqr2+$100+1)[mulf_init::i#2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [27] mulf_init::$6 = 1 - mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] ( main:7::mulf_init:10 [ 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 [28] mulf_sqr2[mulf_init::$6] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:17 [ mulf_init::$6 ]
Statement [29] (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] { }  ) always clobbers reg byte a 
Statement [30] mulf_init::sqr#1 = mulf_init::sqr#2 + mulf_init::add#2 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] ( main:7::mulf_init:10 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] { }  ) always clobbers reg byte a 
Statement [31] mulf_init::add#1 = mulf_init::add#2 + 2 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] ( main:7::mulf_init:10 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] { }  ) always clobbers reg byte a 
Statement [67] if(memset::dst#2!=memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:7::print_cls:13::memset:36 [ psp1 psp2 memset::dst#2 ] { }  ) always clobbers reg byte a 
Statement [69] *memset::dst#2 = memset::c#0 [ memset::dst#2 ] ( main:7::print_cls:13::memset:36 [ psp1 psp2 memset::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [73] if(0!=*print_str::str#7) goto print_str::@2 [ print_str::str#7 print_char_cursor#1 ] ( main:7::do_perspective:15::print_str:39 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { }  main:7::do_perspective:15::print_str:43 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:47 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:51 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:57 [ yr print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:61 [ print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  ) always clobbers reg byte a reg byte y 
Statement [75] print_char::ch#0 = *print_str::str#7 [ print_str::str#7 print_char_cursor#1 print_char::ch#0 ] ( main:7::do_perspective:15::print_str:39 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:43 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:47 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:51 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:57 [ yr print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:61 [ print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  ) always clobbers reg byte a reg byte y 
Statement [88] print_schar::b#0 = - print_schar::b#4 [ print_char_cursor#11 print_schar::b#0 ] ( main:7::do_perspective:15::print_schar:41 [ psp1 psp2 print_char_cursor#11 print_schar::b#0 ] { }  main:7::do_perspective:15::print_schar:45 [ psp1 psp2 print_char_cursor#11 print_schar::b#0 ] { }  main:7::do_perspective:15::print_schar:49 [ psp1 psp2 print_char_cursor#11 print_schar::b#0 ] { }  ) always clobbers reg byte a 
Statement [89] xr = do_perspective::x#0 [ xr psp1 psp2 ] ( main:7::do_perspective:15::perspective:53 [ print_char_cursor#1 xr psp1 psp2 ] { }  ) always clobbers reg byte a 
Statement [90] yr = do_perspective::y#0 [ xr yr psp1 psp2 ] ( main:7::do_perspective:15::perspective:53 [ print_char_cursor#1 xr yr psp1 psp2 ] { }  ) always clobbers reg byte a 
Statement [91] zr = do_perspective::z#0 [ xr yr zr psp1 psp2 ] ( main:7::do_perspective:15::perspective:53 [ print_char_cursor#1 xr yr zr psp1 psp2 ] { }  ) 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 [95] print_uchar::$0 = print_uchar::b#3 >> 4 [ print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] ( main:7::do_perspective:15::print_uchar:55 [ yr print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_uchar:59 [ print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84 [ psp1 psp2 print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84 [ psp1 psp2 print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84 [ psp1 psp2 print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:13 [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ]
Statement [98] print_uchar::$2 = print_uchar::b#3 & $f [ print_char_cursor#11 print_uchar::$2 ] ( main:7::do_perspective:15::print_uchar:55 [ yr print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_uchar:59 [ print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84 [ psp1 psp2 print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84 [ psp1 psp2 print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84 [ psp1 psp2 print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  ) always clobbers reg byte a 
Statement [104] print_line_cursor#0 = print_line_cursor#12 + $28 [ print_char_cursor#1 print_line_cursor#0 ] ( main:7::do_perspective:15::print_ln:63 [ print_char_cursor#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [105] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@1 [ print_char_cursor#1 print_line_cursor#0 ] ( main:7::do_perspective:15::print_ln:63 [ print_char_cursor#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [108] *print_char_cursor#45 = print_char::ch#5 [ print_char_cursor#45 ] ( main:7::do_perspective:15::print_str:39::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:43::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:47::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:51::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:57::print_char:76 [ yr print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:61::print_char:76 [ print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_char:81 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:45::print_char:81 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:49::print_char:81 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_char:87 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:45::print_char:87 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:49::print_char:87 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_uchar:55::print_char:97 [ yr print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_uchar:59::print_char:97 [ print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84::print_char:97 [ psp1 psp2 print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84::print_char:97 [ psp1 psp2 print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84::print_char:97 [ psp1 psp2 print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_uchar:55::print_char:100 [ yr print_char_cursor#45 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_uchar:59::print_char:100 [ print_char_cursor#45 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84::print_char:100 [ psp1 psp2 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84::print_char:100 [ psp1 psp2 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84::print_char:100 [ psp1 psp2 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:14 [ print_schar::b#6 print_schar::b#0 print_schar::b#4 ]
Removing always clobbered register reg byte y as potential for zp[1]:13 [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ]
Statement [1] xr = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [2] yr = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [3] zr = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [4] psp1 = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [5] psp2 = 0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [11] psp1 = (unsigned int)mulf_sqr1 [ psp1 ] ( main:7 [ psp1 ] { }  ) always clobbers reg byte a 
Statement [12] psp2 = (unsigned int)mulf_sqr2 [ psp1 psp2 ] ( main:7 [ psp1 psp2 ] { }  ) always clobbers reg byte a 
Statement [20] mulf_sqr1[mulf_init::i#2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [21] (mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [22] mulf_init::$2 = - mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:7::mulf_init:10 [ 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 [23] mulf_sqr1[mulf_init::$2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$2 ] ( main:7::mulf_init:10 [ 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 [24] (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [25] (mulf_sqr2+1)[mulf_init::i#2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [26] (mulf_sqr2+$100+1)[mulf_init::i#2] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 ] { }  ) always clobbers reg byte a 
Statement [27] mulf_init::$6 = 1 - mulf_init::i#2 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] ( main:7::mulf_init:10 [ 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 [28] mulf_sqr2[mulf_init::$6] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 mulf_init::val#0 mulf_init::$6 ] ( main:7::mulf_init:10 [ 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 [29] (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] ( main:7::mulf_init:10 [ mulf_init::sqr#2 mulf_init::i#2 mulf_init::add#2 ] { }  ) always clobbers reg byte a 
Statement [30] mulf_init::sqr#1 = mulf_init::sqr#2 + mulf_init::add#2 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] ( main:7::mulf_init:10 [ mulf_init::i#2 mulf_init::add#2 mulf_init::sqr#1 ] { }  ) always clobbers reg byte a 
Statement [31] mulf_init::add#1 = mulf_init::add#2 + 2 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] ( main:7::mulf_init:10 [ mulf_init::i#2 mulf_init::sqr#1 mulf_init::add#1 ] { }  ) always clobbers reg byte a 
Statement [67] if(memset::dst#2!=memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:7::print_cls:13::memset:36 [ psp1 psp2 memset::dst#2 ] { }  ) always clobbers reg byte a 
Statement [69] *memset::dst#2 = memset::c#0 [ memset::dst#2 ] ( main:7::print_cls:13::memset:36 [ psp1 psp2 memset::dst#2 ] { }  ) always clobbers reg byte a reg byte y 
Statement [73] if(0!=*print_str::str#7) goto print_str::@2 [ print_str::str#7 print_char_cursor#1 ] ( main:7::do_perspective:15::print_str:39 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { }  main:7::do_perspective:15::print_str:43 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:47 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:51 [ psp1 psp2 print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:57 [ yr print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  main:7::do_perspective:15::print_str:61 [ print_str::str#7 print_char_cursor#1 ] { { print_char_cursor#11 = print_char_cursor#77 } }  ) always clobbers reg byte a reg byte y 
Statement [75] print_char::ch#0 = *print_str::str#7 [ print_str::str#7 print_char_cursor#1 print_char::ch#0 ] ( main:7::do_perspective:15::print_str:39 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:43 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:47 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:51 [ psp1 psp2 print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:57 [ yr print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:61 [ print_str::str#7 print_char_cursor#1 print_char::ch#0 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  ) always clobbers reg byte a reg byte y 
Statement [88] print_schar::b#0 = - print_schar::b#4 [ print_char_cursor#11 print_schar::b#0 ] ( main:7::do_perspective:15::print_schar:41 [ psp1 psp2 print_char_cursor#11 print_schar::b#0 ] { }  main:7::do_perspective:15::print_schar:45 [ psp1 psp2 print_char_cursor#11 print_schar::b#0 ] { }  main:7::do_perspective:15::print_schar:49 [ psp1 psp2 print_char_cursor#11 print_schar::b#0 ] { }  ) always clobbers reg byte a 
Statement [89] xr = do_perspective::x#0 [ xr psp1 psp2 ] ( main:7::do_perspective:15::perspective:53 [ print_char_cursor#1 xr psp1 psp2 ] { }  ) always clobbers reg byte a 
Statement [90] yr = do_perspective::y#0 [ xr yr psp1 psp2 ] ( main:7::do_perspective:15::perspective:53 [ print_char_cursor#1 xr yr psp1 psp2 ] { }  ) always clobbers reg byte a 
Statement [91] zr = do_perspective::z#0 [ xr yr zr psp1 psp2 ] ( main:7::do_perspective:15::perspective:53 [ print_char_cursor#1 xr yr zr psp1 psp2 ] { }  ) 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 [95] print_uchar::$0 = print_uchar::b#3 >> 4 [ print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] ( main:7::do_perspective:15::print_uchar:55 [ yr print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_uchar:59 [ print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84 [ psp1 psp2 print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84 [ psp1 psp2 print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84 [ psp1 psp2 print_uchar::b#3 print_char_cursor#72 print_uchar::$0 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  ) always clobbers reg byte a 
Statement [98] print_uchar::$2 = print_uchar::b#3 & $f [ print_char_cursor#11 print_uchar::$2 ] ( main:7::do_perspective:15::print_uchar:55 [ yr print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_uchar:59 [ print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84 [ psp1 psp2 print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84 [ psp1 psp2 print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84 [ psp1 psp2 print_char_cursor#11 print_uchar::$2 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  ) always clobbers reg byte a 
Statement [104] print_line_cursor#0 = print_line_cursor#12 + $28 [ print_char_cursor#1 print_line_cursor#0 ] ( main:7::do_perspective:15::print_ln:63 [ print_char_cursor#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [105] if(print_line_cursor#0<print_char_cursor#1) goto print_ln::@1 [ print_char_cursor#1 print_line_cursor#0 ] ( main:7::do_perspective:15::print_ln:63 [ print_char_cursor#1 print_line_cursor#0 ] { }  ) always clobbers reg byte a 
Statement [108] *print_char_cursor#45 = print_char::ch#5 [ print_char_cursor#45 ] ( main:7::do_perspective:15::print_str:39::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:43::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:47::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:51::print_char:76 [ psp1 psp2 print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:57::print_char:76 [ yr print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_str:61::print_char:76 [ print_str::str#7 print_char_cursor#45 ] { { print_char_cursor#11 = print_char_cursor#77 } { print_char::ch#0 = print_char::ch#5 } { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_char:81 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:45::print_char:81 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:49::print_char:81 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_char:87 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:45::print_char:87 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:49::print_char:87 [ psp1 psp2 print_schar::b#4 print_char_cursor#45 ] { { print_char_cursor#1 = print_char_cursor#45 } }  main:7::do_perspective:15::print_uchar:55::print_char:97 [ yr print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_uchar:59::print_char:97 [ print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84::print_char:97 [ psp1 psp2 print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84::print_char:97 [ psp1 psp2 print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84::print_char:97 [ psp1 psp2 print_uchar::b#3 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#3 = print_char::ch#5 } }  main:7::do_perspective:15::print_uchar:55::print_char:100 [ yr print_char_cursor#45 ] { { print_uchar::b#1 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_uchar:59::print_char:100 [ print_char_cursor#45 ] { { print_uchar::b#2 = print_uchar::b#3 } { print_char_cursor#1 = print_char_cursor#72 } { print_char::ch#4 = print_char::ch#5 } { print_char_cursor#11 = print_char_cursor#45 } }  main:7::do_perspective:15::print_schar:41::print_uchar:84::print_char:100 [ psp1 psp2 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:45::print_uchar:84::print_char:100 [ psp1 psp2 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  main:7::do_perspective:15::print_schar:49::print_uchar:84::print_char:100 [ psp1 psp2 print_char_cursor#45 ] { { print_uchar::b#0 = print_uchar::b#3 } { print_char_cursor#11 = print_char_cursor#72 print_char_cursor#45 } { print_char::ch#4 = print_char::ch#5 } }  ) always clobbers reg byte y 
Potential registers zp[2]:22 [ mulf_init::sqr#2 mulf_init::sqr#1 ] : zp[2]:22 , 
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]:20 [ mulf_init::add#2 mulf_init::add#1 ] : zp[2]:20 , 
Potential registers zp[2]:7 [ memset::dst#2 memset::dst#1 ] : zp[2]:7 , 
Potential registers zp[2]:9 [ print_str::str#7 print_str::str#10 print_str::str#0 ] : zp[2]:9 , 
Potential registers zp[1]:14 [ print_schar::b#6 print_schar::b#0 print_schar::b#4 ] : zp[1]:14 , reg byte a , reg byte x , 
Potential registers zp[1]:13 [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ] : zp[1]:13 , reg byte x , 
Potential registers zp[2]:5 [ print_line_cursor#12 print_line_cursor#0 ] : zp[2]:5 , 
Potential registers zp[1]:2 [ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:3 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ] : zp[2]:3 , 
Potential registers zp[1]:24 [ xr ] : zp[1]:24 , 
Potential registers zp[1]:25 [ yr ] : zp[1]:25 , 
Potential registers zp[1]:18 [ zr ] : zp[1]:18 , 
Potential registers zp[2]:28 [ psp1 ] : zp[2]:28 , 
Potential registers zp[2]:26 [ psp2 ] : zp[2]:26 , 
Potential registers zp[1]:19 [ mulf_init::val#0 ] : zp[1]:19 , reg byte x , reg byte y , 
Potential registers zp[1]:16 [ mulf_init::$2 ] : zp[1]:16 , reg byte x , reg byte y , 
Potential registers zp[1]:17 [ mulf_init::$6 ] : zp[1]:17 , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ print_uchar::$0 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:12 [ print_uchar::$2 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [print_char] 190,010: zp[1]:2 [ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ] 
Uplift Scope [] 127,194.82: zp[2]:3 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ] 35,003.5: zp[2]:5 [ print_line_cursor#12 print_line_cursor#0 ] 1,003: zp[1]:18 [ zr ] 167.17: zp[1]:24 [ xr ] 111.44: zp[1]:25 [ yr ] 0.62: zp[2]:26 [ psp2 ] 0.59: zp[2]:28 [ psp1 ] 
Uplift Scope [print_uchar] 20,002: zp[1]:11 [ print_uchar::$0 ] 20,002: zp[1]:12 [ print_uchar::$2 ] 7,707.25: zp[1]:13 [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ] 
Uplift Scope [memset] 33,336.67: zp[2]:7 [ memset::dst#2 memset::dst#1 ] 
Uplift Scope [print_str] 31,254.25: zp[2]:9 [ print_str::str#7 print_str::str#10 print_str::str#0 ] 
Uplift Scope [mulf_init] 2,073.5: zp[1]:15 [ mulf_init::i#2 mulf_init::i#1 ] 1,501.5: zp[1]:16 [ mulf_init::$2 ] 1,501.5: zp[1]:17 [ mulf_init::$6 ] 900.9: zp[1]:19 [ mulf_init::val#0 ] 898.33: zp[2]:20 [ mulf_init::add#2 mulf_init::add#1 ] 750.75: zp[2]:22 [ mulf_init::sqr#2 mulf_init::sqr#1 ] 
Uplift Scope [print_schar] 4,504.5: zp[1]:14 [ print_schar::b#6 print_schar::b#0 print_schar::b#4 ] 
Uplift Scope [MOS6526_CIA] 
Uplift Scope [MOS6569_VICII] 
Uplift Scope [MOS6581_SID] 
Uplift Scope [print_ln] 
Uplift Scope [print_cls] 
Uplift Scope [RADIX] 
Uplift Scope [main] 
Uplift Scope [do_perspective] 
Uplift Scope [perspective] 
Uplift Scope [__start] 

Uplifting [print_char] best 4196 combination reg byte a [ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ] 
Uplifting [] best 4196 combination zp[2]:3 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ] zp[2]:5 [ print_line_cursor#12 print_line_cursor#0 ] zp[1]:18 [ zr ] zp[1]:24 [ xr ] zp[1]:25 [ yr ] zp[2]:26 [ psp2 ] zp[2]:28 [ psp1 ] 
Uplifting [print_uchar] best 4175 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ] 
Uplifting [memset] best 4175 combination zp[2]:7 [ memset::dst#2 memset::dst#1 ] 
Uplifting [print_str] best 4175 combination zp[2]:9 [ print_str::str#7 print_str::str#10 print_str::str#0 ] 
Uplifting [mulf_init] best 3785 combination reg byte y [ mulf_init::i#2 mulf_init::i#1 ] reg byte x [ mulf_init::$2 ] reg byte x [ mulf_init::$6 ] zp[1]:19 [ mulf_init::val#0 ] zp[2]:20 [ mulf_init::add#2 mulf_init::add#1 ] zp[2]:22 [ mulf_init::sqr#2 mulf_init::sqr#1 ] 
Uplifting [print_schar] best 3770 combination reg byte x [ print_schar::b#6 print_schar::b#0 print_schar::b#4 ] 
Uplifting [MOS6526_CIA] best 3770 combination 
Uplifting [MOS6569_VICII] best 3770 combination 
Uplifting [MOS6581_SID] best 3770 combination 
Uplifting [print_ln] best 3770 combination 
Uplifting [print_cls] best 3770 combination 
Uplifting [RADIX] best 3770 combination 
Uplifting [main] best 3770 combination 
Uplifting [do_perspective] best 3770 combination 
Uplifting [perspective] best 3770 combination 
Uplifting [__start] best 3770 combination 
Attempting to uplift remaining variables inzp[1]:18 [ zr ]
Uplifting [] best 3770 combination zp[1]:18 [ zr ] 
Attempting to uplift remaining variables inzp[1]:19 [ mulf_init::val#0 ]
Uplifting [mulf_init] best 3770 combination zp[1]:19 [ mulf_init::val#0 ] 
Attempting to uplift remaining variables inzp[1]:24 [ xr ]
Uplifting [] best 3770 combination zp[1]:24 [ xr ] 
Attempting to uplift remaining variables inzp[1]:25 [ yr ]
Uplifting [] best 3770 combination zp[1]:25 [ yr ] 
Coalescing zero page register [ zp[2]:7 [ memset::dst#2 memset::dst#1 ] ] with [ zp[2]:22 [ mulf_init::sqr#2 mulf_init::sqr#1 ] ]
Coalescing zero page register [ zp[2]:9 [ print_str::str#7 print_str::str#10 print_str::str#0 ] ] with [ zp[2]:20 [ mulf_init::add#2 mulf_init::add#1 ] ]
Coalescing zero page register [ zp[2]:5 [ print_line_cursor#12 print_line_cursor#0 ] ] with [ zp[2]:7 [ memset::dst#2 memset::dst#1 mulf_init::sqr#2 mulf_init::sqr#1 ] ]
Allocated (was zp[2]:3) zp[2]:2 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ]
Allocated (was zp[2]:5) zp[2]:4 [ print_line_cursor#12 print_line_cursor#0 memset::dst#2 memset::dst#1 mulf_init::sqr#2 mulf_init::sqr#1 ]
Allocated (was zp[2]:9) zp[2]:6 [ print_str::str#7 print_str::str#10 print_str::str#0 mulf_init::add#2 mulf_init::add#1 ]
Allocated (was zp[1]:18) zp[1]:8 [ zr ]
Allocated (was zp[1]:19) zp[1]:9 [ mulf_init::val#0 ]
Allocated (was zp[1]:24) zp[1]:10 [ xr ]
Allocated (was zp[1]:25) zp[1]:11 [ yr ]
Allocated (was zp[2]:26) zp[2]:12 [ psp2 ]
Allocated (was zp[2]:28) zp[2]:14 [ psp1 ]

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  
/// @file
/// Commodore 64 Registers and Constants
/// @file
/// The MOS 6526 Complex Interface Adapter (CIA)
///
/// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
  // Upstart
  // Commodore 64 PRG executable file
.file [name="perspective.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
  // Global Constants & labels
  .label print_screen = $400
  // The rotated point - updated by calling rotate()
  .label xr = $a
  .label yr = $b
  .label zr = 8
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $e
  .label psp2 = $c
  .label print_char_cursor = 2
  .label print_line_cursor = 4
.segment Code
  // __start
__start: {
    jmp __init1
    // __start::__init1
  __init1:
    // [1] xr = 0 -- vbsz1=vbsc1 
    lda #0
    sta.z xr
    // [2] yr = 0 -- vbsz1=vbsc1 
    lda #0
    sta.z yr
    // [3] zr = 0 -- vbsz1=vbsc1 
    lda #0
    sta.z zr
    // [4] psp1 = 0 -- vwuz1=vwuc1 
    lda #<0
    sta.z psp1
    lda #>0
    sta.z psp1+1
    // [5] psp2 = 0 -- vwuz1=vwuc1 
    lda #<0
    sta.z psp2
    lda #>0
    sta.z psp2+1
    // [6] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
  __b1_from___init1:
    jmp __b1
    // __start::@1
  __b1:
    // [7] call main
    jsr main
    jmp __breturn
    // __start::@return
  __breturn:
    // [8] return 
    rts
}
  // main
main: {
    // asm { sei  }
    sei
    // [10] call mulf_init
    // [17] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp __b1
    // main::@1
  __b1:
    // [11] psp1 = (unsigned int)mulf_sqr1 -- vwuz1=vwuc1 
    lda #<mulf_sqr1
    sta.z psp1
    lda #>mulf_sqr1
    sta.z psp1+1
    // [12] psp2 = (unsigned int)mulf_sqr2 -- vwuz1=vwuc1 
    lda #<mulf_sqr2
    sta.z psp2
    lda #>mulf_sqr2
    sta.z psp2+1
    // [13] call print_cls
    // [35] phi from main::@1 to print_cls [phi:main::@1->print_cls]
  print_cls_from___b1:
    jsr print_cls
    // [14] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    jmp __b2
    // main::@2
  __b2:
    // [15] call do_perspective
    // [38] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
  do_perspective_from___b2:
    jsr do_perspective
    jmp __breturn
    // main::@return
  __breturn:
    // [16] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label val = 9
    .label sqr = 4
    .label add = 6
    // [18] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  __b1_from_mulf_init:
    // [18] phi mulf_init::add#2 = 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vwsc1 
    lda #<1
    sta.z add
    lda #>1
    sta.z add+1
    // [18] phi mulf_init::i#2 = 0 [phi:mulf_init->mulf_init::@1#1] -- vbuyy=vbuc1 
    ldy #0
    // [18] phi mulf_init::sqr#2 = 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vwsc1 
    lda #<0
    sta.z sqr
    lda #>0
    sta.z sqr+1
    jmp __b1
    // [18] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
  __b1_from___b1:
    // [18] phi mulf_init::add#2 = mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
    // [18] phi mulf_init::i#2 = mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
    // [18] phi mulf_init::sqr#2 = mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    jmp __b1
    // mulf_init::@1
  __b1:
    // [19] mulf_init::val#0 = byte1  mulf_init::sqr#2 -- vbuz1=_byte1_vwsz2 
    lda.z sqr+1
    sta.z val
    // [20] mulf_sqr1[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr1,y
    // [21] (mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr1+$100,y
    // [22] mulf_init::$2 = - mulf_init::i#2 -- vbuxx=_neg_vbuyy 
    tya
    eor #$ff
    tax
    inx
    // [23] mulf_sqr1[mulf_init::$2] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1,x
    // [24] (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1+$100,x
    // [25] (mulf_sqr2+1)[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr2+1,y
    // [26] (mulf_sqr2+$100+1)[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    lda.z val
    sta mulf_sqr2+$100+1,y
    // [27] mulf_init::$6 = 1 - mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // [28] mulf_sqr2[mulf_init::$6] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2,x
    // [29] (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2+$100,x
    // [30] mulf_init::sqr#1 = mulf_init::sqr#2 + mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    clc
    lda.z sqr
    adc.z add
    sta.z sqr
    lda.z sqr+1
    adc.z add+1
    sta.z sqr+1
    // [31] mulf_init::add#1 = mulf_init::add#2 + 2 -- vwsz1=vwsz1_plus_vbsc1 
    lda.z add
    clc
    adc #<2
    sta.z add
    lda.z add+1
    adc #>2
    sta.z add+1
    // [32] mulf_init::i#1 = ++ mulf_init::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [33] if(mulf_init::i#1!=$81) goto mulf_init::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$81
    bne __b1_from___b1
    jmp __breturn
    // mulf_init::@return
  __breturn:
    // [34] return 
    rts
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // [36] call memset
    // [65] phi from print_cls to memset [phi:print_cls->memset]
  memset_from_print_cls:
    jsr memset
    jmp __breturn
    // print_cls::@return
  __breturn:
    // [37] return 
    rts
}
  // do_perspective
// void do_perspective(signed char x, signed char y, signed char z)
do_perspective: {
    .label x = $39
    .label y = -$47
    .label z = $36
    // [39] call print_str
    // [71] phi from do_perspective to print_str [phi:do_perspective->print_str]
  print_str_from_do_perspective:
    // [71] phi print_char_cursor#77 = print_screen#0 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [71] phi print_str::str#10 = 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
    // [40] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
  __b1_from_do_perspective:
    jmp __b1
    // do_perspective::@1
  __b1:
    // [41] call print_schar
    // [78] phi from do_perspective::@1 to print_schar [phi:do_perspective::@1->print_schar]
  print_schar_from___b1:
    // [78] phi print_schar::b#4 = do_perspective::x#0 [phi:do_perspective::@1->print_schar#0] -- vbsxx=vbsc1 
    ldx #x
    jsr print_schar
    // [42] 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:
    // [43] call print_str
    // [71] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
  print_str_from___b2:
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@2->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [44] 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:
    // [45] call print_schar
    // [78] phi from do_perspective::@3 to print_schar [phi:do_perspective::@3->print_schar]
  print_schar_from___b3:
    // [78] phi print_schar::b#4 = do_perspective::y#0 [phi:do_perspective::@3->print_schar#0] -- vbsxx=vbsc1 
    ldx #y
    jsr print_schar
    // [46] 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:
    // [47] call print_str
    // [71] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
  print_str_from___b4:
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@4->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [48] 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:
    // [49] call print_schar
    // [78] phi from do_perspective::@5 to print_schar [phi:do_perspective::@5->print_schar]
  print_schar_from___b5:
    // [78] phi print_schar::b#4 = do_perspective::z#0 [phi:do_perspective::@5->print_schar#0] -- vbsxx=vbsc1 
    ldx #z
    jsr print_schar
    // [50] 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:
    // [51] call print_str
    // [71] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
  print_str_from___b6:
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@6->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [52] 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:
    // [53] call perspective
    jsr perspective
    jmp __b8
    // do_perspective::@8
  __b8:
    // [54] print_uchar::b#1 = (char)xr -- vbuxx=vbuz1 
    ldx.z xr
    // [55] call print_uchar
    // [94] phi from do_perspective::@8 to print_uchar [phi:do_perspective::@8->print_uchar]
  print_uchar_from___b8:
    // [94] phi print_char_cursor#72 = print_char_cursor#1 [phi:do_perspective::@8->print_uchar#0] -- register_copy 
    // [94] phi print_uchar::b#3 = print_uchar::b#1 [phi:do_perspective::@8->print_uchar#1] -- register_copy 
    jsr print_uchar
    // [56] 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:
    // [57] call print_str
    // [71] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
  print_str_from___b9:
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@9->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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:
    // [58] print_uchar::b#2 = (char)yr -- vbuxx=vbuz1 
    ldx.z yr
    // [59] call print_uchar
    // [94] phi from do_perspective::@10 to print_uchar [phi:do_perspective::@10->print_uchar]
  print_uchar_from___b10:
    // [94] phi print_char_cursor#72 = print_char_cursor#1 [phi:do_perspective::@10->print_uchar#0] -- register_copy 
    // [94] phi print_uchar::b#3 = print_uchar::b#2 [phi:do_perspective::@10->print_uchar#1] -- register_copy 
    jsr print_uchar
    // [60] 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:
    // [61] call print_str
    // [71] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
  print_str_from___b11:
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@11->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [62] 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:
    // [63] call print_ln
    // [102] 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:
    // [64] return 
    rts
  .segment Data
    str: .text "("
    .byte 0
    str1: .text ","
    .byte 0
    str3: .text ") -> ("
    .byte 0
    str5: .text ")"
    .byte 0
}
.segment Code
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(void *str, char c, unsigned int num)
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = print_screen
    .label end = str+num
    .label dst = 4
    // [66] phi from memset to memset::@1 [phi:memset->memset::@1]
  __b1_from_memset:
    // [66] phi memset::dst#2 = (char *)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:
    // [67] if(memset::dst#2!=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:
    // [68] return 
    rts
    // memset::@2
  __b2:
    // [69] *memset::dst#2 = memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // [70] memset::dst#1 = ++ memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [66] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
  __b1_from___b2:
    // [66] phi memset::dst#2 = memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // print_str
// Print a zero-terminated string
// void print_str(__zp(6) char *str)
print_str: {
    .label str = 6
    // [72] phi from print_str print_str::@3 to print_str::@1 [phi:print_str/print_str::@3->print_str::@1]
  __b1_from_print_str:
  __b1_from___b3:
    // [72] phi print_char_cursor#1 = print_char_cursor#77 [phi:print_str/print_str::@3->print_str::@1#0] -- register_copy 
    // [72] phi print_str::str#7 = print_str::str#10 [phi:print_str/print_str::@3->print_str::@1#1] -- register_copy 
    jmp __b1
    // print_str::@1
  __b1:
    // [73] if(0!=*print_str::str#7) goto print_str::@2 -- 0_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    jmp __breturn
    // print_str::@return
  __breturn:
    // [74] return 
    rts
    // print_str::@2
  __b2:
    // [75] print_char::ch#0 = *print_str::str#7 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (str),y
    // [76] call print_char
    // [107] phi from print_str::@2 to print_char [phi:print_str::@2->print_char]
  print_char_from___b2:
    // [107] phi print_char_cursor#45 = print_char_cursor#1 [phi:print_str::@2->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = print_char::ch#0 [phi:print_str::@2->print_char#1] -- register_copy 
    jsr print_char
    jmp __b3
    // print_str::@3
  __b3:
    // [77] print_str::str#0 = ++ print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp __b1_from___b3
}
  // print_schar
// Print a signed char as HEX
// void print_schar(__register(X) signed char b)
print_schar: {
    // [79] if(print_schar::b#4<0) goto print_schar::@1 -- vbsxx_lt_0_then_la1 
    cpx #0
    bmi __b1_from_print_schar
    // [80] phi from print_schar to print_schar::@3 [phi:print_schar->print_schar::@3]
  __b3_from_print_schar:
    jmp __b3
    // print_schar::@3
  __b3:
    // [81] call print_char
    // [107] phi from print_schar::@3 to print_char [phi:print_schar::@3->print_char]
  print_char_from___b3:
    // [107] phi print_char_cursor#45 = print_char_cursor#1 [phi:print_schar::@3->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = ' ' [phi:print_schar::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
    // [82] phi from print_schar::@3 print_schar::@4 to print_schar::@2 [phi:print_schar::@3/print_schar::@4->print_schar::@2]
  __b2_from___b3:
  __b2_from___b4:
    // [82] phi print_schar::b#6 = print_schar::b#4 [phi:print_schar::@3/print_schar::@4->print_schar::@2#0] -- register_copy 
    jmp __b2
    // print_schar::@2
  __b2:
    // [83] print_uchar::b#0 = (char)print_schar::b#6
    // [84] call print_uchar
    // [94] phi from print_schar::@2 to print_uchar [phi:print_schar::@2->print_uchar]
  print_uchar_from___b2:
    // [94] phi print_char_cursor#72 = print_char_cursor#11 [phi:print_schar::@2->print_uchar#0] -- register_copy 
    // [94] phi print_uchar::b#3 = print_uchar::b#0 [phi:print_schar::@2->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __breturn
    // print_schar::@return
  __breturn:
    // [85] return 
    rts
    // [86] phi from print_schar to print_schar::@1 [phi:print_schar->print_schar::@1]
  __b1_from_print_schar:
    jmp __b1
    // print_schar::@1
  __b1:
    // [87] call print_char
    // [107] phi from print_schar::@1 to print_char [phi:print_schar::@1->print_char]
  print_char_from___b1:
    // [107] phi print_char_cursor#45 = print_char_cursor#1 [phi:print_schar::@1->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = '-' [phi:print_schar::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    jmp __b4
    // print_schar::@4
  __b4:
    // [88] print_schar::b#0 = - print_schar::b#4 -- vbsxx=_neg_vbsxx 
    txa
    eor #$ff
    clc
    adc #1
    tax
    jmp __b2_from___b4
}
  // perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
// void perspective(signed char x, signed char y, signed char z)
perspective: {
    // [89] xr = do_perspective::x#0 -- vbsz1=vbsc1 
    lda #do_perspective.x
    sta.z xr
    // [90] yr = do_perspective::y#0 -- vbsz1=vbsc1 
    lda #do_perspective.y
    sta.z yr
    // [91] zr = do_perspective::z#0 -- vbsz1=vbsc1 
    lda #do_perspective.z
    sta.z 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:
    // [93] return 
    rts
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // [95] print_uchar::$0 = print_uchar::b#3 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [96] print_char::ch#3 = print_hextab[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [97] call print_char
  // Table of hexadecimal digits
    // [107] phi from print_uchar to print_char [phi:print_uchar->print_char]
  print_char_from_print_uchar:
    // [107] phi print_char_cursor#45 = print_char_cursor#72 [phi:print_uchar->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = print_char::ch#3 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_uchar::@1
  __b1:
    // [98] print_uchar::$2 = print_uchar::b#3 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [99] print_char::ch#4 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [100] call print_char
    // [107] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
  print_char_from___b1:
    // [107] phi print_char_cursor#45 = print_char_cursor#11 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = print_char::ch#4 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_uchar::@return
  __breturn:
    // [101] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [103] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  __b1_from_print_ln:
    // [103] phi print_line_cursor#12 = print_screen#0 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor
    lda #>print_screen
    sta.z print_line_cursor+1
    jmp __b1
    // [103] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  __b1_from___b1:
    // [103] phi print_line_cursor#12 = print_line_cursor#0 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp __b1
    // print_ln::@1
  __b1:
    // [104] print_line_cursor#0 = print_line_cursor#12 + $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
  !:
    // [105] if(print_line_cursor#0<print_char_cursor#1) 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:
    // [106] return 
    rts
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // [108] *print_char_cursor#45 = print_char::ch#5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [109] print_char_cursor#11 = ++ print_char_cursor#45 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [110] return 
    rts
}
  // File Data
.segment 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 __init1
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
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 __b3
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
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Removing instruction lda #0
Removing instruction lda #<0
Removing instruction lda #>0
Removing instruction lda #<0
Removing instruction lda #>0
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
Removing instruction lda.z val
Removing instruction lda zr
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b3 with __b1
Replacing label __b1_from_print_schar with __b1
Replacing label __b2_from___b4 with __b2
Replacing label __b1_from___b1 with __b1
Replacing label __b1_from___b1 with __b1
Removing instruction __b1_from___init1:
Removing instruction __b2_from___b1:
Removing instruction do_perspective_from___b2:
Removing instruction __b1_from___b1:
Removing instruction __b1_from_do_perspective:
Removing instruction print_schar_from___b1:
Removing instruction __b2_from___b1:
Removing instruction print_str_from___b2:
Removing instruction __b3_from___b2:
Removing instruction print_schar_from___b3:
Removing instruction __b4_from___b3:
Removing instruction print_str_from___b4:
Removing instruction __b5_from___b4:
Removing instruction print_schar_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_print_str:
Removing instruction __b1_from___b3:
Removing instruction __b3_from_print_schar:
Removing instruction print_char_from___b3:
Removing instruction __b2_from___b3:
Removing instruction __b2_from___b4:
Removing instruction print_uchar_from___b2:
Removing instruction __b1_from_print_schar:
Removing instruction print_char_from___b1:
Removing instruction __b1_from___b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __init1:
Removing instruction __b1:
Removing instruction __breturn:
Removing instruction mulf_init_from_main:
Removing instruction __b1:
Removing instruction print_cls_from___b1:
Removing instruction __b2:
Removing instruction __breturn:
Removing instruction __b1_from_mulf_init:
Removing instruction __breturn:
Removing instruction memset_from_print_cls:
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_uchar_from___b8:
Removing instruction __b9:
Removing instruction __b10:
Removing instruction print_uchar_from___b10:
Removing instruction __b11:
Removing instruction __b12:
Removing instruction __breturn:
Removing instruction __b1_from_memset:
Removing instruction __breturn:
Removing instruction __b1_from___b2:
Removing instruction __breturn:
Removing instruction print_char_from___b2:
Removing instruction __b3:
Removing instruction __b3:
Removing instruction __breturn:
Removing instruction __b4:
Removing instruction __breturn:
Removing instruction print_char_from_print_uchar:
Removing instruction __b1:
Removing instruction print_char_from___b1:
Removing instruction __breturn:
Removing instruction __b1_from_print_ln:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp __b1
Removing instruction jmp __b1
Succesful ASM optimization Pass5NextJumpElimination

FINAL SYMBOL TABLE
__constant signed char PERSP_Z[$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)));
    	}
    }
	}
 }}
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
void __start()
void do_perspective(signed char x , signed char y , signed char z)
__constant char do_perspective::str[2] = "("
__constant char do_perspective::str1[2] = ","
__constant char do_perspective::str3[7] = ") -> ("
__constant char do_perspective::str5[2] = ")"
signed char do_perspective::x
__constant signed char do_perspective::x#0 = $39 // x
signed char do_perspective::y
__constant signed char do_perspective::y#0 = -$47 // y
signed char do_perspective::z
__constant signed char do_perspective::z#0 = $36 // z
void main()
void * memset(void *str , char c , unsigned int num)
char memset::c
__constant char memset::c#0 = ' ' // c
char *memset::dst
char *memset::dst#1 // dst zp[2]:4 20002.0
char *memset::dst#2 // dst zp[2]:4 13334.666666666666
char *memset::end
__constant char *memset::end#0 = (char *)memset::str#0+memset::num#0 // end
unsigned int memset::num
__constant unsigned int memset::num#0 = $3e8 // num
void *memset::return
void *memset::str
__constant void *memset::str#0 = (void *)print_screen#0 // str
void mulf_init()
char mulf_init::$2 // reg byte x 1501.5
char mulf_init::$6 // reg byte x 1501.5
int mulf_init::add
int mulf_init::add#1 // add zp[2]:6 667.3333333333334
int mulf_init::add#2 // add zp[2]:6 231.0
char mulf_init::i
char mulf_init::i#1 // reg byte y 1501.5
char mulf_init::i#2 // reg byte y 572.0
int mulf_init::sqr
int mulf_init::sqr#1 // sqr zp[2]:4 500.5
int mulf_init::sqr#2 // sqr zp[2]:4 250.25
char mulf_init::val
char mulf_init::val#0 // val zp[1]:9 900.9000000000001
__constant char mulf_sqr1[$200] = { fill( $200, 0) }
__constant char mulf_sqr2[$200] = { fill( $200, 0) }
void perspective(signed char x , signed char y , signed char z)
signed char perspective::x
signed char perspective::y
signed char perspective::z
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // reg byte a 20002.0
char print_char::ch#3 // reg byte a 20002.0
char print_char::ch#4 // reg byte a 20002.0
char print_char::ch#5 // reg byte a 130004.0
char *print_char_cursor
char *print_char_cursor#1 // print_char_cursor zp[2]:2 1277.230769230769
char *print_char_cursor#11 // print_char_cursor zp[2]:2 4673.423076923077
char *print_char_cursor#45 // print_char_cursor zp[2]:2 116003.5
char *print_char_cursor#72 // print_char_cursor zp[2]:2 3734.6666666666665
char *print_char_cursor#77 // print_char_cursor zp[2]:2 1506.0
void print_cls()
__constant const char print_hextab[] = "0123456789abcdef"z
char *print_line_cursor
char *print_line_cursor#0 // print_line_cursor zp[2]:4 15001.5
char *print_line_cursor#12 // print_line_cursor zp[2]:4 20002.0
void print_ln()
void print_schar(signed char b)
signed char print_schar::b
signed char print_schar::b#0 // reg byte x 2002.0
signed char print_schar::b#4 // reg byte x 500.5
signed char print_schar::b#6 // reg byte x 2002.0
char *print_screen
__constant char *print_screen#0 = (char *) 1024 // print_screen
void print_str(char *str)
char *print_str::str
char *print_str::str#0 // str zp[2]:6 20002.0
char *print_str::str#10 // str zp[2]:6 1001.0
char *print_str::str#7 // str zp[2]:6 10251.25
void print_uchar(char b)
char print_uchar::$0 // reg byte a 20002.0
char print_uchar::$2 // reg byte x 20002.0
char print_uchar::b
char print_uchar::b#0 // reg byte x 2002.0
char print_uchar::b#1 // reg byte x 202.0
char print_uchar::b#2 // reg byte x 202.0
char print_uchar::b#3 // reg byte x 5301.25
__loadstore volatile unsigned int psp1 // zp[2]:14 0.5909090909090909
__loadstore volatile unsigned int psp2 // zp[2]:12 0.6190476190476191
__loadstore volatile signed char xr // zp[1]:10 167.16666666666669
__loadstore volatile signed char yr // zp[1]:11 111.44444444444446
__loadstore volatile signed char zr // zp[1]:8 1003.0

reg byte y [ mulf_init::i#2 mulf_init::i#1 ]
zp[2]:6 [ print_str::str#7 print_str::str#10 print_str::str#0 mulf_init::add#2 mulf_init::add#1 ]
reg byte x [ print_schar::b#6 print_schar::b#0 print_schar::b#4 ]
reg byte x [ print_uchar::b#3 print_uchar::b#2 print_uchar::b#1 print_uchar::b#0 ]
zp[2]:4 [ print_line_cursor#12 print_line_cursor#0 memset::dst#2 memset::dst#1 mulf_init::sqr#2 mulf_init::sqr#1 ]
reg byte a [ print_char::ch#5 print_char::ch#0 print_char::ch#3 print_char::ch#4 ]
zp[2]:2 [ print_char_cursor#45 print_char_cursor#72 print_char_cursor#1 print_char_cursor#77 print_char_cursor#11 ]
zp[1]:10 [ xr ]
zp[1]:11 [ yr ]
zp[1]:8 [ zr ]
zp[2]:14 [ psp1 ]
zp[2]:12 [ psp2 ]
zp[1]:9 [ mulf_init::val#0 ]
reg byte x [ mulf_init::$2 ]
reg byte x [ mulf_init::$6 ]
reg byte a [ print_uchar::$0 ]
reg byte x [ print_uchar::$2 ]


FINAL ASSEMBLER
Score: 3117

  // 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  
/// @file
/// Commodore 64 Registers and Constants
/// @file
/// The MOS 6526 Complex Interface Adapter (CIA)
///
/// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
  // Upstart
  // Commodore 64 PRG executable file
.file [name="perspective.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(__start)
  // Global Constants & labels
  .label print_screen = $400
  // The rotated point - updated by calling rotate()
  .label xr = $a
  .label yr = $b
  .label zr = 8
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $e
  .label psp2 = $c
  .label print_char_cursor = 2
  .label print_line_cursor = 4
.segment Code
  // __start
__start: {
    // __start::__init1
    // signed char xr
    // [1] xr = 0 -- vbsz1=vbsc1 
    lda #0
    sta.z xr
    // signed char yr
    // [2] yr = 0 -- vbsz1=vbsc1 
    sta.z yr
    // signed char zr
    // [3] zr = 0 -- vbsz1=vbsc1 
    sta.z zr
    // unsigned int psp1
    // [4] psp1 = 0 -- vwuz1=vwuc1 
    sta.z psp1
    sta.z psp1+1
    // unsigned int psp2
    // [5] psp2 = 0 -- vwuz1=vwuc1 
    sta.z psp2
    sta.z psp2+1
    // [6] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1]
    // __start::@1
    // [7] call main
    jsr main
    // __start::@return
    // [8] return 
    rts
}
  // main
main: {
    // asm
    // asm { sei  }
    sei
    // mulf_init()
    // [10] call mulf_init
    // [17] phi from main to mulf_init [phi:main->mulf_init]
    jsr mulf_init
    // main::@1
    // psp1 = (unsigned int)mulf_sqr1
    // [11] psp1 = (unsigned int)mulf_sqr1 -- vwuz1=vwuc1 
    lda #<mulf_sqr1
    sta.z psp1
    lda #>mulf_sqr1
    sta.z psp1+1
    // psp2 = (unsigned int)mulf_sqr2
    // [12] psp2 = (unsigned int)mulf_sqr2 -- vwuz1=vwuc1 
    lda #<mulf_sqr2
    sta.z psp2
    lda #>mulf_sqr2
    sta.z psp2+1
    // print_cls()
    // [13] call print_cls
    // [35] phi from main::@1 to print_cls [phi:main::@1->print_cls]
    jsr print_cls
    // [14] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // main::@2
    // do_perspective($39, -$47, $36)
    // [15] call do_perspective
    // [38] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
    jsr do_perspective
    // main::@return
    // }
    // [16] return 
    rts
}
  // mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label val = 9
    .label sqr = 4
    .label add = 6
    // [18] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
    // [18] phi mulf_init::add#2 = 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vwsc1 
    lda #<1
    sta.z add
    lda #>1
    sta.z add+1
    // [18] phi mulf_init::i#2 = 0 [phi:mulf_init->mulf_init::@1#1] -- vbuyy=vbuc1 
    tay
    // [18] phi mulf_init::sqr#2 = 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vwsc1 
    sta.z sqr
    sta.z sqr+1
    // [18] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
    // [18] phi mulf_init::add#2 = mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
    // [18] phi mulf_init::i#2 = mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
    // [18] phi mulf_init::sqr#2 = mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    // mulf_init::@1
  __b1:
    // char val = BYTE1(sqr)
    // [19] mulf_init::val#0 = byte1  mulf_init::sqr#2 -- vbuz1=_byte1_vwsz2 
    lda.z sqr+1
    sta.z val
    // mulf_sqr1[i] = val
    // [20] mulf_sqr1[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr1,y
    // (mulf_sqr1+$100)[i] = val
    // [21] (mulf_sqr1+$100)[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr1+$100,y
    // -i
    // [22] mulf_init::$2 = - mulf_init::i#2 -- vbuxx=_neg_vbuyy 
    tya
    eor #$ff
    tax
    inx
    // mulf_sqr1[-i] = val
    // [23] mulf_sqr1[mulf_init::$2] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr1,x
    // (mulf_sqr1+$100)[-i] = val
    // [24] (mulf_sqr1+$100)[mulf_init::$2] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr1+$100,x
    // mulf_sqr2[i+1] = val
    // [25] (mulf_sqr2+1)[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr2+1,y
    // (mulf_sqr2+$100)[i+1] = val
    // [26] (mulf_sqr2+$100+1)[mulf_init::i#2] = mulf_init::val#0 -- pbuc1_derefidx_vbuyy=vbuz1 
    sta mulf_sqr2+$100+1,y
    // 1-i
    // [27] mulf_init::$6 = 1 - mulf_init::i#2 -- vbuxx=vbuc1_minus_vbuyy 
    tya
    eor #$ff
    tax
    axs #-1-1
    // mulf_sqr2[1-i] = val
    // [28] mulf_sqr2[mulf_init::$6] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda.z val
    sta mulf_sqr2,x
    // (mulf_sqr2+$100)[1-i] = val
    // [29] (mulf_sqr2+$100)[mulf_init::$6] = mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr2+$100,x
    // sqr += add
    // [30] mulf_init::sqr#1 = mulf_init::sqr#2 + mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    clc
    lda.z sqr
    adc.z add
    sta.z sqr
    lda.z sqr+1
    adc.z add+1
    sta.z sqr+1
    // add +=2
    // [31] mulf_init::add#1 = mulf_init::add#2 + 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( char i:0..128)
    // [32] mulf_init::i#1 = ++ mulf_init::i#2 -- vbuyy=_inc_vbuyy 
    iny
    // [33] if(mulf_init::i#1!=$81) goto mulf_init::@1 -- vbuyy_neq_vbuc1_then_la1 
    cpy #$81
    bne __b1
    // mulf_init::@return
    // }
    // [34] return 
    rts
}
  // print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    // memset(print_screen, ' ', 1000)
    // [36] call memset
    // [65] phi from print_cls to memset [phi:print_cls->memset]
    jsr memset
    // print_cls::@return
    // }
    // [37] return 
    rts
}
  // do_perspective
// void do_perspective(signed char x, signed char y, signed char z)
do_perspective: {
    .label x = $39
    .label y = -$47
    .label z = $36
    // print_str("(")
    // [39] call print_str
    // [71] phi from do_perspective to print_str [phi:do_perspective->print_str]
    // [71] phi print_char_cursor#77 = print_screen#0 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [71] phi print_str::str#10 = 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
    // [40] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
    // do_perspective::@1
    // print_schar(x)
    // [41] call print_schar
    // [78] phi from do_perspective::@1 to print_schar [phi:do_perspective::@1->print_schar]
    // [78] phi print_schar::b#4 = do_perspective::x#0 [phi:do_perspective::@1->print_schar#0] -- vbsxx=vbsc1 
    ldx #x
    jsr print_schar
    // [42] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
    // do_perspective::@2
    // print_str(",")
    // [43] call print_str
    // [71] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@2->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [44] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
    // do_perspective::@3
    // print_schar(y)
    // [45] call print_schar
    // [78] phi from do_perspective::@3 to print_schar [phi:do_perspective::@3->print_schar]
    // [78] phi print_schar::b#4 = do_perspective::y#0 [phi:do_perspective::@3->print_schar#0] -- vbsxx=vbsc1 
    ldx #y
    jsr print_schar
    // [46] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
    // do_perspective::@4
    // print_str(",")
    // [47] call print_str
    // [71] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@4->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [48] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
    // do_perspective::@5
    // print_schar(z)
    // [49] call print_schar
    // [78] phi from do_perspective::@5 to print_schar [phi:do_perspective::@5->print_schar]
    // [78] phi print_schar::b#4 = do_perspective::z#0 [phi:do_perspective::@5->print_schar#0] -- vbsxx=vbsc1 
    ldx #z
    jsr print_schar
    // [50] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
    // do_perspective::@6
    // print_str(") -> (")
    // [51] call print_str
    // [71] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@6->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [52] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
    // do_perspective::@7
    // perspective(x, y, z)
    // [53] call perspective
    jsr perspective
    // do_perspective::@8
    // print_uchar((char)xr)
    // [54] print_uchar::b#1 = (char)xr -- vbuxx=vbuz1 
    ldx.z xr
    // [55] call print_uchar
    // [94] phi from do_perspective::@8 to print_uchar [phi:do_perspective::@8->print_uchar]
    // [94] phi print_char_cursor#72 = print_char_cursor#1 [phi:do_perspective::@8->print_uchar#0] -- register_copy 
    // [94] phi print_uchar::b#3 = print_uchar::b#1 [phi:do_perspective::@8->print_uchar#1] -- register_copy 
    jsr print_uchar
    // [56] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
    // do_perspective::@9
    // print_str(",")
    // [57] call print_str
    // [71] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@9->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // print_uchar((char)yr)
    // [58] print_uchar::b#2 = (char)yr -- vbuxx=vbuz1 
    ldx.z yr
    // [59] call print_uchar
    // [94] phi from do_perspective::@10 to print_uchar [phi:do_perspective::@10->print_uchar]
    // [94] phi print_char_cursor#72 = print_char_cursor#1 [phi:do_perspective::@10->print_uchar#0] -- register_copy 
    // [94] phi print_uchar::b#3 = print_uchar::b#2 [phi:do_perspective::@10->print_uchar#1] -- register_copy 
    jsr print_uchar
    // [60] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
    // do_perspective::@11
    // print_str(")")
    // [61] call print_str
    // [71] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
    // [71] phi print_char_cursor#77 = print_char_cursor#11 [phi:do_perspective::@11->print_str#0] -- register_copy 
    // [71] phi print_str::str#10 = 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
    // [62] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
    // do_perspective::@12
    // print_ln()
    // [63] call print_ln
    // [102] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
    jsr print_ln
    // do_perspective::@return
    // }
    // [64] return 
    rts
  .segment Data
    str: .text "("
    .byte 0
    str1: .text ","
    .byte 0
    str3: .text ") -> ("
    .byte 0
    str5: .text ")"
    .byte 0
}
.segment Code
  // memset
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(void *str, char c, unsigned int num)
memset: {
    .const c = ' '
    .const num = $3e8
    .label str = print_screen
    .label end = str+num
    .label dst = 4
    // [66] phi from memset to memset::@1 [phi:memset->memset::@1]
    // [66] phi memset::dst#2 = (char *)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++)
    // [67] if(memset::dst#2!=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
    // }
    // [68] return 
    rts
    // memset::@2
  __b2:
    // *dst = c
    // [69] *memset::dst#2 = memset::c#0 -- _deref_pbuz1=vbuc1 
    lda #c
    ldy #0
    sta (dst),y
    // for(char* dst = str; dst!=end; dst++)
    // [70] memset::dst#1 = ++ memset::dst#2 -- pbuz1=_inc_pbuz1 
    inc.z dst
    bne !+
    inc.z dst+1
  !:
    // [66] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1]
    // [66] phi memset::dst#2 = memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy 
    jmp __b1
}
  // print_str
// Print a zero-terminated string
// void print_str(__zp(6) char *str)
print_str: {
    .label str = 6
    // [72] phi from print_str print_str::@3 to print_str::@1 [phi:print_str/print_str::@3->print_str::@1]
    // [72] phi print_char_cursor#1 = print_char_cursor#77 [phi:print_str/print_str::@3->print_str::@1#0] -- register_copy 
    // [72] phi print_str::str#7 = print_str::str#10 [phi:print_str/print_str::@3->print_str::@1#1] -- register_copy 
    // print_str::@1
  __b1:
    // while(*str)
    // [73] if(0!=*print_str::str#7) goto print_str::@2 -- 0_neq__deref_pbuz1_then_la1 
    ldy #0
    lda (str),y
    cmp #0
    bne __b2
    // print_str::@return
    // }
    // [74] return 
    rts
    // print_str::@2
  __b2:
    // print_char(*(str++))
    // [75] print_char::ch#0 = *print_str::str#7 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (str),y
    // [76] call print_char
    // [107] phi from print_str::@2 to print_char [phi:print_str::@2->print_char]
    // [107] phi print_char_cursor#45 = print_char_cursor#1 [phi:print_str::@2->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = print_char::ch#0 [phi:print_str::@2->print_char#1] -- register_copy 
    jsr print_char
    // print_str::@3
    // print_char(*(str++));
    // [77] print_str::str#0 = ++ print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc.z str
    bne !+
    inc.z str+1
  !:
    jmp __b1
}
  // print_schar
// Print a signed char as HEX
// void print_schar(__register(X) signed char b)
print_schar: {
    // if(b<0)
    // [79] if(print_schar::b#4<0) goto print_schar::@1 -- vbsxx_lt_0_then_la1 
    cpx #0
    bmi __b1
    // [80] phi from print_schar to print_schar::@3 [phi:print_schar->print_schar::@3]
    // print_schar::@3
    // print_char(' ')
    // [81] call print_char
    // [107] phi from print_schar::@3 to print_char [phi:print_schar::@3->print_char]
    // [107] phi print_char_cursor#45 = print_char_cursor#1 [phi:print_schar::@3->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = ' ' [phi:print_schar::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
    // [82] phi from print_schar::@3 print_schar::@4 to print_schar::@2 [phi:print_schar::@3/print_schar::@4->print_schar::@2]
    // [82] phi print_schar::b#6 = print_schar::b#4 [phi:print_schar::@3/print_schar::@4->print_schar::@2#0] -- register_copy 
    // print_schar::@2
  __b2:
    // print_uchar((char)b)
    // [83] print_uchar::b#0 = (char)print_schar::b#6
    // [84] call print_uchar
    // [94] phi from print_schar::@2 to print_uchar [phi:print_schar::@2->print_uchar]
    // [94] phi print_char_cursor#72 = print_char_cursor#11 [phi:print_schar::@2->print_uchar#0] -- register_copy 
    // [94] phi print_uchar::b#3 = print_uchar::b#0 [phi:print_schar::@2->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_schar::@return
    // }
    // [85] return 
    rts
    // [86] phi from print_schar to print_schar::@1 [phi:print_schar->print_schar::@1]
    // print_schar::@1
  __b1:
    // print_char('-')
    // [87] call print_char
    // [107] phi from print_schar::@1 to print_char [phi:print_schar::@1->print_char]
    // [107] phi print_char_cursor#45 = print_char_cursor#1 [phi:print_schar::@1->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = '-' [phi:print_schar::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    // print_schar::@4
    // b = -b
    // [88] print_schar::b#0 = - print_schar::b#4 -- vbsxx=_neg_vbsxx 
    txa
    eor #$ff
    clc
    adc #1
    tax
    jmp __b2
}
  // perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
// void perspective(signed char x, signed char y, signed char z)
perspective: {
    // xr = x
    // [89] xr = do_perspective::x#0 -- vbsz1=vbsc1 
    lda #do_perspective.x
    sta.z xr
    // yr = y
    // [90] yr = do_perspective::y#0 -- vbsz1=vbsc1 
    lda #do_perspective.y
    sta.z yr
    // zr = z
    // [91] zr = do_perspective::z#0 -- vbsz1=vbsc1 
    lda #do_perspective.z
    sta.z 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
    // }
    // [93] return 
    rts
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // b>>4
    // [95] print_uchar::$0 = print_uchar::b#3 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [96] print_char::ch#3 = print_hextab[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [97] call print_char
  // Table of hexadecimal digits
    // [107] phi from print_uchar to print_char [phi:print_uchar->print_char]
    // [107] phi print_char_cursor#45 = print_char_cursor#72 [phi:print_uchar->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = print_char::ch#3 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@1
    // b&$f
    // [98] print_uchar::$2 = print_uchar::b#3 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [99] print_char::ch#4 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [100] call print_char
    // [107] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
    // [107] phi print_char_cursor#45 = print_char_cursor#11 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [107] phi print_char::ch#5 = print_char::ch#4 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@return
    // }
    // [101] return 
    rts
}
  // print_ln
// Print a newline
print_ln: {
    // [103] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
    // [103] phi print_line_cursor#12 = print_screen#0 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_line_cursor
    lda #>print_screen
    sta.z print_line_cursor+1
    // [103] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
    // [103] phi print_line_cursor#12 = print_line_cursor#0 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    // print_ln::@1
  __b1:
    // print_line_cursor + $28
    // [104] print_line_cursor#0 = print_line_cursor#12 + $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)
    // [105] if(print_line_cursor#0<print_char_cursor#1) 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
    // }
    // [106] return 
    rts
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [108] *print_char_cursor#45 = print_char::ch#5 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [109] print_char_cursor#11 = ++ print_char_cursor#45 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [110] return 
    rts
}
  // File Data
.segment 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)));
    	}
    }
	}


